solorice/vscodium/extensions/github.vscode-pull-request-github-0.40.0/dist/browser/extension.js
2022-04-28 21:17:01 +03:00

1210 lines
1.3 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(()=>{var t0={39809:(g,G,k)=>{"use strict";const R=G;R.bignum=k(13550),R.define=k(22500).define,R.base=k(71979),R.constants=k(36826),R.decoders=k(78307),R.encoders=k(56579)},22500:(g,G,k)=>{"use strict";const R=k(56579),B=k(78307),A=k(35717),M=G;M.define=function(d,f){return new l(d,f)};function l(o,d){this.name=o,this.body=d,this.decoders={},this.encoders={}}l.prototype._createNamed=function(d){const f=this.name;function _(p){this._initNamed(p,f)}return A(_,d),_.prototype._initNamed=function(u,E){d.call(this,u,E)},new _(this)},l.prototype._getDecoder=function(d){return d=d||"der",this.decoders.hasOwnProperty(d)||(this.decoders[d]=this._createNamed(B[d])),this.decoders[d]},l.prototype.decode=function(d,f,_){return this._getDecoder(f).decode(d,_)},l.prototype._getEncoder=function(d){return d=d||"der",this.encoders.hasOwnProperty(d)||(this.encoders[d]=this._createNamed(R[d])),this.encoders[d]},l.prototype.encode=function(d,f,_){return this._getEncoder(f).encode(d,_)}},36625:(g,G,k)=>{"use strict";const R=k(35717),B=k(98465).b,A=k(2399).Buffer;function M(o,d){if(B.call(this,d),!A.isBuffer(o)){this.error("Input not Buffer");return}this.base=o,this.offset=0,this.length=o.length}R(M,B),G.C=M,M.isDecoderBuffer=function(d){return d instanceof M?!0:typeof d=="object"&&A.isBuffer(d.base)&&d.constructor.name==="DecoderBuffer"&&typeof d.offset=="number"&&typeof d.length=="number"&&typeof d.save=="function"&&typeof d.restore=="function"&&typeof d.isEmpty=="function"&&typeof d.readUInt8=="function"&&typeof d.skip=="function"&&typeof d.raw=="function"},M.prototype.save=function(){return{offset:this.offset,reporter:B.prototype.save.call(this)}},M.prototype.restore=function(d){const f=new M(this.base);return f.offset=d.offset,f.length=this.offset,this.offset=d.offset,B.prototype.restore.call(this,d.reporter),f},M.prototype.isEmpty=function(){return this.offset===this.length},M.prototype.readUInt8=function(d){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(d||"DecoderBuffer overrun")},M.prototype.skip=function(d,f){if(!(this.offset+d<=this.length))return this.error(f||"DecoderBuffer overrun");const _=new M(this.base);return _._reporterState=this._reporterState,_.offset=this.offset,_.length=this.offset+d,this.offset+=d,_},M.prototype.raw=function(d){return this.base.slice(d?d.offset:this.offset,this.length)};function l(o,d){if(Array.isArray(o))this.length=0,this.value=o.map(function(f){return l.isEncoderBuffer(f)||(f=new l(f,d)),this.length+=f.length,f},this);else if(typeof o=="number"){if(!(0<=o&&o<=255))return d.error("non-byte EncoderBuffer value");this.value=o,this.length=1}else if(typeof o=="string")this.value=o,this.length=A.byteLength(o);else if(A.isBuffer(o))this.value=o,this.length=o.length;else return d.error("Unsupported type: "+typeof o)}G.R=l,l.isEncoderBuffer=function(d){return d instanceof l?!0:typeof d=="object"&&d.constructor.name==="EncoderBuffer"&&typeof d.length=="number"&&typeof d.join=="function"},l.prototype.join=function(d,f){return d||(d=A.alloc(this.length)),f||(f=0),this.length===0||(Array.isArray(this.value)?this.value.forEach(function(_){_.join(d,f),f+=_.length}):(typeof this.value=="number"?d[f]=this.value:typeof this.value=="string"?d.write(this.value,f):A.isBuffer(this.value)&&this.value.copy(d,f),f+=this.length)),d}},71979:(g,G,k)=>{"use strict";const R=G;R.Reporter=k(98465).b,R.DecoderBuffer=k(36625).C,R.EncoderBuffer=k(36625).R,R.Node=k(41949)},41949:(g,G,k)=>{"use strict";const R=k(98465).b,B=k(36625).R,A=k(36625).C,M=k(79746),l=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],o=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(l),d=["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"];function f(p,u,E){const h={};this._baseState=h,h.name=E,h.enc=p,h.parent=u||null,h.children=null,h.tag=null,h.args=null,h.reverseArgs=null,h.choice=null,h.optional=!1,h.any=!1,h.obj=!1,h.use=null,h.useDecoder=null,h.key=null,h.default=null,h.explicit=null,h.implicit=null,h.contains=null,h.parent||(h.children=[],this._wrap())}g.exports=f;const _=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];f.prototype.clone=function(){const u=this._baseState,E={};_.forEach(function(m){E[m]=u[m]});const h=new this.constructor(E.parent);return h._baseState=E,h},f.prototype._wrap=function(){const u=this._baseState;o.forEach(function(E){this[E]=function(){const m=new this.constructor(this);return u.children.push(m),m[E].apply(m,arguments)}},this)},f.prototype._init=function(u){const E=this._baseState;M(E.parent===null),u.call(this),E.children=E.children.filter(function(h){return h._baseState.parent===this},this),M.equal(E.children.length,1,"Root node can have only one child")},f.prototype._useArgs=function(u){const E=this._baseState,h=u.filter(function(m){return m instanceof this.constructor},this);u=u.filter(function(m){return!(m instanceof this.constructor)},this),h.length!==0&&(M(E.children===null),E.children=h,h.forEach(function(m){m._baseState.parent=this},this)),u.length!==0&&(M(E.args===null),E.args=u,E.reverseArgs=u.map(function(m){if(typeof m!="object"||m.constructor!==Object)return m;const y={};return Object.keys(m).forEach(function(C){C==(C|0)&&(C|=0);const D=m[C];y[D]=C}),y}))},d.forEach(function(p){f.prototype[p]=function(){const E=this._baseState;throw new Error(p+" not implemented for encoding: "+E.enc)}}),l.forEach(function(p){f.prototype[p]=function(){const E=this._baseState,h=Array.prototype.slice.call(arguments);return M(E.tag===null),E.tag=p,this._useArgs(h),this}}),f.prototype.use=function(u){M(u);const E=this._baseState;return M(E.use===null),E.use=u,this},f.prototype.optional=function(){const u=this._baseState;return u.optional=!0,this},f.prototype.def=function(u){const E=this._baseState;return M(E.default===null),E.default=u,E.optional=!0,this},f.prototype.explicit=function(u){const E=this._baseState;return M(E.explicit===null&&E.implicit===null),E.explicit=u,this},f.prototype.implicit=function(u){const E=this._baseState;return M(E.explicit===null&&E.implicit===null),E.implicit=u,this},f.prototype.obj=function(){const u=this._baseState,E=Array.prototype.slice.call(arguments);return u.obj=!0,E.length!==0&&this._useArgs(E),this},f.prototype.key=function(u){const E=this._baseState;return M(E.key===null),E.key=u,this},f.prototype.any=function(){const u=this._baseState;return u.any=!0,this},f.prototype.choice=function(u){const E=this._baseState;return M(E.choice===null),E.choice=u,this._useArgs(Object.keys(u).map(function(h){return u[h]})),this},f.prototype.contains=function(u){const E=this._baseState;return M(E.use===null),E.contains=u,this},f.prototype._decode=function(u,E){const h=this._baseState;if(h.parent===null)return u.wrapResult(h.children[0]._decode(u,E));let m=h.default,y=!0,C=null;if(h.key!==null&&(C=u.enterKey(h.key)),h.optional){let T=null;if(h.explicit!==null?T=h.explicit:h.implicit!==null?T=h.implicit:h.tag!==null&&(T=h.tag),T===null&&!h.any){const H=u.save();try{h.choice===null?this._decodeGeneric(h.tag,u,E):this._decodeChoice(u,E),y=!0}catch(W){y=!1}u.restore(H)}else if(y=this._peekTag(u,T,h.any),u.isError(y))return y}let D;if(h.obj&&y&&(D=u.enterObject()),y){if(h.explicit!==null){const H=this._decodeTag(u,h.explicit);if(u.isError(H))return H;u=H}const T=u.offset;if(h.use===null&&h.choice===null){let H;h.any&&(H=u.save());const W=this._decodeTag(u,h.implicit!==null?h.implicit:h.tag,h.any);if(u.isError(W))return W;h.any?m=u.raw(H):u=W}if(E&&E.track&&h.tag!==null&&E.track(u.path(),T,u.length,"tagged"),E&&E.track&&h.tag!==null&&E.track(u.path(),u.offset,u.length,"content"),h.any||(h.choice===null?m=this._decodeGeneric(h.tag,u,E):m=this._decodeChoice(u,E)),u.isError(m))return m;if(!h.any&&h.choice===null&&h.children!==null&&h.children.forEach(function(W){W._decode(u,E)}),h.contains&&(h.tag==="octstr"||h.tag==="bitstr")){const H=new A(m);m=this._getUse(h.contains,u._reporterState.obj)._decode(H,E)}}return h.obj&&y&&(m=u.leaveObject(D)),h.key!==null&&(m!==null||y===!0)?u.leaveKey(C,h.key,m):C!==null&&u.exitKey(C),m},f.prototype._decodeGeneric=function(u,E,h){const m=this._baseState;return u==="seq"||u==="set"?null:u==="seqof"||u==="setof"?this._decodeList(E,u,m.args[0],h):/str$/.test(u)?this._decodeStr(E,u,h):u==="objid"&&m.args?this._decodeObjid(E,m.args[0],m.args[1],h):u==="objid"?this._decodeObjid(E,null,null,h):u==="gentime"||u==="utctime"?this._decodeTime(E,u,h):u==="null_"?this._decodeNull(E,h):u==="bool"?this._decodeBool(E,h):u==="objDesc"?this._decodeStr(E,u,h):u==="int"||u==="enum"?this._decodeInt(E,m.args&&m.args[0],h):m.use!==null?this._getUse(m.use,E._reporterState.obj)._decode(E,h):E.error("unknown tag: "+u)},f.prototype._getUse=function(u,E){const h=this._baseState;return h.useDecoder=this._use(u,E),M(h.useDecoder._baseState.parent===null),h.useDecoder=h.useDecoder._baseState.children[0],h.implicit!==h.useDecoder._baseState.implicit&&(h.useDecoder=h.useDecoder.clone(),h.useDecoder._baseState.implicit=h.implicit),h.useDecoder},f.prototype._decodeChoice=function(u,E){const h=this._baseState;let m=null,y=!1;return Object.keys(h.choice).some(function(C){const D=u.save(),T=h.choice[C];try{const H=T._decode(u,E);if(u.isError(H))return!1;m={type:C,value:H},y=!0}catch(H){return u.restore(D),!1}return!0},this),y?m:u.error("Choice not matched")},f.prototype._createEncoderBuffer=function(u){return new B(u,this.reporter)},f.prototype._encode=function(u,E,h){const m=this._baseState;if(m.default!==null&&m.default===u)return;const y=this._encodeValue(u,E,h);if(y!==void 0&&!this._skipDefault(y,E,h))return y},f.prototype._encodeValue=function(u,E,h){const m=this._baseState;if(m.parent===null)return m.children[0]._encode(u,E||new R);let y=null;if(this.reporter=E,m.optional&&u===void 0)if(m.default!==null)u=m.default;else return;let C=null,D=!1;if(m.any)y=this._createEncoderBuffer(u);else if(m.choice)y=this._encodeChoice(u,E);else if(m.contains)C=this._getUse(m.contains,h)._encode(u,E),D=!0;else if(m.children)C=m.children.map(function(T){if(T._baseState.tag==="null_")return T._encode(null,E,u);if(T._baseState.key===null)return E.error("Child should have a key");const H=E.enterKey(T._baseState.key);if(typeof u!="object")return E.error("Child expected, but input is not object");const W=T._encode(u[T._baseState.key],E,u);return E.leaveKey(H),W},this).filter(function(T){return T}),C=this._createEncoderBuffer(C);else if(m.tag==="seqof"||m.tag==="setof"){if(!(m.args&&m.args.length===1))return E.error("Too many args for : "+m.tag);if(!Array.isArray(u))return E.error("seqof/setof, but data is not Array");const T=this.clone();T._baseState.implicit=null,C=this._createEncoderBuffer(u.map(function(H){const W=this._baseState;return this._getUse(W.args[0],u)._encode(H,E)},T))}else m.use!==null?y=this._getUse(m.use,h)._encode(u,E):(C=this._encodePrimitive(m.tag,u),D=!0);if(!m.any&&m.choice===null){const T=m.implicit!==null?m.implicit:m.tag,H=m.implicit===null?"universal":"context";T===null?m.use===null&&E.error("Tag could be omitted only for .use()"):m.use===null&&(y=this._encodeComposite(T,D,H,C))}return m.explicit!==null&&(y=this._encodeComposite(m.explicit,!1,"context",y)),y},f.prototype._encodeChoice=function(u,E){const h=this._baseState,m=h.choice[u.type];return m||M(!1,u.type+" not found in "+JSON.stringify(Object.keys(h.choice))),m._encode(u.value,E)},f.prototype._encodePrimitive=function(u,E){const h=this._baseState;if(/str$/.test(u))return this._encodeStr(E,u);if(u==="objid"&&h.args)return this._encodeObjid(E,h.reverseArgs[0],h.args[1]);if(u==="objid")return this._encodeObjid(E,null,null);if(u==="gentime"||u==="utctime")return this._encodeTime(E,u);if(u==="null_")return this._encodeNull();if(u==="int"||u==="enum")return this._encodeInt(E,h.args&&h.reverseArgs[0]);if(u==="bool")return this._encodeBool(E);if(u==="objDesc")return this._encodeStr(E,u);throw new Error("Unsupported tag: "+u)},f.prototype._isNumstr=function(u){return/^[0-9 ]*$/.test(u)},f.prototype._isPrintstr=function(u){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(u)}},98465:(g,G,k)=>{"use strict";const R=k(35717);function B(M){this._reporterState={obj:null,path:[],options:M||{},errors:[]}}G.b=B,B.prototype.isError=function(l){return l instanceof A},B.prototype.save=function(){const l=this._reporterState;return{obj:l.obj,pathLen:l.path.length}},B.prototype.restore=function(l){const o=this._reporterState;o.obj=l.obj,o.path=o.path.slice(0,l.pathLen)},B.prototype.enterKey=function(l){return this._reporterState.path.push(l)},B.prototype.exitKey=function(l){const o=this._reporterState;o.path=o.path.slice(0,l-1)},B.prototype.leaveKey=function(l,o,d){const f=this._reporterState;this.exitKey(l),f.obj!==null&&(f.obj[o]=d)},B.prototype.path=function(){return this._reporterState.path.join("/")},B.prototype.enterObject=function(){const l=this._reporterState,o=l.obj;return l.obj={},o},B.prototype.leaveObject=function(l){const o=this._reporterState,d=o.obj;return o.obj=l,d},B.prototype.error=function(l){let o;const d=this._reporterState,f=l instanceof A;if(f?o=l:o=new A(d.path.map(function(_){return"["+JSON.stringify(_)+"]"}).join(""),l.message||l,l.stack),!d.options.partial)throw o;return f||d.errors.push(o),o},B.prototype.wrapResult=function(l){const o=this._reporterState;return o.options.partial?{result:this.isError(l)?null:l,errors:o.errors}:l};function A(M,l){this.path=M,this.rethrow(l)}R(A,Error),A.prototype.rethrow=function(l){if(this.message=l+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,A),!this.stack)try{throw new Error(this.message)}catch(o){this.stack=o.stack}return this}},70160:(g,G)=>{"use strict";function k(R){const B={};return Object.keys(R).forEach(function(A){(A|0)==A&&(A=A|0);const M=R[A];B[M]=A}),B}G.tagClass={0:"universal",1:"application",2:"context",3:"private"},G.tagClassByName=k(G.tagClass),G.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},G.tagByName=k(G.tag)},36826:(g,G,k)=>{"use strict";const R=G;R._reverse=function(A){const M={};return Object.keys(A).forEach(function(l){(l|0)==l&&(l=l|0);const o=A[l];M[o]=l}),M},R.der=k(70160)},41671:(g,G,k)=>{"use strict";const R=k(35717),B=k(13550),A=k(36625).C,M=k(41949),l=k(70160);function o(p){this.enc="der",this.name=p.name,this.entity=p,this.tree=new d,this.tree._init(p.body)}g.exports=o,o.prototype.decode=function(u,E){return A.isDecoderBuffer(u)||(u=new A(u,E)),this.tree._decode(u,E)};function d(p){M.call(this,"der",p)}R(d,M),d.prototype._peekTag=function(u,E,h){if(u.isEmpty())return!1;const m=u.save(),y=f(u,'Failed to peek tag: "'+E+'"');return u.isError(y)?y:(u.restore(m),y.tag===E||y.tagStr===E||y.tagStr+"of"===E||h)},d.prototype._decodeTag=function(u,E,h){const m=f(u,'Failed to decode tag of "'+E+'"');if(u.isError(m))return m;let y=_(u,m.primitive,'Failed to get length of "'+E+'"');if(u.isError(y))return y;if(!h&&m.tag!==E&&m.tagStr!==E&&m.tagStr+"of"!==E)return u.error('Failed to match tag: "'+E+'"');if(m.primitive||y!==null)return u.skip(y,'Failed to match body of: "'+E+'"');const C=u.save(),D=this._skipUntilEnd(u,'Failed to skip indefinite length body: "'+this.tag+'"');return u.isError(D)?D:(y=u.offset-C.offset,u.restore(C),u.skip(y,'Failed to match body of: "'+E+'"'))},d.prototype._skipUntilEnd=function(u,E){for(;;){const h=f(u,E);if(u.isError(h))return h;const m=_(u,h.primitive,E);if(u.isError(m))return m;let y;if(h.primitive||m!==null?y=u.skip(m):y=this._skipUntilEnd(u,E),u.isError(y))return y;if(h.tagStr==="end")break}},d.prototype._decodeList=function(u,E,h,m){const y=[];for(;!u.isEmpty();){const C=this._peekTag(u,"end");if(u.isError(C))return C;const D=h.decode(u,"der",m);if(u.isError(D)&&C)break;y.push(D)}return y},d.prototype._decodeStr=function(u,E){if(E==="bitstr"){const h=u.readUInt8();return u.isError(h)?h:{unused:h,data:u.raw()}}else if(E==="bmpstr"){const h=u.raw();if(h.length%2==1)return u.error("Decoding of string type: bmpstr length mismatch");let m="";for(let y=0;y<h.length/2;y++)m+=String.fromCharCode(h.readUInt16BE(y*2));return m}else if(E==="numstr"){const h=u.raw().toString("ascii");return this._isNumstr(h)?h:u.error("Decoding of string type: numstr unsupported characters")}else{if(E==="octstr")return u.raw();if(E==="objDesc")return u.raw();if(E==="printstr"){const h=u.raw().toString("ascii");return this._isPrintstr(h)?h:u.error("Decoding of string type: printstr unsupported characters")}else return/str$/.test(E)?u.raw().toString():u.error("Decoding of string type: "+E+" unsupported")}},d.prototype._decodeObjid=function(u,E,h){let m;const y=[];let C=0,D=0;for(;!u.isEmpty();)D=u.readUInt8(),C<<=7,C|=D&127,(D&128)==0&&(y.push(C),C=0);D&128&&y.push(C);const T=y[0]/40|0,H=y[0]%40;if(h?m=y:m=[T,H].concat(y.slice(1)),E){let W=E[m.join(" ")];W===void 0&&(W=E[m.join(".")]),W!==void 0&&(m=W)}return m},d.prototype._decodeTime=function(u,E){const h=u.raw().toString();let m,y,C,D,T,H;if(E==="gentime")m=h.slice(0,4)|0,y=h.slice(4,6)|0,C=h.slice(6,8)|0,D=h.slice(8,10)|0,T=h.slice(10,12)|0,H=h.slice(12,14)|0;else if(E==="utctime")m=h.slice(0,2)|0,y=h.slice(2,4)|0,C=h.slice(4,6)|0,D=h.slice(6,8)|0,T=h.slice(8,10)|0,H=h.slice(10,12)|0,m<70?m=2e3+m:m=1900+m;else return u.error("Decoding "+E+" time is not supported yet");return Date.UTC(m,y-1,C,D,T,H,0)},d.prototype._decodeNull=function(){return null},d.prototype._decodeBool=function(u){const E=u.readUInt8();return u.isError(E)?E:E!==0},d.prototype._decodeInt=function(u,E){const h=u.raw();let m=new B(h);return E&&(m=E[m.toString(10)]||m),m},d.prototype._use=function(u,E){return typeof u=="function"&&(u=u(E)),u._getDecoder("der").tree};function f(p,u){let E=p.readUInt8(u);if(p.isError(E))return E;const h=l.tagClass[E>>6],m=(E&32)==0;if((E&31)==31){let C=E;for(E=0;(C&128)==128;){if(C=p.readUInt8(u),p.isError(C))return C;E<<=7,E|=C&127}}else E&=31;const y=l.tag[E];return{cls:h,primitive:m,tag:E,tagStr:y}}function _(p,u,E){let h=p.readUInt8(E);if(p.isError(h))return h;if(!u&&h===128)return null;if((h&128)==0)return h;const m=h&127;if(m>4)return p.error("length octect is too long");h=0;for(let y=0;y<m;y++){h<<=8;const C=p.readUInt8(E);if(p.isError(C))return C;h|=C}return h}},78307:(g,G,k)=>{"use strict";const R=G;R.der=k(41671),R.pem=k(59631)},59631:(g,G,k)=>{"use strict";const R=k(35717),B=k(2399).Buffer,A=k(41671);function M(l){A.call(this,l),this.enc="pem"}R(M,A),g.exports=M,M.prototype.decode=function(o,d){const f=o.toString().split(/[\r\n]+/g),_=d.label.toUpperCase(),p=/^-----(BEGIN|END) ([^-]+)-----$/;let u=-1,E=-1;for(let y=0;y<f.length;y++){const C=f[y].match(p);if(C!==null&&C[2]===_)if(u===-1){if(C[1]!=="BEGIN")break;u=y}else{if(C[1]!=="END")break;E=y;break}}if(u===-1||E===-1)throw new Error("PEM section not found for: "+_);const h=f.slice(u+1,E).join("");h.replace(/[^a-z0-9+/=]+/gi,"");const m=B.from(h,"base64");return A.prototype.decode.call(this,m,d)}},66984:(g,G,k)=>{"use strict";const R=k(35717),B=k(2399).Buffer,A=k(41949),M=k(70160);function l(_){this.enc="der",this.name=_.name,this.entity=_,this.tree=new o,this.tree._init(_.body)}g.exports=l,l.prototype.encode=function(p,u){return this.tree._encode(p,u).join()};function o(_){A.call(this,"der",_)}R(o,A),o.prototype._encodeComposite=function(p,u,E,h){const m=f(p,u,E,this.reporter);if(h.length<128){const D=B.alloc(2);return D[0]=m,D[1]=h.length,this._createEncoderBuffer([D,h])}let y=1;for(let D=h.length;D>=256;D>>=8)y++;const C=B.alloc(1+1+y);C[0]=m,C[1]=128|y;for(let D=1+y,T=h.length;T>0;D--,T>>=8)C[D]=T&255;return this._createEncoderBuffer([C,h])},o.prototype._encodeStr=function(p,u){if(u==="bitstr")return this._createEncoderBuffer([p.unused|0,p.data]);if(u==="bmpstr"){const E=B.alloc(p.length*2);for(let h=0;h<p.length;h++)E.writeUInt16BE(p.charCodeAt(h),h*2);return this._createEncoderBuffer(E)}else return u==="numstr"?this._isNumstr(p)?this._createEncoderBuffer(p):this.reporter.error("Encoding of string type: numstr supports only digits and space"):u==="printstr"?this._isPrintstr(p)?this._createEncoderBuffer(p):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(u)?this._createEncoderBuffer(p):u==="objDesc"?this._createEncoderBuffer(p):this.reporter.error("Encoding of string type: "+u+" unsupported")},o.prototype._encodeObjid=function(p,u,E){if(typeof p=="string"){if(!u)return this.reporter.error("string objid given, but no values map found");if(!u.hasOwnProperty(p))return this.reporter.error("objid not found in values map");p=u[p].split(/[\s.]+/g);for(let C=0;C<p.length;C++)p[C]|=0}else if(Array.isArray(p)){p=p.slice();for(let C=0;C<p.length;C++)p[C]|=0}if(!Array.isArray(p))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(p));if(!E){if(p[1]>=40)return this.reporter.error("Second objid identifier OOB");p.splice(0,2,p[0]*40+p[1])}let h=0;for(let C=0;C<p.length;C++){let D=p[C];for(h++;D>=128;D>>=7)h++}const m=B.alloc(h);let y=m.length-1;for(let C=p.length-1;C>=0;C--){let D=p[C];for(m[y--]=D&127;(D>>=7)>0;)m[y--]=128|D&127}return this._createEncoderBuffer(m)};function d(_){return _<10?"0"+_:_}o.prototype._encodeTime=function(p,u){let E;const h=new Date(p);return u==="gentime"?E=[d(h.getUTCFullYear()),d(h.getUTCMonth()+1),d(h.getUTCDate()),d(h.getUTCHours()),d(h.getUTCMinutes()),d(h.getUTCSeconds()),"Z"].join(""):u==="utctime"?E=[d(h.getUTCFullYear()%100),d(h.getUTCMonth()+1),d(h.getUTCDate()),d(h.getUTCHours()),d(h.getUTCMinutes()),d(h.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+u+" time is not supported yet"),this._encodeStr(E,"octstr")},o.prototype._encodeNull=function(){return this._createEncoderBuffer("")},o.prototype._encodeInt=function(p,u){if(typeof p=="string"){if(!u)return this.reporter.error("String int or enum given, but no values map");if(!u.hasOwnProperty(p))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(p));p=u[p]}if(typeof p!="number"&&!B.isBuffer(p)){const m=p.toArray();!p.sign&&m[0]&128&&m.unshift(0),p=B.from(m)}if(B.isBuffer(p)){let m=p.length;p.length===0&&m++;const y=B.alloc(m);return p.copy(y),p.length===0&&(y[0]=0),this._createEncoderBuffer(y)}if(p<128)return this._createEncoderBuffer(p);if(p<256)return this._createEncoderBuffer([0,p]);let E=1;for(let m=p;m>=256;m>>=8)E++;const h=new Array(E);for(let m=h.length-1;m>=0;m--)h[m]=p&255,p>>=8;return h[0]&128&&h.unshift(0),this._createEncoderBuffer(B.from(h))},o.prototype._encodeBool=function(p){return this._createEncoderBuffer(p?255:0)},o.prototype._use=function(p,u){return typeof p=="function"&&(p=p(u)),p._getEncoder("der").tree},o.prototype._skipDefault=function(p,u,E){const h=this._baseState;let m;if(h.default===null)return!1;const y=p.join();if(h.defaultBuffer===void 0&&(h.defaultBuffer=this._encodeValue(h.default,u,E).join()),y.length!==h.defaultBuffer.length)return!1;for(m=0;m<y.length;m++)if(y[m]!==h.defaultBuffer[m])return!1;return!0};function f(_,p,u,E){let h;if(_==="seqof"?_="seq":_==="setof"&&(_="set"),M.tagByName.hasOwnProperty(_))h=M.tagByName[_];else if(typeof _=="number"&&(_|0)===_)h=_;else return E.error("Unknown tag: "+_);return h>=31?E.error("Multi-octet tag encoding unsupported"):(p||(h|=32),h|=M.tagClassByName[u||"universal"]<<6,h)}},56579:(g,G,k)=>{"use strict";const R=G;R.der=k(66984),R.pem=k(2883)},2883:(g,G,k)=>{"use strict";const R=k(35717),B=k(66984);function A(M){B.call(this,M),this.enc="pem"}R(A,B),g.exports=A,A.prototype.encode=function(l,o){const f=B.prototype.encode.call(this,l).toString("base64"),_=["-----BEGIN "+o.label+"-----"];for(let p=0;p<f.length;p+=64)_.push(f.slice(p,p+64));return _.push("-----END "+o.label+"-----"),_.join(`
`)}},9669:(g,G,k)=>{g.exports=k(51609)},55448:(g,G,k)=>{"use strict";var R=k(64867),B=k(36026),A=k(4372),M=k(15327),l=k(94097),o=k(84109),d=k(67985),f=k(85061);g.exports=function(p){return new Promise(function(E,h){var m=p.data,y=p.headers,C=p.responseType;R.isFormData(m)&&delete y["Content-Type"];var D=new XMLHttpRequest;if(p.auth){var T=p.auth.username||"",H=p.auth.password?unescape(encodeURIComponent(p.auth.password)):"";y.Authorization="Basic "+btoa(T+":"+H)}var W=l(p.baseURL,p.url);D.open(p.method.toUpperCase(),M(W,p.params,p.paramsSerializer),!0),D.timeout=p.timeout;function Y(){if(!!D){var ie="getAllResponseHeaders"in D?o(D.getAllResponseHeaders()):null,oe=!C||C==="text"||C==="json"?D.responseText:D.response,ae={data:oe,status:D.status,statusText:D.statusText,headers:ie,config:p,request:D};B(E,h,ae),D=null}}if("onloadend"in D?D.onloadend=Y:D.onreadystatechange=function(){!D||D.readyState!==4||D.status===0&&!(D.responseURL&&D.responseURL.indexOf("file:")===0)||setTimeout(Y)},D.onabort=function(){!D||(h(f("Request aborted",p,"ECONNABORTED",D)),D=null)},D.onerror=function(){h(f("Network Error",p,null,D)),D=null},D.ontimeout=function(){var oe="timeout of "+p.timeout+"ms exceeded";p.timeoutErrorMessage&&(oe=p.timeoutErrorMessage),h(f(oe,p,p.transitional&&p.transitional.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",D)),D=null},R.isStandardBrowserEnv()){var re=(p.withCredentials||d(W))&&p.xsrfCookieName?A.read(p.xsrfCookieName):void 0;re&&(y[p.xsrfHeaderName]=re)}"setRequestHeader"in D&&R.forEach(y,function(oe,ae){typeof m=="undefined"&&ae.toLowerCase()==="content-type"?delete y[ae]:D.setRequestHeader(ae,oe)}),R.isUndefined(p.withCredentials)||(D.withCredentials=!!p.withCredentials),C&&C!=="json"&&(D.responseType=p.responseType),typeof p.onDownloadProgress=="function"&&D.addEventListener("progress",p.onDownloadProgress),typeof p.onUploadProgress=="function"&&D.upload&&D.upload.addEventListener("progress",p.onUploadProgress),p.cancelToken&&p.cancelToken.promise.then(function(oe){!D||(D.abort(),h(oe),D=null)}),m||(m=null),D.send(m)})}},51609:(g,G,k)=>{"use strict";var R=k(64867),B=k(91849),A=k(30321),M=k(47185),l=k(45655);function o(f){var _=new A(f),p=B(A.prototype.request,_);return R.extend(p,A.prototype,_),R.extend(p,_),p}var d=o(l);d.Axios=A,d.create=function(_){return o(M(d.defaults,_))},d.Cancel=k(65263),d.CancelToken=k(14972),d.isCancel=k(26502),d.all=function(_){return Promise.all(_)},d.spread=k(8713),d.isAxiosError=k(16268),g.exports=d,g.exports.default=d},65263:g=>{"use strict";function G(k){this.message=k}G.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},G.prototype.__CANCEL__=!0,g.exports=G},14972:(g,G,k)=>{"use strict";var R=k(65263);function B(A){if(typeof A!="function")throw new TypeError("executor must be a function.");var M;this.promise=new Promise(function(d){M=d});var l=this;A(function(d){l.reason||(l.reason=new R(d),M(l.reason))})}B.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},B.source=function(){var M,l=new B(function(d){M=d});return{token:l,cancel:M}},g.exports=B},26502:g=>{"use strict";g.exports=function(k){return!!(k&&k.__CANCEL__)}},30321:(g,G,k)=>{"use strict";var R=k(64867),B=k(15327),A=k(80782),M=k(13572),l=k(47185),o=k(54875),d=o.validators;function f(_){this.defaults=_,this.interceptors={request:new A,response:new A}}f.prototype.request=function(p){typeof p=="string"?(p=arguments[1]||{},p.url=arguments[0]):p=p||{},p=l(this.defaults,p),p.method?p.method=p.method.toLowerCase():this.defaults.method?p.method=this.defaults.method.toLowerCase():p.method="get";var u=p.transitional;u!==void 0&&o.assertOptions(u,{silentJSONParsing:d.transitional(d.boolean,"1.0.0"),forcedJSONParsing:d.transitional(d.boolean,"1.0.0"),clarifyTimeoutError:d.transitional(d.boolean,"1.0.0")},!1);var E=[],h=!0;this.interceptors.request.forEach(function(Y){typeof Y.runWhen=="function"&&Y.runWhen(p)===!1||(h=h&&Y.synchronous,E.unshift(Y.fulfilled,Y.rejected))});var m=[];this.interceptors.response.forEach(function(Y){m.push(Y.fulfilled,Y.rejected)});var y;if(!h){var C=[M,void 0];for(Array.prototype.unshift.apply(C,E),C=C.concat(m),y=Promise.resolve(p);C.length;)y=y.then(C.shift(),C.shift());return y}for(var D=p;E.length;){var T=E.shift(),H=E.shift();try{D=T(D)}catch(W){H(W);break}}try{y=M(D)}catch(W){return Promise.reject(W)}for(;m.length;)y=y.then(m.shift(),m.shift());return y},f.prototype.getUri=function(p){return p=l(this.defaults,p),B(p.url,p.params,p.paramsSerializer).replace(/^\?/,"")},R.forEach(["delete","get","head","options"],function(p){f.prototype[p]=function(u,E){return this.request(l(E||{},{method:p,url:u,data:(E||{}).data}))}}),R.forEach(["post","put","patch"],function(p){f.prototype[p]=function(u,E,h){return this.request(l(h||{},{method:p,url:u,data:E}))}}),g.exports=f},80782:(g,G,k)=>{"use strict";var R=k(64867);function B(){this.handlers=[]}B.prototype.use=function(M,l,o){return this.handlers.push({fulfilled:M,rejected:l,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1},B.prototype.eject=function(M){this.handlers[M]&&(this.handlers[M]=null)},B.prototype.forEach=function(M){R.forEach(this.handlers,function(o){o!==null&&M(o)})},g.exports=B},94097:(g,G,k)=>{"use strict";var R=k(91793),B=k(7303);g.exports=function(M,l){return M&&!R(l)?B(M,l):l}},85061:(g,G,k)=>{"use strict";var R=k(80481);g.exports=function(A,M,l,o,d){var f=new Error(A);return R(f,M,l,o,d)}},13572:(g,G,k)=>{"use strict";var R=k(64867),B=k(18527),A=k(26502),M=k(45655);function l(o){o.cancelToken&&o.cancelToken.throwIfRequested()}g.exports=function(d){l(d),d.headers=d.headers||{},d.data=B.call(d,d.data,d.headers,d.transformRequest),d.headers=R.merge(d.headers.common||{},d.headers[d.method]||{},d.headers),R.forEach(["delete","get","head","post","put","patch","common"],function(p){delete d.headers[p]});var f=d.adapter||M.adapter;return f(d).then(function(p){return l(d),p.data=B.call(d,p.data,p.headers,d.transformResponse),p},function(p){return A(p)||(l(d),p&&p.response&&(p.response.data=B.call(d,p.response.data,p.response.headers,d.transformResponse))),Promise.reject(p)})}},80481:g=>{"use strict";g.exports=function(k,R,B,A,M){return k.config=R,B&&(k.code=B),k.request=A,k.response=M,k.isAxiosError=!0,k.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},k}},47185:(g,G,k)=>{"use strict";var R=k(64867);g.exports=function(A,M){M=M||{};var l={},o=["url","method","data"],d=["headers","auth","proxy","params"],f=["baseURL","transformRequest","transformResponse","paramsSerializer","timeout","timeoutMessage","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","decompress","maxContentLength","maxBodyLength","maxRedirects","transport","httpAgent","httpsAgent","cancelToken","socketPath","responseEncoding"],_=["validateStatus"];function p(m,y){return R.isPlainObject(m)&&R.isPlainObject(y)?R.merge(m,y):R.isPlainObject(y)?R.merge({},y):R.isArray(y)?y.slice():y}function u(m){R.isUndefined(M[m])?R.isUndefined(A[m])||(l[m]=p(void 0,A[m])):l[m]=p(A[m],M[m])}R.forEach(o,function(y){R.isUndefined(M[y])||(l[y]=p(void 0,M[y]))}),R.forEach(d,u),R.forEach(f,function(y){R.isUndefined(M[y])?R.isUndefined(A[y])||(l[y]=p(void 0,A[y])):l[y]=p(void 0,M[y])}),R.forEach(_,function(y){y in M?l[y]=p(A[y],M[y]):y in A&&(l[y]=p(void 0,A[y]))});var E=o.concat(d).concat(f).concat(_),h=Object.keys(A).concat(Object.keys(M)).filter(function(y){return E.indexOf(y)===-1});return R.forEach(h,u),l}},36026:(g,G,k)=>{"use strict";var R=k(85061);g.exports=function(A,M,l){var o=l.config.validateStatus;!l.status||!o||o(l.status)?A(l):M(R("Request failed with status code "+l.status,l.config,null,l.request,l))}},18527:(g,G,k)=>{"use strict";var R=k(64867),B=k(45655);g.exports=function(M,l,o){var d=this||B;return R.forEach(o,function(_){M=_.call(d,M,l)}),M}},45655:(g,G,k)=>{"use strict";var R=k(34155),B=k(64867),A=k(16016),M=k(80481),l={"Content-Type":"application/x-www-form-urlencoded"};function o(p,u){!B.isUndefined(p)&&B.isUndefined(p["Content-Type"])&&(p["Content-Type"]=u)}function d(){var p;return(typeof XMLHttpRequest!="undefined"||typeof R!="undefined"&&Object.prototype.toString.call(R)==="[object process]")&&(p=k(55448)),p}function f(p,u,E){if(B.isString(p))try{return(u||JSON.parse)(p),B.trim(p)}catch(h){if(h.name!=="SyntaxError")throw h}return(E||JSON.stringify)(p)}var _={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:d(),transformRequest:[function(u,E){return A(E,"Accept"),A(E,"Content-Type"),B.isFormData(u)||B.isArrayBuffer(u)||B.isBuffer(u)||B.isStream(u)||B.isFile(u)||B.isBlob(u)?u:B.isArrayBufferView(u)?u.buffer:B.isURLSearchParams(u)?(o(E,"application/x-www-form-urlencoded;charset=utf-8"),u.toString()):B.isObject(u)||E&&E["Content-Type"]==="application/json"?(o(E,"application/json"),f(u)):u}],transformResponse:[function(u){var E=this.transitional,h=E&&E.silentJSONParsing,m=E&&E.forcedJSONParsing,y=!h&&this.responseType==="json";if(y||m&&B.isString(u)&&u.length)try{return JSON.parse(u)}catch(C){if(y)throw C.name==="SyntaxError"?M(C,this,"E_JSON_PARSE"):C}return u}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(u){return u>=200&&u<300}};_.headers={common:{Accept:"application/json, text/plain, */*"}},B.forEach(["delete","get","head"],function(u){_.headers[u]={}}),B.forEach(["post","put","patch"],function(u){_.headers[u]=B.merge(l)}),g.exports=_},91849:g=>{"use strict";g.exports=function(k,R){return function(){for(var A=new Array(arguments.length),M=0;M<A.length;M++)A[M]=arguments[M];return k.apply(R,A)}}},15327:(g,G,k)=>{"use strict";var R=k(64867);function B(A){return encodeURIComponent(A).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}g.exports=function(M,l,o){if(!l)return M;var d;if(o)d=o(l);else if(R.isURLSearchParams(l))d=l.toString();else{var f=[];R.forEach(l,function(u,E){u===null||typeof u=="undefined"||(R.isArray(u)?E=E+"[]":u=[u],R.forEach(u,function(m){R.isDate(m)?m=m.toISOString():R.isObject(m)&&(m=JSON.stringify(m)),f.push(B(E)+"="+B(m))}))}),d=f.join("&")}if(d){var _=M.indexOf("#");_!==-1&&(M=M.slice(0,_)),M+=(M.indexOf("?")===-1?"?":"&")+d}return M}},7303:g=>{"use strict";g.exports=function(k,R){return R?k.replace(/\/+$/,"")+"/"+R.replace(/^\/+/,""):k}},4372:(g,G,k)=>{"use strict";var R=k(64867);g.exports=R.isStandardBrowserEnv()?function(){return{write:function(M,l,o,d,f,_){var p=[];p.push(M+"="+encodeURIComponent(l)),R.isNumber(o)&&p.push("expires="+new Date(o).toGMTString()),R.isString(d)&&p.push("path="+d),R.isString(f)&&p.push("domain="+f),_===!0&&p.push("secure"),document.cookie=p.join("; ")},read:function(M){var l=document.cookie.match(new RegExp("(^|;\\s*)("+M+")=([^;]*)"));return l?decodeURIComponent(l[3]):null},remove:function(M){this.write(M,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},91793:g=>{"use strict";g.exports=function(k){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(k)}},16268:g=>{"use strict";g.exports=function(k){return typeof k=="object"&&k.isAxiosError===!0}},67985:(g,G,k)=>{"use strict";var R=k(64867);g.exports=R.isStandardBrowserEnv()?function(){var A=/(msie|trident)/i.test(navigator.userAgent),M=document.createElement("a"),l;function o(d){var f=d;return A&&(M.setAttribute("href",f),f=M.href),M.setAttribute("href",f),{href:M.href,protocol:M.protocol?M.protocol.replace(/:$/,""):"",host:M.host,search:M.search?M.search.replace(/^\?/,""):"",hash:M.hash?M.hash.replace(/^#/,""):"",hostname:M.hostname,port:M.port,pathname:M.pathname.charAt(0)==="/"?M.pathname:"/"+M.pathname}}return l=o(window.location.href),function(f){var _=R.isString(f)?o(f):f;return _.protocol===l.protocol&&_.host===l.host}}():function(){return function(){return!0}}()},16016:(g,G,k)=>{"use strict";var R=k(64867);g.exports=function(A,M){R.forEach(A,function(o,d){d!==M&&d.toUpperCase()===M.toUpperCase()&&(A[M]=o,delete A[d])})}},84109:(g,G,k)=>{"use strict";var R=k(64867),B=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];g.exports=function(M){var l={},o,d,f;return M&&R.forEach(M.split(`
`),function(p){if(f=p.indexOf(":"),o=R.trim(p.substr(0,f)).toLowerCase(),d=R.trim(p.substr(f+1)),o){if(l[o]&&B.indexOf(o)>=0)return;o==="set-cookie"?l[o]=(l[o]?l[o]:[]).concat([d]):l[o]=l[o]?l[o]+", "+d:d}}),l}},8713:g=>{"use strict";g.exports=function(k){return function(B){return k.apply(null,B)}}},54875:(g,G,k)=>{"use strict";var R=k(88593),B={};["object","boolean","number","function","string","symbol"].forEach(function(d,f){B[d]=function(p){return typeof p===d||"a"+(f<1?"n ":" ")+d}});var A={},M=R.version.split(".");function l(d,f){for(var _=f?f.split("."):M,p=d.split("."),u=0;u<3;u++){if(_[u]>p[u])return!0;if(_[u]<p[u])return!1}return!1}B.transitional=function(f,_,p){var u=_&&l(_);function E(h,m){return"[Axios v"+R.version+"] Transitional option '"+h+"'"+m+(p?". "+p:"")}return function(h,m,y){if(f===!1)throw new Error(E(m," has been removed in "+_));return u&&!A[m]&&(A[m]=!0,console.warn(E(m," has been deprecated since v"+_+" and will be removed in the near future"))),f?f(h,m,y):!0}};function o(d,f,_){if(typeof d!="object")throw new TypeError("options must be an object");for(var p=Object.keys(d),u=p.length;u-- >0;){var E=p[u],h=f[E];if(h){var m=d[E],y=m===void 0||h(m,E,d);if(y!==!0)throw new TypeError("option "+E+" must be "+y);continue}if(_!==!0)throw Error("Unknown option "+E)}}g.exports={isOlderVersion:l,assertOptions:o,validators:B}},64867:(g,G,k)=>{"use strict";var R=k(91849),B=Object.prototype.toString;function A(ae){return B.call(ae)==="[object Array]"}function M(ae){return typeof ae=="undefined"}function l(ae){return ae!==null&&!M(ae)&&ae.constructor!==null&&!M(ae.constructor)&&typeof ae.constructor.isBuffer=="function"&&ae.constructor.isBuffer(ae)}function o(ae){return B.call(ae)==="[object ArrayBuffer]"}function d(ae){return typeof FormData!="undefined"&&ae instanceof FormData}function f(ae){var de;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?de=ArrayBuffer.isView(ae):de=ae&&ae.buffer&&ae.buffer instanceof ArrayBuffer,de}function _(ae){return typeof ae=="string"}function p(ae){return typeof ae=="number"}function u(ae){return ae!==null&&typeof ae=="object"}function E(ae){if(B.call(ae)!=="[object Object]")return!1;var de=Object.getPrototypeOf(ae);return de===null||de===Object.prototype}function h(ae){return B.call(ae)==="[object Date]"}function m(ae){return B.call(ae)==="[object File]"}function y(ae){return B.call(ae)==="[object Blob]"}function C(ae){return B.call(ae)==="[object Function]"}function D(ae){return u(ae)&&C(ae.pipe)}function T(ae){return typeof URLSearchParams!="undefined"&&ae instanceof URLSearchParams}function H(ae){return ae.trim?ae.trim():ae.replace(/^\s+|\s+$/g,"")}function W(){return typeof navigator!="undefined"&&(navigator.product==="ReactNative"||navigator.product==="NativeScript"||navigator.product==="NS")?!1:typeof window!="undefined"&&typeof document!="undefined"}function Y(ae,de){if(!(ae===null||typeof ae=="undefined"))if(typeof ae!="object"&&(ae=[ae]),A(ae))for(var te=0,O=ae.length;te<O;te++)de.call(null,ae[te],te,ae);else for(var q in ae)Object.prototype.hasOwnProperty.call(ae,q)&&de.call(null,ae[q],q,ae)}function re(){var ae={};function de(q,x){E(ae[x])&&E(q)?ae[x]=re(ae[x],q):E(q)?ae[x]=re({},q):A(q)?ae[x]=q.slice():ae[x]=q}for(var te=0,O=arguments.length;te<O;te++)Y(arguments[te],de);return ae}function ie(ae,de,te){return Y(de,function(q,x){te&&typeof q=="function"?ae[x]=R(q,te):ae[x]=q}),ae}function oe(ae){return ae.charCodeAt(0)===65279&&(ae=ae.slice(1)),ae}g.exports={isArray:A,isArrayBuffer:o,isBuffer:l,isFormData:d,isArrayBufferView:f,isString:_,isNumber:p,isObject:u,isPlainObject:E,isUndefined:M,isDate:h,isFile:m,isBlob:y,isFunction:C,isStream:D,isURLSearchParams:T,isStandardBrowserEnv:W,forEach:Y,merge:re,extend:ie,trim:H,stripBOM:oe}},79742:(g,G)=>{"use strict";G.byteLength=d,G.toByteArray=_,G.fromByteArray=E;for(var k=[],R=[],B=typeof Uint8Array!="undefined"?Uint8Array:Array,A="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",M=0,l=A.length;M<l;++M)k[M]=A[M],R[A.charCodeAt(M)]=M;R["-".charCodeAt(0)]=62,R["_".charCodeAt(0)]=63;function o(h){var m=h.length;if(m%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var y=h.indexOf("=");y===-1&&(y=m);var C=y===m?0:4-y%4;return[y,C]}function d(h){var m=o(h),y=m[0],C=m[1];return(y+C)*3/4-C}function f(h,m,y){return(m+y)*3/4-y}function _(h){var m,y=o(h),C=y[0],D=y[1],T=new B(f(h,C,D)),H=0,W=D>0?C-4:C,Y;for(Y=0;Y<W;Y+=4)m=R[h.charCodeAt(Y)]<<18|R[h.charCodeAt(Y+1)]<<12|R[h.charCodeAt(Y+2)]<<6|R[h.charCodeAt(Y+3)],T[H++]=m>>16&255,T[H++]=m>>8&255,T[H++]=m&255;return D===2&&(m=R[h.charCodeAt(Y)]<<2|R[h.charCodeAt(Y+1)]>>4,T[H++]=m&255),D===1&&(m=R[h.charCodeAt(Y)]<<10|R[h.charCodeAt(Y+1)]<<4|R[h.charCodeAt(Y+2)]>>2,T[H++]=m>>8&255,T[H++]=m&255),T}function p(h){return k[h>>18&63]+k[h>>12&63]+k[h>>6&63]+k[h&63]}function u(h,m,y){for(var C,D=[],T=m;T<y;T+=3)C=(h[T]<<16&16711680)+(h[T+1]<<8&65280)+(h[T+2]&255),D.push(p(C));return D.join("")}function E(h){for(var m,y=h.length,C=y%3,D=[],T=16383,H=0,W=y-C;H<W;H+=T)D.push(u(h,H,H+T>W?W:H+T));return C===1?(m=h[y-1],D.push(k[m>>2]+k[m<<4&63]+"==")):C===2&&(m=(h[y-2]<<8)+h[y-1],D.push(k[m>>10]+k[m>>4&63]+k[m<<2&63]+"=")),D.join("")}},85186:(g,G,k)=>{var R=k(23698),B=k(92505),A=k(26417),M=Function.bind,l=M.bind(M);function o(u,E,h){var m=l(A,null).apply(null,h?[E,h]:[E]);u.api={remove:m},u.remove=m,["before","error","after","wrap"].forEach(function(y){var C=h?[E,y,h]:[E,y];u[y]=u.api[y]=l(B,null).apply(null,C)})}function d(){var u="h",E={registry:{}},h=R.bind(null,E,u);return o(h,E,u),h}function f(){var u={registry:{}},E=R.bind(null,u);return o(E,u),E}var _=!1;function p(){return _||(console.warn('[before-after-hook]: "Hook()" repurposing warning, use "Hook.Collection()". Read more: https://git.io/upgrade-before-after-hook-to-1.4'),_=!0),f()}p.Singular=d.bind(),p.Collection=f.bind(),g.exports=p,g.exports.Hook=p,g.exports.Singular=p.Singular,g.exports.Collection=p.Collection},92505:g=>{g.exports=G;function G(k,R,B,A){var M=A;k.registry[B]||(k.registry[B]=[]),R==="before"&&(A=function(l,o){return Promise.resolve().then(M.bind(null,o)).then(l.bind(null,o))}),R==="after"&&(A=function(l,o){var d;return Promise.resolve().then(l.bind(null,o)).then(function(f){return d=f,M(d,o)}).then(function(){return d})}),R==="error"&&(A=function(l,o){return Promise.resolve().then(l.bind(null,o)).catch(function(d){return M(d,o)})}),k.registry[B].push({hook:A,orig:M})}},23698:g=>{g.exports=G;function G(k,R,B,A){if(typeof B!="function")throw new Error("method for before hook must be a function");return A||(A={}),Array.isArray(R)?R.reverse().reduce(function(M,l){return G.bind(null,k,l,M,A)},B)():Promise.resolve().then(function(){return k.registry[R]?k.registry[R].reduce(function(M,l){return l.hook.bind(null,M,A)},B)():B(A)})}},26417:g=>{g.exports=G;function G(k,R,B){if(!!k.registry[R]){var A=k.registry[R].map(function(M){return M.orig}).indexOf(B);A!==-1&&k.registry[R].splice(A,1)}}},13550:function(g,G,k){g=k.nmd(g),function(R,B){"use strict";function A(te,O){if(!te)throw new Error(O||"Assertion failed")}function M(te,O){te.super_=O;var q=function(){};q.prototype=O.prototype,te.prototype=new q,te.prototype.constructor=te}function l(te,O,q){if(l.isBN(te))return te;this.negative=0,this.words=null,this.length=0,this.red=null,te!==null&&((O==="le"||O==="be")&&(q=O,O=10),this._init(te||0,O||10,q||"be"))}typeof R=="object"?R.exports=l:B.BN=l,l.BN=l,l.wordSize=26;var o;try{typeof window!="undefined"&&typeof window.Buffer!="undefined"?o=window.Buffer:o=k(46601).Buffer}catch(te){}l.isBN=function(O){return O instanceof l?!0:O!==null&&typeof O=="object"&&O.constructor.wordSize===l.wordSize&&Array.isArray(O.words)},l.max=function(O,q){return O.cmp(q)>0?O:q},l.min=function(O,q){return O.cmp(q)<0?O:q},l.prototype._init=function(O,q,x){if(typeof O=="number")return this._initNumber(O,q,x);if(typeof O=="object")return this._initArray(O,q,x);q==="hex"&&(q=16),A(q===(q|0)&&q>=2&&q<=36),O=O.toString().replace(/\s+/g,"");var a=0;O[0]==="-"&&(a++,this.negative=1),a<O.length&&(q===16?this._parseHex(O,a,x):(this._parseBase(O,q,a),x==="le"&&this._initArray(this.toArray(),q,x)))},l.prototype._initNumber=function(O,q,x){O<0&&(this.negative=1,O=-O),O<67108864?(this.words=[O&67108863],this.length=1):O<4503599627370496?(this.words=[O&67108863,O/67108864&67108863],this.length=2):(A(O<9007199254740992),this.words=[O&67108863,O/67108864&67108863,1],this.length=3),x==="le"&&this._initArray(this.toArray(),q,x)},l.prototype._initArray=function(O,q,x){if(A(typeof O.length=="number"),O.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(O.length/3),this.words=new Array(this.length);for(var a=0;a<this.length;a++)this.words[a]=0;var b,P,F=0;if(x==="be")for(a=O.length-1,b=0;a>=0;a-=3)P=O[a]|O[a-1]<<8|O[a-2]<<16,this.words[b]|=P<<F&67108863,this.words[b+1]=P>>>26-F&67108863,F+=24,F>=26&&(F-=26,b++);else if(x==="le")for(a=0,b=0;a<O.length;a+=3)P=O[a]|O[a+1]<<8|O[a+2]<<16,this.words[b]|=P<<F&67108863,this.words[b+1]=P>>>26-F&67108863,F+=24,F>=26&&(F-=26,b++);return this.strip()};function d(te,O){var q=te.charCodeAt(O);return q>=65&&q<=70?q-55:q>=97&&q<=102?q-87:q-48&15}function f(te,O,q){var x=d(te,q);return q-1>=O&&(x|=d(te,q-1)<<4),x}l.prototype._parseHex=function(O,q,x){this.length=Math.ceil((O.length-q)/6),this.words=new Array(this.length);for(var a=0;a<this.length;a++)this.words[a]=0;var b=0,P=0,F;if(x==="be")for(a=O.length-1;a>=q;a-=2)F=f(O,q,a)<<b,this.words[P]|=F&67108863,b>=18?(b-=18,P+=1,this.words[P]|=F>>>26):b+=8;else{var L=O.length-q;for(a=L%2==0?q+1:q;a<O.length;a+=2)F=f(O,q,a)<<b,this.words[P]|=F&67108863,b>=18?(b-=18,P+=1,this.words[P]|=F>>>26):b+=8}this.strip()};function _(te,O,q,x){for(var a=0,b=Math.min(te.length,q),P=O;P<b;P++){var F=te.charCodeAt(P)-48;a*=x,F>=49?a+=F-49+10:F>=17?a+=F-17+10:a+=F}return a}l.prototype._parseBase=function(O,q,x){this.words=[0],this.length=1;for(var a=0,b=1;b<=67108863;b*=q)a++;a--,b=b/q|0;for(var P=O.length-x,F=P%a,L=Math.min(P,P-F)+x,I=0,K=x;K<L;K+=a)I=_(O,K,K+a,q),this.imuln(b),this.words[0]+I<67108864?this.words[0]+=I:this._iaddn(I);if(F!==0){var z=1;for(I=_(O,K,O.length,q),K=0;K<F;K++)z*=q;this.imuln(z),this.words[0]+I<67108864?this.words[0]+=I:this._iaddn(I)}this.strip()},l.prototype.copy=function(O){O.words=new Array(this.length);for(var q=0;q<this.length;q++)O.words[q]=this.words[q];O.length=this.length,O.negative=this.negative,O.red=this.red},l.prototype.clone=function(){var O=new l(null);return this.copy(O),O},l.prototype._expand=function(O){for(;this.length<O;)this.words[this.length++]=0;return this},l.prototype.strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},l.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},l.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var p=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],u=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],E=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];l.prototype.toString=function(O,q){O=O||10,q=q|0||1;var x;if(O===16||O==="hex"){x="";for(var a=0,b=0,P=0;P<this.length;P++){var F=this.words[P],L=((F<<a|b)&16777215).toString(16);b=F>>>24-a&16777215,b!==0||P!==this.length-1?x=p[6-L.length]+L+x:x=L+x,a+=2,a>=26&&(a-=26,P--)}for(b!==0&&(x=b.toString(16)+x);x.length%q!=0;)x="0"+x;return this.negative!==0&&(x="-"+x),x}if(O===(O|0)&&O>=2&&O<=36){var I=u[O],K=E[O];x="";var z=this.clone();for(z.negative=0;!z.isZero();){var w=z.modn(K).toString(O);z=z.idivn(K),z.isZero()?x=w+x:x=p[I-w.length]+w+x}for(this.isZero()&&(x="0"+x);x.length%q!=0;)x="0"+x;return this.negative!==0&&(x="-"+x),x}A(!1,"Base should be between 2 and 36")},l.prototype.toNumber=function(){var O=this.words[0];return this.length===2?O+=this.words[1]*67108864:this.length===3&&this.words[2]===1?O+=4503599627370496+this.words[1]*67108864:this.length>2&&A(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-O:O},l.prototype.toJSON=function(){return this.toString(16)},l.prototype.toBuffer=function(O,q){return A(typeof o!="undefined"),this.toArrayLike(o,O,q)},l.prototype.toArray=function(O,q){return this.toArrayLike(Array,O,q)},l.prototype.toArrayLike=function(O,q,x){var a=this.byteLength(),b=x||Math.max(1,a);A(a<=b,"byte array longer than desired length"),A(b>0,"Requested array length <= 0"),this.strip();var P=q==="le",F=new O(b),L,I,K=this.clone();if(P){for(I=0;!K.isZero();I++)L=K.andln(255),K.iushrn(8),F[I]=L;for(;I<b;I++)F[I]=0}else{for(I=0;I<b-a;I++)F[I]=0;for(I=0;!K.isZero();I++)L=K.andln(255),K.iushrn(8),F[b-I-1]=L}return F},Math.clz32?l.prototype._countBits=function(O){return 32-Math.clz32(O)}:l.prototype._countBits=function(O){var q=O,x=0;return q>=4096&&(x+=13,q>>>=13),q>=64&&(x+=7,q>>>=7),q>=8&&(x+=4,q>>>=4),q>=2&&(x+=2,q>>>=2),x+q},l.prototype._zeroBits=function(O){if(O===0)return 26;var q=O,x=0;return(q&8191)==0&&(x+=13,q>>>=13),(q&127)==0&&(x+=7,q>>>=7),(q&15)==0&&(x+=4,q>>>=4),(q&3)==0&&(x+=2,q>>>=2),(q&1)==0&&x++,x},l.prototype.bitLength=function(){var O=this.words[this.length-1],q=this._countBits(O);return(this.length-1)*26+q};function h(te){for(var O=new Array(te.bitLength()),q=0;q<O.length;q++){var x=q/26|0,a=q%26;O[q]=(te.words[x]&1<<a)>>>a}return O}l.prototype.zeroBits=function(){if(this.isZero())return 0;for(var O=0,q=0;q<this.length;q++){var x=this._zeroBits(this.words[q]);if(O+=x,x!==26)break}return O},l.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},l.prototype.toTwos=function(O){return this.negative!==0?this.abs().inotn(O).iaddn(1):this.clone()},l.prototype.fromTwos=function(O){return this.testn(O-1)?this.notn(O).iaddn(1).ineg():this.clone()},l.prototype.isNeg=function(){return this.negative!==0},l.prototype.neg=function(){return this.clone().ineg()},l.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},l.prototype.iuor=function(O){for(;this.length<O.length;)this.words[this.length++]=0;for(var q=0;q<O.length;q++)this.words[q]=this.words[q]|O.words[q];return this.strip()},l.prototype.ior=function(O){return A((this.negative|O.negative)==0),this.iuor(O)},l.prototype.or=function(O){return this.length>O.length?this.clone().ior(O):O.clone().ior(this)},l.prototype.uor=function(O){return this.length>O.length?this.clone().iuor(O):O.clone().iuor(this)},l.prototype.iuand=function(O){var q;this.length>O.length?q=O:q=this;for(var x=0;x<q.length;x++)this.words[x]=this.words[x]&O.words[x];return this.length=q.length,this.strip()},l.prototype.iand=function(O){return A((this.negative|O.negative)==0),this.iuand(O)},l.prototype.and=function(O){return this.length>O.length?this.clone().iand(O):O.clone().iand(this)},l.prototype.uand=function(O){return this.length>O.length?this.clone().iuand(O):O.clone().iuand(this)},l.prototype.iuxor=function(O){var q,x;this.length>O.length?(q=this,x=O):(q=O,x=this);for(var a=0;a<x.length;a++)this.words[a]=q.words[a]^x.words[a];if(this!==q)for(;a<q.length;a++)this.words[a]=q.words[a];return this.length=q.length,this.strip()},l.prototype.ixor=function(O){return A((this.negative|O.negative)==0),this.iuxor(O)},l.prototype.xor=function(O){return this.length>O.length?this.clone().ixor(O):O.clone().ixor(this)},l.prototype.uxor=function(O){return this.length>O.length?this.clone().iuxor(O):O.clone().iuxor(this)},l.prototype.inotn=function(O){A(typeof O=="number"&&O>=0);var q=Math.ceil(O/26)|0,x=O%26;this._expand(q),x>0&&q--;for(var a=0;a<q;a++)this.words[a]=~this.words[a]&67108863;return x>0&&(this.words[a]=~this.words[a]&67108863>>26-x),this.strip()},l.prototype.notn=function(O){return this.clone().inotn(O)},l.prototype.setn=function(O,q){A(typeof O=="number"&&O>=0);var x=O/26|0,a=O%26;return this._expand(x+1),q?this.words[x]=this.words[x]|1<<a:this.words[x]=this.words[x]&~(1<<a),this.strip()},l.prototype.iadd=function(O){var q;if(this.negative!==0&&O.negative===0)return this.negative=0,q=this.isub(O),this.negative^=1,this._normSign();if(this.negative===0&&O.negative!==0)return O.negative=0,q=this.isub(O),O.negative=1,q._normSign();var x,a;this.length>O.length?(x=this,a=O):(x=O,a=this);for(var b=0,P=0;P<a.length;P++)q=(x.words[P]|0)+(a.words[P]|0)+b,this.words[P]=q&67108863,b=q>>>26;for(;b!==0&&P<x.length;P++)q=(x.words[P]|0)+b,this.words[P]=q&67108863,b=q>>>26;if(this.length=x.length,b!==0)this.words[this.length]=b,this.length++;else if(x!==this)for(;P<x.length;P++)this.words[P]=x.words[P];return this},l.prototype.add=function(O){var q;return O.negative!==0&&this.negative===0?(O.negative=0,q=this.sub(O),O.negative^=1,q):O.negative===0&&this.negative!==0?(this.negative=0,q=O.sub(this),this.negative=1,q):this.length>O.length?this.clone().iadd(O):O.clone().iadd(this)},l.prototype.isub=function(O){if(O.negative!==0){O.negative=0;var q=this.iadd(O);return O.negative=1,q._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(O),this.negative=1,this._normSign();var x=this.cmp(O);if(x===0)return this.negative=0,this.length=1,this.words[0]=0,this;var a,b;x>0?(a=this,b=O):(a=O,b=this);for(var P=0,F=0;F<b.length;F++)q=(a.words[F]|0)-(b.words[F]|0)+P,P=q>>26,this.words[F]=q&67108863;for(;P!==0&&F<a.length;F++)q=(a.words[F]|0)+P,P=q>>26,this.words[F]=q&67108863;if(P===0&&F<a.length&&a!==this)for(;F<a.length;F++)this.words[F]=a.words[F];return this.length=Math.max(this.length,F),a!==this&&(this.negative=1),this.strip()},l.prototype.sub=function(O){return this.clone().isub(O)};function m(te,O,q){q.negative=O.negative^te.negative;var x=te.length+O.length|0;q.length=x,x=x-1|0;var a=te.words[0]|0,b=O.words[0]|0,P=a*b,F=P&67108863,L=P/67108864|0;q.words[0]=F;for(var I=1;I<x;I++){for(var K=L>>>26,z=L&67108863,w=Math.min(I,O.length-1),j=Math.max(0,I-te.length+1);j<=w;j++){var he=I-j|0;a=te.words[he]|0,b=O.words[j]|0,P=a*b+z,K+=P/67108864|0,z=P&67108863}q.words[I]=z|0,L=K|0}return L!==0?q.words[I]=L|0:q.length--,q.strip()}var y=function(O,q,x){var a=O.words,b=q.words,P=x.words,F=0,L,I,K,z=a[0]|0,w=z&8191,j=z>>>13,he=a[1]|0,_e=he&8191,Re=he>>>13,Ie=a[2]|0,J=Ie&8191,Z=Ie>>>13,fe=a[3]|0,we=fe&8191,Ee=fe>>>13,$=a[4]|0,V=$&8191,le=$>>>13,Se=a[5]|0,De=Se&8191,pe=Se>>>13,He=a[6]|0,Ve=He&8191,qe=He>>>13,Ut=a[7]|0,Ke=Ut&8191,ze=Ut>>>13,Gt=a[8]|0,se=Gt&8191,Q=Gt>>>13,ee=a[9]|0,ue=ee&8191,me=ee>>>13,Ae=b[0]|0,Te=Ae&8191,Ue=Ae>>>13,Rt=b[1]|0,Ne=Rt&8191,Me=Rt>>>13,Ft=b[2]|0,at=Ft&8191,ft=Ft>>>13,sr=b[3]|0,Fe=sr&8191,ht=sr>>>13,vi=b[4]|0,rt=vi&8191,Ge=vi>>>13,ii=b[5]|0,dt=ii&8191,pt=ii>>>13,zt=b[6]|0,mt=zt&8191,Ye=zt>>>13,bi=b[7]|0,et=bi&8191,st=bi>>>13,xt=b[8]|0,ot=xt&8191,lt=xt>>>13,Dr=b[9]|0,$e=Dr&8191,nt=Dr>>>13;x.negative=O.negative^q.negative,x.length=19,L=Math.imul(w,Te),I=Math.imul(w,Ue),I=I+Math.imul(j,Te)|0,K=Math.imul(j,Ue);var $r=(F+L|0)+((I&8191)<<13)|0;F=(K+(I>>>13)|0)+($r>>>26)|0,$r&=67108863,L=Math.imul(_e,Te),I=Math.imul(_e,Ue),I=I+Math.imul(Re,Te)|0,K=Math.imul(Re,Ue),L=L+Math.imul(w,Ne)|0,I=I+Math.imul(w,Me)|0,I=I+Math.imul(j,Ne)|0,K=K+Math.imul(j,Me)|0;var Ct=(F+L|0)+((I&8191)<<13)|0;F=(K+(I>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,L=Math.imul(J,Te),I=Math.imul(J,Ue),I=I+Math.imul(Z,Te)|0,K=Math.imul(Z,Ue),L=L+Math.imul(_e,Ne)|0,I=I+Math.imul(_e,Me)|0,I=I+Math.imul(Re,Ne)|0,K=K+Math.imul(Re,Me)|0,L=L+Math.imul(w,at)|0,I=I+Math.imul(w,ft)|0,I=I+Math.imul(j,at)|0,K=K+Math.imul(j,ft)|0;var gt=(F+L|0)+((I&8191)<<13)|0;F=(K+(I>>>13)|0)+(gt>>>26)|0,gt&=67108863,L=Math.imul(we,Te),I=Math.imul(we,Ue),I=I+Math.imul(Ee,Te)|0,K=Math.imul(Ee,Ue),L=L+Math.imul(J,Ne)|0,I=I+Math.imul(J,Me)|0,I=I+Math.imul(Z,Ne)|0,K=K+Math.imul(Z,Me)|0,L=L+Math.imul(_e,at)|0,I=I+Math.imul(_e,ft)|0,I=I+Math.imul(Re,at)|0,K=K+Math.imul(Re,ft)|0,L=L+Math.imul(w,Fe)|0,I=I+Math.imul(w,ht)|0,I=I+Math.imul(j,Fe)|0,K=K+Math.imul(j,ht)|0;var yr=(F+L|0)+((I&8191)<<13)|0;F=(K+(I>>>13)|0)+(yr>>>26)|0,yr&=67108863,L=Math.imul(V,Te),I=Math.imul(V,Ue),I=I+Math.imul(le,Te)|0,K=Math.imul(le,Ue),L=L+Math.imul(we,Ne)|0,I=I+Math.imul(we,Me)|0,I=I+Math.imul(Ee,Ne)|0,K=K+Math.imul(Ee,Me)|0,L=L+Math.imul(J,at)|0,I=I+Math.imul(J,ft)|0,I=I+Math.imul(Z,at)|0,K=K+Math.imul(Z,ft)|0,L=L+Math.imul(_e,Fe)|0,I=I+Math.imul(_e,ht)|0,I=I+Math.imul(Re,Fe)|0,K=K+Math.imul(Re,ht)|0,L=L+Math.imul(w,rt)|0,I=I+Math.imul(w,Ge)|0,I=I+Math.imul(j,rt)|0,K=K+Math.imul(j,Ge)|0;var Cr=(F+L|0)+((I&8191)<<13)|0;F=(K+(I>>>13)|0)+(Cr>>>26)|0,Cr&=67108863,L=Math.imul(De,Te),I=Math.imul(De,Ue),I=I+Math.imul(pe,Te)|0,K=Math.imul(pe,Ue),L=L+Math.imul(V,Ne)|0,I=I+Math.imul(V,Me)|0,I=I+Math.imul(le,Ne)|0,K=K+Math.imul(le,Me)|0,L=L+Math.imul(we,at)|0,I=I+Math.imul(we,ft)|0,I=I+Math.imul(Ee,at)|0,K=K+Math.imul(Ee,ft)|0,L=L+Math.imul(J,Fe)|0,I=I+Math.imul(J,ht)|0,I=I+Math.imul(Z,Fe)|0,K=K+Math.imul(Z,ht)|0,L=L+Math.imul(_e,rt)|0,I=I+Math.imul(_e,Ge)|0,I=I+Math.imul(Re,rt)|0,K=K+Math.imul(Re,Ge)|0,L=L+Math.imul(w,dt)|0,I=I+Math.imul(w,pt)|0,I=I+Math.imul(j,dt)|0,K=K+Math.imul(j,pt)|0;var ar=(F+L|0)+((I&8191)<<13)|0;F=(K+(I>>>13)|0)+(ar>>>26)|0,ar&=67108863,L=Math.imul(Ve,Te),I=Math.imul(Ve,Ue),I=I+Math.imul(qe,Te)|0,K=Math.imul(qe,Ue),L=L+Math.imul(De,Ne)|0,I=I+Math.imul(De,Me)|0,I=I+Math.imul(pe,Ne)|0,K=K+Math.imul(pe,Me)|0,L=L+Math.imul(V,at)|0,I=I+Math.imul(V,ft)|0,I=I+Math.imul(le,at)|0,K=K+Math.imul(le,ft)|0,L=L+Math.imul(we,Fe)|0,I=I+Math.imul(we,ht)|0,I=I+Math.imul(Ee,Fe)|0,K=K+Math.imul(Ee,ht)|0,L=L+Math.imul(J,rt)|0,I=I+Math.imul(J,Ge)|0,I=I+Math.imul(Z,rt)|0,K=K+Math.imul(Z,Ge)|0,L=L+Math.imul(_e,dt)|0,I=I+Math.imul(_e,pt)|0,I=I+Math.imul(Re,dt)|0,K=K+Math.imul(Re,pt)|0,L=L+Math.imul(w,mt)|0,I=I+Math.imul(w,Ye)|0,I=I+Math.imul(j,mt)|0,K=K+Math.imul(j,Ye)|0;var It=(F+L|0)+((I&8191)<<13)|0;F=(K+(I>>>13)|0)+(It>>>26)|0,It&=67108863,L=Math.imul(Ke,Te),I=Math.imul(Ke,Ue),I=I+Math.imul(ze,Te)|0,K=Math.imul(ze,Ue),L=L+Math.imul(Ve,Ne)|0,I=I+Math.imul(Ve,Me)|0,I=I+Math.imul(qe,Ne)|0,K=K+Math.imul(qe,Me)|0,L=L+Math.imul(De,at)|0,I=I+Math.imul(De,ft)|0,I=I+Math.imul(pe,at)|0,K=K+Math.imul(pe,ft)|0,L=L+Math.imul(V,Fe)|0,I=I+Math.imul(V,ht)|0,I=I+Math.imul(le,Fe)|0,K=K+Math.imul(le,ht)|0,L=L+Math.imul(we,rt)|0,I=I+Math.imul(we,Ge)|0,I=I+Math.imul(Ee,rt)|0,K=K+Math.imul(Ee,Ge)|0,L=L+Math.imul(J,dt)|0,I=I+Math.imul(J,pt)|0,I=I+Math.imul(Z,dt)|0,K=K+Math.imul(Z,pt)|0,L=L+Math.imul(_e,mt)|0,I=I+Math.imul(_e,Ye)|0,I=I+Math.imul(Re,mt)|0,K=K+Math.imul(Re,Ye)|0,L=L+Math.imul(w,et)|0,I=I+Math.imul(w,st)|0,I=I+Math.imul(j,et)|0,K=K+Math.imul(j,st)|0;var Pt=(F+L|0)+((I&8191)<<13)|0;F=(K+(I>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,L=Math.imul(se,Te),I=Math.imul(se,Ue),I=I+Math.imul(Q,Te)|0,K=Math.imul(Q,Ue),L=L+Math.imul(Ke,Ne)|0,I=I+Math.imul(Ke,Me)|0,I=I+Math.imul(ze,Ne)|0,K=K+Math.imul(ze,Me)|0,L=L+Math.imul(Ve,at)|0,I=I+Math.imul(Ve,ft)|0,I=I+Math.imul(qe,at)|0,K=K+Math.imul(qe,ft)|0,L=L+Math.imul(De,Fe)|0,I=I+Math.imul(De,ht)|0,I=I+Math.imul(pe,Fe)|0,K=K+Math.imul(pe,ht)|0,L=L+Math.imul(V,rt)|0,I=I+Math.imul(V,Ge)|0,I=I+Math.imul(le,rt)|0,K=K+Math.imul(le,Ge)|0,L=L+Math.imul(we,dt)|0,I=I+Math.imul(we,pt)|0,I=I+Math.imul(Ee,dt)|0,K=K+Math.imul(Ee,pt)|0,L=L+Math.imul(J,mt)|0,I=I+Math.imul(J,Ye)|0,I=I+Math.imul(Z,mt)|0,K=K+Math.imul(Z,Ye)|0,L=L+Math.imul(_e,et)|0,I=I+Math.imul(_e,st)|0,I=I+Math.imul(Re,et)|0,K=K+Math.imul(Re,st)|0,L=L+Math.imul(w,ot)|0,I=I+Math.imul(w,lt)|0,I=I+Math.imul(j,ot)|0,K=K+Math.imul(j,lt)|0;var Wt=(F+L|0)+((I&8191)<<13)|0;F=(K+(I>>>13)|0)+(Wt>>>26)|0,Wt&=67108863,L=Math.imul(ue,Te),I=Math.imul(ue,Ue),I=I+Math.imul(me,Te)|0,K=Math.imul(me,Ue),L=L+Math.imul(se,Ne)|0,I=I+Math.imul(se,Me)|0,I=I+Math.imul(Q,Ne)|0,K=K+Math.imul(Q,Me)|0,L=L+Math.imul(Ke,at)|0,I=I+Math.imul(Ke,ft)|0,I=I+Math.imul(ze,at)|0,K=K+Math.imul(ze,ft)|0,L=L+Math.imul(Ve,Fe)|0,I=I+Math.imul(Ve,ht)|0,I=I+Math.imul(qe,Fe)|0,K=K+Math.imul(qe,ht)|0,L=L+Math.imul(De,rt)|0,I=I+Math.imul(De,Ge)|0,I=I+Math.imul(pe,rt)|0,K=K+Math.imul(pe,Ge)|0,L=L+Math.imul(V,dt)|0,I=I+Math.imul(V,pt)|0,I=I+Math.imul(le,dt)|0,K=K+Math.imul(le,pt)|0,L=L+Math.imul(we,mt)|0,I=I+Math.imul(we,Ye)|0,I=I+Math.imul(Ee,mt)|0,K=K+Math.imul(Ee,Ye)|0,L=L+Math.imul(J,et)|0,I=I+Math.imul(J,st)|0,I=I+Math.imul(Z,et)|0,K=K+Math.imul(Z,st)|0,L=L+Math.imul(_e,ot)|0,I=I+Math.imul(_e,lt)|0,I=I+Math.imul(Re,ot)|0,K=K+Math.imul(Re,lt)|0,L=L+Math.imul(w,$e)|0,I=I+Math.imul(w,nt)|0,I=I+Math.imul(j,$e)|0,K=K+Math.imul(j,nt)|0;var ni=(F+L|0)+((I&8191)<<13)|0;F=(K+(I>>>13)|0)+(ni>>>26)|0,ni&=67108863,L=Math.imul(ue,Ne),I=Math.imul(ue,Me),I=I+Math.imul(me,Ne)|0,K=Math.imul(me,Me),L=L+Math.imul(se,at)|0,I=I+Math.imul(se,ft)|0,I=I+Math.imul(Q,at)|0,K=K+Math.imul(Q,ft)|0,L=L+Math.imul(Ke,Fe)|0,I=I+Math.imul(Ke,ht)|0,I=I+Math.imul(ze,Fe)|0,K=K+Math.imul(ze,ht)|0,L=L+Math.imul(Ve,rt)|0,I=I+Math.imul(Ve,Ge)|0,I=I+Math.imul(qe,rt)|0,K=K+Math.imul(qe,Ge)|0,L=L+Math.imul(De,dt)|0,I=I+Math.imul(De,pt)|0,I=I+Math.imul(pe,dt)|0,K=K+Math.imul(pe,pt)|0,L=L+Math.imul(V,mt)|0,I=I+Math.imul(V,Ye)|0,I=I+Math.imul(le,mt)|0,K=K+Math.imul(le,Ye)|0,L=L+Math.imul(we,et)|0,I=I+Math.imul(we,st)|0,I=I+Math.imul(Ee,et)|0,K=K+Math.imul(Ee,st)|0,L=L+Math.imul(J,ot)|0,I=I+Math.imul(J,lt)|0,I=I+Math.imul(Z,ot)|0,K=K+Math.imul(Z,lt)|0,L=L+Math.imul(_e,$e)|0,I=I+Math.imul(_e,nt)|0,I=I+Math.imul(Re,$e)|0,K=K+Math.imul(Re,nt)|0;var Gr=(F+L|0)+((I&8191)<<13)|0;F=(K+(I>>>13)|0)+(Gr>>>26)|0,Gr&=67108863,L=Math.imul(ue,at),I=Math.imul(ue,ft),I=I+Math.imul(me,at)|0,K=Math.imul(me,ft),L=L+Math.imul(se,Fe)|0,I=I+Math.imul(se,ht)|0,I=I+Math.imul(Q,Fe)|0,K=K+Math.imul(Q,ht)|0,L=L+Math.imul(Ke,rt)|0,I=I+Math.imul(Ke,Ge)|0,I=I+Math.imul(ze,rt)|0,K=K+Math.imul(ze,Ge)|0,L=L+Math.imul(Ve,dt)|0,I=I+Math.imul(Ve,pt)|0,I=I+Math.imul(qe,dt)|0,K=K+Math.imul(qe,pt)|0,L=L+Math.imul(De,mt)|0,I=I+Math.imul(De,Ye)|0,I=I+Math.imul(pe,mt)|0,K=K+Math.imul(pe,Ye)|0,L=L+Math.imul(V,et)|0,I=I+Math.imul(V,st)|0,I=I+Math.imul(le,et)|0,K=K+Math.imul(le,st)|0,L=L+Math.imul(we,ot)|0,I=I+Math.imul(we,lt)|0,I=I+Math.imul(Ee,ot)|0,K=K+Math.imul(Ee,lt)|0,L=L+Math.imul(J,$e)|0,I=I+Math.imul(J,nt)|0,I=I+Math.imul(Z,$e)|0,K=K+Math.imul(Z,nt)|0;var fr=(F+L|0)+((I&8191)<<13)|0;F=(K+(I>>>13)|0)+(fr>>>26)|0,fr&=67108863,L=Math.imul(ue,Fe),I=Math.imul(ue,ht),I=I+Math.imul(me,Fe)|0,K=Math.imul(me,ht),L=L+Math.imul(se,rt)|0,I=I+Math.imul(se,Ge)|0,I=I+Math.imul(Q,rt)|0,K=K+Math.imul(Q,Ge)|0,L=L+Math.imul(Ke,dt)|0,I=I+Math.imul(Ke,pt)|0,I=I+Math.imul(ze,dt)|0,K=K+Math.imul(ze,pt)|0,L=L+Math.imul(Ve,mt)|0,I=I+Math.imul(Ve,Ye)|0,I=I+Math.imul(qe,mt)|0,K=K+Math.imul(qe,Ye)|0,L=L+Math.imul(De,et)|0,I=I+Math.imul(De,st)|0,I=I+Math.imul(pe,et)|0,K=K+Math.imul(pe,st)|0,L=L+Math.imul(V,ot)|0,I=I+Math.imul(V,lt)|0,I=I+Math.imul(le,ot)|0,K=K+Math.imul(le,lt)|0,L=L+Math.imul(we,$e)|0,I=I+Math.imul(we,nt)|0,I=I+Math.imul(Ee,$e)|0,K=K+Math.imul(Ee,nt)|0;var si=(F+L|0)+((I&8191)<<13)|0;F=(K+(I>>>13)|0)+(si>>>26)|0,si&=67108863,L=Math.imul(ue,rt),I=Math.imul(ue,Ge),I=I+Math.imul(me,rt)|0,K=Math.imul(me,Ge),L=L+Math.imul(se,dt)|0,I=I+Math.imul(se,pt)|0,I=I+Math.imul(Q,dt)|0,K=K+Math.imul(Q,pt)|0,L=L+Math.imul(Ke,mt)|0,I=I+Math.imul(Ke,Ye)|0,I=I+Math.imul(ze,mt)|0,K=K+Math.imul(ze,Ye)|0,L=L+Math.imul(Ve,et)|0,I=I+Math.imul(Ve,st)|0,I=I+Math.imul(qe,et)|0,K=K+Math.imul(qe,st)|0,L=L+Math.imul(De,ot)|0,I=I+Math.imul(De,lt)|0,I=I+Math.imul(pe,ot)|0,K=K+Math.imul(pe,lt)|0,L=L+Math.imul(V,$e)|0,I=I+Math.imul(V,nt)|0,I=I+Math.imul(le,$e)|0,K=K+Math.imul(le,nt)|0;var di=(F+L|0)+((I&8191)<<13)|0;F=(K+(I>>>13)|0)+(di>>>26)|0,di&=67108863,L=Math.imul(ue,dt),I=Math.imul(ue,pt),I=I+Math.imul(me,dt)|0,K=Math.imul(me,pt),L=L+Math.imul(se,mt)|0,I=I+Math.imul(se,Ye)|0,I=I+Math.imul(Q,mt)|0,K=K+Math.imul(Q,Ye)|0,L=L+Math.imul(Ke,et)|0,I=I+Math.imul(Ke,st)|0,I=I+Math.imul(ze,et)|0,K=K+Math.imul(ze,st)|0,L=L+Math.imul(Ve,ot)|0,I=I+Math.imul(Ve,lt)|0,I=I+Math.imul(qe,ot)|0,K=K+Math.imul(qe,lt)|0,L=L+Math.imul(De,$e)|0,I=I+Math.imul(De,nt)|0,I=I+Math.imul(pe,$e)|0,K=K+Math.imul(pe,nt)|0;var ai=(F+L|0)+((I&8191)<<13)|0;F=(K+(I>>>13)|0)+(ai>>>26)|0,ai&=67108863,L=Math.imul(ue,mt),I=Math.imul(ue,Ye),I=I+Math.imul(me,mt)|0,K=Math.imul(me,Ye),L=L+Math.imul(se,et)|0,I=I+Math.imul(se,st)|0,I=I+Math.imul(Q,et)|0,K=K+Math.imul(Q,st)|0,L=L+Math.imul(Ke,ot)|0,I=I+Math.imul(Ke,lt)|0,I=I+Math.imul(ze,ot)|0,K=K+Math.imul(ze,lt)|0,L=L+Math.imul(Ve,$e)|0,I=I+Math.imul(Ve,nt)|0,I=I+Math.imul(qe,$e)|0,K=K+Math.imul(qe,nt)|0;var jr=(F+L|0)+((I&8191)<<13)|0;F=(K+(I>>>13)|0)+(jr>>>26)|0,jr&=67108863,L=Math.imul(ue,et),I=Math.imul(ue,st),I=I+Math.imul(me,et)|0,K=Math.imul(me,st),L=L+Math.imul(se,ot)|0,I=I+Math.imul(se,lt)|0,I=I+Math.imul(Q,ot)|0,K=K+Math.imul(Q,lt)|0,L=L+Math.imul(Ke,$e)|0,I=I+Math.imul(Ke,nt)|0,I=I+Math.imul(ze,$e)|0,K=K+Math.imul(ze,nt)|0;var zr=(F+L|0)+((I&8191)<<13)|0;F=(K+(I>>>13)|0)+(zr>>>26)|0,zr&=67108863,L=Math.imul(ue,ot),I=Math.imul(ue,lt),I=I+Math.imul(me,ot)|0,K=Math.imul(me,lt),L=L+Math.imul(se,$e)|0,I=I+Math.imul(se,nt)|0,I=I+Math.imul(Q,$e)|0,K=K+Math.imul(Q,nt)|0;var Wr=(F+L|0)+((I&8191)<<13)|0;F=(K+(I>>>13)|0)+(Wr>>>26)|0,Wr&=67108863,L=Math.imul(ue,$e),I=Math.imul(ue,nt),I=I+Math.imul(me,$e)|0,K=Math.imul(me,nt);var Kr=(F+L|0)+((I&8191)<<13)|0;return F=(K+(I>>>13)|0)+(Kr>>>26)|0,Kr&=67108863,P[0]=$r,P[1]=Ct,P[2]=gt,P[3]=yr,P[4]=Cr,P[5]=ar,P[6]=It,P[7]=Pt,P[8]=Wt,P[9]=ni,P[10]=Gr,P[11]=fr,P[12]=si,P[13]=di,P[14]=ai,P[15]=jr,P[16]=zr,P[17]=Wr,P[18]=Kr,F!==0&&(P[19]=F,x.length++),x};Math.imul||(y=m);function C(te,O,q){q.negative=O.negative^te.negative,q.length=te.length+O.length;for(var x=0,a=0,b=0;b<q.length-1;b++){var P=a;a=0;for(var F=x&67108863,L=Math.min(b,O.length-1),I=Math.max(0,b-te.length+1);I<=L;I++){var K=b-I,z=te.words[K]|0,w=O.words[I]|0,j=z*w,he=j&67108863;P=P+(j/67108864|0)|0,he=he+F|0,F=he&67108863,P=P+(he>>>26)|0,a+=P>>>26,P&=67108863}q.words[b]=F,x=P,P=a}return x!==0?q.words[b]=x:q.length--,q.strip()}function D(te,O,q){var x=new T;return x.mulp(te,O,q)}l.prototype.mulTo=function(O,q){var x,a=this.length+O.length;return this.length===10&&O.length===10?x=y(this,O,q):a<63?x=m(this,O,q):a<1024?x=C(this,O,q):x=D(this,O,q),x};function T(te,O){this.x=te,this.y=O}T.prototype.makeRBT=function(O){for(var q=new Array(O),x=l.prototype._countBits(O)-1,a=0;a<O;a++)q[a]=this.revBin(a,x,O);return q},T.prototype.revBin=function(O,q,x){if(O===0||O===x-1)return O;for(var a=0,b=0;b<q;b++)a|=(O&1)<<q-b-1,O>>=1;return a},T.prototype.permute=function(O,q,x,a,b,P){for(var F=0;F<P;F++)a[F]=q[O[F]],b[F]=x[O[F]]},T.prototype.transform=function(O,q,x,a,b,P){this.permute(P,O,q,x,a,b);for(var F=1;F<b;F<<=1)for(var L=F<<1,I=Math.cos(2*Math.PI/L),K=Math.sin(2*Math.PI/L),z=0;z<b;z+=L)for(var w=I,j=K,he=0;he<F;he++){var _e=x[z+he],Re=a[z+he],Ie=x[z+he+F],J=a[z+he+F],Z=w*Ie-j*J;J=w*J+j*Ie,Ie=Z,x[z+he]=_e+Ie,a[z+he]=Re+J,x[z+he+F]=_e-Ie,a[z+he+F]=Re-J,he!==L&&(Z=I*w-K*j,j=I*j+K*w,w=Z)}},T.prototype.guessLen13b=function(O,q){var x=Math.max(q,O)|1,a=x&1,b=0;for(x=x/2|0;x;x=x>>>1)b++;return 1<<b+1+a},T.prototype.conjugate=function(O,q,x){if(!(x<=1))for(var a=0;a<x/2;a++){var b=O[a];O[a]=O[x-a-1],O[x-a-1]=b,b=q[a],q[a]=-q[x-a-1],q[x-a-1]=-b}},T.prototype.normalize13b=function(O,q){for(var x=0,a=0;a<q/2;a++){var b=Math.round(O[2*a+1]/q)*8192+Math.round(O[2*a]/q)+x;O[a]=b&67108863,b<67108864?x=0:x=b/67108864|0}return O},T.prototype.convert13b=function(O,q,x,a){for(var b=0,P=0;P<q;P++)b=b+(O[P]|0),x[2*P]=b&8191,b=b>>>13,x[2*P+1]=b&8191,b=b>>>13;for(P=2*q;P<a;++P)x[P]=0;A(b===0),A((b&~8191)==0)},T.prototype.stub=function(O){for(var q=new Array(O),x=0;x<O;x++)q[x]=0;return q},T.prototype.mulp=function(O,q,x){var a=2*this.guessLen13b(O.length,q.length),b=this.makeRBT(a),P=this.stub(a),F=new Array(a),L=new Array(a),I=new Array(a),K=new Array(a),z=new Array(a),w=new Array(a),j=x.words;j.length=a,this.convert13b(O.words,O.length,F,a),this.convert13b(q.words,q.length,K,a),this.transform(F,P,L,I,a,b),this.transform(K,P,z,w,a,b);for(var he=0;he<a;he++){var _e=L[he]*z[he]-I[he]*w[he];I[he]=L[he]*w[he]+I[he]*z[he],L[he]=_e}return this.conjugate(L,I,a),this.transform(L,I,j,P,a,b),this.conjugate(j,P,a),this.normalize13b(j,a),x.negative=O.negative^q.negative,x.length=O.length+q.length,x.strip()},l.prototype.mul=function(O){var q=new l(null);return q.words=new Array(this.length+O.length),this.mulTo(O,q)},l.prototype.mulf=function(O){var q=new l(null);return q.words=new Array(this.length+O.length),D(this,O,q)},l.prototype.imul=function(O){return this.clone().mulTo(O,this)},l.prototype.imuln=function(O){A(typeof O=="number"),A(O<67108864);for(var q=0,x=0;x<this.length;x++){var a=(this.words[x]|0)*O,b=(a&67108863)+(q&67108863);q>>=26,q+=a/67108864|0,q+=b>>>26,this.words[x]=b&67108863}return q!==0&&(this.words[x]=q,this.length++),this},l.prototype.muln=function(O){return this.clone().imuln(O)},l.prototype.sqr=function(){return this.mul(this)},l.prototype.isqr=function(){return this.imul(this.clone())},l.prototype.pow=function(O){var q=h(O);if(q.length===0)return new l(1);for(var x=this,a=0;a<q.length&&q[a]===0;a++,x=x.sqr());if(++a<q.length)for(var b=x.sqr();a<q.length;a++,b=b.sqr())q[a]!==0&&(x=x.mul(b));return x},l.prototype.iushln=function(O){A(typeof O=="number"&&O>=0);var q=O%26,x=(O-q)/26,a=67108863>>>26-q<<26-q,b;if(q!==0){var P=0;for(b=0;b<this.length;b++){var F=this.words[b]&a,L=(this.words[b]|0)-F<<q;this.words[b]=L|P,P=F>>>26-q}P&&(this.words[b]=P,this.length++)}if(x!==0){for(b=this.length-1;b>=0;b--)this.words[b+x]=this.words[b];for(b=0;b<x;b++)this.words[b]=0;this.length+=x}return this.strip()},l.prototype.ishln=function(O){return A(this.negative===0),this.iushln(O)},l.prototype.iushrn=function(O,q,x){A(typeof O=="number"&&O>=0);var a;q?a=(q-q%26)/26:a=0;var b=O%26,P=Math.min((O-b)/26,this.length),F=67108863^67108863>>>b<<b,L=x;if(a-=P,a=Math.max(0,a),L){for(var I=0;I<P;I++)L.words[I]=this.words[I];L.length=P}if(P!==0)if(this.length>P)for(this.length-=P,I=0;I<this.length;I++)this.words[I]=this.words[I+P];else this.words[0]=0,this.length=1;var K=0;for(I=this.length-1;I>=0&&(K!==0||I>=a);I--){var z=this.words[I]|0;this.words[I]=K<<26-b|z>>>b,K=z&F}return L&&K!==0&&(L.words[L.length++]=K),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},l.prototype.ishrn=function(O,q,x){return A(this.negative===0),this.iushrn(O,q,x)},l.prototype.shln=function(O){return this.clone().ishln(O)},l.prototype.ushln=function(O){return this.clone().iushln(O)},l.prototype.shrn=function(O){return this.clone().ishrn(O)},l.prototype.ushrn=function(O){return this.clone().iushrn(O)},l.prototype.testn=function(O){A(typeof O=="number"&&O>=0);var q=O%26,x=(O-q)/26,a=1<<q;if(this.length<=x)return!1;var b=this.words[x];return!!(b&a)},l.prototype.imaskn=function(O){A(typeof O=="number"&&O>=0);var q=O%26,x=(O-q)/26;if(A(this.negative===0,"imaskn works only with positive numbers"),this.length<=x)return this;if(q!==0&&x++,this.length=Math.min(x,this.length),q!==0){var a=67108863^67108863>>>q<<q;this.words[this.length-1]&=a}return this.strip()},l.prototype.maskn=function(O){return this.clone().imaskn(O)},l.prototype.iaddn=function(O){return A(typeof O=="number"),A(O<67108864),O<0?this.isubn(-O):this.negative!==0?this.length===1&&(this.words[0]|0)<O?(this.words[0]=O-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(O),this.negative=1,this):this._iaddn(O)},l.prototype._iaddn=function(O){this.words[0]+=O;for(var q=0;q<this.length&&this.words[q]>=67108864;q++)this.words[q]-=67108864,q===this.length-1?this.words[q+1]=1:this.words[q+1]++;return this.length=Math.max(this.length,q+1),this},l.prototype.isubn=function(O){if(A(typeof O=="number"),A(O<67108864),O<0)return this.iaddn(-O);if(this.negative!==0)return this.negative=0,this.iaddn(O),this.negative=1,this;if(this.words[0]-=O,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var q=0;q<this.length&&this.words[q]<0;q++)this.words[q]+=67108864,this.words[q+1]-=1;return this.strip()},l.prototype.addn=function(O){return this.clone().iaddn(O)},l.prototype.subn=function(O){return this.clone().isubn(O)},l.prototype.iabs=function(){return this.negative=0,this},l.prototype.abs=function(){return this.clone().iabs()},l.prototype._ishlnsubmul=function(O,q,x){var a=O.length+x,b;this._expand(a);var P,F=0;for(b=0;b<O.length;b++){P=(this.words[b+x]|0)+F;var L=(O.words[b]|0)*q;P-=L&67108863,F=(P>>26)-(L/67108864|0),this.words[b+x]=P&67108863}for(;b<this.length-x;b++)P=(this.words[b+x]|0)+F,F=P>>26,this.words[b+x]=P&67108863;if(F===0)return this.strip();for(A(F===-1),F=0,b=0;b<this.length;b++)P=-(this.words[b]|0)+F,F=P>>26,this.words[b]=P&67108863;return this.negative=1,this.strip()},l.prototype._wordDiv=function(O,q){var x=this.length-O.length,a=this.clone(),b=O,P=b.words[b.length-1]|0,F=this._countBits(P);x=26-F,x!==0&&(b=b.ushln(x),a.iushln(x),P=b.words[b.length-1]|0);var L=a.length-b.length,I;if(q!=="mod"){I=new l(null),I.length=L+1,I.words=new Array(I.length);for(var K=0;K<I.length;K++)I.words[K]=0}var z=a.clone()._ishlnsubmul(b,1,L);z.negative===0&&(a=z,I&&(I.words[L]=1));for(var w=L-1;w>=0;w--){var j=(a.words[b.length+w]|0)*67108864+(a.words[b.length+w-1]|0);for(j=Math.min(j/P|0,67108863),a._ishlnsubmul(b,j,w);a.negative!==0;)j--,a.negative=0,a._ishlnsubmul(b,1,w),a.isZero()||(a.negative^=1);I&&(I.words[w]=j)}return I&&I.strip(),a.strip(),q!=="div"&&x!==0&&a.iushrn(x),{div:I||null,mod:a}},l.prototype.divmod=function(O,q,x){if(A(!O.isZero()),this.isZero())return{div:new l(0),mod:new l(0)};var a,b,P;return this.negative!==0&&O.negative===0?(P=this.neg().divmod(O,q),q!=="mod"&&(a=P.div.neg()),q!=="div"&&(b=P.mod.neg(),x&&b.negative!==0&&b.iadd(O)),{div:a,mod:b}):this.negative===0&&O.negative!==0?(P=this.divmod(O.neg(),q),q!=="mod"&&(a=P.div.neg()),{div:a,mod:P.mod}):(this.negative&O.negative)!=0?(P=this.neg().divmod(O.neg(),q),q!=="div"&&(b=P.mod.neg(),x&&b.negative!==0&&b.isub(O)),{div:P.div,mod:b}):O.length>this.length||this.cmp(O)<0?{div:new l(0),mod:this}:O.length===1?q==="div"?{div:this.divn(O.words[0]),mod:null}:q==="mod"?{div:null,mod:new l(this.modn(O.words[0]))}:{div:this.divn(O.words[0]),mod:new l(this.modn(O.words[0]))}:this._wordDiv(O,q)},l.prototype.div=function(O){return this.divmod(O,"div",!1).div},l.prototype.mod=function(O){return this.divmod(O,"mod",!1).mod},l.prototype.umod=function(O){return this.divmod(O,"mod",!0).mod},l.prototype.divRound=function(O){var q=this.divmod(O);if(q.mod.isZero())return q.div;var x=q.div.negative!==0?q.mod.isub(O):q.mod,a=O.ushrn(1),b=O.andln(1),P=x.cmp(a);return P<0||b===1&&P===0?q.div:q.div.negative!==0?q.div.isubn(1):q.div.iaddn(1)},l.prototype.modn=function(O){A(O<=67108863);for(var q=(1<<26)%O,x=0,a=this.length-1;a>=0;a--)x=(q*x+(this.words[a]|0))%O;return x},l.prototype.idivn=function(O){A(O<=67108863);for(var q=0,x=this.length-1;x>=0;x--){var a=(this.words[x]|0)+q*67108864;this.words[x]=a/O|0,q=a%O}return this.strip()},l.prototype.divn=function(O){return this.clone().idivn(O)},l.prototype.egcd=function(O){A(O.negative===0),A(!O.isZero());var q=this,x=O.clone();q.negative!==0?q=q.umod(O):q=q.clone();for(var a=new l(1),b=new l(0),P=new l(0),F=new l(1),L=0;q.isEven()&&x.isEven();)q.iushrn(1),x.iushrn(1),++L;for(var I=x.clone(),K=q.clone();!q.isZero();){for(var z=0,w=1;(q.words[0]&w)==0&&z<26;++z,w<<=1);if(z>0)for(q.iushrn(z);z-- >0;)(a.isOdd()||b.isOdd())&&(a.iadd(I),b.isub(K)),a.iushrn(1),b.iushrn(1);for(var j=0,he=1;(x.words[0]&he)==0&&j<26;++j,he<<=1);if(j>0)for(x.iushrn(j);j-- >0;)(P.isOdd()||F.isOdd())&&(P.iadd(I),F.isub(K)),P.iushrn(1),F.iushrn(1);q.cmp(x)>=0?(q.isub(x),a.isub(P),b.isub(F)):(x.isub(q),P.isub(a),F.isub(b))}return{a:P,b:F,gcd:x.iushln(L)}},l.prototype._invmp=function(O){A(O.negative===0),A(!O.isZero());var q=this,x=O.clone();q.negative!==0?q=q.umod(O):q=q.clone();for(var a=new l(1),b=new l(0),P=x.clone();q.cmpn(1)>0&&x.cmpn(1)>0;){for(var F=0,L=1;(q.words[0]&L)==0&&F<26;++F,L<<=1);if(F>0)for(q.iushrn(F);F-- >0;)a.isOdd()&&a.iadd(P),a.iushrn(1);for(var I=0,K=1;(x.words[0]&K)==0&&I<26;++I,K<<=1);if(I>0)for(x.iushrn(I);I-- >0;)b.isOdd()&&b.iadd(P),b.iushrn(1);q.cmp(x)>=0?(q.isub(x),a.isub(b)):(x.isub(q),b.isub(a))}var z;return q.cmpn(1)===0?z=a:z=b,z.cmpn(0)<0&&z.iadd(O),z},l.prototype.gcd=function(O){if(this.isZero())return O.abs();if(O.isZero())return this.abs();var q=this.clone(),x=O.clone();q.negative=0,x.negative=0;for(var a=0;q.isEven()&&x.isEven();a++)q.iushrn(1),x.iushrn(1);do{for(;q.isEven();)q.iushrn(1);for(;x.isEven();)x.iushrn(1);var b=q.cmp(x);if(b<0){var P=q;q=x,x=P}else if(b===0||x.cmpn(1)===0)break;q.isub(x)}while(!0);return x.iushln(a)},l.prototype.invm=function(O){return this.egcd(O).a.umod(O)},l.prototype.isEven=function(){return(this.words[0]&1)==0},l.prototype.isOdd=function(){return(this.words[0]&1)==1},l.prototype.andln=function(O){return this.words[0]&O},l.prototype.bincn=function(O){A(typeof O=="number");var q=O%26,x=(O-q)/26,a=1<<q;if(this.length<=x)return this._expand(x+1),this.words[x]|=a,this;for(var b=a,P=x;b!==0&&P<this.length;P++){var F=this.words[P]|0;F+=b,b=F>>>26,F&=67108863,this.words[P]=F}return b!==0&&(this.words[P]=b,this.length++),this},l.prototype.isZero=function(){return this.length===1&&this.words[0]===0},l.prototype.cmpn=function(O){var q=O<0;if(this.negative!==0&&!q)return-1;if(this.negative===0&&q)return 1;this.strip();var x;if(this.length>1)x=1;else{q&&(O=-O),A(O<=67108863,"Number is too big");var a=this.words[0]|0;x=a===O?0:a<O?-1:1}return this.negative!==0?-x|0:x},l.prototype.cmp=function(O){if(this.negative!==0&&O.negative===0)return-1;if(this.negative===0&&O.negative!==0)return 1;var q=this.ucmp(O);return this.negative!==0?-q|0:q},l.prototype.ucmp=function(O){if(this.length>O.length)return 1;if(this.length<O.length)return-1;for(var q=0,x=this.length-1;x>=0;x--){var a=this.words[x]|0,b=O.words[x]|0;if(a!==b){a<b?q=-1:a>b&&(q=1);break}}return q},l.prototype.gtn=function(O){return this.cmpn(O)===1},l.prototype.gt=function(O){return this.cmp(O)===1},l.prototype.gten=function(O){return this.cmpn(O)>=0},l.prototype.gte=function(O){return this.cmp(O)>=0},l.prototype.ltn=function(O){return this.cmpn(O)===-1},l.prototype.lt=function(O){return this.cmp(O)===-1},l.prototype.lten=function(O){return this.cmpn(O)<=0},l.prototype.lte=function(O){return this.cmp(O)<=0},l.prototype.eqn=function(O){return this.cmpn(O)===0},l.prototype.eq=function(O){return this.cmp(O)===0},l.red=function(O){return new ae(O)},l.prototype.toRed=function(O){return A(!this.red,"Already a number in reduction context"),A(this.negative===0,"red works only with positives"),O.convertTo(this)._forceRed(O)},l.prototype.fromRed=function(){return A(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},l.prototype._forceRed=function(O){return this.red=O,this},l.prototype.forceRed=function(O){return A(!this.red,"Already a number in reduction context"),this._forceRed(O)},l.prototype.redAdd=function(O){return A(this.red,"redAdd works only with red numbers"),this.red.add(this,O)},l.prototype.redIAdd=function(O){return A(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,O)},l.prototype.redSub=function(O){return A(this.red,"redSub works only with red numbers"),this.red.sub(this,O)},l.prototype.redISub=function(O){return A(this.red,"redISub works only with red numbers"),this.red.isub(this,O)},l.prototype.redShl=function(O){return A(this.red,"redShl works only with red numbers"),this.red.shl(this,O)},l.prototype.redMul=function(O){return A(this.red,"redMul works only with red numbers"),this.red._verify2(this,O),this.red.mul(this,O)},l.prototype.redIMul=function(O){return A(this.red,"redMul works only with red numbers"),this.red._verify2(this,O),this.red.imul(this,O)},l.prototype.redSqr=function(){return A(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},l.prototype.redISqr=function(){return A(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},l.prototype.redSqrt=function(){return A(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},l.prototype.redInvm=function(){return A(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},l.prototype.redNeg=function(){return A(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},l.prototype.redPow=function(O){return A(this.red&&!O.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,O)};var H={k256:null,p224:null,p192:null,p25519:null};function W(te,O){this.name=te,this.p=new l(O,16),this.n=this.p.bitLength(),this.k=new l(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}W.prototype._tmp=function(){var O=new l(null);return O.words=new Array(Math.ceil(this.n/13)),O},W.prototype.ireduce=function(O){var q=O,x;do this.split(q,this.tmp),q=this.imulK(q),q=q.iadd(this.tmp),x=q.bitLength();while(x>this.n);var a=x<this.n?-1:q.ucmp(this.p);return a===0?(q.words[0]=0,q.length=1):a>0?q.isub(this.p):q.strip!==void 0?q.strip():q._strip(),q},W.prototype.split=function(O,q){O.iushrn(this.n,0,q)},W.prototype.imulK=function(O){return O.imul(this.k)};function Y(){W.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}M(Y,W),Y.prototype.split=function(O,q){for(var x=4194303,a=Math.min(O.length,9),b=0;b<a;b++)q.words[b]=O.words[b];if(q.length=a,O.length<=9){O.words[0]=0,O.length=1;return}var P=O.words[9];for(q.words[q.length++]=P&x,b=10;b<O.length;b++){var F=O.words[b]|0;O.words[b-10]=(F&x)<<4|P>>>22,P=F}P>>>=22,O.words[b-10]=P,P===0&&O.length>10?O.length-=10:O.length-=9},Y.prototype.imulK=function(O){O.words[O.length]=0,O.words[O.length+1]=0,O.length+=2;for(var q=0,x=0;x<O.length;x++){var a=O.words[x]|0;q+=a*977,O.words[x]=q&67108863,q=a*64+(q/67108864|0)}return O.words[O.length-1]===0&&(O.length--,O.words[O.length-1]===0&&O.length--),O};function re(){W.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}M(re,W);function ie(){W.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}M(ie,W);function oe(){W.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}M(oe,W),oe.prototype.imulK=function(O){for(var q=0,x=0;x<O.length;x++){var a=(O.words[x]|0)*19+q,b=a&67108863;a>>>=26,O.words[x]=b,q=a}return q!==0&&(O.words[O.length++]=q),O},l._prime=function(O){if(H[O])return H[O];var q;if(O==="k256")q=new Y;else if(O==="p224")q=new re;else if(O==="p192")q=new ie;else if(O==="p25519")q=new oe;else throw new Error("Unknown prime "+O);return H[O]=q,q};function ae(te){if(typeof te=="string"){var O=l._prime(te);this.m=O.p,this.prime=O}else A(te.gtn(1),"modulus must be greater than 1"),this.m=te,this.prime=null}ae.prototype._verify1=function(O){A(O.negative===0,"red works only with positives"),A(O.red,"red works only with red numbers")},ae.prototype._verify2=function(O,q){A((O.negative|q.negative)==0,"red works only with positives"),A(O.red&&O.red===q.red,"red works only with red numbers")},ae.prototype.imod=function(O){return this.prime?this.prime.ireduce(O)._forceRed(this):O.umod(this.m)._forceRed(this)},ae.prototype.neg=function(O){return O.isZero()?O.clone():this.m.sub(O)._forceRed(this)},ae.prototype.add=function(O,q){this._verify2(O,q);var x=O.add(q);return x.cmp(this.m)>=0&&x.isub(this.m),x._forceRed(this)},ae.prototype.iadd=function(O,q){this._verify2(O,q);var x=O.iadd(q);return x.cmp(this.m)>=0&&x.isub(this.m),x},ae.prototype.sub=function(O,q){this._verify2(O,q);var x=O.sub(q);return x.cmpn(0)<0&&x.iadd(this.m),x._forceRed(this)},ae.prototype.isub=function(O,q){this._verify2(O,q);var x=O.isub(q);return x.cmpn(0)<0&&x.iadd(this.m),x},ae.prototype.shl=function(O,q){return this._verify1(O),this.imod(O.ushln(q))},ae.prototype.imul=function(O,q){return this._verify2(O,q),this.imod(O.imul(q))},ae.prototype.mul=function(O,q){return this._verify2(O,q),this.imod(O.mul(q))},ae.prototype.isqr=function(O){return this.imul(O,O.clone())},ae.prototype.sqr=function(O){return this.mul(O,O)},ae.prototype.sqrt=function(O){if(O.isZero())return O.clone();var q=this.m.andln(3);if(A(q%2==1),q===3){var x=this.m.add(new l(1)).iushrn(2);return this.pow(O,x)}for(var a=this.m.subn(1),b=0;!a.isZero()&&a.andln(1)===0;)b++,a.iushrn(1);A(!a.isZero());var P=new l(1).toRed(this),F=P.redNeg(),L=this.m.subn(1).iushrn(1),I=this.m.bitLength();for(I=new l(2*I*I).toRed(this);this.pow(I,L).cmp(F)!==0;)I.redIAdd(F);for(var K=this.pow(I,a),z=this.pow(O,a.addn(1).iushrn(1)),w=this.pow(O,a),j=b;w.cmp(P)!==0;){for(var he=w,_e=0;he.cmp(P)!==0;_e++)he=he.redSqr();A(_e<j);var Re=this.pow(K,new l(1).iushln(j-_e-1));z=z.redMul(Re),K=Re.redSqr(),w=w.redMul(K),j=_e}return z},ae.prototype.invm=function(O){var q=O._invmp(this.m);return q.negative!==0?(q.negative=0,this.imod(q).redNeg()):this.imod(q)},ae.prototype.pow=function(O,q){if(q.isZero())return new l(1).toRed(this);if(q.cmpn(1)===0)return O.clone();var x=4,a=new Array(1<<x);a[0]=new l(1).toRed(this),a[1]=O;for(var b=2;b<a.length;b++)a[b]=this.mul(a[b-1],O);var P=a[0],F=0,L=0,I=q.bitLength()%26;for(I===0&&(I=26),b=q.length-1;b>=0;b--){for(var K=q.words[b],z=I-1;z>=0;z--){var w=K>>z&1;if(P!==a[0]&&(P=this.sqr(P)),w===0&&F===0){L=0;continue}F<<=1,F|=w,L++,!(L!==x&&(b!==0||z!==0))&&(P=this.mul(P,a[F]),L=0,F=0)}I=26}return P},ae.prototype.convertTo=function(O){var q=O.umod(this.m);return q===O?q.clone():q},ae.prototype.convertFrom=function(O){var q=O.clone();return q.red=null,q},l.mont=function(O){return new de(O)};function de(te){ae.call(this,te),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new l(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}M(de,ae),de.prototype.convertTo=function(O){return this.imod(O.ushln(this.shift))},de.prototype.convertFrom=function(O){var q=this.imod(O.mul(this.rinv));return q.red=null,q},de.prototype.imul=function(O,q){if(O.isZero()||q.isZero())return O.words[0]=0,O.length=1,O;var x=O.imul(q),a=x.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),b=x.isub(a).iushrn(this.shift),P=b;return b.cmp(this.m)>=0?P=b.isub(this.m):b.cmpn(0)<0&&(P=b.iadd(this.m)),P._forceRed(this)},de.prototype.mul=function(O,q){if(O.isZero()||q.isZero())return new l(0)._forceRed(this);var x=O.mul(q),a=x.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),b=x.isub(a).iushrn(this.shift),P=b;return b.cmp(this.m)>=0?P=b.isub(this.m):b.cmpn(0)<0&&(P=b.iadd(this.m)),P._forceRed(this)},de.prototype.invm=function(O){var q=this.imod(O._invmp(this.m).mul(this.r2));return q._forceRed(this)}}(g,this)},29931:(g,G,k)=>{var R;g.exports=function(l){return R||(R=new B(null)),R.generate(l)};function B(M){this.rand=M}if(g.exports.Rand=B,B.prototype.generate=function(l){return this._rand(l)},B.prototype._rand=function(l){if(this.rand.getBytes)return this.rand.getBytes(l);for(var o=new Uint8Array(l),d=0;d<o.length;d++)o[d]=this.rand.getByte();return o},typeof self=="object")self.crypto&&self.crypto.getRandomValues?B.prototype._rand=function(l){var o=new Uint8Array(l);return self.crypto.getRandomValues(o),o}:self.msCrypto&&self.msCrypto.getRandomValues?B.prototype._rand=function(l){var o=new Uint8Array(l);return self.msCrypto.getRandomValues(o),o}:typeof window=="object"&&(B.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var A=k(89214);if(typeof A.randomBytes!="function")throw new Error("Not supported");B.prototype._rand=function(l){return A.randomBytes(l)}}catch(M){}},74497:(g,G,k)=>{var R=k(89509).Buffer;function B(f){R.isBuffer(f)||(f=R.from(f));for(var _=f.length/4|0,p=new Array(_),u=0;u<_;u++)p[u]=f.readUInt32BE(u*4);return p}function A(f){for(var _=0;_<f.length;f++)f[_]=0}function M(f,_,p,u,E){for(var h=p[0],m=p[1],y=p[2],C=p[3],D=f[0]^_[0],T=f[1]^_[1],H=f[2]^_[2],W=f[3]^_[3],Y,re,ie,oe,ae=4,de=1;de<E;de++)Y=h[D>>>24]^m[T>>>16&255]^y[H>>>8&255]^C[W&255]^_[ae++],re=h[T>>>24]^m[H>>>16&255]^y[W>>>8&255]^C[D&255]^_[ae++],ie=h[H>>>24]^m[W>>>16&255]^y[D>>>8&255]^C[T&255]^_[ae++],oe=h[W>>>24]^m[D>>>16&255]^y[T>>>8&255]^C[H&255]^_[ae++],D=Y,T=re,H=ie,W=oe;return Y=(u[D>>>24]<<24|u[T>>>16&255]<<16|u[H>>>8&255]<<8|u[W&255])^_[ae++],re=(u[T>>>24]<<24|u[H>>>16&255]<<16|u[W>>>8&255]<<8|u[D&255])^_[ae++],ie=(u[H>>>24]<<24|u[W>>>16&255]<<16|u[D>>>8&255]<<8|u[T&255])^_[ae++],oe=(u[W>>>24]<<24|u[D>>>16&255]<<16|u[T>>>8&255]<<8|u[H&255])^_[ae++],Y=Y>>>0,re=re>>>0,ie=ie>>>0,oe=oe>>>0,[Y,re,ie,oe]}var l=[0,1,2,4,8,16,32,64,128,27,54],o=function(){for(var f=new Array(256),_=0;_<256;_++)_<128?f[_]=_<<1:f[_]=_<<1^283;for(var p=[],u=[],E=[[],[],[],[]],h=[[],[],[],[]],m=0,y=0,C=0;C<256;++C){var D=y^y<<1^y<<2^y<<3^y<<4;D=D>>>8^D&255^99,p[m]=D,u[D]=m;var T=f[m],H=f[T],W=f[H],Y=f[D]*257^D*16843008;E[0][m]=Y<<24|Y>>>8,E[1][m]=Y<<16|Y>>>16,E[2][m]=Y<<8|Y>>>24,E[3][m]=Y,Y=W*16843009^H*65537^T*257^m*16843008,h[0][D]=Y<<24|Y>>>8,h[1][D]=Y<<16|Y>>>16,h[2][D]=Y<<8|Y>>>24,h[3][D]=Y,m===0?m=y=1:(m=T^f[f[f[W^T]]],y^=f[f[y]])}return{SBOX:p,INV_SBOX:u,SUB_MIX:E,INV_SUB_MIX:h}}();function d(f){this._key=B(f),this._reset()}d.blockSize=4*4,d.keySize=256/8,d.prototype.blockSize=d.blockSize,d.prototype.keySize=d.keySize,d.prototype._reset=function(){for(var f=this._key,_=f.length,p=_+6,u=(p+1)*4,E=[],h=0;h<_;h++)E[h]=f[h];for(h=_;h<u;h++){var m=E[h-1];h%_==0?(m=m<<8|m>>>24,m=o.SBOX[m>>>24]<<24|o.SBOX[m>>>16&255]<<16|o.SBOX[m>>>8&255]<<8|o.SBOX[m&255],m^=l[h/_|0]<<24):_>6&&h%_==4&&(m=o.SBOX[m>>>24]<<24|o.SBOX[m>>>16&255]<<16|o.SBOX[m>>>8&255]<<8|o.SBOX[m&255]),E[h]=E[h-_]^m}for(var y=[],C=0;C<u;C++){var D=u-C,T=E[D-(C%4?0:4)];C<4||D<=4?y[C]=T:y[C]=o.INV_SUB_MIX[0][o.SBOX[T>>>24]]^o.INV_SUB_MIX[1][o.SBOX[T>>>16&255]]^o.INV_SUB_MIX[2][o.SBOX[T>>>8&255]]^o.INV_SUB_MIX[3][o.SBOX[T&255]]}this._nRounds=p,this._keySchedule=E,this._invKeySchedule=y},d.prototype.encryptBlockRaw=function(f){return f=B(f),M(f,this._keySchedule,o.SUB_MIX,o.SBOX,this._nRounds)},d.prototype.encryptBlock=function(f){var _=this.encryptBlockRaw(f),p=R.allocUnsafe(16);return p.writeUInt32BE(_[0],0),p.writeUInt32BE(_[1],4),p.writeUInt32BE(_[2],8),p.writeUInt32BE(_[3],12),p},d.prototype.decryptBlock=function(f){f=B(f);var _=f[1];f[1]=f[3],f[3]=_;var p=M(f,this._invKeySchedule,o.INV_SUB_MIX,o.INV_SBOX,this._nRounds),u=R.allocUnsafe(16);return u.writeUInt32BE(p[0],0),u.writeUInt32BE(p[3],4),u.writeUInt32BE(p[2],8),u.writeUInt32BE(p[1],12),u},d.prototype.scrub=function(){A(this._keySchedule),A(this._invKeySchedule),A(this._key)},g.exports.AES=d},62422:(g,G,k)=>{var R=k(74497),B=k(89509).Buffer,A=k(71027),M=k(35717),l=k(83288),o=k(67295),d=k(20685);function f(u,E){var h=0;u.length!==E.length&&h++;for(var m=Math.min(u.length,E.length),y=0;y<m;++y)h+=u[y]^E[y];return h}function _(u,E,h){if(E.length===12)return u._finID=B.concat([E,B.from([0,0,0,1])]),B.concat([E,B.from([0,0,0,2])]);var m=new l(h),y=E.length,C=y%16;m.update(E),C&&(C=16-C,m.update(B.alloc(C,0))),m.update(B.alloc(8,0));var D=y*8,T=B.alloc(8);T.writeUIntBE(D,0,8),m.update(T),u._finID=m.state;var H=B.from(u._finID);return d(H),H}function p(u,E,h,m){A.call(this);var y=B.alloc(4,0);this._cipher=new R.AES(E);var C=this._cipher.encryptBlock(y);this._ghash=new l(C),h=_(this,h,C),this._prev=B.from(h),this._cache=B.allocUnsafe(0),this._secCache=B.allocUnsafe(0),this._decrypt=m,this._alen=0,this._len=0,this._mode=u,this._authTag=null,this._called=!1}M(p,A),p.prototype._update=function(u){if(!this._called&&this._alen){var E=16-this._alen%16;E<16&&(E=B.alloc(E,0),this._ghash.update(E))}this._called=!0;var h=this._mode.encrypt(this,u);return this._decrypt?this._ghash.update(u):this._ghash.update(h),this._len+=u.length,h},p.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var u=o(this._ghash.final(this._alen*8,this._len*8),this._cipher.encryptBlock(this._finID));if(this._decrypt&&f(u,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=u,this._cipher.scrub()},p.prototype.getAuthTag=function(){if(this._decrypt||!B.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},p.prototype.setAuthTag=function(E){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=E},p.prototype.setAAD=function(E){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(E),this._alen+=E.length},g.exports=p},44696:(g,G,k)=>{var R=k(71494),B=k(66193),A=k(44946);function M(){return Object.keys(A)}G.createCipher=G.Cipher=R.createCipher,G.createCipheriv=G.Cipheriv=R.createCipheriv,G.createDecipher=G.Decipher=B.createDecipher,G.createDecipheriv=G.Decipheriv=B.createDecipheriv,G.listCiphers=G.getCiphers=M},66193:(g,G,k)=>{var R=k(62422),B=k(89509).Buffer,A=k(45),M=k(25969),l=k(71027),o=k(74497),d=k(13048),f=k(35717);function _(m,y,C){l.call(this),this._cache=new p,this._last=void 0,this._cipher=new o.AES(y),this._prev=B.from(C),this._mode=m,this._autopadding=!0}f(_,l),_.prototype._update=function(m){this._cache.add(m);for(var y,C,D=[];y=this._cache.get(this._autopadding);)C=this._mode.decrypt(this,y),D.push(C);return B.concat(D)},_.prototype._final=function(){var m=this._cache.flush();if(this._autopadding)return u(this._mode.decrypt(this,m));if(m)throw new Error("data not multiple of block length")},_.prototype.setAutoPadding=function(m){return this._autopadding=!!m,this};function p(){this.cache=B.allocUnsafe(0)}p.prototype.add=function(m){this.cache=B.concat([this.cache,m])},p.prototype.get=function(m){var y;if(m){if(this.cache.length>16)return y=this.cache.slice(0,16),this.cache=this.cache.slice(16),y}else if(this.cache.length>=16)return y=this.cache.slice(0,16),this.cache=this.cache.slice(16),y;return null},p.prototype.flush=function(){if(this.cache.length)return this.cache};function u(m){var y=m[15];if(y<1||y>16)throw new Error("unable to decrypt data");for(var C=-1;++C<y;)if(m[C+(16-y)]!==y)throw new Error("unable to decrypt data");if(y!==16)return m.slice(0,16-y)}function E(m,y,C){var D=A[m.toLowerCase()];if(!D)throw new TypeError("invalid suite type");if(typeof C=="string"&&(C=B.from(C)),D.mode!=="GCM"&&C.length!==D.iv)throw new TypeError("invalid iv length "+C.length);if(typeof y=="string"&&(y=B.from(y)),y.length!==D.key/8)throw new TypeError("invalid key length "+y.length);return D.type==="stream"?new M(D.module,y,C,!0):D.type==="auth"?new R(D.module,y,C,!0):new _(D.module,y,C)}function h(m,y){var C=A[m.toLowerCase()];if(!C)throw new TypeError("invalid suite type");var D=d(y,!1,C.key,C.iv);return E(m,D.key,D.iv)}G.createDecipher=h,G.createDecipheriv=E},71494:(g,G,k)=>{var R=k(45),B=k(62422),A=k(89509).Buffer,M=k(25969),l=k(71027),o=k(74497),d=k(13048),f=k(35717);function _(m,y,C){l.call(this),this._cache=new u,this._cipher=new o.AES(y),this._prev=A.from(C),this._mode=m,this._autopadding=!0}f(_,l),_.prototype._update=function(m){this._cache.add(m);for(var y,C,D=[];y=this._cache.get();)C=this._mode.encrypt(this,y),D.push(C);return A.concat(D)};var p=A.alloc(16,16);_.prototype._final=function(){var m=this._cache.flush();if(this._autopadding)return m=this._mode.encrypt(this,m),this._cipher.scrub(),m;if(!m.equals(p))throw this._cipher.scrub(),new Error("data not multiple of block length")},_.prototype.setAutoPadding=function(m){return this._autopadding=!!m,this};function u(){this.cache=A.allocUnsafe(0)}u.prototype.add=function(m){this.cache=A.concat([this.cache,m])},u.prototype.get=function(){if(this.cache.length>15){var m=this.cache.slice(0,16);return this.cache=this.cache.slice(16),m}return null},u.prototype.flush=function(){for(var m=16-this.cache.length,y=A.allocUnsafe(m),C=-1;++C<m;)y.writeUInt8(m,C);return A.concat([this.cache,y])};function E(m,y,C){var D=R[m.toLowerCase()];if(!D)throw new TypeError("invalid suite type");if(typeof y=="string"&&(y=A.from(y)),y.length!==D.key/8)throw new TypeError("invalid key length "+y.length);if(typeof C=="string"&&(C=A.from(C)),D.mode!=="GCM"&&C.length!==D.iv)throw new TypeError("invalid iv length "+C.length);return D.type==="stream"?new M(D.module,y,C):D.type==="auth"?new B(D.module,y,C):new _(D.module,y,C)}function h(m,y){var C=R[m.toLowerCase()];if(!C)throw new TypeError("invalid suite type");var D=d(y,!1,C.key,C.iv);return E(m,D.key,D.iv)}G.createCipheriv=E,G.createCipher=h},83288:(g,G,k)=>{var R=k(89509).Buffer,B=R.alloc(16,0);function A(o){return[o.readUInt32BE(0),o.readUInt32BE(4),o.readUInt32BE(8),o.readUInt32BE(12)]}function M(o){var d=R.allocUnsafe(16);return d.writeUInt32BE(o[0]>>>0,0),d.writeUInt32BE(o[1]>>>0,4),d.writeUInt32BE(o[2]>>>0,8),d.writeUInt32BE(o[3]>>>0,12),d}function l(o){this.h=o,this.state=R.alloc(16,0),this.cache=R.allocUnsafe(0)}l.prototype.ghash=function(o){for(var d=-1;++d<o.length;)this.state[d]^=o[d];this._multiply()},l.prototype._multiply=function(){for(var o=A(this.h),d=[0,0,0,0],f,_,p,u=-1;++u<128;){for(_=(this.state[~~(u/8)]&1<<7-u%8)!=0,_&&(d[0]^=o[0],d[1]^=o[1],d[2]^=o[2],d[3]^=o[3]),p=(o[3]&1)!=0,f=3;f>0;f--)o[f]=o[f]>>>1|(o[f-1]&1)<<31;o[0]=o[0]>>>1,p&&(o[0]=o[0]^225<<24)}this.state=M(d)},l.prototype.update=function(o){this.cache=R.concat([this.cache,o]);for(var d;this.cache.length>=16;)d=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(d)},l.prototype.final=function(o,d){return this.cache.length&&this.ghash(R.concat([this.cache,B],16)),this.ghash(M([0,o,0,d])),this.state},g.exports=l},20685:g=>{function G(k){for(var R=k.length,B;R--;)if(B=k.readUInt8(R),B===255)k.writeUInt8(0,R);else{B++,k.writeUInt8(B,R);break}}g.exports=G},25292:(g,G,k)=>{var R=k(67295);G.encrypt=function(B,A){var M=R(A,B._prev);return B._prev=B._cipher.encryptBlock(M),B._prev},G.decrypt=function(B,A){var M=B._prev;B._prev=A;var l=B._cipher.decryptBlock(A);return R(l,M)}},86311:(g,G,k)=>{var R=k(89509).Buffer,B=k(67295);function A(M,l,o){var d=l.length,f=B(l,M._cache);return M._cache=M._cache.slice(d),M._prev=R.concat([M._prev,o?l:f]),f}G.encrypt=function(M,l,o){for(var d=R.allocUnsafe(0),f;l.length;)if(M._cache.length===0&&(M._cache=M._cipher.encryptBlock(M._prev),M._prev=R.allocUnsafe(0)),M._cache.length<=l.length)f=M._cache.length,d=R.concat([d,A(M,l.slice(0,f),o)]),l=l.slice(f);else{d=R.concat([d,A(M,l,o)]);break}return d}},21510:(g,G,k)=>{var R=k(89509).Buffer;function B(M,l,o){for(var d,f=-1,_=8,p=0,u,E;++f<_;)d=M._cipher.encryptBlock(M._prev),u=l&1<<7-f?128:0,E=d[0]^u,p+=(E&128)>>f%8,M._prev=A(M._prev,o?u:E);return p}function A(M,l){var o=M.length,d=-1,f=R.allocUnsafe(M.length);for(M=R.concat([M,R.from([l])]);++d<o;)f[d]=M[d]<<1|M[d+1]>>7;return f}G.encrypt=function(M,l,o){for(var d=l.length,f=R.allocUnsafe(d),_=-1;++_<d;)f[_]=B(M,l[_],o);return f}},71964:(g,G,k)=>{var R=k(89509).Buffer;function B(A,M,l){var o=A._cipher.encryptBlock(A._prev),d=o[0]^M;return A._prev=R.concat([A._prev.slice(1),R.from([l?M:d])]),d}G.encrypt=function(A,M,l){for(var o=M.length,d=R.allocUnsafe(o),f=-1;++f<o;)d[f]=B(A,M[f],l);return d}},96009:(g,G,k)=>{var R=k(67295),B=k(89509).Buffer,A=k(20685);function M(o){var d=o._cipher.encryptBlockRaw(o._prev);return A(o._prev),d}var l=16;G.encrypt=function(o,d){var f=Math.ceil(d.length/l),_=o._cache.length;o._cache=B.concat([o._cache,B.allocUnsafe(f*l)]);for(var p=0;p<f;p++){var u=M(o),E=_+p*l;o._cache.writeUInt32BE(u[0],E+0),o._cache.writeUInt32BE(u[1],E+4),o._cache.writeUInt32BE(u[2],E+8),o._cache.writeUInt32BE(u[3],E+12)}var h=o._cache.slice(0,d.length);return o._cache=o._cache.slice(d.length),R(d,h)}},11084:(g,G)=>{G.encrypt=function(k,R){return k._cipher.encryptBlock(R)},G.decrypt=function(k,R){return k._cipher.decryptBlock(R)}},45:(g,G,k)=>{var R={ECB:k(11084),CBC:k(25292),CFB:k(86311),CFB8:k(71964),CFB1:k(21510),OFB:k(18861),CTR:k(96009),GCM:k(96009)},B=k(44946);for(var A in B)B[A].module=R[B[A].mode];g.exports=B},18861:(g,G,k)=>{var R=k(67295);function B(A){return A._prev=A._cipher.encryptBlock(A._prev),A._prev}G.encrypt=function(A,M){for(;A._cache.length<M.length;)A._cache=Buffer.concat([A._cache,B(A)]);var l=A._cache.slice(0,M.length);return A._cache=A._cache.slice(M.length),R(M,l)}},25969:(g,G,k)=>{var R=k(74497),B=k(89509).Buffer,A=k(71027),M=k(35717);function l(o,d,f,_){A.call(this),this._cipher=new R.AES(d),this._prev=B.from(f),this._cache=B.allocUnsafe(0),this._secCache=B.allocUnsafe(0),this._decrypt=_,this._mode=o}M(l,A),l.prototype._update=function(o){return this._mode.encrypt(this,o,this._decrypt)},l.prototype._final=function(){this._cipher.scrub()},g.exports=l},53614:(g,G,k)=>{var R=k(47667),B=k(44696),A=k(45),M=k(99715),l=k(13048);function o(u,E){u=u.toLowerCase();var h,m;if(A[u])h=A[u].key,m=A[u].iv;else if(M[u])h=M[u].key*8,m=M[u].iv;else throw new TypeError("invalid suite type");var y=l(E,!1,h,m);return f(u,y.key,y.iv)}function d(u,E){u=u.toLowerCase();var h,m;if(A[u])h=A[u].key,m=A[u].iv;else if(M[u])h=M[u].key*8,m=M[u].iv;else throw new TypeError("invalid suite type");var y=l(E,!1,h,m);return _(u,y.key,y.iv)}function f(u,E,h){if(u=u.toLowerCase(),A[u])return B.createCipheriv(u,E,h);if(M[u])return new R({key:E,iv:h,mode:u});throw new TypeError("invalid suite type")}function _(u,E,h){if(u=u.toLowerCase(),A[u])return B.createDecipheriv(u,E,h);if(M[u])return new R({key:E,iv:h,mode:u,decrypt:!0});throw new TypeError("invalid suite type")}function p(){return Object.keys(M).concat(B.getCiphers())}G.createCipher=G.Cipher=o,G.createCipheriv=G.Cipheriv=f,G.createDecipher=G.Decipher=d,G.createDecipheriv=G.Decipheriv=_,G.listCiphers=G.getCiphers=p},47667:(g,G,k)=>{var R=k(71027),B=k(15251),A=k(35717),M=k(89509).Buffer,l={"des-ede3-cbc":B.CBC.instantiate(B.EDE),"des-ede3":B.EDE,"des-ede-cbc":B.CBC.instantiate(B.EDE),"des-ede":B.EDE,"des-cbc":B.CBC.instantiate(B.DES),"des-ecb":B.DES};l.des=l["des-cbc"],l.des3=l["des-ede3-cbc"],g.exports=o,A(o,R);function o(d){R.call(this);var f=d.mode.toLowerCase(),_=l[f],p;d.decrypt?p="decrypt":p="encrypt";var u=d.key;M.isBuffer(u)||(u=M.from(u)),(f==="des-ede"||f==="des-ede-cbc")&&(u=M.concat([u,u.slice(0,8)]));var E=d.iv;M.isBuffer(E)||(E=M.from(E)),this._des=_.create({key:u,iv:E,type:p})}o.prototype._update=function(d){return M.from(this._des.update(d))},o.prototype._final=function(){return M.from(this._des.final())}},99715:(g,G)=>{G["des-ecb"]={key:8,iv:0},G["des-cbc"]=G.des={key:8,iv:8},G["des-ede3-cbc"]=G.des3={key:24,iv:8},G["des-ede3"]={key:24,iv:0},G["des-ede-cbc"]={key:16,iv:8},G["des-ede"]={key:16,iv:0}},23663:(g,G,k)=>{var R=k(43982),B=k(61798);function A(o){var d=M(o),f=d.toRed(R.mont(o.modulus)).redPow(new R(o.publicExponent)).fromRed();return{blinder:f,unblinder:d.invm(o.modulus)}}function M(o){var d=o.modulus.byteLength(),f;do f=new R(B(d));while(f.cmp(o.modulus)>=0||!f.umod(o.prime1)||!f.umod(o.prime2));return f}function l(o,d){var f=A(d),_=d.modulus.byteLength(),p=new R(o).mul(f.blinder).umod(d.modulus),u=p.toRed(R.mont(d.prime1)),E=p.toRed(R.mont(d.prime2)),h=d.coefficient,m=d.prime1,y=d.prime2,C=u.redPow(d.exponent1).fromRed(),D=E.redPow(d.exponent2).fromRed(),T=C.isub(D).imul(h).umod(m).imul(y);return D.iadd(T).imul(f.unblinder).umod(d.modulus).toArrayLike(Buffer,"be",_)}l.getr=M,g.exports=l},43982:function(g,G,k){g=k.nmd(g),function(R,B){"use strict";function A(x,a){if(!x)throw new Error(a||"Assertion failed")}function M(x,a){x.super_=a;var b=function(){};b.prototype=a.prototype,x.prototype=new b,x.prototype.constructor=x}function l(x,a,b){if(l.isBN(x))return x;this.negative=0,this.words=null,this.length=0,this.red=null,x!==null&&((a==="le"||a==="be")&&(b=a,a=10),this._init(x||0,a||10,b||"be"))}typeof R=="object"?R.exports=l:B.BN=l,l.BN=l,l.wordSize=26;var o;try{typeof window!="undefined"&&typeof window.Buffer!="undefined"?o=window.Buffer:o=k(71922).Buffer}catch(x){}l.isBN=function(a){return a instanceof l?!0:a!==null&&typeof a=="object"&&a.constructor.wordSize===l.wordSize&&Array.isArray(a.words)},l.max=function(a,b){return a.cmp(b)>0?a:b},l.min=function(a,b){return a.cmp(b)<0?a:b},l.prototype._init=function(a,b,P){if(typeof a=="number")return this._initNumber(a,b,P);if(typeof a=="object")return this._initArray(a,b,P);b==="hex"&&(b=16),A(b===(b|0)&&b>=2&&b<=36),a=a.toString().replace(/\s+/g,"");var F=0;a[0]==="-"&&(F++,this.negative=1),F<a.length&&(b===16?this._parseHex(a,F,P):(this._parseBase(a,b,F),P==="le"&&this._initArray(this.toArray(),b,P)))},l.prototype._initNumber=function(a,b,P){a<0&&(this.negative=1,a=-a),a<67108864?(this.words=[a&67108863],this.length=1):a<4503599627370496?(this.words=[a&67108863,a/67108864&67108863],this.length=2):(A(a<9007199254740992),this.words=[a&67108863,a/67108864&67108863,1],this.length=3),P==="le"&&this._initArray(this.toArray(),b,P)},l.prototype._initArray=function(a,b,P){if(A(typeof a.length=="number"),a.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(a.length/3),this.words=new Array(this.length);for(var F=0;F<this.length;F++)this.words[F]=0;var L,I,K=0;if(P==="be")for(F=a.length-1,L=0;F>=0;F-=3)I=a[F]|a[F-1]<<8|a[F-2]<<16,this.words[L]|=I<<K&67108863,this.words[L+1]=I>>>26-K&67108863,K+=24,K>=26&&(K-=26,L++);else if(P==="le")for(F=0,L=0;F<a.length;F+=3)I=a[F]|a[F+1]<<8|a[F+2]<<16,this.words[L]|=I<<K&67108863,this.words[L+1]=I>>>26-K&67108863,K+=24,K>=26&&(K-=26,L++);return this._strip()};function d(x,a){var b=x.charCodeAt(a);if(b>=48&&b<=57)return b-48;if(b>=65&&b<=70)return b-55;if(b>=97&&b<=102)return b-87;A(!1,"Invalid character in "+x)}function f(x,a,b){var P=d(x,b);return b-1>=a&&(P|=d(x,b-1)<<4),P}l.prototype._parseHex=function(a,b,P){this.length=Math.ceil((a.length-b)/6),this.words=new Array(this.length);for(var F=0;F<this.length;F++)this.words[F]=0;var L=0,I=0,K;if(P==="be")for(F=a.length-1;F>=b;F-=2)K=f(a,b,F)<<L,this.words[I]|=K&67108863,L>=18?(L-=18,I+=1,this.words[I]|=K>>>26):L+=8;else{var z=a.length-b;for(F=z%2==0?b+1:b;F<a.length;F+=2)K=f(a,b,F)<<L,this.words[I]|=K&67108863,L>=18?(L-=18,I+=1,this.words[I]|=K>>>26):L+=8}this._strip()};function _(x,a,b,P){for(var F=0,L=0,I=Math.min(x.length,b),K=a;K<I;K++){var z=x.charCodeAt(K)-48;F*=P,z>=49?L=z-49+10:z>=17?L=z-17+10:L=z,A(z>=0&&L<P,"Invalid character"),F+=L}return F}l.prototype._parseBase=function(a,b,P){this.words=[0],this.length=1;for(var F=0,L=1;L<=67108863;L*=b)F++;F--,L=L/b|0;for(var I=a.length-P,K=I%F,z=Math.min(I,I-K)+P,w=0,j=P;j<z;j+=F)w=_(a,j,j+F,b),this.imuln(L),this.words[0]+w<67108864?this.words[0]+=w:this._iaddn(w);if(K!==0){var he=1;for(w=_(a,j,a.length,b),j=0;j<K;j++)he*=b;this.imuln(he),this.words[0]+w<67108864?this.words[0]+=w:this._iaddn(w)}this._strip()},l.prototype.copy=function(a){a.words=new Array(this.length);for(var b=0;b<this.length;b++)a.words[b]=this.words[b];a.length=this.length,a.negative=this.negative,a.red=this.red};function p(x,a){x.words=a.words,x.length=a.length,x.negative=a.negative,x.red=a.red}if(l.prototype._move=function(a){p(a,this)},l.prototype.clone=function(){var a=new l(null);return this.copy(a),a},l.prototype._expand=function(a){for(;this.length<a;)this.words[this.length++]=0;return this},l.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},l.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol!="undefined"&&typeof Symbol.for=="function")try{l.prototype[Symbol.for("nodejs.util.inspect.custom")]=u}catch(x){l.prototype.inspect=u}else l.prototype.inspect=u;function u(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var E=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],m=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];l.prototype.toString=function(a,b){a=a||10,b=b|0||1;var P;if(a===16||a==="hex"){P="";for(var F=0,L=0,I=0;I<this.length;I++){var K=this.words[I],z=((K<<F|L)&16777215).toString(16);L=K>>>24-F&16777215,L!==0||I!==this.length-1?P=E[6-z.length]+z+P:P=z+P,F+=2,F>=26&&(F-=26,I--)}for(L!==0&&(P=L.toString(16)+P);P.length%b!=0;)P="0"+P;return this.negative!==0&&(P="-"+P),P}if(a===(a|0)&&a>=2&&a<=36){var w=h[a],j=m[a];P="";var he=this.clone();for(he.negative=0;!he.isZero();){var _e=he.modrn(j).toString(a);he=he.idivn(j),he.isZero()?P=_e+P:P=E[w-_e.length]+_e+P}for(this.isZero()&&(P="0"+P);P.length%b!=0;)P="0"+P;return this.negative!==0&&(P="-"+P),P}A(!1,"Base should be between 2 and 36")},l.prototype.toNumber=function(){var a=this.words[0];return this.length===2?a+=this.words[1]*67108864:this.length===3&&this.words[2]===1?a+=4503599627370496+this.words[1]*67108864:this.length>2&&A(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-a:a},l.prototype.toJSON=function(){return this.toString(16,2)},o&&(l.prototype.toBuffer=function(a,b){return this.toArrayLike(o,a,b)}),l.prototype.toArray=function(a,b){return this.toArrayLike(Array,a,b)};var y=function(a,b){return a.allocUnsafe?a.allocUnsafe(b):new a(b)};l.prototype.toArrayLike=function(a,b,P){this._strip();var F=this.byteLength(),L=P||Math.max(1,F);A(F<=L,"byte array longer than desired length"),A(L>0,"Requested array length <= 0");var I=y(a,L),K=b==="le"?"LE":"BE";return this["_toArrayLike"+K](I,F),I},l.prototype._toArrayLikeLE=function(a,b){for(var P=0,F=0,L=0,I=0;L<this.length;L++){var K=this.words[L]<<I|F;a[P++]=K&255,P<a.length&&(a[P++]=K>>8&255),P<a.length&&(a[P++]=K>>16&255),I===6?(P<a.length&&(a[P++]=K>>24&255),F=0,I=0):(F=K>>>24,I+=2)}if(P<a.length)for(a[P++]=F;P<a.length;)a[P++]=0},l.prototype._toArrayLikeBE=function(a,b){for(var P=a.length-1,F=0,L=0,I=0;L<this.length;L++){var K=this.words[L]<<I|F;a[P--]=K&255,P>=0&&(a[P--]=K>>8&255),P>=0&&(a[P--]=K>>16&255),I===6?(P>=0&&(a[P--]=K>>24&255),F=0,I=0):(F=K>>>24,I+=2)}if(P>=0)for(a[P--]=F;P>=0;)a[P--]=0},Math.clz32?l.prototype._countBits=function(a){return 32-Math.clz32(a)}:l.prototype._countBits=function(a){var b=a,P=0;return b>=4096&&(P+=13,b>>>=13),b>=64&&(P+=7,b>>>=7),b>=8&&(P+=4,b>>>=4),b>=2&&(P+=2,b>>>=2),P+b},l.prototype._zeroBits=function(a){if(a===0)return 26;var b=a,P=0;return(b&8191)==0&&(P+=13,b>>>=13),(b&127)==0&&(P+=7,b>>>=7),(b&15)==0&&(P+=4,b>>>=4),(b&3)==0&&(P+=2,b>>>=2),(b&1)==0&&P++,P},l.prototype.bitLength=function(){var a=this.words[this.length-1],b=this._countBits(a);return(this.length-1)*26+b};function C(x){for(var a=new Array(x.bitLength()),b=0;b<a.length;b++){var P=b/26|0,F=b%26;a[b]=x.words[P]>>>F&1}return a}l.prototype.zeroBits=function(){if(this.isZero())return 0;for(var a=0,b=0;b<this.length;b++){var P=this._zeroBits(this.words[b]);if(a+=P,P!==26)break}return a},l.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},l.prototype.toTwos=function(a){return this.negative!==0?this.abs().inotn(a).iaddn(1):this.clone()},l.prototype.fromTwos=function(a){return this.testn(a-1)?this.notn(a).iaddn(1).ineg():this.clone()},l.prototype.isNeg=function(){return this.negative!==0},l.prototype.neg=function(){return this.clone().ineg()},l.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},l.prototype.iuor=function(a){for(;this.length<a.length;)this.words[this.length++]=0;for(var b=0;b<a.length;b++)this.words[b]=this.words[b]|a.words[b];return this._strip()},l.prototype.ior=function(a){return A((this.negative|a.negative)==0),this.iuor(a)},l.prototype.or=function(a){return this.length>a.length?this.clone().ior(a):a.clone().ior(this)},l.prototype.uor=function(a){return this.length>a.length?this.clone().iuor(a):a.clone().iuor(this)},l.prototype.iuand=function(a){var b;this.length>a.length?b=a:b=this;for(var P=0;P<b.length;P++)this.words[P]=this.words[P]&a.words[P];return this.length=b.length,this._strip()},l.prototype.iand=function(a){return A((this.negative|a.negative)==0),this.iuand(a)},l.prototype.and=function(a){return this.length>a.length?this.clone().iand(a):a.clone().iand(this)},l.prototype.uand=function(a){return this.length>a.length?this.clone().iuand(a):a.clone().iuand(this)},l.prototype.iuxor=function(a){var b,P;this.length>a.length?(b=this,P=a):(b=a,P=this);for(var F=0;F<P.length;F++)this.words[F]=b.words[F]^P.words[F];if(this!==b)for(;F<b.length;F++)this.words[F]=b.words[F];return this.length=b.length,this._strip()},l.prototype.ixor=function(a){return A((this.negative|a.negative)==0),this.iuxor(a)},l.prototype.xor=function(a){return this.length>a.length?this.clone().ixor(a):a.clone().ixor(this)},l.prototype.uxor=function(a){return this.length>a.length?this.clone().iuxor(a):a.clone().iuxor(this)},l.prototype.inotn=function(a){A(typeof a=="number"&&a>=0);var b=Math.ceil(a/26)|0,P=a%26;this._expand(b),P>0&&b--;for(var F=0;F<b;F++)this.words[F]=~this.words[F]&67108863;return P>0&&(this.words[F]=~this.words[F]&67108863>>26-P),this._strip()},l.prototype.notn=function(a){return this.clone().inotn(a)},l.prototype.setn=function(a,b){A(typeof a=="number"&&a>=0);var P=a/26|0,F=a%26;return this._expand(P+1),b?this.words[P]=this.words[P]|1<<F:this.words[P]=this.words[P]&~(1<<F),this._strip()},l.prototype.iadd=function(a){var b;if(this.negative!==0&&a.negative===0)return this.negative=0,b=this.isub(a),this.negative^=1,this._normSign();if(this.negative===0&&a.negative!==0)return a.negative=0,b=this.isub(a),a.negative=1,b._normSign();var P,F;this.length>a.length?(P=this,F=a):(P=a,F=this);for(var L=0,I=0;I<F.length;I++)b=(P.words[I]|0)+(F.words[I]|0)+L,this.words[I]=b&67108863,L=b>>>26;for(;L!==0&&I<P.length;I++)b=(P.words[I]|0)+L,this.words[I]=b&67108863,L=b>>>26;if(this.length=P.length,L!==0)this.words[this.length]=L,this.length++;else if(P!==this)for(;I<P.length;I++)this.words[I]=P.words[I];return this},l.prototype.add=function(a){var b;return a.negative!==0&&this.negative===0?(a.negative=0,b=this.sub(a),a.negative^=1,b):a.negative===0&&this.negative!==0?(this.negative=0,b=a.sub(this),this.negative=1,b):this.length>a.length?this.clone().iadd(a):a.clone().iadd(this)},l.prototype.isub=function(a){if(a.negative!==0){a.negative=0;var b=this.iadd(a);return a.negative=1,b._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(a),this.negative=1,this._normSign();var P=this.cmp(a);if(P===0)return this.negative=0,this.length=1,this.words[0]=0,this;var F,L;P>0?(F=this,L=a):(F=a,L=this);for(var I=0,K=0;K<L.length;K++)b=(F.words[K]|0)-(L.words[K]|0)+I,I=b>>26,this.words[K]=b&67108863;for(;I!==0&&K<F.length;K++)b=(F.words[K]|0)+I,I=b>>26,this.words[K]=b&67108863;if(I===0&&K<F.length&&F!==this)for(;K<F.length;K++)this.words[K]=F.words[K];return this.length=Math.max(this.length,K),F!==this&&(this.negative=1),this._strip()},l.prototype.sub=function(a){return this.clone().isub(a)};function D(x,a,b){b.negative=a.negative^x.negative;var P=x.length+a.length|0;b.length=P,P=P-1|0;var F=x.words[0]|0,L=a.words[0]|0,I=F*L,K=I&67108863,z=I/67108864|0;b.words[0]=K;for(var w=1;w<P;w++){for(var j=z>>>26,he=z&67108863,_e=Math.min(w,a.length-1),Re=Math.max(0,w-x.length+1);Re<=_e;Re++){var Ie=w-Re|0;F=x.words[Ie]|0,L=a.words[Re]|0,I=F*L+he,j+=I/67108864|0,he=I&67108863}b.words[w]=he|0,z=j|0}return z!==0?b.words[w]=z|0:b.length--,b._strip()}var T=function(a,b,P){var F=a.words,L=b.words,I=P.words,K=0,z,w,j,he=F[0]|0,_e=he&8191,Re=he>>>13,Ie=F[1]|0,J=Ie&8191,Z=Ie>>>13,fe=F[2]|0,we=fe&8191,Ee=fe>>>13,$=F[3]|0,V=$&8191,le=$>>>13,Se=F[4]|0,De=Se&8191,pe=Se>>>13,He=F[5]|0,Ve=He&8191,qe=He>>>13,Ut=F[6]|0,Ke=Ut&8191,ze=Ut>>>13,Gt=F[7]|0,se=Gt&8191,Q=Gt>>>13,ee=F[8]|0,ue=ee&8191,me=ee>>>13,Ae=F[9]|0,Te=Ae&8191,Ue=Ae>>>13,Rt=L[0]|0,Ne=Rt&8191,Me=Rt>>>13,Ft=L[1]|0,at=Ft&8191,ft=Ft>>>13,sr=L[2]|0,Fe=sr&8191,ht=sr>>>13,vi=L[3]|0,rt=vi&8191,Ge=vi>>>13,ii=L[4]|0,dt=ii&8191,pt=ii>>>13,zt=L[5]|0,mt=zt&8191,Ye=zt>>>13,bi=L[6]|0,et=bi&8191,st=bi>>>13,xt=L[7]|0,ot=xt&8191,lt=xt>>>13,Dr=L[8]|0,$e=Dr&8191,nt=Dr>>>13,$r=L[9]|0,Ct=$r&8191,gt=$r>>>13;P.negative=a.negative^b.negative,P.length=19,z=Math.imul(_e,Ne),w=Math.imul(_e,Me),w=w+Math.imul(Re,Ne)|0,j=Math.imul(Re,Me);var yr=(K+z|0)+((w&8191)<<13)|0;K=(j+(w>>>13)|0)+(yr>>>26)|0,yr&=67108863,z=Math.imul(J,Ne),w=Math.imul(J,Me),w=w+Math.imul(Z,Ne)|0,j=Math.imul(Z,Me),z=z+Math.imul(_e,at)|0,w=w+Math.imul(_e,ft)|0,w=w+Math.imul(Re,at)|0,j=j+Math.imul(Re,ft)|0;var Cr=(K+z|0)+((w&8191)<<13)|0;K=(j+(w>>>13)|0)+(Cr>>>26)|0,Cr&=67108863,z=Math.imul(we,Ne),w=Math.imul(we,Me),w=w+Math.imul(Ee,Ne)|0,j=Math.imul(Ee,Me),z=z+Math.imul(J,at)|0,w=w+Math.imul(J,ft)|0,w=w+Math.imul(Z,at)|0,j=j+Math.imul(Z,ft)|0,z=z+Math.imul(_e,Fe)|0,w=w+Math.imul(_e,ht)|0,w=w+Math.imul(Re,Fe)|0,j=j+Math.imul(Re,ht)|0;var ar=(K+z|0)+((w&8191)<<13)|0;K=(j+(w>>>13)|0)+(ar>>>26)|0,ar&=67108863,z=Math.imul(V,Ne),w=Math.imul(V,Me),w=w+Math.imul(le,Ne)|0,j=Math.imul(le,Me),z=z+Math.imul(we,at)|0,w=w+Math.imul(we,ft)|0,w=w+Math.imul(Ee,at)|0,j=j+Math.imul(Ee,ft)|0,z=z+Math.imul(J,Fe)|0,w=w+Math.imul(J,ht)|0,w=w+Math.imul(Z,Fe)|0,j=j+Math.imul(Z,ht)|0,z=z+Math.imul(_e,rt)|0,w=w+Math.imul(_e,Ge)|0,w=w+Math.imul(Re,rt)|0,j=j+Math.imul(Re,Ge)|0;var It=(K+z|0)+((w&8191)<<13)|0;K=(j+(w>>>13)|0)+(It>>>26)|0,It&=67108863,z=Math.imul(De,Ne),w=Math.imul(De,Me),w=w+Math.imul(pe,Ne)|0,j=Math.imul(pe,Me),z=z+Math.imul(V,at)|0,w=w+Math.imul(V,ft)|0,w=w+Math.imul(le,at)|0,j=j+Math.imul(le,ft)|0,z=z+Math.imul(we,Fe)|0,w=w+Math.imul(we,ht)|0,w=w+Math.imul(Ee,Fe)|0,j=j+Math.imul(Ee,ht)|0,z=z+Math.imul(J,rt)|0,w=w+Math.imul(J,Ge)|0,w=w+Math.imul(Z,rt)|0,j=j+Math.imul(Z,Ge)|0,z=z+Math.imul(_e,dt)|0,w=w+Math.imul(_e,pt)|0,w=w+Math.imul(Re,dt)|0,j=j+Math.imul(Re,pt)|0;var Pt=(K+z|0)+((w&8191)<<13)|0;K=(j+(w>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,z=Math.imul(Ve,Ne),w=Math.imul(Ve,Me),w=w+Math.imul(qe,Ne)|0,j=Math.imul(qe,Me),z=z+Math.imul(De,at)|0,w=w+Math.imul(De,ft)|0,w=w+Math.imul(pe,at)|0,j=j+Math.imul(pe,ft)|0,z=z+Math.imul(V,Fe)|0,w=w+Math.imul(V,ht)|0,w=w+Math.imul(le,Fe)|0,j=j+Math.imul(le,ht)|0,z=z+Math.imul(we,rt)|0,w=w+Math.imul(we,Ge)|0,w=w+Math.imul(Ee,rt)|0,j=j+Math.imul(Ee,Ge)|0,z=z+Math.imul(J,dt)|0,w=w+Math.imul(J,pt)|0,w=w+Math.imul(Z,dt)|0,j=j+Math.imul(Z,pt)|0,z=z+Math.imul(_e,mt)|0,w=w+Math.imul(_e,Ye)|0,w=w+Math.imul(Re,mt)|0,j=j+Math.imul(Re,Ye)|0;var Wt=(K+z|0)+((w&8191)<<13)|0;K=(j+(w>>>13)|0)+(Wt>>>26)|0,Wt&=67108863,z=Math.imul(Ke,Ne),w=Math.imul(Ke,Me),w=w+Math.imul(ze,Ne)|0,j=Math.imul(ze,Me),z=z+Math.imul(Ve,at)|0,w=w+Math.imul(Ve,ft)|0,w=w+Math.imul(qe,at)|0,j=j+Math.imul(qe,ft)|0,z=z+Math.imul(De,Fe)|0,w=w+Math.imul(De,ht)|0,w=w+Math.imul(pe,Fe)|0,j=j+Math.imul(pe,ht)|0,z=z+Math.imul(V,rt)|0,w=w+Math.imul(V,Ge)|0,w=w+Math.imul(le,rt)|0,j=j+Math.imul(le,Ge)|0,z=z+Math.imul(we,dt)|0,w=w+Math.imul(we,pt)|0,w=w+Math.imul(Ee,dt)|0,j=j+Math.imul(Ee,pt)|0,z=z+Math.imul(J,mt)|0,w=w+Math.imul(J,Ye)|0,w=w+Math.imul(Z,mt)|0,j=j+Math.imul(Z,Ye)|0,z=z+Math.imul(_e,et)|0,w=w+Math.imul(_e,st)|0,w=w+Math.imul(Re,et)|0,j=j+Math.imul(Re,st)|0;var ni=(K+z|0)+((w&8191)<<13)|0;K=(j+(w>>>13)|0)+(ni>>>26)|0,ni&=67108863,z=Math.imul(se,Ne),w=Math.imul(se,Me),w=w+Math.imul(Q,Ne)|0,j=Math.imul(Q,Me),z=z+Math.imul(Ke,at)|0,w=w+Math.imul(Ke,ft)|0,w=w+Math.imul(ze,at)|0,j=j+Math.imul(ze,ft)|0,z=z+Math.imul(Ve,Fe)|0,w=w+Math.imul(Ve,ht)|0,w=w+Math.imul(qe,Fe)|0,j=j+Math.imul(qe,ht)|0,z=z+Math.imul(De,rt)|0,w=w+Math.imul(De,Ge)|0,w=w+Math.imul(pe,rt)|0,j=j+Math.imul(pe,Ge)|0,z=z+Math.imul(V,dt)|0,w=w+Math.imul(V,pt)|0,w=w+Math.imul(le,dt)|0,j=j+Math.imul(le,pt)|0,z=z+Math.imul(we,mt)|0,w=w+Math.imul(we,Ye)|0,w=w+Math.imul(Ee,mt)|0,j=j+Math.imul(Ee,Ye)|0,z=z+Math.imul(J,et)|0,w=w+Math.imul(J,st)|0,w=w+Math.imul(Z,et)|0,j=j+Math.imul(Z,st)|0,z=z+Math.imul(_e,ot)|0,w=w+Math.imul(_e,lt)|0,w=w+Math.imul(Re,ot)|0,j=j+Math.imul(Re,lt)|0;var Gr=(K+z|0)+((w&8191)<<13)|0;K=(j+(w>>>13)|0)+(Gr>>>26)|0,Gr&=67108863,z=Math.imul(ue,Ne),w=Math.imul(ue,Me),w=w+Math.imul(me,Ne)|0,j=Math.imul(me,Me),z=z+Math.imul(se,at)|0,w=w+Math.imul(se,ft)|0,w=w+Math.imul(Q,at)|0,j=j+Math.imul(Q,ft)|0,z=z+Math.imul(Ke,Fe)|0,w=w+Math.imul(Ke,ht)|0,w=w+Math.imul(ze,Fe)|0,j=j+Math.imul(ze,ht)|0,z=z+Math.imul(Ve,rt)|0,w=w+Math.imul(Ve,Ge)|0,w=w+Math.imul(qe,rt)|0,j=j+Math.imul(qe,Ge)|0,z=z+Math.imul(De,dt)|0,w=w+Math.imul(De,pt)|0,w=w+Math.imul(pe,dt)|0,j=j+Math.imul(pe,pt)|0,z=z+Math.imul(V,mt)|0,w=w+Math.imul(V,Ye)|0,w=w+Math.imul(le,mt)|0,j=j+Math.imul(le,Ye)|0,z=z+Math.imul(we,et)|0,w=w+Math.imul(we,st)|0,w=w+Math.imul(Ee,et)|0,j=j+Math.imul(Ee,st)|0,z=z+Math.imul(J,ot)|0,w=w+Math.imul(J,lt)|0,w=w+Math.imul(Z,ot)|0,j=j+Math.imul(Z,lt)|0,z=z+Math.imul(_e,$e)|0,w=w+Math.imul(_e,nt)|0,w=w+Math.imul(Re,$e)|0,j=j+Math.imul(Re,nt)|0;var fr=(K+z|0)+((w&8191)<<13)|0;K=(j+(w>>>13)|0)+(fr>>>26)|0,fr&=67108863,z=Math.imul(Te,Ne),w=Math.imul(Te,Me),w=w+Math.imul(Ue,Ne)|0,j=Math.imul(Ue,Me),z=z+Math.imul(ue,at)|0,w=w+Math.imul(ue,ft)|0,w=w+Math.imul(me,at)|0,j=j+Math.imul(me,ft)|0,z=z+Math.imul(se,Fe)|0,w=w+Math.imul(se,ht)|0,w=w+Math.imul(Q,Fe)|0,j=j+Math.imul(Q,ht)|0,z=z+Math.imul(Ke,rt)|0,w=w+Math.imul(Ke,Ge)|0,w=w+Math.imul(ze,rt)|0,j=j+Math.imul(ze,Ge)|0,z=z+Math.imul(Ve,dt)|0,w=w+Math.imul(Ve,pt)|0,w=w+Math.imul(qe,dt)|0,j=j+Math.imul(qe,pt)|0,z=z+Math.imul(De,mt)|0,w=w+Math.imul(De,Ye)|0,w=w+Math.imul(pe,mt)|0,j=j+Math.imul(pe,Ye)|0,z=z+Math.imul(V,et)|0,w=w+Math.imul(V,st)|0,w=w+Math.imul(le,et)|0,j=j+Math.imul(le,st)|0,z=z+Math.imul(we,ot)|0,w=w+Math.imul(we,lt)|0,w=w+Math.imul(Ee,ot)|0,j=j+Math.imul(Ee,lt)|0,z=z+Math.imul(J,$e)|0,w=w+Math.imul(J,nt)|0,w=w+Math.imul(Z,$e)|0,j=j+Math.imul(Z,nt)|0,z=z+Math.imul(_e,Ct)|0,w=w+Math.imul(_e,gt)|0,w=w+Math.imul(Re,Ct)|0,j=j+Math.imul(Re,gt)|0;var si=(K+z|0)+((w&8191)<<13)|0;K=(j+(w>>>13)|0)+(si>>>26)|0,si&=67108863,z=Math.imul(Te,at),w=Math.imul(Te,ft),w=w+Math.imul(Ue,at)|0,j=Math.imul(Ue,ft),z=z+Math.imul(ue,Fe)|0,w=w+Math.imul(ue,ht)|0,w=w+Math.imul(me,Fe)|0,j=j+Math.imul(me,ht)|0,z=z+Math.imul(se,rt)|0,w=w+Math.imul(se,Ge)|0,w=w+Math.imul(Q,rt)|0,j=j+Math.imul(Q,Ge)|0,z=z+Math.imul(Ke,dt)|0,w=w+Math.imul(Ke,pt)|0,w=w+Math.imul(ze,dt)|0,j=j+Math.imul(ze,pt)|0,z=z+Math.imul(Ve,mt)|0,w=w+Math.imul(Ve,Ye)|0,w=w+Math.imul(qe,mt)|0,j=j+Math.imul(qe,Ye)|0,z=z+Math.imul(De,et)|0,w=w+Math.imul(De,st)|0,w=w+Math.imul(pe,et)|0,j=j+Math.imul(pe,st)|0,z=z+Math.imul(V,ot)|0,w=w+Math.imul(V,lt)|0,w=w+Math.imul(le,ot)|0,j=j+Math.imul(le,lt)|0,z=z+Math.imul(we,$e)|0,w=w+Math.imul(we,nt)|0,w=w+Math.imul(Ee,$e)|0,j=j+Math.imul(Ee,nt)|0,z=z+Math.imul(J,Ct)|0,w=w+Math.imul(J,gt)|0,w=w+Math.imul(Z,Ct)|0,j=j+Math.imul(Z,gt)|0;var di=(K+z|0)+((w&8191)<<13)|0;K=(j+(w>>>13)|0)+(di>>>26)|0,di&=67108863,z=Math.imul(Te,Fe),w=Math.imul(Te,ht),w=w+Math.imul(Ue,Fe)|0,j=Math.imul(Ue,ht),z=z+Math.imul(ue,rt)|0,w=w+Math.imul(ue,Ge)|0,w=w+Math.imul(me,rt)|0,j=j+Math.imul(me,Ge)|0,z=z+Math.imul(se,dt)|0,w=w+Math.imul(se,pt)|0,w=w+Math.imul(Q,dt)|0,j=j+Math.imul(Q,pt)|0,z=z+Math.imul(Ke,mt)|0,w=w+Math.imul(Ke,Ye)|0,w=w+Math.imul(ze,mt)|0,j=j+Math.imul(ze,Ye)|0,z=z+Math.imul(Ve,et)|0,w=w+Math.imul(Ve,st)|0,w=w+Math.imul(qe,et)|0,j=j+Math.imul(qe,st)|0,z=z+Math.imul(De,ot)|0,w=w+Math.imul(De,lt)|0,w=w+Math.imul(pe,ot)|0,j=j+Math.imul(pe,lt)|0,z=z+Math.imul(V,$e)|0,w=w+Math.imul(V,nt)|0,w=w+Math.imul(le,$e)|0,j=j+Math.imul(le,nt)|0,z=z+Math.imul(we,Ct)|0,w=w+Math.imul(we,gt)|0,w=w+Math.imul(Ee,Ct)|0,j=j+Math.imul(Ee,gt)|0;var ai=(K+z|0)+((w&8191)<<13)|0;K=(j+(w>>>13)|0)+(ai>>>26)|0,ai&=67108863,z=Math.imul(Te,rt),w=Math.imul(Te,Ge),w=w+Math.imul(Ue,rt)|0,j=Math.imul(Ue,Ge),z=z+Math.imul(ue,dt)|0,w=w+Math.imul(ue,pt)|0,w=w+Math.imul(me,dt)|0,j=j+Math.imul(me,pt)|0,z=z+Math.imul(se,mt)|0,w=w+Math.imul(se,Ye)|0,w=w+Math.imul(Q,mt)|0,j=j+Math.imul(Q,Ye)|0,z=z+Math.imul(Ke,et)|0,w=w+Math.imul(Ke,st)|0,w=w+Math.imul(ze,et)|0,j=j+Math.imul(ze,st)|0,z=z+Math.imul(Ve,ot)|0,w=w+Math.imul(Ve,lt)|0,w=w+Math.imul(qe,ot)|0,j=j+Math.imul(qe,lt)|0,z=z+Math.imul(De,$e)|0,w=w+Math.imul(De,nt)|0,w=w+Math.imul(pe,$e)|0,j=j+Math.imul(pe,nt)|0,z=z+Math.imul(V,Ct)|0,w=w+Math.imul(V,gt)|0,w=w+Math.imul(le,Ct)|0,j=j+Math.imul(le,gt)|0;var jr=(K+z|0)+((w&8191)<<13)|0;K=(j+(w>>>13)|0)+(jr>>>26)|0,jr&=67108863,z=Math.imul(Te,dt),w=Math.imul(Te,pt),w=w+Math.imul(Ue,dt)|0,j=Math.imul(Ue,pt),z=z+Math.imul(ue,mt)|0,w=w+Math.imul(ue,Ye)|0,w=w+Math.imul(me,mt)|0,j=j+Math.imul(me,Ye)|0,z=z+Math.imul(se,et)|0,w=w+Math.imul(se,st)|0,w=w+Math.imul(Q,et)|0,j=j+Math.imul(Q,st)|0,z=z+Math.imul(Ke,ot)|0,w=w+Math.imul(Ke,lt)|0,w=w+Math.imul(ze,ot)|0,j=j+Math.imul(ze,lt)|0,z=z+Math.imul(Ve,$e)|0,w=w+Math.imul(Ve,nt)|0,w=w+Math.imul(qe,$e)|0,j=j+Math.imul(qe,nt)|0,z=z+Math.imul(De,Ct)|0,w=w+Math.imul(De,gt)|0,w=w+Math.imul(pe,Ct)|0,j=j+Math.imul(pe,gt)|0;var zr=(K+z|0)+((w&8191)<<13)|0;K=(j+(w>>>13)|0)+(zr>>>26)|0,zr&=67108863,z=Math.imul(Te,mt),w=Math.imul(Te,Ye),w=w+Math.imul(Ue,mt)|0,j=Math.imul(Ue,Ye),z=z+Math.imul(ue,et)|0,w=w+Math.imul(ue,st)|0,w=w+Math.imul(me,et)|0,j=j+Math.imul(me,st)|0,z=z+Math.imul(se,ot)|0,w=w+Math.imul(se,lt)|0,w=w+Math.imul(Q,ot)|0,j=j+Math.imul(Q,lt)|0,z=z+Math.imul(Ke,$e)|0,w=w+Math.imul(Ke,nt)|0,w=w+Math.imul(ze,$e)|0,j=j+Math.imul(ze,nt)|0,z=z+Math.imul(Ve,Ct)|0,w=w+Math.imul(Ve,gt)|0,w=w+Math.imul(qe,Ct)|0,j=j+Math.imul(qe,gt)|0;var Wr=(K+z|0)+((w&8191)<<13)|0;K=(j+(w>>>13)|0)+(Wr>>>26)|0,Wr&=67108863,z=Math.imul(Te,et),w=Math.imul(Te,st),w=w+Math.imul(Ue,et)|0,j=Math.imul(Ue,st),z=z+Math.imul(ue,ot)|0,w=w+Math.imul(ue,lt)|0,w=w+Math.imul(me,ot)|0,j=j+Math.imul(me,lt)|0,z=z+Math.imul(se,$e)|0,w=w+Math.imul(se,nt)|0,w=w+Math.imul(Q,$e)|0,j=j+Math.imul(Q,nt)|0,z=z+Math.imul(Ke,Ct)|0,w=w+Math.imul(Ke,gt)|0,w=w+Math.imul(ze,Ct)|0,j=j+Math.imul(ze,gt)|0;var Kr=(K+z|0)+((w&8191)<<13)|0;K=(j+(w>>>13)|0)+(Kr>>>26)|0,Kr&=67108863,z=Math.imul(Te,ot),w=Math.imul(Te,lt),w=w+Math.imul(Ue,ot)|0,j=Math.imul(Ue,lt),z=z+Math.imul(ue,$e)|0,w=w+Math.imul(ue,nt)|0,w=w+Math.imul(me,$e)|0,j=j+Math.imul(me,nt)|0,z=z+Math.imul(se,Ct)|0,w=w+Math.imul(se,gt)|0,w=w+Math.imul(Q,Ct)|0,j=j+Math.imul(Q,gt)|0;var xi=(K+z|0)+((w&8191)<<13)|0;K=(j+(w>>>13)|0)+(xi>>>26)|0,xi&=67108863,z=Math.imul(Te,$e),w=Math.imul(Te,nt),w=w+Math.imul(Ue,$e)|0,j=Math.imul(Ue,nt),z=z+Math.imul(ue,Ct)|0,w=w+Math.imul(ue,gt)|0,w=w+Math.imul(me,Ct)|0,j=j+Math.imul(me,gt)|0;var Ti=(K+z|0)+((w&8191)<<13)|0;K=(j+(w>>>13)|0)+(Ti>>>26)|0,Ti&=67108863,z=Math.imul(Te,Ct),w=Math.imul(Te,gt),w=w+Math.imul(Ue,Ct)|0,j=Math.imul(Ue,gt);var Xi=(K+z|0)+((w&8191)<<13)|0;return K=(j+(w>>>13)|0)+(Xi>>>26)|0,Xi&=67108863,I[0]=yr,I[1]=Cr,I[2]=ar,I[3]=It,I[4]=Pt,I[5]=Wt,I[6]=ni,I[7]=Gr,I[8]=fr,I[9]=si,I[10]=di,I[11]=ai,I[12]=jr,I[13]=zr,I[14]=Wr,I[15]=Kr,I[16]=xi,I[17]=Ti,I[18]=Xi,K!==0&&(I[19]=K,P.length++),P};Math.imul||(T=D);function H(x,a,b){b.negative=a.negative^x.negative,b.length=x.length+a.length;for(var P=0,F=0,L=0;L<b.length-1;L++){var I=F;F=0;for(var K=P&67108863,z=Math.min(L,a.length-1),w=Math.max(0,L-x.length+1);w<=z;w++){var j=L-w,he=x.words[j]|0,_e=a.words[w]|0,Re=he*_e,Ie=Re&67108863;I=I+(Re/67108864|0)|0,Ie=Ie+K|0,K=Ie&67108863,I=I+(Ie>>>26)|0,F+=I>>>26,I&=67108863}b.words[L]=K,P=I,I=F}return P!==0?b.words[L]=P:b.length--,b._strip()}function W(x,a,b){return H(x,a,b)}l.prototype.mulTo=function(a,b){var P,F=this.length+a.length;return this.length===10&&a.length===10?P=T(this,a,b):F<63?P=D(this,a,b):F<1024?P=H(this,a,b):P=W(this,a,b),P};function Y(x,a){this.x=x,this.y=a}Y.prototype.makeRBT=function(a){for(var b=new Array(a),P=l.prototype._countBits(a)-1,F=0;F<a;F++)b[F]=this.revBin(F,P,a);return b},Y.prototype.revBin=function(a,b,P){if(a===0||a===P-1)return a;for(var F=0,L=0;L<b;L++)F|=(a&1)<<b-L-1,a>>=1;return F},Y.prototype.permute=function(a,b,P,F,L,I){for(var K=0;K<I;K++)F[K]=b[a[K]],L[K]=P[a[K]]},Y.prototype.transform=function(a,b,P,F,L,I){this.permute(I,a,b,P,F,L);for(var K=1;K<L;K<<=1)for(var z=K<<1,w=Math.cos(2*Math.PI/z),j=Math.sin(2*Math.PI/z),he=0;he<L;he+=z)for(var _e=w,Re=j,Ie=0;Ie<K;Ie++){var J=P[he+Ie],Z=F[he+Ie],fe=P[he+Ie+K],we=F[he+Ie+K],Ee=_e*fe-Re*we;we=_e*we+Re*fe,fe=Ee,P[he+Ie]=J+fe,F[he+Ie]=Z+we,P[he+Ie+K]=J-fe,F[he+Ie+K]=Z-we,Ie!==z&&(Ee=w*_e-j*Re,Re=w*Re+j*_e,_e=Ee)}},Y.prototype.guessLen13b=function(a,b){var P=Math.max(b,a)|1,F=P&1,L=0;for(P=P/2|0;P;P=P>>>1)L++;return 1<<L+1+F},Y.prototype.conjugate=function(a,b,P){if(!(P<=1))for(var F=0;F<P/2;F++){var L=a[F];a[F]=a[P-F-1],a[P-F-1]=L,L=b[F],b[F]=-b[P-F-1],b[P-F-1]=-L}},Y.prototype.normalize13b=function(a,b){for(var P=0,F=0;F<b/2;F++){var L=Math.round(a[2*F+1]/b)*8192+Math.round(a[2*F]/b)+P;a[F]=L&67108863,L<67108864?P=0:P=L/67108864|0}return a},Y.prototype.convert13b=function(a,b,P,F){for(var L=0,I=0;I<b;I++)L=L+(a[I]|0),P[2*I]=L&8191,L=L>>>13,P[2*I+1]=L&8191,L=L>>>13;for(I=2*b;I<F;++I)P[I]=0;A(L===0),A((L&~8191)==0)},Y.prototype.stub=function(a){for(var b=new Array(a),P=0;P<a;P++)b[P]=0;return b},Y.prototype.mulp=function(a,b,P){var F=2*this.guessLen13b(a.length,b.length),L=this.makeRBT(F),I=this.stub(F),K=new Array(F),z=new Array(F),w=new Array(F),j=new Array(F),he=new Array(F),_e=new Array(F),Re=P.words;Re.length=F,this.convert13b(a.words,a.length,K,F),this.convert13b(b.words,b.length,j,F),this.transform(K,I,z,w,F,L),this.transform(j,I,he,_e,F,L);for(var Ie=0;Ie<F;Ie++){var J=z[Ie]*he[Ie]-w[Ie]*_e[Ie];w[Ie]=z[Ie]*_e[Ie]+w[Ie]*he[Ie],z[Ie]=J}return this.conjugate(z,w,F),this.transform(z,w,Re,I,F,L),this.conjugate(Re,I,F),this.normalize13b(Re,F),P.negative=a.negative^b.negative,P.length=a.length+b.length,P._strip()},l.prototype.mul=function(a){var b=new l(null);return b.words=new Array(this.length+a.length),this.mulTo(a,b)},l.prototype.mulf=function(a){var b=new l(null);return b.words=new Array(this.length+a.length),W(this,a,b)},l.prototype.imul=function(a){return this.clone().mulTo(a,this)},l.prototype.imuln=function(a){var b=a<0;b&&(a=-a),A(typeof a=="number"),A(a<67108864);for(var P=0,F=0;F<this.length;F++){var L=(this.words[F]|0)*a,I=(L&67108863)+(P&67108863);P>>=26,P+=L/67108864|0,P+=I>>>26,this.words[F]=I&67108863}return P!==0&&(this.words[F]=P,this.length++),b?this.ineg():this},l.prototype.muln=function(a){return this.clone().imuln(a)},l.prototype.sqr=function(){return this.mul(this)},l.prototype.isqr=function(){return this.imul(this.clone())},l.prototype.pow=function(a){var b=C(a);if(b.length===0)return new l(1);for(var P=this,F=0;F<b.length&&b[F]===0;F++,P=P.sqr());if(++F<b.length)for(var L=P.sqr();F<b.length;F++,L=L.sqr())b[F]!==0&&(P=P.mul(L));return P},l.prototype.iushln=function(a){A(typeof a=="number"&&a>=0);var b=a%26,P=(a-b)/26,F=67108863>>>26-b<<26-b,L;if(b!==0){var I=0;for(L=0;L<this.length;L++){var K=this.words[L]&F,z=(this.words[L]|0)-K<<b;this.words[L]=z|I,I=K>>>26-b}I&&(this.words[L]=I,this.length++)}if(P!==0){for(L=this.length-1;L>=0;L--)this.words[L+P]=this.words[L];for(L=0;L<P;L++)this.words[L]=0;this.length+=P}return this._strip()},l.prototype.ishln=function(a){return A(this.negative===0),this.iushln(a)},l.prototype.iushrn=function(a,b,P){A(typeof a=="number"&&a>=0);var F;b?F=(b-b%26)/26:F=0;var L=a%26,I=Math.min((a-L)/26,this.length),K=67108863^67108863>>>L<<L,z=P;if(F-=I,F=Math.max(0,F),z){for(var w=0;w<I;w++)z.words[w]=this.words[w];z.length=I}if(I!==0)if(this.length>I)for(this.length-=I,w=0;w<this.length;w++)this.words[w]=this.words[w+I];else this.words[0]=0,this.length=1;var j=0;for(w=this.length-1;w>=0&&(j!==0||w>=F);w--){var he=this.words[w]|0;this.words[w]=j<<26-L|he>>>L,j=he&K}return z&&j!==0&&(z.words[z.length++]=j),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},l.prototype.ishrn=function(a,b,P){return A(this.negative===0),this.iushrn(a,b,P)},l.prototype.shln=function(a){return this.clone().ishln(a)},l.prototype.ushln=function(a){return this.clone().iushln(a)},l.prototype.shrn=function(a){return this.clone().ishrn(a)},l.prototype.ushrn=function(a){return this.clone().iushrn(a)},l.prototype.testn=function(a){A(typeof a=="number"&&a>=0);var b=a%26,P=(a-b)/26,F=1<<b;if(this.length<=P)return!1;var L=this.words[P];return!!(L&F)},l.prototype.imaskn=function(a){A(typeof a=="number"&&a>=0);var b=a%26,P=(a-b)/26;if(A(this.negative===0,"imaskn works only with positive numbers"),this.length<=P)return this;if(b!==0&&P++,this.length=Math.min(P,this.length),b!==0){var F=67108863^67108863>>>b<<b;this.words[this.length-1]&=F}return this._strip()},l.prototype.maskn=function(a){return this.clone().imaskn(a)},l.prototype.iaddn=function(a){return A(typeof a=="number"),A(a<67108864),a<0?this.isubn(-a):this.negative!==0?this.length===1&&(this.words[0]|0)<=a?(this.words[0]=a-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(a),this.negative=1,this):this._iaddn(a)},l.prototype._iaddn=function(a){this.words[0]+=a;for(var b=0;b<this.length&&this.words[b]>=67108864;b++)this.words[b]-=67108864,b===this.length-1?this.words[b+1]=1:this.words[b+1]++;return this.length=Math.max(this.length,b+1),this},l.prototype.isubn=function(a){if(A(typeof a=="number"),A(a<67108864),a<0)return this.iaddn(-a);if(this.negative!==0)return this.negative=0,this.iaddn(a),this.negative=1,this;if(this.words[0]-=a,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var b=0;b<this.length&&this.words[b]<0;b++)this.words[b]+=67108864,this.words[b+1]-=1;return this._strip()},l.prototype.addn=function(a){return this.clone().iaddn(a)},l.prototype.subn=function(a){return this.clone().isubn(a)},l.prototype.iabs=function(){return this.negative=0,this},l.prototype.abs=function(){return this.clone().iabs()},l.prototype._ishlnsubmul=function(a,b,P){var F=a.length+P,L;this._expand(F);var I,K=0;for(L=0;L<a.length;L++){I=(this.words[L+P]|0)+K;var z=(a.words[L]|0)*b;I-=z&67108863,K=(I>>26)-(z/67108864|0),this.words[L+P]=I&67108863}for(;L<this.length-P;L++)I=(this.words[L+P]|0)+K,K=I>>26,this.words[L+P]=I&67108863;if(K===0)return this._strip();for(A(K===-1),K=0,L=0;L<this.length;L++)I=-(this.words[L]|0)+K,K=I>>26,this.words[L]=I&67108863;return this.negative=1,this._strip()},l.prototype._wordDiv=function(a,b){var P=this.length-a.length,F=this.clone(),L=a,I=L.words[L.length-1]|0,K=this._countBits(I);P=26-K,P!==0&&(L=L.ushln(P),F.iushln(P),I=L.words[L.length-1]|0);var z=F.length-L.length,w;if(b!=="mod"){w=new l(null),w.length=z+1,w.words=new Array(w.length);for(var j=0;j<w.length;j++)w.words[j]=0}var he=F.clone()._ishlnsubmul(L,1,z);he.negative===0&&(F=he,w&&(w.words[z]=1));for(var _e=z-1;_e>=0;_e--){var Re=(F.words[L.length+_e]|0)*67108864+(F.words[L.length+_e-1]|0);for(Re=Math.min(Re/I|0,67108863),F._ishlnsubmul(L,Re,_e);F.negative!==0;)Re--,F.negative=0,F._ishlnsubmul(L,1,_e),F.isZero()||(F.negative^=1);w&&(w.words[_e]=Re)}return w&&w._strip(),F._strip(),b!=="div"&&P!==0&&F.iushrn(P),{div:w||null,mod:F}},l.prototype.divmod=function(a,b,P){if(A(!a.isZero()),this.isZero())return{div:new l(0),mod:new l(0)};var F,L,I;return this.negative!==0&&a.negative===0?(I=this.neg().divmod(a,b),b!=="mod"&&(F=I.div.neg()),b!=="div"&&(L=I.mod.neg(),P&&L.negative!==0&&L.iadd(a)),{div:F,mod:L}):this.negative===0&&a.negative!==0?(I=this.divmod(a.neg(),b),b!=="mod"&&(F=I.div.neg()),{div:F,mod:I.mod}):(this.negative&a.negative)!=0?(I=this.neg().divmod(a.neg(),b),b!=="div"&&(L=I.mod.neg(),P&&L.negative!==0&&L.isub(a)),{div:I.div,mod:L}):a.length>this.length||this.cmp(a)<0?{div:new l(0),mod:this}:a.length===1?b==="div"?{div:this.divn(a.words[0]),mod:null}:b==="mod"?{div:null,mod:new l(this.modrn(a.words[0]))}:{div:this.divn(a.words[0]),mod:new l(this.modrn(a.words[0]))}:this._wordDiv(a,b)},l.prototype.div=function(a){return this.divmod(a,"div",!1).div},l.prototype.mod=function(a){return this.divmod(a,"mod",!1).mod},l.prototype.umod=function(a){return this.divmod(a,"mod",!0).mod},l.prototype.divRound=function(a){var b=this.divmod(a);if(b.mod.isZero())return b.div;var P=b.div.negative!==0?b.mod.isub(a):b.mod,F=a.ushrn(1),L=a.andln(1),I=P.cmp(F);return I<0||L===1&&I===0?b.div:b.div.negative!==0?b.div.isubn(1):b.div.iaddn(1)},l.prototype.modrn=function(a){var b=a<0;b&&(a=-a),A(a<=67108863);for(var P=(1<<26)%a,F=0,L=this.length-1;L>=0;L--)F=(P*F+(this.words[L]|0))%a;return b?-F:F},l.prototype.modn=function(a){return this.modrn(a)},l.prototype.idivn=function(a){var b=a<0;b&&(a=-a),A(a<=67108863);for(var P=0,F=this.length-1;F>=0;F--){var L=(this.words[F]|0)+P*67108864;this.words[F]=L/a|0,P=L%a}return this._strip(),b?this.ineg():this},l.prototype.divn=function(a){return this.clone().idivn(a)},l.prototype.egcd=function(a){A(a.negative===0),A(!a.isZero());var b=this,P=a.clone();b.negative!==0?b=b.umod(a):b=b.clone();for(var F=new l(1),L=new l(0),I=new l(0),K=new l(1),z=0;b.isEven()&&P.isEven();)b.iushrn(1),P.iushrn(1),++z;for(var w=P.clone(),j=b.clone();!b.isZero();){for(var he=0,_e=1;(b.words[0]&_e)==0&&he<26;++he,_e<<=1);if(he>0)for(b.iushrn(he);he-- >0;)(F.isOdd()||L.isOdd())&&(F.iadd(w),L.isub(j)),F.iushrn(1),L.iushrn(1);for(var Re=0,Ie=1;(P.words[0]&Ie)==0&&Re<26;++Re,Ie<<=1);if(Re>0)for(P.iushrn(Re);Re-- >0;)(I.isOdd()||K.isOdd())&&(I.iadd(w),K.isub(j)),I.iushrn(1),K.iushrn(1);b.cmp(P)>=0?(b.isub(P),F.isub(I),L.isub(K)):(P.isub(b),I.isub(F),K.isub(L))}return{a:I,b:K,gcd:P.iushln(z)}},l.prototype._invmp=function(a){A(a.negative===0),A(!a.isZero());var b=this,P=a.clone();b.negative!==0?b=b.umod(a):b=b.clone();for(var F=new l(1),L=new l(0),I=P.clone();b.cmpn(1)>0&&P.cmpn(1)>0;){for(var K=0,z=1;(b.words[0]&z)==0&&K<26;++K,z<<=1);if(K>0)for(b.iushrn(K);K-- >0;)F.isOdd()&&F.iadd(I),F.iushrn(1);for(var w=0,j=1;(P.words[0]&j)==0&&w<26;++w,j<<=1);if(w>0)for(P.iushrn(w);w-- >0;)L.isOdd()&&L.iadd(I),L.iushrn(1);b.cmp(P)>=0?(b.isub(P),F.isub(L)):(P.isub(b),L.isub(F))}var he;return b.cmpn(1)===0?he=F:he=L,he.cmpn(0)<0&&he.iadd(a),he},l.prototype.gcd=function(a){if(this.isZero())return a.abs();if(a.isZero())return this.abs();var b=this.clone(),P=a.clone();b.negative=0,P.negative=0;for(var F=0;b.isEven()&&P.isEven();F++)b.iushrn(1),P.iushrn(1);do{for(;b.isEven();)b.iushrn(1);for(;P.isEven();)P.iushrn(1);var L=b.cmp(P);if(L<0){var I=b;b=P,P=I}else if(L===0||P.cmpn(1)===0)break;b.isub(P)}while(!0);return P.iushln(F)},l.prototype.invm=function(a){return this.egcd(a).a.umod(a)},l.prototype.isEven=function(){return(this.words[0]&1)==0},l.prototype.isOdd=function(){return(this.words[0]&1)==1},l.prototype.andln=function(a){return this.words[0]&a},l.prototype.bincn=function(a){A(typeof a=="number");var b=a%26,P=(a-b)/26,F=1<<b;if(this.length<=P)return this._expand(P+1),this.words[P]|=F,this;for(var L=F,I=P;L!==0&&I<this.length;I++){var K=this.words[I]|0;K+=L,L=K>>>26,K&=67108863,this.words[I]=K}return L!==0&&(this.words[I]=L,this.length++),this},l.prototype.isZero=function(){return this.length===1&&this.words[0]===0},l.prototype.cmpn=function(a){var b=a<0;if(this.negative!==0&&!b)return-1;if(this.negative===0&&b)return 1;this._strip();var P;if(this.length>1)P=1;else{b&&(a=-a),A(a<=67108863,"Number is too big");var F=this.words[0]|0;P=F===a?0:F<a?-1:1}return this.negative!==0?-P|0:P},l.prototype.cmp=function(a){if(this.negative!==0&&a.negative===0)return-1;if(this.negative===0&&a.negative!==0)return 1;var b=this.ucmp(a);return this.negative!==0?-b|0:b},l.prototype.ucmp=function(a){if(this.length>a.length)return 1;if(this.length<a.length)return-1;for(var b=0,P=this.length-1;P>=0;P--){var F=this.words[P]|0,L=a.words[P]|0;if(F!==L){F<L?b=-1:F>L&&(b=1);break}}return b},l.prototype.gtn=function(a){return this.cmpn(a)===1},l.prototype.gt=function(a){return this.cmp(a)===1},l.prototype.gten=function(a){return this.cmpn(a)>=0},l.prototype.gte=function(a){return this.cmp(a)>=0},l.prototype.ltn=function(a){return this.cmpn(a)===-1},l.prototype.lt=function(a){return this.cmp(a)===-1},l.prototype.lten=function(a){return this.cmpn(a)<=0},l.prototype.lte=function(a){return this.cmp(a)<=0},l.prototype.eqn=function(a){return this.cmpn(a)===0},l.prototype.eq=function(a){return this.cmp(a)===0},l.red=function(a){return new O(a)},l.prototype.toRed=function(a){return A(!this.red,"Already a number in reduction context"),A(this.negative===0,"red works only with positives"),a.convertTo(this)._forceRed(a)},l.prototype.fromRed=function(){return A(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},l.prototype._forceRed=function(a){return this.red=a,this},l.prototype.forceRed=function(a){return A(!this.red,"Already a number in reduction context"),this._forceRed(a)},l.prototype.redAdd=function(a){return A(this.red,"redAdd works only with red numbers"),this.red.add(this,a)},l.prototype.redIAdd=function(a){return A(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,a)},l.prototype.redSub=function(a){return A(this.red,"redSub works only with red numbers"),this.red.sub(this,a)},l.prototype.redISub=function(a){return A(this.red,"redISub works only with red numbers"),this.red.isub(this,a)},l.prototype.redShl=function(a){return A(this.red,"redShl works only with red numbers"),this.red.shl(this,a)},l.prototype.redMul=function(a){return A(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.mul(this,a)},l.prototype.redIMul=function(a){return A(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.imul(this,a)},l.prototype.redSqr=function(){return A(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},l.prototype.redISqr=function(){return A(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},l.prototype.redSqrt=function(){return A(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},l.prototype.redInvm=function(){return A(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},l.prototype.redNeg=function(){return A(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},l.prototype.redPow=function(a){return A(this.red&&!a.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,a)};var re={k256:null,p224:null,p192:null,p25519:null};function ie(x,a){this.name=x,this.p=new l(a,16),this.n=this.p.bitLength(),this.k=new l(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}ie.prototype._tmp=function(){var a=new l(null);return a.words=new Array(Math.ceil(this.n/13)),a},ie.prototype.ireduce=function(a){var b=a,P;do this.split(b,this.tmp),b=this.imulK(b),b=b.iadd(this.tmp),P=b.bitLength();while(P>this.n);var F=P<this.n?-1:b.ucmp(this.p);return F===0?(b.words[0]=0,b.length=1):F>0?b.isub(this.p):b.strip!==void 0?b.strip():b._strip(),b},ie.prototype.split=function(a,b){a.iushrn(this.n,0,b)},ie.prototype.imulK=function(a){return a.imul(this.k)};function oe(){ie.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}M(oe,ie),oe.prototype.split=function(a,b){for(var P=4194303,F=Math.min(a.length,9),L=0;L<F;L++)b.words[L]=a.words[L];if(b.length=F,a.length<=9){a.words[0]=0,a.length=1;return}var I=a.words[9];for(b.words[b.length++]=I&P,L=10;L<a.length;L++){var K=a.words[L]|0;a.words[L-10]=(K&P)<<4|I>>>22,I=K}I>>>=22,a.words[L-10]=I,I===0&&a.length>10?a.length-=10:a.length-=9},oe.prototype.imulK=function(a){a.words[a.length]=0,a.words[a.length+1]=0,a.length+=2;for(var b=0,P=0;P<a.length;P++){var F=a.words[P]|0;b+=F*977,a.words[P]=b&67108863,b=F*64+(b/67108864|0)}return a.words[a.length-1]===0&&(a.length--,a.words[a.length-1]===0&&a.length--),a};function ae(){ie.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}M(ae,ie);function de(){ie.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}M(de,ie);function te(){ie.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}M(te,ie),te.prototype.imulK=function(a){for(var b=0,P=0;P<a.length;P++){var F=(a.words[P]|0)*19+b,L=F&67108863;F>>>=26,a.words[P]=L,b=F}return b!==0&&(a.words[a.length++]=b),a},l._prime=function(a){if(re[a])return re[a];var b;if(a==="k256")b=new oe;else if(a==="p224")b=new ae;else if(a==="p192")b=new de;else if(a==="p25519")b=new te;else throw new Error("Unknown prime "+a);return re[a]=b,b};function O(x){if(typeof x=="string"){var a=l._prime(x);this.m=a.p,this.prime=a}else A(x.gtn(1),"modulus must be greater than 1"),this.m=x,this.prime=null}O.prototype._verify1=function(a){A(a.negative===0,"red works only with positives"),A(a.red,"red works only with red numbers")},O.prototype._verify2=function(a,b){A((a.negative|b.negative)==0,"red works only with positives"),A(a.red&&a.red===b.red,"red works only with red numbers")},O.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):(p(a,a.umod(this.m)._forceRed(this)),a)},O.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},O.prototype.add=function(a,b){this._verify2(a,b);var P=a.add(b);return P.cmp(this.m)>=0&&P.isub(this.m),P._forceRed(this)},O.prototype.iadd=function(a,b){this._verify2(a,b);var P=a.iadd(b);return P.cmp(this.m)>=0&&P.isub(this.m),P},O.prototype.sub=function(a,b){this._verify2(a,b);var P=a.sub(b);return P.cmpn(0)<0&&P.iadd(this.m),P._forceRed(this)},O.prototype.isub=function(a,b){this._verify2(a,b);var P=a.isub(b);return P.cmpn(0)<0&&P.iadd(this.m),P},O.prototype.shl=function(a,b){return this._verify1(a),this.imod(a.ushln(b))},O.prototype.imul=function(a,b){return this._verify2(a,b),this.imod(a.imul(b))},O.prototype.mul=function(a,b){return this._verify2(a,b),this.imod(a.mul(b))},O.prototype.isqr=function(a){return this.imul(a,a.clone())},O.prototype.sqr=function(a){return this.mul(a,a)},O.prototype.sqrt=function(a){if(a.isZero())return a.clone();var b=this.m.andln(3);if(A(b%2==1),b===3){var P=this.m.add(new l(1)).iushrn(2);return this.pow(a,P)}for(var F=this.m.subn(1),L=0;!F.isZero()&&F.andln(1)===0;)L++,F.iushrn(1);A(!F.isZero());var I=new l(1).toRed(this),K=I.redNeg(),z=this.m.subn(1).iushrn(1),w=this.m.bitLength();for(w=new l(2*w*w).toRed(this);this.pow(w,z).cmp(K)!==0;)w.redIAdd(K);for(var j=this.pow(w,F),he=this.pow(a,F.addn(1).iushrn(1)),_e=this.pow(a,F),Re=L;_e.cmp(I)!==0;){for(var Ie=_e,J=0;Ie.cmp(I)!==0;J++)Ie=Ie.redSqr();A(J<Re);var Z=this.pow(j,new l(1).iushln(Re-J-1));he=he.redMul(Z),j=Z.redSqr(),_e=_e.redMul(j),Re=J}return he},O.prototype.invm=function(a){var b=a._invmp(this.m);return b.negative!==0?(b.negative=0,this.imod(b).redNeg()):this.imod(b)},O.prototype.pow=function(a,b){if(b.isZero())return new l(1).toRed(this);if(b.cmpn(1)===0)return a.clone();var P=4,F=new Array(1<<P);F[0]=new l(1).toRed(this),F[1]=a;for(var L=2;L<F.length;L++)F[L]=this.mul(F[L-1],a);var I=F[0],K=0,z=0,w=b.bitLength()%26;for(w===0&&(w=26),L=b.length-1;L>=0;L--){for(var j=b.words[L],he=w-1;he>=0;he--){var _e=j>>he&1;if(I!==F[0]&&(I=this.sqr(I)),_e===0&&K===0){z=0;continue}K<<=1,K|=_e,z++,!(z!==P&&(L!==0||he!==0))&&(I=this.mul(I,F[K]),z=0,K=0)}w=26}return I},O.prototype.convertTo=function(a){var b=a.umod(this.m);return b===a?b.clone():b},O.prototype.convertFrom=function(a){var b=a.clone();return b.red=null,b},l.mont=function(a){return new q(a)};function q(x){O.call(this,x),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new l(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}M(q,O),q.prototype.convertTo=function(a){return this.imod(a.ushln(this.shift))},q.prototype.convertFrom=function(a){var b=this.imod(a.mul(this.rinv));return b.red=null,b},q.prototype.imul=function(a,b){if(a.isZero()||b.isZero())return a.words[0]=0,a.length=1,a;var P=a.imul(b),F=P.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),L=P.isub(F).iushrn(this.shift),I=L;return L.cmp(this.m)>=0?I=L.isub(this.m):L.cmpn(0)<0&&(I=L.iadd(this.m)),I._forceRed(this)},q.prototype.mul=function(a,b){if(a.isZero()||b.isZero())return new l(0)._forceRed(this);var P=a.mul(b),F=P.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),L=P.isub(F).iushrn(this.shift),I=L;return L.cmp(this.m)>=0?I=L.isub(this.m):L.cmpn(0)<0&&(I=L.iadd(this.m)),I._forceRed(this)},q.prototype.invm=function(a){var b=this.imod(a._invmp(this.m).mul(this.r2));return b._forceRed(this)}}(g,this)},56042:(g,G,k)=>{g.exports=k(75207)},64743:(g,G,k)=>{var R=k(89509).Buffer,B=k(23482),A=k(23872),M=k(35717),l=k(82957),o=k(47753),d=k(75207);Object.keys(d).forEach(function(E){d[E].id=R.from(d[E].id,"hex"),d[E.toLowerCase()]=d[E]});function f(E){A.Writable.call(this);var h=d[E];if(!h)throw new Error("Unknown message digest");this._hashType=h.hash,this._hash=B(h.hash),this._tag=h.id,this._signType=h.sign}M(f,A.Writable),f.prototype._write=function(h,m,y){this._hash.update(h),y()},f.prototype.update=function(h,m){return typeof h=="string"&&(h=R.from(h,m)),this._hash.update(h),this},f.prototype.sign=function(h,m){this.end();var y=this._hash.digest(),C=l(y,h,this._hashType,this._signType,this._tag);return m?C.toString(m):C};function _(E){A.Writable.call(this);var h=d[E];if(!h)throw new Error("Unknown message digest");this._hash=B(h.hash),this._tag=h.id,this._signType=h.sign}M(_,A.Writable),_.prototype._write=function(h,m,y){this._hash.update(h),y()},_.prototype.update=function(h,m){return typeof h=="string"&&(h=R.from(h,m)),this._hash.update(h),this},_.prototype.verify=function(h,m,y){typeof m=="string"&&(m=R.from(m,y)),this.end();var C=this._hash.digest();return o(m,C,h,this._signType,this._tag)};function p(E){return new f(E)}function u(E){return new _(E)}g.exports={Sign:p,Verify:u,createSign:p,createVerify:u}},82957:(g,G,k)=>{var R=k(89509).Buffer,B=k(58355),A=k(23663),M=k(86266).ec,l=k(58815),o=k(70980),d=k(1308);function f(D,T,H,W,Y){var re=o(T);if(re.curve){if(W!=="ecdsa"&&W!=="ecdsa/rsa")throw new Error("wrong private key type");return _(D,re)}else if(re.type==="dsa"){if(W!=="dsa")throw new Error("wrong private key type");return p(D,re,H)}else if(W!=="rsa"&&W!=="ecdsa/rsa")throw new Error("wrong private key type");D=R.concat([Y,D]);for(var ie=re.modulus.byteLength(),oe=[0,1];D.length+oe.length+1<ie;)oe.push(255);oe.push(0);for(var ae=-1;++ae<D.length;)oe.push(D[ae]);var de=A(oe,re);return de}function _(D,T){var H=d[T.curve.join(".")];if(!H)throw new Error("unknown curve "+T.curve.join("."));var W=new M(H),Y=W.keyFromPrivate(T.privateKey),re=Y.sign(D);return R.from(re.toDER())}function p(D,T,H){for(var W=T.params.priv_key,Y=T.params.p,re=T.params.q,ie=T.params.g,oe=new l(0),ae,de=h(D,re).mod(re),te=!1,O=E(W,re,D,H);te===!1;)ae=y(re,O,H),oe=C(ie,ae,Y,re),te=ae.invm(re).imul(de.add(W.mul(oe))).mod(re),te.cmpn(0)===0&&(te=!1,oe=new l(0));return u(oe,te)}function u(D,T){D=D.toArray(),T=T.toArray(),D[0]&128&&(D=[0].concat(D)),T[0]&128&&(T=[0].concat(T));var H=D.length+T.length+4,W=[48,H,2,D.length];return W=W.concat(D,[2,T.length],T),R.from(W)}function E(D,T,H,W){if(D=R.from(D.toArray()),D.length<T.byteLength()){var Y=R.alloc(T.byteLength()-D.length);D=R.concat([Y,D])}var re=H.length,ie=m(H,T),oe=R.alloc(re);oe.fill(1);var ae=R.alloc(re);return ae=B(W,ae).update(oe).update(R.from([0])).update(D).update(ie).digest(),oe=B(W,ae).update(oe).digest(),ae=B(W,ae).update(oe).update(R.from([1])).update(D).update(ie).digest(),oe=B(W,ae).update(oe).digest(),{k:ae,v:oe}}function h(D,T){var H=new l(D),W=(D.length<<3)-T.bitLength();return W>0&&H.ishrn(W),H}function m(D,T){D=h(D,T),D=D.mod(T);var H=R.from(D.toArray());if(H.length<T.byteLength()){var W=R.alloc(T.byteLength()-H.length);H=R.concat([W,H])}return H}function y(D,T,H){var W,Y;do{for(W=R.alloc(0);W.length*8<D.bitLength();)T.v=B(H,T.k).update(T.v).digest(),W=R.concat([W,T.v]);Y=h(W,D),T.k=B(H,T.k).update(T.v).update(R.from([0])).digest(),T.v=B(H,T.k).update(T.v).digest()}while(Y.cmp(D)!==-1);return Y}function C(D,T,H,W){return D.toRed(l.mont(H)).redPow(T).fromRed().mod(W)}g.exports=f,g.exports.getKey=E,g.exports.makeKey=y},47753:(g,G,k)=>{var R=k(89509).Buffer,B=k(58815),A=k(86266).ec,M=k(70980),l=k(1308);function o(p,u,E,h,m){var y=M(E);if(y.type==="ec"){if(h!=="ecdsa"&&h!=="ecdsa/rsa")throw new Error("wrong public key type");return d(p,u,y)}else if(y.type==="dsa"){if(h!=="dsa")throw new Error("wrong public key type");return f(p,u,y)}else if(h!=="rsa"&&h!=="ecdsa/rsa")throw new Error("wrong public key type");u=R.concat([m,u]);for(var C=y.modulus.byteLength(),D=[1],T=0;u.length+D.length+2<C;)D.push(255),T++;D.push(0);for(var H=-1;++H<u.length;)D.push(u[H]);D=R.from(D);var W=B.mont(y.modulus);p=new B(p).toRed(W),p=p.redPow(new B(y.publicExponent)),p=R.from(p.fromRed().toArray());var Y=T<8?1:0;for(C=Math.min(p.length,D.length),p.length!==D.length&&(Y=1),H=-1;++H<C;)Y|=p[H]^D[H];return Y===0}function d(p,u,E){var h=l[E.data.algorithm.curve.join(".")];if(!h)throw new Error("unknown curve "+E.data.algorithm.curve.join("."));var m=new A(h),y=E.data.subjectPrivateKey.data;return m.verify(u,p,y)}function f(p,u,E){var h=E.data.p,m=E.data.q,y=E.data.g,C=E.data.pub_key,D=M.signature.decode(p,"der"),T=D.s,H=D.r;_(T,m),_(H,m);var W=B.mont(h),Y=T.invm(m),re=y.toRed(W).redPow(new B(u).mul(Y).mod(m)).fromRed().mul(C.toRed(W).redPow(H.mul(Y).mod(m)).fromRed()).mod(h).mod(m);return re.cmp(H)===0}function _(p,u){if(p.cmpn(0)<=0)throw new Error("invalid sig");if(p.cmp(u)>=u)throw new Error("invalid sig")}g.exports=o},58815:function(g,G,k){g=k.nmd(g),function(R,B){"use strict";function A(x,a){if(!x)throw new Error(a||"Assertion failed")}function M(x,a){x.super_=a;var b=function(){};b.prototype=a.prototype,x.prototype=new b,x.prototype.constructor=x}function l(x,a,b){if(l.isBN(x))return x;this.negative=0,this.words=null,this.length=0,this.red=null,x!==null&&((a==="le"||a==="be")&&(b=a,a=10),this._init(x||0,a||10,b||"be"))}typeof R=="object"?R.exports=l:B.BN=l,l.BN=l,l.wordSize=26;var o;try{typeof window!="undefined"&&typeof window.Buffer!="undefined"?o=window.Buffer:o=k(2363).Buffer}catch(x){}l.isBN=function(a){return a instanceof l?!0:a!==null&&typeof a=="object"&&a.constructor.wordSize===l.wordSize&&Array.isArray(a.words)},l.max=function(a,b){return a.cmp(b)>0?a:b},l.min=function(a,b){return a.cmp(b)<0?a:b},l.prototype._init=function(a,b,P){if(typeof a=="number")return this._initNumber(a,b,P);if(typeof a=="object")return this._initArray(a,b,P);b==="hex"&&(b=16),A(b===(b|0)&&b>=2&&b<=36),a=a.toString().replace(/\s+/g,"");var F=0;a[0]==="-"&&(F++,this.negative=1),F<a.length&&(b===16?this._parseHex(a,F,P):(this._parseBase(a,b,F),P==="le"&&this._initArray(this.toArray(),b,P)))},l.prototype._initNumber=function(a,b,P){a<0&&(this.negative=1,a=-a),a<67108864?(this.words=[a&67108863],this.length=1):a<4503599627370496?(this.words=[a&67108863,a/67108864&67108863],this.length=2):(A(a<9007199254740992),this.words=[a&67108863,a/67108864&67108863,1],this.length=3),P==="le"&&this._initArray(this.toArray(),b,P)},l.prototype._initArray=function(a,b,P){if(A(typeof a.length=="number"),a.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(a.length/3),this.words=new Array(this.length);for(var F=0;F<this.length;F++)this.words[F]=0;var L,I,K=0;if(P==="be")for(F=a.length-1,L=0;F>=0;F-=3)I=a[F]|a[F-1]<<8|a[F-2]<<16,this.words[L]|=I<<K&67108863,this.words[L+1]=I>>>26-K&67108863,K+=24,K>=26&&(K-=26,L++);else if(P==="le")for(F=0,L=0;F<a.length;F+=3)I=a[F]|a[F+1]<<8|a[F+2]<<16,this.words[L]|=I<<K&67108863,this.words[L+1]=I>>>26-K&67108863,K+=24,K>=26&&(K-=26,L++);return this._strip()};function d(x,a){var b=x.charCodeAt(a);if(b>=48&&b<=57)return b-48;if(b>=65&&b<=70)return b-55;if(b>=97&&b<=102)return b-87;A(!1,"Invalid character in "+x)}function f(x,a,b){var P=d(x,b);return b-1>=a&&(P|=d(x,b-1)<<4),P}l.prototype._parseHex=function(a,b,P){this.length=Math.ceil((a.length-b)/6),this.words=new Array(this.length);for(var F=0;F<this.length;F++)this.words[F]=0;var L=0,I=0,K;if(P==="be")for(F=a.length-1;F>=b;F-=2)K=f(a,b,F)<<L,this.words[I]|=K&67108863,L>=18?(L-=18,I+=1,this.words[I]|=K>>>26):L+=8;else{var z=a.length-b;for(F=z%2==0?b+1:b;F<a.length;F+=2)K=f(a,b,F)<<L,this.words[I]|=K&67108863,L>=18?(L-=18,I+=1,this.words[I]|=K>>>26):L+=8}this._strip()};function _(x,a,b,P){for(var F=0,L=0,I=Math.min(x.length,b),K=a;K<I;K++){var z=x.charCodeAt(K)-48;F*=P,z>=49?L=z-49+10:z>=17?L=z-17+10:L=z,A(z>=0&&L<P,"Invalid character"),F+=L}return F}l.prototype._parseBase=function(a,b,P){this.words=[0],this.length=1;for(var F=0,L=1;L<=67108863;L*=b)F++;F--,L=L/b|0;for(var I=a.length-P,K=I%F,z=Math.min(I,I-K)+P,w=0,j=P;j<z;j+=F)w=_(a,j,j+F,b),this.imuln(L),this.words[0]+w<67108864?this.words[0]+=w:this._iaddn(w);if(K!==0){var he=1;for(w=_(a,j,a.length,b),j=0;j<K;j++)he*=b;this.imuln(he),this.words[0]+w<67108864?this.words[0]+=w:this._iaddn(w)}this._strip()},l.prototype.copy=function(a){a.words=new Array(this.length);for(var b=0;b<this.length;b++)a.words[b]=this.words[b];a.length=this.length,a.negative=this.negative,a.red=this.red};function p(x,a){x.words=a.words,x.length=a.length,x.negative=a.negative,x.red=a.red}if(l.prototype._move=function(a){p(a,this)},l.prototype.clone=function(){var a=new l(null);return this.copy(a),a},l.prototype._expand=function(a){for(;this.length<a;)this.words[this.length++]=0;return this},l.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},l.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol!="undefined"&&typeof Symbol.for=="function")try{l.prototype[Symbol.for("nodejs.util.inspect.custom")]=u}catch(x){l.prototype.inspect=u}else l.prototype.inspect=u;function u(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var E=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],m=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];l.prototype.toString=function(a,b){a=a||10,b=b|0||1;var P;if(a===16||a==="hex"){P="";for(var F=0,L=0,I=0;I<this.length;I++){var K=this.words[I],z=((K<<F|L)&16777215).toString(16);L=K>>>24-F&16777215,L!==0||I!==this.length-1?P=E[6-z.length]+z+P:P=z+P,F+=2,F>=26&&(F-=26,I--)}for(L!==0&&(P=L.toString(16)+P);P.length%b!=0;)P="0"+P;return this.negative!==0&&(P="-"+P),P}if(a===(a|0)&&a>=2&&a<=36){var w=h[a],j=m[a];P="";var he=this.clone();for(he.negative=0;!he.isZero();){var _e=he.modrn(j).toString(a);he=he.idivn(j),he.isZero()?P=_e+P:P=E[w-_e.length]+_e+P}for(this.isZero()&&(P="0"+P);P.length%b!=0;)P="0"+P;return this.negative!==0&&(P="-"+P),P}A(!1,"Base should be between 2 and 36")},l.prototype.toNumber=function(){var a=this.words[0];return this.length===2?a+=this.words[1]*67108864:this.length===3&&this.words[2]===1?a+=4503599627370496+this.words[1]*67108864:this.length>2&&A(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-a:a},l.prototype.toJSON=function(){return this.toString(16,2)},o&&(l.prototype.toBuffer=function(a,b){return this.toArrayLike(o,a,b)}),l.prototype.toArray=function(a,b){return this.toArrayLike(Array,a,b)};var y=function(a,b){return a.allocUnsafe?a.allocUnsafe(b):new a(b)};l.prototype.toArrayLike=function(a,b,P){this._strip();var F=this.byteLength(),L=P||Math.max(1,F);A(F<=L,"byte array longer than desired length"),A(L>0,"Requested array length <= 0");var I=y(a,L),K=b==="le"?"LE":"BE";return this["_toArrayLike"+K](I,F),I},l.prototype._toArrayLikeLE=function(a,b){for(var P=0,F=0,L=0,I=0;L<this.length;L++){var K=this.words[L]<<I|F;a[P++]=K&255,P<a.length&&(a[P++]=K>>8&255),P<a.length&&(a[P++]=K>>16&255),I===6?(P<a.length&&(a[P++]=K>>24&255),F=0,I=0):(F=K>>>24,I+=2)}if(P<a.length)for(a[P++]=F;P<a.length;)a[P++]=0},l.prototype._toArrayLikeBE=function(a,b){for(var P=a.length-1,F=0,L=0,I=0;L<this.length;L++){var K=this.words[L]<<I|F;a[P--]=K&255,P>=0&&(a[P--]=K>>8&255),P>=0&&(a[P--]=K>>16&255),I===6?(P>=0&&(a[P--]=K>>24&255),F=0,I=0):(F=K>>>24,I+=2)}if(P>=0)for(a[P--]=F;P>=0;)a[P--]=0},Math.clz32?l.prototype._countBits=function(a){return 32-Math.clz32(a)}:l.prototype._countBits=function(a){var b=a,P=0;return b>=4096&&(P+=13,b>>>=13),b>=64&&(P+=7,b>>>=7),b>=8&&(P+=4,b>>>=4),b>=2&&(P+=2,b>>>=2),P+b},l.prototype._zeroBits=function(a){if(a===0)return 26;var b=a,P=0;return(b&8191)==0&&(P+=13,b>>>=13),(b&127)==0&&(P+=7,b>>>=7),(b&15)==0&&(P+=4,b>>>=4),(b&3)==0&&(P+=2,b>>>=2),(b&1)==0&&P++,P},l.prototype.bitLength=function(){var a=this.words[this.length-1],b=this._countBits(a);return(this.length-1)*26+b};function C(x){for(var a=new Array(x.bitLength()),b=0;b<a.length;b++){var P=b/26|0,F=b%26;a[b]=x.words[P]>>>F&1}return a}l.prototype.zeroBits=function(){if(this.isZero())return 0;for(var a=0,b=0;b<this.length;b++){var P=this._zeroBits(this.words[b]);if(a+=P,P!==26)break}return a},l.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},l.prototype.toTwos=function(a){return this.negative!==0?this.abs().inotn(a).iaddn(1):this.clone()},l.prototype.fromTwos=function(a){return this.testn(a-1)?this.notn(a).iaddn(1).ineg():this.clone()},l.prototype.isNeg=function(){return this.negative!==0},l.prototype.neg=function(){return this.clone().ineg()},l.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},l.prototype.iuor=function(a){for(;this.length<a.length;)this.words[this.length++]=0;for(var b=0;b<a.length;b++)this.words[b]=this.words[b]|a.words[b];return this._strip()},l.prototype.ior=function(a){return A((this.negative|a.negative)==0),this.iuor(a)},l.prototype.or=function(a){return this.length>a.length?this.clone().ior(a):a.clone().ior(this)},l.prototype.uor=function(a){return this.length>a.length?this.clone().iuor(a):a.clone().iuor(this)},l.prototype.iuand=function(a){var b;this.length>a.length?b=a:b=this;for(var P=0;P<b.length;P++)this.words[P]=this.words[P]&a.words[P];return this.length=b.length,this._strip()},l.prototype.iand=function(a){return A((this.negative|a.negative)==0),this.iuand(a)},l.prototype.and=function(a){return this.length>a.length?this.clone().iand(a):a.clone().iand(this)},l.prototype.uand=function(a){return this.length>a.length?this.clone().iuand(a):a.clone().iuand(this)},l.prototype.iuxor=function(a){var b,P;this.length>a.length?(b=this,P=a):(b=a,P=this);for(var F=0;F<P.length;F++)this.words[F]=b.words[F]^P.words[F];if(this!==b)for(;F<b.length;F++)this.words[F]=b.words[F];return this.length=b.length,this._strip()},l.prototype.ixor=function(a){return A((this.negative|a.negative)==0),this.iuxor(a)},l.prototype.xor=function(a){return this.length>a.length?this.clone().ixor(a):a.clone().ixor(this)},l.prototype.uxor=function(a){return this.length>a.length?this.clone().iuxor(a):a.clone().iuxor(this)},l.prototype.inotn=function(a){A(typeof a=="number"&&a>=0);var b=Math.ceil(a/26)|0,P=a%26;this._expand(b),P>0&&b--;for(var F=0;F<b;F++)this.words[F]=~this.words[F]&67108863;return P>0&&(this.words[F]=~this.words[F]&67108863>>26-P),this._strip()},l.prototype.notn=function(a){return this.clone().inotn(a)},l.prototype.setn=function(a,b){A(typeof a=="number"&&a>=0);var P=a/26|0,F=a%26;return this._expand(P+1),b?this.words[P]=this.words[P]|1<<F:this.words[P]=this.words[P]&~(1<<F),this._strip()},l.prototype.iadd=function(a){var b;if(this.negative!==0&&a.negative===0)return this.negative=0,b=this.isub(a),this.negative^=1,this._normSign();if(this.negative===0&&a.negative!==0)return a.negative=0,b=this.isub(a),a.negative=1,b._normSign();var P,F;this.length>a.length?(P=this,F=a):(P=a,F=this);for(var L=0,I=0;I<F.length;I++)b=(P.words[I]|0)+(F.words[I]|0)+L,this.words[I]=b&67108863,L=b>>>26;for(;L!==0&&I<P.length;I++)b=(P.words[I]|0)+L,this.words[I]=b&67108863,L=b>>>26;if(this.length=P.length,L!==0)this.words[this.length]=L,this.length++;else if(P!==this)for(;I<P.length;I++)this.words[I]=P.words[I];return this},l.prototype.add=function(a){var b;return a.negative!==0&&this.negative===0?(a.negative=0,b=this.sub(a),a.negative^=1,b):a.negative===0&&this.negative!==0?(this.negative=0,b=a.sub(this),this.negative=1,b):this.length>a.length?this.clone().iadd(a):a.clone().iadd(this)},l.prototype.isub=function(a){if(a.negative!==0){a.negative=0;var b=this.iadd(a);return a.negative=1,b._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(a),this.negative=1,this._normSign();var P=this.cmp(a);if(P===0)return this.negative=0,this.length=1,this.words[0]=0,this;var F,L;P>0?(F=this,L=a):(F=a,L=this);for(var I=0,K=0;K<L.length;K++)b=(F.words[K]|0)-(L.words[K]|0)+I,I=b>>26,this.words[K]=b&67108863;for(;I!==0&&K<F.length;K++)b=(F.words[K]|0)+I,I=b>>26,this.words[K]=b&67108863;if(I===0&&K<F.length&&F!==this)for(;K<F.length;K++)this.words[K]=F.words[K];return this.length=Math.max(this.length,K),F!==this&&(this.negative=1),this._strip()},l.prototype.sub=function(a){return this.clone().isub(a)};function D(x,a,b){b.negative=a.negative^x.negative;var P=x.length+a.length|0;b.length=P,P=P-1|0;var F=x.words[0]|0,L=a.words[0]|0,I=F*L,K=I&67108863,z=I/67108864|0;b.words[0]=K;for(var w=1;w<P;w++){for(var j=z>>>26,he=z&67108863,_e=Math.min(w,a.length-1),Re=Math.max(0,w-x.length+1);Re<=_e;Re++){var Ie=w-Re|0;F=x.words[Ie]|0,L=a.words[Re]|0,I=F*L+he,j+=I/67108864|0,he=I&67108863}b.words[w]=he|0,z=j|0}return z!==0?b.words[w]=z|0:b.length--,b._strip()}var T=function(a,b,P){var F=a.words,L=b.words,I=P.words,K=0,z,w,j,he=F[0]|0,_e=he&8191,Re=he>>>13,Ie=F[1]|0,J=Ie&8191,Z=Ie>>>13,fe=F[2]|0,we=fe&8191,Ee=fe>>>13,$=F[3]|0,V=$&8191,le=$>>>13,Se=F[4]|0,De=Se&8191,pe=Se>>>13,He=F[5]|0,Ve=He&8191,qe=He>>>13,Ut=F[6]|0,Ke=Ut&8191,ze=Ut>>>13,Gt=F[7]|0,se=Gt&8191,Q=Gt>>>13,ee=F[8]|0,ue=ee&8191,me=ee>>>13,Ae=F[9]|0,Te=Ae&8191,Ue=Ae>>>13,Rt=L[0]|0,Ne=Rt&8191,Me=Rt>>>13,Ft=L[1]|0,at=Ft&8191,ft=Ft>>>13,sr=L[2]|0,Fe=sr&8191,ht=sr>>>13,vi=L[3]|0,rt=vi&8191,Ge=vi>>>13,ii=L[4]|0,dt=ii&8191,pt=ii>>>13,zt=L[5]|0,mt=zt&8191,Ye=zt>>>13,bi=L[6]|0,et=bi&8191,st=bi>>>13,xt=L[7]|0,ot=xt&8191,lt=xt>>>13,Dr=L[8]|0,$e=Dr&8191,nt=Dr>>>13,$r=L[9]|0,Ct=$r&8191,gt=$r>>>13;P.negative=a.negative^b.negative,P.length=19,z=Math.imul(_e,Ne),w=Math.imul(_e,Me),w=w+Math.imul(Re,Ne)|0,j=Math.imul(Re,Me);var yr=(K+z|0)+((w&8191)<<13)|0;K=(j+(w>>>13)|0)+(yr>>>26)|0,yr&=67108863,z=Math.imul(J,Ne),w=Math.imul(J,Me),w=w+Math.imul(Z,Ne)|0,j=Math.imul(Z,Me),z=z+Math.imul(_e,at)|0,w=w+Math.imul(_e,ft)|0,w=w+Math.imul(Re,at)|0,j=j+Math.imul(Re,ft)|0;var Cr=(K+z|0)+((w&8191)<<13)|0;K=(j+(w>>>13)|0)+(Cr>>>26)|0,Cr&=67108863,z=Math.imul(we,Ne),w=Math.imul(we,Me),w=w+Math.imul(Ee,Ne)|0,j=Math.imul(Ee,Me),z=z+Math.imul(J,at)|0,w=w+Math.imul(J,ft)|0,w=w+Math.imul(Z,at)|0,j=j+Math.imul(Z,ft)|0,z=z+Math.imul(_e,Fe)|0,w=w+Math.imul(_e,ht)|0,w=w+Math.imul(Re,Fe)|0,j=j+Math.imul(Re,ht)|0;var ar=(K+z|0)+((w&8191)<<13)|0;K=(j+(w>>>13)|0)+(ar>>>26)|0,ar&=67108863,z=Math.imul(V,Ne),w=Math.imul(V,Me),w=w+Math.imul(le,Ne)|0,j=Math.imul(le,Me),z=z+Math.imul(we,at)|0,w=w+Math.imul(we,ft)|0,w=w+Math.imul(Ee,at)|0,j=j+Math.imul(Ee,ft)|0,z=z+Math.imul(J,Fe)|0,w=w+Math.imul(J,ht)|0,w=w+Math.imul(Z,Fe)|0,j=j+Math.imul(Z,ht)|0,z=z+Math.imul(_e,rt)|0,w=w+Math.imul(_e,Ge)|0,w=w+Math.imul(Re,rt)|0,j=j+Math.imul(Re,Ge)|0;var It=(K+z|0)+((w&8191)<<13)|0;K=(j+(w>>>13)|0)+(It>>>26)|0,It&=67108863,z=Math.imul(De,Ne),w=Math.imul(De,Me),w=w+Math.imul(pe,Ne)|0,j=Math.imul(pe,Me),z=z+Math.imul(V,at)|0,w=w+Math.imul(V,ft)|0,w=w+Math.imul(le,at)|0,j=j+Math.imul(le,ft)|0,z=z+Math.imul(we,Fe)|0,w=w+Math.imul(we,ht)|0,w=w+Math.imul(Ee,Fe)|0,j=j+Math.imul(Ee,ht)|0,z=z+Math.imul(J,rt)|0,w=w+Math.imul(J,Ge)|0,w=w+Math.imul(Z,rt)|0,j=j+Math.imul(Z,Ge)|0,z=z+Math.imul(_e,dt)|0,w=w+Math.imul(_e,pt)|0,w=w+Math.imul(Re,dt)|0,j=j+Math.imul(Re,pt)|0;var Pt=(K+z|0)+((w&8191)<<13)|0;K=(j+(w>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,z=Math.imul(Ve,Ne),w=Math.imul(Ve,Me),w=w+Math.imul(qe,Ne)|0,j=Math.imul(qe,Me),z=z+Math.imul(De,at)|0,w=w+Math.imul(De,ft)|0,w=w+Math.imul(pe,at)|0,j=j+Math.imul(pe,ft)|0,z=z+Math.imul(V,Fe)|0,w=w+Math.imul(V,ht)|0,w=w+Math.imul(le,Fe)|0,j=j+Math.imul(le,ht)|0,z=z+Math.imul(we,rt)|0,w=w+Math.imul(we,Ge)|0,w=w+Math.imul(Ee,rt)|0,j=j+Math.imul(Ee,Ge)|0,z=z+Math.imul(J,dt)|0,w=w+Math.imul(J,pt)|0,w=w+Math.imul(Z,dt)|0,j=j+Math.imul(Z,pt)|0,z=z+Math.imul(_e,mt)|0,w=w+Math.imul(_e,Ye)|0,w=w+Math.imul(Re,mt)|0,j=j+Math.imul(Re,Ye)|0;var Wt=(K+z|0)+((w&8191)<<13)|0;K=(j+(w>>>13)|0)+(Wt>>>26)|0,Wt&=67108863,z=Math.imul(Ke,Ne),w=Math.imul(Ke,Me),w=w+Math.imul(ze,Ne)|0,j=Math.imul(ze,Me),z=z+Math.imul(Ve,at)|0,w=w+Math.imul(Ve,ft)|0,w=w+Math.imul(qe,at)|0,j=j+Math.imul(qe,ft)|0,z=z+Math.imul(De,Fe)|0,w=w+Math.imul(De,ht)|0,w=w+Math.imul(pe,Fe)|0,j=j+Math.imul(pe,ht)|0,z=z+Math.imul(V,rt)|0,w=w+Math.imul(V,Ge)|0,w=w+Math.imul(le,rt)|0,j=j+Math.imul(le,Ge)|0,z=z+Math.imul(we,dt)|0,w=w+Math.imul(we,pt)|0,w=w+Math.imul(Ee,dt)|0,j=j+Math.imul(Ee,pt)|0,z=z+Math.imul(J,mt)|0,w=w+Math.imul(J,Ye)|0,w=w+Math.imul(Z,mt)|0,j=j+Math.imul(Z,Ye)|0,z=z+Math.imul(_e,et)|0,w=w+Math.imul(_e,st)|0,w=w+Math.imul(Re,et)|0,j=j+Math.imul(Re,st)|0;var ni=(K+z|0)+((w&8191)<<13)|0;K=(j+(w>>>13)|0)+(ni>>>26)|0,ni&=67108863,z=Math.imul(se,Ne),w=Math.imul(se,Me),w=w+Math.imul(Q,Ne)|0,j=Math.imul(Q,Me),z=z+Math.imul(Ke,at)|0,w=w+Math.imul(Ke,ft)|0,w=w+Math.imul(ze,at)|0,j=j+Math.imul(ze,ft)|0,z=z+Math.imul(Ve,Fe)|0,w=w+Math.imul(Ve,ht)|0,w=w+Math.imul(qe,Fe)|0,j=j+Math.imul(qe,ht)|0,z=z+Math.imul(De,rt)|0,w=w+Math.imul(De,Ge)|0,w=w+Math.imul(pe,rt)|0,j=j+Math.imul(pe,Ge)|0,z=z+Math.imul(V,dt)|0,w=w+Math.imul(V,pt)|0,w=w+Math.imul(le,dt)|0,j=j+Math.imul(le,pt)|0,z=z+Math.imul(we,mt)|0,w=w+Math.imul(we,Ye)|0,w=w+Math.imul(Ee,mt)|0,j=j+Math.imul(Ee,Ye)|0,z=z+Math.imul(J,et)|0,w=w+Math.imul(J,st)|0,w=w+Math.imul(Z,et)|0,j=j+Math.imul(Z,st)|0,z=z+Math.imul(_e,ot)|0,w=w+Math.imul(_e,lt)|0,w=w+Math.imul(Re,ot)|0,j=j+Math.imul(Re,lt)|0;var Gr=(K+z|0)+((w&8191)<<13)|0;K=(j+(w>>>13)|0)+(Gr>>>26)|0,Gr&=67108863,z=Math.imul(ue,Ne),w=Math.imul(ue,Me),w=w+Math.imul(me,Ne)|0,j=Math.imul(me,Me),z=z+Math.imul(se,at)|0,w=w+Math.imul(se,ft)|0,w=w+Math.imul(Q,at)|0,j=j+Math.imul(Q,ft)|0,z=z+Math.imul(Ke,Fe)|0,w=w+Math.imul(Ke,ht)|0,w=w+Math.imul(ze,Fe)|0,j=j+Math.imul(ze,ht)|0,z=z+Math.imul(Ve,rt)|0,w=w+Math.imul(Ve,Ge)|0,w=w+Math.imul(qe,rt)|0,j=j+Math.imul(qe,Ge)|0,z=z+Math.imul(De,dt)|0,w=w+Math.imul(De,pt)|0,w=w+Math.imul(pe,dt)|0,j=j+Math.imul(pe,pt)|0,z=z+Math.imul(V,mt)|0,w=w+Math.imul(V,Ye)|0,w=w+Math.imul(le,mt)|0,j=j+Math.imul(le,Ye)|0,z=z+Math.imul(we,et)|0,w=w+Math.imul(we,st)|0,w=w+Math.imul(Ee,et)|0,j=j+Math.imul(Ee,st)|0,z=z+Math.imul(J,ot)|0,w=w+Math.imul(J,lt)|0,w=w+Math.imul(Z,ot)|0,j=j+Math.imul(Z,lt)|0,z=z+Math.imul(_e,$e)|0,w=w+Math.imul(_e,nt)|0,w=w+Math.imul(Re,$e)|0,j=j+Math.imul(Re,nt)|0;var fr=(K+z|0)+((w&8191)<<13)|0;K=(j+(w>>>13)|0)+(fr>>>26)|0,fr&=67108863,z=Math.imul(Te,Ne),w=Math.imul(Te,Me),w=w+Math.imul(Ue,Ne)|0,j=Math.imul(Ue,Me),z=z+Math.imul(ue,at)|0,w=w+Math.imul(ue,ft)|0,w=w+Math.imul(me,at)|0,j=j+Math.imul(me,ft)|0,z=z+Math.imul(se,Fe)|0,w=w+Math.imul(se,ht)|0,w=w+Math.imul(Q,Fe)|0,j=j+Math.imul(Q,ht)|0,z=z+Math.imul(Ke,rt)|0,w=w+Math.imul(Ke,Ge)|0,w=w+Math.imul(ze,rt)|0,j=j+Math.imul(ze,Ge)|0,z=z+Math.imul(Ve,dt)|0,w=w+Math.imul(Ve,pt)|0,w=w+Math.imul(qe,dt)|0,j=j+Math.imul(qe,pt)|0,z=z+Math.imul(De,mt)|0,w=w+Math.imul(De,Ye)|0,w=w+Math.imul(pe,mt)|0,j=j+Math.imul(pe,Ye)|0,z=z+Math.imul(V,et)|0,w=w+Math.imul(V,st)|0,w=w+Math.imul(le,et)|0,j=j+Math.imul(le,st)|0,z=z+Math.imul(we,ot)|0,w=w+Math.imul(we,lt)|0,w=w+Math.imul(Ee,ot)|0,j=j+Math.imul(Ee,lt)|0,z=z+Math.imul(J,$e)|0,w=w+Math.imul(J,nt)|0,w=w+Math.imul(Z,$e)|0,j=j+Math.imul(Z,nt)|0,z=z+Math.imul(_e,Ct)|0,w=w+Math.imul(_e,gt)|0,w=w+Math.imul(Re,Ct)|0,j=j+Math.imul(Re,gt)|0;var si=(K+z|0)+((w&8191)<<13)|0;K=(j+(w>>>13)|0)+(si>>>26)|0,si&=67108863,z=Math.imul(Te,at),w=Math.imul(Te,ft),w=w+Math.imul(Ue,at)|0,j=Math.imul(Ue,ft),z=z+Math.imul(ue,Fe)|0,w=w+Math.imul(ue,ht)|0,w=w+Math.imul(me,Fe)|0,j=j+Math.imul(me,ht)|0,z=z+Math.imul(se,rt)|0,w=w+Math.imul(se,Ge)|0,w=w+Math.imul(Q,rt)|0,j=j+Math.imul(Q,Ge)|0,z=z+Math.imul(Ke,dt)|0,w=w+Math.imul(Ke,pt)|0,w=w+Math.imul(ze,dt)|0,j=j+Math.imul(ze,pt)|0,z=z+Math.imul(Ve,mt)|0,w=w+Math.imul(Ve,Ye)|0,w=w+Math.imul(qe,mt)|0,j=j+Math.imul(qe,Ye)|0,z=z+Math.imul(De,et)|0,w=w+Math.imul(De,st)|0,w=w+Math.imul(pe,et)|0,j=j+Math.imul(pe,st)|0,z=z+Math.imul(V,ot)|0,w=w+Math.imul(V,lt)|0,w=w+Math.imul(le,ot)|0,j=j+Math.imul(le,lt)|0,z=z+Math.imul(we,$e)|0,w=w+Math.imul(we,nt)|0,w=w+Math.imul(Ee,$e)|0,j=j+Math.imul(Ee,nt)|0,z=z+Math.imul(J,Ct)|0,w=w+Math.imul(J,gt)|0,w=w+Math.imul(Z,Ct)|0,j=j+Math.imul(Z,gt)|0;var di=(K+z|0)+((w&8191)<<13)|0;K=(j+(w>>>13)|0)+(di>>>26)|0,di&=67108863,z=Math.imul(Te,Fe),w=Math.imul(Te,ht),w=w+Math.imul(Ue,Fe)|0,j=Math.imul(Ue,ht),z=z+Math.imul(ue,rt)|0,w=w+Math.imul(ue,Ge)|0,w=w+Math.imul(me,rt)|0,j=j+Math.imul(me,Ge)|0,z=z+Math.imul(se,dt)|0,w=w+Math.imul(se,pt)|0,w=w+Math.imul(Q,dt)|0,j=j+Math.imul(Q,pt)|0,z=z+Math.imul(Ke,mt)|0,w=w+Math.imul(Ke,Ye)|0,w=w+Math.imul(ze,mt)|0,j=j+Math.imul(ze,Ye)|0,z=z+Math.imul(Ve,et)|0,w=w+Math.imul(Ve,st)|0,w=w+Math.imul(qe,et)|0,j=j+Math.imul(qe,st)|0,z=z+Math.imul(De,ot)|0,w=w+Math.imul(De,lt)|0,w=w+Math.imul(pe,ot)|0,j=j+Math.imul(pe,lt)|0,z=z+Math.imul(V,$e)|0,w=w+Math.imul(V,nt)|0,w=w+Math.imul(le,$e)|0,j=j+Math.imul(le,nt)|0,z=z+Math.imul(we,Ct)|0,w=w+Math.imul(we,gt)|0,w=w+Math.imul(Ee,Ct)|0,j=j+Math.imul(Ee,gt)|0;var ai=(K+z|0)+((w&8191)<<13)|0;K=(j+(w>>>13)|0)+(ai>>>26)|0,ai&=67108863,z=Math.imul(Te,rt),w=Math.imul(Te,Ge),w=w+Math.imul(Ue,rt)|0,j=Math.imul(Ue,Ge),z=z+Math.imul(ue,dt)|0,w=w+Math.imul(ue,pt)|0,w=w+Math.imul(me,dt)|0,j=j+Math.imul(me,pt)|0,z=z+Math.imul(se,mt)|0,w=w+Math.imul(se,Ye)|0,w=w+Math.imul(Q,mt)|0,j=j+Math.imul(Q,Ye)|0,z=z+Math.imul(Ke,et)|0,w=w+Math.imul(Ke,st)|0,w=w+Math.imul(ze,et)|0,j=j+Math.imul(ze,st)|0,z=z+Math.imul(Ve,ot)|0,w=w+Math.imul(Ve,lt)|0,w=w+Math.imul(qe,ot)|0,j=j+Math.imul(qe,lt)|0,z=z+Math.imul(De,$e)|0,w=w+Math.imul(De,nt)|0,w=w+Math.imul(pe,$e)|0,j=j+Math.imul(pe,nt)|0,z=z+Math.imul(V,Ct)|0,w=w+Math.imul(V,gt)|0,w=w+Math.imul(le,Ct)|0,j=j+Math.imul(le,gt)|0;var jr=(K+z|0)+((w&8191)<<13)|0;K=(j+(w>>>13)|0)+(jr>>>26)|0,jr&=67108863,z=Math.imul(Te,dt),w=Math.imul(Te,pt),w=w+Math.imul(Ue,dt)|0,j=Math.imul(Ue,pt),z=z+Math.imul(ue,mt)|0,w=w+Math.imul(ue,Ye)|0,w=w+Math.imul(me,mt)|0,j=j+Math.imul(me,Ye)|0,z=z+Math.imul(se,et)|0,w=w+Math.imul(se,st)|0,w=w+Math.imul(Q,et)|0,j=j+Math.imul(Q,st)|0,z=z+Math.imul(Ke,ot)|0,w=w+Math.imul(Ke,lt)|0,w=w+Math.imul(ze,ot)|0,j=j+Math.imul(ze,lt)|0,z=z+Math.imul(Ve,$e)|0,w=w+Math.imul(Ve,nt)|0,w=w+Math.imul(qe,$e)|0,j=j+Math.imul(qe,nt)|0,z=z+Math.imul(De,Ct)|0,w=w+Math.imul(De,gt)|0,w=w+Math.imul(pe,Ct)|0,j=j+Math.imul(pe,gt)|0;var zr=(K+z|0)+((w&8191)<<13)|0;K=(j+(w>>>13)|0)+(zr>>>26)|0,zr&=67108863,z=Math.imul(Te,mt),w=Math.imul(Te,Ye),w=w+Math.imul(Ue,mt)|0,j=Math.imul(Ue,Ye),z=z+Math.imul(ue,et)|0,w=w+Math.imul(ue,st)|0,w=w+Math.imul(me,et)|0,j=j+Math.imul(me,st)|0,z=z+Math.imul(se,ot)|0,w=w+Math.imul(se,lt)|0,w=w+Math.imul(Q,ot)|0,j=j+Math.imul(Q,lt)|0,z=z+Math.imul(Ke,$e)|0,w=w+Math.imul(Ke,nt)|0,w=w+Math.imul(ze,$e)|0,j=j+Math.imul(ze,nt)|0,z=z+Math.imul(Ve,Ct)|0,w=w+Math.imul(Ve,gt)|0,w=w+Math.imul(qe,Ct)|0,j=j+Math.imul(qe,gt)|0;var Wr=(K+z|0)+((w&8191)<<13)|0;K=(j+(w>>>13)|0)+(Wr>>>26)|0,Wr&=67108863,z=Math.imul(Te,et),w=Math.imul(Te,st),w=w+Math.imul(Ue,et)|0,j=Math.imul(Ue,st),z=z+Math.imul(ue,ot)|0,w=w+Math.imul(ue,lt)|0,w=w+Math.imul(me,ot)|0,j=j+Math.imul(me,lt)|0,z=z+Math.imul(se,$e)|0,w=w+Math.imul(se,nt)|0,w=w+Math.imul(Q,$e)|0,j=j+Math.imul(Q,nt)|0,z=z+Math.imul(Ke,Ct)|0,w=w+Math.imul(Ke,gt)|0,w=w+Math.imul(ze,Ct)|0,j=j+Math.imul(ze,gt)|0;var Kr=(K+z|0)+((w&8191)<<13)|0;K=(j+(w>>>13)|0)+(Kr>>>26)|0,Kr&=67108863,z=Math.imul(Te,ot),w=Math.imul(Te,lt),w=w+Math.imul(Ue,ot)|0,j=Math.imul(Ue,lt),z=z+Math.imul(ue,$e)|0,w=w+Math.imul(ue,nt)|0,w=w+Math.imul(me,$e)|0,j=j+Math.imul(me,nt)|0,z=z+Math.imul(se,Ct)|0,w=w+Math.imul(se,gt)|0,w=w+Math.imul(Q,Ct)|0,j=j+Math.imul(Q,gt)|0;var xi=(K+z|0)+((w&8191)<<13)|0;K=(j+(w>>>13)|0)+(xi>>>26)|0,xi&=67108863,z=Math.imul(Te,$e),w=Math.imul(Te,nt),w=w+Math.imul(Ue,$e)|0,j=Math.imul(Ue,nt),z=z+Math.imul(ue,Ct)|0,w=w+Math.imul(ue,gt)|0,w=w+Math.imul(me,Ct)|0,j=j+Math.imul(me,gt)|0;var Ti=(K+z|0)+((w&8191)<<13)|0;K=(j+(w>>>13)|0)+(Ti>>>26)|0,Ti&=67108863,z=Math.imul(Te,Ct),w=Math.imul(Te,gt),w=w+Math.imul(Ue,Ct)|0,j=Math.imul(Ue,gt);var Xi=(K+z|0)+((w&8191)<<13)|0;return K=(j+(w>>>13)|0)+(Xi>>>26)|0,Xi&=67108863,I[0]=yr,I[1]=Cr,I[2]=ar,I[3]=It,I[4]=Pt,I[5]=Wt,I[6]=ni,I[7]=Gr,I[8]=fr,I[9]=si,I[10]=di,I[11]=ai,I[12]=jr,I[13]=zr,I[14]=Wr,I[15]=Kr,I[16]=xi,I[17]=Ti,I[18]=Xi,K!==0&&(I[19]=K,P.length++),P};Math.imul||(T=D);function H(x,a,b){b.negative=a.negative^x.negative,b.length=x.length+a.length;for(var P=0,F=0,L=0;L<b.length-1;L++){var I=F;F=0;for(var K=P&67108863,z=Math.min(L,a.length-1),w=Math.max(0,L-x.length+1);w<=z;w++){var j=L-w,he=x.words[j]|0,_e=a.words[w]|0,Re=he*_e,Ie=Re&67108863;I=I+(Re/67108864|0)|0,Ie=Ie+K|0,K=Ie&67108863,I=I+(Ie>>>26)|0,F+=I>>>26,I&=67108863}b.words[L]=K,P=I,I=F}return P!==0?b.words[L]=P:b.length--,b._strip()}function W(x,a,b){return H(x,a,b)}l.prototype.mulTo=function(a,b){var P,F=this.length+a.length;return this.length===10&&a.length===10?P=T(this,a,b):F<63?P=D(this,a,b):F<1024?P=H(this,a,b):P=W(this,a,b),P};function Y(x,a){this.x=x,this.y=a}Y.prototype.makeRBT=function(a){for(var b=new Array(a),P=l.prototype._countBits(a)-1,F=0;F<a;F++)b[F]=this.revBin(F,P,a);return b},Y.prototype.revBin=function(a,b,P){if(a===0||a===P-1)return a;for(var F=0,L=0;L<b;L++)F|=(a&1)<<b-L-1,a>>=1;return F},Y.prototype.permute=function(a,b,P,F,L,I){for(var K=0;K<I;K++)F[K]=b[a[K]],L[K]=P[a[K]]},Y.prototype.transform=function(a,b,P,F,L,I){this.permute(I,a,b,P,F,L);for(var K=1;K<L;K<<=1)for(var z=K<<1,w=Math.cos(2*Math.PI/z),j=Math.sin(2*Math.PI/z),he=0;he<L;he+=z)for(var _e=w,Re=j,Ie=0;Ie<K;Ie++){var J=P[he+Ie],Z=F[he+Ie],fe=P[he+Ie+K],we=F[he+Ie+K],Ee=_e*fe-Re*we;we=_e*we+Re*fe,fe=Ee,P[he+Ie]=J+fe,F[he+Ie]=Z+we,P[he+Ie+K]=J-fe,F[he+Ie+K]=Z-we,Ie!==z&&(Ee=w*_e-j*Re,Re=w*Re+j*_e,_e=Ee)}},Y.prototype.guessLen13b=function(a,b){var P=Math.max(b,a)|1,F=P&1,L=0;for(P=P/2|0;P;P=P>>>1)L++;return 1<<L+1+F},Y.prototype.conjugate=function(a,b,P){if(!(P<=1))for(var F=0;F<P/2;F++){var L=a[F];a[F]=a[P-F-1],a[P-F-1]=L,L=b[F],b[F]=-b[P-F-1],b[P-F-1]=-L}},Y.prototype.normalize13b=function(a,b){for(var P=0,F=0;F<b/2;F++){var L=Math.round(a[2*F+1]/b)*8192+Math.round(a[2*F]/b)+P;a[F]=L&67108863,L<67108864?P=0:P=L/67108864|0}return a},Y.prototype.convert13b=function(a,b,P,F){for(var L=0,I=0;I<b;I++)L=L+(a[I]|0),P[2*I]=L&8191,L=L>>>13,P[2*I+1]=L&8191,L=L>>>13;for(I=2*b;I<F;++I)P[I]=0;A(L===0),A((L&~8191)==0)},Y.prototype.stub=function(a){for(var b=new Array(a),P=0;P<a;P++)b[P]=0;return b},Y.prototype.mulp=function(a,b,P){var F=2*this.guessLen13b(a.length,b.length),L=this.makeRBT(F),I=this.stub(F),K=new Array(F),z=new Array(F),w=new Array(F),j=new Array(F),he=new Array(F),_e=new Array(F),Re=P.words;Re.length=F,this.convert13b(a.words,a.length,K,F),this.convert13b(b.words,b.length,j,F),this.transform(K,I,z,w,F,L),this.transform(j,I,he,_e,F,L);for(var Ie=0;Ie<F;Ie++){var J=z[Ie]*he[Ie]-w[Ie]*_e[Ie];w[Ie]=z[Ie]*_e[Ie]+w[Ie]*he[Ie],z[Ie]=J}return this.conjugate(z,w,F),this.transform(z,w,Re,I,F,L),this.conjugate(Re,I,F),this.normalize13b(Re,F),P.negative=a.negative^b.negative,P.length=a.length+b.length,P._strip()},l.prototype.mul=function(a){var b=new l(null);return b.words=new Array(this.length+a.length),this.mulTo(a,b)},l.prototype.mulf=function(a){var b=new l(null);return b.words=new Array(this.length+a.length),W(this,a,b)},l.prototype.imul=function(a){return this.clone().mulTo(a,this)},l.prototype.imuln=function(a){var b=a<0;b&&(a=-a),A(typeof a=="number"),A(a<67108864);for(var P=0,F=0;F<this.length;F++){var L=(this.words[F]|0)*a,I=(L&67108863)+(P&67108863);P>>=26,P+=L/67108864|0,P+=I>>>26,this.words[F]=I&67108863}return P!==0&&(this.words[F]=P,this.length++),b?this.ineg():this},l.prototype.muln=function(a){return this.clone().imuln(a)},l.prototype.sqr=function(){return this.mul(this)},l.prototype.isqr=function(){return this.imul(this.clone())},l.prototype.pow=function(a){var b=C(a);if(b.length===0)return new l(1);for(var P=this,F=0;F<b.length&&b[F]===0;F++,P=P.sqr());if(++F<b.length)for(var L=P.sqr();F<b.length;F++,L=L.sqr())b[F]!==0&&(P=P.mul(L));return P},l.prototype.iushln=function(a){A(typeof a=="number"&&a>=0);var b=a%26,P=(a-b)/26,F=67108863>>>26-b<<26-b,L;if(b!==0){var I=0;for(L=0;L<this.length;L++){var K=this.words[L]&F,z=(this.words[L]|0)-K<<b;this.words[L]=z|I,I=K>>>26-b}I&&(this.words[L]=I,this.length++)}if(P!==0){for(L=this.length-1;L>=0;L--)this.words[L+P]=this.words[L];for(L=0;L<P;L++)this.words[L]=0;this.length+=P}return this._strip()},l.prototype.ishln=function(a){return A(this.negative===0),this.iushln(a)},l.prototype.iushrn=function(a,b,P){A(typeof a=="number"&&a>=0);var F;b?F=(b-b%26)/26:F=0;var L=a%26,I=Math.min((a-L)/26,this.length),K=67108863^67108863>>>L<<L,z=P;if(F-=I,F=Math.max(0,F),z){for(var w=0;w<I;w++)z.words[w]=this.words[w];z.length=I}if(I!==0)if(this.length>I)for(this.length-=I,w=0;w<this.length;w++)this.words[w]=this.words[w+I];else this.words[0]=0,this.length=1;var j=0;for(w=this.length-1;w>=0&&(j!==0||w>=F);w--){var he=this.words[w]|0;this.words[w]=j<<26-L|he>>>L,j=he&K}return z&&j!==0&&(z.words[z.length++]=j),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},l.prototype.ishrn=function(a,b,P){return A(this.negative===0),this.iushrn(a,b,P)},l.prototype.shln=function(a){return this.clone().ishln(a)},l.prototype.ushln=function(a){return this.clone().iushln(a)},l.prototype.shrn=function(a){return this.clone().ishrn(a)},l.prototype.ushrn=function(a){return this.clone().iushrn(a)},l.prototype.testn=function(a){A(typeof a=="number"&&a>=0);var b=a%26,P=(a-b)/26,F=1<<b;if(this.length<=P)return!1;var L=this.words[P];return!!(L&F)},l.prototype.imaskn=function(a){A(typeof a=="number"&&a>=0);var b=a%26,P=(a-b)/26;if(A(this.negative===0,"imaskn works only with positive numbers"),this.length<=P)return this;if(b!==0&&P++,this.length=Math.min(P,this.length),b!==0){var F=67108863^67108863>>>b<<b;this.words[this.length-1]&=F}return this._strip()},l.prototype.maskn=function(a){return this.clone().imaskn(a)},l.prototype.iaddn=function(a){return A(typeof a=="number"),A(a<67108864),a<0?this.isubn(-a):this.negative!==0?this.length===1&&(this.words[0]|0)<=a?(this.words[0]=a-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(a),this.negative=1,this):this._iaddn(a)},l.prototype._iaddn=function(a){this.words[0]+=a;for(var b=0;b<this.length&&this.words[b]>=67108864;b++)this.words[b]-=67108864,b===this.length-1?this.words[b+1]=1:this.words[b+1]++;return this.length=Math.max(this.length,b+1),this},l.prototype.isubn=function(a){if(A(typeof a=="number"),A(a<67108864),a<0)return this.iaddn(-a);if(this.negative!==0)return this.negative=0,this.iaddn(a),this.negative=1,this;if(this.words[0]-=a,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var b=0;b<this.length&&this.words[b]<0;b++)this.words[b]+=67108864,this.words[b+1]-=1;return this._strip()},l.prototype.addn=function(a){return this.clone().iaddn(a)},l.prototype.subn=function(a){return this.clone().isubn(a)},l.prototype.iabs=function(){return this.negative=0,this},l.prototype.abs=function(){return this.clone().iabs()},l.prototype._ishlnsubmul=function(a,b,P){var F=a.length+P,L;this._expand(F);var I,K=0;for(L=0;L<a.length;L++){I=(this.words[L+P]|0)+K;var z=(a.words[L]|0)*b;I-=z&67108863,K=(I>>26)-(z/67108864|0),this.words[L+P]=I&67108863}for(;L<this.length-P;L++)I=(this.words[L+P]|0)+K,K=I>>26,this.words[L+P]=I&67108863;if(K===0)return this._strip();for(A(K===-1),K=0,L=0;L<this.length;L++)I=-(this.words[L]|0)+K,K=I>>26,this.words[L]=I&67108863;return this.negative=1,this._strip()},l.prototype._wordDiv=function(a,b){var P=this.length-a.length,F=this.clone(),L=a,I=L.words[L.length-1]|0,K=this._countBits(I);P=26-K,P!==0&&(L=L.ushln(P),F.iushln(P),I=L.words[L.length-1]|0);var z=F.length-L.length,w;if(b!=="mod"){w=new l(null),w.length=z+1,w.words=new Array(w.length);for(var j=0;j<w.length;j++)w.words[j]=0}var he=F.clone()._ishlnsubmul(L,1,z);he.negative===0&&(F=he,w&&(w.words[z]=1));for(var _e=z-1;_e>=0;_e--){var Re=(F.words[L.length+_e]|0)*67108864+(F.words[L.length+_e-1]|0);for(Re=Math.min(Re/I|0,67108863),F._ishlnsubmul(L,Re,_e);F.negative!==0;)Re--,F.negative=0,F._ishlnsubmul(L,1,_e),F.isZero()||(F.negative^=1);w&&(w.words[_e]=Re)}return w&&w._strip(),F._strip(),b!=="div"&&P!==0&&F.iushrn(P),{div:w||null,mod:F}},l.prototype.divmod=function(a,b,P){if(A(!a.isZero()),this.isZero())return{div:new l(0),mod:new l(0)};var F,L,I;return this.negative!==0&&a.negative===0?(I=this.neg().divmod(a,b),b!=="mod"&&(F=I.div.neg()),b!=="div"&&(L=I.mod.neg(),P&&L.negative!==0&&L.iadd(a)),{div:F,mod:L}):this.negative===0&&a.negative!==0?(I=this.divmod(a.neg(),b),b!=="mod"&&(F=I.div.neg()),{div:F,mod:I.mod}):(this.negative&a.negative)!=0?(I=this.neg().divmod(a.neg(),b),b!=="div"&&(L=I.mod.neg(),P&&L.negative!==0&&L.isub(a)),{div:I.div,mod:L}):a.length>this.length||this.cmp(a)<0?{div:new l(0),mod:this}:a.length===1?b==="div"?{div:this.divn(a.words[0]),mod:null}:b==="mod"?{div:null,mod:new l(this.modrn(a.words[0]))}:{div:this.divn(a.words[0]),mod:new l(this.modrn(a.words[0]))}:this._wordDiv(a,b)},l.prototype.div=function(a){return this.divmod(a,"div",!1).div},l.prototype.mod=function(a){return this.divmod(a,"mod",!1).mod},l.prototype.umod=function(a){return this.divmod(a,"mod",!0).mod},l.prototype.divRound=function(a){var b=this.divmod(a);if(b.mod.isZero())return b.div;var P=b.div.negative!==0?b.mod.isub(a):b.mod,F=a.ushrn(1),L=a.andln(1),I=P.cmp(F);return I<0||L===1&&I===0?b.div:b.div.negative!==0?b.div.isubn(1):b.div.iaddn(1)},l.prototype.modrn=function(a){var b=a<0;b&&(a=-a),A(a<=67108863);for(var P=(1<<26)%a,F=0,L=this.length-1;L>=0;L--)F=(P*F+(this.words[L]|0))%a;return b?-F:F},l.prototype.modn=function(a){return this.modrn(a)},l.prototype.idivn=function(a){var b=a<0;b&&(a=-a),A(a<=67108863);for(var P=0,F=this.length-1;F>=0;F--){var L=(this.words[F]|0)+P*67108864;this.words[F]=L/a|0,P=L%a}return this._strip(),b?this.ineg():this},l.prototype.divn=function(a){return this.clone().idivn(a)},l.prototype.egcd=function(a){A(a.negative===0),A(!a.isZero());var b=this,P=a.clone();b.negative!==0?b=b.umod(a):b=b.clone();for(var F=new l(1),L=new l(0),I=new l(0),K=new l(1),z=0;b.isEven()&&P.isEven();)b.iushrn(1),P.iushrn(1),++z;for(var w=P.clone(),j=b.clone();!b.isZero();){for(var he=0,_e=1;(b.words[0]&_e)==0&&he<26;++he,_e<<=1);if(he>0)for(b.iushrn(he);he-- >0;)(F.isOdd()||L.isOdd())&&(F.iadd(w),L.isub(j)),F.iushrn(1),L.iushrn(1);for(var Re=0,Ie=1;(P.words[0]&Ie)==0&&Re<26;++Re,Ie<<=1);if(Re>0)for(P.iushrn(Re);Re-- >0;)(I.isOdd()||K.isOdd())&&(I.iadd(w),K.isub(j)),I.iushrn(1),K.iushrn(1);b.cmp(P)>=0?(b.isub(P),F.isub(I),L.isub(K)):(P.isub(b),I.isub(F),K.isub(L))}return{a:I,b:K,gcd:P.iushln(z)}},l.prototype._invmp=function(a){A(a.negative===0),A(!a.isZero());var b=this,P=a.clone();b.negative!==0?b=b.umod(a):b=b.clone();for(var F=new l(1),L=new l(0),I=P.clone();b.cmpn(1)>0&&P.cmpn(1)>0;){for(var K=0,z=1;(b.words[0]&z)==0&&K<26;++K,z<<=1);if(K>0)for(b.iushrn(K);K-- >0;)F.isOdd()&&F.iadd(I),F.iushrn(1);for(var w=0,j=1;(P.words[0]&j)==0&&w<26;++w,j<<=1);if(w>0)for(P.iushrn(w);w-- >0;)L.isOdd()&&L.iadd(I),L.iushrn(1);b.cmp(P)>=0?(b.isub(P),F.isub(L)):(P.isub(b),L.isub(F))}var he;return b.cmpn(1)===0?he=F:he=L,he.cmpn(0)<0&&he.iadd(a),he},l.prototype.gcd=function(a){if(this.isZero())return a.abs();if(a.isZero())return this.abs();var b=this.clone(),P=a.clone();b.negative=0,P.negative=0;for(var F=0;b.isEven()&&P.isEven();F++)b.iushrn(1),P.iushrn(1);do{for(;b.isEven();)b.iushrn(1);for(;P.isEven();)P.iushrn(1);var L=b.cmp(P);if(L<0){var I=b;b=P,P=I}else if(L===0||P.cmpn(1)===0)break;b.isub(P)}while(!0);return P.iushln(F)},l.prototype.invm=function(a){return this.egcd(a).a.umod(a)},l.prototype.isEven=function(){return(this.words[0]&1)==0},l.prototype.isOdd=function(){return(this.words[0]&1)==1},l.prototype.andln=function(a){return this.words[0]&a},l.prototype.bincn=function(a){A(typeof a=="number");var b=a%26,P=(a-b)/26,F=1<<b;if(this.length<=P)return this._expand(P+1),this.words[P]|=F,this;for(var L=F,I=P;L!==0&&I<this.length;I++){var K=this.words[I]|0;K+=L,L=K>>>26,K&=67108863,this.words[I]=K}return L!==0&&(this.words[I]=L,this.length++),this},l.prototype.isZero=function(){return this.length===1&&this.words[0]===0},l.prototype.cmpn=function(a){var b=a<0;if(this.negative!==0&&!b)return-1;if(this.negative===0&&b)return 1;this._strip();var P;if(this.length>1)P=1;else{b&&(a=-a),A(a<=67108863,"Number is too big");var F=this.words[0]|0;P=F===a?0:F<a?-1:1}return this.negative!==0?-P|0:P},l.prototype.cmp=function(a){if(this.negative!==0&&a.negative===0)return-1;if(this.negative===0&&a.negative!==0)return 1;var b=this.ucmp(a);return this.negative!==0?-b|0:b},l.prototype.ucmp=function(a){if(this.length>a.length)return 1;if(this.length<a.length)return-1;for(var b=0,P=this.length-1;P>=0;P--){var F=this.words[P]|0,L=a.words[P]|0;if(F!==L){F<L?b=-1:F>L&&(b=1);break}}return b},l.prototype.gtn=function(a){return this.cmpn(a)===1},l.prototype.gt=function(a){return this.cmp(a)===1},l.prototype.gten=function(a){return this.cmpn(a)>=0},l.prototype.gte=function(a){return this.cmp(a)>=0},l.prototype.ltn=function(a){return this.cmpn(a)===-1},l.prototype.lt=function(a){return this.cmp(a)===-1},l.prototype.lten=function(a){return this.cmpn(a)<=0},l.prototype.lte=function(a){return this.cmp(a)<=0},l.prototype.eqn=function(a){return this.cmpn(a)===0},l.prototype.eq=function(a){return this.cmp(a)===0},l.red=function(a){return new O(a)},l.prototype.toRed=function(a){return A(!this.red,"Already a number in reduction context"),A(this.negative===0,"red works only with positives"),a.convertTo(this)._forceRed(a)},l.prototype.fromRed=function(){return A(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},l.prototype._forceRed=function(a){return this.red=a,this},l.prototype.forceRed=function(a){return A(!this.red,"Already a number in reduction context"),this._forceRed(a)},l.prototype.redAdd=function(a){return A(this.red,"redAdd works only with red numbers"),this.red.add(this,a)},l.prototype.redIAdd=function(a){return A(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,a)},l.prototype.redSub=function(a){return A(this.red,"redSub works only with red numbers"),this.red.sub(this,a)},l.prototype.redISub=function(a){return A(this.red,"redISub works only with red numbers"),this.red.isub(this,a)},l.prototype.redShl=function(a){return A(this.red,"redShl works only with red numbers"),this.red.shl(this,a)},l.prototype.redMul=function(a){return A(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.mul(this,a)},l.prototype.redIMul=function(a){return A(this.red,"redMul works only with red numbers"),this.red._verify2(this,a),this.red.imul(this,a)},l.prototype.redSqr=function(){return A(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},l.prototype.redISqr=function(){return A(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},l.prototype.redSqrt=function(){return A(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},l.prototype.redInvm=function(){return A(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},l.prototype.redNeg=function(){return A(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},l.prototype.redPow=function(a){return A(this.red&&!a.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,a)};var re={k256:null,p224:null,p192:null,p25519:null};function ie(x,a){this.name=x,this.p=new l(a,16),this.n=this.p.bitLength(),this.k=new l(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}ie.prototype._tmp=function(){var a=new l(null);return a.words=new Array(Math.ceil(this.n/13)),a},ie.prototype.ireduce=function(a){var b=a,P;do this.split(b,this.tmp),b=this.imulK(b),b=b.iadd(this.tmp),P=b.bitLength();while(P>this.n);var F=P<this.n?-1:b.ucmp(this.p);return F===0?(b.words[0]=0,b.length=1):F>0?b.isub(this.p):b.strip!==void 0?b.strip():b._strip(),b},ie.prototype.split=function(a,b){a.iushrn(this.n,0,b)},ie.prototype.imulK=function(a){return a.imul(this.k)};function oe(){ie.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}M(oe,ie),oe.prototype.split=function(a,b){for(var P=4194303,F=Math.min(a.length,9),L=0;L<F;L++)b.words[L]=a.words[L];if(b.length=F,a.length<=9){a.words[0]=0,a.length=1;return}var I=a.words[9];for(b.words[b.length++]=I&P,L=10;L<a.length;L++){var K=a.words[L]|0;a.words[L-10]=(K&P)<<4|I>>>22,I=K}I>>>=22,a.words[L-10]=I,I===0&&a.length>10?a.length-=10:a.length-=9},oe.prototype.imulK=function(a){a.words[a.length]=0,a.words[a.length+1]=0,a.length+=2;for(var b=0,P=0;P<a.length;P++){var F=a.words[P]|0;b+=F*977,a.words[P]=b&67108863,b=F*64+(b/67108864|0)}return a.words[a.length-1]===0&&(a.length--,a.words[a.length-1]===0&&a.length--),a};function ae(){ie.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}M(ae,ie);function de(){ie.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}M(de,ie);function te(){ie.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}M(te,ie),te.prototype.imulK=function(a){for(var b=0,P=0;P<a.length;P++){var F=(a.words[P]|0)*19+b,L=F&67108863;F>>>=26,a.words[P]=L,b=F}return b!==0&&(a.words[a.length++]=b),a},l._prime=function(a){if(re[a])return re[a];var b;if(a==="k256")b=new oe;else if(a==="p224")b=new ae;else if(a==="p192")b=new de;else if(a==="p25519")b=new te;else throw new Error("Unknown prime "+a);return re[a]=b,b};function O(x){if(typeof x=="string"){var a=l._prime(x);this.m=a.p,this.prime=a}else A(x.gtn(1),"modulus must be greater than 1"),this.m=x,this.prime=null}O.prototype._verify1=function(a){A(a.negative===0,"red works only with positives"),A(a.red,"red works only with red numbers")},O.prototype._verify2=function(a,b){A((a.negative|b.negative)==0,"red works only with positives"),A(a.red&&a.red===b.red,"red works only with red numbers")},O.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):(p(a,a.umod(this.m)._forceRed(this)),a)},O.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},O.prototype.add=function(a,b){this._verify2(a,b);var P=a.add(b);return P.cmp(this.m)>=0&&P.isub(this.m),P._forceRed(this)},O.prototype.iadd=function(a,b){this._verify2(a,b);var P=a.iadd(b);return P.cmp(this.m)>=0&&P.isub(this.m),P},O.prototype.sub=function(a,b){this._verify2(a,b);var P=a.sub(b);return P.cmpn(0)<0&&P.iadd(this.m),P._forceRed(this)},O.prototype.isub=function(a,b){this._verify2(a,b);var P=a.isub(b);return P.cmpn(0)<0&&P.iadd(this.m),P},O.prototype.shl=function(a,b){return this._verify1(a),this.imod(a.ushln(b))},O.prototype.imul=function(a,b){return this._verify2(a,b),this.imod(a.imul(b))},O.prototype.mul=function(a,b){return this._verify2(a,b),this.imod(a.mul(b))},O.prototype.isqr=function(a){return this.imul(a,a.clone())},O.prototype.sqr=function(a){return this.mul(a,a)},O.prototype.sqrt=function(a){if(a.isZero())return a.clone();var b=this.m.andln(3);if(A(b%2==1),b===3){var P=this.m.add(new l(1)).iushrn(2);return this.pow(a,P)}for(var F=this.m.subn(1),L=0;!F.isZero()&&F.andln(1)===0;)L++,F.iushrn(1);A(!F.isZero());var I=new l(1).toRed(this),K=I.redNeg(),z=this.m.subn(1).iushrn(1),w=this.m.bitLength();for(w=new l(2*w*w).toRed(this);this.pow(w,z).cmp(K)!==0;)w.redIAdd(K);for(var j=this.pow(w,F),he=this.pow(a,F.addn(1).iushrn(1)),_e=this.pow(a,F),Re=L;_e.cmp(I)!==0;){for(var Ie=_e,J=0;Ie.cmp(I)!==0;J++)Ie=Ie.redSqr();A(J<Re);var Z=this.pow(j,new l(1).iushln(Re-J-1));he=he.redMul(Z),j=Z.redSqr(),_e=_e.redMul(j),Re=J}return he},O.prototype.invm=function(a){var b=a._invmp(this.m);return b.negative!==0?(b.negative=0,this.imod(b).redNeg()):this.imod(b)},O.prototype.pow=function(a,b){if(b.isZero())return new l(1).toRed(this);if(b.cmpn(1)===0)return a.clone();var P=4,F=new Array(1<<P);F[0]=new l(1).toRed(this),F[1]=a;for(var L=2;L<F.length;L++)F[L]=this.mul(F[L-1],a);var I=F[0],K=0,z=0,w=b.bitLength()%26;for(w===0&&(w=26),L=b.length-1;L>=0;L--){for(var j=b.words[L],he=w-1;he>=0;he--){var _e=j>>he&1;if(I!==F[0]&&(I=this.sqr(I)),_e===0&&K===0){z=0;continue}K<<=1,K|=_e,z++,!(z!==P&&(L!==0||he!==0))&&(I=this.mul(I,F[K]),z=0,K=0)}w=26}return I},O.prototype.convertTo=function(a){var b=a.umod(this.m);return b===a?b.clone():b},O.prototype.convertFrom=function(a){var b=a.clone();return b.red=null,b},l.mont=function(a){return new q(a)};function q(x){O.call(this,x),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new l(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}M(q,O),q.prototype.convertTo=function(a){return this.imod(a.ushln(this.shift))},q.prototype.convertFrom=function(a){var b=this.imod(a.mul(this.rinv));return b.red=null,b},q.prototype.imul=function(a,b){if(a.isZero()||b.isZero())return a.words[0]=0,a.length=1,a;var P=a.imul(b),F=P.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),L=P.isub(F).iushrn(this.shift),I=L;return L.cmp(this.m)>=0?I=L.isub(this.m):L.cmpn(0)<0&&(I=L.iadd(this.m)),I._forceRed(this)},q.prototype.mul=function(a,b){if(a.isZero()||b.isZero())return new l(0)._forceRed(this);var P=a.mul(b),F=P.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),L=P.isub(F).iushrn(this.shift),I=L;return L.cmp(this.m)>=0?I=L.isub(this.m):L.cmpn(0)<0&&(I=L.iadd(this.m)),I._forceRed(this)},q.prototype.invm=function(a){var b=this.imod(a._invmp(this.m).mul(this.r2));return b._forceRed(this)}}(g,this)},84419:g=>{"use strict";function G(o,d){o.prototype=Object.create(d.prototype),o.prototype.constructor=o,o.__proto__=d}var k={};function R(o,d,f){f||(f=Error);function _(u,E,h){return typeof d=="string"?d:d(u,E,h)}var p=function(u){G(E,u);function E(h,m,y){return u.call(this,_(h,m,y))||this}return E}(f);p.prototype.name=f.name,p.prototype.code=o,k[o]=p}function B(o,d){if(Array.isArray(o)){var f=o.length;return o=o.map(function(_){return String(_)}),f>2?"one of ".concat(d," ").concat(o.slice(0,f-1).join(", "),", or ")+o[f-1]:f===2?"one of ".concat(d," ").concat(o[0]," or ").concat(o[1]):"of ".concat(d," ").concat(o[0])}else return"of ".concat(d," ").concat(String(o))}function A(o,d,f){return o.substr(!f||f<0?0:+f,d.length)===d}function M(o,d,f){return(f===void 0||f>o.length)&&(f=o.length),o.substring(f-d.length,f)===d}function l(o,d,f){return typeof f!="number"&&(f=0),f+d.length>o.length?!1:o.indexOf(d,f)!==-1}R("ERR_INVALID_OPT_VALUE",function(o,d){return'The value "'+d+'" is invalid for option "'+o+'"'},TypeError),R("ERR_INVALID_ARG_TYPE",function(o,d,f){var _;typeof d=="string"&&A(d,"not ")?(_="must not be",d=d.replace(/^not /,"")):_="must be";var p;if(M(o," argument"))p="The ".concat(o," ").concat(_," ").concat(B(d,"type"));else{var u=l(o,".")?"property":"argument";p='The "'.concat(o,'" ').concat(u," ").concat(_," ").concat(B(d,"type"))}return p+=". Received type ".concat(typeof f),p},TypeError),R("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),R("ERR_METHOD_NOT_IMPLEMENTED",function(o){return"The "+o+" method is not implemented"}),R("ERR_STREAM_PREMATURE_CLOSE","Premature close"),R("ERR_STREAM_DESTROYED",function(o){return"Cannot call "+o+" after a stream was destroyed"}),R("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),R("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),R("ERR_STREAM_WRITE_AFTER_END","write after end"),R("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),R("ERR_UNKNOWN_ENCODING",function(o){return"Unknown encoding: "+o},TypeError),R("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),g.exports.q=k},34390:(g,G,k)=>{"use strict";var R=k(34155),B=Object.keys||function(u){var E=[];for(var h in u)E.push(h);return E};g.exports=f;var A=k(44960),M=k(92010);k(35717)(f,A);for(var l=B(M.prototype),o=0;o<l.length;o++){var d=l[o];f.prototype[d]||(f.prototype[d]=M.prototype[d])}function f(u){if(!(this instanceof f))return new f(u);A.call(this,u),M.call(this,u),this.allowHalfOpen=!0,u&&(u.readable===!1&&(this.readable=!1),u.writable===!1&&(this.writable=!1),u.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",_)))}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(f.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function _(){this._writableState.ended||R.nextTick(p,this)}function p(u){u.end()}Object.defineProperty(f.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(E){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=E,this._writableState.destroyed=E)}})},41294:(g,G,k)=>{"use strict";g.exports=B;var R=k(3912);k(35717)(B,R);function B(A){if(!(this instanceof B))return new B(A);R.call(this,A)}B.prototype._transform=function(A,M,l){l(null,A)}},44960:(g,G,k)=>{"use strict";var R=k(34155);g.exports=O;var B;O.ReadableState=te;var A=k(17187).EventEmitter,M=function(V,le){return V.listeners(le).length},l=k(59819),o=k(48764).Buffer,d=k.g.Uint8Array||function(){};function f($){return o.from($)}function _($){return o.isBuffer($)||$ instanceof d}var p=k(56353),u;p&&p.debuglog?u=p.debuglog("stream"):u=function(){};var E=k(76633),h=k(75997),m=k(898),y=m.getHighWaterMark,C=k(84419).q,D=C.ERR_INVALID_ARG_TYPE,T=C.ERR_STREAM_PUSH_AFTER_EOF,H=C.ERR_METHOD_NOT_IMPLEMENTED,W=C.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Y,re,ie;k(35717)(O,l);var oe=h.errorOrDestroy,ae=["error","close","destroy","pause","resume"];function de($,V,le){if(typeof $.prependListener=="function")return $.prependListener(V,le);!$._events||!$._events[V]?$.on(V,le):Array.isArray($._events[V])?$._events[V].unshift(le):$._events[V]=[le,$._events[V]]}function te($,V,le){B=B||k(34390),$=$||{},typeof le!="boolean"&&(le=V instanceof B),this.objectMode=!!$.objectMode,le&&(this.objectMode=this.objectMode||!!$.readableObjectMode),this.highWaterMark=y(this,$,"readableHighWaterMark",le),this.buffer=new E,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=$.emitClose!==!1,this.autoDestroy=!!$.autoDestroy,this.destroyed=!1,this.defaultEncoding=$.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,$.encoding&&(Y||(Y=k(72221).s),this.decoder=new Y($.encoding),this.encoding=$.encoding)}function O($){if(B=B||k(34390),!(this instanceof O))return new O($);var V=this instanceof B;this._readableState=new te($,this,V),this.readable=!0,$&&(typeof $.read=="function"&&(this._read=$.read),typeof $.destroy=="function"&&(this._destroy=$.destroy)),l.call(this)}Object.defineProperty(O.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(V){!this._readableState||(this._readableState.destroyed=V)}}),O.prototype.destroy=h.destroy,O.prototype._undestroy=h.undestroy,O.prototype._destroy=function($,V){V($)},O.prototype.push=function($,V){var le=this._readableState,Se;return le.objectMode?Se=!0:typeof $=="string"&&(V=V||le.defaultEncoding,V!==le.encoding&&($=o.from($,V),V=""),Se=!0),q(this,$,V,!1,Se)},O.prototype.unshift=function($){return q(this,$,null,!0,!1)};function q($,V,le,Se,De){u("readableAddChunk",V);var pe=$._readableState;if(V===null)pe.reading=!1,L($,pe);else{var He;if(De||(He=a(pe,V)),He)oe($,He);else if(pe.objectMode||V&&V.length>0)if(typeof V!="string"&&!pe.objectMode&&Object.getPrototypeOf(V)!==o.prototype&&(V=f(V)),Se)pe.endEmitted?oe($,new W):x($,pe,V,!0);else if(pe.ended)oe($,new T);else{if(pe.destroyed)return!1;pe.reading=!1,pe.decoder&&!le?(V=pe.decoder.write(V),pe.objectMode||V.length!==0?x($,pe,V,!1):z($,pe)):x($,pe,V,!1)}else Se||(pe.reading=!1,z($,pe))}return!pe.ended&&(pe.length<pe.highWaterMark||pe.length===0)}function x($,V,le,Se){V.flowing&&V.length===0&&!V.sync?(V.awaitDrain=0,$.emit("data",le)):(V.length+=V.objectMode?1:le.length,Se?V.buffer.unshift(le):V.buffer.push(le),V.needReadable&&I($)),z($,V)}function a($,V){var le;return!_(V)&&typeof V!="string"&&V!==void 0&&!$.objectMode&&(le=new D("chunk",["string","Buffer","Uint8Array"],V)),le}O.prototype.isPaused=function(){return this._readableState.flowing===!1},O.prototype.setEncoding=function($){Y||(Y=k(72221).s);var V=new Y($);this._readableState.decoder=V,this._readableState.encoding=this._readableState.decoder.encoding;for(var le=this._readableState.buffer.head,Se="";le!==null;)Se+=V.write(le.data),le=le.next;return this._readableState.buffer.clear(),Se!==""&&this._readableState.buffer.push(Se),this._readableState.length=Se.length,this};var b=1073741824;function P($){return $>=b?$=b:($--,$|=$>>>1,$|=$>>>2,$|=$>>>4,$|=$>>>8,$|=$>>>16,$++),$}function F($,V){return $<=0||V.length===0&&V.ended?0:V.objectMode?1:$!==$?V.flowing&&V.length?V.buffer.head.data.length:V.length:($>V.highWaterMark&&(V.highWaterMark=P($)),$<=V.length?$:V.ended?V.length:(V.needReadable=!0,0))}O.prototype.read=function($){u("read",$),$=parseInt($,10);var V=this._readableState,le=$;if($!==0&&(V.emittedReadable=!1),$===0&&V.needReadable&&((V.highWaterMark!==0?V.length>=V.highWaterMark:V.length>0)||V.ended))return u("read: emitReadable",V.length,V.ended),V.length===0&&V.ended?fe(this):I(this),null;if($=F($,V),$===0&&V.ended)return V.length===0&&fe(this),null;var Se=V.needReadable;u("need readable",Se),(V.length===0||V.length-$<V.highWaterMark)&&(Se=!0,u("length less than watermark",Se)),V.ended||V.reading?(Se=!1,u("reading or ended",Se)):Se&&(u("do read"),V.reading=!0,V.sync=!0,V.length===0&&(V.needReadable=!0),this._read(V.highWaterMark),V.sync=!1,V.reading||($=F(le,V)));var De;return $>0?De=Z($,V):De=null,De===null?(V.needReadable=V.length<=V.highWaterMark,$=0):(V.length-=$,V.awaitDrain=0),V.length===0&&(V.ended||(V.needReadable=!0),le!==$&&V.ended&&fe(this)),De!==null&&this.emit("data",De),De};function L($,V){if(u("onEofChunk"),!V.ended){if(V.decoder){var le=V.decoder.end();le&&le.length&&(V.buffer.push(le),V.length+=V.objectMode?1:le.length)}V.ended=!0,V.sync?I($):(V.needReadable=!1,V.emittedReadable||(V.emittedReadable=!0,K($)))}}function I($){var V=$._readableState;u("emitReadable",V.needReadable,V.emittedReadable),V.needReadable=!1,V.emittedReadable||(u("emitReadable",V.flowing),V.emittedReadable=!0,R.nextTick(K,$))}function K($){var V=$._readableState;u("emitReadable_",V.destroyed,V.length,V.ended),!V.destroyed&&(V.length||V.ended)&&($.emit("readable"),V.emittedReadable=!1),V.needReadable=!V.flowing&&!V.ended&&V.length<=V.highWaterMark,J($)}function z($,V){V.readingMore||(V.readingMore=!0,R.nextTick(w,$,V))}function w($,V){for(;!V.reading&&!V.ended&&(V.length<V.highWaterMark||V.flowing&&V.length===0);){var le=V.length;if(u("maybeReadMore read 0"),$.read(0),le===V.length)break}V.readingMore=!1}O.prototype._read=function($){oe(this,new H("_read()"))},O.prototype.pipe=function($,V){var le=this,Se=this._readableState;switch(Se.pipesCount){case 0:Se.pipes=$;break;case 1:Se.pipes=[Se.pipes,$];break;default:Se.pipes.push($);break}Se.pipesCount+=1,u("pipe count=%d opts=%j",Se.pipesCount,V);var De=(!V||V.end!==!1)&&$!==R.stdout&&$!==R.stderr,pe=De?Ve:ee;Se.endEmitted?R.nextTick(pe):le.once("end",pe),$.on("unpipe",He);function He(ue,me){u("onunpipe"),ue===le&&me&&me.hasUnpiped===!1&&(me.hasUnpiped=!0,Ke())}function Ve(){u("onend"),$.end()}var qe=j(le);$.on("drain",qe);var Ut=!1;function Ke(){u("cleanup"),$.removeListener("close",se),$.removeListener("finish",Q),$.removeListener("drain",qe),$.removeListener("error",Gt),$.removeListener("unpipe",He),le.removeListener("end",Ve),le.removeListener("end",ee),le.removeListener("data",ze),Ut=!0,Se.awaitDrain&&(!$._writableState||$._writableState.needDrain)&&qe()}le.on("data",ze);function ze(ue){u("ondata");var me=$.write(ue);u("dest.write",me),me===!1&&((Se.pipesCount===1&&Se.pipes===$||Se.pipesCount>1&&Ee(Se.pipes,$)!==-1)&&!Ut&&(u("false write response, pause",Se.awaitDrain),Se.awaitDrain++),le.pause())}function Gt(ue){u("onerror",ue),ee(),$.removeListener("error",Gt),M($,"error")===0&&oe($,ue)}de($,"error",Gt);function se(){$.removeListener("finish",Q),ee()}$.once("close",se);function Q(){u("onfinish"),$.removeListener("close",se),ee()}$.once("finish",Q);function ee(){u("unpipe"),le.unpipe($)}return $.emit("pipe",le),Se.flowing||(u("pipe resume"),le.resume()),$};function j($){return function(){var le=$._readableState;u("pipeOnDrain",le.awaitDrain),le.awaitDrain&&le.awaitDrain--,le.awaitDrain===0&&M($,"data")&&(le.flowing=!0,J($))}}O.prototype.unpipe=function($){var V=this._readableState,le={hasUnpiped:!1};if(V.pipesCount===0)return this;if(V.pipesCount===1)return $&&$!==V.pipes?this:($||($=V.pipes),V.pipes=null,V.pipesCount=0,V.flowing=!1,$&&$.emit("unpipe",this,le),this);if(!$){var Se=V.pipes,De=V.pipesCount;V.pipes=null,V.pipesCount=0,V.flowing=!1;for(var pe=0;pe<De;pe++)Se[pe].emit("unpipe",this,{hasUnpiped:!1});return this}var He=Ee(V.pipes,$);return He===-1?this:(V.pipes.splice(He,1),V.pipesCount-=1,V.pipesCount===1&&(V.pipes=V.pipes[0]),$.emit("unpipe",this,le),this)},O.prototype.on=function($,V){var le=l.prototype.on.call(this,$,V),Se=this._readableState;return $==="data"?(Se.readableListening=this.listenerCount("readable")>0,Se.flowing!==!1&&this.resume()):$==="readable"&&!Se.endEmitted&&!Se.readableListening&&(Se.readableListening=Se.needReadable=!0,Se.flowing=!1,Se.emittedReadable=!1,u("on readable",Se.length,Se.reading),Se.length?I(this):Se.reading||R.nextTick(_e,this)),le},O.prototype.addListener=O.prototype.on,O.prototype.removeListener=function($,V){var le=l.prototype.removeListener.call(this,$,V);return $==="readable"&&R.nextTick(he,this),le},O.prototype.removeAllListeners=function($){var V=l.prototype.removeAllListeners.apply(this,arguments);return($==="readable"||$===void 0)&&R.nextTick(he,this),V};function he($){var V=$._readableState;V.readableListening=$.listenerCount("readable")>0,V.resumeScheduled&&!V.paused?V.flowing=!0:$.listenerCount("data")>0&&$.resume()}function _e($){u("readable nexttick read 0"),$.read(0)}O.prototype.resume=function(){var $=this._readableState;return $.flowing||(u("resume"),$.flowing=!$.readableListening,Re(this,$)),$.paused=!1,this};function Re($,V){V.resumeScheduled||(V.resumeScheduled=!0,R.nextTick(Ie,$,V))}function Ie($,V){u("resume",V.reading),V.reading||$.read(0),V.resumeScheduled=!1,$.emit("resume"),J($),V.flowing&&!V.reading&&$.read(0)}O.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function J($){var V=$._readableState;for(u("flow",V.flowing);V.flowing&&$.read()!==null;);}O.prototype.wrap=function($){var V=this,le=this._readableState,Se=!1;$.on("end",function(){if(u("wrapped end"),le.decoder&&!le.ended){var He=le.decoder.end();He&&He.length&&V.push(He)}V.push(null)}),$.on("data",function(He){if(u("wrapped data"),le.decoder&&(He=le.decoder.write(He)),!(le.objectMode&&He==null)&&!(!le.objectMode&&(!He||!He.length))){var Ve=V.push(He);Ve||(Se=!0,$.pause())}});for(var De in $)this[De]===void 0&&typeof $[De]=="function"&&(this[De]=function(Ve){return function(){return $[Ve].apply($,arguments)}}(De));for(var pe=0;pe<ae.length;pe++)$.on(ae[pe],this.emit.bind(this,ae[pe]));return this._read=function(He){u("wrapped _read",He),Se&&(Se=!1,$.resume())},this},typeof Symbol=="function"&&(O.prototype[Symbol.asyncIterator]=function(){return re===void 0&&(re=k(54887)),re(this)}),Object.defineProperty(O.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(O.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(O.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(V){this._readableState&&(this._readableState.flowing=V)}}),O._fromList=Z,Object.defineProperty(O.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function Z($,V){if(V.length===0)return null;var le;return V.objectMode?le=V.buffer.shift():!$||$>=V.length?(V.decoder?le=V.buffer.join(""):V.buffer.length===1?le=V.buffer.first():le=V.buffer.concat(V.length),V.buffer.clear()):le=V.buffer.consume($,V.decoder),le}function fe($){var V=$._readableState;u("endReadable",V.endEmitted),V.endEmitted||(V.ended=!0,R.nextTick(we,V,$))}function we($,V){if(u("endReadableNT",$.endEmitted,$.length),!$.endEmitted&&$.length===0&&($.endEmitted=!0,V.readable=!1,V.emit("end"),$.autoDestroy)){var le=V._writableState;(!le||le.autoDestroy&&le.finished)&&V.destroy()}}typeof Symbol=="function"&&(O.from=function($,V){return ie===void 0&&(ie=k(98859)),ie(O,$,V)});function Ee($,V){for(var le=0,Se=$.length;le<Se;le++)if($[le]===V)return le;return-1}},3912:(g,G,k)=>{"use strict";g.exports=f;var R=k(84419).q,B=R.ERR_METHOD_NOT_IMPLEMENTED,A=R.ERR_MULTIPLE_CALLBACK,M=R.ERR_TRANSFORM_ALREADY_TRANSFORMING,l=R.ERR_TRANSFORM_WITH_LENGTH_0,o=k(34390);k(35717)(f,o);function d(u,E){var h=this._transformState;h.transforming=!1;var m=h.writecb;if(m===null)return this.emit("error",new A);h.writechunk=null,h.writecb=null,E!=null&&this.push(E),m(u);var y=this._readableState;y.reading=!1,(y.needReadable||y.length<y.highWaterMark)&&this._read(y.highWaterMark)}function f(u){if(!(this instanceof f))return new f(u);o.call(this,u),this._transformState={afterTransform:d.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,u&&(typeof u.transform=="function"&&(this._transform=u.transform),typeof u.flush=="function"&&(this._flush=u.flush)),this.on("prefinish",_)}function _(){var u=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(E,h){p(u,E,h)}):p(this,null,null)}f.prototype.push=function(u,E){return this._transformState.needTransform=!1,o.prototype.push.call(this,u,E)},f.prototype._transform=function(u,E,h){h(new B("_transform()"))},f.prototype._write=function(u,E,h){var m=this._transformState;if(m.writecb=h,m.writechunk=u,m.writeencoding=E,!m.transforming){var y=this._readableState;(m.needTransform||y.needReadable||y.length<y.highWaterMark)&&this._read(y.highWaterMark)}},f.prototype._read=function(u){var E=this._transformState;E.writechunk!==null&&!E.transforming?(E.transforming=!0,this._transform(E.writechunk,E.writeencoding,E.afterTransform)):E.needTransform=!0},f.prototype._destroy=function(u,E){o.prototype._destroy.call(this,u,function(h){E(h)})};function p(u,E,h){if(E)return u.emit("error",E);if(h!=null&&u.push(h),u._writableState.length)throw new l;if(u._transformState.transforming)throw new M;return u.push(null)}},92010:(g,G,k)=>{"use strict";var R=k(34155);g.exports=te;function B(J,Z,fe){this.chunk=J,this.encoding=Z,this.callback=fe,this.next=null}function A(J){var Z=this;this.next=null,this.entry=null,this.finish=function(){Ie(Z,J)}}var M;te.WritableState=ae;var l={deprecate:k(94927)},o=k(59819),d=k(48764).Buffer,f=k.g.Uint8Array||function(){};function _(J){return d.from(J)}function p(J){return d.isBuffer(J)||J instanceof f}var u=k(75997),E=k(898),h=E.getHighWaterMark,m=k(84419).q,y=m.ERR_INVALID_ARG_TYPE,C=m.ERR_METHOD_NOT_IMPLEMENTED,D=m.ERR_MULTIPLE_CALLBACK,T=m.ERR_STREAM_CANNOT_PIPE,H=m.ERR_STREAM_DESTROYED,W=m.ERR_STREAM_NULL_VALUES,Y=m.ERR_STREAM_WRITE_AFTER_END,re=m.ERR_UNKNOWN_ENCODING,ie=u.errorOrDestroy;k(35717)(te,o);function oe(){}function ae(J,Z,fe){M=M||k(34390),J=J||{},typeof fe!="boolean"&&(fe=Z instanceof M),this.objectMode=!!J.objectMode,fe&&(this.objectMode=this.objectMode||!!J.writableObjectMode),this.highWaterMark=h(this,J,"writableHighWaterMark",fe),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var we=J.decodeStrings===!1;this.decodeStrings=!we,this.defaultEncoding=J.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Ee){L(Z,Ee)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=J.emitClose!==!1,this.autoDestroy=!!J.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new A(this)}ae.prototype.getBuffer=function(){for(var Z=this.bufferedRequest,fe=[];Z;)fe.push(Z),Z=Z.next;return fe},function(){try{Object.defineProperty(ae.prototype,"buffer",{get:l.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(J){}}();var de;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(de=Function.prototype[Symbol.hasInstance],Object.defineProperty(te,Symbol.hasInstance,{value:function(Z){return de.call(this,Z)?!0:this!==te?!1:Z&&Z._writableState instanceof ae}})):de=function(Z){return Z instanceof this};function te(J){M=M||k(34390);var Z=this instanceof M;if(!Z&&!de.call(te,this))return new te(J);this._writableState=new ae(J,this,Z),this.writable=!0,J&&(typeof J.write=="function"&&(this._write=J.write),typeof J.writev=="function"&&(this._writev=J.writev),typeof J.destroy=="function"&&(this._destroy=J.destroy),typeof J.final=="function"&&(this._final=J.final)),o.call(this)}te.prototype.pipe=function(){ie(this,new T)};function O(J,Z){var fe=new Y;ie(J,fe),R.nextTick(Z,fe)}function q(J,Z,fe,we){var Ee;return fe===null?Ee=new W:typeof fe!="string"&&!Z.objectMode&&(Ee=new y("chunk",["string","Buffer"],fe)),Ee?(ie(J,Ee),R.nextTick(we,Ee),!1):!0}te.prototype.write=function(J,Z,fe){var we=this._writableState,Ee=!1,$=!we.objectMode&&p(J);return $&&!d.isBuffer(J)&&(J=_(J)),typeof Z=="function"&&(fe=Z,Z=null),$?Z="buffer":Z||(Z=we.defaultEncoding),typeof fe!="function"&&(fe=oe),we.ending?O(this,fe):($||q(this,we,J,fe))&&(we.pendingcb++,Ee=a(this,we,$,J,Z,fe)),Ee},te.prototype.cork=function(){this._writableState.corked++},te.prototype.uncork=function(){var J=this._writableState;J.corked&&(J.corked--,!J.writing&&!J.corked&&!J.bufferProcessing&&J.bufferedRequest&&z(this,J))},te.prototype.setDefaultEncoding=function(Z){if(typeof Z=="string"&&(Z=Z.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Z+"").toLowerCase())>-1))throw new re(Z);return this._writableState.defaultEncoding=Z,this},Object.defineProperty(te.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function x(J,Z,fe){return!J.objectMode&&J.decodeStrings!==!1&&typeof Z=="string"&&(Z=d.from(Z,fe)),Z}Object.defineProperty(te.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function a(J,Z,fe,we,Ee,$){if(!fe){var V=x(Z,we,Ee);we!==V&&(fe=!0,Ee="buffer",we=V)}var le=Z.objectMode?1:we.length;Z.length+=le;var Se=Z.length<Z.highWaterMark;if(Se||(Z.needDrain=!0),Z.writing||Z.corked){var De=Z.lastBufferedRequest;Z.lastBufferedRequest={chunk:we,encoding:Ee,isBuf:fe,callback:$,next:null},De?De.next=Z.lastBufferedRequest:Z.bufferedRequest=Z.lastBufferedRequest,Z.bufferedRequestCount+=1}else b(J,Z,!1,le,we,Ee,$);return Se}function b(J,Z,fe,we,Ee,$,V){Z.writelen=we,Z.writecb=V,Z.writing=!0,Z.sync=!0,Z.destroyed?Z.onwrite(new H("write")):fe?J._writev(Ee,Z.onwrite):J._write(Ee,$,Z.onwrite),Z.sync=!1}function P(J,Z,fe,we,Ee){--Z.pendingcb,fe?(R.nextTick(Ee,we),R.nextTick(_e,J,Z),J._writableState.errorEmitted=!0,ie(J,we)):(Ee(we),J._writableState.errorEmitted=!0,ie(J,we),_e(J,Z))}function F(J){J.writing=!1,J.writecb=null,J.length-=J.writelen,J.writelen=0}function L(J,Z){var fe=J._writableState,we=fe.sync,Ee=fe.writecb;if(typeof Ee!="function")throw new D;if(F(fe),Z)P(J,fe,we,Z,Ee);else{var $=w(fe)||J.destroyed;!$&&!fe.corked&&!fe.bufferProcessing&&fe.bufferedRequest&&z(J,fe),we?R.nextTick(I,J,fe,$,Ee):I(J,fe,$,Ee)}}function I(J,Z,fe,we){fe||K(J,Z),Z.pendingcb--,we(),_e(J,Z)}function K(J,Z){Z.length===0&&Z.needDrain&&(Z.needDrain=!1,J.emit("drain"))}function z(J,Z){Z.bufferProcessing=!0;var fe=Z.bufferedRequest;if(J._writev&&fe&&fe.next){var we=Z.bufferedRequestCount,Ee=new Array(we),$=Z.corkedRequestsFree;$.entry=fe;for(var V=0,le=!0;fe;)Ee[V]=fe,fe.isBuf||(le=!1),fe=fe.next,V+=1;Ee.allBuffers=le,b(J,Z,!0,Z.length,Ee,"",$.finish),Z.pendingcb++,Z.lastBufferedRequest=null,$.next?(Z.corkedRequestsFree=$.next,$.next=null):Z.corkedRequestsFree=new A(Z),Z.bufferedRequestCount=0}else{for(;fe;){var Se=fe.chunk,De=fe.encoding,pe=fe.callback,He=Z.objectMode?1:Se.length;if(b(J,Z,!1,He,Se,De,pe),fe=fe.next,Z.bufferedRequestCount--,Z.writing)break}fe===null&&(Z.lastBufferedRequest=null)}Z.bufferedRequest=fe,Z.bufferProcessing=!1}te.prototype._write=function(J,Z,fe){fe(new C("_write()"))},te.prototype._writev=null,te.prototype.end=function(J,Z,fe){var we=this._writableState;return typeof J=="function"?(fe=J,J=null,Z=null):typeof Z=="function"&&(fe=Z,Z=null),J!=null&&this.write(J,Z),we.corked&&(we.corked=1,this.uncork()),we.ending||Re(this,we,fe),this},Object.defineProperty(te.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function w(J){return J.ending&&J.length===0&&J.bufferedRequest===null&&!J.finished&&!J.writing}function j(J,Z){J._final(function(fe){Z.pendingcb--,fe&&ie(J,fe),Z.prefinished=!0,J.emit("prefinish"),_e(J,Z)})}function he(J,Z){!Z.prefinished&&!Z.finalCalled&&(typeof J._final=="function"&&!Z.destroyed?(Z.pendingcb++,Z.finalCalled=!0,R.nextTick(j,J,Z)):(Z.prefinished=!0,J.emit("prefinish")))}function _e(J,Z){var fe=w(Z);if(fe&&(he(J,Z),Z.pendingcb===0&&(Z.finished=!0,J.emit("finish"),Z.autoDestroy))){var we=J._readableState;(!we||we.autoDestroy&&we.endEmitted)&&J.destroy()}return fe}function Re(J,Z,fe){Z.ending=!0,_e(J,Z),fe&&(Z.finished?R.nextTick(fe):J.once("finish",fe)),Z.ended=!0,J.writable=!1}function Ie(J,Z,fe){var we=J.entry;for(J.entry=null;we;){var Ee=we.callback;Z.pendingcb--,Ee(fe),we=we.next}Z.corkedRequestsFree.next=J}Object.defineProperty(te.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(Z){!this._writableState||(this._writableState.destroyed=Z)}}),te.prototype.destroy=u.destroy,te.prototype._undestroy=u.undestroy,te.prototype._destroy=function(J,Z){Z(J)}},54887:(g,G,k)=>{"use strict";var R=k(34155),B;function A(H,W,Y){return W in H?Object.defineProperty(H,W,{value:Y,enumerable:!0,configurable:!0,writable:!0}):H[W]=Y,H}var M=k(5800),l=Symbol("lastResolve"),o=Symbol("lastReject"),d=Symbol("error"),f=Symbol("ended"),_=Symbol("lastPromise"),p=Symbol("handlePromise"),u=Symbol("stream");function E(H,W){return{value:H,done:W}}function h(H){var W=H[l];if(W!==null){var Y=H[u].read();Y!==null&&(H[_]=null,H[l]=null,H[o]=null,W(E(Y,!1)))}}function m(H){R.nextTick(h,H)}function y(H,W){return function(Y,re){H.then(function(){if(W[f]){Y(E(void 0,!0));return}W[p](Y,re)},re)}}var C=Object.getPrototypeOf(function(){}),D=Object.setPrototypeOf((B={get stream(){return this[u]},next:function(){var W=this,Y=this[d];if(Y!==null)return Promise.reject(Y);if(this[f])return Promise.resolve(E(void 0,!0));if(this[u].destroyed)return new Promise(function(ae,de){R.nextTick(function(){W[d]?de(W[d]):ae(E(void 0,!0))})});var re=this[_],ie;if(re)ie=new Promise(y(re,this));else{var oe=this[u].read();if(oe!==null)return Promise.resolve(E(oe,!1));ie=new Promise(this[p])}return this[_]=ie,ie}},A(B,Symbol.asyncIterator,function(){return this}),A(B,"return",function(){var W=this;return new Promise(function(Y,re){W[u].destroy(null,function(ie){if(ie){re(ie);return}Y(E(void 0,!0))})})}),B),C),T=function(W){var Y,re=Object.create(D,(Y={},A(Y,u,{value:W,writable:!0}),A(Y,l,{value:null,writable:!0}),A(Y,o,{value:null,writable:!0}),A(Y,d,{value:null,writable:!0}),A(Y,f,{value:W._readableState.endEmitted,writable:!0}),A(Y,p,{value:function(oe,ae){var de=re[u].read();de?(re[_]=null,re[l]=null,re[o]=null,oe(E(de,!1))):(re[l]=oe,re[o]=ae)},writable:!0}),Y));return re[_]=null,M(W,function(ie){if(ie&&ie.code!=="ERR_STREAM_PREMATURE_CLOSE"){var oe=re[o];oe!==null&&(re[_]=null,re[l]=null,re[o]=null,oe(ie)),re[d]=ie;return}var ae=re[l];ae!==null&&(re[_]=null,re[l]=null,re[o]=null,ae(E(void 0,!0))),re[f]=!0}),W.on("readable",m.bind(null,re)),re};g.exports=T},76633:(g,G,k)=>{"use strict";function R(h,m){var y=Object.keys(h);if(Object.getOwnPropertySymbols){var C=Object.getOwnPropertySymbols(h);m&&(C=C.filter(function(D){return Object.getOwnPropertyDescriptor(h,D).enumerable})),y.push.apply(y,C)}return y}function B(h){for(var m=1;m<arguments.length;m++){var y=arguments[m]!=null?arguments[m]:{};m%2?R(Object(y),!0).forEach(function(C){A(h,C,y[C])}):Object.getOwnPropertyDescriptors?Object.defineProperties(h,Object.getOwnPropertyDescriptors(y)):R(Object(y)).forEach(function(C){Object.defineProperty(h,C,Object.getOwnPropertyDescriptor(y,C))})}return h}function A(h,m,y){return m in h?Object.defineProperty(h,m,{value:y,enumerable:!0,configurable:!0,writable:!0}):h[m]=y,h}function M(h,m){if(!(h instanceof m))throw new TypeError("Cannot call a class as a function")}function l(h,m){for(var y=0;y<m.length;y++){var C=m[y];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(h,C.key,C)}}function o(h,m,y){return m&&l(h.prototype,m),y&&l(h,y),h}var d=k(48764),f=d.Buffer,_=k(96419),p=_.inspect,u=p&&p.custom||"inspect";function E(h,m,y){f.prototype.copy.call(h,m,y)}g.exports=function(){function h(){M(this,h),this.head=null,this.tail=null,this.length=0}return o(h,[{key:"push",value:function(y){var C={data:y,next:null};this.length>0?this.tail.next=C:this.head=C,this.tail=C,++this.length}},{key:"unshift",value:function(y){var C={data:y,next:this.head};this.length===0&&(this.tail=C),this.head=C,++this.length}},{key:"shift",value:function(){if(this.length!==0){var y=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,y}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(y){if(this.length===0)return"";for(var C=this.head,D=""+C.data;C=C.next;)D+=y+C.data;return D}},{key:"concat",value:function(y){if(this.length===0)return f.alloc(0);for(var C=f.allocUnsafe(y>>>0),D=this.head,T=0;D;)E(D.data,C,T),T+=D.data.length,D=D.next;return C}},{key:"consume",value:function(y,C){var D;return y<this.head.data.length?(D=this.head.data.slice(0,y),this.head.data=this.head.data.slice(y)):y===this.head.data.length?D=this.shift():D=C?this._getString(y):this._getBuffer(y),D}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(y){var C=this.head,D=1,T=C.data;for(y-=T.length;C=C.next;){var H=C.data,W=y>H.length?H.length:y;if(W===H.length?T+=H:T+=H.slice(0,y),y-=W,y===0){W===H.length?(++D,C.next?this.head=C.next:this.head=this.tail=null):(this.head=C,C.data=H.slice(W));break}++D}return this.length-=D,T}},{key:"_getBuffer",value:function(y){var C=f.allocUnsafe(y),D=this.head,T=1;for(D.data.copy(C),y-=D.data.length;D=D.next;){var H=D.data,W=y>H.length?H.length:y;if(H.copy(C,C.length-y,0,W),y-=W,y===0){W===H.length?(++T,D.next?this.head=D.next:this.head=this.tail=null):(this.head=D,D.data=H.slice(W));break}++T}return this.length-=T,C}},{key:u,value:function(y,C){return p(this,B({},C,{depth:0,customInspect:!1}))}}]),h}()},75997:(g,G,k)=>{"use strict";var R=k(34155);function B(f,_){var p=this,u=this._readableState&&this._readableState.destroyed,E=this._writableState&&this._writableState.destroyed;return u||E?(_?_(f):f&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,R.nextTick(o,this,f)):R.nextTick(o,this,f)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(f||null,function(h){!_&&h?p._writableState?p._writableState.errorEmitted?R.nextTick(M,p):(p._writableState.errorEmitted=!0,R.nextTick(A,p,h)):R.nextTick(A,p,h):_?(R.nextTick(M,p),_(h)):R.nextTick(M,p)}),this)}function A(f,_){o(f,_),M(f)}function M(f){f._writableState&&!f._writableState.emitClose||f._readableState&&!f._readableState.emitClose||f.emit("close")}function l(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function o(f,_){f.emit("error",_)}function d(f,_){var p=f._readableState,u=f._writableState;p&&p.autoDestroy||u&&u.autoDestroy?f.destroy(_):f.emit("error",_)}g.exports={destroy:B,undestroy:l,errorOrDestroy:d}},5800:(g,G,k)=>{"use strict";var R=k(84419).q.ERR_STREAM_PREMATURE_CLOSE;function B(o){var d=!1;return function(){if(!d){d=!0;for(var f=arguments.length,_=new Array(f),p=0;p<f;p++)_[p]=arguments[p];o.apply(this,_)}}}function A(){}function M(o){return o.setHeader&&typeof o.abort=="function"}function l(o,d,f){if(typeof d=="function")return l(o,null,d);d||(d={}),f=B(f||A);var _=d.readable||d.readable!==!1&&o.readable,p=d.writable||d.writable!==!1&&o.writable,u=function(){o.writable||h()},E=o._writableState&&o._writableState.finished,h=function(){p=!1,E=!0,_||f.call(o)},m=o._readableState&&o._readableState.endEmitted,y=function(){_=!1,m=!0,p||f.call(o)},C=function(W){f.call(o,W)},D=function(){var W;if(_&&!m)return(!o._readableState||!o._readableState.ended)&&(W=new R),f.call(o,W);if(p&&!E)return(!o._writableState||!o._writableState.ended)&&(W=new R),f.call(o,W)},T=function(){o.req.on("finish",h)};return M(o)?(o.on("complete",h),o.on("abort",D),o.req?T():o.on("request",T)):p&&!o._writableState&&(o.on("end",u),o.on("close",u)),o.on("end",y),o.on("finish",h),d.error!==!1&&o.on("error",C),o.on("close",D),function(){o.removeListener("complete",h),o.removeListener("abort",D),o.removeListener("request",T),o.req&&o.req.removeListener("finish",h),o.removeListener("end",u),o.removeListener("close",u),o.removeListener("finish",h),o.removeListener("end",y),o.removeListener("error",C),o.removeListener("close",D)}}g.exports=l},98859:g=>{g.exports=function(){throw new Error("Readable.from is not available in the browser")}},37065:(g,G,k)=>{"use strict";var R;function B(h){var m=!1;return function(){m||(m=!0,h.apply(void 0,arguments))}}var A=k(84419).q,M=A.ERR_MISSING_ARGS,l=A.ERR_STREAM_DESTROYED;function o(h){if(h)throw h}function d(h){return h.setHeader&&typeof h.abort=="function"}function f(h,m,y,C){C=B(C);var D=!1;h.on("close",function(){D=!0}),R===void 0&&(R=k(5800)),R(h,{readable:m,writable:y},function(H){if(H)return C(H);D=!0,C()});var T=!1;return function(H){if(!D&&!T){if(T=!0,d(h))return h.abort();if(typeof h.destroy=="function")return h.destroy();C(H||new l("pipe"))}}}function _(h){h()}function p(h,m){return h.pipe(m)}function u(h){return!h.length||typeof h[h.length-1]!="function"?o:h.pop()}function E(){for(var h=arguments.length,m=new Array(h),y=0;y<h;y++)m[y]=arguments[y];var C=u(m);if(Array.isArray(m[0])&&(m=m[0]),m.length<2)throw new M("streams");var D,T=m.map(function(H,W){var Y=W<m.length-1,re=W>0;return f(H,Y,re,function(ie){D||(D=ie),ie&&T.forEach(_),!Y&&(T.forEach(_),C(D))})});return m.reduce(p)}g.exports=E},898:(g,G,k)=>{"use strict";var R=k(84419).q.ERR_INVALID_OPT_VALUE;function B(M,l,o){return M.highWaterMark!=null?M.highWaterMark:l?M[o]:null}function A(M,l,o,d){var f=B(l,d,o);if(f!=null){if(!(isFinite(f)&&Math.floor(f)===f)||f<0){var _=d?o:"highWaterMark";throw new R(_,f)}return Math.floor(f)}return M.objectMode?16:16*1024}g.exports={getHighWaterMark:A}},59819:(g,G,k)=>{g.exports=k(17187).EventEmitter},23872:(g,G,k)=>{G=g.exports=k(44960),G.Stream=G,G.Readable=G,G.Writable=k(92010),G.Duplex=k(34390),G.Transform=k(3912),G.PassThrough=k(41294),G.finished=k(5800),G.pipeline=k(37065)},72221:(g,G,k)=>{"use strict";var R=k(89509).Buffer,B=R.isEncoding||function(T){switch(T=""+T,T&&T.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function A(T){if(!T)return"utf8";for(var H;;)switch(T){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return T;default:if(H)return;T=(""+T).toLowerCase(),H=!0}}function M(T){var H=A(T);if(typeof H!="string"&&(R.isEncoding===B||!B(T)))throw new Error("Unknown encoding: "+T);return H||T}G.s=l;function l(T){this.encoding=M(T);var H;switch(this.encoding){case"utf16le":this.text=E,this.end=h,H=4;break;case"utf8":this.fillLast=_,H=4;break;case"base64":this.text=m,this.end=y,H=3;break;default:this.write=C,this.end=D;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=R.allocUnsafe(H)}l.prototype.write=function(T){if(T.length===0)return"";var H,W;if(this.lastNeed){if(H=this.fillLast(T),H===void 0)return"";W=this.lastNeed,this.lastNeed=0}else W=0;return W<T.length?H?H+this.text(T,W):this.text(T,W):H||""},l.prototype.end=u,l.prototype.text=p,l.prototype.fillLast=function(T){if(this.lastNeed<=T.length)return T.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);T.copy(this.lastChar,this.lastTotal-this.lastNeed,0,T.length),this.lastNeed-=T.length};function o(T){return T<=127?0:T>>5==6?2:T>>4==14?3:T>>3==30?4:T>>6==2?-1:-2}function d(T,H,W){var Y=H.length-1;if(Y<W)return 0;var re=o(H[Y]);return re>=0?(re>0&&(T.lastNeed=re-1),re):--Y<W||re===-2?0:(re=o(H[Y]),re>=0?(re>0&&(T.lastNeed=re-2),re):--Y<W||re===-2?0:(re=o(H[Y]),re>=0?(re>0&&(re===2?re=0:T.lastNeed=re-3),re):0))}function f(T,H,W){if((H[0]&192)!=128)return T.lastNeed=0,"\uFFFD";if(T.lastNeed>1&&H.length>1){if((H[1]&192)!=128)return T.lastNeed=1,"\uFFFD";if(T.lastNeed>2&&H.length>2&&(H[2]&192)!=128)return T.lastNeed=2,"\uFFFD"}}function _(T){var H=this.lastTotal-this.lastNeed,W=f(this,T,H);if(W!==void 0)return W;if(this.lastNeed<=T.length)return T.copy(this.lastChar,H,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);T.copy(this.lastChar,H,0,T.length),this.lastNeed-=T.length}function p(T,H){var W=d(this,T,H);if(!this.lastNeed)return T.toString("utf8",H);this.lastTotal=W;var Y=T.length-(W-this.lastNeed);return T.copy(this.lastChar,0,Y),T.toString("utf8",H,Y)}function u(T){var H=T&&T.length?this.write(T):"";return this.lastNeed?H+"\uFFFD":H}function E(T,H){if((T.length-H)%2==0){var W=T.toString("utf16le",H);if(W){var Y=W.charCodeAt(W.length-1);if(Y>=55296&&Y<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=T[T.length-2],this.lastChar[1]=T[T.length-1],W.slice(0,-1)}return W}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=T[T.length-1],T.toString("utf16le",H,T.length-1)}function h(T){var H=T&&T.length?this.write(T):"";if(this.lastNeed){var W=this.lastTotal-this.lastNeed;return H+this.lastChar.toString("utf16le",0,W)}return H}function m(T,H){var W=(T.length-H)%3;return W===0?T.toString("base64",H):(this.lastNeed=3-W,this.lastTotal=3,W===1?this.lastChar[0]=T[T.length-1]:(this.lastChar[0]=T[T.length-2],this.lastChar[1]=T[T.length-1]),T.toString("base64",H,T.length-W))}function y(T){var H=T&&T.length?this.write(T):"";return this.lastNeed?H+this.lastChar.toString("base64",0,3-this.lastNeed):H}function C(T){return T.toString(this.encoding)}function D(T){return T&&T.length?this.write(T):""}},67295:g=>{g.exports=function(k,R){for(var B=Math.min(k.length,R.length),A=new Buffer(B),M=0;M<B;++M)A[M]=k[M]^R[M];return A}},48764:(g,G,k)=>{"use strict";/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/const R=k(79742),B=k(80645),A=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;G.Buffer=d,G.SlowBuffer=T,G.INSPECT_MAX_BYTES=50;const M=2147483647;G.kMaxLength=M,d.TYPED_ARRAY_SUPPORT=l(),!d.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.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.");function l(){try{const se=new Uint8Array(1),Q={foo:function(){return 42}};return Object.setPrototypeOf(Q,Uint8Array.prototype),Object.setPrototypeOf(se,Q),se.foo()===42}catch(se){return!1}}Object.defineProperty(d.prototype,"parent",{enumerable:!0,get:function(){if(!!d.isBuffer(this))return this.buffer}}),Object.defineProperty(d.prototype,"offset",{enumerable:!0,get:function(){if(!!d.isBuffer(this))return this.byteOffset}});function o(se){if(se>M)throw new RangeError('The value "'+se+'" is invalid for option "size"');const Q=new Uint8Array(se);return Object.setPrototypeOf(Q,d.prototype),Q}function d(se,Q,ee){if(typeof se=="number"){if(typeof Q=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return u(se)}return f(se,Q,ee)}d.poolSize=8192;function f(se,Q,ee){if(typeof se=="string")return E(se,Q);if(ArrayBuffer.isView(se))return m(se);if(se==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof se);if(qe(se,ArrayBuffer)||se&&qe(se.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(qe(se,SharedArrayBuffer)||se&&qe(se.buffer,SharedArrayBuffer)))return y(se,Q,ee);if(typeof se=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const ue=se.valueOf&&se.valueOf();if(ue!=null&&ue!==se)return d.from(ue,Q,ee);const me=C(se);if(me)return me;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof se[Symbol.toPrimitive]=="function")return d.from(se[Symbol.toPrimitive]("string"),Q,ee);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof se)}d.from=function(se,Q,ee){return f(se,Q,ee)},Object.setPrototypeOf(d.prototype,Uint8Array.prototype),Object.setPrototypeOf(d,Uint8Array);function _(se){if(typeof se!="number")throw new TypeError('"size" argument must be of type number');if(se<0)throw new RangeError('The value "'+se+'" is invalid for option "size"')}function p(se,Q,ee){return _(se),se<=0?o(se):Q!==void 0?typeof ee=="string"?o(se).fill(Q,ee):o(se).fill(Q):o(se)}d.alloc=function(se,Q,ee){return p(se,Q,ee)};function u(se){return _(se),o(se<0?0:D(se)|0)}d.allocUnsafe=function(se){return u(se)},d.allocUnsafeSlow=function(se){return u(se)};function E(se,Q){if((typeof Q!="string"||Q==="")&&(Q="utf8"),!d.isEncoding(Q))throw new TypeError("Unknown encoding: "+Q);const ee=H(se,Q)|0;let ue=o(ee);const me=ue.write(se,Q);return me!==ee&&(ue=ue.slice(0,me)),ue}function h(se){const Q=se.length<0?0:D(se.length)|0,ee=o(Q);for(let ue=0;ue<Q;ue+=1)ee[ue]=se[ue]&255;return ee}function m(se){if(qe(se,Uint8Array)){const Q=new Uint8Array(se);return y(Q.buffer,Q.byteOffset,Q.byteLength)}return h(se)}function y(se,Q,ee){if(Q<0||se.byteLength<Q)throw new RangeError('"offset" is outside of buffer bounds');if(se.byteLength<Q+(ee||0))throw new RangeError('"length" is outside of buffer bounds');let ue;return Q===void 0&&ee===void 0?ue=new Uint8Array(se):ee===void 0?ue=new Uint8Array(se,Q):ue=new Uint8Array(se,Q,ee),Object.setPrototypeOf(ue,d.prototype),ue}function C(se){if(d.isBuffer(se)){const Q=D(se.length)|0,ee=o(Q);return ee.length===0||se.copy(ee,0,0,Q),ee}if(se.length!==void 0)return typeof se.length!="number"||Ut(se.length)?o(0):h(se);if(se.type==="Buffer"&&Array.isArray(se.data))return h(se.data)}function D(se){if(se>=M)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+M.toString(16)+" bytes");return se|0}function T(se){return+se!=se&&(se=0),d.alloc(+se)}d.isBuffer=function(Q){return Q!=null&&Q._isBuffer===!0&&Q!==d.prototype},d.compare=function(Q,ee){if(qe(Q,Uint8Array)&&(Q=d.from(Q,Q.offset,Q.byteLength)),qe(ee,Uint8Array)&&(ee=d.from(ee,ee.offset,ee.byteLength)),!d.isBuffer(Q)||!d.isBuffer(ee))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Q===ee)return 0;let ue=Q.length,me=ee.length;for(let Ae=0,Te=Math.min(ue,me);Ae<Te;++Ae)if(Q[Ae]!==ee[Ae]){ue=Q[Ae],me=ee[Ae];break}return ue<me?-1:me<ue?1:0},d.isEncoding=function(Q){switch(String(Q).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}},d.concat=function(Q,ee){if(!Array.isArray(Q))throw new TypeError('"list" argument must be an Array of Buffers');if(Q.length===0)return d.alloc(0);let ue;if(ee===void 0)for(ee=0,ue=0;ue<Q.length;++ue)ee+=Q[ue].length;const me=d.allocUnsafe(ee);let Ae=0;for(ue=0;ue<Q.length;++ue){let Te=Q[ue];if(qe(Te,Uint8Array))Ae+Te.length>me.length?(d.isBuffer(Te)||(Te=d.from(Te)),Te.copy(me,Ae)):Uint8Array.prototype.set.call(me,Te,Ae);else if(d.isBuffer(Te))Te.copy(me,Ae);else throw new TypeError('"list" argument must be an Array of Buffers');Ae+=Te.length}return me};function H(se,Q){if(d.isBuffer(se))return se.length;if(ArrayBuffer.isView(se)||qe(se,ArrayBuffer))return se.byteLength;if(typeof se!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof se);const ee=se.length,ue=arguments.length>2&&arguments[2]===!0;if(!ue&&ee===0)return 0;let me=!1;for(;;)switch(Q){case"ascii":case"latin1":case"binary":return ee;case"utf8":case"utf-8":return Se(se).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ee*2;case"hex":return ee>>>1;case"base64":return He(se).length;default:if(me)return ue?-1:Se(se).length;Q=(""+Q).toLowerCase(),me=!0}}d.byteLength=H;function W(se,Q,ee){let ue=!1;if((Q===void 0||Q<0)&&(Q=0),Q>this.length||((ee===void 0||ee>this.length)&&(ee=this.length),ee<=0)||(ee>>>=0,Q>>>=0,ee<=Q))return"";for(se||(se="utf8");;)switch(se){case"hex":return L(this,Q,ee);case"utf8":case"utf-8":return x(this,Q,ee);case"ascii":return P(this,Q,ee);case"latin1":case"binary":return F(this,Q,ee);case"base64":return q(this,Q,ee);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,Q,ee);default:if(ue)throw new TypeError("Unknown encoding: "+se);se=(se+"").toLowerCase(),ue=!0}}d.prototype._isBuffer=!0;function Y(se,Q,ee){const ue=se[Q];se[Q]=se[ee],se[ee]=ue}d.prototype.swap16=function(){const Q=this.length;if(Q%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let ee=0;ee<Q;ee+=2)Y(this,ee,ee+1);return this},d.prototype.swap32=function(){const Q=this.length;if(Q%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let ee=0;ee<Q;ee+=4)Y(this,ee,ee+3),Y(this,ee+1,ee+2);return this},d.prototype.swap64=function(){const Q=this.length;if(Q%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let ee=0;ee<Q;ee+=8)Y(this,ee,ee+7),Y(this,ee+1,ee+6),Y(this,ee+2,ee+5),Y(this,ee+3,ee+4);return this},d.prototype.toString=function(){const Q=this.length;return Q===0?"":arguments.length===0?x(this,0,Q):W.apply(this,arguments)},d.prototype.toLocaleString=d.prototype.toString,d.prototype.equals=function(Q){if(!d.isBuffer(Q))throw new TypeError("Argument must be a Buffer");return this===Q?!0:d.compare(this,Q)===0},d.prototype.inspect=function(){let Q="";const ee=G.INSPECT_MAX_BYTES;return Q=this.toString("hex",0,ee).replace(/(.{2})/g,"$1 ").trim(),this.length>ee&&(Q+=" ... "),"<Buffer "+Q+">"},A&&(d.prototype[A]=d.prototype.inspect),d.prototype.compare=function(Q,ee,ue,me,Ae){if(qe(Q,Uint8Array)&&(Q=d.from(Q,Q.offset,Q.byteLength)),!d.isBuffer(Q))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof Q);if(ee===void 0&&(ee=0),ue===void 0&&(ue=Q?Q.length:0),me===void 0&&(me=0),Ae===void 0&&(Ae=this.length),ee<0||ue>Q.length||me<0||Ae>this.length)throw new RangeError("out of range index");if(me>=Ae&&ee>=ue)return 0;if(me>=Ae)return-1;if(ee>=ue)return 1;if(ee>>>=0,ue>>>=0,me>>>=0,Ae>>>=0,this===Q)return 0;let Te=Ae-me,Ue=ue-ee;const Rt=Math.min(Te,Ue),Ne=this.slice(me,Ae),Me=Q.slice(ee,ue);for(let Ft=0;Ft<Rt;++Ft)if(Ne[Ft]!==Me[Ft]){Te=Ne[Ft],Ue=Me[Ft];break}return Te<Ue?-1:Ue<Te?1:0};function re(se,Q,ee,ue,me){if(se.length===0)return-1;if(typeof ee=="string"?(ue=ee,ee=0):ee>2147483647?ee=2147483647:ee<-2147483648&&(ee=-2147483648),ee=+ee,Ut(ee)&&(ee=me?0:se.length-1),ee<0&&(ee=se.length+ee),ee>=se.length){if(me)return-1;ee=se.length-1}else if(ee<0)if(me)ee=0;else return-1;if(typeof Q=="string"&&(Q=d.from(Q,ue)),d.isBuffer(Q))return Q.length===0?-1:ie(se,Q,ee,ue,me);if(typeof Q=="number")return Q=Q&255,typeof Uint8Array.prototype.indexOf=="function"?me?Uint8Array.prototype.indexOf.call(se,Q,ee):Uint8Array.prototype.lastIndexOf.call(se,Q,ee):ie(se,[Q],ee,ue,me);throw new TypeError("val must be string, number or Buffer")}function ie(se,Q,ee,ue,me){let Ae=1,Te=se.length,Ue=Q.length;if(ue!==void 0&&(ue=String(ue).toLowerCase(),ue==="ucs2"||ue==="ucs-2"||ue==="utf16le"||ue==="utf-16le")){if(se.length<2||Q.length<2)return-1;Ae=2,Te/=2,Ue/=2,ee/=2}function Rt(Me,Ft){return Ae===1?Me[Ft]:Me.readUInt16BE(Ft*Ae)}let Ne;if(me){let Me=-1;for(Ne=ee;Ne<Te;Ne++)if(Rt(se,Ne)===Rt(Q,Me===-1?0:Ne-Me)){if(Me===-1&&(Me=Ne),Ne-Me+1===Ue)return Me*Ae}else Me!==-1&&(Ne-=Ne-Me),Me=-1}else for(ee+Ue>Te&&(ee=Te-Ue),Ne=ee;Ne>=0;Ne--){let Me=!0;for(let Ft=0;Ft<Ue;Ft++)if(Rt(se,Ne+Ft)!==Rt(Q,Ft)){Me=!1;break}if(Me)return Ne}return-1}d.prototype.includes=function(Q,ee,ue){return this.indexOf(Q,ee,ue)!==-1},d.prototype.indexOf=function(Q,ee,ue){return re(this,Q,ee,ue,!0)},d.prototype.lastIndexOf=function(Q,ee,ue){return re(this,Q,ee,ue,!1)};function oe(se,Q,ee,ue){ee=Number(ee)||0;const me=se.length-ee;ue?(ue=Number(ue),ue>me&&(ue=me)):ue=me;const Ae=Q.length;ue>Ae/2&&(ue=Ae/2);let Te;for(Te=0;Te<ue;++Te){const Ue=parseInt(Q.substr(Te*2,2),16);if(Ut(Ue))return Te;se[ee+Te]=Ue}return Te}function ae(se,Q,ee,ue){return Ve(Se(Q,se.length-ee),se,ee,ue)}function de(se,Q,ee,ue){return Ve(De(Q),se,ee,ue)}function te(se,Q,ee,ue){return Ve(He(Q),se,ee,ue)}function O(se,Q,ee,ue){return Ve(pe(Q,se.length-ee),se,ee,ue)}d.prototype.write=function(Q,ee,ue,me){if(ee===void 0)me="utf8",ue=this.length,ee=0;else if(ue===void 0&&typeof ee=="string")me=ee,ue=this.length,ee=0;else if(isFinite(ee))ee=ee>>>0,isFinite(ue)?(ue=ue>>>0,me===void 0&&(me="utf8")):(me=ue,ue=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const Ae=this.length-ee;if((ue===void 0||ue>Ae)&&(ue=Ae),Q.length>0&&(ue<0||ee<0)||ee>this.length)throw new RangeError("Attempt to write outside buffer bounds");me||(me="utf8");let Te=!1;for(;;)switch(me){case"hex":return oe(this,Q,ee,ue);case"utf8":case"utf-8":return ae(this,Q,ee,ue);case"ascii":case"latin1":case"binary":return de(this,Q,ee,ue);case"base64":return te(this,Q,ee,ue);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,Q,ee,ue);default:if(Te)throw new TypeError("Unknown encoding: "+me);me=(""+me).toLowerCase(),Te=!0}},d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function q(se,Q,ee){return Q===0&&ee===se.length?R.fromByteArray(se):R.fromByteArray(se.slice(Q,ee))}function x(se,Q,ee){ee=Math.min(se.length,ee);const ue=[];let me=Q;for(;me<ee;){const Ae=se[me];let Te=null,Ue=Ae>239?4:Ae>223?3:Ae>191?2:1;if(me+Ue<=ee){let Rt,Ne,Me,Ft;switch(Ue){case 1:Ae<128&&(Te=Ae);break;case 2:Rt=se[me+1],(Rt&192)==128&&(Ft=(Ae&31)<<6|Rt&63,Ft>127&&(Te=Ft));break;case 3:Rt=se[me+1],Ne=se[me+2],(Rt&192)==128&&(Ne&192)==128&&(Ft=(Ae&15)<<12|(Rt&63)<<6|Ne&63,Ft>2047&&(Ft<55296||Ft>57343)&&(Te=Ft));break;case 4:Rt=se[me+1],Ne=se[me+2],Me=se[me+3],(Rt&192)==128&&(Ne&192)==128&&(Me&192)==128&&(Ft=(Ae&15)<<18|(Rt&63)<<12|(Ne&63)<<6|Me&63,Ft>65535&&Ft<1114112&&(Te=Ft))}}Te===null?(Te=65533,Ue=1):Te>65535&&(Te-=65536,ue.push(Te>>>10&1023|55296),Te=56320|Te&1023),ue.push(Te),me+=Ue}return b(ue)}const a=4096;function b(se){const Q=se.length;if(Q<=a)return String.fromCharCode.apply(String,se);let ee="",ue=0;for(;ue<Q;)ee+=String.fromCharCode.apply(String,se.slice(ue,ue+=a));return ee}function P(se,Q,ee){let ue="";ee=Math.min(se.length,ee);for(let me=Q;me<ee;++me)ue+=String.fromCharCode(se[me]&127);return ue}function F(se,Q,ee){let ue="";ee=Math.min(se.length,ee);for(let me=Q;me<ee;++me)ue+=String.fromCharCode(se[me]);return ue}function L(se,Q,ee){const ue=se.length;(!Q||Q<0)&&(Q=0),(!ee||ee<0||ee>ue)&&(ee=ue);let me="";for(let Ae=Q;Ae<ee;++Ae)me+=Ke[se[Ae]];return me}function I(se,Q,ee){const ue=se.slice(Q,ee);let me="";for(let Ae=0;Ae<ue.length-1;Ae+=2)me+=String.fromCharCode(ue[Ae]+ue[Ae+1]*256);return me}d.prototype.slice=function(Q,ee){const ue=this.length;Q=~~Q,ee=ee===void 0?ue:~~ee,Q<0?(Q+=ue,Q<0&&(Q=0)):Q>ue&&(Q=ue),ee<0?(ee+=ue,ee<0&&(ee=0)):ee>ue&&(ee=ue),ee<Q&&(ee=Q);const me=this.subarray(Q,ee);return Object.setPrototypeOf(me,d.prototype),me};function K(se,Q,ee){if(se%1!=0||se<0)throw new RangeError("offset is not uint");if(se+Q>ee)throw new RangeError("Trying to access beyond buffer length")}d.prototype.readUintLE=d.prototype.readUIntLE=function(Q,ee,ue){Q=Q>>>0,ee=ee>>>0,ue||K(Q,ee,this.length);let me=this[Q],Ae=1,Te=0;for(;++Te<ee&&(Ae*=256);)me+=this[Q+Te]*Ae;return me},d.prototype.readUintBE=d.prototype.readUIntBE=function(Q,ee,ue){Q=Q>>>0,ee=ee>>>0,ue||K(Q,ee,this.length);let me=this[Q+--ee],Ae=1;for(;ee>0&&(Ae*=256);)me+=this[Q+--ee]*Ae;return me},d.prototype.readUint8=d.prototype.readUInt8=function(Q,ee){return Q=Q>>>0,ee||K(Q,1,this.length),this[Q]},d.prototype.readUint16LE=d.prototype.readUInt16LE=function(Q,ee){return Q=Q>>>0,ee||K(Q,2,this.length),this[Q]|this[Q+1]<<8},d.prototype.readUint16BE=d.prototype.readUInt16BE=function(Q,ee){return Q=Q>>>0,ee||K(Q,2,this.length),this[Q]<<8|this[Q+1]},d.prototype.readUint32LE=d.prototype.readUInt32LE=function(Q,ee){return Q=Q>>>0,ee||K(Q,4,this.length),(this[Q]|this[Q+1]<<8|this[Q+2]<<16)+this[Q+3]*16777216},d.prototype.readUint32BE=d.prototype.readUInt32BE=function(Q,ee){return Q=Q>>>0,ee||K(Q,4,this.length),this[Q]*16777216+(this[Q+1]<<16|this[Q+2]<<8|this[Q+3])},d.prototype.readBigUInt64LE=ze(function(Q){Q=Q>>>0,Ee(Q,"offset");const ee=this[Q],ue=this[Q+7];(ee===void 0||ue===void 0)&&$(Q,this.length-8);const me=ee+this[++Q]*2**8+this[++Q]*2**16+this[++Q]*2**24,Ae=this[++Q]+this[++Q]*2**8+this[++Q]*2**16+ue*2**24;return BigInt(me)+(BigInt(Ae)<<BigInt(32))}),d.prototype.readBigUInt64BE=ze(function(Q){Q=Q>>>0,Ee(Q,"offset");const ee=this[Q],ue=this[Q+7];(ee===void 0||ue===void 0)&&$(Q,this.length-8);const me=ee*2**24+this[++Q]*2**16+this[++Q]*2**8+this[++Q],Ae=this[++Q]*2**24+this[++Q]*2**16+this[++Q]*2**8+ue;return(BigInt(me)<<BigInt(32))+BigInt(Ae)}),d.prototype.readIntLE=function(Q,ee,ue){Q=Q>>>0,ee=ee>>>0,ue||K(Q,ee,this.length);let me=this[Q],Ae=1,Te=0;for(;++Te<ee&&(Ae*=256);)me+=this[Q+Te]*Ae;return Ae*=128,me>=Ae&&(me-=Math.pow(2,8*ee)),me},d.prototype.readIntBE=function(Q,ee,ue){Q=Q>>>0,ee=ee>>>0,ue||K(Q,ee,this.length);let me=ee,Ae=1,Te=this[Q+--me];for(;me>0&&(Ae*=256);)Te+=this[Q+--me]*Ae;return Ae*=128,Te>=Ae&&(Te-=Math.pow(2,8*ee)),Te},d.prototype.readInt8=function(Q,ee){return Q=Q>>>0,ee||K(Q,1,this.length),this[Q]&128?(255-this[Q]+1)*-1:this[Q]},d.prototype.readInt16LE=function(Q,ee){Q=Q>>>0,ee||K(Q,2,this.length);const ue=this[Q]|this[Q+1]<<8;return ue&32768?ue|4294901760:ue},d.prototype.readInt16BE=function(Q,ee){Q=Q>>>0,ee||K(Q,2,this.length);const ue=this[Q+1]|this[Q]<<8;return ue&32768?ue|4294901760:ue},d.prototype.readInt32LE=function(Q,ee){return Q=Q>>>0,ee||K(Q,4,this.length),this[Q]|this[Q+1]<<8|this[Q+2]<<16|this[Q+3]<<24},d.prototype.readInt32BE=function(Q,ee){return Q=Q>>>0,ee||K(Q,4,this.length),this[Q]<<24|this[Q+1]<<16|this[Q+2]<<8|this[Q+3]},d.prototype.readBigInt64LE=ze(function(Q){Q=Q>>>0,Ee(Q,"offset");const ee=this[Q],ue=this[Q+7];(ee===void 0||ue===void 0)&&$(Q,this.length-8);const me=this[Q+4]+this[Q+5]*2**8+this[Q+6]*2**16+(ue<<24);return(BigInt(me)<<BigInt(32))+BigInt(ee+this[++Q]*2**8+this[++Q]*2**16+this[++Q]*2**24)}),d.prototype.readBigInt64BE=ze(function(Q){Q=Q>>>0,Ee(Q,"offset");const ee=this[Q],ue=this[Q+7];(ee===void 0||ue===void 0)&&$(Q,this.length-8);const me=(ee<<24)+this[++Q]*2**16+this[++Q]*2**8+this[++Q];return(BigInt(me)<<BigInt(32))+BigInt(this[++Q]*2**24+this[++Q]*2**16+this[++Q]*2**8+ue)}),d.prototype.readFloatLE=function(Q,ee){return Q=Q>>>0,ee||K(Q,4,this.length),B.read(this,Q,!0,23,4)},d.prototype.readFloatBE=function(Q,ee){return Q=Q>>>0,ee||K(Q,4,this.length),B.read(this,Q,!1,23,4)},d.prototype.readDoubleLE=function(Q,ee){return Q=Q>>>0,ee||K(Q,8,this.length),B.read(this,Q,!0,52,8)},d.prototype.readDoubleBE=function(Q,ee){return Q=Q>>>0,ee||K(Q,8,this.length),B.read(this,Q,!1,52,8)};function z(se,Q,ee,ue,me,Ae){if(!d.isBuffer(se))throw new TypeError('"buffer" argument must be a Buffer instance');if(Q>me||Q<Ae)throw new RangeError('"value" argument is out of bounds');if(ee+ue>se.length)throw new RangeError("Index out of range")}d.prototype.writeUintLE=d.prototype.writeUIntLE=function(Q,ee,ue,me){if(Q=+Q,ee=ee>>>0,ue=ue>>>0,!me){const Ue=Math.pow(2,8*ue)-1;z(this,Q,ee,ue,Ue,0)}let Ae=1,Te=0;for(this[ee]=Q&255;++Te<ue&&(Ae*=256);)this[ee+Te]=Q/Ae&255;return ee+ue},d.prototype.writeUintBE=d.prototype.writeUIntBE=function(Q,ee,ue,me){if(Q=+Q,ee=ee>>>0,ue=ue>>>0,!me){const Ue=Math.pow(2,8*ue)-1;z(this,Q,ee,ue,Ue,0)}let Ae=ue-1,Te=1;for(this[ee+Ae]=Q&255;--Ae>=0&&(Te*=256);)this[ee+Ae]=Q/Te&255;return ee+ue},d.prototype.writeUint8=d.prototype.writeUInt8=function(Q,ee,ue){return Q=+Q,ee=ee>>>0,ue||z(this,Q,ee,1,255,0),this[ee]=Q&255,ee+1},d.prototype.writeUint16LE=d.prototype.writeUInt16LE=function(Q,ee,ue){return Q=+Q,ee=ee>>>0,ue||z(this,Q,ee,2,65535,0),this[ee]=Q&255,this[ee+1]=Q>>>8,ee+2},d.prototype.writeUint16BE=d.prototype.writeUInt16BE=function(Q,ee,ue){return Q=+Q,ee=ee>>>0,ue||z(this,Q,ee,2,65535,0),this[ee]=Q>>>8,this[ee+1]=Q&255,ee+2},d.prototype.writeUint32LE=d.prototype.writeUInt32LE=function(Q,ee,ue){return Q=+Q,ee=ee>>>0,ue||z(this,Q,ee,4,4294967295,0),this[ee+3]=Q>>>24,this[ee+2]=Q>>>16,this[ee+1]=Q>>>8,this[ee]=Q&255,ee+4},d.prototype.writeUint32BE=d.prototype.writeUInt32BE=function(Q,ee,ue){return Q=+Q,ee=ee>>>0,ue||z(this,Q,ee,4,4294967295,0),this[ee]=Q>>>24,this[ee+1]=Q>>>16,this[ee+2]=Q>>>8,this[ee+3]=Q&255,ee+4};function w(se,Q,ee,ue,me){we(Q,ue,me,se,ee,7);let Ae=Number(Q&BigInt(4294967295));se[ee++]=Ae,Ae=Ae>>8,se[ee++]=Ae,Ae=Ae>>8,se[ee++]=Ae,Ae=Ae>>8,se[ee++]=Ae;let Te=Number(Q>>BigInt(32)&BigInt(4294967295));return se[ee++]=Te,Te=Te>>8,se[ee++]=Te,Te=Te>>8,se[ee++]=Te,Te=Te>>8,se[ee++]=Te,ee}function j(se,Q,ee,ue,me){we(Q,ue,me,se,ee,7);let Ae=Number(Q&BigInt(4294967295));se[ee+7]=Ae,Ae=Ae>>8,se[ee+6]=Ae,Ae=Ae>>8,se[ee+5]=Ae,Ae=Ae>>8,se[ee+4]=Ae;let Te=Number(Q>>BigInt(32)&BigInt(4294967295));return se[ee+3]=Te,Te=Te>>8,se[ee+2]=Te,Te=Te>>8,se[ee+1]=Te,Te=Te>>8,se[ee]=Te,ee+8}d.prototype.writeBigUInt64LE=ze(function(Q,ee=0){return w(this,Q,ee,BigInt(0),BigInt("0xffffffffffffffff"))}),d.prototype.writeBigUInt64BE=ze(function(Q,ee=0){return j(this,Q,ee,BigInt(0),BigInt("0xffffffffffffffff"))}),d.prototype.writeIntLE=function(Q,ee,ue,me){if(Q=+Q,ee=ee>>>0,!me){const Rt=Math.pow(2,8*ue-1);z(this,Q,ee,ue,Rt-1,-Rt)}let Ae=0,Te=1,Ue=0;for(this[ee]=Q&255;++Ae<ue&&(Te*=256);)Q<0&&Ue===0&&this[ee+Ae-1]!==0&&(Ue=1),this[ee+Ae]=(Q/Te>>0)-Ue&255;return ee+ue},d.prototype.writeIntBE=function(Q,ee,ue,me){if(Q=+Q,ee=ee>>>0,!me){const Rt=Math.pow(2,8*ue-1);z(this,Q,ee,ue,Rt-1,-Rt)}let Ae=ue-1,Te=1,Ue=0;for(this[ee+Ae]=Q&255;--Ae>=0&&(Te*=256);)Q<0&&Ue===0&&this[ee+Ae+1]!==0&&(Ue=1),this[ee+Ae]=(Q/Te>>0)-Ue&255;return ee+ue},d.prototype.writeInt8=function(Q,ee,ue){return Q=+Q,ee=ee>>>0,ue||z(this,Q,ee,1,127,-128),Q<0&&(Q=255+Q+1),this[ee]=Q&255,ee+1},d.prototype.writeInt16LE=function(Q,ee,ue){return Q=+Q,ee=ee>>>0,ue||z(this,Q,ee,2,32767,-32768),this[ee]=Q&255,this[ee+1]=Q>>>8,ee+2},d.prototype.writeInt16BE=function(Q,ee,ue){return Q=+Q,ee=ee>>>0,ue||z(this,Q,ee,2,32767,-32768),this[ee]=Q>>>8,this[ee+1]=Q&255,ee+2},d.prototype.writeInt32LE=function(Q,ee,ue){return Q=+Q,ee=ee>>>0,ue||z(this,Q,ee,4,2147483647,-2147483648),this[ee]=Q&255,this[ee+1]=Q>>>8,this[ee+2]=Q>>>16,this[ee+3]=Q>>>24,ee+4},d.prototype.writeInt32BE=function(Q,ee,ue){return Q=+Q,ee=ee>>>0,ue||z(this,Q,ee,4,2147483647,-2147483648),Q<0&&(Q=4294967295+Q+1),this[ee]=Q>>>24,this[ee+1]=Q>>>16,this[ee+2]=Q>>>8,this[ee+3]=Q&255,ee+4},d.prototype.writeBigInt64LE=ze(function(Q,ee=0){return w(this,Q,ee,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),d.prototype.writeBigInt64BE=ze(function(Q,ee=0){return j(this,Q,ee,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function he(se,Q,ee,ue,me,Ae){if(ee+ue>se.length)throw new RangeError("Index out of range");if(ee<0)throw new RangeError("Index out of range")}function _e(se,Q,ee,ue,me){return Q=+Q,ee=ee>>>0,me||he(se,Q,ee,4,34028234663852886e22,-34028234663852886e22),B.write(se,Q,ee,ue,23,4),ee+4}d.prototype.writeFloatLE=function(Q,ee,ue){return _e(this,Q,ee,!0,ue)},d.prototype.writeFloatBE=function(Q,ee,ue){return _e(this,Q,ee,!1,ue)};function Re(se,Q,ee,ue,me){return Q=+Q,ee=ee>>>0,me||he(se,Q,ee,8,17976931348623157e292,-17976931348623157e292),B.write(se,Q,ee,ue,52,8),ee+8}d.prototype.writeDoubleLE=function(Q,ee,ue){return Re(this,Q,ee,!0,ue)},d.prototype.writeDoubleBE=function(Q,ee,ue){return Re(this,Q,ee,!1,ue)},d.prototype.copy=function(Q,ee,ue,me){if(!d.isBuffer(Q))throw new TypeError("argument should be a Buffer");if(ue||(ue=0),!me&&me!==0&&(me=this.length),ee>=Q.length&&(ee=Q.length),ee||(ee=0),me>0&&me<ue&&(me=ue),me===ue||Q.length===0||this.length===0)return 0;if(ee<0)throw new RangeError("targetStart out of bounds");if(ue<0||ue>=this.length)throw new RangeError("Index out of range");if(me<0)throw new RangeError("sourceEnd out of bounds");me>this.length&&(me=this.length),Q.length-ee<me-ue&&(me=Q.length-ee+ue);const Ae=me-ue;return this===Q&&typeof Uint8Array.prototype.copyWithin=="function"?this.copyWithin(ee,ue,me):Uint8Array.prototype.set.call(Q,this.subarray(ue,me),ee),Ae},d.prototype.fill=function(Q,ee,ue,me){if(typeof Q=="string"){if(typeof ee=="string"?(me=ee,ee=0,ue=this.length):typeof ue=="string"&&(me=ue,ue=this.length),me!==void 0&&typeof me!="string")throw new TypeError("encoding must be a string");if(typeof me=="string"&&!d.isEncoding(me))throw new TypeError("Unknown encoding: "+me);if(Q.length===1){const Te=Q.charCodeAt(0);(me==="utf8"&&Te<128||me==="latin1")&&(Q=Te)}}else typeof Q=="number"?Q=Q&255:typeof Q=="boolean"&&(Q=Number(Q));if(ee<0||this.length<ee||this.length<ue)throw new RangeError("Out of range index");if(ue<=ee)return this;ee=ee>>>0,ue=ue===void 0?this.length:ue>>>0,Q||(Q=0);let Ae;if(typeof Q=="number")for(Ae=ee;Ae<ue;++Ae)this[Ae]=Q;else{const Te=d.isBuffer(Q)?Q:d.from(Q,me),Ue=Te.length;if(Ue===0)throw new TypeError('The value "'+Q+'" is invalid for argument "value"');for(Ae=0;Ae<ue-ee;++Ae)this[Ae+ee]=Te[Ae%Ue]}return this};const Ie={};function J(se,Q,ee){Ie[se]=class extends ee{constructor(){super();Object.defineProperty(this,"message",{value:Q.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${se}]`,this.stack,delete this.name}get code(){return se}set code(me){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:me,writable:!0})}toString(){return`${this.name} [${se}]: ${this.message}`}}}J("ERR_BUFFER_OUT_OF_BOUNDS",function(se){return se?`${se} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),J("ERR_INVALID_ARG_TYPE",function(se,Q){return`The "${se}" argument must be of type number. Received type ${typeof Q}`},TypeError),J("ERR_OUT_OF_RANGE",function(se,Q,ee){let ue=`The value of "${se}" is out of range.`,me=ee;return Number.isInteger(ee)&&Math.abs(ee)>2**32?me=Z(String(ee)):typeof ee=="bigint"&&(me=String(ee),(ee>BigInt(2)**BigInt(32)||ee<-(BigInt(2)**BigInt(32)))&&(me=Z(me)),me+="n"),ue+=` It must be ${Q}. Received ${me}`,ue},RangeError);function Z(se){let Q="",ee=se.length;const ue=se[0]==="-"?1:0;for(;ee>=ue+4;ee-=3)Q=`_${se.slice(ee-3,ee)}${Q}`;return`${se.slice(0,ee)}${Q}`}function fe(se,Q,ee){Ee(Q,"offset"),(se[Q]===void 0||se[Q+ee]===void 0)&&$(Q,se.length-(ee+1))}function we(se,Q,ee,ue,me,Ae){if(se>ee||se<Q){const Te=typeof Q=="bigint"?"n":"";let Ue;throw Ae>3?Q===0||Q===BigInt(0)?Ue=`>= 0${Te} and < 2${Te} ** ${(Ae+1)*8}${Te}`:Ue=`>= -(2${Te} ** ${(Ae+1)*8-1}${Te}) and < 2 ** ${(Ae+1)*8-1}${Te}`:Ue=`>= ${Q}${Te} and <= ${ee}${Te}`,new Ie.ERR_OUT_OF_RANGE("value",Ue,se)}fe(ue,me,Ae)}function Ee(se,Q){if(typeof se!="number")throw new Ie.ERR_INVALID_ARG_TYPE(Q,"number",se)}function $(se,Q,ee){throw Math.floor(se)!==se?(Ee(se,ee),new Ie.ERR_OUT_OF_RANGE(ee||"offset","an integer",se)):Q<0?new Ie.ERR_BUFFER_OUT_OF_BOUNDS:new Ie.ERR_OUT_OF_RANGE(ee||"offset",`>= ${ee?1:0} and <= ${Q}`,se)}const V=/[^+/0-9A-Za-z-_]/g;function le(se){if(se=se.split("=")[0],se=se.trim().replace(V,""),se.length<2)return"";for(;se.length%4!=0;)se=se+"=";return se}function Se(se,Q){Q=Q||Infinity;let ee;const ue=se.length;let me=null;const Ae=[];for(let Te=0;Te<ue;++Te){if(ee=se.charCodeAt(Te),ee>55295&&ee<57344){if(!me){if(ee>56319){(Q-=3)>-1&&Ae.push(239,191,189);continue}else if(Te+1===ue){(Q-=3)>-1&&Ae.push(239,191,189);continue}me=ee;continue}if(ee<56320){(Q-=3)>-1&&Ae.push(239,191,189),me=ee;continue}ee=(me-55296<<10|ee-56320)+65536}else me&&(Q-=3)>-1&&Ae.push(239,191,189);if(me=null,ee<128){if((Q-=1)<0)break;Ae.push(ee)}else if(ee<2048){if((Q-=2)<0)break;Ae.push(ee>>6|192,ee&63|128)}else if(ee<65536){if((Q-=3)<0)break;Ae.push(ee>>12|224,ee>>6&63|128,ee&63|128)}else if(ee<1114112){if((Q-=4)<0)break;Ae.push(ee>>18|240,ee>>12&63|128,ee>>6&63|128,ee&63|128)}else throw new Error("Invalid code point")}return Ae}function De(se){const Q=[];for(let ee=0;ee<se.length;++ee)Q.push(se.charCodeAt(ee)&255);return Q}function pe(se,Q){let ee,ue,me;const Ae=[];for(let Te=0;Te<se.length&&!((Q-=2)<0);++Te)ee=se.charCodeAt(Te),ue=ee>>8,me=ee%256,Ae.push(me),Ae.push(ue);return Ae}function He(se){return R.toByteArray(le(se))}function Ve(se,Q,ee,ue){let me;for(me=0;me<ue&&!(me+ee>=Q.length||me>=se.length);++me)Q[me+ee]=se[me];return me}function qe(se,Q){return se instanceof Q||se!=null&&se.constructor!=null&&se.constructor.name!=null&&se.constructor.name===Q.name}function Ut(se){return se!==se}const Ke=function(){const se="0123456789abcdef",Q=new Array(256);for(let ee=0;ee<16;++ee){const ue=ee*16;for(let me=0;me<16;++me)Q[ue+me]=se[ee]+se[me]}return Q}();function ze(se){return typeof BigInt=="undefined"?Gt:se}function Gt(){throw new Error("BigInt not supported")}},21924:(g,G,k)=>{"use strict";var R=k(40210),B=k(55559),A=B(R("String.prototype.indexOf"));g.exports=function(l,o){var d=R(l,!!o);return typeof d=="function"&&A(l,".prototype.")>-1?B(d):d}},55559:(g,G,k)=>{"use strict";var R=k(58612),B=k(40210),A=B("%Function.prototype.apply%"),M=B("%Function.prototype.call%"),l=B("%Reflect.apply%",!0)||R.call(M,A),o=B("%Object.getOwnPropertyDescriptor%",!0),d=B("%Object.defineProperty%",!0),f=B("%Math.max%");if(d)try{d({},"a",{value:1})}catch(p){d=null}g.exports=function(u){var E=l(R,M,arguments);if(o&&d){var h=o(E,"length");h.configurable&&d(E,"length",{value:1+f(0,u.length-(arguments.length-1))})}return E};var _=function(){return l(R,A,arguments)};d?d(g.exports,"apply",{value:_}):g.exports.apply=_},71027:(g,G,k)=>{var R=k(89509).Buffer,B=k(42830).Transform,A=k(32553).s,M=k(35717);function l(o){B.call(this),this.hashMode=typeof o=="string",this.hashMode?this[o]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}M(l,B),l.prototype.update=function(o,d,f){typeof o=="string"&&(o=R.from(o,d));var _=this._update(o);return this.hashMode?this:(f&&(_=this._toString(_,f)),_)},l.prototype.setAutoPadding=function(){},l.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},l.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},l.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},l.prototype._transform=function(o,d,f){var _;try{this.hashMode?this._update(o):this.push(this._update(o))}catch(p){_=p}finally{f(_)}},l.prototype._flush=function(o){var d;try{this.push(this.__final())}catch(f){d=f}o(d)},l.prototype._finalOrDigest=function(o){var d=this.__final()||R.alloc(0);return o&&(d=this._toString(d,o,!0)),d},l.prototype._toString=function(o,d,f){if(this._decoder||(this._decoder=new A(d),this._encoding=d),this._encoding!==d)throw new Error("can't switch encodings");var _=this._decoder.write(o);return f&&(_+=this._decoder.end()),_},g.exports=l},76393:(g,G,k)=>{var R=k(86266),B=k(13550);g.exports=function(d){return new M(d)};var A={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};A.p224=A.secp224r1,A.p256=A.secp256r1=A.prime256v1,A.p192=A.secp192r1=A.prime192v1,A.p384=A.secp384r1,A.p521=A.secp521r1;function M(o){this.curveType=A[o],this.curveType||(this.curveType={name:o}),this.curve=new R.ec(this.curveType.name),this.keys=void 0}M.prototype.generateKeys=function(o,d){return this.keys=this.curve.genKeyPair(),this.getPublicKey(o,d)},M.prototype.computeSecret=function(o,d,f){d=d||"utf8",Buffer.isBuffer(o)||(o=new Buffer(o,d));var _=this.curve.keyFromPublic(o).getPublic(),p=_.mul(this.keys.getPrivate()).getX();return l(p,f,this.curveType.byteLength)},M.prototype.getPublicKey=function(o,d){var f=this.keys.getPublic(d==="compressed",!0);return d==="hybrid"&&(f[f.length-1]%2?f[0]=7:f[0]=6),l(f,o)},M.prototype.getPrivateKey=function(o){return l(this.keys.getPrivate(),o)},M.prototype.setPublicKey=function(o,d){return d=d||"utf8",Buffer.isBuffer(o)||(o=new Buffer(o,d)),this.keys._importPublic(o),this},M.prototype.setPrivateKey=function(o,d){d=d||"utf8",Buffer.isBuffer(o)||(o=new Buffer(o,d));var f=new B(o);return f=f.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(f),this};function l(o,d,f){Array.isArray(o)||(o=o.toArray());var _=new Buffer(o);if(f&&_.length<f){var p=new Buffer(f-_.length);p.fill(0),_=Buffer.concat([p,_])}return d?_.toString(d):_}},23482:(g,G,k)=>{"use strict";var R=k(35717),B=k(62318),A=k(79785),M=k(89072),l=k(71027);function o(d){l.call(this,"digest"),this._hash=d}R(o,l),o.prototype._update=function(d){this._hash.update(d)},o.prototype._final=function(){return this._hash.digest()},g.exports=function(f){return f=f.toLowerCase(),f==="md5"?new B:f==="rmd160"||f==="ripemd160"?new A:new o(M(f))}},78028:(g,G,k)=>{var R=k(62318);g.exports=function(B){return new R().update(B).digest()}},58355:(g,G,k)=>{"use strict";var R=k(35717),B=k(51031),A=k(71027),M=k(89509).Buffer,l=k(78028),o=k(79785),d=k(89072),f=M.alloc(128);function _(p,u){A.call(this,"digest"),typeof u=="string"&&(u=M.from(u));var E=p==="sha512"||p==="sha384"?128:64;if(this._alg=p,this._key=u,u.length>E){var h=p==="rmd160"?new o:d(p);u=h.update(u).digest()}else u.length<E&&(u=M.concat([u,f],E));for(var m=this._ipad=M.allocUnsafe(E),y=this._opad=M.allocUnsafe(E),C=0;C<E;C++)m[C]=u[C]^54,y[C]=u[C]^92;this._hash=p==="rmd160"?new o:d(p),this._hash.update(m)}R(_,A),_.prototype._update=function(p){this._hash.update(p)},_.prototype._final=function(){var p=this._hash.digest(),u=this._alg==="rmd160"?new o:d(this._alg);return u.update(this._opad).update(p).digest()},g.exports=function(u,E){return u=u.toLowerCase(),u==="rmd160"||u==="ripemd160"?new _("rmd160",E):u==="md5"?new B(l,E):new _(u,E)}},51031:(g,G,k)=>{"use strict";var R=k(35717),B=k(89509).Buffer,A=k(71027),M=B.alloc(128),l=64;function o(d,f){A.call(this,"digest"),typeof f=="string"&&(f=B.from(f)),this._alg=d,this._key=f,f.length>l?f=d(f):f.length<l&&(f=B.concat([f,M],l));for(var _=this._ipad=B.allocUnsafe(l),p=this._opad=B.allocUnsafe(l),u=0;u<l;u++)_[u]=f[u]^54,p[u]=f[u]^92;this._hash=[_]}R(o,A),o.prototype._update=function(d){this._hash.push(d)},o.prototype._final=function(){var d=this._alg(B.concat(this._hash));return this._alg(B.concat([this._opad,d]))},g.exports=o},54098:function(g,G){var k=typeof self!="undefined"?self:this,R=function(){function A(){this.fetch=!1,this.DOMException=k.DOMException}return A.prototype=k,new A}();(function(A){var M=function(l){var o={searchParams:"URLSearchParams"in A,iterable:"Symbol"in A&&"iterator"in Symbol,blob:"FileReader"in A&&"Blob"in A&&function(){try{return new Blob,!0}catch(q){return!1}}(),formData:"FormData"in A,arrayBuffer:"ArrayBuffer"in A};function d(q){return q&&DataView.prototype.isPrototypeOf(q)}if(o.arrayBuffer)var f=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],_=ArrayBuffer.isView||function(q){return q&&f.indexOf(Object.prototype.toString.call(q))>-1};function p(q){if(typeof q!="string"&&(q=String(q)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(q))throw new TypeError("Invalid character in header field name");return q.toLowerCase()}function u(q){return typeof q!="string"&&(q=String(q)),q}function E(q){var x={next:function(){var a=q.shift();return{done:a===void 0,value:a}}};return o.iterable&&(x[Symbol.iterator]=function(){return x}),x}function h(q){this.map={},q instanceof h?q.forEach(function(x,a){this.append(a,x)},this):Array.isArray(q)?q.forEach(function(x){this.append(x[0],x[1])},this):q&&Object.getOwnPropertyNames(q).forEach(function(x){this.append(x,q[x])},this)}h.prototype.append=function(q,x){q=p(q),x=u(x);var a=this.map[q];this.map[q]=a?a+", "+x:x},h.prototype.delete=function(q){delete this.map[p(q)]},h.prototype.get=function(q){return q=p(q),this.has(q)?this.map[q]:null},h.prototype.has=function(q){return this.map.hasOwnProperty(p(q))},h.prototype.set=function(q,x){this.map[p(q)]=u(x)},h.prototype.forEach=function(q,x){for(var a in this.map)this.map.hasOwnProperty(a)&&q.call(x,this.map[a],a,this)},h.prototype.keys=function(){var q=[];return this.forEach(function(x,a){q.push(a)}),E(q)},h.prototype.values=function(){var q=[];return this.forEach(function(x){q.push(x)}),E(q)},h.prototype.entries=function(){var q=[];return this.forEach(function(x,a){q.push([a,x])}),E(q)},o.iterable&&(h.prototype[Symbol.iterator]=h.prototype.entries);function m(q){if(q.bodyUsed)return Promise.reject(new TypeError("Already read"));q.bodyUsed=!0}function y(q){return new Promise(function(x,a){q.onload=function(){x(q.result)},q.onerror=function(){a(q.error)}})}function C(q){var x=new FileReader,a=y(x);return x.readAsArrayBuffer(q),a}function D(q){var x=new FileReader,a=y(x);return x.readAsText(q),a}function T(q){for(var x=new Uint8Array(q),a=new Array(x.length),b=0;b<x.length;b++)a[b]=String.fromCharCode(x[b]);return a.join("")}function H(q){if(q.slice)return q.slice(0);var x=new Uint8Array(q.byteLength);return x.set(new Uint8Array(q)),x.buffer}function W(){return this.bodyUsed=!1,this._initBody=function(q){this._bodyInit=q,q?typeof q=="string"?this._bodyText=q:o.blob&&Blob.prototype.isPrototypeOf(q)?this._bodyBlob=q:o.formData&&FormData.prototype.isPrototypeOf(q)?this._bodyFormData=q:o.searchParams&&URLSearchParams.prototype.isPrototypeOf(q)?this._bodyText=q.toString():o.arrayBuffer&&o.blob&&d(q)?(this._bodyArrayBuffer=H(q.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):o.arrayBuffer&&(ArrayBuffer.prototype.isPrototypeOf(q)||_(q))?this._bodyArrayBuffer=H(q):this._bodyText=q=Object.prototype.toString.call(q):this._bodyText="",this.headers.get("content-type")||(typeof q=="string"?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):o.searchParams&&URLSearchParams.prototype.isPrototypeOf(q)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o.blob&&(this.blob=function(){var q=m(this);if(q)return q;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?m(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(C)}),this.text=function(){var q=m(this);if(q)return q;if(this._bodyBlob)return D(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(T(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o.formData&&(this.formData=function(){return this.text().then(oe)}),this.json=function(){return this.text().then(JSON.parse)},this}var Y=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function re(q){var x=q.toUpperCase();return Y.indexOf(x)>-1?x:q}function ie(q,x){x=x||{};var a=x.body;if(q instanceof ie){if(q.bodyUsed)throw new TypeError("Already read");this.url=q.url,this.credentials=q.credentials,x.headers||(this.headers=new h(q.headers)),this.method=q.method,this.mode=q.mode,this.signal=q.signal,!a&&q._bodyInit!=null&&(a=q._bodyInit,q.bodyUsed=!0)}else this.url=String(q);if(this.credentials=x.credentials||this.credentials||"same-origin",(x.headers||!this.headers)&&(this.headers=new h(x.headers)),this.method=re(x.method||this.method||"GET"),this.mode=x.mode||this.mode||null,this.signal=x.signal||this.signal,this.referrer=null,(this.method==="GET"||this.method==="HEAD")&&a)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(a)}ie.prototype.clone=function(){return new ie(this,{body:this._bodyInit})};function oe(q){var x=new FormData;return q.trim().split("&").forEach(function(a){if(a){var b=a.split("="),P=b.shift().replace(/\+/g," "),F=b.join("=").replace(/\+/g," ");x.append(decodeURIComponent(P),decodeURIComponent(F))}}),x}function ae(q){var x=new h,a=q.replace(/\r?\n[\t ]+/g," ");return a.split(/\r?\n/).forEach(function(b){var P=b.split(":"),F=P.shift().trim();if(F){var L=P.join(":").trim();x.append(F,L)}}),x}W.call(ie.prototype);function de(q,x){x||(x={}),this.type="default",this.status=x.status===void 0?200:x.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in x?x.statusText:"OK",this.headers=new h(x.headers),this.url=x.url||"",this._initBody(q)}W.call(de.prototype),de.prototype.clone=function(){return new de(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},de.error=function(){var q=new de(null,{status:0,statusText:""});return q.type="error",q};var te=[301,302,303,307,308];de.redirect=function(q,x){if(te.indexOf(x)===-1)throw new RangeError("Invalid status code");return new de(null,{status:x,headers:{location:q}})},l.DOMException=A.DOMException;try{new l.DOMException}catch(q){l.DOMException=function(x,a){this.message=x,this.name=a;var b=Error(x);this.stack=b.stack},l.DOMException.prototype=Object.create(Error.prototype),l.DOMException.prototype.constructor=l.DOMException}function O(q,x){return new Promise(function(a,b){var P=new ie(q,x);if(P.signal&&P.signal.aborted)return b(new l.DOMException("Aborted","AbortError"));var F=new XMLHttpRequest;function L(){F.abort()}F.onload=function(){var I={status:F.status,statusText:F.statusText,headers:ae(F.getAllResponseHeaders()||"")};I.url="responseURL"in F?F.responseURL:I.headers.get("X-Request-URL");var K="response"in F?F.response:F.responseText;a(new de(K,I))},F.onerror=function(){b(new TypeError("Network request failed"))},F.ontimeout=function(){b(new TypeError("Network request failed"))},F.onabort=function(){b(new l.DOMException("Aborted","AbortError"))},F.open(P.method,P.url,!0),P.credentials==="include"?F.withCredentials=!0:P.credentials==="omit"&&(F.withCredentials=!1),"responseType"in F&&o.blob&&(F.responseType="blob"),P.headers.forEach(function(I,K){F.setRequestHeader(K,I)}),P.signal&&(P.signal.addEventListener("abort",L),F.onreadystatechange=function(){F.readyState===4&&P.signal.removeEventListener("abort",L)}),F.send(typeof P._bodyInit=="undefined"?null:P._bodyInit)})}return O.polyfill=!0,A.fetch||(A.fetch=O,A.Headers=h,A.Request=ie,A.Response=de),l.Headers=h,l.Request=ie,l.Response=de,l.fetch=O,Object.defineProperty(l,"__esModule",{value:!0}),l}({})})(R),R.fetch.ponyfill=!0,delete R.fetch.polyfill;var B=R;G=B.fetch,G.default=B.fetch,G.fetch=B.fetch,G.Headers=B.Headers,G.Request=B.Request,G.Response=B.Response,g.exports=G},55835:(g,G,k)=>{"use strict";var R;R=R=R=k(61798),G.js=k(23482),R=k(58355);var B=k(56042),A=Object.keys(B),M=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(A);R=function(){return M};var l=k(25632);R=l.pbkdf2,R=l.pbkdf2Sync;var o=k(53614);R=o.Cipher,R=o.createCipher,R=o.Cipheriv,R=o.createCipheriv,R=o.Decipher,R=o.createDecipher,R=o.Decipheriv,R=o.createDecipheriv,R=o.getCiphers,R=o.listCiphers;var d=k(62607);R=d.DiffieHellmanGroup,R=d.createDiffieHellmanGroup,R=d.getDiffieHellman,R=d.createDiffieHellman,R=d.DiffieHellman;var f=k(64743);R=f.createSign,R=f.Sign,R=f.createVerify,R=f.Verify,k(76393);var _=k(7900);R=_.publicEncrypt,R=_.privateEncrypt,R=_.publicDecrypt,R=_.privateDecrypt;var p=k(77963);R=p.randomFill,R=p.randomFillSync,R=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join(`
`))},R={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},27484:function(g){(function(G,k){g.exports=k()})(this,function(){"use strict";var G="millisecond",k="second",R="minute",B="hour",A="day",M="week",l="month",o="quarter",d="year",f="date",_=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[^0-9]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,u={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},E=function(re,ie,oe){var ae=String(re);return!ae||ae.length>=ie?re:""+Array(ie+1-ae.length).join(oe)+re},h={s:E,z:function(re){var ie=-re.utcOffset(),oe=Math.abs(ie),ae=Math.floor(oe/60),de=oe%60;return(ie<=0?"+":"-")+E(ae,2,"0")+":"+E(de,2,"0")},m:function re(ie,oe){if(ie.date()<oe.date())return-re(oe,ie);var ae=12*(oe.year()-ie.year())+(oe.month()-ie.month()),de=ie.clone().add(ae,l),te=oe-de<0,O=ie.clone().add(ae+(te?-1:1),l);return+(-(ae+(oe-de)/(te?de-O:O-de))||0)},a:function(re){return re<0?Math.ceil(re)||0:Math.floor(re)},p:function(re){return{M:l,y:d,w:M,d:A,D:f,h:B,m:R,s:k,ms:G,Q:o}[re]||String(re||"").toLowerCase().replace(/s$/,"")},u:function(re){return re===void 0}},m="en",y={};y[m]=u;var C=function(re){return re instanceof W},D=function(re,ie,oe){var ae;if(!re)return m;if(typeof re=="string")y[re]&&(ae=re),ie&&(y[re]=ie,ae=re);else{var de=re.name;y[de]=re,ae=de}return!oe&&ae&&(m=ae),ae||!oe&&m},T=function(re,ie){if(C(re))return re.clone();var oe=typeof ie=="object"?ie:{};return oe.date=re,oe.args=arguments,new W(oe)},H=h;H.l=D,H.i=C,H.w=function(re,ie){return T(re,{locale:ie.$L,utc:ie.$u,x:ie.$x,$offset:ie.$offset})};var W=function(){function re(oe){this.$L=D(oe.locale,null,!0),this.parse(oe)}var ie=re.prototype;return ie.parse=function(oe){this.$d=function(ae){var de=ae.date,te=ae.utc;if(de===null)return new Date(NaN);if(H.u(de))return new Date;if(de instanceof Date)return new Date(de);if(typeof de=="string"&&!/Z$/i.test(de)){var O=de.match(_);if(O){var q=O[2]-1||0,x=(O[7]||"0").substring(0,3);return te?new Date(Date.UTC(O[1],q,O[3]||1,O[4]||0,O[5]||0,O[6]||0,x)):new Date(O[1],q,O[3]||1,O[4]||0,O[5]||0,O[6]||0,x)}}return new Date(de)}(oe),this.$x=oe.x||{},this.init()},ie.init=function(){var oe=this.$d;this.$y=oe.getFullYear(),this.$M=oe.getMonth(),this.$D=oe.getDate(),this.$W=oe.getDay(),this.$H=oe.getHours(),this.$m=oe.getMinutes(),this.$s=oe.getSeconds(),this.$ms=oe.getMilliseconds()},ie.$utils=function(){return H},ie.isValid=function(){return this.$d.toString()!=="Invalid Date"},ie.isSame=function(oe,ae){var de=T(oe);return this.startOf(ae)<=de&&de<=this.endOf(ae)},ie.isAfter=function(oe,ae){return T(oe)<this.startOf(ae)},ie.isBefore=function(oe,ae){return this.endOf(ae)<T(oe)},ie.$g=function(oe,ae,de){return H.u(oe)?this[ae]:this.set(de,oe)},ie.unix=function(){return Math.floor(this.valueOf()/1e3)},ie.valueOf=function(){return this.$d.getTime()},ie.startOf=function(oe,ae){var de=this,te=!!H.u(ae)||ae,O=H.p(oe),q=function(K,z){var w=H.w(de.$u?Date.UTC(de.$y,z,K):new Date(de.$y,z,K),de);return te?w:w.endOf(A)},x=function(K,z){return H.w(de.toDate()[K].apply(de.toDate("s"),(te?[0,0,0,0]:[23,59,59,999]).slice(z)),de)},a=this.$W,b=this.$M,P=this.$D,F="set"+(this.$u?"UTC":"");switch(O){case d:return te?q(1,0):q(31,11);case l:return te?q(1,b):q(0,b+1);case M:var L=this.$locale().weekStart||0,I=(a<L?a+7:a)-L;return q(te?P-I:P+(6-I),b);case A:case f:return x(F+"Hours",0);case B:return x(F+"Minutes",1);case R:return x(F+"Seconds",2);case k:return x(F+"Milliseconds",3);default:return this.clone()}},ie.endOf=function(oe){return this.startOf(oe,!1)},ie.$set=function(oe,ae){var de,te=H.p(oe),O="set"+(this.$u?"UTC":""),q=(de={},de[A]=O+"Date",de[f]=O+"Date",de[l]=O+"Month",de[d]=O+"FullYear",de[B]=O+"Hours",de[R]=O+"Minutes",de[k]=O+"Seconds",de[G]=O+"Milliseconds",de)[te],x=te===A?this.$D+(ae-this.$W):ae;if(te===l||te===d){var a=this.clone().set(f,1);a.$d[q](x),a.init(),this.$d=a.set(f,Math.min(this.$D,a.daysInMonth())).$d}else q&&this.$d[q](x);return this.init(),this},ie.set=function(oe,ae){return this.clone().$set(oe,ae)},ie.get=function(oe){return this[H.p(oe)]()},ie.add=function(oe,ae){var de,te=this;oe=Number(oe);var O=H.p(ae),q=function(b){var P=T(te);return H.w(P.date(P.date()+Math.round(b*oe)),te)};if(O===l)return this.set(l,this.$M+oe);if(O===d)return this.set(d,this.$y+oe);if(O===A)return q(1);if(O===M)return q(7);var x=(de={},de[R]=6e4,de[B]=36e5,de[k]=1e3,de)[O]||1,a=this.$d.getTime()+oe*x;return H.w(a,this)},ie.subtract=function(oe,ae){return this.add(-1*oe,ae)},ie.format=function(oe){var ae=this;if(!this.isValid())return"Invalid Date";var de=oe||"YYYY-MM-DDTHH:mm:ssZ",te=H.z(this),O=this.$locale(),q=this.$H,x=this.$m,a=this.$M,b=O.weekdays,P=O.months,F=function(z,w,j,he){return z&&(z[w]||z(ae,de))||j[w].substr(0,he)},L=function(z){return H.s(q%12||12,z,"0")},I=O.meridiem||function(z,w,j){var he=z<12?"AM":"PM";return j?he.toLowerCase():he},K={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:H.s(a+1,2,"0"),MMM:F(O.monthsShort,a,P,3),MMMM:F(P,a),D:this.$D,DD:H.s(this.$D,2,"0"),d:String(this.$W),dd:F(O.weekdaysMin,this.$W,b,2),ddd:F(O.weekdaysShort,this.$W,b,3),dddd:b[this.$W],H:String(q),HH:H.s(q,2,"0"),h:L(1),hh:L(2),a:I(q,x,!0),A:I(q,x,!1),m:String(x),mm:H.s(x,2,"0"),s:String(this.$s),ss:H.s(this.$s,2,"0"),SSS:H.s(this.$ms,3,"0"),Z:te};return de.replace(p,function(z,w){return w||K[z]||te.replace(":","")})},ie.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},ie.diff=function(oe,ae,de){var te,O=H.p(ae),q=T(oe),x=6e4*(q.utcOffset()-this.utcOffset()),a=this-q,b=H.m(this,q);return b=(te={},te[d]=b/12,te[l]=b,te[o]=b/3,te[M]=(a-x)/6048e5,te[A]=(a-x)/864e5,te[B]=a/36e5,te[R]=a/6e4,te[k]=a/1e3,te)[O]||a,de?b:H.a(b)},ie.daysInMonth=function(){return this.endOf(l).$D},ie.$locale=function(){return y[this.$L]},ie.locale=function(oe,ae){if(!oe)return this.$L;var de=this.clone(),te=D(oe,ae,!0);return te&&(de.$L=te),de},ie.clone=function(){return H.w(this.$d,this)},ie.toDate=function(){return new Date(this.valueOf())},ie.toJSON=function(){return this.isValid()?this.toISOString():null},ie.toISOString=function(){return this.$d.toISOString()},ie.toString=function(){return this.$d.toUTCString()},re}(),Y=W.prototype;return T.prototype=Y,[["$ms",G],["$s",k],["$m",R],["$H",B],["$W",A],["$M",l],["$y",d],["$D",f]].forEach(function(re){Y[re[1]]=function(ie){return this.$g(ie,re[0],re[1])}}),T.extend=function(re,ie){return re.$i||(re(ie,W,T),re.$i=!0),T},T.locale=D,T.isDayjs=C,T.unix=function(re){return T(1e3*re)},T.en=y[m],T.Ls=y,T.p={},T})},84110:function(g){(function(G,k){g.exports=k()})(this,function(){"use strict";return function(G,k,R){G=G||{};var B=k.prototype,A={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function M(o,d,f,_){return B.fromToBase(o,d,f,_)}R.en.relativeTime=A,B.fromToBase=function(o,d,f,_,p){for(var u,E,h,m=f.$locale().relativeTime||A,y=G.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],C=y.length,D=0;D<C;D+=1){var T=y[D];T.d&&(u=_?R(o).diff(f,T.d,!0):f.diff(o,T.d,!0));var H=(G.rounding||Math.round)(Math.abs(u));if(h=u>0,H<=T.r||!T.r){H<=1&&D>0&&(T=y[D-1]);var W=m[T.l];p&&(H=p(""+H)),E=typeof W=="string"?W.replace("%d",H):W(H,d,T.l,h);break}}if(d)return E;var Y=h?m.future:m.past;return typeof Y=="function"?Y(E):Y.replace("%s",E)},B.to=function(o,d){return M(o,d,this,!0)},B.from=function(o,d){return M(o,d,this)};var l=function(o){return o.$u?R.utc():R()};B.toNow=function(o){return this.to(l(this),o)},B.fromNow=function(o){return this.from(l(this),o)}}})},70660:function(g){(function(G,k){g.exports=k()})(this,function(){"use strict";return function(G,k,R){R.updateLocale=function(B,A){var M=R.Ls[B];if(M)return(A?Object.keys(A):[]).forEach(function(l){M[l]=A[l]}),M}}})},15251:(g,G,k)=>{"use strict";G.utils=k(11278),G.Cipher=k(55756),G.DES=k(70778),G.CBC=k(39051),G.EDE=k(50651)},39051:(g,G,k)=>{"use strict";var R=k(79746),B=k(35717),A={};function M(o){R.equal(o.length,8,"Invalid IV length"),this.iv=new Array(8);for(var d=0;d<this.iv.length;d++)this.iv[d]=o[d]}function l(o){function d(u){o.call(this,u),this._cbcInit()}B(d,o);for(var f=Object.keys(A),_=0;_<f.length;_++){var p=f[_];d.prototype[p]=A[p]}return d.create=function(E){return new d(E)},d}G.instantiate=l,A._cbcInit=function(){var d=new M(this.options.iv);this._cbcState=d},A._update=function(d,f,_,p){var u=this._cbcState,E=this.constructor.super_.prototype,h=u.iv;if(this.type==="encrypt"){for(var m=0;m<this.blockSize;m++)h[m]^=d[f+m];E._update.call(this,h,0,_,p);for(var m=0;m<this.blockSize;m++)h[m]=_[p+m]}else{E._update.call(this,d,f,_,p);for(var m=0;m<this.blockSize;m++)_[p+m]^=h[m];for(var m=0;m<this.blockSize;m++)h[m]=d[f+m]}}},55756:(g,G,k)=>{"use strict";var R=k(79746);function B(A){this.options=A,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}g.exports=B,B.prototype._init=function(){},B.prototype.update=function(M){return M.length===0?[]:this.type==="decrypt"?this._updateDecrypt(M):this._updateEncrypt(M)},B.prototype._buffer=function(M,l){for(var o=Math.min(this.buffer.length-this.bufferOff,M.length-l),d=0;d<o;d++)this.buffer[this.bufferOff+d]=M[l+d];return this.bufferOff+=o,o},B.prototype._flushBuffer=function(M,l){return this._update(this.buffer,0,M,l),this.bufferOff=0,this.blockSize},B.prototype._updateEncrypt=function(M){var l=0,o=0,d=(this.bufferOff+M.length)/this.blockSize|0,f=new Array(d*this.blockSize);this.bufferOff!==0&&(l+=this._buffer(M,l),this.bufferOff===this.buffer.length&&(o+=this._flushBuffer(f,o)));for(var _=M.length-(M.length-l)%this.blockSize;l<_;l+=this.blockSize)this._update(M,l,f,o),o+=this.blockSize;for(;l<M.length;l++,this.bufferOff++)this.buffer[this.bufferOff]=M[l];return f},B.prototype._updateDecrypt=function(M){for(var l=0,o=0,d=Math.ceil((this.bufferOff+M.length)/this.blockSize)-1,f=new Array(d*this.blockSize);d>0;d--)l+=this._buffer(M,l),o+=this._flushBuffer(f,o);return l+=this._buffer(M,l),f},B.prototype.final=function(M){var l;M&&(l=this.update(M));var o;return this.type==="encrypt"?o=this._finalEncrypt():o=this._finalDecrypt(),l?l.concat(o):o},B.prototype._pad=function(M,l){if(l===0)return!1;for(;l<M.length;)M[l++]=0;return!0},B.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var M=new Array(this.blockSize);return this._update(this.buffer,0,M,0),M},B.prototype._unpad=function(M){return M},B.prototype._finalDecrypt=function(){R.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var M=new Array(this.blockSize);return this._flushBuffer(M,0),this._unpad(M)}},70778:(g,G,k)=>{"use strict";var R=k(79746),B=k(35717),A=k(11278),M=k(55756);function l(){this.tmp=new Array(2),this.keys=null}function o(f){M.call(this,f);var _=new l;this._desState=_,this.deriveKeys(_,f.key)}B(o,M),g.exports=o,o.create=function(_){return new o(_)};var d=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];o.prototype.deriveKeys=function(_,p){_.keys=new Array(16*2),R.equal(p.length,this.blockSize,"Invalid key length");var u=A.readUInt32BE(p,0),E=A.readUInt32BE(p,4);A.pc1(u,E,_.tmp,0),u=_.tmp[0],E=_.tmp[1];for(var h=0;h<_.keys.length;h+=2){var m=d[h>>>1];u=A.r28shl(u,m),E=A.r28shl(E,m),A.pc2(u,E,_.keys,h)}},o.prototype._update=function(_,p,u,E){var h=this._desState,m=A.readUInt32BE(_,p),y=A.readUInt32BE(_,p+4);A.ip(m,y,h.tmp,0),m=h.tmp[0],y=h.tmp[1],this.type==="encrypt"?this._encrypt(h,m,y,h.tmp,0):this._decrypt(h,m,y,h.tmp,0),m=h.tmp[0],y=h.tmp[1],A.writeUInt32BE(u,m,E),A.writeUInt32BE(u,y,E+4)},o.prototype._pad=function(_,p){for(var u=_.length-p,E=p;E<_.length;E++)_[E]=u;return!0},o.prototype._unpad=function(_){for(var p=_[_.length-1],u=_.length-p;u<_.length;u++)R.equal(_[u],p);return _.slice(0,_.length-p)},o.prototype._encrypt=function(_,p,u,E,h){for(var m=p,y=u,C=0;C<_.keys.length;C+=2){var D=_.keys[C],T=_.keys[C+1];A.expand(y,_.tmp,0),D^=_.tmp[0],T^=_.tmp[1];var H=A.substitute(D,T),W=A.permute(H),Y=y;y=(m^W)>>>0,m=Y}A.rip(y,m,E,h)},o.prototype._decrypt=function(_,p,u,E,h){for(var m=u,y=p,C=_.keys.length-2;C>=0;C-=2){var D=_.keys[C],T=_.keys[C+1];A.expand(m,_.tmp,0),D^=_.tmp[0],T^=_.tmp[1];var H=A.substitute(D,T),W=A.permute(H),Y=m;m=(y^W)>>>0,y=Y}A.rip(m,y,E,h)}},50651:(g,G,k)=>{"use strict";var R=k(79746),B=k(35717),A=k(55756),M=k(70778);function l(d,f){R.equal(f.length,24,"Invalid key length");var _=f.slice(0,8),p=f.slice(8,16),u=f.slice(16,24);d==="encrypt"?this.ciphers=[M.create({type:"encrypt",key:_}),M.create({type:"decrypt",key:p}),M.create({type:"encrypt",key:u})]:this.ciphers=[M.create({type:"decrypt",key:u}),M.create({type:"encrypt",key:p}),M.create({type:"decrypt",key:_})]}function o(d){A.call(this,d);var f=new l(this.type,this.options.key);this._edeState=f}B(o,A),g.exports=o,o.create=function(f){return new o(f)},o.prototype._update=function(f,_,p,u){var E=this._edeState;E.ciphers[0]._update(f,_,p,u),E.ciphers[1]._update(p,u,p,u),E.ciphers[2]._update(p,u,p,u)},o.prototype._pad=M.prototype._pad,o.prototype._unpad=M.prototype._unpad},11278:(g,G)=>{"use strict";G.readUInt32BE=function(M,l){var o=M[0+l]<<24|M[1+l]<<16|M[2+l]<<8|M[3+l];return o>>>0},G.writeUInt32BE=function(M,l,o){M[0+o]=l>>>24,M[1+o]=l>>>16&255,M[2+o]=l>>>8&255,M[3+o]=l&255},G.ip=function(M,l,o,d){for(var f=0,_=0,p=6;p>=0;p-=2){for(var u=0;u<=24;u+=8)f<<=1,f|=l>>>u+p&1;for(var u=0;u<=24;u+=8)f<<=1,f|=M>>>u+p&1}for(var p=6;p>=0;p-=2){for(var u=1;u<=25;u+=8)_<<=1,_|=l>>>u+p&1;for(var u=1;u<=25;u+=8)_<<=1,_|=M>>>u+p&1}o[d+0]=f>>>0,o[d+1]=_>>>0},G.rip=function(M,l,o,d){for(var f=0,_=0,p=0;p<4;p++)for(var u=24;u>=0;u-=8)f<<=1,f|=l>>>u+p&1,f<<=1,f|=M>>>u+p&1;for(var p=4;p<8;p++)for(var u=24;u>=0;u-=8)_<<=1,_|=l>>>u+p&1,_<<=1,_|=M>>>u+p&1;o[d+0]=f>>>0,o[d+1]=_>>>0},G.pc1=function(M,l,o,d){for(var f=0,_=0,p=7;p>=5;p--){for(var u=0;u<=24;u+=8)f<<=1,f|=l>>u+p&1;for(var u=0;u<=24;u+=8)f<<=1,f|=M>>u+p&1}for(var u=0;u<=24;u+=8)f<<=1,f|=l>>u+p&1;for(var p=1;p<=3;p++){for(var u=0;u<=24;u+=8)_<<=1,_|=l>>u+p&1;for(var u=0;u<=24;u+=8)_<<=1,_|=M>>u+p&1}for(var u=0;u<=24;u+=8)_<<=1,_|=M>>u+p&1;o[d+0]=f>>>0,o[d+1]=_>>>0},G.r28shl=function(M,l){return M<<l&268435455|M>>>28-l};var k=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];G.pc2=function(M,l,o,d){for(var f=0,_=0,p=k.length>>>1,u=0;u<p;u++)f<<=1,f|=M>>>k[u]&1;for(var u=p;u<k.length;u++)_<<=1,_|=l>>>k[u]&1;o[d+0]=f>>>0,o[d+1]=_>>>0},G.expand=function(M,l,o){var d=0,f=0;d=(M&1)<<5|M>>>27;for(var _=23;_>=15;_-=4)d<<=6,d|=M>>>_&63;for(var _=11;_>=3;_-=4)f|=M>>>_&63,f<<=6;f|=(M&31)<<1|M>>>31,l[o+0]=d>>>0,l[o+1]=f>>>0};var R=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];G.substitute=function(M,l){for(var o=0,d=0;d<4;d++){var f=M>>>18-d*6&63,_=R[d*64+f];o<<=4,o|=_}for(var d=0;d<4;d++){var f=l>>>18-d*6&63,_=R[4*64+d*64+f];o<<=4,o|=_}return o>>>0};var B=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];G.permute=function(M){for(var l=0,o=0;o<B.length;o++)l<<=1,l|=M>>>B[o]&1;return l>>>0},G.padSplit=function(M,l,o){for(var d=M.toString(2);d.length<l;)d="0"+d;for(var f=[],_=0;_<l;_+=o)f.push(d.slice(_,_+o));return f.join(" ")}},62607:(g,G,k)=>{var R=k(43590),B=k(29799),A=k(57426);function M(d){var f=new Buffer(B[d].prime,"hex"),_=new Buffer(B[d].gen,"hex");return new A(f,_)}var l={binary:!0,hex:!0,base64:!0};function o(d,f,_,p){return Buffer.isBuffer(f)||l[f]===void 0?o(d,"binary",f,_):(f=f||"binary",p=p||"binary",_=_||new Buffer([2]),Buffer.isBuffer(_)||(_=new Buffer(_,p)),typeof d=="number"?new A(R(d,_),_,!0):(Buffer.isBuffer(d)||(d=new Buffer(d,f)),new A(d,_,!0)))}G.DiffieHellmanGroup=G.createDiffieHellmanGroup=G.getDiffieHellman=M,G.createDiffieHellman=G.DiffieHellman=o},57426:(g,G,k)=>{var R=k(13550),B=k(63047),A=new B,M=new R(24),l=new R(11),o=new R(10),d=new R(3),f=new R(7),_=k(43590),p=k(61798);g.exports=y;function u(D,T){return T=T||"utf8",Buffer.isBuffer(D)||(D=new Buffer(D,T)),this._pub=new R(D),this}function E(D,T){return T=T||"utf8",Buffer.isBuffer(D)||(D=new Buffer(D,T)),this._priv=new R(D),this}var h={};function m(D,T){var H=T.toString("hex"),W=[H,D.toString(16)].join("_");if(W in h)return h[W];var Y=0;if(D.isEven()||!_.simpleSieve||!_.fermatTest(D)||!A.test(D))return Y+=1,H==="02"||H==="05"?Y+=8:Y+=4,h[W]=Y,Y;A.test(D.shrn(1))||(Y+=2);var re;switch(H){case"02":D.mod(M).cmp(l)&&(Y+=8);break;case"05":re=D.mod(o),re.cmp(d)&&re.cmp(f)&&(Y+=8);break;default:Y+=4}return h[W]=Y,Y}function y(D,T,H){this.setGenerator(T),this.__prime=new R(D),this._prime=R.mont(this.__prime),this._primeLen=D.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,H?(this.setPublicKey=u,this.setPrivateKey=E):this._primeCode=8}Object.defineProperty(y.prototype,"verifyError",{enumerable:!0,get:function(){return typeof this._primeCode!="number"&&(this._primeCode=m(this.__prime,this.__gen)),this._primeCode}}),y.prototype.generateKeys=function(){return this._priv||(this._priv=new R(p(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},y.prototype.computeSecret=function(D){D=new R(D),D=D.toRed(this._prime);var T=D.redPow(this._priv).fromRed(),H=new Buffer(T.toArray()),W=this.getPrime();if(H.length<W.length){var Y=new Buffer(W.length-H.length);Y.fill(0),H=Buffer.concat([Y,H])}return H},y.prototype.getPublicKey=function(T){return C(this._pub,T)},y.prototype.getPrivateKey=function(T){return C(this._priv,T)},y.prototype.getPrime=function(D){return C(this.__prime,D)},y.prototype.getGenerator=function(D){return C(this._gen,D)},y.prototype.setGenerator=function(D,T){return T=T||"utf8",Buffer.isBuffer(D)||(D=new Buffer(D,T)),this.__gen=D,this._gen=new R(D),this};function C(D,T){var H=new Buffer(D.toArray());return T?H.toString(T):H}},43590:(g,G,k)=>{var R=k(61798);g.exports=Y,Y.simpleSieve=H,Y.fermatTest=W;var B=k(13550),A=new B(24),M=k(63047),l=new M,o=new B(1),d=new B(2),f=new B(5),_=new B(16),p=new B(8),u=new B(10),E=new B(3),h=new B(7),m=new B(11),y=new B(4),C=new B(12),D=null;function T(){if(D!==null)return D;var re=1048576,ie=[];ie[0]=2;for(var oe=1,ae=3;ae<re;ae+=2){for(var de=Math.ceil(Math.sqrt(ae)),te=0;te<oe&&ie[te]<=de&&ae%ie[te]!=0;te++);oe!==te&&ie[te]<=de||(ie[oe++]=ae)}return D=ie,ie}function H(re){for(var ie=T(),oe=0;oe<ie.length;oe++)if(re.modn(ie[oe])===0)return re.cmpn(ie[oe])===0;return!0}function W(re){var ie=B.mont(re);return d.toRed(ie).redPow(re.subn(1)).fromRed().cmpn(1)===0}function Y(re,ie){if(re<16)return ie===2||ie===5?new B([140,123]):new B([140,39]);ie=new B(ie);for(var oe,ae;;){for(oe=new B(R(Math.ceil(re/8)));oe.bitLength()>re;)oe.ishrn(1);if(oe.isEven()&&oe.iadd(o),oe.testn(1)||oe.iadd(d),ie.cmp(d)){if(!ie.cmp(f))for(;oe.mod(u).cmp(E);)oe.iadd(y)}else for(;oe.mod(A).cmp(m);)oe.iadd(y);if(ae=oe.shrn(1),H(ae)&&H(oe)&&W(ae)&&W(oe)&&l.test(ae)&&l.test(oe))return oe}}},86266:(g,G,k)=>{"use strict";var R=G;R.version=k(18597).i8,R.utils=k(80953),R.rand=k(29931),R.curve=k(88254),R.curves=k(45427),R.ec=k(57954),R.eddsa=k(65980)},4918:(g,G,k)=>{"use strict";var R=k(13550),B=k(80953),A=B.getNAF,M=B.getJSF,l=B.assert;function o(f,_){this.type=f,this.p=new R(_.p,16),this.red=_.prime?R.red(_.prime):R.mont(this.p),this.zero=new R(0).toRed(this.red),this.one=new R(1).toRed(this.red),this.two=new R(2).toRed(this.red),this.n=_.n&&new R(_.n,16),this.g=_.g&&this.pointFromJSON(_.g,_.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var p=this.n&&this.p.div(this.n);!p||p.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}g.exports=o,o.prototype.point=function(){throw new Error("Not implemented")},o.prototype.validate=function(){throw new Error("Not implemented")},o.prototype._fixedNafMul=function(_,p){l(_.precomputed);var u=_._getDoubles(),E=A(p,1,this._bitLength),h=(1<<u.step+1)-(u.step%2==0?2:1);h/=3;var m=[],y,C;for(y=0;y<E.length;y+=u.step){C=0;for(var D=y+u.step-1;D>=y;D--)C=(C<<1)+E[D];m.push(C)}for(var T=this.jpoint(null,null,null),H=this.jpoint(null,null,null),W=h;W>0;W--){for(y=0;y<m.length;y++)C=m[y],C===W?H=H.mixedAdd(u.points[y]):C===-W&&(H=H.mixedAdd(u.points[y].neg()));T=T.add(H)}return T.toP()},o.prototype._wnafMul=function(_,p){var u=4,E=_._getNAFPoints(u);u=E.wnd;for(var h=E.points,m=A(p,u,this._bitLength),y=this.jpoint(null,null,null),C=m.length-1;C>=0;C--){for(var D=0;C>=0&&m[C]===0;C--)D++;if(C>=0&&D++,y=y.dblp(D),C<0)break;var T=m[C];l(T!==0),_.type==="affine"?T>0?y=y.mixedAdd(h[T-1>>1]):y=y.mixedAdd(h[-T-1>>1].neg()):T>0?y=y.add(h[T-1>>1]):y=y.add(h[-T-1>>1].neg())}return _.type==="affine"?y.toP():y},o.prototype._wnafMulAdd=function(_,p,u,E,h){var m=this._wnafT1,y=this._wnafT2,C=this._wnafT3,D=0,T,H,W;for(T=0;T<E;T++){W=p[T];var Y=W._getNAFPoints(_);m[T]=Y.wnd,y[T]=Y.points}for(T=E-1;T>=1;T-=2){var re=T-1,ie=T;if(m[re]!==1||m[ie]!==1){C[re]=A(u[re],m[re],this._bitLength),C[ie]=A(u[ie],m[ie],this._bitLength),D=Math.max(C[re].length,D),D=Math.max(C[ie].length,D);continue}var oe=[p[re],null,null,p[ie]];p[re].y.cmp(p[ie].y)===0?(oe[1]=p[re].add(p[ie]),oe[2]=p[re].toJ().mixedAdd(p[ie].neg())):p[re].y.cmp(p[ie].y.redNeg())===0?(oe[1]=p[re].toJ().mixedAdd(p[ie]),oe[2]=p[re].add(p[ie].neg())):(oe[1]=p[re].toJ().mixedAdd(p[ie]),oe[2]=p[re].toJ().mixedAdd(p[ie].neg()));var ae=[-3,-1,-5,-7,0,7,5,1,3],de=M(u[re],u[ie]);for(D=Math.max(de[0].length,D),C[re]=new Array(D),C[ie]=new Array(D),H=0;H<D;H++){var te=de[0][H]|0,O=de[1][H]|0;C[re][H]=ae[(te+1)*3+(O+1)],C[ie][H]=0,y[re]=oe}}var q=this.jpoint(null,null,null),x=this._wnafT4;for(T=D;T>=0;T--){for(var a=0;T>=0;){var b=!0;for(H=0;H<E;H++)x[H]=C[H][T]|0,x[H]!==0&&(b=!1);if(!b)break;a++,T--}if(T>=0&&a++,q=q.dblp(a),T<0)break;for(H=0;H<E;H++){var P=x[H];P!==0&&(P>0?W=y[H][P-1>>1]:P<0&&(W=y[H][-P-1>>1].neg()),W.type==="affine"?q=q.mixedAdd(W):q=q.add(W))}}for(T=0;T<E;T++)y[T]=null;return h?q:q.toP()};function d(f,_){this.curve=f,this.type=_,this.precomputed=null}o.BasePoint=d,d.prototype.eq=function(){throw new Error("Not implemented")},d.prototype.validate=function(){return this.curve.validate(this)},o.prototype.decodePoint=function(_,p){_=B.toArray(_,p);var u=this.p.byteLength();if((_[0]===4||_[0]===6||_[0]===7)&&_.length-1==2*u){_[0]===6?l(_[_.length-1]%2==0):_[0]===7&&l(_[_.length-1]%2==1);var E=this.point(_.slice(1,1+u),_.slice(1+u,1+2*u));return E}else if((_[0]===2||_[0]===3)&&_.length-1===u)return this.pointFromX(_.slice(1,1+u),_[0]===3);throw new Error("Unknown point format")},d.prototype.encodeCompressed=function(_){return this.encode(_,!0)},d.prototype._encode=function(_){var p=this.curve.p.byteLength(),u=this.getX().toArray("be",p);return _?[this.getY().isEven()?2:3].concat(u):[4].concat(u,this.getY().toArray("be",p))},d.prototype.encode=function(_,p){return B.encode(this._encode(p),_)},d.prototype.precompute=function(_){if(this.precomputed)return this;var p={doubles:null,naf:null,beta:null};return p.naf=this._getNAFPoints(8),p.doubles=this._getDoubles(4,_),p.beta=this._getBeta(),this.precomputed=p,this},d.prototype._hasDoubles=function(_){if(!this.precomputed)return!1;var p=this.precomputed.doubles;return p?p.points.length>=Math.ceil((_.bitLength()+1)/p.step):!1},d.prototype._getDoubles=function(_,p){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var u=[this],E=this,h=0;h<p;h+=_){for(var m=0;m<_;m++)E=E.dbl();u.push(E)}return{step:_,points:u}},d.prototype._getNAFPoints=function(_){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var p=[this],u=(1<<_)-1,E=u===1?null:this.dbl(),h=1;h<u;h++)p[h]=p[h-1].add(E);return{wnd:_,points:p}},d.prototype._getBeta=function(){return null},d.prototype.dblp=function(_){for(var p=this,u=0;u<_;u++)p=p.dbl();return p}},31138:(g,G,k)=>{"use strict";var R=k(80953),B=k(13550),A=k(35717),M=k(4918),l=R.assert;function o(f){this.twisted=(f.a|0)!=1,this.mOneA=this.twisted&&(f.a|0)==-1,this.extended=this.mOneA,M.call(this,"edwards",f),this.a=new B(f.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new B(f.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new B(f.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),l(!this.twisted||this.c.fromRed().cmpn(1)===0),this.oneC=(f.c|0)==1}A(o,M),g.exports=o,o.prototype._mulA=function(_){return this.mOneA?_.redNeg():this.a.redMul(_)},o.prototype._mulC=function(_){return this.oneC?_:this.c.redMul(_)},o.prototype.jpoint=function(_,p,u,E){return this.point(_,p,u,E)},o.prototype.pointFromX=function(_,p){_=new B(_,16),_.red||(_=_.toRed(this.red));var u=_.redSqr(),E=this.c2.redSub(this.a.redMul(u)),h=this.one.redSub(this.c2.redMul(this.d).redMul(u)),m=E.redMul(h.redInvm()),y=m.redSqrt();if(y.redSqr().redSub(m).cmp(this.zero)!==0)throw new Error("invalid point");var C=y.fromRed().isOdd();return(p&&!C||!p&&C)&&(y=y.redNeg()),this.point(_,y)},o.prototype.pointFromY=function(_,p){_=new B(_,16),_.red||(_=_.toRed(this.red));var u=_.redSqr(),E=u.redSub(this.c2),h=u.redMul(this.d).redMul(this.c2).redSub(this.a),m=E.redMul(h.redInvm());if(m.cmp(this.zero)===0){if(p)throw new Error("invalid point");return this.point(this.zero,_)}var y=m.redSqrt();if(y.redSqr().redSub(m).cmp(this.zero)!==0)throw new Error("invalid point");return y.fromRed().isOdd()!==p&&(y=y.redNeg()),this.point(y,_)},o.prototype.validate=function(_){if(_.isInfinity())return!0;_.normalize();var p=_.x.redSqr(),u=_.y.redSqr(),E=p.redMul(this.a).redAdd(u),h=this.c2.redMul(this.one.redAdd(this.d.redMul(p).redMul(u)));return E.cmp(h)===0};function d(f,_,p,u,E){M.BasePoint.call(this,f,"projective"),_===null&&p===null&&u===null?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new B(_,16),this.y=new B(p,16),this.z=u?new B(u,16):this.curve.one,this.t=E&&new B(E,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}A(d,M.BasePoint),o.prototype.pointFromJSON=function(_){return d.fromJSON(this,_)},o.prototype.point=function(_,p,u,E){return new d(this,_,p,u,E)},d.fromJSON=function(_,p){return new d(_,p[0],p[1],p[2])},d.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},d.prototype.isInfinity=function(){return this.x.cmpn(0)===0&&(this.y.cmp(this.z)===0||this.zOne&&this.y.cmp(this.curve.c)===0)},d.prototype._extDbl=function(){var _=this.x.redSqr(),p=this.y.redSqr(),u=this.z.redSqr();u=u.redIAdd(u);var E=this.curve._mulA(_),h=this.x.redAdd(this.y).redSqr().redISub(_).redISub(p),m=E.redAdd(p),y=m.redSub(u),C=E.redSub(p),D=h.redMul(y),T=m.redMul(C),H=h.redMul(C),W=y.redMul(m);return this.curve.point(D,T,W,H)},d.prototype._projDbl=function(){var _=this.x.redAdd(this.y).redSqr(),p=this.x.redSqr(),u=this.y.redSqr(),E,h,m,y,C,D;if(this.curve.twisted){y=this.curve._mulA(p);var T=y.redAdd(u);this.zOne?(E=_.redSub(p).redSub(u).redMul(T.redSub(this.curve.two)),h=T.redMul(y.redSub(u)),m=T.redSqr().redSub(T).redSub(T)):(C=this.z.redSqr(),D=T.redSub(C).redISub(C),E=_.redSub(p).redISub(u).redMul(D),h=T.redMul(y.redSub(u)),m=T.redMul(D))}else y=p.redAdd(u),C=this.curve._mulC(this.z).redSqr(),D=y.redSub(C).redSub(C),E=this.curve._mulC(_.redISub(y)).redMul(D),h=this.curve._mulC(y).redMul(p.redISub(u)),m=y.redMul(D);return this.curve.point(E,h,m)},d.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},d.prototype._extAdd=function(_){var p=this.y.redSub(this.x).redMul(_.y.redSub(_.x)),u=this.y.redAdd(this.x).redMul(_.y.redAdd(_.x)),E=this.t.redMul(this.curve.dd).redMul(_.t),h=this.z.redMul(_.z.redAdd(_.z)),m=u.redSub(p),y=h.redSub(E),C=h.redAdd(E),D=u.redAdd(p),T=m.redMul(y),H=C.redMul(D),W=m.redMul(D),Y=y.redMul(C);return this.curve.point(T,H,Y,W)},d.prototype._projAdd=function(_){var p=this.z.redMul(_.z),u=p.redSqr(),E=this.x.redMul(_.x),h=this.y.redMul(_.y),m=this.curve.d.redMul(E).redMul(h),y=u.redSub(m),C=u.redAdd(m),D=this.x.redAdd(this.y).redMul(_.x.redAdd(_.y)).redISub(E).redISub(h),T=p.redMul(y).redMul(D),H,W;return this.curve.twisted?(H=p.redMul(C).redMul(h.redSub(this.curve._mulA(E))),W=y.redMul(C)):(H=p.redMul(C).redMul(h.redSub(E)),W=this.curve._mulC(y).redMul(C)),this.curve.point(T,H,W)},d.prototype.add=function(_){return this.isInfinity()?_:_.isInfinity()?this:this.curve.extended?this._extAdd(_):this._projAdd(_)},d.prototype.mul=function(_){return this._hasDoubles(_)?this.curve._fixedNafMul(this,_):this.curve._wnafMul(this,_)},d.prototype.mulAdd=function(_,p,u){return this.curve._wnafMulAdd(1,[this,p],[_,u],2,!1)},d.prototype.jmulAdd=function(_,p,u){return this.curve._wnafMulAdd(1,[this,p],[_,u],2,!0)},d.prototype.normalize=function(){if(this.zOne)return this;var _=this.z.redInvm();return this.x=this.x.redMul(_),this.y=this.y.redMul(_),this.t&&(this.t=this.t.redMul(_)),this.z=this.curve.one,this.zOne=!0,this},d.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},d.prototype.getX=function(){return this.normalize(),this.x.fromRed()},d.prototype.getY=function(){return this.normalize(),this.y.fromRed()},d.prototype.eq=function(_){return this===_||this.getX().cmp(_.getX())===0&&this.getY().cmp(_.getY())===0},d.prototype.eqXToP=function(_){var p=_.toRed(this.curve.red).redMul(this.z);if(this.x.cmp(p)===0)return!0;for(var u=_.clone(),E=this.curve.redN.redMul(this.z);;){if(u.iadd(this.curve.n),u.cmp(this.curve.p)>=0)return!1;if(p.redIAdd(E),this.x.cmp(p)===0)return!0}},d.prototype.toP=d.prototype.normalize,d.prototype.mixedAdd=d.prototype.add},88254:(g,G,k)=>{"use strict";var R=G;R.base=k(4918),R.short=k(6673),R.mont=k(22881),R.edwards=k(31138)},22881:(g,G,k)=>{"use strict";var R=k(13550),B=k(35717),A=k(4918),M=k(80953);function l(d){A.call(this,"mont",d),this.a=new R(d.a,16).toRed(this.red),this.b=new R(d.b,16).toRed(this.red),this.i4=new R(4).toRed(this.red).redInvm(),this.two=new R(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}B(l,A),g.exports=l,l.prototype.validate=function(f){var _=f.normalize().x,p=_.redSqr(),u=p.redMul(_).redAdd(p.redMul(this.a)).redAdd(_),E=u.redSqrt();return E.redSqr().cmp(u)===0};function o(d,f,_){A.BasePoint.call(this,d,"projective"),f===null&&_===null?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new R(f,16),this.z=new R(_,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}B(o,A.BasePoint),l.prototype.decodePoint=function(f,_){return this.point(M.toArray(f,_),1)},l.prototype.point=function(f,_){return new o(this,f,_)},l.prototype.pointFromJSON=function(f){return o.fromJSON(this,f)},o.prototype.precompute=function(){},o.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},o.fromJSON=function(f,_){return new o(f,_[0],_[1]||f.one)},o.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},o.prototype.isInfinity=function(){return this.z.cmpn(0)===0},o.prototype.dbl=function(){var f=this.x.redAdd(this.z),_=f.redSqr(),p=this.x.redSub(this.z),u=p.redSqr(),E=_.redSub(u),h=_.redMul(u),m=E.redMul(u.redAdd(this.curve.a24.redMul(E)));return this.curve.point(h,m)},o.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},o.prototype.diffAdd=function(f,_){var p=this.x.redAdd(this.z),u=this.x.redSub(this.z),E=f.x.redAdd(f.z),h=f.x.redSub(f.z),m=h.redMul(p),y=E.redMul(u),C=_.z.redMul(m.redAdd(y).redSqr()),D=_.x.redMul(m.redISub(y).redSqr());return this.curve.point(C,D)},o.prototype.mul=function(f){for(var _=f.clone(),p=this,u=this.curve.point(null,null),E=this,h=[];_.cmpn(0)!==0;_.iushrn(1))h.push(_.andln(1));for(var m=h.length-1;m>=0;m--)h[m]===0?(p=p.diffAdd(u,E),u=u.dbl()):(u=p.diffAdd(u,E),p=p.dbl());return u},o.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},o.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},o.prototype.eq=function(f){return this.getX().cmp(f.getX())===0},o.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},o.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},6673:(g,G,k)=>{"use strict";var R=k(80953),B=k(13550),A=k(35717),M=k(4918),l=R.assert;function o(_){M.call(this,"short",_),this.a=new B(_.a,16).toRed(this.red),this.b=new B(_.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=this.a.fromRed().cmpn(0)===0,this.threeA=this.a.fromRed().sub(this.p).cmpn(-3)===0,this.endo=this._getEndomorphism(_),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}A(o,M),g.exports=o,o.prototype._getEndomorphism=function(p){if(!(!this.zeroA||!this.g||!this.n||this.p.modn(3)!==1)){var u,E;if(p.beta)u=new B(p.beta,16).toRed(this.red);else{var h=this._getEndoRoots(this.p);u=h[0].cmp(h[1])<0?h[0]:h[1],u=u.toRed(this.red)}if(p.lambda)E=new B(p.lambda,16);else{var m=this._getEndoRoots(this.n);this.g.mul(m[0]).x.cmp(this.g.x.redMul(u))===0?E=m[0]:(E=m[1],l(this.g.mul(E).x.cmp(this.g.x.redMul(u))===0))}var y;return p.basis?y=p.basis.map(function(C){return{a:new B(C.a,16),b:new B(C.b,16)}}):y=this._getEndoBasis(E),{beta:u,lambda:E,basis:y}}},o.prototype._getEndoRoots=function(p){var u=p===this.p?this.red:B.mont(p),E=new B(2).toRed(u).redInvm(),h=E.redNeg(),m=new B(3).toRed(u).redNeg().redSqrt().redMul(E),y=h.redAdd(m).fromRed(),C=h.redSub(m).fromRed();return[y,C]},o.prototype._getEndoBasis=function(p){for(var u=this.n.ushrn(Math.floor(this.n.bitLength()/2)),E=p,h=this.n.clone(),m=new B(1),y=new B(0),C=new B(0),D=new B(1),T,H,W,Y,re,ie,oe,ae=0,de,te;E.cmpn(0)!==0;){var O=h.div(E);de=h.sub(O.mul(E)),te=C.sub(O.mul(m));var q=D.sub(O.mul(y));if(!W&&de.cmp(u)<0)T=oe.neg(),H=m,W=de.neg(),Y=te;else if(W&&++ae==2)break;oe=de,h=E,E=de,C=m,m=te,D=y,y=q}re=de.neg(),ie=te;var x=W.sqr().add(Y.sqr()),a=re.sqr().add(ie.sqr());return a.cmp(x)>=0&&(re=T,ie=H),W.negative&&(W=W.neg(),Y=Y.neg()),re.negative&&(re=re.neg(),ie=ie.neg()),[{a:W,b:Y},{a:re,b:ie}]},o.prototype._endoSplit=function(p){var u=this.endo.basis,E=u[0],h=u[1],m=h.b.mul(p).divRound(this.n),y=E.b.neg().mul(p).divRound(this.n),C=m.mul(E.a),D=y.mul(h.a),T=m.mul(E.b),H=y.mul(h.b),W=p.sub(C).sub(D),Y=T.add(H).neg();return{k1:W,k2:Y}},o.prototype.pointFromX=function(p,u){p=new B(p,16),p.red||(p=p.toRed(this.red));var E=p.redSqr().redMul(p).redIAdd(p.redMul(this.a)).redIAdd(this.b),h=E.redSqrt();if(h.redSqr().redSub(E).cmp(this.zero)!==0)throw new Error("invalid point");var m=h.fromRed().isOdd();return(u&&!m||!u&&m)&&(h=h.redNeg()),this.point(p,h)},o.prototype.validate=function(p){if(p.inf)return!0;var u=p.x,E=p.y,h=this.a.redMul(u),m=u.redSqr().redMul(u).redIAdd(h).redIAdd(this.b);return E.redSqr().redISub(m).cmpn(0)===0},o.prototype._endoWnafMulAdd=function(p,u,E){for(var h=this._endoWnafT1,m=this._endoWnafT2,y=0;y<p.length;y++){var C=this._endoSplit(u[y]),D=p[y],T=D._getBeta();C.k1.negative&&(C.k1.ineg(),D=D.neg(!0)),C.k2.negative&&(C.k2.ineg(),T=T.neg(!0)),h[y*2]=D,h[y*2+1]=T,m[y*2]=C.k1,m[y*2+1]=C.k2}for(var H=this._wnafMulAdd(1,h,m,y*2,E),W=0;W<y*2;W++)h[W]=null,m[W]=null;return H};function d(_,p,u,E){M.BasePoint.call(this,_,"affine"),p===null&&u===null?(this.x=null,this.y=null,this.inf=!0):(this.x=new B(p,16),this.y=new B(u,16),E&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}A(d,M.BasePoint),o.prototype.point=function(p,u,E){return new d(this,p,u,E)},o.prototype.pointFromJSON=function(p,u){return d.fromJSON(this,p,u)},d.prototype._getBeta=function(){if(!!this.curve.endo){var p=this.precomputed;if(p&&p.beta)return p.beta;var u=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(p){var E=this.curve,h=function(m){return E.point(m.x.redMul(E.endo.beta),m.y)};p.beta=u,u.precomputed={beta:null,naf:p.naf&&{wnd:p.naf.wnd,points:p.naf.points.map(h)},doubles:p.doubles&&{step:p.doubles.step,points:p.doubles.points.map(h)}}}return u}},d.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},d.fromJSON=function(p,u,E){typeof u=="string"&&(u=JSON.parse(u));var h=p.point(u[0],u[1],E);if(!u[2])return h;function m(C){return p.point(C[0],C[1],E)}var y=u[2];return h.precomputed={beta:null,doubles:y.doubles&&{step:y.doubles.step,points:[h].concat(y.doubles.points.map(m))},naf:y.naf&&{wnd:y.naf.wnd,points:[h].concat(y.naf.points.map(m))}},h},d.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},d.prototype.isInfinity=function(){return this.inf},d.prototype.add=function(p){if(this.inf)return p;if(p.inf)return this;if(this.eq(p))return this.dbl();if(this.neg().eq(p))return this.curve.point(null,null);if(this.x.cmp(p.x)===0)return this.curve.point(null,null);var u=this.y.redSub(p.y);u.cmpn(0)!==0&&(u=u.redMul(this.x.redSub(p.x).redInvm()));var E=u.redSqr().redISub(this.x).redISub(p.x),h=u.redMul(this.x.redSub(E)).redISub(this.y);return this.curve.point(E,h)},d.prototype.dbl=function(){if(this.inf)return this;var p=this.y.redAdd(this.y);if(p.cmpn(0)===0)return this.curve.point(null,null);var u=this.curve.a,E=this.x.redSqr(),h=p.redInvm(),m=E.redAdd(E).redIAdd(E).redIAdd(u).redMul(h),y=m.redSqr().redISub(this.x.redAdd(this.x)),C=m.redMul(this.x.redSub(y)).redISub(this.y);return this.curve.point(y,C)},d.prototype.getX=function(){return this.x.fromRed()},d.prototype.getY=function(){return this.y.fromRed()},d.prototype.mul=function(p){return p=new B(p,16),this.isInfinity()?this:this._hasDoubles(p)?this.curve._fixedNafMul(this,p):this.curve.endo?this.curve._endoWnafMulAdd([this],[p]):this.curve._wnafMul(this,p)},d.prototype.mulAdd=function(p,u,E){var h=[this,u],m=[p,E];return this.curve.endo?this.curve._endoWnafMulAdd(h,m):this.curve._wnafMulAdd(1,h,m,2)},d.prototype.jmulAdd=function(p,u,E){var h=[this,u],m=[p,E];return this.curve.endo?this.curve._endoWnafMulAdd(h,m,!0):this.curve._wnafMulAdd(1,h,m,2,!0)},d.prototype.eq=function(p){return this===p||this.inf===p.inf&&(this.inf||this.x.cmp(p.x)===0&&this.y.cmp(p.y)===0)},d.prototype.neg=function(p){if(this.inf)return this;var u=this.curve.point(this.x,this.y.redNeg());if(p&&this.precomputed){var E=this.precomputed,h=function(m){return m.neg()};u.precomputed={naf:E.naf&&{wnd:E.naf.wnd,points:E.naf.points.map(h)},doubles:E.doubles&&{step:E.doubles.step,points:E.doubles.points.map(h)}}}return u},d.prototype.toJ=function(){if(this.inf)return this.curve.jpoint(null,null,null);var p=this.curve.jpoint(this.x,this.y,this.curve.one);return p};function f(_,p,u,E){M.BasePoint.call(this,_,"jacobian"),p===null&&u===null&&E===null?(this.x=this.curve.one,this.y=this.curve.one,this.z=new B(0)):(this.x=new B(p,16),this.y=new B(u,16),this.z=new B(E,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}A(f,M.BasePoint),o.prototype.jpoint=function(p,u,E){return new f(this,p,u,E)},f.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var p=this.z.redInvm(),u=p.redSqr(),E=this.x.redMul(u),h=this.y.redMul(u).redMul(p);return this.curve.point(E,h)},f.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},f.prototype.add=function(p){if(this.isInfinity())return p;if(p.isInfinity())return this;var u=p.z.redSqr(),E=this.z.redSqr(),h=this.x.redMul(u),m=p.x.redMul(E),y=this.y.redMul(u.redMul(p.z)),C=p.y.redMul(E.redMul(this.z)),D=h.redSub(m),T=y.redSub(C);if(D.cmpn(0)===0)return T.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var H=D.redSqr(),W=H.redMul(D),Y=h.redMul(H),re=T.redSqr().redIAdd(W).redISub(Y).redISub(Y),ie=T.redMul(Y.redISub(re)).redISub(y.redMul(W)),oe=this.z.redMul(p.z).redMul(D);return this.curve.jpoint(re,ie,oe)},f.prototype.mixedAdd=function(p){if(this.isInfinity())return p.toJ();if(p.isInfinity())return this;var u=this.z.redSqr(),E=this.x,h=p.x.redMul(u),m=this.y,y=p.y.redMul(u).redMul(this.z),C=E.redSub(h),D=m.redSub(y);if(C.cmpn(0)===0)return D.cmpn(0)!==0?this.curve.jpoint(null,null,null):this.dbl();var T=C.redSqr(),H=T.redMul(C),W=E.redMul(T),Y=D.redSqr().redIAdd(H).redISub(W).redISub(W),re=D.redMul(W.redISub(Y)).redISub(m.redMul(H)),ie=this.z.redMul(C);return this.curve.jpoint(Y,re,ie)},f.prototype.dblp=function(p){if(p===0)return this;if(this.isInfinity())return this;if(!p)return this.dbl();var u;if(this.curve.zeroA||this.curve.threeA){var E=this;for(u=0;u<p;u++)E=E.dbl();return E}var h=this.curve.a,m=this.curve.tinv,y=this.x,C=this.y,D=this.z,T=D.redSqr().redSqr(),H=C.redAdd(C);for(u=0;u<p;u++){var W=y.redSqr(),Y=H.redSqr(),re=Y.redSqr(),ie=W.redAdd(W).redIAdd(W).redIAdd(h.redMul(T)),oe=y.redMul(Y),ae=ie.redSqr().redISub(oe.redAdd(oe)),de=oe.redISub(ae),te=ie.redMul(de);te=te.redIAdd(te).redISub(re);var O=H.redMul(D);u+1<p&&(T=T.redMul(re)),y=ae,D=O,H=te}return this.curve.jpoint(y,H.redMul(m),D)},f.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},f.prototype._zeroDbl=function(){var p,u,E;if(this.zOne){var h=this.x.redSqr(),m=this.y.redSqr(),y=m.redSqr(),C=this.x.redAdd(m).redSqr().redISub(h).redISub(y);C=C.redIAdd(C);var D=h.redAdd(h).redIAdd(h),T=D.redSqr().redISub(C).redISub(C),H=y.redIAdd(y);H=H.redIAdd(H),H=H.redIAdd(H),p=T,u=D.redMul(C.redISub(T)).redISub(H),E=this.y.redAdd(this.y)}else{var W=this.x.redSqr(),Y=this.y.redSqr(),re=Y.redSqr(),ie=this.x.redAdd(Y).redSqr().redISub(W).redISub(re);ie=ie.redIAdd(ie);var oe=W.redAdd(W).redIAdd(W),ae=oe.redSqr(),de=re.redIAdd(re);de=de.redIAdd(de),de=de.redIAdd(de),p=ae.redISub(ie).redISub(ie),u=oe.redMul(ie.redISub(p)).redISub(de),E=this.y.redMul(this.z),E=E.redIAdd(E)}return this.curve.jpoint(p,u,E)},f.prototype._threeDbl=function(){var p,u,E;if(this.zOne){var h=this.x.redSqr(),m=this.y.redSqr(),y=m.redSqr(),C=this.x.redAdd(m).redSqr().redISub(h).redISub(y);C=C.redIAdd(C);var D=h.redAdd(h).redIAdd(h).redIAdd(this.curve.a),T=D.redSqr().redISub(C).redISub(C);p=T;var H=y.redIAdd(y);H=H.redIAdd(H),H=H.redIAdd(H),u=D.redMul(C.redISub(T)).redISub(H),E=this.y.redAdd(this.y)}else{var W=this.z.redSqr(),Y=this.y.redSqr(),re=this.x.redMul(Y),ie=this.x.redSub(W).redMul(this.x.redAdd(W));ie=ie.redAdd(ie).redIAdd(ie);var oe=re.redIAdd(re);oe=oe.redIAdd(oe);var ae=oe.redAdd(oe);p=ie.redSqr().redISub(ae),E=this.y.redAdd(this.z).redSqr().redISub(Y).redISub(W);var de=Y.redSqr();de=de.redIAdd(de),de=de.redIAdd(de),de=de.redIAdd(de),u=ie.redMul(oe.redISub(p)).redISub(de)}return this.curve.jpoint(p,u,E)},f.prototype._dbl=function(){var p=this.curve.a,u=this.x,E=this.y,h=this.z,m=h.redSqr().redSqr(),y=u.redSqr(),C=E.redSqr(),D=y.redAdd(y).redIAdd(y).redIAdd(p.redMul(m)),T=u.redAdd(u);T=T.redIAdd(T);var H=T.redMul(C),W=D.redSqr().redISub(H.redAdd(H)),Y=H.redISub(W),re=C.redSqr();re=re.redIAdd(re),re=re.redIAdd(re),re=re.redIAdd(re);var ie=D.redMul(Y).redISub(re),oe=E.redAdd(E).redMul(h);return this.curve.jpoint(W,ie,oe)},f.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var p=this.x.redSqr(),u=this.y.redSqr(),E=this.z.redSqr(),h=u.redSqr(),m=p.redAdd(p).redIAdd(p),y=m.redSqr(),C=this.x.redAdd(u).redSqr().redISub(p).redISub(h);C=C.redIAdd(C),C=C.redAdd(C).redIAdd(C),C=C.redISub(y);var D=C.redSqr(),T=h.redIAdd(h);T=T.redIAdd(T),T=T.redIAdd(T),T=T.redIAdd(T);var H=m.redIAdd(C).redSqr().redISub(y).redISub(D).redISub(T),W=u.redMul(H);W=W.redIAdd(W),W=W.redIAdd(W);var Y=this.x.redMul(D).redISub(W);Y=Y.redIAdd(Y),Y=Y.redIAdd(Y);var re=this.y.redMul(H.redMul(T.redISub(H)).redISub(C.redMul(D)));re=re.redIAdd(re),re=re.redIAdd(re),re=re.redIAdd(re);var ie=this.z.redAdd(C).redSqr().redISub(E).redISub(D);return this.curve.jpoint(Y,re,ie)},f.prototype.mul=function(p,u){return p=new B(p,u),this.curve._wnafMul(this,p)},f.prototype.eq=function(p){if(p.type==="affine")return this.eq(p.toJ());if(this===p)return!0;var u=this.z.redSqr(),E=p.z.redSqr();if(this.x.redMul(E).redISub(p.x.redMul(u)).cmpn(0)!==0)return!1;var h=u.redMul(this.z),m=E.redMul(p.z);return this.y.redMul(m).redISub(p.y.redMul(h)).cmpn(0)===0},f.prototype.eqXToP=function(p){var u=this.z.redSqr(),E=p.toRed(this.curve.red).redMul(u);if(this.x.cmp(E)===0)return!0;for(var h=p.clone(),m=this.curve.redN.redMul(u);;){if(h.iadd(this.curve.n),h.cmp(this.curve.p)>=0)return!1;if(E.redIAdd(m),this.x.cmp(E)===0)return!0}},f.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},f.prototype.isInfinity=function(){return this.z.cmpn(0)===0}},45427:(g,G,k)=>{"use strict";var R=G,B=k(33715),A=k(88254),M=k(80953),l=M.assert;function o(_){_.type==="short"?this.curve=new A.short(_):_.type==="edwards"?this.curve=new A.edwards(_):this.curve=new A.mont(_),this.g=this.curve.g,this.n=this.curve.n,this.hash=_.hash,l(this.g.validate(),"Invalid curve"),l(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}R.PresetCurve=o;function d(_,p){Object.defineProperty(R,_,{configurable:!0,enumerable:!0,get:function(){var u=new o(p);return Object.defineProperty(R,_,{configurable:!0,enumerable:!0,value:u}),u}})}d("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:B.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),d("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:B.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),d("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:B.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),d("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:B.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),d("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:B.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),d("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:B.sha256,gRed:!1,g:["9"]}),d("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:B.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});var f;try{f=k(91037)}catch(_){f=void 0}d("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:B.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",f]})},57954:(g,G,k)=>{"use strict";var R=k(13550),B=k(2156),A=k(80953),M=k(45427),l=k(29931),o=A.assert,d=k(31251),f=k(90611);function _(p){if(!(this instanceof _))return new _(p);typeof p=="string"&&(o(Object.prototype.hasOwnProperty.call(M,p),"Unknown curve "+p),p=M[p]),p instanceof M.PresetCurve&&(p={curve:p}),this.curve=p.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=p.curve.g,this.g.precompute(p.curve.n.bitLength()+1),this.hash=p.hash||p.curve.hash}g.exports=_,_.prototype.keyPair=function(u){return new d(this,u)},_.prototype.keyFromPrivate=function(u,E){return d.fromPrivate(this,u,E)},_.prototype.keyFromPublic=function(u,E){return d.fromPublic(this,u,E)},_.prototype.genKeyPair=function(u){u||(u={});for(var E=new B({hash:this.hash,pers:u.pers,persEnc:u.persEnc||"utf8",entropy:u.entropy||l(this.hash.hmacStrength),entropyEnc:u.entropy&&u.entropyEnc||"utf8",nonce:this.n.toArray()}),h=this.n.byteLength(),m=this.n.sub(new R(2));;){var y=new R(E.generate(h));if(!(y.cmp(m)>0))return y.iaddn(1),this.keyFromPrivate(y)}},_.prototype._truncateToN=function(u,E){var h=u.byteLength()*8-this.n.bitLength();return h>0&&(u=u.ushrn(h)),!E&&u.cmp(this.n)>=0?u.sub(this.n):u},_.prototype.sign=function(u,E,h,m){typeof h=="object"&&(m=h,h=null),m||(m={}),E=this.keyFromPrivate(E,h),u=this._truncateToN(new R(u,16));for(var y=this.n.byteLength(),C=E.getPrivate().toArray("be",y),D=u.toArray("be",y),T=new B({hash:this.hash,entropy:C,nonce:D,pers:m.pers,persEnc:m.persEnc||"utf8"}),H=this.n.sub(new R(1)),W=0;;W++){var Y=m.k?m.k(W):new R(T.generate(this.n.byteLength()));if(Y=this._truncateToN(Y,!0),!(Y.cmpn(1)<=0||Y.cmp(H)>=0)){var re=this.g.mul(Y);if(!re.isInfinity()){var ie=re.getX(),oe=ie.umod(this.n);if(oe.cmpn(0)!==0){var ae=Y.invm(this.n).mul(oe.mul(E.getPrivate()).iadd(u));if(ae=ae.umod(this.n),ae.cmpn(0)!==0){var de=(re.getY().isOdd()?1:0)|(ie.cmp(oe)!==0?2:0);return m.canonical&&ae.cmp(this.nh)>0&&(ae=this.n.sub(ae),de^=1),new f({r:oe,s:ae,recoveryParam:de})}}}}}},_.prototype.verify=function(u,E,h,m){u=this._truncateToN(new R(u,16)),h=this.keyFromPublic(h,m),E=new f(E,"hex");var y=E.r,C=E.s;if(y.cmpn(1)<0||y.cmp(this.n)>=0||C.cmpn(1)<0||C.cmp(this.n)>=0)return!1;var D=C.invm(this.n),T=D.mul(u).umod(this.n),H=D.mul(y).umod(this.n),W;return this.curve._maxwellTrick?(W=this.g.jmulAdd(T,h.getPublic(),H),W.isInfinity()?!1:W.eqXToP(y)):(W=this.g.mulAdd(T,h.getPublic(),H),W.isInfinity()?!1:W.getX().umod(this.n).cmp(y)===0)},_.prototype.recoverPubKey=function(p,u,E,h){o((3&E)===E,"The recovery param is more than two bits"),u=new f(u,h);var m=this.n,y=new R(p),C=u.r,D=u.s,T=E&1,H=E>>1;if(C.cmp(this.curve.p.umod(this.curve.n))>=0&&H)throw new Error("Unable to find sencond key candinate");H?C=this.curve.pointFromX(C.add(this.curve.n),T):C=this.curve.pointFromX(C,T);var W=u.r.invm(m),Y=m.sub(y).mul(W).umod(m),re=D.mul(W).umod(m);return this.g.mulAdd(Y,C,re)},_.prototype.getKeyRecoveryParam=function(p,u,E,h){if(u=new f(u,h),u.recoveryParam!==null)return u.recoveryParam;for(var m=0;m<4;m++){var y;try{y=this.recoverPubKey(p,u,m)}catch(C){continue}if(y.eq(E))return m}throw new Error("Unable to find valid recovery factor")}},31251:(g,G,k)=>{"use strict";var R=k(13550),B=k(80953),A=B.assert;function M(l,o){this.ec=l,this.priv=null,this.pub=null,o.priv&&this._importPrivate(o.priv,o.privEnc),o.pub&&this._importPublic(o.pub,o.pubEnc)}g.exports=M,M.fromPublic=function(o,d,f){return d instanceof M?d:new M(o,{pub:d,pubEnc:f})},M.fromPrivate=function(o,d,f){return d instanceof M?d:new M(o,{priv:d,privEnc:f})},M.prototype.validate=function(){var o=this.getPublic();return o.isInfinity()?{result:!1,reason:"Invalid public key"}:o.validate()?o.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},M.prototype.getPublic=function(o,d){return typeof o=="string"&&(d=o,o=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),d?this.pub.encode(d,o):this.pub},M.prototype.getPrivate=function(o){return o==="hex"?this.priv.toString(16,2):this.priv},M.prototype._importPrivate=function(o,d){this.priv=new R(o,d||16),this.priv=this.priv.umod(this.ec.curve.n)},M.prototype._importPublic=function(o,d){if(o.x||o.y){this.ec.curve.type==="mont"?A(o.x,"Need x coordinate"):(this.ec.curve.type==="short"||this.ec.curve.type==="edwards")&&A(o.x&&o.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(o.x,o.y);return}this.pub=this.ec.curve.decodePoint(o,d)},M.prototype.derive=function(o){return o.validate()||A(o.validate(),"public point not validated"),o.mul(this.priv).getX()},M.prototype.sign=function(o,d,f){return this.ec.sign(o,this,d,f)},M.prototype.verify=function(o,d){return this.ec.verify(o,d,this)},M.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},90611:(g,G,k)=>{"use strict";var R=k(13550),B=k(80953),A=B.assert;function M(_,p){if(_ instanceof M)return _;this._importDER(_,p)||(A(_.r&&_.s,"Signature without r or s"),this.r=new R(_.r,16),this.s=new R(_.s,16),_.recoveryParam===void 0?this.recoveryParam=null:this.recoveryParam=_.recoveryParam)}g.exports=M;function l(){this.place=0}function o(_,p){var u=_[p.place++];if(!(u&128))return u;var E=u&15;if(E===0||E>4)return!1;for(var h=0,m=0,y=p.place;m<E;m++,y++)h<<=8,h|=_[y],h>>>=0;return h<=127?!1:(p.place=y,h)}function d(_){for(var p=0,u=_.length-1;!_[p]&&!(_[p+1]&128)&&p<u;)p++;return p===0?_:_.slice(p)}M.prototype._importDER=function(p,u){p=B.toArray(p,u);var E=new l;if(p[E.place++]!==48)return!1;var h=o(p,E);if(h===!1||h+E.place!==p.length||p[E.place++]!==2)return!1;var m=o(p,E);if(m===!1)return!1;var y=p.slice(E.place,m+E.place);if(E.place+=m,p[E.place++]!==2)return!1;var C=o(p,E);if(C===!1||p.length!==C+E.place)return!1;var D=p.slice(E.place,C+E.place);if(y[0]===0)if(y[1]&128)y=y.slice(1);else return!1;if(D[0]===0)if(D[1]&128)D=D.slice(1);else return!1;return this.r=new R(y),this.s=new R(D),this.recoveryParam=null,!0};function f(_,p){if(p<128){_.push(p);return}var u=1+(Math.log(p)/Math.LN2>>>3);for(_.push(u|128);--u;)_.push(p>>>(u<<3)&255);_.push(p)}M.prototype.toDER=function(p){var u=this.r.toArray(),E=this.s.toArray();for(u[0]&128&&(u=[0].concat(u)),E[0]&128&&(E=[0].concat(E)),u=d(u),E=d(E);!E[0]&&!(E[1]&128);)E=E.slice(1);var h=[2];f(h,u.length),h=h.concat(u),h.push(2),f(h,E.length);var m=h.concat(E),y=[48];return f(y,m.length),y=y.concat(m),B.encode(y,p)}},65980:(g,G,k)=>{"use strict";var R=k(33715),B=k(45427),A=k(80953),M=A.assert,l=A.parseBytes,o=k(79087),d=k(23622);function f(_){if(M(_==="ed25519","only tested with ed25519 so far"),!(this instanceof f))return new f(_);_=B[_].curve,this.curve=_,this.g=_.g,this.g.precompute(_.n.bitLength()+1),this.pointClass=_.point().constructor,this.encodingLength=Math.ceil(_.n.bitLength()/8),this.hash=R.sha512}g.exports=f,f.prototype.sign=function(p,u){p=l(p);var E=this.keyFromSecret(u),h=this.hashInt(E.messagePrefix(),p),m=this.g.mul(h),y=this.encodePoint(m),C=this.hashInt(y,E.pubBytes(),p).mul(E.priv()),D=h.add(C).umod(this.curve.n);return this.makeSignature({R:m,S:D,Rencoded:y})},f.prototype.verify=function(p,u,E){p=l(p),u=this.makeSignature(u);var h=this.keyFromPublic(E),m=this.hashInt(u.Rencoded(),h.pubBytes(),p),y=this.g.mul(u.S()),C=u.R().add(h.pub().mul(m));return C.eq(y)},f.prototype.hashInt=function(){for(var p=this.hash(),u=0;u<arguments.length;u++)p.update(arguments[u]);return A.intFromLE(p.digest()).umod(this.curve.n)},f.prototype.keyFromPublic=function(p){return o.fromPublic(this,p)},f.prototype.keyFromSecret=function(p){return o.fromSecret(this,p)},f.prototype.makeSignature=function(p){return p instanceof d?p:new d(this,p)},f.prototype.encodePoint=function(p){var u=p.getY().toArray("le",this.encodingLength);return u[this.encodingLength-1]|=p.getX().isOdd()?128:0,u},f.prototype.decodePoint=function(p){p=A.parseBytes(p);var u=p.length-1,E=p.slice(0,u).concat(p[u]&~128),h=(p[u]&128)!=0,m=A.intFromLE(E);return this.curve.pointFromY(m,h)},f.prototype.encodeInt=function(p){return p.toArray("le",this.encodingLength)},f.prototype.decodeInt=function(p){return A.intFromLE(p)},f.prototype.isPoint=function(p){return p instanceof this.pointClass}},79087:(g,G,k)=>{"use strict";var R=k(80953),B=R.assert,A=R.parseBytes,M=R.cachedProperty;function l(o,d){this.eddsa=o,this._secret=A(d.secret),o.isPoint(d.pub)?this._pub=d.pub:this._pubBytes=A(d.pub)}l.fromPublic=function(d,f){return f instanceof l?f:new l(d,{pub:f})},l.fromSecret=function(d,f){return f instanceof l?f:new l(d,{secret:f})},l.prototype.secret=function(){return this._secret},M(l,"pubBytes",function(){return this.eddsa.encodePoint(this.pub())}),M(l,"pub",function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())}),M(l,"privBytes",function(){var d=this.eddsa,f=this.hash(),_=d.encodingLength-1,p=f.slice(0,d.encodingLength);return p[0]&=248,p[_]&=127,p[_]|=64,p}),M(l,"priv",function(){return this.eddsa.decodeInt(this.privBytes())}),M(l,"hash",function(){return this.eddsa.hash().update(this.secret()).digest()}),M(l,"messagePrefix",function(){return this.hash().slice(this.eddsa.encodingLength)}),l.prototype.sign=function(d){return B(this._secret,"KeyPair can only verify"),this.eddsa.sign(d,this)},l.prototype.verify=function(d,f){return this.eddsa.verify(d,f,this)},l.prototype.getSecret=function(d){return B(this._secret,"KeyPair is public only"),R.encode(this.secret(),d)},l.prototype.getPublic=function(d){return R.encode(this.pubBytes(),d)},g.exports=l},23622:(g,G,k)=>{"use strict";var R=k(13550),B=k(80953),A=B.assert,M=B.cachedProperty,l=B.parseBytes;function o(d,f){this.eddsa=d,typeof f!="object"&&(f=l(f)),Array.isArray(f)&&(f={R:f.slice(0,d.encodingLength),S:f.slice(d.encodingLength)}),A(f.R&&f.S,"Signature without R or S"),d.isPoint(f.R)&&(this._R=f.R),f.S instanceof R&&(this._S=f.S),this._Rencoded=Array.isArray(f.R)?f.R:f.Rencoded,this._Sencoded=Array.isArray(f.S)?f.S:f.Sencoded}M(o,"S",function(){return this.eddsa.decodeInt(this.Sencoded())}),M(o,"R",function(){return this.eddsa.decodePoint(this.Rencoded())}),M(o,"Rencoded",function(){return this.eddsa.encodePoint(this.R())}),M(o,"Sencoded",function(){return this.eddsa.encodeInt(this.S())}),o.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},o.prototype.toHex=function(){return B.encode(this.toBytes(),"hex").toUpperCase()},g.exports=o},91037:g=>{g.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},80953:(g,G,k)=>{"use strict";var R=G,B=k(13550),A=k(79746),M=k(34504);R.assert=A,R.toArray=M.toArray,R.zero2=M.zero2,R.toHex=M.toHex,R.encode=M.encode;function l(p,u,E){var h=new Array(Math.max(p.bitLength(),E)+1);h.fill(0);for(var m=1<<u+1,y=p.clone(),C=0;C<h.length;C++){var D,T=y.andln(m-1);y.isOdd()?(T>(m>>1)-1?D=(m>>1)-T:D=T,y.isubn(D)):D=0,h[C]=D,y.iushrn(1)}return h}R.getNAF=l;function o(p,u){var E=[[],[]];p=p.clone(),u=u.clone();for(var h=0,m=0,y;p.cmpn(-h)>0||u.cmpn(-m)>0;){var C=p.andln(3)+h&3,D=u.andln(3)+m&3;C===3&&(C=-1),D===3&&(D=-1);var T;(C&1)==0?T=0:(y=p.andln(7)+h&7,(y===3||y===5)&&D===2?T=-C:T=C),E[0].push(T);var H;(D&1)==0?H=0:(y=u.andln(7)+m&7,(y===3||y===5)&&C===2?H=-D:H=D),E[1].push(H),2*h===T+1&&(h=1-h),2*m===H+1&&(m=1-m),p.iushrn(1),u.iushrn(1)}return E}R.getJSF=o;function d(p,u,E){var h="_"+u;p.prototype[u]=function(){return this[h]!==void 0?this[h]:this[h]=E.call(this)}}R.cachedProperty=d;function f(p){return typeof p=="string"?R.toArray(p,"hex"):p}R.parseBytes=f;function _(p){return new B(p,"hex","le")}R.intFromLE=_},94079:(g,G,k)=>{"use strict";var R=k(40210),B=R("%Object.getOwnPropertyDescriptor%");if(B)try{B([],"length")}catch(A){B=null}g.exports=B},17187:g=>{"use strict";var G=typeof Reflect=="object"?Reflect:null,k=G&&typeof G.apply=="function"?G.apply:function(T,H,W){return Function.prototype.apply.call(T,H,W)},R;G&&typeof G.ownKeys=="function"?R=G.ownKeys:Object.getOwnPropertySymbols?R=function(T){return Object.getOwnPropertyNames(T).concat(Object.getOwnPropertySymbols(T))}:R=function(T){return Object.getOwnPropertyNames(T)};function B(D){console&&console.warn&&console.warn(D)}var A=Number.isNaN||function(T){return T!==T};function M(){M.init.call(this)}g.exports=M,g.exports.once=C,M.EventEmitter=M,M.prototype._events=void 0,M.prototype._eventsCount=0,M.prototype._maxListeners=void 0;var l=10;function o(D){if(typeof D!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof D)}Object.defineProperty(M,"defaultMaxListeners",{enumerable:!0,get:function(){return l},set:function(D){if(typeof D!="number"||D<0||A(D))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+D+".");l=D}}),M.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},M.prototype.setMaxListeners=function(T){if(typeof T!="number"||T<0||A(T))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+T+".");return this._maxListeners=T,this};function d(D){return D._maxListeners===void 0?M.defaultMaxListeners:D._maxListeners}M.prototype.getMaxListeners=function(){return d(this)},M.prototype.emit=function(T){for(var H=[],W=1;W<arguments.length;W++)H.push(arguments[W]);var Y=T==="error",re=this._events;if(re!==void 0)Y=Y&&re.error===void 0;else if(!Y)return!1;if(Y){var ie;if(H.length>0&&(ie=H[0]),ie instanceof Error)throw ie;var oe=new Error("Unhandled error."+(ie?" ("+ie.message+")":""));throw oe.context=ie,oe}var ae=re[T];if(ae===void 0)return!1;if(typeof ae=="function")k(ae,this,H);else for(var de=ae.length,te=h(ae,de),W=0;W<de;++W)k(te[W],this,H);return!0};function f(D,T,H,W){var Y,re,ie;if(o(H),re=D._events,re===void 0?(re=D._events=Object.create(null),D._eventsCount=0):(re.newListener!==void 0&&(D.emit("newListener",T,H.listener?H.listener:H),re=D._events),ie=re[T]),ie===void 0)ie=re[T]=H,++D._eventsCount;else if(typeof ie=="function"?ie=re[T]=W?[H,ie]:[ie,H]:W?ie.unshift(H):ie.push(H),Y=d(D),Y>0&&ie.length>Y&&!ie.warned){ie.warned=!0;var oe=new Error("Possible EventEmitter memory leak detected. "+ie.length+" "+String(T)+" listeners added. Use emitter.setMaxListeners() to increase limit");oe.name="MaxListenersExceededWarning",oe.emitter=D,oe.type=T,oe.count=ie.length,B(oe)}return D}M.prototype.addListener=function(T,H){return f(this,T,H,!1)},M.prototype.on=M.prototype.addListener,M.prototype.prependListener=function(T,H){return f(this,T,H,!0)};function _(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(D,T,H){var W={fired:!1,wrapFn:void 0,target:D,type:T,listener:H},Y=_.bind(W);return Y.listener=H,W.wrapFn=Y,Y}M.prototype.once=function(T,H){return o(H),this.on(T,p(this,T,H)),this},M.prototype.prependOnceListener=function(T,H){return o(H),this.prependListener(T,p(this,T,H)),this},M.prototype.removeListener=function(T,H){var W,Y,re,ie,oe;if(o(H),Y=this._events,Y===void 0)return this;if(W=Y[T],W===void 0)return this;if(W===H||W.listener===H)--this._eventsCount==0?this._events=Object.create(null):(delete Y[T],Y.removeListener&&this.emit("removeListener",T,W.listener||H));else if(typeof W!="function"){for(re=-1,ie=W.length-1;ie>=0;ie--)if(W[ie]===H||W[ie].listener===H){oe=W[ie].listener,re=ie;break}if(re<0)return this;re===0?W.shift():m(W,re),W.length===1&&(Y[T]=W[0]),Y.removeListener!==void 0&&this.emit("removeListener",T,oe||H)}return this},M.prototype.off=M.prototype.removeListener,M.prototype.removeAllListeners=function(T){var H,W,Y;if(W=this._events,W===void 0)return this;if(W.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):W[T]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete W[T]),this;if(arguments.length===0){var re=Object.keys(W),ie;for(Y=0;Y<re.length;++Y)ie=re[Y],ie!=="removeListener"&&this.removeAllListeners(ie);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(H=W[T],typeof H=="function")this.removeListener(T,H);else if(H!==void 0)for(Y=H.length-1;Y>=0;Y--)this.removeListener(T,H[Y]);return this};function u(D,T,H){var W=D._events;if(W===void 0)return[];var Y=W[T];return Y===void 0?[]:typeof Y=="function"?H?[Y.listener||Y]:[Y]:H?y(Y):h(Y,Y.length)}M.prototype.listeners=function(T){return u(this,T,!0)},M.prototype.rawListeners=function(T){return u(this,T,!1)},M.listenerCount=function(D,T){return typeof D.listenerCount=="function"?D.listenerCount(T):E.call(D,T)},M.prototype.listenerCount=E;function E(D){var T=this._events;if(T!==void 0){var H=T[D];if(typeof H=="function")return 1;if(H!==void 0)return H.length}return 0}M.prototype.eventNames=function(){return this._eventsCount>0?R(this._events):[]};function h(D,T){for(var H=new Array(T),W=0;W<T;++W)H[W]=D[W];return H}function m(D,T){for(;T+1<D.length;T++)D[T]=D[T+1];D.pop()}function y(D){for(var T=new Array(D.length),H=0;H<T.length;++H)T[H]=D[H].listener||D[H];return T}function C(D,T){return new Promise(function(H,W){function Y(){re!==void 0&&D.removeListener("error",re),H([].slice.call(arguments))}var re;T!=="error"&&(re=function(oe){D.removeListener(T,Y),W(oe)},D.once("error",re)),D.once(T,Y)})}},13048:(g,G,k)=>{var R=k(89509).Buffer,B=k(62318);function A(M,l,o,d){if(R.isBuffer(M)||(M=R.from(M,"binary")),l&&(R.isBuffer(l)||(l=R.from(l,"binary")),l.length!==8))throw new RangeError("salt should be Buffer with 8 byte length");for(var f=o/8,_=R.alloc(f),p=R.alloc(d||0),u=R.alloc(0);f>0||d>0;){var E=new B;E.update(u),E.update(M),l&&E.update(l),u=E.digest();var h=0;if(f>0){var m=_.length-f;h=Math.min(f,u.length),u.copy(_,m,0,h),f-=h}if(h<u.length&&d>0){var y=p.length-d,C=Math.min(d,u.length-h);u.copy(p,y,h,h+C),d-=C}}return u.fill(0),{key:_,iv:p}}g.exports=A},64063:g=>{"use strict";g.exports=function G(k,R){if(k===R)return!0;if(k&&R&&typeof k=="object"&&typeof R=="object"){if(k.constructor!==R.constructor)return!1;var B,A,M;if(Array.isArray(k)){if(B=k.length,B!=R.length)return!1;for(A=B;A--!=0;)if(!G(k[A],R[A]))return!1;return!0}if(k.constructor===RegExp)return k.source===R.source&&k.flags===R.flags;if(k.valueOf!==Object.prototype.valueOf)return k.valueOf()===R.valueOf();if(k.toString!==Object.prototype.toString)return k.toString()===R.toString();if(M=Object.keys(k),B=M.length,B!==Object.keys(R).length)return!1;for(A=B;A--!=0;)if(!Object.prototype.hasOwnProperty.call(R,M[A]))return!1;for(A=B;A--!=0;){var l=M[A];if(!G(k[l],R[l]))return!1}return!0}return k!==k&&R!==R}},35035:g=>{"use strict";g.exports=function(G,k){k||(k={}),typeof k=="function"&&(k={cmp:k});var R=typeof k.cycles=="boolean"?k.cycles:!1,B=k.cmp&&function(M){return function(l){return function(o,d){var f={key:o,value:l[o]},_={key:d,value:l[d]};return M(f,_)}}}(k.cmp),A=[];return function M(l){if(l&&l.toJSON&&typeof l.toJSON=="function"&&(l=l.toJSON()),l!==void 0){if(typeof l=="number")return isFinite(l)?""+l:"null";if(typeof l!="object")return JSON.stringify(l);var o,d;if(Array.isArray(l)){for(d="[",o=0;o<l.length;o++)o&&(d+=","),d+=M(l[o])||"null";return d+"]"}if(l===null)return"null";if(A.indexOf(l)!==-1){if(R)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var f=A.push(l)-1,_=Object.keys(l).sort(B&&B(l));for(d="",o=0;o<_.length;o++){var p=_[o],u=M(l[p]);!u||(d&&(d+=","),d+=JSON.stringify(p)+":"+u)}return A.splice(f,1),"{"+d+"}"}}(G)}},49804:g=>{var G=Object.prototype.hasOwnProperty,k=Object.prototype.toString;g.exports=function(B,A,M){if(k.call(A)!=="[object Function]")throw new TypeError("iterator must be a function");var l=B.length;if(l===+l)for(var o=0;o<l;o++)A.call(M,B[o],o,B);else for(var d in B)G.call(B,d)&&A.call(M,B[d],d,B)}},17648:g=>{"use strict";var G="Function.prototype.bind called on incompatible ",k=Array.prototype.slice,R=Object.prototype.toString,B="[object Function]";g.exports=function(M){var l=this;if(typeof l!="function"||R.call(l)!==B)throw new TypeError(G+l);for(var o=k.call(arguments,1),d,f=function(){if(this instanceof d){var h=l.apply(this,o.concat(k.call(arguments)));return Object(h)===h?h:this}else return l.apply(M,o.concat(k.call(arguments)))},_=Math.max(0,l.length-o.length),p=[],u=0;u<_;u++)p.push("$"+u);if(d=Function("binder","return function ("+p.join(",")+"){ return binder.apply(this,arguments); }")(f),l.prototype){var E=function(){};E.prototype=l.prototype,d.prototype=new E,E.prototype=null}return d}},58612:(g,G,k)=>{"use strict";var R=k(17648);g.exports=Function.prototype.bind||R},40210:(g,G,k)=>{"use strict";var R,B=SyntaxError,A=Function,M=TypeError,l=function(de){try{return A('"use strict"; return ('+de+").constructor;")()}catch(te){}},o=Object.getOwnPropertyDescriptor;if(o)try{o({},"")}catch(de){o=null}var d=function(){throw new M},f=o?function(){try{return arguments.callee,d}catch(de){try{return o(arguments,"callee").get}catch(te){return d}}}():d,_=k(41405)(),p=Object.getPrototypeOf||function(de){return de.__proto__},u={},E=typeof Uint8Array=="undefined"?R:p(Uint8Array),h={"%AggregateError%":typeof AggregateError=="undefined"?R:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?R:ArrayBuffer,"%ArrayIteratorPrototype%":_?p([][Symbol.iterator]()):R,"%AsyncFromSyncIteratorPrototype%":R,"%AsyncFunction%":u,"%AsyncGenerator%":u,"%AsyncGeneratorFunction%":u,"%AsyncIteratorPrototype%":u,"%Atomics%":typeof Atomics=="undefined"?R:Atomics,"%BigInt%":typeof BigInt=="undefined"?R:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?R:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array=="undefined"?R:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?R:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?R:FinalizationRegistry,"%Function%":A,"%GeneratorFunction%":u,"%Int8Array%":typeof Int8Array=="undefined"?R:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?R:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?R:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":_?p(p([][Symbol.iterator]())):R,"%JSON%":typeof JSON=="object"?JSON:R,"%Map%":typeof Map=="undefined"?R:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!_?R:p(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?R:Promise,"%Proxy%":typeof Proxy=="undefined"?R:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect=="undefined"?R:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?R:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!_?R:p(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?R:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":_?p(""[Symbol.iterator]()):R,"%Symbol%":_?Symbol:R,"%SyntaxError%":B,"%ThrowTypeError%":f,"%TypedArray%":E,"%TypeError%":M,"%Uint8Array%":typeof Uint8Array=="undefined"?R:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?R:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?R:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?R:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap=="undefined"?R:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?R:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?R:WeakSet},m=function de(te){var O;if(te==="%AsyncFunction%")O=l("async function () {}");else if(te==="%GeneratorFunction%")O=l("function* () {}");else if(te==="%AsyncGeneratorFunction%")O=l("async function* () {}");else if(te==="%AsyncGenerator%"){var q=de("%AsyncGeneratorFunction%");q&&(O=q.prototype)}else if(te==="%AsyncIteratorPrototype%"){var x=de("%AsyncGenerator%");x&&(O=p(x.prototype))}return h[te]=O,O},y={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},C=k(58612),D=k(17642),T=C.call(Function.call,Array.prototype.concat),H=C.call(Function.apply,Array.prototype.splice),W=C.call(Function.call,String.prototype.replace),Y=C.call(Function.call,String.prototype.slice),re=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,ie=/\\(\\)?/g,oe=function(te){var O=Y(te,0,1),q=Y(te,-1);if(O==="%"&&q!=="%")throw new B("invalid intrinsic syntax, expected closing `%`");if(q==="%"&&O!=="%")throw new B("invalid intrinsic syntax, expected opening `%`");var x=[];return W(te,re,function(a,b,P,F){x[x.length]=P?W(F,ie,"$1"):b||a}),x},ae=function(te,O){var q=te,x;if(D(y,q)&&(x=y[q],q="%"+x[0]+"%"),D(h,q)){var a=h[q];if(a===u&&(a=m(q)),typeof a=="undefined"&&!O)throw new M("intrinsic "+te+" exists, but is not available. Please file an issue!");return{alias:x,name:q,value:a}}throw new B("intrinsic "+te+" does not exist!")};g.exports=function(te,O){if(typeof te!="string"||te.length===0)throw new M("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof O!="boolean")throw new M('"allowMissing" argument must be a boolean');var q=oe(te),x=q.length>0?q[0]:"",a=ae("%"+x+"%",O),b=a.name,P=a.value,F=!1,L=a.alias;L&&(x=L[0],H(q,T([0,1],L)));for(var I=1,K=!0;I<q.length;I+=1){var z=q[I],w=Y(z,0,1),j=Y(z,-1);if((w==='"'||w==="'"||w==="`"||j==='"'||j==="'"||j==="`")&&w!==j)throw new B("property names with quotes must have matching quotes");if((z==="constructor"||!K)&&(F=!0),x+="."+z,b="%"+x+"%",D(h,b))P=h[b];else if(P!=null){if(!(z in P)){if(!O)throw new M("base intrinsic for "+te+" exists, but the property is not available.");return}if(o&&I+1>=q.length){var he=o(P,z);K=!!he,K&&"get"in he&&!("originalValue"in he.get)?P=he.get:P=P[z]}else K=D(P,z),P=P[z];K&&!F&&(h[b]=P)}}return P}},89967:g=>{var G={kind:"Document",definitions:[{kind:"FragmentDefinition",name:{kind:"Name",value:"Merged"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"MergedEvent"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"actor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"avatarUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"mergeRef"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"commit"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"oid"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"commitUrl"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"HeadRefDeleted"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"HeadRefDeletedEvent"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"actor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"avatarUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"headRefName"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"Ref"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Ref"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"repository"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"target"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"oid"},arguments:[],directives:[]}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"Comment"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"IssueComment"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"databaseId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"authorAssociation"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"author"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"avatarUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Organization"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"body"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bodyHTML"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"viewerCanUpdate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"viewerCanReact"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"viewerCanDelete"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"Commit"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PullRequestCommit"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"commit"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"author"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"user"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"avatarUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"committer"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"avatarUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"oid"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"message"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"authoredDate"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"AssignedEvent"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"AssignedEvent"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"actor"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"avatarUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"user"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"avatarUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"Review"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PullRequestReview"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"databaseId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"authorAssociation"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"author"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"avatarUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Organization"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"state"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"body"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bodyHTML"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"submittedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"Reactable"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Reactable"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"reactionGroups"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"content"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"viewerHasReacted"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"users"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"ReviewThread"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PullRequestReviewThread"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isResolved"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"viewerCanResolve"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"viewerCanUnresolve"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"diffSide"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"line"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"originalLine"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isOutdated"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"comments"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"100"}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ReviewComment"},directives:[]}]}}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"TimelineEvents"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"owner"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"number"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"last"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},defaultValue:{kind:"IntValue",value:"150"},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"repository"},arguments:[{kind:"Argument",name:{kind:"Name",value:"owner"},value:{kind:"Variable",name:{kind:"Name",value:"owner"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"pullRequest"},arguments:[{kind:"Argument",name:{kind:"Name",value:"number"},value:{kind:"Variable",name:{kind:"Name",value:"number"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"timelineItems"},arguments:[{kind:"Argument",name:{kind:"Name",value:"last"},value:{kind:"Variable",name:{kind:"Name",value:"last"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]},{kind:"FragmentSpread",name:{kind:"Name",value:"Merged"},directives:[]},{kind:"FragmentSpread",name:{kind:"Name",value:"Comment"},directives:[]},{kind:"FragmentSpread",name:{kind:"Name",value:"Review"},directives:[]},{kind:"FragmentSpread",name:{kind:"Name",value:"Commit"},directives:[]},{kind:"FragmentSpread",name:{kind:"Name",value:"AssignedEvent"},directives:[]},{kind:"FragmentSpread",name:{kind:"Name",value:"HeadRefDeleted"},directives:[]}]}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"rateLimit"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"limit"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cost"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"remaining"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"resetAt"},arguments:[],directives:[]}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"IssueTimelineEvents"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"owner"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"number"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"last"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},defaultValue:{kind:"IntValue",value:"150"},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"repository"},arguments:[{kind:"Argument",name:{kind:"Name",value:"owner"},value:{kind:"Variable",name:{kind:"Name",value:"owner"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"pullRequest"},name:{kind:"Name",value:"issue"},arguments:[{kind:"Argument",name:{kind:"Name",value:"number"},value:{kind:"Variable",name:{kind:"Name",value:"number"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"timelineItems"},arguments:[{kind:"Argument",name:{kind:"Name",value:"last"},value:{kind:"Variable",name:{kind:"Name",value:"last"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"__typename"},arguments:[],directives:[]},{kind:"FragmentSpread",name:{kind:"Name",value:"Comment"},directives:[]},{kind:"FragmentSpread",name:{kind:"Name",value:"AssignedEvent"},directives:[]}]}}]}}]}}]}}]}},{kind:"FragmentDefinition",name:{kind:"Name",value:"ReviewComment"},typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PullRequestReviewComment"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"databaseId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"author"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"avatarUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Organization"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"originalPosition"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"body"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bodyHTML"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"diffHunk"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"position"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"state"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"pullRequestReview"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"databaseId"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"commit"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"oid"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"replyTo"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"databaseId"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"originalCommit"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"oid"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"reactionGroups"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"content"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"viewerHasReacted"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"users"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"totalCount"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"viewerCanUpdate"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"viewerCanDelete"},arguments:[],directives:[]}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetPendingReviewId"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"pullRequestId"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"author"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"pullRequestId"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"PullRequest"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"reviews"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"1"}},{kind:"Argument",name:{kind:"Name",value:"author"},value:{kind:"Variable",name:{kind:"Name",value:"author"}}},{kind:"Argument",name:{kind:"Name",value:"states"},value:{kind:"ListValue",values:[{kind:"EnumValue",value:"PENDING"}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"rateLimit"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"limit"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cost"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"remaining"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"resetAt"},arguments:[],directives:[]}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"PullRequestComments"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"owner"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"number"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"first"}},type:{kind:"NamedType",name:{kind:"Name",value:"Int"}},defaultValue:{kind:"IntValue",value:"100"},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"repository"},arguments:[{kind:"Argument",name:{kind:"Name",value:"owner"},value:{kind:"Variable",name:{kind:"Name",value:"owner"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"pullRequest"},arguments:[{kind:"Argument",name:{kind:"Name",value:"number"},value:{kind:"Variable",name:{kind:"Name",value:"number"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"reviewThreads"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"Variable",name:{kind:"Name",value:"first"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isResolved"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"viewerCanResolve"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"viewerCanUnresolve"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"diffSide"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"line"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"originalLine"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isOutdated"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"comments"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"100"}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ReviewComment"},directives:[]}]}}]}}]}}]}}]}}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"PullRequest"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"owner"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"number"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"repository"},arguments:[{kind:"Argument",name:{kind:"Name",value:"owner"},value:{kind:"Variable",name:{kind:"Name",value:"owner"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"pullRequest"},arguments:[{kind:"Argument",name:{kind:"Name",value:"number"},value:{kind:"Variable",name:{kind:"Name",value:"number"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"number"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"state"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"body"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bodyHTML"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"author"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"avatarUrl"},arguments:[],directives:[]},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Organization"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"headRef"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"Ref"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"headRefName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"headRefOid"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"headRepository"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"baseRef"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"Ref"},directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"baseRefName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"baseRefOid"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"baseRepository"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"labels"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"50"}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"merged"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"mergeable"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"databaseId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isDraft"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"milestone"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"dueOn"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"assignees"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"10"}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"avatarUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"suggestedReviewers"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isAuthor"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"isCommenter"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"reviewer"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"avatarUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]}]}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"rateLimit"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"limit"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cost"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"remaining"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"resetAt"},arguments:[],directives:[]}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"PullRequestFiles"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"owner"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"number"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"repository"},arguments:[{kind:"Argument",name:{kind:"Name",value:"owner"},value:{kind:"Variable",name:{kind:"Name",value:"owner"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"pullRequest"},arguments:[{kind:"Argument",name:{kind:"Name",value:"number"},value:{kind:"Variable",name:{kind:"Name",value:"number"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"files"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"100"}},{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"path"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"viewerViewedState"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"pageInfo"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"endCursor"},arguments:[],directives:[]}]}}]}}]}}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"Issue"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"owner"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"number"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"repository"},arguments:[{kind:"Argument",name:{kind:"Name",value:"owner"},value:{kind:"Variable",name:{kind:"Name",value:"owner"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"pullRequest"},name:{kind:"Name",value:"issue"},arguments:[{kind:"Argument",name:{kind:"Name",value:"number"},value:{kind:"Variable",name:{kind:"Name",value:"number"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"number"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"state"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"body"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bodyHTML"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"author"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"avatarUrl"},arguments:[],directives:[]},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Organization"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"labels"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"50"}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"color"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"databaseId"},arguments:[],directives:[]}]}}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"IssueWithComments"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"owner"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"number"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"repository"},arguments:[{kind:"Argument",name:{kind:"Name",value:"owner"},value:{kind:"Variable",name:{kind:"Name",value:"owner"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:{kind:"Name",value:"pullRequest"},name:{kind:"Name",value:"issue"},arguments:[{kind:"Argument",name:{kind:"Name",value:"number"},value:{kind:"Variable",name:{kind:"Name",value:"number"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"number"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"state"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"body"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bodyHTML"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"author"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"avatarUrl"},arguments:[],directives:[]},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Organization"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"labels"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"50"}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"color"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"databaseId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"comments"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"50"}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"author"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"avatarUrl"},arguments:[],directives:[]},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Organization"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"body"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"databaseId"},arguments:[],directives:[]}]}}]}}]}}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetUser"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"login"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"user"},arguments:[{kind:"Argument",name:{kind:"Name",value:"login"},value:{kind:"Variable",name:{kind:"Name",value:"login"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"avatarUrl"},arguments:[{kind:"Argument",name:{kind:"Name",value:"size"},value:{kind:"IntValue",value:"50"}}],directives:[]},{kind:"Field",name:{kind:"Name",value:"bio"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"company"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"location"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"contributionsCollection"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"commitContributionsByRepository"},arguments:[{kind:"Argument",name:{kind:"Name",value:"maxRepositories"},value:{kind:"IntValue",value:"50"}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"contributions"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"1"}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"occurredAt"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"repository"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nameWithOwner"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"PullRequestMergeability"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"owner"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"number"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"repository"},arguments:[{kind:"Argument",name:{kind:"Name",value:"owner"},value:{kind:"Variable",name:{kind:"Name",value:"owner"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"pullRequest"},arguments:[{kind:"Argument",name:{kind:"Name",value:"number"},value:{kind:"Variable",name:{kind:"Name",value:"number"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"mergeable"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"rateLimit"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"limit"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cost"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"remaining"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"resetAt"},arguments:[],directives:[]}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"PullRequestState"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"owner"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"number"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"repository"},arguments:[{kind:"Argument",name:{kind:"Name",value:"owner"},value:{kind:"Variable",name:{kind:"Name",value:"owner"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"pullRequest"},arguments:[{kind:"Argument",name:{kind:"Name",value:"number"},value:{kind:"Variable",name:{kind:"Name",value:"number"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"number"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"state"},arguments:[],directives:[]}]}}]}}]}},{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"AddComment"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"AddPullRequestReviewCommentInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"addPullRequestReviewComment"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"comment"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ReviewComment"},directives:[]}]}}]}}]}},{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"AddReviewThread"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"AddPullRequestReviewThreadInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"addPullRequestReviewThread"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"thread"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ReviewThread"},directives:[]}]}}]}}]}},{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"EditComment"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdatePullRequestReviewCommentInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updatePullRequestReviewComment"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"pullRequestReviewComment"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ReviewComment"},directives:[]}]}}]}}]}},{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ReadyForReview"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"MarkPullRequestReadyForReviewInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"markPullRequestReadyForReview"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"pullRequest"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isDraft"},arguments:[],directives:[]}]}}]}}]}},{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"StartReview"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"AddPullRequestReviewInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"addPullRequestReview"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"pullRequestReview"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}},{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"SubmitReview"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ID"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"event"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"PullRequestReviewEvent"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"body"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"submitPullRequestReview"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"event"},value:{kind:"Variable",name:{kind:"Name",value:"event"}}},{kind:"ObjectField",name:{kind:"Name",value:"pullRequestReviewId"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}},{kind:"ObjectField",name:{kind:"Name",value:"body"},value:{kind:"Variable",name:{kind:"Name",value:"body"}}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"pullRequestReview"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"comments"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"100"}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ReviewComment"},directives:[]}]}}]}},{kind:"FragmentSpread",name:{kind:"Name",value:"Review"},directives:[]}]}}]}}]}},{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteReview"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"DeletePullRequestReviewInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"deletePullRequestReview"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"pullRequestReview"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"databaseId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"comments"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"100"}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ReviewComment"},directives:[]}]}}]}}]}}]}}]}},{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"AddReaction"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"AddReactionInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"addReaction"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"reaction"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"content"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"subject"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"Reactable"},directives:[]}]}}]}}]}},{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"DeleteReaction"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"RemoveReactionInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"removeReaction"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"reaction"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"content"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"subject"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"Reactable"},directives:[]}]}}]}}]}},{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UpdatePullRequest"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdatePullRequestInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updatePullRequest"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"pullRequest"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"body"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bodyHTML"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]}]}}]}}]}},{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"AddIssueComment"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"AddCommentInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"addComment"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"commentEdge"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"Comment"},directives:[]}]}}]}}]}}]}},{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"EditIssueComment"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UpdateIssueCommentInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"updateIssueComment"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"issueComment"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"Comment"},directives:[]}]}}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetMentionableUsers"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"owner"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"first"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"repository"},arguments:[{kind:"Argument",name:{kind:"Name",value:"owner"},value:{kind:"Variable",name:{kind:"Name",value:"owner"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"mentionableUsers"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"Variable",name:{kind:"Name",value:"first"}}},{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"avatarUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"pageInfo"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"endCursor"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"rateLimit"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"limit"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cost"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"remaining"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"resetAt"},arguments:[],directives:[]}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetAssignableUsers"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"owner"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"first"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"after"}},type:{kind:"NamedType",name:{kind:"Name",value:"String"}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"repository"},arguments:[{kind:"Argument",name:{kind:"Name",value:"owner"},value:{kind:"Variable",name:{kind:"Name",value:"owner"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"assignableUsers"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"Variable",name:{kind:"Name",value:"first"}}},{kind:"Argument",name:{kind:"Name",value:"after"},value:{kind:"Variable",name:{kind:"Name",value:"after"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"avatarUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"pageInfo"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"endCursor"},arguments:[],directives:[]}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"rateLimit"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"limit"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"cost"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"remaining"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"resetAt"},arguments:[],directives:[]}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"IssuesWithoutMilestone"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"owner"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"assignee"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"repository"},arguments:[{kind:"Argument",name:{kind:"Name",value:"owner"},value:{kind:"Variable",name:{kind:"Name",value:"owner"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"issues"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"100"}},{kind:"Argument",name:{kind:"Name",value:"states"},value:{kind:"EnumValue",value:"OPEN"}},{kind:"Argument",name:{kind:"Name",value:"filterBy"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"assignee"},value:{kind:"Variable",name:{kind:"Name",value:"assignee"}}},{kind:"ObjectField",name:{kind:"Name",value:"milestone"},value:{kind:"NullValue"}}]}},{kind:"Argument",name:{kind:"Name",value:"orderBy"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"direction"},value:{kind:"EnumValue",value:"DESC"}},{kind:"ObjectField",name:{kind:"Name",value:"field"},value:{kind:"EnumValue",value:"UPDATED_AT"}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Issue"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"number"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"state"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"body"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bodyHTML"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"assignees"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"10"}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"author"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"avatarUrl"},arguments:[{kind:"Argument",name:{kind:"Name",value:"size"},value:{kind:"IntValue",value:"50"}}],directives:[]},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Organization"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"labels"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"50"}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"color"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"databaseId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"milestone"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"dueOn"},arguments:[],directives:[]}]}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"pageInfo"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"endCursor"},arguments:[],directives:[]}]}}]}}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"MaxIssue"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"owner"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"repository"},arguments:[{kind:"Argument",name:{kind:"Name",value:"owner"},value:{kind:"Variable",name:{kind:"Name",value:"owner"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"issues"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"1"}},{kind:"Argument",name:{kind:"Name",value:"orderBy"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"direction"},value:{kind:"EnumValue",value:"DESC"}},{kind:"ObjectField",name:{kind:"Name",value:"field"},value:{kind:"EnumValue",value:"CREATED_AT"}}]}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Issue"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"number"},arguments:[],directives:[]}]}}]}}]}}]}}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetMilestones"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"owner"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"assignee"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"repository"},arguments:[{kind:"Argument",name:{kind:"Name",value:"owner"},value:{kind:"Variable",name:{kind:"Name",value:"owner"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"milestones"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"12"}},{kind:"Argument",name:{kind:"Name",value:"orderBy"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"direction"},value:{kind:"EnumValue",value:"DESC"}},{kind:"ObjectField",name:{kind:"Name",value:"field"},value:{kind:"EnumValue",value:"DUE_DATE"}}]}},{kind:"Argument",name:{kind:"Name",value:"states"},value:{kind:"EnumValue",value:"OPEN"}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"dueOn"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"issues"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"100"}},{kind:"Argument",name:{kind:"Name",value:"filterBy"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"assignee"},value:{kind:"Variable",name:{kind:"Name",value:"assignee"}}}]}},{kind:"Argument",name:{kind:"Name",value:"orderBy"},value:{kind:"ObjectValue",fields:[{kind:"ObjectField",name:{kind:"Name",value:"direction"},value:{kind:"EnumValue",value:"DESC"}},{kind:"ObjectField",name:{kind:"Name",value:"field"},value:{kind:"EnumValue",value:"UPDATED_AT"}}]}},{kind:"Argument",name:{kind:"Name",value:"states"},value:{kind:"EnumValue",value:"OPEN"}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"edges"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Issue"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"number"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"state"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"body"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bodyHTML"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"assignees"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"10"}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"avatarUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"author"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"avatarUrl"},arguments:[{kind:"Argument",name:{kind:"Name",value:"size"},value:{kind:"IntValue",value:"50"}}],directives:[]},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Organization"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"labels"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"50"}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"color"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"databaseId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"milestone"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"dueOn"},arguments:[],directives:[]}]}}]}}]}}]}}]}}]}},{kind:"Field",name:{kind:"Name",value:"pageInfo"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"endCursor"},arguments:[],directives:[]}]}}]}}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"Issues"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"query"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"search"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"100"}},{kind:"Argument",name:{kind:"Name",value:"type"},value:{kind:"EnumValue",value:"ISSUE"}},{kind:"Argument",name:{kind:"Name",value:"query"},value:{kind:"Variable",name:{kind:"Name",value:"query"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"issueCount"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"pageInfo"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"hasNextPage"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"endCursor"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"edges"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"node"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Issue"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"number"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"state"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"body"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"bodyHTML"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"assignees"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"10"}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"avatarUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"author"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"avatarUrl"},arguments:[{kind:"Argument",name:{kind:"Name",value:"size"},value:{kind:"IntValue",value:"50"}}],directives:[]},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"User"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"Organization"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"email"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"updatedAt"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"labels"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"50"}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"color"},arguments:[],directives:[]}]}}]}},{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"databaseId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"milestone"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"dueOn"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"createdAt"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"repository"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]}]}},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]}]}}]}}]}}]}}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetViewerPermission"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"owner"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"repository"},arguments:[{kind:"Argument",name:{kind:"Name",value:"owner"},value:{kind:"Variable",name:{kind:"Name",value:"owner"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"viewerPermission"},arguments:[],directives:[]}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetRepositoryForkDetails"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"owner"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"repository"},arguments:[{kind:"Argument",name:{kind:"Name",value:"owner"},value:{kind:"Variable",name:{kind:"Name",value:"owner"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"isFork"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"parent"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"owner"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"login"},arguments:[],directives:[]}]}}]}}]}}]}},{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GetChecks"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"owner"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"name"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"String"}}},directives:[]},{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"number"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"repository"},arguments:[{kind:"Argument",name:{kind:"Name",value:"owner"},value:{kind:"Variable",name:{kind:"Name",value:"owner"}}},{kind:"Argument",name:{kind:"Name",value:"name"},value:{kind:"Variable",name:{kind:"Name",value:"name"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"pullRequest"},arguments:[{kind:"Argument",name:{kind:"Name",value:"number"},value:{kind:"Variable",name:{kind:"Name",value:"number"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"commits"},arguments:[{kind:"Argument",name:{kind:"Name",value:"last"},value:{kind:"IntValue",value:"1"}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"commit"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"statusCheckRollup"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"state"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"contexts"},arguments:[{kind:"Argument",name:{kind:"Name",value:"first"},value:{kind:"IntValue",value:"100"}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"StatusContext"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"state"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"targetUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"description"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"context"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"avatarUrl"},arguments:[],directives:[]}]}},{kind:"InlineFragment",typeCondition:{kind:"NamedType",name:{kind:"Name",value:"CheckRun"}},directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"conclusion"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"title"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"detailsUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"resourcePath"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"checkSuite"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"app"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"logoUrl"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"url"},arguments:[],directives:[]}]}}]}}]}}]}}]}}]}}]}}]}}]}}]}}]}}]}},{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"ResolveReviewThread"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"ResolveReviewThreadInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"resolveReviewThread"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"thread"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ReviewThread"},directives:[]}]}}]}}]}},{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UnresolveReviewThread"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UnresolveReviewThreadInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"unresolveReviewThread"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"thread"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:"ReviewThread"},directives:[]}]}}]}}]}},{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"MarkFileAsViewed"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"MarkFileAsViewedInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"markFileAsViewed"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"pullRequest"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}},{kind:"OperationDefinition",operation:"mutation",name:{kind:"Name",value:"UnmarkFileAsViewed"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"input"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"UnmarkFileAsViewedInput"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"unmarkFileAsViewed"},arguments:[{kind:"Argument",name:{kind:"Name",value:"input"},value:{kind:"Variable",name:{kind:"Name",value:"input"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"pullRequest"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:14578}};G.loc.source={body:`# /*---------------------------------------------------------------------------------------------
# * Copyright (c) Microsoft Corporation. All rights reserved.
# * Licensed under the MIT License. See License.txt in the project root for license information.
# *--------------------------------------------------------------------------------------------*/
fragment Merged on MergedEvent {
id
actor {
login
avatarUrl
url
}
createdAt
mergeRef {
name
}
commit {
oid
commitUrl
}
url
}
fragment HeadRefDeleted on HeadRefDeletedEvent {
id
actor {
login
avatarUrl
url
}
createdAt
headRefName
}
fragment Ref on Ref {
name
repository {
owner {
login
}
url
}
target {
oid
}
}
fragment Comment on IssueComment {
id
databaseId
authorAssociation
author {
login
avatarUrl
url
... on User {
email
}
... on Organization {
email
}
}
url
body
bodyHTML
updatedAt
createdAt
viewerCanUpdate
viewerCanReact
viewerCanDelete
}
fragment Commit on PullRequestCommit {
id
commit {
author {
user {
login
avatarUrl
url
email
}
}
committer {
avatarUrl
name
}
oid
message
authoredDate
}
url
}
fragment AssignedEvent on AssignedEvent {
actor {
login
avatarUrl
url
}
user {
login
avatarUrl
url
}
}
fragment Review on PullRequestReview {
id
databaseId
authorAssociation
url
author {
login
avatarUrl
url
... on User {
email
}
... on Organization {
email
}
}
state
body
bodyHTML
submittedAt
updatedAt
createdAt
}
fragment Reactable on Reactable {
reactionGroups {
content
viewerHasReacted
users {
totalCount
}
}
}
fragment ReviewThread on PullRequestReviewThread {
id
isResolved
viewerCanResolve
viewerCanUnresolve
path
diffSide
line
originalLine
isOutdated
comments(first: 100) {
nodes {
...ReviewComment
}
}
}
query TimelineEvents($owner: String!, $name: String!, $number: Int!, $last: Int = 150) {
repository(owner: $owner, name: $name) {
pullRequest(number: $number) {
timelineItems(last: $last) {
nodes {
__typename
...Merged
...Comment
...Review
...Commit
...AssignedEvent
...HeadRefDeleted
}
}
}
}
rateLimit {
limit
cost
remaining
resetAt
}
}
query IssueTimelineEvents($owner: String!, $name: String!, $number: Int!, $last: Int = 150) {
repository(owner: $owner, name: $name) {
pullRequest: issue(number: $number) {
timelineItems(last: $last) {
nodes {
__typename
...Comment
...AssignedEvent
}
}
}
}
}
fragment ReviewComment on PullRequestReviewComment {
id
databaseId
url
author {
login
avatarUrl
url
... on User {
email
}
... on Organization {
email
}
}
path
originalPosition
body
bodyHTML
diffHunk
position
state
pullRequestReview {
databaseId
}
commit {
oid
}
replyTo {
databaseId
}
createdAt
originalCommit {
oid
}
reactionGroups {
content
viewerHasReacted
users {
totalCount
}
}
viewerCanUpdate
viewerCanDelete
}
query GetPendingReviewId($pullRequestId: ID!, $author: String!) {
node(id: $pullRequestId) {
... on PullRequest {
reviews(first: 1, author: $author, states: [PENDING]) {
nodes {
id
}
}
}
}
rateLimit {
limit
cost
remaining
resetAt
}
}
query PullRequestComments($owner: String!, $name: String!, $number: Int!, $first: Int = 100) {
repository(owner: $owner, name: $name) {
pullRequest(number: $number) {
reviewThreads(first: $first) {
nodes {
id
isResolved
viewerCanResolve
viewerCanUnresolve
path
diffSide
line
originalLine
isOutdated
comments(first: 100) {
nodes {
...ReviewComment
}
}
}
}
}
}
}
query PullRequest($owner: String!, $name: String!, $number: Int!) {
repository(owner: $owner, name: $name) {
pullRequest(number: $number) {
number
url
state
body
bodyHTML
title
author {
login
url
avatarUrl
... on User {
email
}
... on Organization {
email
}
}
createdAt
updatedAt
headRef {
...Ref
}
headRefName
headRefOid
headRepository {
owner {
login
}
url
}
baseRef {
...Ref
}
baseRefName
baseRefOid
baseRepository {
owner {
login
}
url
}
labels(first: 50) {
nodes {
name
}
}
merged
mergeable
id
databaseId
isDraft
milestone {
title
dueOn
createdAt
id
}
assignees(first: 10) {
nodes {
login
name
avatarUrl
url
email
}
}
suggestedReviewers {
isAuthor
isCommenter
reviewer {
login
avatarUrl
name
url
}
}
}
}
rateLimit {
limit
cost
remaining
resetAt
}
}
query PullRequestFiles($owner: String!, $name: String!, $number: Int!, $after: String) {
repository(owner: $owner, name: $name) {
pullRequest(number: $number) {
files(first: 100, after: $after) {
nodes {
path
viewerViewedState
}
pageInfo {
hasNextPage
endCursor
}
}
}
}
}
query Issue($owner: String!, $name: String!, $number: Int!) {
repository(owner: $owner, name: $name) {
pullRequest: issue(number: $number) {
number
url
state
body
bodyHTML
title
author {
login
url
avatarUrl
... on User {
email
}
... on Organization {
email
}
}
createdAt
updatedAt
labels(first: 50) {
nodes {
name
color
}
}
id
databaseId
}
}
}
query IssueWithComments($owner: String!, $name: String!, $number: Int!) {
repository(owner: $owner, name: $name) {
pullRequest: issue(number: $number) {
number
url
state
body
bodyHTML
title
author {
login
url
avatarUrl
... on User {
email
}
... on Organization {
email
}
}
createdAt
updatedAt
labels(first: 50) {
nodes {
name
color
}
}
id
databaseId
comments(first: 50) {
nodes {
author {
login
url
avatarUrl
... on User {
email
}
... on Organization {
email
}
}
body
databaseId
}
}
}
}
}
query GetUser($login: String!) {
user(login: $login) {
login
avatarUrl(size: 50)
bio
name
company
location
contributionsCollection {
commitContributionsByRepository(maxRepositories: 50) {
contributions(first: 1) {
nodes {
occurredAt
}
}
repository {
nameWithOwner
}
}
}
url
}
}
query PullRequestMergeability($owner: String!, $name: String!, $number: Int!) {
repository(owner: $owner, name: $name) {
pullRequest(number: $number) {
mergeable
}
}
rateLimit {
limit
cost
remaining
resetAt
}
}
query PullRequestState($owner: String!, $name: String!, $number: Int!) {
repository(owner: $owner, name: $name) {
pullRequest(number: $number) {
title
number
state
}
}
}
mutation AddComment($input: AddPullRequestReviewCommentInput!) {
addPullRequestReviewComment(input: $input) {
comment {
...ReviewComment
}
}
}
mutation AddReviewThread($input: AddPullRequestReviewThreadInput!) {
addPullRequestReviewThread(input: $input) {
thread {
...ReviewThread
}
}
}
mutation EditComment($input: UpdatePullRequestReviewCommentInput!) {
updatePullRequestReviewComment(input: $input) {
pullRequestReviewComment {
...ReviewComment
}
}
}
mutation ReadyForReview($input: MarkPullRequestReadyForReviewInput!) {
markPullRequestReadyForReview(input: $input) {
pullRequest {
isDraft
}
}
}
mutation StartReview($input: AddPullRequestReviewInput!) {
addPullRequestReview(input: $input) {
pullRequestReview {
id
}
}
}
mutation SubmitReview($id: ID!, $event: PullRequestReviewEvent!, $body: String) {
submitPullRequestReview(input: { event: $event, pullRequestReviewId: $id, body: $body }) {
pullRequestReview {
comments(first: 100) {
nodes {
...ReviewComment
}
}
...Review
}
}
}
mutation DeleteReview($input: DeletePullRequestReviewInput!) {
deletePullRequestReview(input: $input) {
pullRequestReview {
databaseId
comments(first: 100) {
nodes {
...ReviewComment
}
}
}
}
}
mutation AddReaction($input: AddReactionInput!) {
addReaction(input: $input) {
reaction {
content
}
subject {
...Reactable
}
}
}
mutation DeleteReaction($input: RemoveReactionInput!) {
removeReaction(input: $input) {
reaction {
content
}
subject {
...Reactable
}
}
}
mutation UpdatePullRequest($input: UpdatePullRequestInput!) {
updatePullRequest(input: $input) {
pullRequest {
body
bodyHTML
title
}
}
}
mutation AddIssueComment($input: AddCommentInput!) {
addComment(input: $input) {
commentEdge {
node {
...Comment
}
}
}
}
mutation EditIssueComment($input: UpdateIssueCommentInput!) {
updateIssueComment(input: $input) {
issueComment {
...Comment
}
}
}
query GetMentionableUsers($owner: String!, $name: String!, $first: Int!, $after: String) {
repository(owner: $owner, name: $name) {
mentionableUsers(first: $first, after: $after) {
nodes {
login
avatarUrl
name
url
email
}
pageInfo {
hasNextPage
endCursor
}
}
}
rateLimit {
limit
cost
remaining
resetAt
}
}
query GetAssignableUsers($owner: String!, $name: String!, $first: Int!, $after: String) {
repository(owner: $owner, name: $name) {
assignableUsers(first: $first, after: $after) {
nodes {
login
avatarUrl
name
url
email
}
pageInfo {
hasNextPage
endCursor
}
}
}
rateLimit {
limit
cost
remaining
resetAt
}
}
query IssuesWithoutMilestone($owner: String!, $name: String!, $assignee: String!) {
repository(owner: $owner, name: $name) {
issues(
first: 100
states: OPEN
filterBy: { assignee: $assignee, milestone: null }
orderBy: { direction: DESC, field: UPDATED_AT }
) {
edges {
node {
... on Issue {
number
url
state
body
bodyHTML
title
assignees(first: 10) {
nodes {
login
url
email
}
}
author {
login
url
avatarUrl(size: 50)
... on User {
email
}
... on Organization {
email
}
}
createdAt
updatedAt
labels(first: 50) {
nodes {
name
color
}
}
id
databaseId
milestone {
title
dueOn
}
}
}
}
pageInfo {
hasNextPage
endCursor
}
}
}
}
query MaxIssue($owner: String!, $name: String!) {
repository(owner: $owner, name: $name) {
issues(first: 1, orderBy: { direction: DESC, field: CREATED_AT }) {
edges {
node {
... on Issue {
number
}
}
}
}
}
}
query GetMilestones($owner: String!, $name: String!, $assignee: String!) {
repository(owner: $owner, name: $name) {
milestones(first: 12, orderBy: { direction: DESC, field: DUE_DATE }, states: OPEN) {
nodes {
dueOn
title
createdAt
id
issues(
first: 100
filterBy: { assignee: $assignee }
orderBy: { direction: DESC, field: UPDATED_AT }
states: OPEN
) {
edges {
node {
... on Issue {
number
url
state
body
bodyHTML
title
assignees(first: 10) {
nodes {
avatarUrl
email
login
url
}
}
author {
login
url
avatarUrl(size: 50)
... on User {
email
}
... on Organization {
email
}
}
createdAt
updatedAt
labels(first: 50) {
nodes {
name
color
}
}
id
databaseId
milestone {
title
dueOn
}
}
}
}
}
}
pageInfo {
hasNextPage
endCursor
}
}
}
}
query Issues($query: String!) {
search(first: 100, type: ISSUE, query: $query) {
issueCount
pageInfo {
hasNextPage
endCursor
}
edges {
node {
... on Issue {
number
url
state
body
bodyHTML
title
assignees(first: 10) {
nodes {
avatarUrl
email
login
url
}
}
author {
login
url
avatarUrl(size: 50)
... on User {
email
}
... on Organization {
email
}
}
createdAt
updatedAt
labels(first: 50) {
nodes {
name
color
}
}
id
databaseId
milestone {
title
dueOn
id
createdAt
}
repository {
name
owner {
login
}
url
}
}
}
}
}
}
query GetViewerPermission($owner: String!, $name: String!) {
repository(owner: $owner, name: $name) {
viewerPermission
}
}
query GetRepositoryForkDetails($owner: String!, $name: String!) {
repository(owner: $owner, name: $name) {
isFork
parent {
name
owner {
login
}
}
}
}
query GetChecks($owner: String!, $name: String!, $number: Int!) {
repository(owner: $owner, name: $name) {
pullRequest(number: $number) {
commits(last: 1) {
nodes {
commit {
statusCheckRollup {
state
contexts(first: 100) {
nodes {
... on StatusContext {
id
state
targetUrl
description
context
avatarUrl
}
... on CheckRun {
id
conclusion
title
detailsUrl
name
resourcePath
checkSuite {
app {
logoUrl
url
}
}
}
}
}
}
}
}
}
}
}
}
mutation ResolveReviewThread($input: ResolveReviewThreadInput!) {
resolveReviewThread(input: $input) {
thread {
...ReviewThread
}
}
}
mutation UnresolveReviewThread($input: UnresolveReviewThreadInput!) {
unresolveReviewThread(input: $input) {
thread {
...ReviewThread
}
}
}
mutation MarkFileAsViewed($input: MarkFileAsViewedInput!) {
markFileAsViewed(input: $input) {
pullRequest {
id
}
}
}
mutation UnmarkFileAsViewed($input: UnmarkFileAsViewedInput!) {
unmarkFileAsViewed(input: $input) {
pullRequest {
id
}
}
}`,name:"GraphQL request",locationOffset:{line:1,column:1}};var k={};function R(o){return o.filter(function(d){if(d.kind!=="FragmentDefinition")return!0;var f=d.name.value;return k[f]?!1:(k[f]=!0,!0)})}function B(o,d){if(o.kind==="FragmentSpread")d.add(o.name.value);else if(o.kind==="VariableDefinition"){var f=o.type;f.kind==="NamedType"&&d.add(f.name.value)}o.selectionSet&&o.selectionSet.selections.forEach(function(_){B(_,d)}),o.variableDefinitions&&o.variableDefinitions.forEach(function(_){B(_,d)}),o.definitions&&o.definitions.forEach(function(_){B(_,d)})}var A={};(function(){G.definitions.forEach(function(d){if(d.name){var f=new Set;B(d,f),A[d.name.value]=f}})})();function M(o,d){for(var f=0;f<o.definitions.length;f++){var _=o.definitions[f];if(_.name&&_.name.value==d)return _}}function l(o,d){var f={kind:o.kind,definitions:[M(o,d)]};o.hasOwnProperty("loc")&&(f.loc=o.loc);var _=A[d]||new Set,p=new Set,u=new Set;for(_.forEach(function(h){u.add(h)});u.size>0;){var E=u;u=new Set,E.forEach(function(h){if(!p.has(h)){p.add(h);var m=A[h]||new Set;m.forEach(function(y){u.add(y)})}})}return p.forEach(function(h){var m=M(o,h);m&&f.definitions.push(m)}),f}g.exports=G,g.exports.TimelineEvents=l(G,"TimelineEvents"),g.exports.IssueTimelineEvents=l(G,"IssueTimelineEvents"),g.exports.GetPendingReviewId=l(G,"GetPendingReviewId"),g.exports.PullRequestComments=l(G,"PullRequestComments"),g.exports.PullRequest=l(G,"PullRequest"),g.exports.PullRequestFiles=l(G,"PullRequestFiles"),g.exports.Issue=l(G,"Issue"),g.exports.IssueWithComments=l(G,"IssueWithComments"),g.exports.GetUser=l(G,"GetUser"),g.exports.PullRequestMergeability=l(G,"PullRequestMergeability"),g.exports.PullRequestState=l(G,"PullRequestState"),g.exports.AddComment=l(G,"AddComment"),g.exports.AddReviewThread=l(G,"AddReviewThread"),g.exports.EditComment=l(G,"EditComment"),g.exports.ReadyForReview=l(G,"ReadyForReview"),g.exports.StartReview=l(G,"StartReview"),g.exports.SubmitReview=l(G,"SubmitReview"),g.exports.DeleteReview=l(G,"DeleteReview"),g.exports.AddReaction=l(G,"AddReaction"),g.exports.DeleteReaction=l(G,"DeleteReaction"),g.exports.UpdatePullRequest=l(G,"UpdatePullRequest"),g.exports.AddIssueComment=l(G,"AddIssueComment"),g.exports.EditIssueComment=l(G,"EditIssueComment"),g.exports.GetMentionableUsers=l(G,"GetMentionableUsers"),g.exports.GetAssignableUsers=l(G,"GetAssignableUsers"),g.exports.IssuesWithoutMilestone=l(G,"IssuesWithoutMilestone"),g.exports.MaxIssue=l(G,"MaxIssue"),g.exports.GetMilestones=l(G,"GetMilestones"),g.exports.Issues=l(G,"Issues"),g.exports.GetViewerPermission=l(G,"GetViewerPermission"),g.exports.GetRepositoryForkDetails=l(G,"GetRepositoryForkDetails"),g.exports.GetChecks=l(G,"GetChecks"),g.exports.ResolveReviewThread=l(G,"ResolveReviewThread"),g.exports.UnresolveReviewThread=l(G,"UnresolveReviewThread"),g.exports.MarkFileAsViewed=l(G,"MarkFileAsViewed"),g.exports.UnmarkFileAsViewed=l(G,"UnmarkFileAsViewed")},50972:(g,G,k)=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0}),G.default=M;var R=A(k(7706)),B=A(k(18554));function A(l){return l&&l.__esModule?l:{default:l}}function M(l){var o=l.prototype.toJSON;typeof o=="function"||(0,R.default)(0),l.prototype.inspect=o,B.default&&(l.prototype[B.default]=o)}},8002:(g,G,k)=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0}),G.default=o;var R=B(k(18554));function B(h){return h&&h.__esModule?h:{default:h}}function A(h){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?A=function(y){return typeof y}:A=function(y){return y&&typeof Symbol=="function"&&y.constructor===Symbol&&y!==Symbol.prototype?"symbol":typeof y},A(h)}var M=10,l=2;function o(h){return d(h,[])}function d(h,m){switch(A(h)){case"string":return JSON.stringify(h);case"function":return h.name?"[function ".concat(h.name,"]"):"[function]";case"object":return h===null?"null":f(h,m);default:return String(h)}}function f(h,m){if(m.indexOf(h)!==-1)return"[Circular]";var y=[].concat(m,[h]),C=u(h);if(C!==void 0){var D=C.call(h);if(D!==h)return typeof D=="string"?D:d(D,y)}else if(Array.isArray(h))return p(h,y);return _(h,y)}function _(h,m){var y=Object.keys(h);if(y.length===0)return"{}";if(m.length>l)return"["+E(h)+"]";var C=y.map(function(D){var T=d(h[D],m);return D+": "+T});return"{ "+C.join(", ")+" }"}function p(h,m){if(h.length===0)return"[]";if(m.length>l)return"[Array]";for(var y=Math.min(M,h.length),C=h.length-y,D=[],T=0;T<y;++T)D.push(d(h[T],m));return C===1?D.push("... 1 more item"):C>1&&D.push("... ".concat(C," more items")),"["+D.join(", ")+"]"}function u(h){var m=h[String(R.default)];if(typeof m=="function")return m;if(typeof h.inspect=="function")return h.inspect}function E(h){var m=Object.prototype.toString.call(h).replace(/^\[object /,"").replace(/]$/,"");if(m==="Object"&&typeof h.constructor=="function"){var y=h.constructor.name;if(typeof y=="string"&&y!=="")return y}return m}},7706:(g,G)=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0}),G.default=k;function k(R,B){var A=Boolean(R);if(!A)throw new Error(B!=null?B:"Unexpected invariant triggered.")}},18554:(g,G)=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0}),G.default=void 0;var k=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):void 0,R=k;G.default=R},91807:(g,G,k)=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0}),G.isNode=l,G.Token=G.Location=void 0;var R=B(k(50972));function B(o){return o&&o.__esModule?o:{default:o}}var A=function(){function o(f,_,p){this.start=f.start,this.end=_.end,this.startToken=f,this.endToken=_,this.source=p}var d=o.prototype;return d.toJSON=function(){return{start:this.start,end:this.end}},o}();G.Location=A,(0,R.default)(A);var M=function(){function o(f,_,p,u,E,h,m){this.kind=f,this.start=_,this.end=p,this.line=u,this.column=E,this.value=m,this.prev=h,this.next=null}var d=o.prototype;return d.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},o}();G.Token=M,(0,R.default)(M);function l(o){return o!=null&&typeof o.kind=="string"}},70849:(g,G)=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0}),G.dedentBlockStringValue=k,G.getBlockStringIndentation=B,G.printBlockString=A;function k(M){var l=M.split(/\r\n|[\n\r]/g),o=B(M);if(o!==0)for(var d=1;d<l.length;d++)l[d]=l[d].slice(o);for(var f=0;f<l.length&&R(l[f]);)++f;for(var _=l.length;_>f&&R(l[_-1]);)--_;return l.slice(f,_).join(`
`)}function R(M){for(var l=0;l<M.length;++l)if(M[l]!==" "&&M[l]!==" ")return!1;return!0}function B(M){for(var l,o=!0,d=!0,f=0,_=null,p=0;p<M.length;++p)switch(M.charCodeAt(p)){case 13:M.charCodeAt(p+1)===10&&++p;case 10:o=!1,d=!0,f=0;break;case 9:case 32:++f;break;default:d&&!o&&(_===null||f<_)&&(_=f),d=!1}return(l=_)!==null&&l!==void 0?l:0}function A(M){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,d=M.indexOf(`
`)===-1,f=M[0]===" "||M[0]===" ",_=M[M.length-1]==='"',p=M[M.length-1]==="\\",u=!d||_||p||o,E="";return u&&!(d&&f)&&(E+=`
`+l),E+=l?M.replace(/\n/g,`
`+l):M,u&&(E+=`
`),'"""'+E.replace(/"""/g,'\\"""')+'"""'}},23033:(g,G,k)=>{"use strict";var R;R={value:!0},G.S=M;var B=k(80285),A=k(70849);function M(m){return(0,B.visit)(m,{leave:o})}var l=80,o={Name:function(y){return y.value},Variable:function(y){return"$"+y.name},Document:function(y){return f(y.definitions,`
`)+`
`},OperationDefinition:function(y){var C=y.operation,D=y.name,T=p("(",f(y.variableDefinitions,", "),")"),H=f(y.directives," "),W=y.selectionSet;return!D&&!H&&!T&&C==="query"?W:f([C,f([D,T]),H,W]," ")},VariableDefinition:function(y){var C=y.variable,D=y.type,T=y.defaultValue,H=y.directives;return C+": "+D+p(" = ",T)+p(" ",f(H," "))},SelectionSet:function(y){var C=y.selections;return _(C)},Field:function(y){var C=y.alias,D=y.name,T=y.arguments,H=y.directives,W=y.selectionSet,Y=p("",C,": ")+D,re=Y+p("(",f(T,", "),")");return re.length>l&&(re=Y+p(`(
`,u(f(T,`
`)),`
)`)),f([re,f(H," "),W]," ")},Argument:function(y){var C=y.name,D=y.value;return C+": "+D},FragmentSpread:function(y){var C=y.name,D=y.directives;return"..."+C+p(" ",f(D," "))},InlineFragment:function(y){var C=y.typeCondition,D=y.directives,T=y.selectionSet;return f(["...",p("on ",C),f(D," "),T]," ")},FragmentDefinition:function(y){var C=y.name,D=y.typeCondition,T=y.variableDefinitions,H=y.directives,W=y.selectionSet;return"fragment ".concat(C).concat(p("(",f(T,", "),")")," ")+"on ".concat(D," ").concat(p("",f(H," ")," "))+W},IntValue:function(y){var C=y.value;return C},FloatValue:function(y){var C=y.value;return C},StringValue:function(y,C){var D=y.value,T=y.block;return T?(0,A.printBlockString)(D,C==="description"?"":" "):JSON.stringify(D)},BooleanValue:function(y){var C=y.value;return C?"true":"false"},NullValue:function(){return"null"},EnumValue:function(y){var C=y.value;return C},ListValue:function(y){var C=y.values;return"["+f(C,", ")+"]"},ObjectValue:function(y){var C=y.fields;return"{"+f(C,", ")+"}"},ObjectField:function(y){var C=y.name,D=y.value;return C+": "+D},Directive:function(y){var C=y.name,D=y.arguments;return"@"+C+p("(",f(D,", "),")")},NamedType:function(y){var C=y.name;return C},ListType:function(y){var C=y.type;return"["+C+"]"},NonNullType:function(y){var C=y.type;return C+"!"},SchemaDefinition:d(function(m){var y=m.directives,C=m.operationTypes;return f(["schema",f(y," "),_(C)]," ")}),OperationTypeDefinition:function(y){var C=y.operation,D=y.type;return C+": "+D},ScalarTypeDefinition:d(function(m){var y=m.name,C=m.directives;return f(["scalar",y,f(C," ")]," ")}),ObjectTypeDefinition:d(function(m){var y=m.name,C=m.interfaces,D=m.directives,T=m.fields;return f(["type",y,p("implements ",f(C," & ")),f(D," "),_(T)]," ")}),FieldDefinition:d(function(m){var y=m.name,C=m.arguments,D=m.type,T=m.directives;return y+(h(C)?p(`(
`,u(f(C,`
`)),`
)`):p("(",f(C,", "),")"))+": "+D+p(" ",f(T," "))}),InputValueDefinition:d(function(m){var y=m.name,C=m.type,D=m.defaultValue,T=m.directives;return f([y+": "+C,p("= ",D),f(T," ")]," ")}),InterfaceTypeDefinition:d(function(m){var y=m.name,C=m.interfaces,D=m.directives,T=m.fields;return f(["interface",y,p("implements ",f(C," & ")),f(D," "),_(T)]," ")}),UnionTypeDefinition:d(function(m){var y=m.name,C=m.directives,D=m.types;return f(["union",y,f(C," "),D&&D.length!==0?"= "+f(D," | "):""]," ")}),EnumTypeDefinition:d(function(m){var y=m.name,C=m.directives,D=m.values;return f(["enum",y,f(C," "),_(D)]," ")}),EnumValueDefinition:d(function(m){var y=m.name,C=m.directives;return f([y,f(C," ")]," ")}),InputObjectTypeDefinition:d(function(m){var y=m.name,C=m.directives,D=m.fields;return f(["input",y,f(C," "),_(D)]," ")}),DirectiveDefinition:d(function(m){var y=m.name,C=m.arguments,D=m.repeatable,T=m.locations;return"directive @"+y+(h(C)?p(`(
`,u(f(C,`
`)),`
)`):p("(",f(C,", "),")"))+(D?" repeatable":"")+" on "+f(T," | ")}),SchemaExtension:function(y){var C=y.directives,D=y.operationTypes;return f(["extend schema",f(C," "),_(D)]," ")},ScalarTypeExtension:function(y){var C=y.name,D=y.directives;return f(["extend scalar",C,f(D," ")]," ")},ObjectTypeExtension:function(y){var C=y.name,D=y.interfaces,T=y.directives,H=y.fields;return f(["extend type",C,p("implements ",f(D," & ")),f(T," "),_(H)]," ")},InterfaceTypeExtension:function(y){var C=y.name,D=y.interfaces,T=y.directives,H=y.fields;return f(["extend interface",C,p("implements ",f(D," & ")),f(T," "),_(H)]," ")},UnionTypeExtension:function(y){var C=y.name,D=y.directives,T=y.types;return f(["extend union",C,f(D," "),T&&T.length!==0?"= "+f(T," | "):""]," ")},EnumTypeExtension:function(y){var C=y.name,D=y.directives,T=y.values;return f(["extend enum",C,f(D," "),_(T)]," ")},InputObjectTypeExtension:function(y){var C=y.name,D=y.directives,T=y.fields;return f(["extend input",C,f(D," "),_(T)]," ")}};function d(m){return function(y){return f([y.description,m(y)],`
`)}}function f(m){var y,C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return(y=m==null?void 0:m.filter(function(D){return D}).join(C))!==null&&y!==void 0?y:""}function _(m){return p(`{
`,u(f(m,`
`)),`
}`)}function p(m,y){var C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";return y!=null&&y!==""?m+y+C:""}function u(m){return p(" ",m.replace(/\n/g,`
`))}function E(m){return m.indexOf(`
`)!==-1}function h(m){return m!=null&&m.some(E)}},80285:(g,G,k)=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0}),G.visit=o,G.visitInParallel=d,G.getVisitFn=f,G.BREAK=G.QueryDocumentKeys=void 0;var R=A(k(8002)),B=k(91807);function A(_){return _&&_.__esModule?_:{default:_}}var M={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]};G.QueryDocumentKeys=M;var l=Object.freeze({});G.BREAK=l;function o(_,p){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:M,E=void 0,h=Array.isArray(_),m=[_],y=-1,C=[],D=void 0,T=void 0,H=void 0,W=[],Y=[],re=_;do{y++;var ie=y===m.length,oe=ie&&C.length!==0;if(ie){if(T=Y.length===0?void 0:W[W.length-1],D=H,H=Y.pop(),oe){if(h)D=D.slice();else{for(var ae={},de=0,te=Object.keys(D);de<te.length;de++){var O=te[de];ae[O]=D[O]}D=ae}for(var q=0,x=0;x<C.length;x++){var a=C[x][0],b=C[x][1];h&&(a-=q),h&&b===null?(D.splice(a,1),q++):D[a]=b}}y=E.index,m=E.keys,C=E.edits,h=E.inArray,E=E.prev}else{if(T=H?h?y:m[y]:void 0,D=H?H[T]:re,D==null)continue;H&&W.push(T)}var P=void 0;if(!Array.isArray(D)){if(!(0,B.isNode)(D))throw new Error("Invalid AST Node: ".concat((0,R.default)(D),"."));var F=f(p,D.kind,ie);if(F){if(P=F.call(p,D,T,H,W,Y),P===l)break;if(P===!1){if(!ie){W.pop();continue}}else if(P!==void 0&&(C.push([T,P]),!ie))if((0,B.isNode)(P))D=P;else{W.pop();continue}}}if(P===void 0&&oe&&C.push([T,D]),ie)W.pop();else{var L;E={inArray:h,index:y,keys:m,edits:C,prev:E},h=Array.isArray(D),m=h?D:(L=u[D.kind])!==null&&L!==void 0?L:[],y=-1,C=[],H&&Y.push(H),H=D}}while(E!==void 0);return C.length!==0&&(re=C[C.length-1][1]),re}function d(_){var p=new Array(_.length);return{enter:function(E){for(var h=0;h<_.length;h++)if(p[h]==null){var m=f(_[h],E.kind,!1);if(m){var y=m.apply(_[h],arguments);if(y===!1)p[h]=E;else if(y===l)p[h]=l;else if(y!==void 0)return y}}},leave:function(E){for(var h=0;h<_.length;h++)if(p[h]==null){var m=f(_[h],E.kind,!0);if(m){var y=m.apply(_[h],arguments);if(y===l)p[h]=l;else if(y!==void 0&&y!==!1)return y}}else p[h]===E&&(p[h]=null)}}}function f(_,p,u){var E=_[p];if(E){if(!u&&typeof E=="function")return E;var h=u?E.leave:E.enter;if(typeof h=="function")return h}else{var m=u?_.leave:_.enter;if(m){if(typeof m=="function")return m;var y=m[p];if(typeof y=="function")return y}}}},41405:(g,G,k)=>{"use strict";var R=typeof Symbol!="undefined"&&Symbol,B=k(55419);g.exports=function(){return typeof R!="function"||typeof Symbol!="function"||typeof R("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:B()}},55419:g=>{"use strict";g.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var k={},R=Symbol("test"),B=Object(R);if(typeof R=="string"||Object.prototype.toString.call(R)!=="[object Symbol]"||Object.prototype.toString.call(B)!=="[object Symbol]")return!1;var A=42;k[R]=A;for(R in k)return!1;if(typeof Object.keys=="function"&&Object.keys(k).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(k).length!==0)return!1;var M=Object.getOwnPropertySymbols(k);if(M.length!==1||M[0]!==R||!Object.prototype.propertyIsEnumerable.call(k,R))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var l=Object.getOwnPropertyDescriptor(k,R);if(l.value!==A||l.enumerable!==!0)return!1}return!0}},17642:(g,G,k)=>{"use strict";var R=k(58612);g.exports=R.call(Function.call,Object.prototype.hasOwnProperty)},3349:(g,G,k)=>{"use strict";var R=k(89509).Buffer,B=k(70326).Transform,A=k(35717);function M(o,d){if(!R.isBuffer(o)&&typeof o!="string")throw new TypeError(d+" must be a string or a buffer")}function l(o){B.call(this),this._block=R.allocUnsafe(o),this._blockSize=o,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}A(l,B),l.prototype._transform=function(o,d,f){var _=null;try{this.update(o,d)}catch(p){_=p}f(_)},l.prototype._flush=function(o){var d=null;try{this.push(this.digest())}catch(f){d=f}o(d)},l.prototype.update=function(o,d){if(M(o,"Data"),this._finalized)throw new Error("Digest already called");R.isBuffer(o)||(o=R.from(o,d));for(var f=this._block,_=0;this._blockOffset+o.length-_>=this._blockSize;){for(var p=this._blockOffset;p<this._blockSize;)f[p++]=o[_++];this._update(),this._blockOffset=0}for(;_<o.length;)f[this._blockOffset++]=o[_++];for(var u=0,E=o.length*8;E>0;++u)this._length[u]+=E,E=this._length[u]/4294967296|0,E>0&&(this._length[u]-=4294967296*E);return this},l.prototype._update=function(){throw new Error("_update is not implemented")},l.prototype.digest=function(o){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var d=this._digest();o!==void 0&&(d=d.toString(o)),this._block.fill(0),this._blockOffset=0;for(var f=0;f<4;++f)this._length[f]=0;return d},l.prototype._digest=function(){throw new Error("_digest is not implemented")},g.exports=l},9786:g=>{"use strict";function G(o,d){o.prototype=Object.create(d.prototype),o.prototype.constructor=o,o.__proto__=d}var k={};function R(o,d,f){f||(f=Error);function _(u,E,h){return typeof d=="string"?d:d(u,E,h)}var p=function(u){G(E,u);function E(h,m,y){return u.call(this,_(h,m,y))||this}return E}(f);p.prototype.name=f.name,p.prototype.code=o,k[o]=p}function B(o,d){if(Array.isArray(o)){var f=o.length;return o=o.map(function(_){return String(_)}),f>2?"one of ".concat(d," ").concat(o.slice(0,f-1).join(", "),", or ")+o[f-1]:f===2?"one of ".concat(d," ").concat(o[0]," or ").concat(o[1]):"of ".concat(d," ").concat(o[0])}else return"of ".concat(d," ").concat(String(o))}function A(o,d,f){return o.substr(!f||f<0?0:+f,d.length)===d}function M(o,d,f){return(f===void 0||f>o.length)&&(f=o.length),o.substring(f-d.length,f)===d}function l(o,d,f){return typeof f!="number"&&(f=0),f+d.length>o.length?!1:o.indexOf(d,f)!==-1}R("ERR_INVALID_OPT_VALUE",function(o,d){return'The value "'+d+'" is invalid for option "'+o+'"'},TypeError),R("ERR_INVALID_ARG_TYPE",function(o,d,f){var _;typeof d=="string"&&A(d,"not ")?(_="must not be",d=d.replace(/^not /,"")):_="must be";var p;if(M(o," argument"))p="The ".concat(o," ").concat(_," ").concat(B(d,"type"));else{var u=l(o,".")?"property":"argument";p='The "'.concat(o,'" ').concat(u," ").concat(_," ").concat(B(d,"type"))}return p+=". Received type ".concat(typeof f),p},TypeError),R("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),R("ERR_METHOD_NOT_IMPLEMENTED",function(o){return"The "+o+" method is not implemented"}),R("ERR_STREAM_PREMATURE_CLOSE","Premature close"),R("ERR_STREAM_DESTROYED",function(o){return"Cannot call "+o+" after a stream was destroyed"}),R("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),R("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),R("ERR_STREAM_WRITE_AFTER_END","write after end"),R("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),R("ERR_UNKNOWN_ENCODING",function(o){return"Unknown encoding: "+o},TypeError),R("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),g.exports.q=k},62910:(g,G,k)=>{"use strict";var R=k(34155),B=Object.keys||function(u){var E=[];for(var h in u)E.push(h);return E};g.exports=f;var A=k(45789),M=k(70469);k(35717)(f,A);for(var l=B(M.prototype),o=0;o<l.length;o++){var d=l[o];f.prototype[d]||(f.prototype[d]=M.prototype[d])}function f(u){if(!(this instanceof f))return new f(u);A.call(this,u),M.call(this,u),this.allowHalfOpen=!0,u&&(u.readable===!1&&(this.readable=!1),u.writable===!1&&(this.writable=!1),u.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",_)))}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(f.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function _(){this._writableState.ended||R.nextTick(p,this)}function p(u){u.end()}Object.defineProperty(f.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(E){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=E,this._writableState.destroyed=E)}})},58994:(g,G,k)=>{"use strict";g.exports=B;var R=k(70421);k(35717)(B,R);function B(A){if(!(this instanceof B))return new B(A);R.call(this,A)}B.prototype._transform=function(A,M,l){l(null,A)}},45789:(g,G,k)=>{"use strict";var R=k(34155);g.exports=O;var B;O.ReadableState=te;var A=k(17187).EventEmitter,M=function(V,le){return V.listeners(le).length},l=k(50677),o=k(48764).Buffer,d=k.g.Uint8Array||function(){};function f($){return o.from($)}function _($){return o.isBuffer($)||$ instanceof d}var p=k(31616),u;p&&p.debuglog?u=p.debuglog("stream"):u=function(){};var E=k(98354),h=k(35072),m=k(31222),y=m.getHighWaterMark,C=k(9786).q,D=C.ERR_INVALID_ARG_TYPE,T=C.ERR_STREAM_PUSH_AFTER_EOF,H=C.ERR_METHOD_NOT_IMPLEMENTED,W=C.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Y,re,ie;k(35717)(O,l);var oe=h.errorOrDestroy,ae=["error","close","destroy","pause","resume"];function de($,V,le){if(typeof $.prependListener=="function")return $.prependListener(V,le);!$._events||!$._events[V]?$.on(V,le):Array.isArray($._events[V])?$._events[V].unshift(le):$._events[V]=[le,$._events[V]]}function te($,V,le){B=B||k(62910),$=$||{},typeof le!="boolean"&&(le=V instanceof B),this.objectMode=!!$.objectMode,le&&(this.objectMode=this.objectMode||!!$.readableObjectMode),this.highWaterMark=y(this,$,"readableHighWaterMark",le),this.buffer=new E,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=$.emitClose!==!1,this.autoDestroy=!!$.autoDestroy,this.destroyed=!1,this.defaultEncoding=$.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,$.encoding&&(Y||(Y=k(33893).s),this.decoder=new Y($.encoding),this.encoding=$.encoding)}function O($){if(B=B||k(62910),!(this instanceof O))return new O($);var V=this instanceof B;this._readableState=new te($,this,V),this.readable=!0,$&&(typeof $.read=="function"&&(this._read=$.read),typeof $.destroy=="function"&&(this._destroy=$.destroy)),l.call(this)}Object.defineProperty(O.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(V){!this._readableState||(this._readableState.destroyed=V)}}),O.prototype.destroy=h.destroy,O.prototype._undestroy=h.undestroy,O.prototype._destroy=function($,V){V($)},O.prototype.push=function($,V){var le=this._readableState,Se;return le.objectMode?Se=!0:typeof $=="string"&&(V=V||le.defaultEncoding,V!==le.encoding&&($=o.from($,V),V=""),Se=!0),q(this,$,V,!1,Se)},O.prototype.unshift=function($){return q(this,$,null,!0,!1)};function q($,V,le,Se,De){u("readableAddChunk",V);var pe=$._readableState;if(V===null)pe.reading=!1,L($,pe);else{var He;if(De||(He=a(pe,V)),He)oe($,He);else if(pe.objectMode||V&&V.length>0)if(typeof V!="string"&&!pe.objectMode&&Object.getPrototypeOf(V)!==o.prototype&&(V=f(V)),Se)pe.endEmitted?oe($,new W):x($,pe,V,!0);else if(pe.ended)oe($,new T);else{if(pe.destroyed)return!1;pe.reading=!1,pe.decoder&&!le?(V=pe.decoder.write(V),pe.objectMode||V.length!==0?x($,pe,V,!1):z($,pe)):x($,pe,V,!1)}else Se||(pe.reading=!1,z($,pe))}return!pe.ended&&(pe.length<pe.highWaterMark||pe.length===0)}function x($,V,le,Se){V.flowing&&V.length===0&&!V.sync?(V.awaitDrain=0,$.emit("data",le)):(V.length+=V.objectMode?1:le.length,Se?V.buffer.unshift(le):V.buffer.push(le),V.needReadable&&I($)),z($,V)}function a($,V){var le;return!_(V)&&typeof V!="string"&&V!==void 0&&!$.objectMode&&(le=new D("chunk",["string","Buffer","Uint8Array"],V)),le}O.prototype.isPaused=function(){return this._readableState.flowing===!1},O.prototype.setEncoding=function($){Y||(Y=k(33893).s);var V=new Y($);this._readableState.decoder=V,this._readableState.encoding=this._readableState.decoder.encoding;for(var le=this._readableState.buffer.head,Se="";le!==null;)Se+=V.write(le.data),le=le.next;return this._readableState.buffer.clear(),Se!==""&&this._readableState.buffer.push(Se),this._readableState.length=Se.length,this};var b=1073741824;function P($){return $>=b?$=b:($--,$|=$>>>1,$|=$>>>2,$|=$>>>4,$|=$>>>8,$|=$>>>16,$++),$}function F($,V){return $<=0||V.length===0&&V.ended?0:V.objectMode?1:$!==$?V.flowing&&V.length?V.buffer.head.data.length:V.length:($>V.highWaterMark&&(V.highWaterMark=P($)),$<=V.length?$:V.ended?V.length:(V.needReadable=!0,0))}O.prototype.read=function($){u("read",$),$=parseInt($,10);var V=this._readableState,le=$;if($!==0&&(V.emittedReadable=!1),$===0&&V.needReadable&&((V.highWaterMark!==0?V.length>=V.highWaterMark:V.length>0)||V.ended))return u("read: emitReadable",V.length,V.ended),V.length===0&&V.ended?fe(this):I(this),null;if($=F($,V),$===0&&V.ended)return V.length===0&&fe(this),null;var Se=V.needReadable;u("need readable",Se),(V.length===0||V.length-$<V.highWaterMark)&&(Se=!0,u("length less than watermark",Se)),V.ended||V.reading?(Se=!1,u("reading or ended",Se)):Se&&(u("do read"),V.reading=!0,V.sync=!0,V.length===0&&(V.needReadable=!0),this._read(V.highWaterMark),V.sync=!1,V.reading||($=F(le,V)));var De;return $>0?De=Z($,V):De=null,De===null?(V.needReadable=V.length<=V.highWaterMark,$=0):(V.length-=$,V.awaitDrain=0),V.length===0&&(V.ended||(V.needReadable=!0),le!==$&&V.ended&&fe(this)),De!==null&&this.emit("data",De),De};function L($,V){if(u("onEofChunk"),!V.ended){if(V.decoder){var le=V.decoder.end();le&&le.length&&(V.buffer.push(le),V.length+=V.objectMode?1:le.length)}V.ended=!0,V.sync?I($):(V.needReadable=!1,V.emittedReadable||(V.emittedReadable=!0,K($)))}}function I($){var V=$._readableState;u("emitReadable",V.needReadable,V.emittedReadable),V.needReadable=!1,V.emittedReadable||(u("emitReadable",V.flowing),V.emittedReadable=!0,R.nextTick(K,$))}function K($){var V=$._readableState;u("emitReadable_",V.destroyed,V.length,V.ended),!V.destroyed&&(V.length||V.ended)&&($.emit("readable"),V.emittedReadable=!1),V.needReadable=!V.flowing&&!V.ended&&V.length<=V.highWaterMark,J($)}function z($,V){V.readingMore||(V.readingMore=!0,R.nextTick(w,$,V))}function w($,V){for(;!V.reading&&!V.ended&&(V.length<V.highWaterMark||V.flowing&&V.length===0);){var le=V.length;if(u("maybeReadMore read 0"),$.read(0),le===V.length)break}V.readingMore=!1}O.prototype._read=function($){oe(this,new H("_read()"))},O.prototype.pipe=function($,V){var le=this,Se=this._readableState;switch(Se.pipesCount){case 0:Se.pipes=$;break;case 1:Se.pipes=[Se.pipes,$];break;default:Se.pipes.push($);break}Se.pipesCount+=1,u("pipe count=%d opts=%j",Se.pipesCount,V);var De=(!V||V.end!==!1)&&$!==R.stdout&&$!==R.stderr,pe=De?Ve:ee;Se.endEmitted?R.nextTick(pe):le.once("end",pe),$.on("unpipe",He);function He(ue,me){u("onunpipe"),ue===le&&me&&me.hasUnpiped===!1&&(me.hasUnpiped=!0,Ke())}function Ve(){u("onend"),$.end()}var qe=j(le);$.on("drain",qe);var Ut=!1;function Ke(){u("cleanup"),$.removeListener("close",se),$.removeListener("finish",Q),$.removeListener("drain",qe),$.removeListener("error",Gt),$.removeListener("unpipe",He),le.removeListener("end",Ve),le.removeListener("end",ee),le.removeListener("data",ze),Ut=!0,Se.awaitDrain&&(!$._writableState||$._writableState.needDrain)&&qe()}le.on("data",ze);function ze(ue){u("ondata");var me=$.write(ue);u("dest.write",me),me===!1&&((Se.pipesCount===1&&Se.pipes===$||Se.pipesCount>1&&Ee(Se.pipes,$)!==-1)&&!Ut&&(u("false write response, pause",Se.awaitDrain),Se.awaitDrain++),le.pause())}function Gt(ue){u("onerror",ue),ee(),$.removeListener("error",Gt),M($,"error")===0&&oe($,ue)}de($,"error",Gt);function se(){$.removeListener("finish",Q),ee()}$.once("close",se);function Q(){u("onfinish"),$.removeListener("close",se),ee()}$.once("finish",Q);function ee(){u("unpipe"),le.unpipe($)}return $.emit("pipe",le),Se.flowing||(u("pipe resume"),le.resume()),$};function j($){return function(){var le=$._readableState;u("pipeOnDrain",le.awaitDrain),le.awaitDrain&&le.awaitDrain--,le.awaitDrain===0&&M($,"data")&&(le.flowing=!0,J($))}}O.prototype.unpipe=function($){var V=this._readableState,le={hasUnpiped:!1};if(V.pipesCount===0)return this;if(V.pipesCount===1)return $&&$!==V.pipes?this:($||($=V.pipes),V.pipes=null,V.pipesCount=0,V.flowing=!1,$&&$.emit("unpipe",this,le),this);if(!$){var Se=V.pipes,De=V.pipesCount;V.pipes=null,V.pipesCount=0,V.flowing=!1;for(var pe=0;pe<De;pe++)Se[pe].emit("unpipe",this,{hasUnpiped:!1});return this}var He=Ee(V.pipes,$);return He===-1?this:(V.pipes.splice(He,1),V.pipesCount-=1,V.pipesCount===1&&(V.pipes=V.pipes[0]),$.emit("unpipe",this,le),this)},O.prototype.on=function($,V){var le=l.prototype.on.call(this,$,V),Se=this._readableState;return $==="data"?(Se.readableListening=this.listenerCount("readable")>0,Se.flowing!==!1&&this.resume()):$==="readable"&&!Se.endEmitted&&!Se.readableListening&&(Se.readableListening=Se.needReadable=!0,Se.flowing=!1,Se.emittedReadable=!1,u("on readable",Se.length,Se.reading),Se.length?I(this):Se.reading||R.nextTick(_e,this)),le},O.prototype.addListener=O.prototype.on,O.prototype.removeListener=function($,V){var le=l.prototype.removeListener.call(this,$,V);return $==="readable"&&R.nextTick(he,this),le},O.prototype.removeAllListeners=function($){var V=l.prototype.removeAllListeners.apply(this,arguments);return($==="readable"||$===void 0)&&R.nextTick(he,this),V};function he($){var V=$._readableState;V.readableListening=$.listenerCount("readable")>0,V.resumeScheduled&&!V.paused?V.flowing=!0:$.listenerCount("data")>0&&$.resume()}function _e($){u("readable nexttick read 0"),$.read(0)}O.prototype.resume=function(){var $=this._readableState;return $.flowing||(u("resume"),$.flowing=!$.readableListening,Re(this,$)),$.paused=!1,this};function Re($,V){V.resumeScheduled||(V.resumeScheduled=!0,R.nextTick(Ie,$,V))}function Ie($,V){u("resume",V.reading),V.reading||$.read(0),V.resumeScheduled=!1,$.emit("resume"),J($),V.flowing&&!V.reading&&$.read(0)}O.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function J($){var V=$._readableState;for(u("flow",V.flowing);V.flowing&&$.read()!==null;);}O.prototype.wrap=function($){var V=this,le=this._readableState,Se=!1;$.on("end",function(){if(u("wrapped end"),le.decoder&&!le.ended){var He=le.decoder.end();He&&He.length&&V.push(He)}V.push(null)}),$.on("data",function(He){if(u("wrapped data"),le.decoder&&(He=le.decoder.write(He)),!(le.objectMode&&He==null)&&!(!le.objectMode&&(!He||!He.length))){var Ve=V.push(He);Ve||(Se=!0,$.pause())}});for(var De in $)this[De]===void 0&&typeof $[De]=="function"&&(this[De]=function(Ve){return function(){return $[Ve].apply($,arguments)}}(De));for(var pe=0;pe<ae.length;pe++)$.on(ae[pe],this.emit.bind(this,ae[pe]));return this._read=function(He){u("wrapped _read",He),Se&&(Se=!1,$.resume())},this},typeof Symbol=="function"&&(O.prototype[Symbol.asyncIterator]=function(){return re===void 0&&(re=k(30527)),re(this)}),Object.defineProperty(O.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(O.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(O.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(V){this._readableState&&(this._readableState.flowing=V)}}),O._fromList=Z,Object.defineProperty(O.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function Z($,V){if(V.length===0)return null;var le;return V.objectMode?le=V.buffer.shift():!$||$>=V.length?(V.decoder?le=V.buffer.join(""):V.buffer.length===1?le=V.buffer.first():le=V.buffer.concat(V.length),V.buffer.clear()):le=V.buffer.consume($,V.decoder),le}function fe($){var V=$._readableState;u("endReadable",V.endEmitted),V.endEmitted||(V.ended=!0,R.nextTick(we,V,$))}function we($,V){if(u("endReadableNT",$.endEmitted,$.length),!$.endEmitted&&$.length===0&&($.endEmitted=!0,V.readable=!1,V.emit("end"),$.autoDestroy)){var le=V._writableState;(!le||le.autoDestroy&&le.finished)&&V.destroy()}}typeof Symbol=="function"&&(O.from=function($,V){return ie===void 0&&(ie=k(5327)),ie(O,$,V)});function Ee($,V){for(var le=0,Se=$.length;le<Se;le++)if($[le]===V)return le;return-1}},70421:(g,G,k)=>{"use strict";g.exports=f;var R=k(9786).q,B=R.ERR_METHOD_NOT_IMPLEMENTED,A=R.ERR_MULTIPLE_CALLBACK,M=R.ERR_TRANSFORM_ALREADY_TRANSFORMING,l=R.ERR_TRANSFORM_WITH_LENGTH_0,o=k(62910);k(35717)(f,o);function d(u,E){var h=this._transformState;h.transforming=!1;var m=h.writecb;if(m===null)return this.emit("error",new A);h.writechunk=null,h.writecb=null,E!=null&&this.push(E),m(u);var y=this._readableState;y.reading=!1,(y.needReadable||y.length<y.highWaterMark)&&this._read(y.highWaterMark)}function f(u){if(!(this instanceof f))return new f(u);o.call(this,u),this._transformState={afterTransform:d.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,u&&(typeof u.transform=="function"&&(this._transform=u.transform),typeof u.flush=="function"&&(this._flush=u.flush)),this.on("prefinish",_)}function _(){var u=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(E,h){p(u,E,h)}):p(this,null,null)}f.prototype.push=function(u,E){return this._transformState.needTransform=!1,o.prototype.push.call(this,u,E)},f.prototype._transform=function(u,E,h){h(new B("_transform()"))},f.prototype._write=function(u,E,h){var m=this._transformState;if(m.writecb=h,m.writechunk=u,m.writeencoding=E,!m.transforming){var y=this._readableState;(m.needTransform||y.needReadable||y.length<y.highWaterMark)&&this._read(y.highWaterMark)}},f.prototype._read=function(u){var E=this._transformState;E.writechunk!==null&&!E.transforming?(E.transforming=!0,this._transform(E.writechunk,E.writeencoding,E.afterTransform)):E.needTransform=!0},f.prototype._destroy=function(u,E){o.prototype._destroy.call(this,u,function(h){E(h)})};function p(u,E,h){if(E)return u.emit("error",E);if(h!=null&&u.push(h),u._writableState.length)throw new l;if(u._transformState.transforming)throw new M;return u.push(null)}},70469:(g,G,k)=>{"use strict";var R=k(34155);g.exports=te;function B(J,Z,fe){this.chunk=J,this.encoding=Z,this.callback=fe,this.next=null}function A(J){var Z=this;this.next=null,this.entry=null,this.finish=function(){Ie(Z,J)}}var M;te.WritableState=ae;var l={deprecate:k(94927)},o=k(50677),d=k(48764).Buffer,f=k.g.Uint8Array||function(){};function _(J){return d.from(J)}function p(J){return d.isBuffer(J)||J instanceof f}var u=k(35072),E=k(31222),h=E.getHighWaterMark,m=k(9786).q,y=m.ERR_INVALID_ARG_TYPE,C=m.ERR_METHOD_NOT_IMPLEMENTED,D=m.ERR_MULTIPLE_CALLBACK,T=m.ERR_STREAM_CANNOT_PIPE,H=m.ERR_STREAM_DESTROYED,W=m.ERR_STREAM_NULL_VALUES,Y=m.ERR_STREAM_WRITE_AFTER_END,re=m.ERR_UNKNOWN_ENCODING,ie=u.errorOrDestroy;k(35717)(te,o);function oe(){}function ae(J,Z,fe){M=M||k(62910),J=J||{},typeof fe!="boolean"&&(fe=Z instanceof M),this.objectMode=!!J.objectMode,fe&&(this.objectMode=this.objectMode||!!J.writableObjectMode),this.highWaterMark=h(this,J,"writableHighWaterMark",fe),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var we=J.decodeStrings===!1;this.decodeStrings=!we,this.defaultEncoding=J.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Ee){L(Z,Ee)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=J.emitClose!==!1,this.autoDestroy=!!J.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new A(this)}ae.prototype.getBuffer=function(){for(var Z=this.bufferedRequest,fe=[];Z;)fe.push(Z),Z=Z.next;return fe},function(){try{Object.defineProperty(ae.prototype,"buffer",{get:l.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(J){}}();var de;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(de=Function.prototype[Symbol.hasInstance],Object.defineProperty(te,Symbol.hasInstance,{value:function(Z){return de.call(this,Z)?!0:this!==te?!1:Z&&Z._writableState instanceof ae}})):de=function(Z){return Z instanceof this};function te(J){M=M||k(62910);var Z=this instanceof M;if(!Z&&!de.call(te,this))return new te(J);this._writableState=new ae(J,this,Z),this.writable=!0,J&&(typeof J.write=="function"&&(this._write=J.write),typeof J.writev=="function"&&(this._writev=J.writev),typeof J.destroy=="function"&&(this._destroy=J.destroy),typeof J.final=="function"&&(this._final=J.final)),o.call(this)}te.prototype.pipe=function(){ie(this,new T)};function O(J,Z){var fe=new Y;ie(J,fe),R.nextTick(Z,fe)}function q(J,Z,fe,we){var Ee;return fe===null?Ee=new W:typeof fe!="string"&&!Z.objectMode&&(Ee=new y("chunk",["string","Buffer"],fe)),Ee?(ie(J,Ee),R.nextTick(we,Ee),!1):!0}te.prototype.write=function(J,Z,fe){var we=this._writableState,Ee=!1,$=!we.objectMode&&p(J);return $&&!d.isBuffer(J)&&(J=_(J)),typeof Z=="function"&&(fe=Z,Z=null),$?Z="buffer":Z||(Z=we.defaultEncoding),typeof fe!="function"&&(fe=oe),we.ending?O(this,fe):($||q(this,we,J,fe))&&(we.pendingcb++,Ee=a(this,we,$,J,Z,fe)),Ee},te.prototype.cork=function(){this._writableState.corked++},te.prototype.uncork=function(){var J=this._writableState;J.corked&&(J.corked--,!J.writing&&!J.corked&&!J.bufferProcessing&&J.bufferedRequest&&z(this,J))},te.prototype.setDefaultEncoding=function(Z){if(typeof Z=="string"&&(Z=Z.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Z+"").toLowerCase())>-1))throw new re(Z);return this._writableState.defaultEncoding=Z,this},Object.defineProperty(te.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function x(J,Z,fe){return!J.objectMode&&J.decodeStrings!==!1&&typeof Z=="string"&&(Z=d.from(Z,fe)),Z}Object.defineProperty(te.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function a(J,Z,fe,we,Ee,$){if(!fe){var V=x(Z,we,Ee);we!==V&&(fe=!0,Ee="buffer",we=V)}var le=Z.objectMode?1:we.length;Z.length+=le;var Se=Z.length<Z.highWaterMark;if(Se||(Z.needDrain=!0),Z.writing||Z.corked){var De=Z.lastBufferedRequest;Z.lastBufferedRequest={chunk:we,encoding:Ee,isBuf:fe,callback:$,next:null},De?De.next=Z.lastBufferedRequest:Z.bufferedRequest=Z.lastBufferedRequest,Z.bufferedRequestCount+=1}else b(J,Z,!1,le,we,Ee,$);return Se}function b(J,Z,fe,we,Ee,$,V){Z.writelen=we,Z.writecb=V,Z.writing=!0,Z.sync=!0,Z.destroyed?Z.onwrite(new H("write")):fe?J._writev(Ee,Z.onwrite):J._write(Ee,$,Z.onwrite),Z.sync=!1}function P(J,Z,fe,we,Ee){--Z.pendingcb,fe?(R.nextTick(Ee,we),R.nextTick(_e,J,Z),J._writableState.errorEmitted=!0,ie(J,we)):(Ee(we),J._writableState.errorEmitted=!0,ie(J,we),_e(J,Z))}function F(J){J.writing=!1,J.writecb=null,J.length-=J.writelen,J.writelen=0}function L(J,Z){var fe=J._writableState,we=fe.sync,Ee=fe.writecb;if(typeof Ee!="function")throw new D;if(F(fe),Z)P(J,fe,we,Z,Ee);else{var $=w(fe)||J.destroyed;!$&&!fe.corked&&!fe.bufferProcessing&&fe.bufferedRequest&&z(J,fe),we?R.nextTick(I,J,fe,$,Ee):I(J,fe,$,Ee)}}function I(J,Z,fe,we){fe||K(J,Z),Z.pendingcb--,we(),_e(J,Z)}function K(J,Z){Z.length===0&&Z.needDrain&&(Z.needDrain=!1,J.emit("drain"))}function z(J,Z){Z.bufferProcessing=!0;var fe=Z.bufferedRequest;if(J._writev&&fe&&fe.next){var we=Z.bufferedRequestCount,Ee=new Array(we),$=Z.corkedRequestsFree;$.entry=fe;for(var V=0,le=!0;fe;)Ee[V]=fe,fe.isBuf||(le=!1),fe=fe.next,V+=1;Ee.allBuffers=le,b(J,Z,!0,Z.length,Ee,"",$.finish),Z.pendingcb++,Z.lastBufferedRequest=null,$.next?(Z.corkedRequestsFree=$.next,$.next=null):Z.corkedRequestsFree=new A(Z),Z.bufferedRequestCount=0}else{for(;fe;){var Se=fe.chunk,De=fe.encoding,pe=fe.callback,He=Z.objectMode?1:Se.length;if(b(J,Z,!1,He,Se,De,pe),fe=fe.next,Z.bufferedRequestCount--,Z.writing)break}fe===null&&(Z.lastBufferedRequest=null)}Z.bufferedRequest=fe,Z.bufferProcessing=!1}te.prototype._write=function(J,Z,fe){fe(new C("_write()"))},te.prototype._writev=null,te.prototype.end=function(J,Z,fe){var we=this._writableState;return typeof J=="function"?(fe=J,J=null,Z=null):typeof Z=="function"&&(fe=Z,Z=null),J!=null&&this.write(J,Z),we.corked&&(we.corked=1,this.uncork()),we.ending||Re(this,we,fe),this},Object.defineProperty(te.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function w(J){return J.ending&&J.length===0&&J.bufferedRequest===null&&!J.finished&&!J.writing}function j(J,Z){J._final(function(fe){Z.pendingcb--,fe&&ie(J,fe),Z.prefinished=!0,J.emit("prefinish"),_e(J,Z)})}function he(J,Z){!Z.prefinished&&!Z.finalCalled&&(typeof J._final=="function"&&!Z.destroyed?(Z.pendingcb++,Z.finalCalled=!0,R.nextTick(j,J,Z)):(Z.prefinished=!0,J.emit("prefinish")))}function _e(J,Z){var fe=w(Z);if(fe&&(he(J,Z),Z.pendingcb===0&&(Z.finished=!0,J.emit("finish"),Z.autoDestroy))){var we=J._readableState;(!we||we.autoDestroy&&we.endEmitted)&&J.destroy()}return fe}function Re(J,Z,fe){Z.ending=!0,_e(J,Z),fe&&(Z.finished?R.nextTick(fe):J.once("finish",fe)),Z.ended=!0,J.writable=!1}function Ie(J,Z,fe){var we=J.entry;for(J.entry=null;we;){var Ee=we.callback;Z.pendingcb--,Ee(fe),we=we.next}Z.corkedRequestsFree.next=J}Object.defineProperty(te.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(Z){!this._writableState||(this._writableState.destroyed=Z)}}),te.prototype.destroy=u.destroy,te.prototype._undestroy=u.undestroy,te.prototype._destroy=function(J,Z){Z(J)}},30527:(g,G,k)=>{"use strict";var R=k(34155),B;function A(H,W,Y){return W in H?Object.defineProperty(H,W,{value:Y,enumerable:!0,configurable:!0,writable:!0}):H[W]=Y,H}var M=k(28640),l=Symbol("lastResolve"),o=Symbol("lastReject"),d=Symbol("error"),f=Symbol("ended"),_=Symbol("lastPromise"),p=Symbol("handlePromise"),u=Symbol("stream");function E(H,W){return{value:H,done:W}}function h(H){var W=H[l];if(W!==null){var Y=H[u].read();Y!==null&&(H[_]=null,H[l]=null,H[o]=null,W(E(Y,!1)))}}function m(H){R.nextTick(h,H)}function y(H,W){return function(Y,re){H.then(function(){if(W[f]){Y(E(void 0,!0));return}W[p](Y,re)},re)}}var C=Object.getPrototypeOf(function(){}),D=Object.setPrototypeOf((B={get stream(){return this[u]},next:function(){var W=this,Y=this[d];if(Y!==null)return Promise.reject(Y);if(this[f])return Promise.resolve(E(void 0,!0));if(this[u].destroyed)return new Promise(function(ae,de){R.nextTick(function(){W[d]?de(W[d]):ae(E(void 0,!0))})});var re=this[_],ie;if(re)ie=new Promise(y(re,this));else{var oe=this[u].read();if(oe!==null)return Promise.resolve(E(oe,!1));ie=new Promise(this[p])}return this[_]=ie,ie}},A(B,Symbol.asyncIterator,function(){return this}),A(B,"return",function(){var W=this;return new Promise(function(Y,re){W[u].destroy(null,function(ie){if(ie){re(ie);return}Y(E(void 0,!0))})})}),B),C),T=function(W){var Y,re=Object.create(D,(Y={},A(Y,u,{value:W,writable:!0}),A(Y,l,{value:null,writable:!0}),A(Y,o,{value:null,writable:!0}),A(Y,d,{value:null,writable:!0}),A(Y,f,{value:W._readableState.endEmitted,writable:!0}),A(Y,p,{value:function(oe,ae){var de=re[u].read();de?(re[_]=null,re[l]=null,re[o]=null,oe(E(de,!1))):(re[l]=oe,re[o]=ae)},writable:!0}),Y));return re[_]=null,M(W,function(ie){if(ie&&ie.code!=="ERR_STREAM_PREMATURE_CLOSE"){var oe=re[o];oe!==null&&(re[_]=null,re[l]=null,re[o]=null,oe(ie)),re[d]=ie;return}var ae=re[l];ae!==null&&(re[_]=null,re[l]=null,re[o]=null,ae(E(void 0,!0))),re[f]=!0}),W.on("readable",m.bind(null,re)),re};g.exports=T},98354:(g,G,k)=>{"use strict";function R(h,m){var y=Object.keys(h);if(Object.getOwnPropertySymbols){var C=Object.getOwnPropertySymbols(h);m&&(C=C.filter(function(D){return Object.getOwnPropertyDescriptor(h,D).enumerable})),y.push.apply(y,C)}return y}function B(h){for(var m=1;m<arguments.length;m++){var y=arguments[m]!=null?arguments[m]:{};m%2?R(Object(y),!0).forEach(function(C){A(h,C,y[C])}):Object.getOwnPropertyDescriptors?Object.defineProperties(h,Object.getOwnPropertyDescriptors(y)):R(Object(y)).forEach(function(C){Object.defineProperty(h,C,Object.getOwnPropertyDescriptor(y,C))})}return h}function A(h,m,y){return m in h?Object.defineProperty(h,m,{value:y,enumerable:!0,configurable:!0,writable:!0}):h[m]=y,h}function M(h,m){if(!(h instanceof m))throw new TypeError("Cannot call a class as a function")}function l(h,m){for(var y=0;y<m.length;y++){var C=m[y];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(h,C.key,C)}}function o(h,m,y){return m&&l(h.prototype,m),y&&l(h,y),h}var d=k(48764),f=d.Buffer,_=k(69386),p=_.inspect,u=p&&p.custom||"inspect";function E(h,m,y){f.prototype.copy.call(h,m,y)}g.exports=function(){function h(){M(this,h),this.head=null,this.tail=null,this.length=0}return o(h,[{key:"push",value:function(y){var C={data:y,next:null};this.length>0?this.tail.next=C:this.head=C,this.tail=C,++this.length}},{key:"unshift",value:function(y){var C={data:y,next:this.head};this.length===0&&(this.tail=C),this.head=C,++this.length}},{key:"shift",value:function(){if(this.length!==0){var y=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,y}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(y){if(this.length===0)return"";for(var C=this.head,D=""+C.data;C=C.next;)D+=y+C.data;return D}},{key:"concat",value:function(y){if(this.length===0)return f.alloc(0);for(var C=f.allocUnsafe(y>>>0),D=this.head,T=0;D;)E(D.data,C,T),T+=D.data.length,D=D.next;return C}},{key:"consume",value:function(y,C){var D;return y<this.head.data.length?(D=this.head.data.slice(0,y),this.head.data=this.head.data.slice(y)):y===this.head.data.length?D=this.shift():D=C?this._getString(y):this._getBuffer(y),D}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(y){var C=this.head,D=1,T=C.data;for(y-=T.length;C=C.next;){var H=C.data,W=y>H.length?H.length:y;if(W===H.length?T+=H:T+=H.slice(0,y),y-=W,y===0){W===H.length?(++D,C.next?this.head=C.next:this.head=this.tail=null):(this.head=C,C.data=H.slice(W));break}++D}return this.length-=D,T}},{key:"_getBuffer",value:function(y){var C=f.allocUnsafe(y),D=this.head,T=1;for(D.data.copy(C),y-=D.data.length;D=D.next;){var H=D.data,W=y>H.length?H.length:y;if(H.copy(C,C.length-y,0,W),y-=W,y===0){W===H.length?(++T,D.next?this.head=D.next:this.head=this.tail=null):(this.head=D,D.data=H.slice(W));break}++T}return this.length-=T,C}},{key:u,value:function(y,C){return p(this,B({},C,{depth:0,customInspect:!1}))}}]),h}()},35072:(g,G,k)=>{"use strict";var R=k(34155);function B(f,_){var p=this,u=this._readableState&&this._readableState.destroyed,E=this._writableState&&this._writableState.destroyed;return u||E?(_?_(f):f&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,R.nextTick(o,this,f)):R.nextTick(o,this,f)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(f||null,function(h){!_&&h?p._writableState?p._writableState.errorEmitted?R.nextTick(M,p):(p._writableState.errorEmitted=!0,R.nextTick(A,p,h)):R.nextTick(A,p,h):_?(R.nextTick(M,p),_(h)):R.nextTick(M,p)}),this)}function A(f,_){o(f,_),M(f)}function M(f){f._writableState&&!f._writableState.emitClose||f._readableState&&!f._readableState.emitClose||f.emit("close")}function l(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function o(f,_){f.emit("error",_)}function d(f,_){var p=f._readableState,u=f._writableState;p&&p.autoDestroy||u&&u.autoDestroy?f.destroy(_):f.emit("error",_)}g.exports={destroy:B,undestroy:l,errorOrDestroy:d}},28640:(g,G,k)=>{"use strict";var R=k(9786).q.ERR_STREAM_PREMATURE_CLOSE;function B(o){var d=!1;return function(){if(!d){d=!0;for(var f=arguments.length,_=new Array(f),p=0;p<f;p++)_[p]=arguments[p];o.apply(this,_)}}}function A(){}function M(o){return o.setHeader&&typeof o.abort=="function"}function l(o,d,f){if(typeof d=="function")return l(o,null,d);d||(d={}),f=B(f||A);var _=d.readable||d.readable!==!1&&o.readable,p=d.writable||d.writable!==!1&&o.writable,u=function(){o.writable||h()},E=o._writableState&&o._writableState.finished,h=function(){p=!1,E=!0,_||f.call(o)},m=o._readableState&&o._readableState.endEmitted,y=function(){_=!1,m=!0,p||f.call(o)},C=function(W){f.call(o,W)},D=function(){var W;if(_&&!m)return(!o._readableState||!o._readableState.ended)&&(W=new R),f.call(o,W);if(p&&!E)return(!o._writableState||!o._writableState.ended)&&(W=new R),f.call(o,W)},T=function(){o.req.on("finish",h)};return M(o)?(o.on("complete",h),o.on("abort",D),o.req?T():o.on("request",T)):p&&!o._writableState&&(o.on("end",u),o.on("close",u)),o.on("end",y),o.on("finish",h),d.error!==!1&&o.on("error",C),o.on("close",D),function(){o.removeListener("complete",h),o.removeListener("abort",D),o.removeListener("request",T),o.req&&o.req.removeListener("finish",h),o.removeListener("end",u),o.removeListener("close",u),o.removeListener("finish",h),o.removeListener("end",y),o.removeListener("error",C),o.removeListener("close",D)}}g.exports=l},5327:g=>{g.exports=function(){throw new Error("Readable.from is not available in the browser")}},64218:(g,G,k)=>{"use strict";var R;function B(h){var m=!1;return function(){m||(m=!0,h.apply(void 0,arguments))}}var A=k(9786).q,M=A.ERR_MISSING_ARGS,l=A.ERR_STREAM_DESTROYED;function o(h){if(h)throw h}function d(h){return h.setHeader&&typeof h.abort=="function"}function f(h,m,y,C){C=B(C);var D=!1;h.on("close",function(){D=!0}),R===void 0&&(R=k(28640)),R(h,{readable:m,writable:y},function(H){if(H)return C(H);D=!0,C()});var T=!1;return function(H){if(!D&&!T){if(T=!0,d(h))return h.abort();if(typeof h.destroy=="function")return h.destroy();C(H||new l("pipe"))}}}function _(h){h()}function p(h,m){return h.pipe(m)}function u(h){return!h.length||typeof h[h.length-1]!="function"?o:h.pop()}function E(){for(var h=arguments.length,m=new Array(h),y=0;y<h;y++)m[y]=arguments[y];var C=u(m);if(Array.isArray(m[0])&&(m=m[0]),m.length<2)throw new M("streams");var D,T=m.map(function(H,W){var Y=W<m.length-1,re=W>0;return f(H,Y,re,function(ie){D||(D=ie),ie&&T.forEach(_),!Y&&(T.forEach(_),C(D))})});return m.reduce(p)}g.exports=E},31222:(g,G,k)=>{"use strict";var R=k(9786).q.ERR_INVALID_OPT_VALUE;function B(M,l,o){return M.highWaterMark!=null?M.highWaterMark:l?M[o]:null}function A(M,l,o,d){var f=B(l,d,o);if(f!=null){if(!(isFinite(f)&&Math.floor(f)===f)||f<0){var _=d?o:"highWaterMark";throw new R(_,f)}return Math.floor(f)}return M.objectMode?16:16*1024}g.exports={getHighWaterMark:A}},50677:(g,G,k)=>{g.exports=k(17187).EventEmitter},70326:(g,G,k)=>{G=g.exports=k(45789),G.Stream=G,G.Readable=G,G.Writable=k(70469),G.Duplex=k(62910),G.Transform=k(70421),G.PassThrough=k(58994),G.finished=k(28640),G.pipeline=k(64218)},33893:(g,G,k)=>{"use strict";var R=k(89509).Buffer,B=R.isEncoding||function(T){switch(T=""+T,T&&T.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function A(T){if(!T)return"utf8";for(var H;;)switch(T){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return T;default:if(H)return;T=(""+T).toLowerCase(),H=!0}}function M(T){var H=A(T);if(typeof H!="string"&&(R.isEncoding===B||!B(T)))throw new Error("Unknown encoding: "+T);return H||T}G.s=l;function l(T){this.encoding=M(T);var H;switch(this.encoding){case"utf16le":this.text=E,this.end=h,H=4;break;case"utf8":this.fillLast=_,H=4;break;case"base64":this.text=m,this.end=y,H=3;break;default:this.write=C,this.end=D;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=R.allocUnsafe(H)}l.prototype.write=function(T){if(T.length===0)return"";var H,W;if(this.lastNeed){if(H=this.fillLast(T),H===void 0)return"";W=this.lastNeed,this.lastNeed=0}else W=0;return W<T.length?H?H+this.text(T,W):this.text(T,W):H||""},l.prototype.end=u,l.prototype.text=p,l.prototype.fillLast=function(T){if(this.lastNeed<=T.length)return T.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);T.copy(this.lastChar,this.lastTotal-this.lastNeed,0,T.length),this.lastNeed-=T.length};function o(T){return T<=127?0:T>>5==6?2:T>>4==14?3:T>>3==30?4:T>>6==2?-1:-2}function d(T,H,W){var Y=H.length-1;if(Y<W)return 0;var re=o(H[Y]);return re>=0?(re>0&&(T.lastNeed=re-1),re):--Y<W||re===-2?0:(re=o(H[Y]),re>=0?(re>0&&(T.lastNeed=re-2),re):--Y<W||re===-2?0:(re=o(H[Y]),re>=0?(re>0&&(re===2?re=0:T.lastNeed=re-3),re):0))}function f(T,H,W){if((H[0]&192)!=128)return T.lastNeed=0,"\uFFFD";if(T.lastNeed>1&&H.length>1){if((H[1]&192)!=128)return T.lastNeed=1,"\uFFFD";if(T.lastNeed>2&&H.length>2&&(H[2]&192)!=128)return T.lastNeed=2,"\uFFFD"}}function _(T){var H=this.lastTotal-this.lastNeed,W=f(this,T,H);if(W!==void 0)return W;if(this.lastNeed<=T.length)return T.copy(this.lastChar,H,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);T.copy(this.lastChar,H,0,T.length),this.lastNeed-=T.length}function p(T,H){var W=d(this,T,H);if(!this.lastNeed)return T.toString("utf8",H);this.lastTotal=W;var Y=T.length-(W-this.lastNeed);return T.copy(this.lastChar,0,Y),T.toString("utf8",H,Y)}function u(T){var H=T&&T.length?this.write(T):"";return this.lastNeed?H+"\uFFFD":H}function E(T,H){if((T.length-H)%2==0){var W=T.toString("utf16le",H);if(W){var Y=W.charCodeAt(W.length-1);if(Y>=55296&&Y<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=T[T.length-2],this.lastChar[1]=T[T.length-1],W.slice(0,-1)}return W}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=T[T.length-1],T.toString("utf16le",H,T.length-1)}function h(T){var H=T&&T.length?this.write(T):"";if(this.lastNeed){var W=this.lastTotal-this.lastNeed;return H+this.lastChar.toString("utf16le",0,W)}return H}function m(T,H){var W=(T.length-H)%3;return W===0?T.toString("base64",H):(this.lastNeed=3-W,this.lastTotal=3,W===1?this.lastChar[0]=T[T.length-1]:(this.lastChar[0]=T[T.length-2],this.lastChar[1]=T[T.length-1]),T.toString("base64",H,T.length-W))}function y(T){var H=T&&T.length?this.write(T):"";return this.lastNeed?H+this.lastChar.toString("base64",0,3-this.lastNeed):H}function C(T){return T.toString(this.encoding)}function D(T){return T&&T.length?this.write(T):""}},33715:(g,G,k)=>{var R=G;R.utils=k(26436),R.common=k(95772),R.sha=k(89041),R.ripemd=k(12949),R.hmac=k(52344),R.sha1=R.sha.sha1,R.sha256=R.sha.sha256,R.sha224=R.sha.sha224,R.sha384=R.sha.sha384,R.sha512=R.sha.sha512,R.ripemd160=R.ripemd.ripemd160},95772:(g,G,k)=>{"use strict";var R=k(26436),B=k(79746);function A(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}G.BlockHash=A,A.prototype.update=function(l,o){if(l=R.toArray(l,o),this.pending?this.pending=this.pending.concat(l):this.pending=l,this.pendingTotal+=l.length,this.pending.length>=this._delta8){l=this.pending;var d=l.length%this._delta8;this.pending=l.slice(l.length-d,l.length),this.pending.length===0&&(this.pending=null),l=R.join32(l,0,l.length-d,this.endian);for(var f=0;f<l.length;f+=this._delta32)this._update(l,f,f+this._delta32)}return this},A.prototype.digest=function(l){return this.update(this._pad()),B(this.pending===null),this._digest(l)},A.prototype._pad=function(){var l=this.pendingTotal,o=this._delta8,d=o-(l+this.padLength)%o,f=new Array(d+this.padLength);f[0]=128;for(var _=1;_<d;_++)f[_]=0;if(l<<=3,this.endian==="big"){for(var p=8;p<this.padLength;p++)f[_++]=0;f[_++]=0,f[_++]=0,f[_++]=0,f[_++]=0,f[_++]=l>>>24&255,f[_++]=l>>>16&255,f[_++]=l>>>8&255,f[_++]=l&255}else for(f[_++]=l&255,f[_++]=l>>>8&255,f[_++]=l>>>16&255,f[_++]=l>>>24&255,f[_++]=0,f[_++]=0,f[_++]=0,f[_++]=0,p=8;p<this.padLength;p++)f[_++]=0;return f}},52344:(g,G,k)=>{"use strict";var R=k(26436),B=k(79746);function A(M,l,o){if(!(this instanceof A))return new A(M,l,o);this.Hash=M,this.blockSize=M.blockSize/8,this.outSize=M.outSize/8,this.inner=null,this.outer=null,this._init(R.toArray(l,o))}g.exports=A,A.prototype._init=function(l){l.length>this.blockSize&&(l=new this.Hash().update(l).digest()),B(l.length<=this.blockSize);for(var o=l.length;o<this.blockSize;o++)l.push(0);for(o=0;o<l.length;o++)l[o]^=54;for(this.inner=new this.Hash().update(l),o=0;o<l.length;o++)l[o]^=106;this.outer=new this.Hash().update(l)},A.prototype.update=function(l,o){return this.inner.update(l,o),this},A.prototype.digest=function(l){return this.outer.update(this.inner.digest()),this.outer.digest(l)}},12949:(g,G,k)=>{"use strict";var R=k(26436),B=k(95772),A=R.rotl32,M=R.sum32,l=R.sum32_3,o=R.sum32_4,d=B.BlockHash;function f(){if(!(this instanceof f))return new f;d.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}R.inherits(f,d),G.ripemd160=f,f.blockSize=512,f.outSize=160,f.hmacStrength=192,f.padLength=64,f.prototype._update=function(D,T){for(var H=this.h[0],W=this.h[1],Y=this.h[2],re=this.h[3],ie=this.h[4],oe=H,ae=W,de=Y,te=re,O=ie,q=0;q<80;q++){var x=M(A(o(H,_(q,W,Y,re),D[E[q]+T],p(q)),m[q]),ie);H=ie,ie=re,re=A(Y,10),Y=W,W=x,x=M(A(o(oe,_(79-q,ae,de,te),D[h[q]+T],u(q)),y[q]),O),oe=O,O=te,te=A(de,10),de=ae,ae=x}x=l(this.h[1],Y,te),this.h[1]=l(this.h[2],re,O),this.h[2]=l(this.h[3],ie,oe),this.h[3]=l(this.h[4],H,ae),this.h[4]=l(this.h[0],W,de),this.h[0]=x},f.prototype._digest=function(D){return D==="hex"?R.toHex32(this.h,"little"):R.split32(this.h,"little")};function _(C,D,T,H){return C<=15?D^T^H:C<=31?D&T|~D&H:C<=47?(D|~T)^H:C<=63?D&H|T&~H:D^(T|~H)}function p(C){return C<=15?0:C<=31?1518500249:C<=47?1859775393:C<=63?2400959708:2840853838}function u(C){return C<=15?1352829926:C<=31?1548603684:C<=47?1836072691:C<=63?2053994217:0}var E=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],h=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],m=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],y=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},89041:(g,G,k)=>{"use strict";G.sha1=k(84761),G.sha224=k(10799),G.sha256=k(89344),G.sha384=k(80772),G.sha512=k(45900)},84761:(g,G,k)=>{"use strict";var R=k(26436),B=k(95772),A=k(37038),M=R.rotl32,l=R.sum32,o=R.sum32_5,d=A.ft_1,f=B.BlockHash,_=[1518500249,1859775393,2400959708,3395469782];function p(){if(!(this instanceof p))return new p;f.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}R.inherits(p,f),g.exports=p,p.blockSize=512,p.outSize=160,p.hmacStrength=80,p.padLength=64,p.prototype._update=function(E,h){for(var m=this.W,y=0;y<16;y++)m[y]=E[h+y];for(;y<m.length;y++)m[y]=M(m[y-3]^m[y-8]^m[y-14]^m[y-16],1);var C=this.h[0],D=this.h[1],T=this.h[2],H=this.h[3],W=this.h[4];for(y=0;y<m.length;y++){var Y=~~(y/20),re=o(M(C,5),d(Y,D,T,H),W,m[y],_[Y]);W=H,H=T,T=M(D,30),D=C,C=re}this.h[0]=l(this.h[0],C),this.h[1]=l(this.h[1],D),this.h[2]=l(this.h[2],T),this.h[3]=l(this.h[3],H),this.h[4]=l(this.h[4],W)},p.prototype._digest=function(E){return E==="hex"?R.toHex32(this.h,"big"):R.split32(this.h,"big")}},10799:(g,G,k)=>{"use strict";var R=k(26436),B=k(89344);function A(){if(!(this instanceof A))return new A;B.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}R.inherits(A,B),g.exports=A,A.blockSize=512,A.outSize=224,A.hmacStrength=192,A.padLength=64,A.prototype._digest=function(l){return l==="hex"?R.toHex32(this.h.slice(0,7),"big"):R.split32(this.h.slice(0,7),"big")}},89344:(g,G,k)=>{"use strict";var R=k(26436),B=k(95772),A=k(37038),M=k(79746),l=R.sum32,o=R.sum32_4,d=R.sum32_5,f=A.ch32,_=A.maj32,p=A.s0_256,u=A.s1_256,E=A.g0_256,h=A.g1_256,m=B.BlockHash,y=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function C(){if(!(this instanceof C))return new C;m.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=y,this.W=new Array(64)}R.inherits(C,m),g.exports=C,C.blockSize=512,C.outSize=256,C.hmacStrength=192,C.padLength=64,C.prototype._update=function(T,H){for(var W=this.W,Y=0;Y<16;Y++)W[Y]=T[H+Y];for(;Y<W.length;Y++)W[Y]=o(h(W[Y-2]),W[Y-7],E(W[Y-15]),W[Y-16]);var re=this.h[0],ie=this.h[1],oe=this.h[2],ae=this.h[3],de=this.h[4],te=this.h[5],O=this.h[6],q=this.h[7];for(M(this.k.length===W.length),Y=0;Y<W.length;Y++){var x=d(q,u(de),f(de,te,O),this.k[Y],W[Y]),a=l(p(re),_(re,ie,oe));q=O,O=te,te=de,de=l(ae,x),ae=oe,oe=ie,ie=re,re=l(x,a)}this.h[0]=l(this.h[0],re),this.h[1]=l(this.h[1],ie),this.h[2]=l(this.h[2],oe),this.h[3]=l(this.h[3],ae),this.h[4]=l(this.h[4],de),this.h[5]=l(this.h[5],te),this.h[6]=l(this.h[6],O),this.h[7]=l(this.h[7],q)},C.prototype._digest=function(T){return T==="hex"?R.toHex32(this.h,"big"):R.split32(this.h,"big")}},80772:(g,G,k)=>{"use strict";var R=k(26436),B=k(45900);function A(){if(!(this instanceof A))return new A;B.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}R.inherits(A,B),g.exports=A,A.blockSize=1024,A.outSize=384,A.hmacStrength=192,A.padLength=128,A.prototype._digest=function(l){return l==="hex"?R.toHex32(this.h.slice(0,12),"big"):R.split32(this.h.slice(0,12),"big")}},45900:(g,G,k)=>{"use strict";var R=k(26436),B=k(95772),A=k(79746),M=R.rotr64_hi,l=R.rotr64_lo,o=R.shr64_hi,d=R.shr64_lo,f=R.sum64,_=R.sum64_hi,p=R.sum64_lo,u=R.sum64_4_hi,E=R.sum64_4_lo,h=R.sum64_5_hi,m=R.sum64_5_lo,y=B.BlockHash,C=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function D(){if(!(this instanceof D))return new D;y.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=C,this.W=new Array(160)}R.inherits(D,y),g.exports=D,D.blockSize=1024,D.outSize=512,D.hmacStrength=192,D.padLength=128,D.prototype._prepareBlock=function(a,b){for(var P=this.W,F=0;F<32;F++)P[F]=a[b+F];for(;F<P.length;F+=2){var L=O(P[F-4],P[F-3]),I=q(P[F-4],P[F-3]),K=P[F-14],z=P[F-13],w=de(P[F-30],P[F-29]),j=te(P[F-30],P[F-29]),he=P[F-32],_e=P[F-31];P[F]=u(L,I,K,z,w,j,he,_e),P[F+1]=E(L,I,K,z,w,j,he,_e)}},D.prototype._update=function(a,b){this._prepareBlock(a,b);var P=this.W,F=this.h[0],L=this.h[1],I=this.h[2],K=this.h[3],z=this.h[4],w=this.h[5],j=this.h[6],he=this.h[7],_e=this.h[8],Re=this.h[9],Ie=this.h[10],J=this.h[11],Z=this.h[12],fe=this.h[13],we=this.h[14],Ee=this.h[15];A(this.k.length===P.length);for(var $=0;$<P.length;$+=2){var V=we,le=Ee,Se=oe(_e,Re),De=ae(_e,Re),pe=T(_e,Re,Ie,J,Z,fe),He=H(_e,Re,Ie,J,Z,fe),Ve=this.k[$],qe=this.k[$+1],Ut=P[$],Ke=P[$+1],ze=h(V,le,Se,De,pe,He,Ve,qe,Ut,Ke),Gt=m(V,le,Se,De,pe,He,Ve,qe,Ut,Ke);V=re(F,L),le=ie(F,L),Se=W(F,L,I,K,z,w),De=Y(F,L,I,K,z,w);var se=_(V,le,Se,De),Q=p(V,le,Se,De);we=Z,Ee=fe,Z=Ie,fe=J,Ie=_e,J=Re,_e=_(j,he,ze,Gt),Re=p(he,he,ze,Gt),j=z,he=w,z=I,w=K,I=F,K=L,F=_(ze,Gt,se,Q),L=p(ze,Gt,se,Q)}f(this.h,0,F,L),f(this.h,2,I,K),f(this.h,4,z,w),f(this.h,6,j,he),f(this.h,8,_e,Re),f(this.h,10,Ie,J),f(this.h,12,Z,fe),f(this.h,14,we,Ee)},D.prototype._digest=function(a){return a==="hex"?R.toHex32(this.h,"big"):R.split32(this.h,"big")};function T(x,a,b,P,F){var L=x&b^~x&F;return L<0&&(L+=4294967296),L}function H(x,a,b,P,F,L){var I=a&P^~a&L;return I<0&&(I+=4294967296),I}function W(x,a,b,P,F){var L=x&b^x&F^b&F;return L<0&&(L+=4294967296),L}function Y(x,a,b,P,F,L){var I=a&P^a&L^P&L;return I<0&&(I+=4294967296),I}function re(x,a){var b=M(x,a,28),P=M(a,x,2),F=M(a,x,7),L=b^P^F;return L<0&&(L+=4294967296),L}function ie(x,a){var b=l(x,a,28),P=l(a,x,2),F=l(a,x,7),L=b^P^F;return L<0&&(L+=4294967296),L}function oe(x,a){var b=M(x,a,14),P=M(x,a,18),F=M(a,x,9),L=b^P^F;return L<0&&(L+=4294967296),L}function ae(x,a){var b=l(x,a,14),P=l(x,a,18),F=l(a,x,9),L=b^P^F;return L<0&&(L+=4294967296),L}function de(x,a){var b=M(x,a,1),P=M(x,a,8),F=o(x,a,7),L=b^P^F;return L<0&&(L+=4294967296),L}function te(x,a){var b=l(x,a,1),P=l(x,a,8),F=d(x,a,7),L=b^P^F;return L<0&&(L+=4294967296),L}function O(x,a){var b=M(x,a,19),P=M(a,x,29),F=o(x,a,6),L=b^P^F;return L<0&&(L+=4294967296),L}function q(x,a){var b=l(x,a,19),P=l(a,x,29),F=d(x,a,6),L=b^P^F;return L<0&&(L+=4294967296),L}},37038:(g,G,k)=>{"use strict";var R=k(26436),B=R.rotr32;function A(u,E,h,m){if(u===0)return M(E,h,m);if(u===1||u===3)return o(E,h,m);if(u===2)return l(E,h,m)}G.ft_1=A;function M(u,E,h){return u&E^~u&h}G.ch32=M;function l(u,E,h){return u&E^u&h^E&h}G.maj32=l;function o(u,E,h){return u^E^h}G.p32=o;function d(u){return B(u,2)^B(u,13)^B(u,22)}G.s0_256=d;function f(u){return B(u,6)^B(u,11)^B(u,25)}G.s1_256=f;function _(u){return B(u,7)^B(u,18)^u>>>3}G.g0_256=_;function p(u){return B(u,17)^B(u,19)^u>>>10}G.g1_256=p},26436:(g,G,k)=>{"use strict";var R=k(79746),B=k(35717);G.inherits=B;function A(q,x){return(q.charCodeAt(x)&64512)!=55296||x<0||x+1>=q.length?!1:(q.charCodeAt(x+1)&64512)==56320}function M(q,x){if(Array.isArray(q))return q.slice();if(!q)return[];var a=[];if(typeof q=="string")if(x){if(x==="hex")for(q=q.replace(/[^a-z0-9]+/ig,""),q.length%2!=0&&(q="0"+q),P=0;P<q.length;P+=2)a.push(parseInt(q[P]+q[P+1],16))}else for(var b=0,P=0;P<q.length;P++){var F=q.charCodeAt(P);F<128?a[b++]=F:F<2048?(a[b++]=F>>6|192,a[b++]=F&63|128):A(q,P)?(F=65536+((F&1023)<<10)+(q.charCodeAt(++P)&1023),a[b++]=F>>18|240,a[b++]=F>>12&63|128,a[b++]=F>>6&63|128,a[b++]=F&63|128):(a[b++]=F>>12|224,a[b++]=F>>6&63|128,a[b++]=F&63|128)}else for(P=0;P<q.length;P++)a[P]=q[P]|0;return a}G.toArray=M;function l(q){for(var x="",a=0;a<q.length;a++)x+=f(q[a].toString(16));return x}G.toHex=l;function o(q){var x=q>>>24|q>>>8&65280|q<<8&16711680|(q&255)<<24;return x>>>0}G.htonl=o;function d(q,x){for(var a="",b=0;b<q.length;b++){var P=q[b];x==="little"&&(P=o(P)),a+=_(P.toString(16))}return a}G.toHex32=d;function f(q){return q.length===1?"0"+q:q}G.zero2=f;function _(q){return q.length===7?"0"+q:q.length===6?"00"+q:q.length===5?"000"+q:q.length===4?"0000"+q:q.length===3?"00000"+q:q.length===2?"000000"+q:q.length===1?"0000000"+q:q}G.zero8=_;function p(q,x,a,b){var P=a-x;R(P%4==0);for(var F=new Array(P/4),L=0,I=x;L<F.length;L++,I+=4){var K;b==="big"?K=q[I]<<24|q[I+1]<<16|q[I+2]<<8|q[I+3]:K=q[I+3]<<24|q[I+2]<<16|q[I+1]<<8|q[I],F[L]=K>>>0}return F}G.join32=p;function u(q,x){for(var a=new Array(q.length*4),b=0,P=0;b<q.length;b++,P+=4){var F=q[b];x==="big"?(a[P]=F>>>24,a[P+1]=F>>>16&255,a[P+2]=F>>>8&255,a[P+3]=F&255):(a[P+3]=F>>>24,a[P+2]=F>>>16&255,a[P+1]=F>>>8&255,a[P]=F&255)}return a}G.split32=u;function E(q,x){return q>>>x|q<<32-x}G.rotr32=E;function h(q,x){return q<<x|q>>>32-x}G.rotl32=h;function m(q,x){return q+x>>>0}G.sum32=m;function y(q,x,a){return q+x+a>>>0}G.sum32_3=y;function C(q,x,a,b){return q+x+a+b>>>0}G.sum32_4=C;function D(q,x,a,b,P){return q+x+a+b+P>>>0}G.sum32_5=D;function T(q,x,a,b){var P=q[x],F=q[x+1],L=b+F>>>0,I=(L<b?1:0)+a+P;q[x]=I>>>0,q[x+1]=L}G.sum64=T;function H(q,x,a,b){var P=x+b>>>0,F=(P<x?1:0)+q+a;return F>>>0}G.sum64_hi=H;function W(q,x,a,b){var P=x+b;return P>>>0}G.sum64_lo=W;function Y(q,x,a,b,P,F,L,I){var K=0,z=x;z=z+b>>>0,K+=z<x?1:0,z=z+F>>>0,K+=z<F?1:0,z=z+I>>>0,K+=z<I?1:0;var w=q+a+P+L+K;return w>>>0}G.sum64_4_hi=Y;function re(q,x,a,b,P,F,L,I){var K=x+b+F+I;return K>>>0}G.sum64_4_lo=re;function ie(q,x,a,b,P,F,L,I,K,z){var w=0,j=x;j=j+b>>>0,w+=j<x?1:0,j=j+F>>>0,w+=j<F?1:0,j=j+I>>>0,w+=j<I?1:0,j=j+z>>>0,w+=j<z?1:0;var he=q+a+P+L+K+w;return he>>>0}G.sum64_5_hi=ie;function oe(q,x,a,b,P,F,L,I,K,z){var w=x+b+F+I+z;return w>>>0}G.sum64_5_lo=oe;function ae(q,x,a){var b=x<<32-a|q>>>a;return b>>>0}G.rotr64_hi=ae;function de(q,x,a){var b=q<<32-a|x>>>a;return b>>>0}G.rotr64_lo=de;function te(q,x,a){return q>>>a}G.shr64_hi=te;function O(q,x,a){var b=q<<32-a|x>>>a;return b>>>0}G.shr64_lo=O},2156:(g,G,k)=>{"use strict";var R=k(33715),B=k(34504),A=k(79746);function M(l){if(!(this instanceof M))return new M(l);this.hash=l.hash,this.predResist=!!l.predResist,this.outLen=this.hash.outSize,this.minEntropy=l.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var o=B.toArray(l.entropy,l.entropyEnc||"hex"),d=B.toArray(l.nonce,l.nonceEnc||"hex"),f=B.toArray(l.pers,l.persEnc||"hex");A(o.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(o,d,f)}g.exports=M,M.prototype._init=function(o,d,f){var _=o.concat(d).concat(f);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var p=0;p<this.V.length;p++)this.K[p]=0,this.V[p]=1;this._update(_),this._reseed=1,this.reseedInterval=281474976710656},M.prototype._hmac=function(){return new R.hmac(this.hash,this.K)},M.prototype._update=function(o){var d=this._hmac().update(this.V).update([0]);o&&(d=d.update(o)),this.K=d.digest(),this.V=this._hmac().update(this.V).digest(),!!o&&(this.K=this._hmac().update(this.V).update([1]).update(o).digest(),this.V=this._hmac().update(this.V).digest())},M.prototype.reseed=function(o,d,f,_){typeof d!="string"&&(_=f,f=d,d=null),o=B.toArray(o,d),f=B.toArray(f,_),A(o.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(o.concat(f||[])),this._reseed=1},M.prototype.generate=function(o,d,f,_){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");typeof d!="string"&&(_=f,f=d,d=null),f&&(f=B.toArray(f,_||"hex"),this._update(f));for(var p=[];p.length<o;)this.V=this._hmac().update(this.V).digest(),p=p.concat(this.V);var u=p.slice(0,o);return this._update(f),this._reseed++,B.encode(u,d)}},80645:(g,G)=>{/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */G.read=function(k,R,B,A,M){var l,o,d=M*8-A-1,f=(1<<d)-1,_=f>>1,p=-7,u=B?M-1:0,E=B?-1:1,h=k[R+u];for(u+=E,l=h&(1<<-p)-1,h>>=-p,p+=d;p>0;l=l*256+k[R+u],u+=E,p-=8);for(o=l&(1<<-p)-1,l>>=-p,p+=A;p>0;o=o*256+k[R+u],u+=E,p-=8);if(l===0)l=1-_;else{if(l===f)return o?NaN:(h?-1:1)*Infinity;o=o+Math.pow(2,A),l=l-_}return(h?-1:1)*o*Math.pow(2,l-A)},G.write=function(k,R,B,A,M,l){var o,d,f,_=l*8-M-1,p=(1<<_)-1,u=p>>1,E=M===23?Math.pow(2,-24)-Math.pow(2,-77):0,h=A?0:l-1,m=A?1:-1,y=R<0||R===0&&1/R<0?1:0;for(R=Math.abs(R),isNaN(R)||R===Infinity?(d=isNaN(R)?1:0,o=p):(o=Math.floor(Math.log(R)/Math.LN2),R*(f=Math.pow(2,-o))<1&&(o--,f*=2),o+u>=1?R+=E/f:R+=E*Math.pow(2,1-u),R*f>=2&&(o++,f/=2),o+u>=p?(d=0,o=p):o+u>=1?(d=(R*f-1)*Math.pow(2,M),o=o+u):(d=R*Math.pow(2,u-1)*Math.pow(2,M),o=0));M>=8;k[B+h]=d&255,h+=m,d/=256,M-=8);for(o=o<<M|d,_+=M;_>0;k[B+h]=o&255,h+=m,o/=256,_-=8);k[B+h-m]|=y*128}},35717:g=>{typeof Object.create=="function"?g.exports=function(k,R){R&&(k.super_=R,k.prototype=Object.create(R.prototype,{constructor:{value:k,enumerable:!1,writable:!0,configurable:!0}}))}:g.exports=function(k,R){if(R){k.super_=R;var B=function(){};B.prototype=R.prototype,k.prototype=new B,k.prototype.constructor=k}}},82584:(g,G,k)=>{"use strict";var R=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol",B=k(21924),A=B("Object.prototype.toString"),M=function(f){return R&&f&&typeof f=="object"&&Symbol.toStringTag in f?!1:A(f)==="[object Arguments]"},l=function(f){return M(f)?!0:f!==null&&typeof f=="object"&&typeof f.length=="number"&&f.length>=0&&A(f)!=="[object Array]"&&A(f.callee)==="[object Function]"},o=function(){return M(arguments)}();M.isLegacyArguments=l,g.exports=o?M:l},48662:g=>{"use strict";var G=Object.prototype.toString,k=Function.prototype.toString,R=/^\s*(?:function)?\*/,B=typeof Symbol=="function"&&typeof Symbol.toStringTag=="symbol",A=Object.getPrototypeOf,M=function(){if(!B)return!1;try{return Function("return function*() {}")()}catch(o){}},l;g.exports=function(d){if(typeof d!="function")return!1;if(R.test(k.call(d)))return!0;if(!B){var f=G.call(d);return f==="[object GeneratorFunction]"}if(!A)return!1;if(typeof l=="undefined"){var _=M();l=_?A(_):!1}return A(d)===l}},85692:(g,G,k)=>{"use strict";var R=k(49804),B=k(63083),A=k(21924),M=A("Object.prototype.toString"),l=k(41405)(),o=l&&typeof Symbol.toStringTag=="symbol",d=B(),f=A("Array.prototype.indexOf",!0)||function(y,C){for(var D=0;D<y.length;D+=1)if(y[D]===C)return D;return-1},_=A("String.prototype.slice"),p={},u=k(94079),E=Object.getPrototypeOf;o&&u&&E&&R(d,function(m){var y=new k.g[m];if(!(Symbol.toStringTag in y))throw new EvalError("this engine has support for Symbol.toStringTag, but "+m+" does not have the property! Please report this.");var C=E(y),D=u(C,Symbol.toStringTag);if(!D){var T=E(C);D=u(T,Symbol.toStringTag)}p[m]=D.get});var h=function(y){var C=!1;return R(p,function(D,T){if(!C)try{C=D.call(y)===T}catch(H){}}),C};g.exports=function(y){if(!y||typeof y!="object")return!1;if(!o){var C=_(M(y),8,-1);return f(d,C)>-1}return u?h(y):!1}},39593:(g,G,k)=>{"use strict";const R=k(34411),B=Symbol("max"),A=Symbol("length"),M=Symbol("lengthCalculator"),l=Symbol("allowStale"),o=Symbol("maxAge"),d=Symbol("dispose"),f=Symbol("noDisposeOnSet"),_=Symbol("lruList"),p=Symbol("cache"),u=Symbol("updateAgeOnGet"),E=()=>1;class h{constructor(Y){if(typeof Y=="number"&&(Y={max:Y}),Y||(Y={}),Y.max&&(typeof Y.max!="number"||Y.max<0))throw new TypeError("max must be a non-negative number");const re=this[B]=Y.max||Infinity,ie=Y.length||E;if(this[M]=typeof ie!="function"?E:ie,this[l]=Y.stale||!1,Y.maxAge&&typeof Y.maxAge!="number")throw new TypeError("maxAge must be a number");this[o]=Y.maxAge||0,this[d]=Y.dispose,this[f]=Y.noDisposeOnSet||!1,this[u]=Y.updateAgeOnGet||!1,this.reset()}set max(Y){if(typeof Y!="number"||Y<0)throw new TypeError("max must be a non-negative number");this[B]=Y||Infinity,C(this)}get max(){return this[B]}set allowStale(Y){this[l]=!!Y}get allowStale(){return this[l]}set maxAge(Y){if(typeof Y!="number")throw new TypeError("maxAge must be a non-negative number");this[o]=Y,C(this)}get maxAge(){return this[o]}set lengthCalculator(Y){typeof Y!="function"&&(Y=E),Y!==this[M]&&(this[M]=Y,this[A]=0,this[_].forEach(re=>{re.length=this[M](re.value,re.key),this[A]+=re.length})),C(this)}get lengthCalculator(){return this[M]}get length(){return this[A]}get itemCount(){return this[_].length}rforEach(Y,re){re=re||this;for(let ie=this[_].tail;ie!==null;){const oe=ie.prev;H(this,Y,ie,re),ie=oe}}forEach(Y,re){re=re||this;for(let ie=this[_].head;ie!==null;){const oe=ie.next;H(this,Y,ie,re),ie=oe}}keys(){return this[_].toArray().map(Y=>Y.key)}values(){return this[_].toArray().map(Y=>Y.value)}reset(){this[d]&&this[_]&&this[_].length&&this[_].forEach(Y=>this[d](Y.key,Y.value)),this[p]=new Map,this[_]=new R,this[A]=0}dump(){return this[_].map(Y=>y(this,Y)?!1:{k:Y.key,v:Y.value,e:Y.now+(Y.maxAge||0)}).toArray().filter(Y=>Y)}dumpLru(){return this[_]}set(Y,re,ie){if(ie=ie||this[o],ie&&typeof ie!="number")throw new TypeError("maxAge must be a number");const oe=ie?Date.now():0,ae=this[M](re,Y);if(this[p].has(Y)){if(ae>this[B])return D(this,this[p].get(Y)),!1;const O=this[p].get(Y).value;return this[d]&&(this[f]||this[d](Y,O.value)),O.now=oe,O.maxAge=ie,O.value=re,this[A]+=ae-O.length,O.length=ae,this.get(Y),C(this),!0}const de=new T(Y,re,ae,oe,ie);return de.length>this[B]?(this[d]&&this[d](Y,re),!1):(this[A]+=de.length,this[_].unshift(de),this[p].set(Y,this[_].head),C(this),!0)}has(Y){if(!this[p].has(Y))return!1;const re=this[p].get(Y).value;return!y(this,re)}get(Y){return m(this,Y,!0)}peek(Y){return m(this,Y,!1)}pop(){const Y=this[_].tail;return Y?(D(this,Y),Y.value):null}del(Y){D(this,this[p].get(Y))}load(Y){this.reset();const re=Date.now();for(let ie=Y.length-1;ie>=0;ie--){const oe=Y[ie],ae=oe.e||0;if(ae===0)this.set(oe.k,oe.v);else{const de=ae-re;de>0&&this.set(oe.k,oe.v,de)}}}prune(){this[p].forEach((Y,re)=>m(this,re,!1))}}const m=(W,Y,re)=>{const ie=W[p].get(Y);if(ie){const oe=ie.value;if(y(W,oe)){if(D(W,ie),!W[l])return}else re&&(W[u]&&(ie.value.now=Date.now()),W[_].unshiftNode(ie));return oe.value}},y=(W,Y)=>{if(!Y||!Y.maxAge&&!W[o])return!1;const re=Date.now()-Y.now;return Y.maxAge?re>Y.maxAge:W[o]&&re>W[o]},C=W=>{if(W[A]>W[B])for(let Y=W[_].tail;W[A]>W[B]&&Y!==null;){const re=Y.prev;D(W,Y),Y=re}},D=(W,Y)=>{if(Y){const re=Y.value;W[d]&&W[d](re.key,re.value),W[A]-=re.length,W[p].delete(re.key),W[_].removeNode(Y)}};class T{constructor(Y,re,ie,oe,ae){this.key=Y,this.value=re,this.length=ie,this.now=oe,this.maxAge=ae||0}}const H=(W,Y,re,ie)=>{let oe=re.value;y(W,oe)&&(D(W,re),W[l]||(oe=void 0)),oe&&Y.call(ie,oe.value,oe.key,W)};g.exports=h},62318:(g,G,k)=>{"use strict";var R=k(35717),B=k(3349),A=k(89509).Buffer,M=new Array(16);function l(){B.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}R(l,B),l.prototype._update=function(){for(var u=M,E=0;E<16;++E)u[E]=this._block.readInt32LE(E*4);var h=this._a,m=this._b,y=this._c,C=this._d;h=d(h,m,y,C,u[0],3614090360,7),C=d(C,h,m,y,u[1],3905402710,12),y=d(y,C,h,m,u[2],606105819,17),m=d(m,y,C,h,u[3],3250441966,22),h=d(h,m,y,C,u[4],4118548399,7),C=d(C,h,m,y,u[5],1200080426,12),y=d(y,C,h,m,u[6],2821735955,17),m=d(m,y,C,h,u[7],4249261313,22),h=d(h,m,y,C,u[8],1770035416,7),C=d(C,h,m,y,u[9],2336552879,12),y=d(y,C,h,m,u[10],4294925233,17),m=d(m,y,C,h,u[11],2304563134,22),h=d(h,m,y,C,u[12],1804603682,7),C=d(C,h,m,y,u[13],4254626195,12),y=d(y,C,h,m,u[14],2792965006,17),m=d(m,y,C,h,u[15],1236535329,22),h=f(h,m,y,C,u[1],4129170786,5),C=f(C,h,m,y,u[6],3225465664,9),y=f(y,C,h,m,u[11],643717713,14),m=f(m,y,C,h,u[0],3921069994,20),h=f(h,m,y,C,u[5],3593408605,5),C=f(C,h,m,y,u[10],38016083,9),y=f(y,C,h,m,u[15],3634488961,14),m=f(m,y,C,h,u[4],3889429448,20),h=f(h,m,y,C,u[9],568446438,5),C=f(C,h,m,y,u[14],3275163606,9),y=f(y,C,h,m,u[3],4107603335,14),m=f(m,y,C,h,u[8],1163531501,20),h=f(h,m,y,C,u[13],2850285829,5),C=f(C,h,m,y,u[2],4243563512,9),y=f(y,C,h,m,u[7],1735328473,14),m=f(m,y,C,h,u[12],2368359562,20),h=_(h,m,y,C,u[5],4294588738,4),C=_(C,h,m,y,u[8],2272392833,11),y=_(y,C,h,m,u[11],1839030562,16),m=_(m,y,C,h,u[14],4259657740,23),h=_(h,m,y,C,u[1],2763975236,4),C=_(C,h,m,y,u[4],1272893353,11),y=_(y,C,h,m,u[7],4139469664,16),m=_(m,y,C,h,u[10],3200236656,23),h=_(h,m,y,C,u[13],681279174,4),C=_(C,h,m,y,u[0],3936430074,11),y=_(y,C,h,m,u[3],3572445317,16),m=_(m,y,C,h,u[6],76029189,23),h=_(h,m,y,C,u[9],3654602809,4),C=_(C,h,m,y,u[12],3873151461,11),y=_(y,C,h,m,u[15],530742520,16),m=_(m,y,C,h,u[2],3299628645,23),h=p(h,m,y,C,u[0],4096336452,6),C=p(C,h,m,y,u[7],1126891415,10),y=p(y,C,h,m,u[14],2878612391,15),m=p(m,y,C,h,u[5],4237533241,21),h=p(h,m,y,C,u[12],1700485571,6),C=p(C,h,m,y,u[3],2399980690,10),y=p(y,C,h,m,u[10],4293915773,15),m=p(m,y,C,h,u[1],2240044497,21),h=p(h,m,y,C,u[8],1873313359,6),C=p(C,h,m,y,u[15],4264355552,10),y=p(y,C,h,m,u[6],2734768916,15),m=p(m,y,C,h,u[13],1309151649,21),h=p(h,m,y,C,u[4],4149444226,6),C=p(C,h,m,y,u[11],3174756917,10),y=p(y,C,h,m,u[2],718787259,15),m=p(m,y,C,h,u[9],3951481745,21),this._a=this._a+h|0,this._b=this._b+m|0,this._c=this._c+y|0,this._d=this._d+C|0},l.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var u=A.allocUnsafe(16);return u.writeInt32LE(this._a,0),u.writeInt32LE(this._b,4),u.writeInt32LE(this._c,8),u.writeInt32LE(this._d,12),u};function o(u,E){return u<<E|u>>>32-E}function d(u,E,h,m,y,C,D){return o(u+(E&h|~E&m)+y+C|0,D)+E|0}function f(u,E,h,m,y,C,D){return o(u+(E&m|h&~m)+y+C|0,D)+E|0}function _(u,E,h,m,y,C,D){return o(u+(E^h^m)+y+C|0,D)+E|0}function p(u,E,h,m,y,C,D){return o(u+(h^(E|~m))+y+C|0,D)+E|0}g.exports=l},63047:(g,G,k)=>{var R=k(13550),B=k(29931);function A(M){this.rand=M||new B.Rand}g.exports=A,A.create=function(l){return new A(l)},A.prototype._randbelow=function(l){var o=l.bitLength(),d=Math.ceil(o/8);do var f=new R(this.rand.generate(d));while(f.cmp(l)>=0);return f},A.prototype._randrange=function(l,o){var d=o.sub(l);return l.add(this._randbelow(d))},A.prototype.test=function(l,o,d){var f=l.bitLength(),_=R.mont(l),p=new R(1).toRed(_);o||(o=Math.max(1,f/48|0));for(var u=l.subn(1),E=0;!u.testn(E);E++);for(var h=l.shrn(E),m=u.toRed(_),y=!0;o>0;o--){var C=this._randrange(new R(2),u);d&&d(C);var D=C.toRed(_).redPow(h);if(!(D.cmp(p)===0||D.cmp(m)===0)){for(var T=1;T<E;T++){if(D=D.redSqr(),D.cmp(p)===0)return!1;if(D.cmp(m)===0)break}if(T===E)return!1}}return y},A.prototype.getDivisor=function(l,o){var d=l.bitLength(),f=R.mont(l),_=new R(1).toRed(f);o||(o=Math.max(1,d/48|0));for(var p=l.subn(1),u=0;!p.testn(u);u++);for(var E=l.shrn(u),h=p.toRed(f);o>0;o--){var m=this._randrange(new R(2),p),y=l.gcd(m);if(y.cmpn(1)!==0)return y;var C=m.toRed(f).redPow(E);if(!(C.cmp(_)===0||C.cmp(h)===0)){for(var D=1;D<u;D++){if(C=C.redSqr(),C.cmp(_)===0)return C.fromRed().subn(1).gcd(l);if(C.cmp(h)===0)break}if(D===u)return C=C.redSqr(),C.fromRed().subn(1).gcd(l)}}return!1}},79746:g=>{g.exports=G;function G(k,R){if(!k)throw new Error(R||"Assertion failed")}G.equal=function(R,B,A){if(R!=B)throw new Error(A||"Assertion failed: "+R+" != "+B)}},34504:(g,G)=>{"use strict";var k=G;function R(M,l){if(Array.isArray(M))return M.slice();if(!M)return[];var o=[];if(typeof M!="string"){for(var d=0;d<M.length;d++)o[d]=M[d]|0;return o}if(l==="hex"){M=M.replace(/[^a-z0-9]+/ig,""),M.length%2!=0&&(M="0"+M);for(var d=0;d<M.length;d+=2)o.push(parseInt(M[d]+M[d+1],16))}else for(var d=0;d<M.length;d++){var f=M.charCodeAt(d),_=f>>8,p=f&255;_?o.push(_,p):o.push(p)}return o}k.toArray=R;function B(M){return M.length===1?"0"+M:M}k.zero2=B;function A(M){for(var l="",o=0;o<M.length;o++)l+=B(M[o].toString(16));return l}k.toHex=A,k.encode=function(l,o){return o==="hex"?A(l):l}},30778:(g,G,k)=>{var R=k(52479);g.exports=R(B),g.exports.strict=R(A),B.proto=B(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return B(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return A(this)},configurable:!0})});function B(M){var l=function(){return l.called?l.value:(l.called=!0,l.value=M.apply(this,arguments))};return l.called=!1,l}function A(M){var l=function(){if(l.called)throw new Error(l.onceError);return l.called=!0,l.value=M.apply(this,arguments)},o=M.name||"Function wrapped with `once`";return l.onceError=o+" shouldn't be called more than once",l.called=!1,l}},52818:(g,G,k)=>{"use strict";var R=k(39809);G.certificate=k(41934);var B=R.define("RSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())});G.RSAPrivateKey=B;var A=R.define("RSAPublicKey",function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())});G.RSAPublicKey=A;var M=R.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(l),this.key("subjectPublicKey").bitstr())});G.PublicKey=M;var l=R.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}),o=R.define("PrivateKeyInfo",function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(l),this.key("subjectPrivateKey").octstr())});G.PrivateKey=o;var d=R.define("EncryptedPrivateKeyInfo",function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())});G.EncryptedPrivateKey=d;var f=R.define("DSAPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())});G.DSAPrivateKey=f,G.DSAparam=R.define("DSAparam",function(){this.int()});var _=R.define("ECPrivateKey",function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(p),this.key("publicKey").optional().explicit(1).bitstr())});G.ECPrivateKey=_;var p=R.define("ECParameters",function(){this.choice({namedCurve:this.objid()})});G.signature=R.define("signature",function(){this.seq().obj(this.key("r").int(),this.key("s").int())})},41934:(g,G,k)=>{"use strict";var R=k(39809),B=R.define("Time",function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})}),A=R.define("AttributeTypeValue",function(){this.seq().obj(this.key("type").objid(),this.key("value").any())}),M=R.define("AlgorithmIdentifier",function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())}),l=R.define("SubjectPublicKeyInfo",function(){this.seq().obj(this.key("algorithm").use(M),this.key("subjectPublicKey").bitstr())}),o=R.define("RelativeDistinguishedName",function(){this.setof(A)}),d=R.define("RDNSequence",function(){this.seqof(o)}),f=R.define("Name",function(){this.choice({rdnSequence:this.use(d)})}),_=R.define("Validity",function(){this.seq().obj(this.key("notBefore").use(B),this.key("notAfter").use(B))}),p=R.define("Extension",function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())}),u=R.define("TBSCertificate",function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(M),this.key("issuer").use(f),this.key("validity").use(_),this.key("subject").use(f),this.key("subjectPublicKeyInfo").use(l),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(p).optional())}),E=R.define("X509Certificate",function(){this.seq().obj(this.key("tbsCertificate").use(u),this.key("signatureAlgorithm").use(M),this.key("signatureValue").bitstr())});g.exports=E},77631:(g,G,k)=>{var R=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,B=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,A=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,M=k(13048),l=k(44696),o=k(89509).Buffer;g.exports=function(d,f){var _=d.toString(),p=_.match(R),u;if(p){var h="aes"+p[1],m=o.from(p[2],"hex"),y=o.from(p[3].replace(/[\r\n]/g,""),"base64"),C=M(f,m.slice(0,8),parseInt(p[1],10)).key,D=[],T=l.createDecipheriv(h,C,m);D.push(T.update(y)),D.push(T.final()),u=o.concat(D)}else{var E=_.match(A);u=o.from(E[2].replace(/[\r\n]/g,""),"base64")}var H=_.match(B)[1];return{tag:H,data:u}}},70980:(g,G,k)=>{var R=k(52818),B=k(22562),A=k(77631),M=k(44696),l=k(25632),o=k(89509).Buffer;g.exports=d;function d(_){var p;typeof _=="object"&&!o.isBuffer(_)&&(p=_.passphrase,_=_.key),typeof _=="string"&&(_=o.from(_));var u=A(_,p),E=u.tag,h=u.data,m,y;switch(E){case"CERTIFICATE":y=R.certificate.decode(h,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(y||(y=R.PublicKey.decode(h,"der")),m=y.algorithm.algorithm.join("."),m){case"1.2.840.113549.1.1.1":return R.RSAPublicKey.decode(y.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return y.subjectPrivateKey=y.subjectPublicKey,{type:"ec",data:y};case"1.2.840.10040.4.1":return y.algorithm.params.pub_key=R.DSAparam.decode(y.subjectPublicKey.data,"der"),{type:"dsa",data:y.algorithm.params};default:throw new Error("unknown key id "+m)}case"ENCRYPTED PRIVATE KEY":h=R.EncryptedPrivateKey.decode(h,"der"),h=f(h,p);case"PRIVATE KEY":switch(y=R.PrivateKey.decode(h,"der"),m=y.algorithm.algorithm.join("."),m){case"1.2.840.113549.1.1.1":return R.RSAPrivateKey.decode(y.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:y.algorithm.curve,privateKey:R.ECPrivateKey.decode(y.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return y.algorithm.params.priv_key=R.DSAparam.decode(y.subjectPrivateKey,"der"),{type:"dsa",params:y.algorithm.params};default:throw new Error("unknown key id "+m)}case"RSA PUBLIC KEY":return R.RSAPublicKey.decode(h,"der");case"RSA PRIVATE KEY":return R.RSAPrivateKey.decode(h,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:R.DSAPrivateKey.decode(h,"der")};case"EC PRIVATE KEY":return h=R.ECPrivateKey.decode(h,"der"),{curve:h.parameters.value,privateKey:h.privateKey};default:throw new Error("unknown key type "+E)}}d.signature=R.signature;function f(_,p){var u=_.algorithm.decrypt.kde.kdeparams.salt,E=parseInt(_.algorithm.decrypt.kde.kdeparams.iters.toString(),10),h=B[_.algorithm.decrypt.cipher.algo.join(".")],m=_.algorithm.decrypt.cipher.iv,y=_.subjectPrivateKey,C=parseInt(h.split("-")[1],10)/8,D=l.pbkdf2Sync(p,u,E,C,"sha1"),T=M.createDecipheriv(h,D,m),H=[];return H.push(T.update(y)),H.push(T.final()),o.concat(H)}},26470:(g,G,k)=>{"use strict";var R=k(34155);function B(o){if(typeof o!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(o))}function A(o,d){for(var f="",_=0,p=-1,u=0,E,h=0;h<=o.length;++h){if(h<o.length)E=o.charCodeAt(h);else{if(E===47)break;E=47}if(E===47){if(!(p===h-1||u===1))if(p!==h-1&&u===2){if(f.length<2||_!==2||f.charCodeAt(f.length-1)!==46||f.charCodeAt(f.length-2)!==46){if(f.length>2){var m=f.lastIndexOf("/");if(m!==f.length-1){m===-1?(f="",_=0):(f=f.slice(0,m),_=f.length-1-f.lastIndexOf("/")),p=h,u=0;continue}}else if(f.length===2||f.length===1){f="",_=0,p=h,u=0;continue}}d&&(f.length>0?f+="/..":f="..",_=2)}else f.length>0?f+="/"+o.slice(p+1,h):f=o.slice(p+1,h),_=h-p-1;p=h,u=0}else E===46&&u!==-1?++u:u=-1}return f}function M(o,d){var f=d.dir||d.root,_=d.base||(d.name||"")+(d.ext||"");return f?f===d.root?f+_:f+o+_:_}var l={resolve:function(){for(var d="",f=!1,_,p=arguments.length-1;p>=-1&&!f;p--){var u;p>=0?u=arguments[p]:(_===void 0&&(_=R.cwd()),u=_),B(u),u.length!==0&&(d=u+"/"+d,f=u.charCodeAt(0)===47)}return d=A(d,!f),f?d.length>0?"/"+d:"/":d.length>0?d:"."},normalize:function(d){if(B(d),d.length===0)return".";var f=d.charCodeAt(0)===47,_=d.charCodeAt(d.length-1)===47;return d=A(d,!f),d.length===0&&!f&&(d="."),d.length>0&&_&&(d+="/"),f?"/"+d:d},isAbsolute:function(d){return B(d),d.length>0&&d.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var d,f=0;f<arguments.length;++f){var _=arguments[f];B(_),_.length>0&&(d===void 0?d=_:d+="/"+_)}return d===void 0?".":l.normalize(d)},relative:function(d,f){if(B(d),B(f),d===f||(d=l.resolve(d),f=l.resolve(f),d===f))return"";for(var _=1;_<d.length&&d.charCodeAt(_)===47;++_);for(var p=d.length,u=p-_,E=1;E<f.length&&f.charCodeAt(E)===47;++E);for(var h=f.length,m=h-E,y=u<m?u:m,C=-1,D=0;D<=y;++D){if(D===y){if(m>y){if(f.charCodeAt(E+D)===47)return f.slice(E+D+1);if(D===0)return f.slice(E+D)}else u>y&&(d.charCodeAt(_+D)===47?C=D:D===0&&(C=0));break}var T=d.charCodeAt(_+D),H=f.charCodeAt(E+D);if(T!==H)break;T===47&&(C=D)}var W="";for(D=_+C+1;D<=p;++D)(D===p||d.charCodeAt(D)===47)&&(W.length===0?W+="..":W+="/..");return W.length>0?W+f.slice(E+C):(E+=C,f.charCodeAt(E)===47&&++E,f.slice(E))},_makeLong:function(d){return d},dirname:function(d){if(B(d),d.length===0)return".";for(var f=d.charCodeAt(0),_=f===47,p=-1,u=!0,E=d.length-1;E>=1;--E)if(f=d.charCodeAt(E),f===47){if(!u){p=E;break}}else u=!1;return p===-1?_?"/":".":_&&p===1?"//":d.slice(0,p)},basename:function(d,f){if(f!==void 0&&typeof f!="string")throw new TypeError('"ext" argument must be a string');B(d);var _=0,p=-1,u=!0,E;if(f!==void 0&&f.length>0&&f.length<=d.length){if(f.length===d.length&&f===d)return"";var h=f.length-1,m=-1;for(E=d.length-1;E>=0;--E){var y=d.charCodeAt(E);if(y===47){if(!u){_=E+1;break}}else m===-1&&(u=!1,m=E+1),h>=0&&(y===f.charCodeAt(h)?--h==-1&&(p=E):(h=-1,p=m))}return _===p?p=m:p===-1&&(p=d.length),d.slice(_,p)}else{for(E=d.length-1;E>=0;--E)if(d.charCodeAt(E)===47){if(!u){_=E+1;break}}else p===-1&&(u=!1,p=E+1);return p===-1?"":d.slice(_,p)}},extname:function(d){B(d);for(var f=-1,_=0,p=-1,u=!0,E=0,h=d.length-1;h>=0;--h){var m=d.charCodeAt(h);if(m===47){if(!u){_=h+1;break}continue}p===-1&&(u=!1,p=h+1),m===46?f===-1?f=h:E!==1&&(E=1):f!==-1&&(E=-1)}return f===-1||p===-1||E===0||E===1&&f===p-1&&f===_+1?"":d.slice(f,p)},format:function(d){if(d===null||typeof d!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof d);return M("/",d)},parse:function(d){B(d);var f={root:"",dir:"",base:"",ext:"",name:""};if(d.length===0)return f;var _=d.charCodeAt(0),p=_===47,u;p?(f.root="/",u=1):u=0;for(var E=-1,h=0,m=-1,y=!0,C=d.length-1,D=0;C>=u;--C){if(_=d.charCodeAt(C),_===47){if(!y){h=C+1;break}continue}m===-1&&(y=!1,m=C+1),_===46?E===-1?E=C:D!==1&&(D=1):E!==-1&&(D=-1)}return E===-1||m===-1||D===0||D===1&&E===m-1&&E===h+1?m!==-1&&(h===0&&p?f.base=f.name=d.slice(1,m):f.base=f.name=d.slice(h,m)):(h===0&&p?(f.name=d.slice(1,E),f.base=d.slice(1,m)):(f.name=d.slice(h,E),f.base=d.slice(h,m)),f.ext=d.slice(E,m)),h>0?f.dir=d.slice(0,h-1):p&&(f.dir="/"),f},sep:"/",delimiter:":",win32:null,posix:null};l.posix=l,g.exports=l},25632:(g,G,k)=>{G.pbkdf2=k(88638),G.pbkdf2Sync=k(91257)},88638:(g,G,k)=>{var R=k(89509).Buffer,B=k(77357),A=k(12368),M=k(91257),l=k(57777),o,d=k.g.crypto&&k.g.crypto.subtle,f={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},_=[];function p(y){if(k.g.process&&!k.g.process.browser||!d||!d.importKey||!d.deriveBits)return Promise.resolve(!1);if(_[y]!==void 0)return _[y];o=o||R.alloc(8);var C=h(o,o,10,128,y).then(function(){return!0}).catch(function(){return!1});return _[y]=C,C}var u;function E(){return u||(k.g.process&&k.g.process.nextTick?u=k.g.process.nextTick:k.g.queueMicrotask?u=k.g.queueMicrotask:k.g.setImmediate?u=k.g.setImmediate:u=k.g.setTimeout,u)}function h(y,C,D,T,H){return d.importKey("raw",y,{name:"PBKDF2"},!1,["deriveBits"]).then(function(W){return d.deriveBits({name:"PBKDF2",salt:C,iterations:D,hash:{name:H}},W,T<<3)}).then(function(W){return R.from(W)})}function m(y,C){y.then(function(D){E()(function(){C(null,D)})},function(D){E()(function(){C(D)})})}g.exports=function(y,C,D,T,H,W){typeof H=="function"&&(W=H,H=void 0),H=H||"sha1";var Y=f[H.toLowerCase()];if(!Y||typeof k.g.Promise!="function"){E()(function(){var re;try{re=M(y,C,D,T,H)}catch(ie){return W(ie)}W(null,re)});return}if(B(D,T),y=l(y,A,"Password"),C=l(C,A,"Salt"),typeof W!="function")throw new Error("No callback provided to pbkdf2");m(p(Y).then(function(re){return re?h(y,C,D,T,Y):M(y,C,D,T,H)}),W)}},12368:(g,G,k)=>{var R=k(34155),B;if(k.g.process&&k.g.process.browser)B="utf-8";else if(k.g.process&&k.g.process.version){var A=parseInt(R.version.split(".")[0].slice(1),10);B=A>=6?"utf-8":"binary"}else B="utf-8";g.exports=B},77357:g=>{var G=Math.pow(2,30)-1;g.exports=function(k,R){if(typeof k!="number")throw new TypeError("Iterations not a number");if(k<0)throw new TypeError("Bad iterations");if(typeof R!="number")throw new TypeError("Key length not a number");if(R<0||R>G||R!==R)throw new TypeError("Bad key length")}},91257:(g,G,k)=>{var R=k(78028),B=k(79785),A=k(89072),M=k(89509).Buffer,l=k(77357),o=k(12368),d=k(57777),f=M.alloc(128),_={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function p(h,m,y){var C=u(h),D=h==="sha512"||h==="sha384"?128:64;m.length>D?m=C(m):m.length<D&&(m=M.concat([m,f],D));for(var T=M.allocUnsafe(D+_[h]),H=M.allocUnsafe(D+_[h]),W=0;W<D;W++)T[W]=m[W]^54,H[W]=m[W]^92;var Y=M.allocUnsafe(D+y+4);T.copy(Y,0,0,D),this.ipad1=Y,this.ipad2=T,this.opad=H,this.alg=h,this.blocksize=D,this.hash=C,this.size=_[h]}p.prototype.run=function(h,m){h.copy(m,this.blocksize);var y=this.hash(m);return y.copy(this.opad,this.blocksize),this.hash(this.opad)};function u(h){function m(C){return A(h).update(C).digest()}function y(C){return new B().update(C).digest()}return h==="rmd160"||h==="ripemd160"?y:h==="md5"?R:m}function E(h,m,y,C,D){l(y,C),h=d(h,o,"Password"),m=d(m,o,"Salt"),D=D||"sha1";var T=new p(D,h,m.length),H=M.allocUnsafe(C),W=M.allocUnsafe(m.length+4);m.copy(W,0,0,m.length);for(var Y=0,re=_[D],ie=Math.ceil(C/re),oe=1;oe<=ie;oe++){W.writeUInt32BE(oe,m.length);for(var ae=T.run(W,T.ipad1),de=ae,te=1;te<y;te++){de=T.run(de,T.ipad2);for(var O=0;O<re;O++)ae[O]^=de[O]}ae.copy(H,Y),Y+=re}return H}g.exports=E},57777:(g,G,k)=>{var R=k(89509).Buffer;g.exports=function(B,A,M){if(R.isBuffer(B))return B;if(typeof B=="string")return R.from(B,A);if(ArrayBuffer.isView(B))return R.from(B.buffer);throw new TypeError(M+" must be a string, a Buffer, a typed array or a DataView")}},34155:g=>{var G=g.exports={},k,R;function B(){throw new Error("setTimeout has not been defined")}function A(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?k=setTimeout:k=B}catch(m){k=B}try{typeof clearTimeout=="function"?R=clearTimeout:R=A}catch(m){R=A}})();function M(m){if(k===setTimeout)return setTimeout(m,0);if((k===B||!k)&&setTimeout)return k=setTimeout,setTimeout(m,0);try{return k(m,0)}catch(y){try{return k.call(null,m,0)}catch(C){return k.call(this,m,0)}}}function l(m){if(R===clearTimeout)return clearTimeout(m);if((R===A||!R)&&clearTimeout)return R=clearTimeout,clearTimeout(m);try{return R(m)}catch(y){try{return R.call(null,m)}catch(C){return R.call(this,m)}}}var o=[],d=!1,f,_=-1;function p(){!d||!f||(d=!1,f.length?o=f.concat(o):_=-1,o.length&&u())}function u(){if(!d){var m=M(p);d=!0;for(var y=o.length;y;){for(f=o,o=[];++_<y;)f&&f[_].run();_=-1,y=o.length}f=null,d=!1,l(m)}}G.nextTick=function(m){var y=new Array(arguments.length-1);if(arguments.length>1)for(var C=1;C<arguments.length;C++)y[C-1]=arguments[C];o.push(new E(m,y)),o.length===1&&!d&&M(u)};function E(m,y){this.fun=m,this.array=y}E.prototype.run=function(){this.fun.apply(null,this.array)},G.title="browser",G.browser=!0,G.env={},G.argv=[],G.version="",G.versions={};function h(){}G.on=h,G.addListener=h,G.once=h,G.off=h,G.removeListener=h,G.removeAllListeners=h,G.emit=h,G.prependListener=h,G.prependOnceListener=h,G.listeners=function(m){return[]},G.binding=function(m){throw new Error("process.binding is not supported")},G.cwd=function(){return"/"},G.chdir=function(m){throw new Error("process.chdir is not supported")},G.umask=function(){return 0}},7900:(g,G,k)=>{G.publicEncrypt=k(16559),G.privateDecrypt=k(26138),G.privateEncrypt=function(B,A){return G.publicEncrypt(B,A,!0)},G.publicDecrypt=function(B,A){return G.privateDecrypt(B,A,!0)}},99199:(g,G,k)=>{var R=k(23482),B=k(89509).Buffer;g.exports=function(M,l){for(var o=B.alloc(0),d=0,f;o.length<l;)f=A(d++),o=B.concat([o,R("sha1").update(M).update(f).digest()]);return o.slice(0,l)};function A(M){var l=B.allocUnsafe(4);return l.writeUInt32BE(M,0),l}},26138:(g,G,k)=>{var R=k(70980),B=k(99199),A=k(57859),M=k(13550),l=k(23663),o=k(23482),d=k(84818),f=k(89509).Buffer;g.exports=function(h,m,y){var C;h.padding?C=h.padding:y?C=1:C=4;var D=R(h),T=D.modulus.byteLength();if(m.length>T||new M(m).cmp(D.modulus)>=0)throw new Error("decryption error");var H;y?H=d(new M(m),D):H=l(m,D);var W=f.alloc(T-H.length);if(H=f.concat([W,H],T),C===4)return _(D,H);if(C===1)return p(D,H,y);if(C===3)return H;throw new Error("unknown padding")};function _(E,h){var m=E.modulus.byteLength(),y=o("sha1").update(f.alloc(0)).digest(),C=y.length;if(h[0]!==0)throw new Error("decryption error");var D=h.slice(1,C+1),T=h.slice(C+1),H=A(D,B(T,C)),W=A(T,B(H,m-C-1));if(u(y,W.slice(0,C)))throw new Error("decryption error");for(var Y=C;W[Y]===0;)Y++;if(W[Y++]!==1)throw new Error("decryption error");return W.slice(Y)}function p(E,h,m){for(var y=h.slice(0,2),C=2,D=0;h[C++]!==0;)if(C>=h.length){D++;break}var T=h.slice(2,C-1);if((y.toString("hex")!=="0002"&&!m||y.toString("hex")!=="0001"&&m)&&D++,T.length<8&&D++,D)throw new Error("decryption error");return h.slice(C)}function u(E,h){E=f.from(E),h=f.from(h);var m=0,y=E.length;E.length!==h.length&&(m++,y=Math.min(E.length,h.length));for(var C=-1;++C<y;)m+=E[C]^h[C];return m}},16559:(g,G,k)=>{var R=k(70980),B=k(61798),A=k(23482),M=k(99199),l=k(57859),o=k(13550),d=k(84818),f=k(23663),_=k(89509).Buffer;g.exports=function(m,y,C){var D;m.padding?D=m.padding:C?D=1:D=4;var T=R(m),H;if(D===4)H=p(T,y);else if(D===1)H=u(T,y,C);else if(D===3){if(H=new o(y),H.cmp(T.modulus)>=0)throw new Error("data too long for modulus")}else throw new Error("unknown padding");return C?f(H,T):d(H,T)};function p(h,m){var y=h.modulus.byteLength(),C=m.length,D=A("sha1").update(_.alloc(0)).digest(),T=D.length,H=2*T;if(C>y-H-2)throw new Error("message too long");var W=_.alloc(y-C-H-2),Y=y-T-1,re=B(T),ie=l(_.concat([D,W,_.alloc(1,1),m],Y),M(re,Y)),oe=l(re,M(ie,T));return new o(_.concat([_.alloc(1),oe,ie],y))}function u(h,m,y){var C=m.length,D=h.modulus.byteLength();if(C>D-11)throw new Error("message too long");var T;return y?T=_.alloc(D-C-3,255):T=E(D-C-3),new o(_.concat([_.from([0,y?1:2]),T,_.alloc(1),m],D))}function E(h){for(var m=_.allocUnsafe(h),y=0,C=B(h*2),D=0,T;y<h;)D===C.length&&(C=B(h*2),D=0),T=C[D++],T&&(m[y++]=T);return m}},84818:(g,G,k)=>{var R=k(13550),B=k(89509).Buffer;function A(M,l){return B.from(M.toRed(R.mont(l.modulus)).redPow(new R(l.publicExponent)).fromRed().toArray())}g.exports=A},57859:g=>{g.exports=function(k,R){for(var B=k.length,A=-1;++A<B;)k[A]^=R[A];return k}},61798:(g,G,k)=>{"use strict";var R=k(34155),B=65536,A=4294967295;function M(){throw new Error(`Secure random number generation is not supported by this browser.
Use Chrome, Firefox or Internet Explorer 11`)}var l=k(89509).Buffer,o=k.g.crypto||k.g.msCrypto;o&&o.getRandomValues?g.exports=d:g.exports=M;function d(f,_){if(f>A)throw new RangeError("requested too many random bytes");var p=l.allocUnsafe(f);if(f>0)if(f>B)for(var u=0;u<f;u+=B)o.getRandomValues(p.slice(u,u+B));else o.getRandomValues(p);return typeof _=="function"?R.nextTick(function(){_(null,p)}):p}},77963:(g,G,k)=>{"use strict";var R=k(34155);function B(){throw new Error(`secure random number generation not supported by this browser
use chrome, FireFox or Internet Explorer 11`)}var A=k(89509),M=k(61798),l=A.Buffer,o=A.kMaxLength,d=k.g.crypto||k.g.msCrypto,f=Math.pow(2,32)-1;function _(m,y){if(typeof m!="number"||m!==m)throw new TypeError("offset must be a number");if(m>f||m<0)throw new TypeError("offset must be a uint32");if(m>o||m>y)throw new RangeError("offset out of range")}function p(m,y,C){if(typeof m!="number"||m!==m)throw new TypeError("size must be a number");if(m>f||m<0)throw new TypeError("size must be a uint32");if(m+y>C||m>o)throw new RangeError("buffer too small")}d&&d.getRandomValues||!R.browser?(G.randomFill=u,G.randomFillSync=h):(G.randomFill=B,G.randomFillSync=B);function u(m,y,C,D){if(!l.isBuffer(m)&&!(m instanceof k.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if(typeof y=="function")D=y,y=0,C=m.length;else if(typeof C=="function")D=C,C=m.length-y;else if(typeof D!="function")throw new TypeError('"cb" argument must be a function');return _(y,m.length),p(C,y,m.length),E(m,y,C,D)}function E(m,y,C,D){if(R.browser){var T=m.buffer,H=new Uint8Array(T,y,C);if(d.getRandomValues(H),D){R.nextTick(function(){D(null,m)});return}return m}if(D){M(C,function(Y,re){if(Y)return D(Y);re.copy(m,y),D(null,m)});return}var W=M(C);return W.copy(m,y),m}function h(m,y,C){if(typeof y=="undefined"&&(y=0),!l.isBuffer(m)&&!(m instanceof k.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return _(y,m.length),C===void 0&&(C=m.length-y),p(C,y,m.length),E(m,y,C)}},79785:(g,G,k)=>{"use strict";var R=k(48764).Buffer,B=k(35717),A=k(3349),M=new Array(16),l=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],o=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],d=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],f=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],_=[0,1518500249,1859775393,2400959708,2840853838],p=[1352829926,1548603684,1836072691,2053994217,0];function u(){A.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}B(u,A),u.prototype._update=function(){for(var T=M,H=0;H<16;++H)T[H]=this._block.readInt32LE(H*4);for(var W=this._a|0,Y=this._b|0,re=this._c|0,ie=this._d|0,oe=this._e|0,ae=this._a|0,de=this._b|0,te=this._c|0,O=this._d|0,q=this._e|0,x=0;x<80;x+=1){var a,b;x<16?(a=h(W,Y,re,ie,oe,T[l[x]],_[0],d[x]),b=D(ae,de,te,O,q,T[o[x]],p[0],f[x])):x<32?(a=m(W,Y,re,ie,oe,T[l[x]],_[1],d[x]),b=C(ae,de,te,O,q,T[o[x]],p[1],f[x])):x<48?(a=y(W,Y,re,ie,oe,T[l[x]],_[2],d[x]),b=y(ae,de,te,O,q,T[o[x]],p[2],f[x])):x<64?(a=C(W,Y,re,ie,oe,T[l[x]],_[3],d[x]),b=m(ae,de,te,O,q,T[o[x]],p[3],f[x])):(a=D(W,Y,re,ie,oe,T[l[x]],_[4],d[x]),b=h(ae,de,te,O,q,T[o[x]],p[4],f[x])),W=oe,oe=ie,ie=E(re,10),re=Y,Y=a,ae=q,q=O,O=E(te,10),te=de,de=b}var P=this._b+re+O|0;this._b=this._c+ie+q|0,this._c=this._d+oe+ae|0,this._d=this._e+W+de|0,this._e=this._a+Y+te|0,this._a=P},u.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var T=R.alloc?R.alloc(20):new R(20);return T.writeInt32LE(this._a,0),T.writeInt32LE(this._b,4),T.writeInt32LE(this._c,8),T.writeInt32LE(this._d,12),T.writeInt32LE(this._e,16),T};function E(T,H){return T<<H|T>>>32-H}function h(T,H,W,Y,re,ie,oe,ae){return E(T+(H^W^Y)+ie+oe|0,ae)+re|0}function m(T,H,W,Y,re,ie,oe,ae){return E(T+(H&W|~H&Y)+ie+oe|0,ae)+re|0}function y(T,H,W,Y,re,ie,oe,ae){return E(T+((H|~W)^Y)+ie+oe|0,ae)+re|0}function C(T,H,W,Y,re,ie,oe,ae){return E(T+(H&Y|W&~Y)+ie+oe|0,ae)+re|0}function D(T,H,W,Y,re,ie,oe,ae){return E(T+(H^(W|~Y))+ie+oe|0,ae)+re|0}g.exports=u},89509:(g,G,k)=>{/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var R=k(48764),B=R.Buffer;function A(l,o){for(var d in l)o[d]=l[d]}B.from&&B.alloc&&B.allocUnsafe&&B.allocUnsafeSlow?g.exports=R:(A(R,G),G.Buffer=M);function M(l,o,d){return B(l,o,d)}M.prototype=Object.create(B.prototype),A(B,M),M.from=function(l,o,d){if(typeof l=="number")throw new TypeError("Argument must not be a number");return B(l,o,d)},M.alloc=function(l,o,d){if(typeof l!="number")throw new TypeError("Argument must be a number");var f=B(l);return o!==void 0?typeof d=="string"?f.fill(o,d):f.fill(o):f.fill(0),f},M.allocUnsafe=function(l){if(typeof l!="number")throw new TypeError("Argument must be a number");return B(l)},M.allocUnsafeSlow=function(l){if(typeof l!="number")throw new TypeError("Argument must be a number");return R.SlowBuffer(l)}},2399:(g,G,k)=>{"use strict";var R=k(34155),B=k(48764),A=B.Buffer,M={},l;for(l in B)!B.hasOwnProperty(l)||l==="SlowBuffer"||l==="Buffer"||(M[l]=B[l]);var o=M.Buffer={};for(l in A)!A.hasOwnProperty(l)||l==="allocUnsafe"||l==="allocUnsafeSlow"||(o[l]=A[l]);if(M.Buffer.prototype=A.prototype,(!o.from||o.from===Uint8Array.from)&&(o.from=function(d,f,_){if(typeof d=="number")throw new TypeError('The "value" argument must not be of type number. Received type '+typeof d);if(d&&typeof d.length=="undefined")throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof d);return A(d,f,_)}),o.alloc||(o.alloc=function(d,f,_){if(typeof d!="number")throw new TypeError('The "size" argument must be of type number. Received type '+typeof d);if(d<0||d>=2*(1<<30))throw new RangeError('The value "'+d+'" is invalid for option "size"');var p=A(d);return!f||f.length===0?p.fill(0):typeof _=="string"?p.fill(f,_):p.fill(f),p}),!M.kStringMaxLength)try{M.kStringMaxLength=R.binding("buffer").kStringMaxLength}catch(d){}M.constants||(M.constants={MAX_LENGTH:M.kMaxLength},M.kStringMaxLength&&(M.constants.MAX_STRING_LENGTH=M.kStringMaxLength)),g.exports=M},24189:(g,G,k)=>{var R=k(89509).Buffer;function B(A,M){this._block=R.alloc(A),this._finalSize=M,this._blockSize=A,this._len=0}B.prototype.update=function(A,M){typeof A=="string"&&(M=M||"utf8",A=R.from(A,M));for(var l=this._block,o=this._blockSize,d=A.length,f=this._len,_=0;_<d;){for(var p=f%o,u=Math.min(d-_,o-p),E=0;E<u;E++)l[p+E]=A[_+E];f+=u,_+=u,f%o==0&&this._update(l)}return this._len+=d,this},B.prototype.digest=function(A){var M=this._len%this._blockSize;this._block[M]=128,this._block.fill(0,M+1),M>=this._finalSize&&(this._update(this._block),this._block.fill(0));var l=this._len*8;if(l<=4294967295)this._block.writeUInt32BE(l,this._blockSize-4);else{var o=(l&4294967295)>>>0,d=(l-o)/4294967296;this._block.writeUInt32BE(d,this._blockSize-8),this._block.writeUInt32BE(o,this._blockSize-4)}this._update(this._block);var f=this._hash();return A?f.toString(A):f},B.prototype._update=function(){throw new Error("_update must be implemented by subclass")},g.exports=B},89072:(g,G,k)=>{var R=g.exports=function(A){A=A.toLowerCase();var M=R[A];if(!M)throw new Error(A+" is not supported (we accept pull requests)");return new M};R.sha=k(74448),R.sha1=k(18336),R.sha224=k(48432),R.sha256=k(67499),R.sha384=k(51686),R.sha512=k(87816)},74448:(g,G,k)=>{var R=k(35717),B=k(24189),A=k(89509).Buffer,M=[1518500249,1859775393,2400959708|0,3395469782|0],l=new Array(80);function o(){this.init(),this._w=l,B.call(this,64,56)}R(o,B),o.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function d(p){return p<<5|p>>>27}function f(p){return p<<30|p>>>2}function _(p,u,E,h){return p===0?u&E|~u&h:p===2?u&E|u&h|E&h:u^E^h}o.prototype._update=function(p){for(var u=this._w,E=this._a|0,h=this._b|0,m=this._c|0,y=this._d|0,C=this._e|0,D=0;D<16;++D)u[D]=p.readInt32BE(D*4);for(;D<80;++D)u[D]=u[D-3]^u[D-8]^u[D-14]^u[D-16];for(var T=0;T<80;++T){var H=~~(T/20),W=d(E)+_(H,h,m,y)+C+u[T]+M[H]|0;C=y,y=m,m=f(h),h=E,E=W}this._a=E+this._a|0,this._b=h+this._b|0,this._c=m+this._c|0,this._d=y+this._d|0,this._e=C+this._e|0},o.prototype._hash=function(){var p=A.allocUnsafe(20);return p.writeInt32BE(this._a|0,0),p.writeInt32BE(this._b|0,4),p.writeInt32BE(this._c|0,8),p.writeInt32BE(this._d|0,12),p.writeInt32BE(this._e|0,16),p},g.exports=o},18336:(g,G,k)=>{var R=k(35717),B=k(24189),A=k(89509).Buffer,M=[1518500249,1859775393,2400959708|0,3395469782|0],l=new Array(80);function o(){this.init(),this._w=l,B.call(this,64,56)}R(o,B),o.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this};function d(u){return u<<1|u>>>31}function f(u){return u<<5|u>>>27}function _(u){return u<<30|u>>>2}function p(u,E,h,m){return u===0?E&h|~E&m:u===2?E&h|E&m|h&m:E^h^m}o.prototype._update=function(u){for(var E=this._w,h=this._a|0,m=this._b|0,y=this._c|0,C=this._d|0,D=this._e|0,T=0;T<16;++T)E[T]=u.readInt32BE(T*4);for(;T<80;++T)E[T]=d(E[T-3]^E[T-8]^E[T-14]^E[T-16]);for(var H=0;H<80;++H){var W=~~(H/20),Y=f(h)+p(W,m,y,C)+D+E[H]+M[W]|0;D=C,C=y,y=_(m),m=h,h=Y}this._a=h+this._a|0,this._b=m+this._b|0,this._c=y+this._c|0,this._d=C+this._d|0,this._e=D+this._e|0},o.prototype._hash=function(){var u=A.allocUnsafe(20);return u.writeInt32BE(this._a|0,0),u.writeInt32BE(this._b|0,4),u.writeInt32BE(this._c|0,8),u.writeInt32BE(this._d|0,12),u.writeInt32BE(this._e|0,16),u},g.exports=o},48432:(g,G,k)=>{var R=k(35717),B=k(67499),A=k(24189),M=k(89509).Buffer,l=new Array(64);function o(){this.init(),this._w=l,A.call(this,64,56)}R(o,B),o.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},o.prototype._hash=function(){var d=M.allocUnsafe(28);return d.writeInt32BE(this._a,0),d.writeInt32BE(this._b,4),d.writeInt32BE(this._c,8),d.writeInt32BE(this._d,12),d.writeInt32BE(this._e,16),d.writeInt32BE(this._f,20),d.writeInt32BE(this._g,24),d},g.exports=o},67499:(g,G,k)=>{var R=k(35717),B=k(24189),A=k(89509).Buffer,M=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],l=new Array(64);function o(){this.init(),this._w=l,B.call(this,64,56)}R(o,B),o.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this};function d(h,m,y){return y^h&(m^y)}function f(h,m,y){return h&m|y&(h|m)}function _(h){return(h>>>2|h<<30)^(h>>>13|h<<19)^(h>>>22|h<<10)}function p(h){return(h>>>6|h<<26)^(h>>>11|h<<21)^(h>>>25|h<<7)}function u(h){return(h>>>7|h<<25)^(h>>>18|h<<14)^h>>>3}function E(h){return(h>>>17|h<<15)^(h>>>19|h<<13)^h>>>10}o.prototype._update=function(h){for(var m=this._w,y=this._a|0,C=this._b|0,D=this._c|0,T=this._d|0,H=this._e|0,W=this._f|0,Y=this._g|0,re=this._h|0,ie=0;ie<16;++ie)m[ie]=h.readInt32BE(ie*4);for(;ie<64;++ie)m[ie]=E(m[ie-2])+m[ie-7]+u(m[ie-15])+m[ie-16]|0;for(var oe=0;oe<64;++oe){var ae=re+p(H)+d(H,W,Y)+M[oe]+m[oe]|0,de=_(y)+f(y,C,D)|0;re=Y,Y=W,W=H,H=T+ae|0,T=D,D=C,C=y,y=ae+de|0}this._a=y+this._a|0,this._b=C+this._b|0,this._c=D+this._c|0,this._d=T+this._d|0,this._e=H+this._e|0,this._f=W+this._f|0,this._g=Y+this._g|0,this._h=re+this._h|0},o.prototype._hash=function(){var h=A.allocUnsafe(32);return h.writeInt32BE(this._a,0),h.writeInt32BE(this._b,4),h.writeInt32BE(this._c,8),h.writeInt32BE(this._d,12),h.writeInt32BE(this._e,16),h.writeInt32BE(this._f,20),h.writeInt32BE(this._g,24),h.writeInt32BE(this._h,28),h},g.exports=o},51686:(g,G,k)=>{var R=k(35717),B=k(87816),A=k(24189),M=k(89509).Buffer,l=new Array(160);function o(){this.init(),this._w=l,A.call(this,128,112)}R(o,B),o.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},o.prototype._hash=function(){var d=M.allocUnsafe(48);function f(_,p,u){d.writeInt32BE(_,u),d.writeInt32BE(p,u+4)}return f(this._ah,this._al,0),f(this._bh,this._bl,8),f(this._ch,this._cl,16),f(this._dh,this._dl,24),f(this._eh,this._el,32),f(this._fh,this._fl,40),d},g.exports=o},87816:(g,G,k)=>{var R=k(35717),B=k(24189),A=k(89509).Buffer,M=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],l=new Array(160);function o(){this.init(),this._w=l,B.call(this,128,112)}R(o,B),o.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this};function d(C,D,T){return T^C&(D^T)}function f(C,D,T){return C&D|T&(C|D)}function _(C,D){return(C>>>28|D<<4)^(D>>>2|C<<30)^(D>>>7|C<<25)}function p(C,D){return(C>>>14|D<<18)^(C>>>18|D<<14)^(D>>>9|C<<23)}function u(C,D){return(C>>>1|D<<31)^(C>>>8|D<<24)^C>>>7}function E(C,D){return(C>>>1|D<<31)^(C>>>8|D<<24)^(C>>>7|D<<25)}function h(C,D){return(C>>>19|D<<13)^(D>>>29|C<<3)^C>>>6}function m(C,D){return(C>>>19|D<<13)^(D>>>29|C<<3)^(C>>>6|D<<26)}function y(C,D){return C>>>0<D>>>0?1:0}o.prototype._update=function(C){for(var D=this._w,T=this._ah|0,H=this._bh|0,W=this._ch|0,Y=this._dh|0,re=this._eh|0,ie=this._fh|0,oe=this._gh|0,ae=this._hh|0,de=this._al|0,te=this._bl|0,O=this._cl|0,q=this._dl|0,x=this._el|0,a=this._fl|0,b=this._gl|0,P=this._hl|0,F=0;F<32;F+=2)D[F]=C.readInt32BE(F*4),D[F+1]=C.readInt32BE(F*4+4);for(;F<160;F+=2){var L=D[F-15*2],I=D[F-15*2+1],K=u(L,I),z=E(I,L);L=D[F-2*2],I=D[F-2*2+1];var w=h(L,I),j=m(I,L),he=D[F-7*2],_e=D[F-7*2+1],Re=D[F-16*2],Ie=D[F-16*2+1],J=z+_e|0,Z=K+he+y(J,z)|0;J=J+j|0,Z=Z+w+y(J,j)|0,J=J+Ie|0,Z=Z+Re+y(J,Ie)|0,D[F]=Z,D[F+1]=J}for(var fe=0;fe<160;fe+=2){Z=D[fe],J=D[fe+1];var we=f(T,H,W),Ee=f(de,te,O),$=_(T,de),V=_(de,T),le=p(re,x),Se=p(x,re),De=M[fe],pe=M[fe+1],He=d(re,ie,oe),Ve=d(x,a,b),qe=P+Se|0,Ut=ae+le+y(qe,P)|0;qe=qe+Ve|0,Ut=Ut+He+y(qe,Ve)|0,qe=qe+pe|0,Ut=Ut+De+y(qe,pe)|0,qe=qe+J|0,Ut=Ut+Z+y(qe,J)|0;var Ke=V+Ee|0,ze=$+we+y(Ke,V)|0;ae=oe,P=b,oe=ie,b=a,ie=re,a=x,x=q+qe|0,re=Y+Ut+y(x,q)|0,Y=W,q=O,W=H,O=te,H=T,te=de,de=qe+Ke|0,T=Ut+ze+y(de,qe)|0}this._al=this._al+de|0,this._bl=this._bl+te|0,this._cl=this._cl+O|0,this._dl=this._dl+q|0,this._el=this._el+x|0,this._fl=this._fl+a|0,this._gl=this._gl+b|0,this._hl=this._hl+P|0,this._ah=this._ah+T+y(this._al,de)|0,this._bh=this._bh+H+y(this._bl,te)|0,this._ch=this._ch+W+y(this._cl,O)|0,this._dh=this._dh+Y+y(this._dl,q)|0,this._eh=this._eh+re+y(this._el,x)|0,this._fh=this._fh+ie+y(this._fl,a)|0,this._gh=this._gh+oe+y(this._gl,b)|0,this._hh=this._hh+ae+y(this._hl,P)|0},o.prototype._hash=function(){var C=A.allocUnsafe(64);function D(T,H,W){C.writeInt32BE(T,W),C.writeInt32BE(H,W+4)}return D(this._ah,this._al,0),D(this._bh,this._bl,8),D(this._ch,this._cl,16),D(this._dh,this._dl,24),D(this._eh,this._el,32),D(this._fh,this._fl,40),D(this._gh,this._gl,48),D(this._hh,this._hl,56),C},g.exports=o},6200:(g,G,k)=>{"use strict";const R=k(89539),B=k(91003),A=/\s/,M=/\r|\n/,l=/^(Host|Match)$/i,o=1,d=2;function f(p,u){return u.hasOwnProperty(p.param)&&u[p.param]===p.value}class _ extends Array{compute(u){const E={},h=(m,y)=>{m==="IdentityFile"?(E[m]||(E[m]=[])).push(y):E[m]==null&&(E[m]=y)};for(const m of this)m.type===o&&(m.param==="Host"?B(m.value,u)&&(h(m.param,m.value),m.config.filter(y=>y.type===o).forEach(y=>h(y.param,y.value))):m.param==="Match"||h(m.param,m.value));return E}find(u={}){if(typeof u=="function")return super.find(u);if(!(u&&("Host"in u||"Match"in u)))throw new Error("Can only find by Host or Match");return super.find(E=>f(E,u))}remove(u={}){if(!(u&&("Host"in u||"Match"in u)))throw new Error("Can only remove by Host or Match");const E=typeof u=="function"?super.findIndex(u):super.findIndex(h=>f(h,u));if(E>=0)return this.splice(E,1)}toString(){return this.constructor.stringify(this)}append(u){let E=" ";e:for(const y of this)if(l.test(y.param)){for(const C of y.config)if(C.before){E=C.before;break e}}if(this.length>0){let y=this[this.length-1];y.config&&(y=y.config[y.config.length-1]),y.after=`
`}let h=this,m=this;for(const y in u){const C={type:o,param:y,separator:" ",value:u[y],before:"",after:`
`};l.test(y)?(h=m,h.push(C),h=C.config=new _):(C.before=h===m?"":E,h.push(C))}return m}static stringify(u){let E="";const h=(y,C)=>Array.isArray(y)?y.map(D=>h(D,A.test(D))).join(" "):C?`"${y}"`:y,m=y=>{if(E+=y.before,y.type===d)E+=y.content;else if(y.type===o){const C=y.quoted||/IdentityFile/i.test(y.param)&&A.test(y.value),D=h(y.value,C);E+=`${y.param}${y.separator}${D}`}E+=y.after,y.config&&y.config.forEach(m)};return u.forEach(m),E}static get DIRECTIVE(){return o}static get COMMENT(){return d}static parse(u){let E=0,h=C(),m=new _,y=m;function C(){return u[E++]}function D(){let de="";for(;A.test(h);)de+=h,h=C();return de}function T(){let de="";for(;M.test(h);)de+=h,h=C();return de}function H(){let de="";for(;h&&/[^ \t=]/.test(h);)de+=h,h=C();return de}function W(){let de=D();return h==="="&&(de+=h,h=C()),de+D()}function Y(){let de="",te=!1,O=!1;for(;h&&!M.test(h);)O?(de+=h==='"'?h:`\\${h}`,O=!1):h==='"'&&(!de||te)?te=!te:h==="\\"?O=!0:de+=h,h=C();if(te||O)throw new Error(`Unexpected line break at ${de}`);return de.trim()}function re(){const de=d;let te="";for(;h&&!M.test(h);)te+=h,h=C();return{type:de,content:te}}function ie(){const de=[];let te="",O=!1,q=!1;for(;h&&!M.test(h);)q?(te+=h==='"'?h:`\\${h}`,q=!1):h==='"'?O=!O:h==="\\"?q=!0:O?te+=h:/[ \t]/.test(h)?te&&(de.push(te),te=""):te+=h,h=C();if(O||q)throw new Error(`Unexpected line break at ${de.concat(te).join(" ")}`);return de.push(te),de.length>1?de:de[0]}function oe(){const de=o,te=H(),O=te.toLowerCase()=="host",q={type:de,param:te,separator:W(),quoted:!O&&h==='"',value:O?ie():Y()};return q.quoted||delete q.quoted,q}function ae(){const de=D(),te=h==="#"?re():oe(),O=T();return te.before=de,te.after=O,te}for(;h;){let de=ae();de.type===o&&l.test(de.param)?(m=y,m.push(de),m=de.config=new _):m.push(de)}return y}}_.find=R.deprecate((p,u)=>{const E=p.find(u);return E?[E,p.indexOf(E)]:null},"SSHConfig.find() is deprected. Use SSHConfig.prototype.find() instead."),g.exports=_},91003:g=>{"use strict";function G(R,B){return R=R.replace(/\./g,"\\.").replace(/\+/g,"\\+").replace(/\*/g,".*").replace(/\?/g,".?"),new RegExp("^(?:"+R+")$").test(B)}function k(R,B){const A=Array.isArray(R)?R:R.split(/,/);let M=!1;for(const l of A){if(l[0]=="!"&&G(l.slice(1),B))return!1;G(l,B)&&(M=!0)}return M}g.exports=k},42830:(g,G,k)=>{g.exports=A;var R=k(17187).EventEmitter,B=k(35717);B(A,R),A.Readable=k(56577),A.Writable=k(20323),A.Duplex=k(68656),A.Transform=k(94473),A.PassThrough=k(2366),A.finished=k(81086),A.pipeline=k(56472),A.Stream=A;function A(){R.call(this)}A.prototype.pipe=function(M,l){var o=this;function d(m){M.writable&&M.write(m)===!1&&o.pause&&o.pause()}o.on("data",d);function f(){o.readable&&o.resume&&o.resume()}M.on("drain",f),!M._isStdio&&(!l||l.end!==!1)&&(o.on("end",p),o.on("close",u));var _=!1;function p(){_||(_=!0,M.end())}function u(){_||(_=!0,typeof M.destroy=="function"&&M.destroy())}function E(m){if(h(),R.listenerCount(this,"error")===0)throw m}o.on("error",E),M.on("error",E);function h(){o.removeListener("data",d),M.removeListener("drain",f),o.removeListener("end",p),o.removeListener("close",u),o.removeListener("error",E),M.removeListener("error",E),o.removeListener("end",h),o.removeListener("close",h),M.removeListener("close",h)}return o.on("end",h),o.on("close",h),M.on("close",h),M.emit("pipe",o),M}},58106:g=>{"use strict";function G(o,d){o.prototype=Object.create(d.prototype),o.prototype.constructor=o,o.__proto__=d}var k={};function R(o,d,f){f||(f=Error);function _(u,E,h){return typeof d=="string"?d:d(u,E,h)}var p=function(u){G(E,u);function E(h,m,y){return u.call(this,_(h,m,y))||this}return E}(f);p.prototype.name=f.name,p.prototype.code=o,k[o]=p}function B(o,d){if(Array.isArray(o)){var f=o.length;return o=o.map(function(_){return String(_)}),f>2?"one of ".concat(d," ").concat(o.slice(0,f-1).join(", "),", or ")+o[f-1]:f===2?"one of ".concat(d," ").concat(o[0]," or ").concat(o[1]):"of ".concat(d," ").concat(o[0])}else return"of ".concat(d," ").concat(String(o))}function A(o,d,f){return o.substr(!f||f<0?0:+f,d.length)===d}function M(o,d,f){return(f===void 0||f>o.length)&&(f=o.length),o.substring(f-d.length,f)===d}function l(o,d,f){return typeof f!="number"&&(f=0),f+d.length>o.length?!1:o.indexOf(d,f)!==-1}R("ERR_INVALID_OPT_VALUE",function(o,d){return'The value "'+d+'" is invalid for option "'+o+'"'},TypeError),R("ERR_INVALID_ARG_TYPE",function(o,d,f){var _;typeof d=="string"&&A(d,"not ")?(_="must not be",d=d.replace(/^not /,"")):_="must be";var p;if(M(o," argument"))p="The ".concat(o," ").concat(_," ").concat(B(d,"type"));else{var u=l(o,".")?"property":"argument";p='The "'.concat(o,'" ').concat(u," ").concat(_," ").concat(B(d,"type"))}return p+=". Received type ".concat(typeof f),p},TypeError),R("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),R("ERR_METHOD_NOT_IMPLEMENTED",function(o){return"The "+o+" method is not implemented"}),R("ERR_STREAM_PREMATURE_CLOSE","Premature close"),R("ERR_STREAM_DESTROYED",function(o){return"Cannot call "+o+" after a stream was destroyed"}),R("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),R("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),R("ERR_STREAM_WRITE_AFTER_END","write after end"),R("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),R("ERR_UNKNOWN_ENCODING",function(o){return"Unknown encoding: "+o},TypeError),R("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),g.exports.q=k},68656:(g,G,k)=>{"use strict";var R=k(34155),B=Object.keys||function(u){var E=[];for(var h in u)E.push(h);return E};g.exports=f;var A=k(56577),M=k(20323);k(35717)(f,A);for(var l=B(M.prototype),o=0;o<l.length;o++){var d=l[o];f.prototype[d]||(f.prototype[d]=M.prototype[d])}function f(u){if(!(this instanceof f))return new f(u);A.call(this,u),M.call(this,u),this.allowHalfOpen=!0,u&&(u.readable===!1&&(this.readable=!1),u.writable===!1&&(this.writable=!1),u.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",_)))}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(f.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function _(){this._writableState.ended||R.nextTick(p,this)}function p(u){u.end()}Object.defineProperty(f.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(E){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=E,this._writableState.destroyed=E)}})},2366:(g,G,k)=>{"use strict";g.exports=B;var R=k(94473);k(35717)(B,R);function B(A){if(!(this instanceof B))return new B(A);R.call(this,A)}B.prototype._transform=function(A,M,l){l(null,A)}},56577:(g,G,k)=>{"use strict";var R=k(34155);g.exports=O;var B;O.ReadableState=te;var A=k(17187).EventEmitter,M=function(V,le){return V.listeners(le).length},l=k(83194),o=k(48764).Buffer,d=k.g.Uint8Array||function(){};function f($){return o.from($)}function _($){return o.isBuffer($)||$ instanceof d}var p=k(40964),u;p&&p.debuglog?u=p.debuglog("stream"):u=function(){};var E=k(39686),h=k(71029),m=k(30094),y=m.getHighWaterMark,C=k(58106).q,D=C.ERR_INVALID_ARG_TYPE,T=C.ERR_STREAM_PUSH_AFTER_EOF,H=C.ERR_METHOD_NOT_IMPLEMENTED,W=C.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,Y,re,ie;k(35717)(O,l);var oe=h.errorOrDestroy,ae=["error","close","destroy","pause","resume"];function de($,V,le){if(typeof $.prependListener=="function")return $.prependListener(V,le);!$._events||!$._events[V]?$.on(V,le):Array.isArray($._events[V])?$._events[V].unshift(le):$._events[V]=[le,$._events[V]]}function te($,V,le){B=B||k(68656),$=$||{},typeof le!="boolean"&&(le=V instanceof B),this.objectMode=!!$.objectMode,le&&(this.objectMode=this.objectMode||!!$.readableObjectMode),this.highWaterMark=y(this,$,"readableHighWaterMark",le),this.buffer=new E,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=$.emitClose!==!1,this.autoDestroy=!!$.autoDestroy,this.destroyed=!1,this.defaultEncoding=$.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,$.encoding&&(Y||(Y=k(54729).s),this.decoder=new Y($.encoding),this.encoding=$.encoding)}function O($){if(B=B||k(68656),!(this instanceof O))return new O($);var V=this instanceof B;this._readableState=new te($,this,V),this.readable=!0,$&&(typeof $.read=="function"&&(this._read=$.read),typeof $.destroy=="function"&&(this._destroy=$.destroy)),l.call(this)}Object.defineProperty(O.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(V){!this._readableState||(this._readableState.destroyed=V)}}),O.prototype.destroy=h.destroy,O.prototype._undestroy=h.undestroy,O.prototype._destroy=function($,V){V($)},O.prototype.push=function($,V){var le=this._readableState,Se;return le.objectMode?Se=!0:typeof $=="string"&&(V=V||le.defaultEncoding,V!==le.encoding&&($=o.from($,V),V=""),Se=!0),q(this,$,V,!1,Se)},O.prototype.unshift=function($){return q(this,$,null,!0,!1)};function q($,V,le,Se,De){u("readableAddChunk",V);var pe=$._readableState;if(V===null)pe.reading=!1,L($,pe);else{var He;if(De||(He=a(pe,V)),He)oe($,He);else if(pe.objectMode||V&&V.length>0)if(typeof V!="string"&&!pe.objectMode&&Object.getPrototypeOf(V)!==o.prototype&&(V=f(V)),Se)pe.endEmitted?oe($,new W):x($,pe,V,!0);else if(pe.ended)oe($,new T);else{if(pe.destroyed)return!1;pe.reading=!1,pe.decoder&&!le?(V=pe.decoder.write(V),pe.objectMode||V.length!==0?x($,pe,V,!1):z($,pe)):x($,pe,V,!1)}else Se||(pe.reading=!1,z($,pe))}return!pe.ended&&(pe.length<pe.highWaterMark||pe.length===0)}function x($,V,le,Se){V.flowing&&V.length===0&&!V.sync?(V.awaitDrain=0,$.emit("data",le)):(V.length+=V.objectMode?1:le.length,Se?V.buffer.unshift(le):V.buffer.push(le),V.needReadable&&I($)),z($,V)}function a($,V){var le;return!_(V)&&typeof V!="string"&&V!==void 0&&!$.objectMode&&(le=new D("chunk",["string","Buffer","Uint8Array"],V)),le}O.prototype.isPaused=function(){return this._readableState.flowing===!1},O.prototype.setEncoding=function($){Y||(Y=k(54729).s);var V=new Y($);this._readableState.decoder=V,this._readableState.encoding=this._readableState.decoder.encoding;for(var le=this._readableState.buffer.head,Se="";le!==null;)Se+=V.write(le.data),le=le.next;return this._readableState.buffer.clear(),Se!==""&&this._readableState.buffer.push(Se),this._readableState.length=Se.length,this};var b=1073741824;function P($){return $>=b?$=b:($--,$|=$>>>1,$|=$>>>2,$|=$>>>4,$|=$>>>8,$|=$>>>16,$++),$}function F($,V){return $<=0||V.length===0&&V.ended?0:V.objectMode?1:$!==$?V.flowing&&V.length?V.buffer.head.data.length:V.length:($>V.highWaterMark&&(V.highWaterMark=P($)),$<=V.length?$:V.ended?V.length:(V.needReadable=!0,0))}O.prototype.read=function($){u("read",$),$=parseInt($,10);var V=this._readableState,le=$;if($!==0&&(V.emittedReadable=!1),$===0&&V.needReadable&&((V.highWaterMark!==0?V.length>=V.highWaterMark:V.length>0)||V.ended))return u("read: emitReadable",V.length,V.ended),V.length===0&&V.ended?fe(this):I(this),null;if($=F($,V),$===0&&V.ended)return V.length===0&&fe(this),null;var Se=V.needReadable;u("need readable",Se),(V.length===0||V.length-$<V.highWaterMark)&&(Se=!0,u("length less than watermark",Se)),V.ended||V.reading?(Se=!1,u("reading or ended",Se)):Se&&(u("do read"),V.reading=!0,V.sync=!0,V.length===0&&(V.needReadable=!0),this._read(V.highWaterMark),V.sync=!1,V.reading||($=F(le,V)));var De;return $>0?De=Z($,V):De=null,De===null?(V.needReadable=V.length<=V.highWaterMark,$=0):(V.length-=$,V.awaitDrain=0),V.length===0&&(V.ended||(V.needReadable=!0),le!==$&&V.ended&&fe(this)),De!==null&&this.emit("data",De),De};function L($,V){if(u("onEofChunk"),!V.ended){if(V.decoder){var le=V.decoder.end();le&&le.length&&(V.buffer.push(le),V.length+=V.objectMode?1:le.length)}V.ended=!0,V.sync?I($):(V.needReadable=!1,V.emittedReadable||(V.emittedReadable=!0,K($)))}}function I($){var V=$._readableState;u("emitReadable",V.needReadable,V.emittedReadable),V.needReadable=!1,V.emittedReadable||(u("emitReadable",V.flowing),V.emittedReadable=!0,R.nextTick(K,$))}function K($){var V=$._readableState;u("emitReadable_",V.destroyed,V.length,V.ended),!V.destroyed&&(V.length||V.ended)&&($.emit("readable"),V.emittedReadable=!1),V.needReadable=!V.flowing&&!V.ended&&V.length<=V.highWaterMark,J($)}function z($,V){V.readingMore||(V.readingMore=!0,R.nextTick(w,$,V))}function w($,V){for(;!V.reading&&!V.ended&&(V.length<V.highWaterMark||V.flowing&&V.length===0);){var le=V.length;if(u("maybeReadMore read 0"),$.read(0),le===V.length)break}V.readingMore=!1}O.prototype._read=function($){oe(this,new H("_read()"))},O.prototype.pipe=function($,V){var le=this,Se=this._readableState;switch(Se.pipesCount){case 0:Se.pipes=$;break;case 1:Se.pipes=[Se.pipes,$];break;default:Se.pipes.push($);break}Se.pipesCount+=1,u("pipe count=%d opts=%j",Se.pipesCount,V);var De=(!V||V.end!==!1)&&$!==R.stdout&&$!==R.stderr,pe=De?Ve:ee;Se.endEmitted?R.nextTick(pe):le.once("end",pe),$.on("unpipe",He);function He(ue,me){u("onunpipe"),ue===le&&me&&me.hasUnpiped===!1&&(me.hasUnpiped=!0,Ke())}function Ve(){u("onend"),$.end()}var qe=j(le);$.on("drain",qe);var Ut=!1;function Ke(){u("cleanup"),$.removeListener("close",se),$.removeListener("finish",Q),$.removeListener("drain",qe),$.removeListener("error",Gt),$.removeListener("unpipe",He),le.removeListener("end",Ve),le.removeListener("end",ee),le.removeListener("data",ze),Ut=!0,Se.awaitDrain&&(!$._writableState||$._writableState.needDrain)&&qe()}le.on("data",ze);function ze(ue){u("ondata");var me=$.write(ue);u("dest.write",me),me===!1&&((Se.pipesCount===1&&Se.pipes===$||Se.pipesCount>1&&Ee(Se.pipes,$)!==-1)&&!Ut&&(u("false write response, pause",Se.awaitDrain),Se.awaitDrain++),le.pause())}function Gt(ue){u("onerror",ue),ee(),$.removeListener("error",Gt),M($,"error")===0&&oe($,ue)}de($,"error",Gt);function se(){$.removeListener("finish",Q),ee()}$.once("close",se);function Q(){u("onfinish"),$.removeListener("close",se),ee()}$.once("finish",Q);function ee(){u("unpipe"),le.unpipe($)}return $.emit("pipe",le),Se.flowing||(u("pipe resume"),le.resume()),$};function j($){return function(){var le=$._readableState;u("pipeOnDrain",le.awaitDrain),le.awaitDrain&&le.awaitDrain--,le.awaitDrain===0&&M($,"data")&&(le.flowing=!0,J($))}}O.prototype.unpipe=function($){var V=this._readableState,le={hasUnpiped:!1};if(V.pipesCount===0)return this;if(V.pipesCount===1)return $&&$!==V.pipes?this:($||($=V.pipes),V.pipes=null,V.pipesCount=0,V.flowing=!1,$&&$.emit("unpipe",this,le),this);if(!$){var Se=V.pipes,De=V.pipesCount;V.pipes=null,V.pipesCount=0,V.flowing=!1;for(var pe=0;pe<De;pe++)Se[pe].emit("unpipe",this,{hasUnpiped:!1});return this}var He=Ee(V.pipes,$);return He===-1?this:(V.pipes.splice(He,1),V.pipesCount-=1,V.pipesCount===1&&(V.pipes=V.pipes[0]),$.emit("unpipe",this,le),this)},O.prototype.on=function($,V){var le=l.prototype.on.call(this,$,V),Se=this._readableState;return $==="data"?(Se.readableListening=this.listenerCount("readable")>0,Se.flowing!==!1&&this.resume()):$==="readable"&&!Se.endEmitted&&!Se.readableListening&&(Se.readableListening=Se.needReadable=!0,Se.flowing=!1,Se.emittedReadable=!1,u("on readable",Se.length,Se.reading),Se.length?I(this):Se.reading||R.nextTick(_e,this)),le},O.prototype.addListener=O.prototype.on,O.prototype.removeListener=function($,V){var le=l.prototype.removeListener.call(this,$,V);return $==="readable"&&R.nextTick(he,this),le},O.prototype.removeAllListeners=function($){var V=l.prototype.removeAllListeners.apply(this,arguments);return($==="readable"||$===void 0)&&R.nextTick(he,this),V};function he($){var V=$._readableState;V.readableListening=$.listenerCount("readable")>0,V.resumeScheduled&&!V.paused?V.flowing=!0:$.listenerCount("data")>0&&$.resume()}function _e($){u("readable nexttick read 0"),$.read(0)}O.prototype.resume=function(){var $=this._readableState;return $.flowing||(u("resume"),$.flowing=!$.readableListening,Re(this,$)),$.paused=!1,this};function Re($,V){V.resumeScheduled||(V.resumeScheduled=!0,R.nextTick(Ie,$,V))}function Ie($,V){u("resume",V.reading),V.reading||$.read(0),V.resumeScheduled=!1,$.emit("resume"),J($),V.flowing&&!V.reading&&$.read(0)}O.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function J($){var V=$._readableState;for(u("flow",V.flowing);V.flowing&&$.read()!==null;);}O.prototype.wrap=function($){var V=this,le=this._readableState,Se=!1;$.on("end",function(){if(u("wrapped end"),le.decoder&&!le.ended){var He=le.decoder.end();He&&He.length&&V.push(He)}V.push(null)}),$.on("data",function(He){if(u("wrapped data"),le.decoder&&(He=le.decoder.write(He)),!(le.objectMode&&He==null)&&!(!le.objectMode&&(!He||!He.length))){var Ve=V.push(He);Ve||(Se=!0,$.pause())}});for(var De in $)this[De]===void 0&&typeof $[De]=="function"&&(this[De]=function(Ve){return function(){return $[Ve].apply($,arguments)}}(De));for(var pe=0;pe<ae.length;pe++)$.on(ae[pe],this.emit.bind(this,ae[pe]));return this._read=function(He){u("wrapped _read",He),Se&&(Se=!1,$.resume())},this},typeof Symbol=="function"&&(O.prototype[Symbol.asyncIterator]=function(){return re===void 0&&(re=k(20828)),re(this)}),Object.defineProperty(O.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(O.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(O.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(V){this._readableState&&(this._readableState.flowing=V)}}),O._fromList=Z,Object.defineProperty(O.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function Z($,V){if(V.length===0)return null;var le;return V.objectMode?le=V.buffer.shift():!$||$>=V.length?(V.decoder?le=V.buffer.join(""):V.buffer.length===1?le=V.buffer.first():le=V.buffer.concat(V.length),V.buffer.clear()):le=V.buffer.consume($,V.decoder),le}function fe($){var V=$._readableState;u("endReadable",V.endEmitted),V.endEmitted||(V.ended=!0,R.nextTick(we,V,$))}function we($,V){if(u("endReadableNT",$.endEmitted,$.length),!$.endEmitted&&$.length===0&&($.endEmitted=!0,V.readable=!1,V.emit("end"),$.autoDestroy)){var le=V._writableState;(!le||le.autoDestroy&&le.finished)&&V.destroy()}}typeof Symbol=="function"&&(O.from=function($,V){return ie===void 0&&(ie=k(31265)),ie(O,$,V)});function Ee($,V){for(var le=0,Se=$.length;le<Se;le++)if($[le]===V)return le;return-1}},94473:(g,G,k)=>{"use strict";g.exports=f;var R=k(58106).q,B=R.ERR_METHOD_NOT_IMPLEMENTED,A=R.ERR_MULTIPLE_CALLBACK,M=R.ERR_TRANSFORM_ALREADY_TRANSFORMING,l=R.ERR_TRANSFORM_WITH_LENGTH_0,o=k(68656);k(35717)(f,o);function d(u,E){var h=this._transformState;h.transforming=!1;var m=h.writecb;if(m===null)return this.emit("error",new A);h.writechunk=null,h.writecb=null,E!=null&&this.push(E),m(u);var y=this._readableState;y.reading=!1,(y.needReadable||y.length<y.highWaterMark)&&this._read(y.highWaterMark)}function f(u){if(!(this instanceof f))return new f(u);o.call(this,u),this._transformState={afterTransform:d.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,u&&(typeof u.transform=="function"&&(this._transform=u.transform),typeof u.flush=="function"&&(this._flush=u.flush)),this.on("prefinish",_)}function _(){var u=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(E,h){p(u,E,h)}):p(this,null,null)}f.prototype.push=function(u,E){return this._transformState.needTransform=!1,o.prototype.push.call(this,u,E)},f.prototype._transform=function(u,E,h){h(new B("_transform()"))},f.prototype._write=function(u,E,h){var m=this._transformState;if(m.writecb=h,m.writechunk=u,m.writeencoding=E,!m.transforming){var y=this._readableState;(m.needTransform||y.needReadable||y.length<y.highWaterMark)&&this._read(y.highWaterMark)}},f.prototype._read=function(u){var E=this._transformState;E.writechunk!==null&&!E.transforming?(E.transforming=!0,this._transform(E.writechunk,E.writeencoding,E.afterTransform)):E.needTransform=!0},f.prototype._destroy=function(u,E){o.prototype._destroy.call(this,u,function(h){E(h)})};function p(u,E,h){if(E)return u.emit("error",E);if(h!=null&&u.push(h),u._writableState.length)throw new l;if(u._transformState.transforming)throw new M;return u.push(null)}},20323:(g,G,k)=>{"use strict";var R=k(34155);g.exports=te;function B(J,Z,fe){this.chunk=J,this.encoding=Z,this.callback=fe,this.next=null}function A(J){var Z=this;this.next=null,this.entry=null,this.finish=function(){Ie(Z,J)}}var M;te.WritableState=ae;var l={deprecate:k(94927)},o=k(83194),d=k(48764).Buffer,f=k.g.Uint8Array||function(){};function _(J){return d.from(J)}function p(J){return d.isBuffer(J)||J instanceof f}var u=k(71029),E=k(30094),h=E.getHighWaterMark,m=k(58106).q,y=m.ERR_INVALID_ARG_TYPE,C=m.ERR_METHOD_NOT_IMPLEMENTED,D=m.ERR_MULTIPLE_CALLBACK,T=m.ERR_STREAM_CANNOT_PIPE,H=m.ERR_STREAM_DESTROYED,W=m.ERR_STREAM_NULL_VALUES,Y=m.ERR_STREAM_WRITE_AFTER_END,re=m.ERR_UNKNOWN_ENCODING,ie=u.errorOrDestroy;k(35717)(te,o);function oe(){}function ae(J,Z,fe){M=M||k(68656),J=J||{},typeof fe!="boolean"&&(fe=Z instanceof M),this.objectMode=!!J.objectMode,fe&&(this.objectMode=this.objectMode||!!J.writableObjectMode),this.highWaterMark=h(this,J,"writableHighWaterMark",fe),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var we=J.decodeStrings===!1;this.decodeStrings=!we,this.defaultEncoding=J.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Ee){L(Z,Ee)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=J.emitClose!==!1,this.autoDestroy=!!J.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new A(this)}ae.prototype.getBuffer=function(){for(var Z=this.bufferedRequest,fe=[];Z;)fe.push(Z),Z=Z.next;return fe},function(){try{Object.defineProperty(ae.prototype,"buffer",{get:l.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(J){}}();var de;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(de=Function.prototype[Symbol.hasInstance],Object.defineProperty(te,Symbol.hasInstance,{value:function(Z){return de.call(this,Z)?!0:this!==te?!1:Z&&Z._writableState instanceof ae}})):de=function(Z){return Z instanceof this};function te(J){M=M||k(68656);var Z=this instanceof M;if(!Z&&!de.call(te,this))return new te(J);this._writableState=new ae(J,this,Z),this.writable=!0,J&&(typeof J.write=="function"&&(this._write=J.write),typeof J.writev=="function"&&(this._writev=J.writev),typeof J.destroy=="function"&&(this._destroy=J.destroy),typeof J.final=="function"&&(this._final=J.final)),o.call(this)}te.prototype.pipe=function(){ie(this,new T)};function O(J,Z){var fe=new Y;ie(J,fe),R.nextTick(Z,fe)}function q(J,Z,fe,we){var Ee;return fe===null?Ee=new W:typeof fe!="string"&&!Z.objectMode&&(Ee=new y("chunk",["string","Buffer"],fe)),Ee?(ie(J,Ee),R.nextTick(we,Ee),!1):!0}te.prototype.write=function(J,Z,fe){var we=this._writableState,Ee=!1,$=!we.objectMode&&p(J);return $&&!d.isBuffer(J)&&(J=_(J)),typeof Z=="function"&&(fe=Z,Z=null),$?Z="buffer":Z||(Z=we.defaultEncoding),typeof fe!="function"&&(fe=oe),we.ending?O(this,fe):($||q(this,we,J,fe))&&(we.pendingcb++,Ee=a(this,we,$,J,Z,fe)),Ee},te.prototype.cork=function(){this._writableState.corked++},te.prototype.uncork=function(){var J=this._writableState;J.corked&&(J.corked--,!J.writing&&!J.corked&&!J.bufferProcessing&&J.bufferedRequest&&z(this,J))},te.prototype.setDefaultEncoding=function(Z){if(typeof Z=="string"&&(Z=Z.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((Z+"").toLowerCase())>-1))throw new re(Z);return this._writableState.defaultEncoding=Z,this},Object.defineProperty(te.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function x(J,Z,fe){return!J.objectMode&&J.decodeStrings!==!1&&typeof Z=="string"&&(Z=d.from(Z,fe)),Z}Object.defineProperty(te.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function a(J,Z,fe,we,Ee,$){if(!fe){var V=x(Z,we,Ee);we!==V&&(fe=!0,Ee="buffer",we=V)}var le=Z.objectMode?1:we.length;Z.length+=le;var Se=Z.length<Z.highWaterMark;if(Se||(Z.needDrain=!0),Z.writing||Z.corked){var De=Z.lastBufferedRequest;Z.lastBufferedRequest={chunk:we,encoding:Ee,isBuf:fe,callback:$,next:null},De?De.next=Z.lastBufferedRequest:Z.bufferedRequest=Z.lastBufferedRequest,Z.bufferedRequestCount+=1}else b(J,Z,!1,le,we,Ee,$);return Se}function b(J,Z,fe,we,Ee,$,V){Z.writelen=we,Z.writecb=V,Z.writing=!0,Z.sync=!0,Z.destroyed?Z.onwrite(new H("write")):fe?J._writev(Ee,Z.onwrite):J._write(Ee,$,Z.onwrite),Z.sync=!1}function P(J,Z,fe,we,Ee){--Z.pendingcb,fe?(R.nextTick(Ee,we),R.nextTick(_e,J,Z),J._writableState.errorEmitted=!0,ie(J,we)):(Ee(we),J._writableState.errorEmitted=!0,ie(J,we),_e(J,Z))}function F(J){J.writing=!1,J.writecb=null,J.length-=J.writelen,J.writelen=0}function L(J,Z){var fe=J._writableState,we=fe.sync,Ee=fe.writecb;if(typeof Ee!="function")throw new D;if(F(fe),Z)P(J,fe,we,Z,Ee);else{var $=w(fe)||J.destroyed;!$&&!fe.corked&&!fe.bufferProcessing&&fe.bufferedRequest&&z(J,fe),we?R.nextTick(I,J,fe,$,Ee):I(J,fe,$,Ee)}}function I(J,Z,fe,we){fe||K(J,Z),Z.pendingcb--,we(),_e(J,Z)}function K(J,Z){Z.length===0&&Z.needDrain&&(Z.needDrain=!1,J.emit("drain"))}function z(J,Z){Z.bufferProcessing=!0;var fe=Z.bufferedRequest;if(J._writev&&fe&&fe.next){var we=Z.bufferedRequestCount,Ee=new Array(we),$=Z.corkedRequestsFree;$.entry=fe;for(var V=0,le=!0;fe;)Ee[V]=fe,fe.isBuf||(le=!1),fe=fe.next,V+=1;Ee.allBuffers=le,b(J,Z,!0,Z.length,Ee,"",$.finish),Z.pendingcb++,Z.lastBufferedRequest=null,$.next?(Z.corkedRequestsFree=$.next,$.next=null):Z.corkedRequestsFree=new A(Z),Z.bufferedRequestCount=0}else{for(;fe;){var Se=fe.chunk,De=fe.encoding,pe=fe.callback,He=Z.objectMode?1:Se.length;if(b(J,Z,!1,He,Se,De,pe),fe=fe.next,Z.bufferedRequestCount--,Z.writing)break}fe===null&&(Z.lastBufferedRequest=null)}Z.bufferedRequest=fe,Z.bufferProcessing=!1}te.prototype._write=function(J,Z,fe){fe(new C("_write()"))},te.prototype._writev=null,te.prototype.end=function(J,Z,fe){var we=this._writableState;return typeof J=="function"?(fe=J,J=null,Z=null):typeof Z=="function"&&(fe=Z,Z=null),J!=null&&this.write(J,Z),we.corked&&(we.corked=1,this.uncork()),we.ending||Re(this,we,fe),this},Object.defineProperty(te.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function w(J){return J.ending&&J.length===0&&J.bufferedRequest===null&&!J.finished&&!J.writing}function j(J,Z){J._final(function(fe){Z.pendingcb--,fe&&ie(J,fe),Z.prefinished=!0,J.emit("prefinish"),_e(J,Z)})}function he(J,Z){!Z.prefinished&&!Z.finalCalled&&(typeof J._final=="function"&&!Z.destroyed?(Z.pendingcb++,Z.finalCalled=!0,R.nextTick(j,J,Z)):(Z.prefinished=!0,J.emit("prefinish")))}function _e(J,Z){var fe=w(Z);if(fe&&(he(J,Z),Z.pendingcb===0&&(Z.finished=!0,J.emit("finish"),Z.autoDestroy))){var we=J._readableState;(!we||we.autoDestroy&&we.endEmitted)&&J.destroy()}return fe}function Re(J,Z,fe){Z.ending=!0,_e(J,Z),fe&&(Z.finished?R.nextTick(fe):J.once("finish",fe)),Z.ended=!0,J.writable=!1}function Ie(J,Z,fe){var we=J.entry;for(J.entry=null;we;){var Ee=we.callback;Z.pendingcb--,Ee(fe),we=we.next}Z.corkedRequestsFree.next=J}Object.defineProperty(te.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(Z){!this._writableState||(this._writableState.destroyed=Z)}}),te.prototype.destroy=u.destroy,te.prototype._undestroy=u.undestroy,te.prototype._destroy=function(J,Z){Z(J)}},20828:(g,G,k)=>{"use strict";var R=k(34155),B;function A(H,W,Y){return W in H?Object.defineProperty(H,W,{value:Y,enumerable:!0,configurable:!0,writable:!0}):H[W]=Y,H}var M=k(81086),l=Symbol("lastResolve"),o=Symbol("lastReject"),d=Symbol("error"),f=Symbol("ended"),_=Symbol("lastPromise"),p=Symbol("handlePromise"),u=Symbol("stream");function E(H,W){return{value:H,done:W}}function h(H){var W=H[l];if(W!==null){var Y=H[u].read();Y!==null&&(H[_]=null,H[l]=null,H[o]=null,W(E(Y,!1)))}}function m(H){R.nextTick(h,H)}function y(H,W){return function(Y,re){H.then(function(){if(W[f]){Y(E(void 0,!0));return}W[p](Y,re)},re)}}var C=Object.getPrototypeOf(function(){}),D=Object.setPrototypeOf((B={get stream(){return this[u]},next:function(){var W=this,Y=this[d];if(Y!==null)return Promise.reject(Y);if(this[f])return Promise.resolve(E(void 0,!0));if(this[u].destroyed)return new Promise(function(ae,de){R.nextTick(function(){W[d]?de(W[d]):ae(E(void 0,!0))})});var re=this[_],ie;if(re)ie=new Promise(y(re,this));else{var oe=this[u].read();if(oe!==null)return Promise.resolve(E(oe,!1));ie=new Promise(this[p])}return this[_]=ie,ie}},A(B,Symbol.asyncIterator,function(){return this}),A(B,"return",function(){var W=this;return new Promise(function(Y,re){W[u].destroy(null,function(ie){if(ie){re(ie);return}Y(E(void 0,!0))})})}),B),C),T=function(W){var Y,re=Object.create(D,(Y={},A(Y,u,{value:W,writable:!0}),A(Y,l,{value:null,writable:!0}),A(Y,o,{value:null,writable:!0}),A(Y,d,{value:null,writable:!0}),A(Y,f,{value:W._readableState.endEmitted,writable:!0}),A(Y,p,{value:function(oe,ae){var de=re[u].read();de?(re[_]=null,re[l]=null,re[o]=null,oe(E(de,!1))):(re[l]=oe,re[o]=ae)},writable:!0}),Y));return re[_]=null,M(W,function(ie){if(ie&&ie.code!=="ERR_STREAM_PREMATURE_CLOSE"){var oe=re[o];oe!==null&&(re[_]=null,re[l]=null,re[o]=null,oe(ie)),re[d]=ie;return}var ae=re[l];ae!==null&&(re[_]=null,re[l]=null,re[o]=null,ae(E(void 0,!0))),re[f]=!0}),W.on("readable",m.bind(null,re)),re};g.exports=T},39686:(g,G,k)=>{"use strict";function R(h,m){var y=Object.keys(h);if(Object.getOwnPropertySymbols){var C=Object.getOwnPropertySymbols(h);m&&(C=C.filter(function(D){return Object.getOwnPropertyDescriptor(h,D).enumerable})),y.push.apply(y,C)}return y}function B(h){for(var m=1;m<arguments.length;m++){var y=arguments[m]!=null?arguments[m]:{};m%2?R(Object(y),!0).forEach(function(C){A(h,C,y[C])}):Object.getOwnPropertyDescriptors?Object.defineProperties(h,Object.getOwnPropertyDescriptors(y)):R(Object(y)).forEach(function(C){Object.defineProperty(h,C,Object.getOwnPropertyDescriptor(y,C))})}return h}function A(h,m,y){return m in h?Object.defineProperty(h,m,{value:y,enumerable:!0,configurable:!0,writable:!0}):h[m]=y,h}function M(h,m){if(!(h instanceof m))throw new TypeError("Cannot call a class as a function")}function l(h,m){for(var y=0;y<m.length;y++){var C=m[y];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(h,C.key,C)}}function o(h,m,y){return m&&l(h.prototype,m),y&&l(h,y),h}var d=k(48764),f=d.Buffer,_=k(69862),p=_.inspect,u=p&&p.custom||"inspect";function E(h,m,y){f.prototype.copy.call(h,m,y)}g.exports=function(){function h(){M(this,h),this.head=null,this.tail=null,this.length=0}return o(h,[{key:"push",value:function(y){var C={data:y,next:null};this.length>0?this.tail.next=C:this.head=C,this.tail=C,++this.length}},{key:"unshift",value:function(y){var C={data:y,next:this.head};this.length===0&&(this.tail=C),this.head=C,++this.length}},{key:"shift",value:function(){if(this.length!==0){var y=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,y}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(y){if(this.length===0)return"";for(var C=this.head,D=""+C.data;C=C.next;)D+=y+C.data;return D}},{key:"concat",value:function(y){if(this.length===0)return f.alloc(0);for(var C=f.allocUnsafe(y>>>0),D=this.head,T=0;D;)E(D.data,C,T),T+=D.data.length,D=D.next;return C}},{key:"consume",value:function(y,C){var D;return y<this.head.data.length?(D=this.head.data.slice(0,y),this.head.data=this.head.data.slice(y)):y===this.head.data.length?D=this.shift():D=C?this._getString(y):this._getBuffer(y),D}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(y){var C=this.head,D=1,T=C.data;for(y-=T.length;C=C.next;){var H=C.data,W=y>H.length?H.length:y;if(W===H.length?T+=H:T+=H.slice(0,y),y-=W,y===0){W===H.length?(++D,C.next?this.head=C.next:this.head=this.tail=null):(this.head=C,C.data=H.slice(W));break}++D}return this.length-=D,T}},{key:"_getBuffer",value:function(y){var C=f.allocUnsafe(y),D=this.head,T=1;for(D.data.copy(C),y-=D.data.length;D=D.next;){var H=D.data,W=y>H.length?H.length:y;if(H.copy(C,C.length-y,0,W),y-=W,y===0){W===H.length?(++T,D.next?this.head=D.next:this.head=this.tail=null):(this.head=D,D.data=H.slice(W));break}++T}return this.length-=T,C}},{key:u,value:function(y,C){return p(this,B({},C,{depth:0,customInspect:!1}))}}]),h}()},71029:(g,G,k)=>{"use strict";var R=k(34155);function B(f,_){var p=this,u=this._readableState&&this._readableState.destroyed,E=this._writableState&&this._writableState.destroyed;return u||E?(_?_(f):f&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,R.nextTick(o,this,f)):R.nextTick(o,this,f)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(f||null,function(h){!_&&h?p._writableState?p._writableState.errorEmitted?R.nextTick(M,p):(p._writableState.errorEmitted=!0,R.nextTick(A,p,h)):R.nextTick(A,p,h):_?(R.nextTick(M,p),_(h)):R.nextTick(M,p)}),this)}function A(f,_){o(f,_),M(f)}function M(f){f._writableState&&!f._writableState.emitClose||f._readableState&&!f._readableState.emitClose||f.emit("close")}function l(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function o(f,_){f.emit("error",_)}function d(f,_){var p=f._readableState,u=f._writableState;p&&p.autoDestroy||u&&u.autoDestroy?f.destroy(_):f.emit("error",_)}g.exports={destroy:B,undestroy:l,errorOrDestroy:d}},81086:(g,G,k)=>{"use strict";var R=k(58106).q.ERR_STREAM_PREMATURE_CLOSE;function B(o){var d=!1;return function(){if(!d){d=!0;for(var f=arguments.length,_=new Array(f),p=0;p<f;p++)_[p]=arguments[p];o.apply(this,_)}}}function A(){}function M(o){return o.setHeader&&typeof o.abort=="function"}function l(o,d,f){if(typeof d=="function")return l(o,null,d);d||(d={}),f=B(f||A);var _=d.readable||d.readable!==!1&&o.readable,p=d.writable||d.writable!==!1&&o.writable,u=function(){o.writable||h()},E=o._writableState&&o._writableState.finished,h=function(){p=!1,E=!0,_||f.call(o)},m=o._readableState&&o._readableState.endEmitted,y=function(){_=!1,m=!0,p||f.call(o)},C=function(W){f.call(o,W)},D=function(){var W;if(_&&!m)return(!o._readableState||!o._readableState.ended)&&(W=new R),f.call(o,W);if(p&&!E)return(!o._writableState||!o._writableState.ended)&&(W=new R),f.call(o,W)},T=function(){o.req.on("finish",h)};return M(o)?(o.on("complete",h),o.on("abort",D),o.req?T():o.on("request",T)):p&&!o._writableState&&(o.on("end",u),o.on("close",u)),o.on("end",y),o.on("finish",h),d.error!==!1&&o.on("error",C),o.on("close",D),function(){o.removeListener("complete",h),o.removeListener("abort",D),o.removeListener("request",T),o.req&&o.req.removeListener("finish",h),o.removeListener("end",u),o.removeListener("close",u),o.removeListener("finish",h),o.removeListener("end",y),o.removeListener("error",C),o.removeListener("close",D)}}g.exports=l},31265:g=>{g.exports=function(){throw new Error("Readable.from is not available in the browser")}},56472:(g,G,k)=>{"use strict";var R;function B(h){var m=!1;return function(){m||(m=!0,h.apply(void 0,arguments))}}var A=k(58106).q,M=A.ERR_MISSING_ARGS,l=A.ERR_STREAM_DESTROYED;function o(h){if(h)throw h}function d(h){return h.setHeader&&typeof h.abort=="function"}function f(h,m,y,C){C=B(C);var D=!1;h.on("close",function(){D=!0}),R===void 0&&(R=k(81086)),R(h,{readable:m,writable:y},function(H){if(H)return C(H);D=!0,C()});var T=!1;return function(H){if(!D&&!T){if(T=!0,d(h))return h.abort();if(typeof h.destroy=="function")return h.destroy();C(H||new l("pipe"))}}}function _(h){h()}function p(h,m){return h.pipe(m)}function u(h){return!h.length||typeof h[h.length-1]!="function"?o:h.pop()}function E(){for(var h=arguments.length,m=new Array(h),y=0;y<h;y++)m[y]=arguments[y];var C=u(m);if(Array.isArray(m[0])&&(m=m[0]),m.length<2)throw new M("streams");var D,T=m.map(function(H,W){var Y=W<m.length-1,re=W>0;return f(H,Y,re,function(ie){D||(D=ie),ie&&T.forEach(_),!Y&&(T.forEach(_),C(D))})});return m.reduce(p)}g.exports=E},30094:(g,G,k)=>{"use strict";var R=k(58106).q.ERR_INVALID_OPT_VALUE;function B(M,l,o){return M.highWaterMark!=null?M.highWaterMark:l?M[o]:null}function A(M,l,o,d){var f=B(l,d,o);if(f!=null){if(!(isFinite(f)&&Math.floor(f)===f)||f<0){var _=d?o:"highWaterMark";throw new R(_,f)}return Math.floor(f)}return M.objectMode?16:16*1024}g.exports={getHighWaterMark:A}},83194:(g,G,k)=>{g.exports=k(17187).EventEmitter},54729:(g,G,k)=>{"use strict";var R=k(89509).Buffer,B=R.isEncoding||function(T){switch(T=""+T,T&&T.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function A(T){if(!T)return"utf8";for(var H;;)switch(T){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return T;default:if(H)return;T=(""+T).toLowerCase(),H=!0}}function M(T){var H=A(T);if(typeof H!="string"&&(R.isEncoding===B||!B(T)))throw new Error("Unknown encoding: "+T);return H||T}G.s=l;function l(T){this.encoding=M(T);var H;switch(this.encoding){case"utf16le":this.text=E,this.end=h,H=4;break;case"utf8":this.fillLast=_,H=4;break;case"base64":this.text=m,this.end=y,H=3;break;default:this.write=C,this.end=D;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=R.allocUnsafe(H)}l.prototype.write=function(T){if(T.length===0)return"";var H,W;if(this.lastNeed){if(H=this.fillLast(T),H===void 0)return"";W=this.lastNeed,this.lastNeed=0}else W=0;return W<T.length?H?H+this.text(T,W):this.text(T,W):H||""},l.prototype.end=u,l.prototype.text=p,l.prototype.fillLast=function(T){if(this.lastNeed<=T.length)return T.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);T.copy(this.lastChar,this.lastTotal-this.lastNeed,0,T.length),this.lastNeed-=T.length};function o(T){return T<=127?0:T>>5==6?2:T>>4==14?3:T>>3==30?4:T>>6==2?-1:-2}function d(T,H,W){var Y=H.length-1;if(Y<W)return 0;var re=o(H[Y]);return re>=0?(re>0&&(T.lastNeed=re-1),re):--Y<W||re===-2?0:(re=o(H[Y]),re>=0?(re>0&&(T.lastNeed=re-2),re):--Y<W||re===-2?0:(re=o(H[Y]),re>=0?(re>0&&(re===2?re=0:T.lastNeed=re-3),re):0))}function f(T,H,W){if((H[0]&192)!=128)return T.lastNeed=0,"\uFFFD";if(T.lastNeed>1&&H.length>1){if((H[1]&192)!=128)return T.lastNeed=1,"\uFFFD";if(T.lastNeed>2&&H.length>2&&(H[2]&192)!=128)return T.lastNeed=2,"\uFFFD"}}function _(T){var H=this.lastTotal-this.lastNeed,W=f(this,T,H);if(W!==void 0)return W;if(this.lastNeed<=T.length)return T.copy(this.lastChar,H,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);T.copy(this.lastChar,H,0,T.length),this.lastNeed-=T.length}function p(T,H){var W=d(this,T,H);if(!this.lastNeed)return T.toString("utf8",H);this.lastTotal=W;var Y=T.length-(W-this.lastNeed);return T.copy(this.lastChar,0,Y),T.toString("utf8",H,Y)}function u(T){var H=T&&T.length?this.write(T):"";return this.lastNeed?H+"\uFFFD":H}function E(T,H){if((T.length-H)%2==0){var W=T.toString("utf16le",H);if(W){var Y=W.charCodeAt(W.length-1);if(Y>=55296&&Y<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=T[T.length-2],this.lastChar[1]=T[T.length-1],W.slice(0,-1)}return W}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=T[T.length-1],T.toString("utf16le",H,T.length-1)}function h(T){var H=T&&T.length?this.write(T):"";if(this.lastNeed){var W=this.lastTotal-this.lastNeed;return H+this.lastChar.toString("utf16le",0,W)}return H}function m(T,H){var W=(T.length-H)%3;return W===0?T.toString("base64",H):(this.lastNeed=3-W,this.lastTotal=3,W===1?this.lastChar[0]=T[T.length-1]:(this.lastChar[0]=T[T.length-2],this.lastChar[1]=T[T.length-1]),T.toString("base64",H,T.length-W))}function y(T){var H=T&&T.length?this.write(T):"";return this.lastNeed?H+this.lastChar.toString("base64",0,3-this.lastNeed):H}function C(T){return T.toString(this.encoding)}function D(T){return T&&T.length?this.write(T):""}},32553:(g,G,k)=>{"use strict";var R=k(40396).Buffer,B=R.isEncoding||function(T){switch(T=""+T,T&&T.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function A(T){if(!T)return"utf8";for(var H;;)switch(T){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return T;default:if(H)return;T=(""+T).toLowerCase(),H=!0}}function M(T){var H=A(T);if(typeof H!="string"&&(R.isEncoding===B||!B(T)))throw new Error("Unknown encoding: "+T);return H||T}G.s=l;function l(T){this.encoding=M(T);var H;switch(this.encoding){case"utf16le":this.text=E,this.end=h,H=4;break;case"utf8":this.fillLast=_,H=4;break;case"base64":this.text=m,this.end=y,H=3;break;default:this.write=C,this.end=D;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=R.allocUnsafe(H)}l.prototype.write=function(T){if(T.length===0)return"";var H,W;if(this.lastNeed){if(H=this.fillLast(T),H===void 0)return"";W=this.lastNeed,this.lastNeed=0}else W=0;return W<T.length?H?H+this.text(T,W):this.text(T,W):H||""},l.prototype.end=u,l.prototype.text=p,l.prototype.fillLast=function(T){if(this.lastNeed<=T.length)return T.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);T.copy(this.lastChar,this.lastTotal-this.lastNeed,0,T.length),this.lastNeed-=T.length};function o(T){return T<=127?0:T>>5==6?2:T>>4==14?3:T>>3==30?4:T>>6==2?-1:-2}function d(T,H,W){var Y=H.length-1;if(Y<W)return 0;var re=o(H[Y]);return re>=0?(re>0&&(T.lastNeed=re-1),re):--Y<W||re===-2?0:(re=o(H[Y]),re>=0?(re>0&&(T.lastNeed=re-2),re):--Y<W||re===-2?0:(re=o(H[Y]),re>=0?(re>0&&(re===2?re=0:T.lastNeed=re-3),re):0))}function f(T,H,W){if((H[0]&192)!=128)return T.lastNeed=0,"\uFFFD";if(T.lastNeed>1&&H.length>1){if((H[1]&192)!=128)return T.lastNeed=1,"\uFFFD";if(T.lastNeed>2&&H.length>2&&(H[2]&192)!=128)return T.lastNeed=2,"\uFFFD"}}function _(T){var H=this.lastTotal-this.lastNeed,W=f(this,T,H);if(W!==void 0)return W;if(this.lastNeed<=T.length)return T.copy(this.lastChar,H,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);T.copy(this.lastChar,H,0,T.length),this.lastNeed-=T.length}function p(T,H){var W=d(this,T,H);if(!this.lastNeed)return T.toString("utf8",H);this.lastTotal=W;var Y=T.length-(W-this.lastNeed);return T.copy(this.lastChar,0,Y),T.toString("utf8",H,Y)}function u(T){var H=T&&T.length?this.write(T):"";return this.lastNeed?H+"\uFFFD":H}function E(T,H){if((T.length-H)%2==0){var W=T.toString("utf16le",H);if(W){var Y=W.charCodeAt(W.length-1);if(Y>=55296&&Y<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=T[T.length-2],this.lastChar[1]=T[T.length-1],W.slice(0,-1)}return W}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=T[T.length-1],T.toString("utf16le",H,T.length-1)}function h(T){var H=T&&T.length?this.write(T):"";if(this.lastNeed){var W=this.lastTotal-this.lastNeed;return H+this.lastChar.toString("utf16le",0,W)}return H}function m(T,H){var W=(T.length-H)%3;return W===0?T.toString("base64",H):(this.lastNeed=3-W,this.lastTotal=3,W===1?this.lastChar[0]=T[T.length-1]:(this.lastChar[0]=T[T.length-2],this.lastChar[1]=T[T.length-1]),T.toString("base64",H,T.length-W))}function y(T){var H=T&&T.length?this.write(T):"";return this.lastNeed?H+this.lastChar.toString("base64",0,3-this.lastNeed):H}function C(T){return T.toString(this.encoding)}function D(T){return T&&T.length?this.write(T):""}},40396:(g,G,k)=>{var R=k(48764),B=R.Buffer;function A(l,o){for(var d in l)o[d]=l[d]}B.from&&B.alloc&&B.allocUnsafe&&B.allocUnsafeSlow?g.exports=R:(A(R,G),G.Buffer=M);function M(l,o,d){return B(l,o,d)}A(B,M),M.from=function(l,o,d){if(typeof l=="number")throw new TypeError("Argument must not be a number");return B(l,o,d)},M.alloc=function(l,o,d){if(typeof l!="number")throw new TypeError("Argument must be a number");var f=B(l);return o!==void 0?typeof d=="string"?f.fill(o,d):f.fill(o):f.fill(0),f},M.allocUnsafe=function(l){if(typeof l!="number")throw new TypeError("Argument must be a number");return B(l)},M.allocUnsafeSlow=function(l){if(typeof l!="number")throw new TypeError("Argument must be a number");return R.SlowBuffer(l)}},67121:(g,G,k)=>{"use strict";k.d(G,{Z:()=>M});function R(l){var o,d=l.Symbol;return typeof d=="function"?d.observable?o=d.observable:(o=d("observable"),d.observable=o):o="@@observable",o}g=k.hmd(g);var B;typeof self!="undefined"?B=self:typeof window!="undefined"?B=window:typeof k.g!="undefined"?B=k.g:B=g;var A=R(B);const M=A},14802:(g,G,k)=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});var R=k(26363);G.ExperimentationService=R.ExperimentationService},26363:(g,G,k)=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});const R=k(34067),B=k(44234),A=k(15975);class M extends A.ExperimentationServiceAutoPolling{constructor(o){super(o.telemetry,o.filterProviders||[],o.refetchInterval!=null?o.refetchInterval:0,o.featuresTelemetryPropertyName,o.assignmentContextTelemetryPropertyName,o.telemetryEventName,o.storageKey,o.keyValueStorage);this.options=o,this.invokeInit()}init(){this.featureProviders=[],this.addFeatureProvider(new R.TasApiFeatureProvider(new B.AxiosHttpClient(this.options.endpoint),this.telemetry,this.filterProviders)),super.init()}}G.ExperimentationService=M,M.REFRESH_RATE_IN_MINUTES=30},15975:(g,G,k)=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});const R=k(77987),B=k(73334);class A extends R.ExperimentationServiceBase{constructor(l,o,d,f,_,p,u,E){super(l,f,_,p,u,E);if(this.telemetry=l,this.filterProviders=o,this.refreshRateMs=d,this.featuresTelemetryPropertyName=f,this.assignmentContextTelemetryPropertyName=_,this.telemetryEventName=p,this.storageKey=u,this.storage=E,d<1e3&&d!==0)throw new Error("The minimum refresh rate for polling is 1000 ms (1 second). If you wish to deactivate this auto-polling use value of 0.");d>0&&(this.pollingService=new B.PollingService(d),this.pollingService.OnPollTick(async()=>{await super.getFeaturesAsync()}))}init(){this.pollingService?this.pollingService.StartPolling(!0):super.getFeaturesAsync()}async getFeaturesAsync(l=!1){if(this.pollingService){this.pollingService.StopPolling();let o=await super.getFeaturesAsync(l);return this.pollingService.StartPolling(),o}else return await super.getFeaturesAsync(l)}}G.ExperimentationServiceAutoPolling=A},77987:(g,G,k)=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});const R=k(17002);class B{constructor(M,l,o,d,f,_){this.telemetry=M,this.featuresTelemetryPropertyName=l,this.assignmentContextTelemetryPropertyName=o,this.telemetryEventName=d,this.storageKey=f,this.storage=_,this.featuresConsumed=!1,this.initializePromise=this.loadCachePromise,this.cachedTelemetryEvents=[],this._features={features:[],assignmentContext:"",configs:[]},this.storageKey||(this.storageKey="ABExp.Features"),this.storage||(_=new R.MemoryKeyValueStorage),this.loadCachePromise=this.loadCachedFeatureData()}get features(){return this._features}set features(M){this._features=M,this.telemetry&&(this.telemetry.setSharedProperty(this.featuresTelemetryPropertyName,this.features.features.join(";")),this.telemetry.setSharedProperty(this.assignmentContextTelemetryPropertyName,this.features.assignmentContext))}async getFeaturesAsync(M=!1){if(this.fetchPromise!=null)return await this.fetchPromise,this.features;if(!this.featureProviders||this.featureProviders.length===0)return Promise.resolve({features:[],assignmentContext:"",configs:[]});this.fetchPromise=Promise.all(this.featureProviders.map(async o=>await o.getFeatures()));let l=await this.fetchPromise;return this.fetchPromise=void 0,this.updateFeatures(l,M),this.features}updateFeatures(M,l=!1){let o={features:[],assignmentContext:"",configs:[]};for(let d of M){for(let f of d.features)o.features.includes(f)||o.features.push(f);for(let f of d.configs){const _=o.configs.find(p=>p.Id===f.Id);_?_.Parameters=Object.assign(Object.assign({},_.Parameters),f.Parameters):o.configs.push(f)}o.assignmentContext+=d.assignmentContext}(l||!this.featuresConsumed)&&(this.features=o),this.storage&&this.storage.setValue(this.storageKey,o)}async loadCachedFeatureData(){let M;this.storage&&(M=await this.storage.getValue(this.storageKey),M!==void 0&&M.configs===void 0&&(M.configs=[])),this.features.features.length===0&&(this.features=M||{features:[],assignmentContext:"",configs:[]})}isFlightEnabled(M){return this.featuresConsumed=!0,this.PostEventToTelemetry(M),this.features.features.includes(M)}async isCachedFlightEnabled(M){return await this.loadCachePromise,this.featuresConsumed=!0,this.PostEventToTelemetry(M),this.features.features.includes(M)}async isFlightEnabledAsync(M){const l=await this.getFeaturesAsync(!0);return this.featuresConsumed=!0,this.PostEventToTelemetry(M),l.features.includes(M)}getTreatmentVariable(M,l){var o;return this.featuresConsumed=!0,this.PostEventToTelemetry(`${M}.${l}`),(o=this.features.configs.find(f=>f.Id===M))===null||o===void 0?void 0:o.Parameters[l]}async getTreatmentVariableAsync(M,l){return await this.getFeaturesAsync(!0),this.getTreatmentVariable(M,l)}PostEventToTelemetry(M){this.cachedTelemetryEvents.includes(M)||(this.telemetry.postEvent(this.telemetryEventName,new Map([["ABExp.queriedFeature",M]])),this.cachedTelemetryEvents.push(M))}invokeInit(){this.init()}addFeatureProvider(...M){if(!(M==null||this.featureProviders==null))for(let l of M)this.featureProviders.push(l)}}G.ExperimentationServiceBase=B},60069:(g,G)=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});class k{constructor(B){this.telemetry=B,this.isFetching=!1}async getFeatures(){if(this.isFetching&&this.fetchPromise)return this.fetchPromise;this.fetchPromise=this.fetch();let B=await this.fetchPromise;return this.isFetching=!1,this.fetchPromise=void 0,B}}G.BaseFeatureProvider=k},94e3:(g,G,k)=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});const R=k(60069);class B extends R.BaseFeatureProvider{constructor(M,l){super(M);this.telemetry=M,this.filterProviders=l,this.cachedTelemetryEvents=[]}getFilters(){let M=new Map;for(let l of this.filterProviders){let o=l.getFilters();for(let d of o.keys()){let f=o.get(d);M.set(d,f)}}return M}PostEventToTelemetry(M){if(this.cachedTelemetryEvents.includes(M))return;const l=JSON.stringify(M);this.telemetry.postEvent("report-headers",new Map([["ABExp.headers",l]])),this.cachedTelemetryEvents.push(M)}}G.FilteredFeatureProvider=B},34067:(g,G,k)=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});const R=k(94e3);class B extends R.FilteredFeatureProvider{constructor(M,l,o){super(l,o);this.httpClient=M,this.telemetry=l,this.filterProviders=o}async fetch(){let M=this.getFilters(),l={};for(let p of M.keys()){const u=M.get(p);l[p]=u}let o=await this.httpClient.get({headers:l});M.keys.length>0&&this.PostEventToTelemetry(l);let d=o.data,f=d.Configs,_=[];for(let p of f)if(!!p.Parameters)for(let u of Object.keys(p.Parameters)){const E=u+(p.Parameters[u]?"":"cf");_.includes(E)||_.push(E)}return{features:_,assignmentContext:d.AssignmentContext,configs:f}}}G.TasApiFeatureProvider=B},44234:(g,G,k)=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});const R=k(9669);class B{constructor(M){this.endpoint=M}get(M){return R.default.get(this.endpoint,Object.assign(Object.assign({},M),{proxy:!1}))}}G.AxiosHttpClient=B},17002:(g,G)=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});class k{constructor(){this.storage=new Map}async getValue(B,A){return this.storage.has(B)?await Promise.resolve(this.storage.get(B)):await Promise.resolve(A||void 0)}setValue(B,A){this.storage.set(B,A)}}G.MemoryKeyValueStorage=k},73334:(g,G)=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});class k{constructor(B){this.fetchInterval=B}StopPolling(){clearInterval(this.intervalHandle),this.intervalHandle=void 0}OnPollTick(B){this.onTick=B}StartPolling(B=!1){this.intervalHandle&&this.StopPolling(),this.onTick!=null&&(B&&this.onTick().then(()=>{}).catch(()=>{}),this.intervalHandle=setInterval(async()=>{await this.onTick()},this.fetchInterval),this.intervalHandle.unref&&this.intervalHandle.unref())}}G.PollingService=k},94927:(g,G,k)=>{g.exports=R;function R(A,M){if(B("noDeprecation"))return A;var l=!1;function o(){if(!l){if(B("throwDeprecation"))throw new Error(M);B("traceDeprecation")?console.trace(M):console.warn(M),l=!0}return A.apply(this,arguments)}return o}function B(A){try{if(!k.g.localStorage)return!1}catch(l){return!1}var M=k.g.localStorage[A];return M==null?!1:String(M).toLowerCase()==="true"}},20384:g=>{g.exports=function(k){return k&&typeof k=="object"&&typeof k.copy=="function"&&typeof k.fill=="function"&&typeof k.readUInt8=="function"}},55955:(g,G,k)=>{"use strict";var R=k(82584),B=k(48662),A=k(86430),M=k(85692);function l(pe){return pe.call.bind(pe)}var o=typeof BigInt!="undefined",d=typeof Symbol!="undefined",f=l(Object.prototype.toString),_=l(Number.prototype.valueOf),p=l(String.prototype.valueOf),u=l(Boolean.prototype.valueOf);if(o)var E=l(BigInt.prototype.valueOf);if(d)var h=l(Symbol.prototype.valueOf);function m(pe,He){if(typeof pe!="object")return!1;try{return He(pe),!0}catch(Ve){return!1}}G.isArgumentsObject=R,G.isGeneratorFunction=B,G.isTypedArray=M;function y(pe){return typeof Promise!="undefined"&&pe instanceof Promise||pe!==null&&typeof pe=="object"&&typeof pe.then=="function"&&typeof pe.catch=="function"}G.isPromise=y;function C(pe){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?ArrayBuffer.isView(pe):M(pe)||w(pe)}G.isArrayBufferView=C;function D(pe){return A(pe)==="Uint8Array"}G.isUint8Array=D;function T(pe){return A(pe)==="Uint8ClampedArray"}G.isUint8ClampedArray=T;function H(pe){return A(pe)==="Uint16Array"}G.isUint16Array=H;function W(pe){return A(pe)==="Uint32Array"}G.isUint32Array=W;function Y(pe){return A(pe)==="Int8Array"}G.isInt8Array=Y;function re(pe){return A(pe)==="Int16Array"}G.isInt16Array=re;function ie(pe){return A(pe)==="Int32Array"}G.isInt32Array=ie;function oe(pe){return A(pe)==="Float32Array"}G.isFloat32Array=oe;function ae(pe){return A(pe)==="Float64Array"}G.isFloat64Array=ae;function de(pe){return A(pe)==="BigInt64Array"}G.isBigInt64Array=de;function te(pe){return A(pe)==="BigUint64Array"}G.isBigUint64Array=te;function O(pe){return f(pe)==="[object Map]"}O.working=typeof Map!="undefined"&&O(new Map);function q(pe){return typeof Map=="undefined"?!1:O.working?O(pe):pe instanceof Map}G.isMap=q;function x(pe){return f(pe)==="[object Set]"}x.working=typeof Set!="undefined"&&x(new Set);function a(pe){return typeof Set=="undefined"?!1:x.working?x(pe):pe instanceof Set}G.isSet=a;function b(pe){return f(pe)==="[object WeakMap]"}b.working=typeof WeakMap!="undefined"&&b(new WeakMap);function P(pe){return typeof WeakMap=="undefined"?!1:b.working?b(pe):pe instanceof WeakMap}G.isWeakMap=P;function F(pe){return f(pe)==="[object WeakSet]"}F.working=typeof WeakSet!="undefined"&&F(new WeakSet);function L(pe){return F(pe)}G.isWeakSet=L;function I(pe){return f(pe)==="[object ArrayBuffer]"}I.working=typeof ArrayBuffer!="undefined"&&I(new ArrayBuffer);function K(pe){return typeof ArrayBuffer=="undefined"?!1:I.working?I(pe):pe instanceof ArrayBuffer}G.isArrayBuffer=K;function z(pe){return f(pe)==="[object DataView]"}z.working=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"&&z(new DataView(new ArrayBuffer(1),0,1));function w(pe){return typeof DataView=="undefined"?!1:z.working?z(pe):pe instanceof DataView}G.isDataView=w;var j=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:void 0;function he(pe){return f(pe)==="[object SharedArrayBuffer]"}function _e(pe){return typeof j=="undefined"?!1:(typeof he.working=="undefined"&&(he.working=he(new j)),he.working?he(pe):pe instanceof j)}G.isSharedArrayBuffer=_e;function Re(pe){return f(pe)==="[object AsyncFunction]"}G.isAsyncFunction=Re;function Ie(pe){return f(pe)==="[object Map Iterator]"}G.isMapIterator=Ie;function J(pe){return f(pe)==="[object Set Iterator]"}G.isSetIterator=J;function Z(pe){return f(pe)==="[object Generator]"}G.isGeneratorObject=Z;function fe(pe){return f(pe)==="[object WebAssembly.Module]"}G.isWebAssemblyCompiledModule=fe;function we(pe){return m(pe,_)}G.isNumberObject=we;function Ee(pe){return m(pe,p)}G.isStringObject=Ee;function $(pe){return m(pe,u)}G.isBooleanObject=$;function V(pe){return o&&m(pe,E)}G.isBigIntObject=V;function le(pe){return d&&m(pe,h)}G.isSymbolObject=le;function Se(pe){return we(pe)||Ee(pe)||$(pe)||V(pe)||le(pe)}G.isBoxedPrimitive=Se;function De(pe){return typeof Uint8Array!="undefined"&&(K(pe)||_e(pe))}G.isAnyArrayBuffer=De,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(pe){Object.defineProperty(G,pe,{enumerable:!1,value:function(){throw new Error(pe+" is not supported in userland")}})})},89539:(g,G,k)=>{var R=k(34155),B=Object.getOwnPropertyDescriptors||function(j){for(var he=Object.keys(j),_e={},Re=0;Re<he.length;Re++)_e[he[Re]]=Object.getOwnPropertyDescriptor(j,he[Re]);return _e},A=/%[sdj%]/g;G.format=function(w){if(!re(w)){for(var j=[],he=0;he<arguments.length;he++)j.push(d(arguments[he]));return j.join(" ")}for(var he=1,_e=arguments,Re=_e.length,Ie=String(w).replace(A,function(Z){if(Z==="%%")return"%";if(he>=Re)return Z;switch(Z){case"%s":return String(_e[he++]);case"%d":return Number(_e[he++]);case"%j":try{return JSON.stringify(_e[he++])}catch(fe){return"[Circular]"}default:return Z}}),J=_e[he];he<Re;J=_e[++he])H(J)||!de(J)?Ie+=" "+J:Ie+=" "+d(J);return Ie},G.deprecate=function(w,j){if(typeof R!="undefined"&&R.noDeprecation===!0)return w;if(typeof R=="undefined")return function(){return G.deprecate(w,j).apply(this,arguments)};var he=!1;function _e(){if(!he){if(R.throwDeprecation)throw new Error(j);R.traceDeprecation?console.trace(j):console.error(j),he=!0}return w.apply(this,arguments)}return _e};var M={},l=/^$/;if(R.env.NODE_DEBUG){var o=R.env.NODE_DEBUG;o=o.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),l=new RegExp("^"+o+"$","i")}G.debuglog=function(w){if(w=w.toUpperCase(),!M[w])if(l.test(w)){var j=R.pid;M[w]=function(){var he=G.format.apply(G,arguments);console.error("%s %d: %s",w,j,he)}}else M[w]=function(){};return M[w]};function d(w,j){var he={seen:[],stylize:_};return arguments.length>=3&&(he.depth=arguments[2]),arguments.length>=4&&(he.colors=arguments[3]),T(j)?he.showHidden=j:j&&G._extend(he,j),oe(he.showHidden)&&(he.showHidden=!1),oe(he.depth)&&(he.depth=2),oe(he.colors)&&(he.colors=!1),oe(he.customInspect)&&(he.customInspect=!0),he.colors&&(he.stylize=f),u(he,w,he.depth)}G.inspect=d,d.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},d.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function f(w,j){var he=d.styles[j];return he?"["+d.colors[he][0]+"m"+w+"["+d.colors[he][1]+"m":w}function _(w,j){return w}function p(w){var j={};return w.forEach(function(he,_e){j[he]=!0}),j}function u(w,j,he){if(w.customInspect&&j&&q(j.inspect)&&j.inspect!==G.inspect&&!(j.constructor&&j.constructor.prototype===j)){var _e=j.inspect(he,w);return re(_e)||(_e=u(w,_e,he)),_e}var Re=E(w,j);if(Re)return Re;var Ie=Object.keys(j),J=p(Ie);if(w.showHidden&&(Ie=Object.getOwnPropertyNames(j)),O(j)&&(Ie.indexOf("message")>=0||Ie.indexOf("description")>=0))return h(j);if(Ie.length===0){if(q(j)){var Z=j.name?": "+j.name:"";return w.stylize("[Function"+Z+"]","special")}if(ae(j))return w.stylize(RegExp.prototype.toString.call(j),"regexp");if(te(j))return w.stylize(Date.prototype.toString.call(j),"date");if(O(j))return h(j)}var fe="",we=!1,Ee=["{","}"];if(D(j)&&(we=!0,Ee=["[","]"]),q(j)){var $=j.name?": "+j.name:"";fe=" [Function"+$+"]"}if(ae(j)&&(fe=" "+RegExp.prototype.toString.call(j)),te(j)&&(fe=" "+Date.prototype.toUTCString.call(j)),O(j)&&(fe=" "+h(j)),Ie.length===0&&(!we||j.length==0))return Ee[0]+fe+Ee[1];if(he<0)return ae(j)?w.stylize(RegExp.prototype.toString.call(j),"regexp"):w.stylize("[Object]","special");w.seen.push(j);var V;return we?V=m(w,j,he,J,Ie):V=Ie.map(function(le){return y(w,j,he,J,le,we)}),w.seen.pop(),C(V,fe,Ee)}function E(w,j){if(oe(j))return w.stylize("undefined","undefined");if(re(j)){var he="'"+JSON.stringify(j).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return w.stylize(he,"string")}if(Y(j))return w.stylize(""+j,"number");if(T(j))return w.stylize(""+j,"boolean");if(H(j))return w.stylize("null","null")}function h(w){return"["+Error.prototype.toString.call(w)+"]"}function m(w,j,he,_e,Re){for(var Ie=[],J=0,Z=j.length;J<Z;++J)L(j,String(J))?Ie.push(y(w,j,he,_e,String(J),!0)):Ie.push("");return Re.forEach(function(fe){fe.match(/^\d+$/)||Ie.push(y(w,j,he,_e,fe,!0))}),Ie}function y(w,j,he,_e,Re,Ie){var J,Z,fe;if(fe=Object.getOwnPropertyDescriptor(j,Re)||{value:j[Re]},fe.get?fe.set?Z=w.stylize("[Getter/Setter]","special"):Z=w.stylize("[Getter]","special"):fe.set&&(Z=w.stylize("[Setter]","special")),L(_e,Re)||(J="["+Re+"]"),Z||(w.seen.indexOf(fe.value)<0?(H(he)?Z=u(w,fe.value,null):Z=u(w,fe.value,he-1),Z.indexOf(`
`)>-1&&(Ie?Z=Z.split(`
`).map(function(we){return" "+we}).join(`
`).substr(2):Z=`
`+Z.split(`
`).map(function(we){return" "+we}).join(`
`))):Z=w.stylize("[Circular]","special")),oe(J)){if(Ie&&Re.match(/^\d+$/))return Z;J=JSON.stringify(""+Re),J.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(J=J.substr(1,J.length-2),J=w.stylize(J,"name")):(J=J.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),J=w.stylize(J,"string"))}return J+": "+Z}function C(w,j,he){var _e=0,Re=w.reduce(function(Ie,J){return _e++,J.indexOf(`
`)>=0&&_e++,Ie+J.replace(/\u001b\[\d\d?m/g,"").length+1},0);return Re>60?he[0]+(j===""?"":j+`
`)+" "+w.join(`,
`)+" "+he[1]:he[0]+j+" "+w.join(", ")+" "+he[1]}G.types=k(55955);function D(w){return Array.isArray(w)}G.isArray=D;function T(w){return typeof w=="boolean"}G.isBoolean=T;function H(w){return w===null}G.isNull=H;function W(w){return w==null}G.isNullOrUndefined=W;function Y(w){return typeof w=="number"}G.isNumber=Y;function re(w){return typeof w=="string"}G.isString=re;function ie(w){return typeof w=="symbol"}G.isSymbol=ie;function oe(w){return w===void 0}G.isUndefined=oe;function ae(w){return de(w)&&a(w)==="[object RegExp]"}G.isRegExp=ae,G.types.isRegExp=ae;function de(w){return typeof w=="object"&&w!==null}G.isObject=de;function te(w){return de(w)&&a(w)==="[object Date]"}G.isDate=te,G.types.isDate=te;function O(w){return de(w)&&(a(w)==="[object Error]"||w instanceof Error)}G.isError=O,G.types.isNativeError=O;function q(w){return typeof w=="function"}G.isFunction=q;function x(w){return w===null||typeof w=="boolean"||typeof w=="number"||typeof w=="string"||typeof w=="symbol"||typeof w=="undefined"}G.isPrimitive=x,G.isBuffer=k(20384);function a(w){return Object.prototype.toString.call(w)}function b(w){return w<10?"0"+w.toString(10):w.toString(10)}var P=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function F(){var w=new Date,j=[b(w.getHours()),b(w.getMinutes()),b(w.getSeconds())].join(":");return[w.getDate(),P[w.getMonth()],j].join(" ")}G.log=function(){console.log("%s - %s",F(),G.format.apply(G,arguments))},G.inherits=k(35717),G._extend=function(w,j){if(!j||!de(j))return w;for(var he=Object.keys(j),_e=he.length;_e--;)w[he[_e]]=j[he[_e]];return w};function L(w,j){return Object.prototype.hasOwnProperty.call(w,j)}var I=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;G.promisify=function(j){if(typeof j!="function")throw new TypeError('The "original" argument must be of type Function');if(I&&j[I]){var he=j[I];if(typeof he!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(he,I,{value:he,enumerable:!1,writable:!1,configurable:!0}),he}function he(){for(var _e,Re,Ie=new Promise(function(fe,we){_e=fe,Re=we}),J=[],Z=0;Z<arguments.length;Z++)J.push(arguments[Z]);J.push(function(fe,we){fe?Re(fe):_e(we)});try{j.apply(this,J)}catch(fe){Re(fe)}return Ie}return Object.setPrototypeOf(he,Object.getPrototypeOf(j)),I&&Object.defineProperty(he,I,{value:he,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(he,B(j))},G.promisify.custom=I;function K(w,j){if(!w){var he=new Error("Promise was rejected with a falsy value");he.reason=w,w=he}return j(w)}function z(w){if(typeof w!="function")throw new TypeError('The "original" argument must be of type Function');function j(){for(var he=[],_e=0;_e<arguments.length;_e++)he.push(arguments[_e]);var Re=he.pop();if(typeof Re!="function")throw new TypeError("The last argument must be of type Function");var Ie=this,J=function(){return Re.apply(Ie,arguments)};w.apply(this,he).then(function(Z){R.nextTick(J.bind(null,null,Z))},function(Z){R.nextTick(K.bind(null,Z,J))})}return Object.setPrototypeOf(j,Object.getPrototypeOf(w)),Object.defineProperties(j,B(w)),j}G.callbackify=z},59035:(g,G,k)=>{"use strict";var R;R={value:!0};var B=k(15654);G.X7=B.getExperimentationService,R=B.getExperimentationServiceAsync;var A=k(22560);G.aU=A.TargetPopulation},55708:(g,G)=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});class k{constructor(B){this.mementoGlobalStorage=B}async getValue(B,A){return await this.mementoGlobalStorage.get(B)||A}setValue(B,A){this.mementoGlobalStorage.update(B,A)}}G.MementoKeyValueStorage=k},22560:(g,G,k)=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});const R=k(89496);class B{constructor(o,d,f){this.extensionName=o,this.extensionVersion=d,this.targetPopulation=f}static trimVersionSuffix(o){const d=/\-[a-zA-Z0-9]+$/;return o.split(d)[0]}getFilterValue(o){switch(o){case A.ApplicationVersion:return B.trimVersionSuffix(R.version);case A.Build:return R.env.appName;case A.ClientId:return R.env.machineId;case A.ExtensionName:return this.extensionName;case A.ExtensionVersion:return B.trimVersionSuffix(this.extensionVersion);case A.Language:return R.env.language;case A.TargetPopulation:return this.targetPopulation;default:return""}}getFilters(){let o=new Map,d=Object.values(A);for(let f of d)o.set(f,this.getFilterValue(f));return o}}G.VSCodeFilterProvider=B;var A;(function(l){l.Market="X-MSEdge-Market",l.CorpNet="X-FD-Corpnet",l.ApplicationVersion="X-VSCode-AppVersion",l.Build="X-VSCode-Build",l.ClientId="X-MSEdge-ClientId",l.ExtensionName="X-VSCode-ExtensionName",l.ExtensionVersion="X-VSCode-ExtensionVersion",l.Language="X-VSCode-Language",l.TargetPopulation="X-VSCode-TargetPopulation"})(A=G.Filters||(G.Filters={}));var M;(function(l){l.Team="team",l.Internal="internal",l.Insiders="insider",l.Public="public"})(M=G.TargetPopulation||(G.TargetPopulation={}))},15654:(g,G,k)=>{"use strict";Object.defineProperty(G,"__esModule",{value:!0});const R=k(22560),B=k(14802),A=k(55708),M="https://default.exp-tas.com/vscode/ab",l="query-expfeature",o="VSCode.ABExp.Features",d="abexp.assignmentcontext",f="VSCode.ABExp.FeatureData",_=1e3*60*30;function p(E,h,m,y,C,...D){if(!C)throw new Error("Memento storage was not provided.");const H=[new R.VSCodeFilterProvider(E,h,m),...D],W=new A.MementoKeyValueStorage(C);return new B.ExperimentationService({filterProviders:H,telemetry:y,storageKey:f,keyValueStorage:W,featuresTelemetryPropertyName:o,assignmentContextTelemetryPropertyName:d,telemetryEventName:l,endpoint:M,refetchInterval:_})}G.getExperimentationService=p;async function u(E,h,m,y,C,...D){const T=p(E,h,m,y,C,...D);return await T.initializePromise,T}G.getExperimentationServiceAsync=u},86430:(g,G,k)=>{"use strict";var R=k(49804),B=k(63083),A=k(21924),M=A("Object.prototype.toString"),l=k(41405)(),o=l&&typeof Symbol.toStringTag=="symbol",d=B(),f=A("String.prototype.slice"),_={},p=k(94079),u=Object.getPrototypeOf;o&&p&&u&&R(d,function(m){if(typeof k.g[m]=="function"){var y=new k.g[m];if(!(Symbol.toStringTag in y))throw new EvalError("this engine has support for Symbol.toStringTag, but "+m+" does not have the property! Please report this.");var C=u(y),D=p(C,Symbol.toStringTag);if(!D){var T=u(C);D=p(T,Symbol.toStringTag)}_[m]=D.get}});var E=function(y){var C=!1;return R(_,function(D,T){if(!C)try{var H=D.call(y);H===T&&(C=H)}catch(W){}}),C},h=k(85692);g.exports=function(y){return h(y)?o?E(y):f(M(y),8,-1):!1}},52479:g=>{g.exports=G;function G(k,R){if(k&&R)return G(k)(R);if(typeof k!="function")throw new TypeError("need wrapper function");return Object.keys(k).forEach(function(A){B[A]=k[A]}),B;function B(){for(var A=new Array(arguments.length),M=0;M<A.length;M++)A[M]=arguments[M];var l=k.apply(this,A),o=A[A.length-1];return typeof l=="function"&&l!==o&&Object.keys(o).forEach(function(d){l[d]=o[d]}),l}}},49602:g=>{"use strict";g.exports=function(G){G.prototype[Symbol.iterator]=function*(){for(let k=this.head;k;k=k.next)yield k.value}}},34411:(g,G,k)=>{"use strict";g.exports=R,R.Node=l,R.create=R;function R(o){var d=this;if(d instanceof R||(d=new R),d.tail=null,d.head=null,d.length=0,o&&typeof o.forEach=="function")o.forEach(function(p){d.push(p)});else if(arguments.length>0)for(var f=0,_=arguments.length;f<_;f++)d.push(arguments[f]);return d}R.prototype.removeNode=function(o){if(o.list!==this)throw new Error("removing node which does not belong to this list");var d=o.next,f=o.prev;return d&&(d.prev=f),f&&(f.next=d),o===this.head&&(this.head=d),o===this.tail&&(this.tail=f),o.list.length--,o.next=null,o.prev=null,o.list=null,d},R.prototype.unshiftNode=function(o){if(o!==this.head){o.list&&o.list.removeNode(o);var d=this.head;o.list=this,o.next=d,d&&(d.prev=o),this.head=o,this.tail||(this.tail=o),this.length++}},R.prototype.pushNode=function(o){if(o!==this.tail){o.list&&o.list.removeNode(o);var d=this.tail;o.list=this,o.prev=d,d&&(d.next=o),this.tail=o,this.head||(this.head=o),this.length++}},R.prototype.push=function(){for(var o=0,d=arguments.length;o<d;o++)A(this,arguments[o]);return this.length},R.prototype.unshift=function(){for(var o=0,d=arguments.length;o<d;o++)M(this,arguments[o]);return this.length},R.prototype.pop=function(){if(!!this.tail){var o=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,o}},R.prototype.shift=function(){if(!!this.head){var o=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,o}},R.prototype.forEach=function(o,d){d=d||this;for(var f=this.head,_=0;f!==null;_++)o.call(d,f.value,_,this),f=f.next},R.prototype.forEachReverse=function(o,d){d=d||this;for(var f=this.tail,_=this.length-1;f!==null;_--)o.call(d,f.value,_,this),f=f.prev},R.prototype.get=function(o){for(var d=0,f=this.head;f!==null&&d<o;d++)f=f.next;if(d===o&&f!==null)return f.value},R.prototype.getReverse=function(o){for(var d=0,f=this.tail;f!==null&&d<o;d++)f=f.prev;if(d===o&&f!==null)return f.value},R.prototype.map=function(o,d){d=d||this;for(var f=new R,_=this.head;_!==null;)f.push(o.call(d,_.value,this)),_=_.next;return f},R.prototype.mapReverse=function(o,d){d=d||this;for(var f=new R,_=this.tail;_!==null;)f.push(o.call(d,_.value,this)),_=_.prev;return f},R.prototype.reduce=function(o,d){var f,_=this.head;if(arguments.length>1)f=d;else if(this.head)_=this.head.next,f=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var p=0;_!==null;p++)f=o(f,_.value,p),_=_.next;return f},R.prototype.reduceReverse=function(o,d){var f,_=this.tail;if(arguments.length>1)f=d;else if(this.tail)_=this.tail.prev,f=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var p=this.length-1;_!==null;p--)f=o(f,_.value,p),_=_.prev;return f},R.prototype.toArray=function(){for(var o=new Array(this.length),d=0,f=this.head;f!==null;d++)o[d]=f.value,f=f.next;return o},R.prototype.toArrayReverse=function(){for(var o=new Array(this.length),d=0,f=this.tail;f!==null;d++)o[d]=f.value,f=f.prev;return o},R.prototype.slice=function(o,d){d=d||this.length,d<0&&(d+=this.length),o=o||0,o<0&&(o+=this.length);var f=new R;if(d<o||d<0)return f;o<0&&(o=0),d>this.length&&(d=this.length);for(var _=0,p=this.head;p!==null&&_<o;_++)p=p.next;for(;p!==null&&_<d;_++,p=p.next)f.push(p.value);return f},R.prototype.sliceReverse=function(o,d){d=d||this.length,d<0&&(d+=this.length),o=o||0,o<0&&(o+=this.length);var f=new R;if(d<o||d<0)return f;o<0&&(o=0),d>this.length&&(d=this.length);for(var _=this.length,p=this.tail;p!==null&&_>d;_--)p=p.prev;for(;p!==null&&_>o;_--,p=p.prev)f.push(p.value);return f},R.prototype.splice=function(o,d,...f){o>this.length&&(o=this.length-1),o<0&&(o=this.length+o);for(var _=0,p=this.head;p!==null&&_<o;_++)p=p.next;for(var u=[],_=0;p&&_<d;_++)u.push(p.value),p=this.removeNode(p);p===null&&(p=this.tail),p!==this.head&&p!==this.tail&&(p=p.prev);for(var _=0;_<f.length;_++)p=B(this,p,f[_]);return u},R.prototype.reverse=function(){for(var o=this.head,d=this.tail,f=o;f!==null;f=f.prev){var _=f.prev;f.prev=f.next,f.next=_}return this.head=d,this.tail=o,this};function B(o,d,f){var _=d===o.head?new l(f,null,d,o):new l(f,d,d.next,o);return _.next===null&&(o.tail=_),_.prev===null&&(o.head=_),o.length++,_}function A(o,d){o.tail=new l(d,o.tail,null,o),o.head||(o.head=o.tail),o.length++}function M(o,d){o.head=new l(d,null,o.head,o),o.tail||(o.tail=o.head),o.length++}function l(o,d,f,_){if(!(this instanceof l))return new l(o,d,f,_);this.list=_,this.value=o,d?(d.next=this,this.prev=d):this.prev=null,f?(f.prev=this,this.next=f):this.next=null}try{k(49602)(R)}catch(o){}},49329:(g,G,k)=>{g.exports=k(60516).Observable},60516:(g,G)=>{"use strict";var k;k={value:!0},G.Observable=void 0;function R(ie,oe){if(!(ie instanceof oe))throw new TypeError("Cannot call a class as a function")}function B(ie,oe){for(var ae=0;ae<oe.length;ae++){var de=oe[ae];de.enumerable=de.enumerable||!1,de.configurable=!0,"value"in de&&(de.writable=!0),Object.defineProperty(ie,de.key,de)}}function A(ie,oe,ae){return oe&&B(ie.prototype,oe),ae&&B(ie,ae),ie}var M=function(){return typeof Symbol=="function"},l=function(ie){return M()&&Boolean(Symbol[ie])},o=function(ie){return l(ie)?Symbol[ie]:"@@"+ie};M()&&!l("observable")&&(Symbol.observable=Symbol("observable"));var d=o("iterator"),f=o("observable"),_=o("species");function p(ie,oe){var ae=ie[oe];if(ae!=null){if(typeof ae!="function")throw new TypeError(ae+" is not a function");return ae}}function u(ie){var oe=ie.constructor;return oe!==void 0&&(oe=oe[_],oe===null&&(oe=void 0)),oe!==void 0?oe:re}function E(ie){return ie instanceof re}function h(ie){h.log?h.log(ie):setTimeout(function(){throw ie})}function m(ie){Promise.resolve().then(function(){try{ie()}catch(oe){h(oe)}})}function y(ie){var oe=ie._cleanup;if(oe!==void 0&&(ie._cleanup=void 0,!!oe))try{if(typeof oe=="function")oe();else{var ae=p(oe,"unsubscribe");ae&&ae.call(oe)}}catch(de){h(de)}}function C(ie){ie._observer=void 0,ie._queue=void 0,ie._state="closed"}function D(ie){var oe=ie._queue;if(!!oe){ie._queue=void 0,ie._state="ready";for(var ae=0;ae<oe.length&&(T(ie,oe[ae].type,oe[ae].value),ie._state!=="closed");++ae);}}function T(ie,oe,ae){ie._state="running";var de=ie._observer;try{var te=p(de,oe);switch(oe){case"next":te&&te.call(de,ae);break;case"error":if(C(ie),te)te.call(de,ae);else throw ae;break;case"complete":C(ie),te&&te.call(de);break}}catch(O){h(O)}ie._state==="closed"?y(ie):ie._state==="running"&&(ie._state="ready")}function H(ie,oe,ae){if(ie._state!=="closed"){if(ie._state==="buffering"){ie._queue.push({type:oe,value:ae});return}if(ie._state!=="ready"){ie._state="buffering",ie._queue=[{type:oe,value:ae}],m(function(){return D(ie)});return}T(ie,oe,ae)}}var W=function(){function ie(oe,ae){R(this,ie),this._cleanup=void 0,this._observer=oe,this._queue=void 0,this._state="initializing";var de=new Y(this);try{this._cleanup=ae.call(void 0,de)}catch(te){de.error(te)}this._state==="initializing"&&(this._state="ready")}return A(ie,[{key:"unsubscribe",value:function(){this._state!=="closed"&&(C(this),y(this))}},{key:"closed",get:function(){return this._state==="closed"}}]),ie}(),Y=function(){function ie(oe){R(this,ie),this._subscription=oe}return A(ie,[{key:"next",value:function(ae){H(this._subscription,"next",ae)}},{key:"error",value:function(ae){H(this._subscription,"error",ae)}},{key:"complete",value:function(){H(this._subscription,"complete")}},{key:"closed",get:function(){return this._subscription._state==="closed"}}]),ie}(),re=function(){function ie(oe){if(R(this,ie),!(this instanceof ie))throw new TypeError("Observable cannot be called as a function");if(typeof oe!="function")throw new TypeError("Observable initializer must be a function");this._subscriber=oe}return A(ie,[{key:"subscribe",value:function(ae){return(typeof ae!="object"||ae===null)&&(ae={next:ae,error:arguments[1],complete:arguments[2]}),new W(ae,this._subscriber)}},{key:"forEach",value:function(ae){var de=this;return new Promise(function(te,O){if(typeof ae!="function"){O(new TypeError(ae+" is not a function"));return}function q(){x.unsubscribe(),te()}var x=de.subscribe({next:function(a){try{ae(a,q)}catch(b){O(b),x.unsubscribe()}},error:O,complete:te})})}},{key:"map",value:function(ae){var de=this;if(typeof ae!="function")throw new TypeError(ae+" is not a function");var te=u(this);return new te(function(O){return de.subscribe({next:function(q){try{q=ae(q)}catch(x){return O.error(x)}O.next(q)},error:function(q){O.error(q)},complete:function(){O.complete()}})})}},{key:"filter",value:function(ae){var de=this;if(typeof ae!="function")throw new TypeError(ae+" is not a function");var te=u(this);return new te(function(O){return de.subscribe({next:function(q){try{if(!ae(q))return}catch(x){return O.error(x)}O.next(q)},error:function(q){O.error(q)},complete:function(){O.complete()}})})}},{key:"reduce",value:function(ae){var de=this;if(typeof ae!="function")throw new TypeError(ae+" is not a function");var te=u(this),O=arguments.length>1,q=!1,x=arguments[1],a=x;return new te(function(b){return de.subscribe({next:function(P){var F=!q;if(q=!0,!F||O)try{a=ae(a,P)}catch(L){return b.error(L)}else a=P},error:function(P){b.error(P)},complete:function(){if(!q&&!O)return b.error(new TypeError("Cannot reduce an empty sequence"));b.next(a),b.complete()}})})}},{key:"concat",value:function(){for(var ae=this,de=arguments.length,te=new Array(de),O=0;O<de;O++)te[O]=arguments[O];var q=u(this);return new q(function(x){var a,b=0;function P(F){a=F.subscribe({next:function(L){x.next(L)},error:function(L){x.error(L)},complete:function(){b===te.length?(a=void 0,x.complete()):P(q.from(te[b++]))}})}return P(ae),function(){a&&(a.unsubscribe(),a=void 0)}})}},{key:"flatMap",value:function(ae){var de=this;if(typeof ae!="function")throw new TypeError(ae+" is not a function");var te=u(this);return new te(function(O){var q=[],x=de.subscribe({next:function(b){if(ae)try{b=ae(b)}catch(F){return O.error(F)}var P=te.from(b).subscribe({next:function(F){O.next(F)},error:function(F){O.error(F)},complete:function(){var F=q.indexOf(P);F>=0&&q.splice(F,1),a()}});q.push(P)},error:function(b){O.error(b)},complete:function(){a()}});function a(){x.closed&&q.length===0&&O.complete()}return function(){q.forEach(function(b){return b.unsubscribe()}),x.unsubscribe()}})}},{key:f,value:function(){return this}}],[{key:"from",value:function(ae){var de=typeof this=="function"?this:ie;if(ae==null)throw new TypeError(ae+" is not an object");var te=p(ae,f);if(te){var O=te.call(ae);if(Object(O)!==O)throw new TypeError(O+" is not an object");return E(O)&&O.constructor===de?O:new de(function(q){return O.subscribe(q)})}if(l("iterator")&&(te=p(ae,d),te))return new de(function(q){m(function(){if(!q.closed){var x=!0,a=!1,b=void 0;try{for(var P=te.call(ae)[Symbol.iterator](),F;!(x=(F=P.next()).done);x=!0){var L=F.value;if(q.next(L),q.closed)return}}catch(I){a=!0,b=I}finally{try{!x&&P.return!=null&&P.return()}finally{if(a)throw b}}q.complete()}})});if(Array.isArray(ae))return new de(function(q){m(function(){if(!q.closed){for(var x=0;x<ae.length;++x)if(q.next(ae[x]),q.closed)return;q.complete()}})});throw new TypeError(ae+" is not observable")}},{key:"of",value:function(){for(var ae=arguments.length,de=new Array(ae),te=0;te<ae;te++)de[te]=arguments[te];var O=typeof this=="function"?this:ie;return new O(function(q){m(function(){if(!q.closed){for(var x=0;x<de.length;++x)if(q.next(de[x]),q.closed)return;q.complete()}})})}},{key:_,get:function(){return this}}]),ie}();G.Observable=re,M()&&Object.defineProperty(re,Symbol("extensions"),{value:{symbol:f,hostReportError:h},configurable:!0})},89496:g=>{"use strict";g.exports=require("vscode")},46601:()=>{},89214:()=>{},71922:()=>{},2363:()=>{},96419:()=>{},56353:()=>{},69386:()=>{},31616:()=>{},69862:()=>{},40964:()=>{},61336:()=>{},63083:(g,G,k)=>{"use strict";var R=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"];g.exports=function(){for(var A=[],M=0;M<R.length;M++)typeof k.g[R[M]]=="function"&&(A[A.length]=R[M]);return A}},88593:g=>{"use strict";g.exports=JSON.parse('{"name":"axios","version":"0.21.4","description":"Promise based HTTP client for the browser and node.js","main":"index.js","scripts":{"test":"grunt test","start":"node ./sandbox/server.js","build":"NODE_ENV=production grunt build","preversion":"npm test","version":"npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json","postversion":"git push && git push --tags","examples":"node ./examples/server.js","coveralls":"cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js","fix":"eslint --fix lib/**/*.js"},"repository":{"type":"git","url":"https://github.com/axios/axios.git"},"keywords":["xhr","http","ajax","promise","node"],"author":"Matt Zabriskie","license":"MIT","bugs":{"url":"https://github.com/axios/axios/issues"},"homepage":"https://axios-http.com","devDependencies":{"coveralls":"^3.0.0","es6-promise":"^4.2.4","grunt":"^1.3.0","grunt-banner":"^0.6.0","grunt-cli":"^1.2.0","grunt-contrib-clean":"^1.1.0","grunt-contrib-watch":"^1.0.0","grunt-eslint":"^23.0.0","grunt-karma":"^4.0.0","grunt-mocha-test":"^0.13.3","grunt-ts":"^6.0.0-beta.19","grunt-webpack":"^4.0.2","istanbul-instrumenter-loader":"^1.0.0","jasmine-core":"^2.4.1","karma":"^6.3.2","karma-chrome-launcher":"^3.1.0","karma-firefox-launcher":"^2.1.0","karma-jasmine":"^1.1.1","karma-jasmine-ajax":"^0.1.13","karma-safari-launcher":"^1.0.0","karma-sauce-launcher":"^4.3.6","karma-sinon":"^1.0.5","karma-sourcemap-loader":"^0.3.8","karma-webpack":"^4.0.2","load-grunt-tasks":"^3.5.2","minimist":"^1.2.0","mocha":"^8.2.1","sinon":"^4.5.0","terser-webpack-plugin":"^4.2.3","typescript":"^4.0.5","url-search-params":"^0.10.0","webpack":"^4.44.2","webpack-dev-server":"^3.11.0"},"browser":{"./lib/adapters/http.js":"./lib/adapters/xhr.js"},"jsdelivr":"dist/axios.min.js","unpkg":"dist/axios.min.js","typings":"./index.d.ts","dependencies":{"follow-redirects":"^1.14.0"},"bundlesize":[{"path":"./dist/axios.min.js","threshold":"5kB"}]}')},44946:g=>{"use strict";g.exports=JSON.parse('{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}')},75207:g=>{"use strict";g.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')},1308:g=>{"use strict";g.exports=JSON.parse('{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}')},29799:g=>{"use strict";g.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},18597:g=>{"use strict";g.exports={i8:"6.5.4"}},22562:g=>{"use strict";g.exports=JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}')}},zd={};function St(g){var G=zd[g];if(G!==void 0)return G.exports;var k=zd[g]={id:g,loaded:!1,exports:{}};return t0[g].call(k.exports,k,k.exports,St),k.loaded=!0,k.exports}(()=>{St.n=g=>{var G=g&&g.__esModule?()=>g.default:()=>g;return St.d(G,{a:G}),G}})(),(()=>{St.d=(g,G)=>{for(var k in G)St.o(G,k)&&!St.o(g,k)&&Object.defineProperty(g,k,{enumerable:!0,get:G[k]})}})(),(()=>{St.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch(g){if(typeof window=="object")return window}}()})(),(()=>{St.hmd=g=>(g=Object.create(g),g.children||(g.children=[]),Object.defineProperty(g,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+g.id)}}),g)})(),(()=>{St.o=(g,G)=>Object.prototype.hasOwnProperty.call(g,G)})(),(()=>{St.r=g=>{typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(g,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(g,"__esModule",{value:!0})}})(),(()=>{St.nmd=g=>(g.paths=[],g.children||(g.children=[]),g)})();var Ul={};(()=>{"use strict";St.r(Ul),St.d(Ul,{activate:()=>dE,deactivate:()=>hE});var g=St(89496),G=Object.defineProperty,k=Object.getOwnPropertySymbols,R=Object.prototype.hasOwnProperty,B=Object.prototype.propertyIsEnumerable,A=(r,e,t)=>e in r?G(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,M=(r,e)=>{for(var t in e||(e={}))R.call(e,t)&&A(r,t,e[t]);if(k)for(var t of k(e))B.call(e,t)&&A(r,t,e[t]);return r},l=r=>G(r,"__esModule",{value:!0}),o=(r,e)=>()=>(r&&(e=r(r=0)),e),d=(r,e)=>{l(r);for(var t in e)G(r,t,{get:e[t],enumerable:!0})},f=(r,e,t)=>new Promise((i,n)=>{var s=S=>{try{v(t.next(S))}catch(N){n(N)}},c=S=>{try{v(t.throw(S))}catch(N){n(N)}},v=S=>S.done?i(S.value):Promise.resolve(S.value).then(s,c);v((t=t.apply(r,e)).next())}),_,p=o(()=>{_={Unknown:0,NonRetryableStatus:1,InvalidEvent:2,SizeLimitExceeded:3,KillSwitch:4,QueueFull:5}}),u,E,h,m,y,C,D,T,H,W,Y,re=o(()=>{u="function",E="object",h="undefined",m="prototype",y="hasOwnProperty",C=Object,D=C[m],T=C.assign,H=C.create,W=C.defineProperty,Y=D[y]});function ie(){return typeof globalThis!==h&&globalThis?globalThis:typeof self!==h&&self?self:typeof window!==h&&window?window:typeof St.g!==h&&St.g?St.g:null}function oe(r){throw new TypeError(r)}function ae(r){var e=H;if(e)return e(r);if(r==null)return{};var t=typeof r;t!==E&&t!==u&&oe("Object prototype may only be an Object:"+r);function i(){}return i[m]=r,new i}var de=o(()=>{re()});function te(r,e){typeof e!==u&&e!==null&&oe("Class extends value "+String(e)+" is not a constructor or null"),b(r,e);function t(){this.constructor=r}r[m]=e===null?ae(e):(t[m]=e[m],new t)}var O,q,x,a,b,P=o(()=>{re(),de(),O=(ie()||{}).Symbol,q=(ie()||{}).Reflect,x=function(r){for(var e,t=1,i=arguments.length;t<i;t++){e=arguments[t];for(var n in e)D[y].call(e,n)&&(r[n]=e[n])}return r},a=T||x,b=function(r,e){return b=C.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)i[y](n)&&(t[n]=i[n])},b(r,e)}}),F=o(()=>{}),L=o(()=>{re(),de(),P(),F()});function I(r,e){return r&&ue[Se].hasOwnProperty.call(r,e)}function K(r){return r&&(r===ue[Se]||r===Array[Se])}function z(r){return K(r)||r===Function[Se]}function w(r){if(r){if(me)return me(r);var e=r[se]||r[Se]||(r[le]?r[le][Se]:null);if(e)return e}return null}function j(r,e){var t=[],i=ue.getOwnPropertyNames;if(i)t=i(r);else for(var n in r)typeof n=="string"&&I(r,n)&&t.push(n);if(t&&t.length>0)for(var s=0;s<t.length;s++)e(t[s])}function he(r,e,t){return e!==le&&typeof r[e]===De&&(t||I(r,e))}function _e(r){throw new TypeError("DynamicProto: "+r)}function Re(r){var e={};return j(r,function(t){!e[t]&&he(r,t,!1)&&(e[t]=r[t])}),e}function Ie(r,e){for(var t=r.length-1;t>=0;t--)if(r[t]===e)return!0;return!1}function J(r,e,t,i){function n(S,N,U){var X=N[U];if(X[He]&&i){var ne=S[pe]||{};ne[Ke]!==!1&&(X=(ne[N[Ve]]||{})[U]||X)}return function(){return X.apply(S,arguments)}}var s={};j(t,function(S){s[S]=n(e,t,S)});for(var c=w(r),v=[];c&&!z(c)&&!Ie(v,c);)j(c,function(S){!s[S]&&he(c,S,!me)&&(s[S]=n(e,c,S))}),v.push(c),c=w(c);return s}function Z(r,e,t,i){var n=null;if(r&&I(t,Ve)){var s=r[pe]||{};if(n=(s[t[Ve]]||{})[e],n||_e("Missing ["+e+"] "+De),!n[Ut]&&s[Ke]!==!1){for(var c=!I(r,e),v=w(r),S=[];c&&v&&!z(v)&&!Ie(S,v);){var N=v[e];if(N){c=N===i;break}S.push(v),v=w(v)}try{c&&(r[e]=n),n[Ut]=1}catch(U){s[Ke]=!1}}}return n}function fe(r,e,t){var i=e[r];return i===t&&(i=w(e)[r]),typeof i!==De&&_e("["+r+"] is not a "+De),i}function we(r,e,t,i,n){function s(S,N){var U=function(){var X=Z(this,N,S,U)||fe(N,S,U);return X.apply(this,arguments)};return U[He]=1,U}if(!K(r)){var c=t[pe]=t[pe]||{},v=c[e]=c[e]||{};c[Ke]!==!1&&(c[Ke]=!!n),j(t,function(S){he(t,S,!1)&&t[S]!==i[S]&&(v[S]=t[S],delete t[S],(!I(r,S)||r[S]&&!r[S][He])&&(r[S]=s(r,S)))})}}function Ee(r,e){if(me)for(var t=[],i=w(e);i&&!z(i)&&!Ie(t,i);){if(i===r)return!0;t.push(i),i=w(i)}return!1}function $(r,e){return I(r,Se)?r.name||e||Gt:((r||{})[le]||{}).name||e||Gt}function V(r,e,t,i){I(r,Se)||_e("theClass is an invalid class definition.");var n=r[Se];Ee(n,e)||_e("["+$(r)+"] is not in class hierarchy of ["+$(e)+"]");var s=null;I(n,Ve)?s=n[Ve]:(s=qe+$(r,"_")+"$"+Ae,Ae++,n[Ve]=s);var c=V[ze],v=!!c[Q];v&&i&&i[Q]!==void 0&&(v=!!i[Q]);var S=Re(e),N=J(n,e,S,v);t(e,N);var U=!!me&&!!c[ee];U&&i&&(U=!!i[ee]),we(n,s,e,S,U!==!1)}var le,Se,De,pe,He,Ve,qe,Ut,Ke,ze,Gt,se,Q,ee,ue,me,Ae,Te,Ue,Rt=o(()=>{le="constructor",Se="prototype",De="function",pe="_dynInstFuncs",He="_isDynProxy",Ve="_dynClass",qe="_dynCls$",Ut="_dynInstChk",Ke=Ut,ze="_dfOpts",Gt="_unknown_",se="__proto__",Q="useBaseInst",ee="setInstFuncs",ue=Object,me=ue.getPrototypeOf,Ae=0,Te={setInstFuncs:!0,useBaseInst:!0},V[ze]=Te,Ue=V}),Ne,Me,Ft=o(()=>{(function(r){r[r.CRITICAL=1]="CRITICAL",r[r.WARNING=2]="WARNING"})(Ne||(Ne={})),Me={BrowserDoesNotSupportLocalStorage:0,BrowserCannotReadLocalStorage:1,BrowserCannotReadSessionStorage:2,BrowserCannotWriteLocalStorage:3,BrowserCannotWriteSessionStorage:4,BrowserFailedRemovalFromLocalStorage:5,BrowserFailedRemovalFromSessionStorage:6,CannotSendEmptyTelemetry:7,ClientPerformanceMathError:8,ErrorParsingAISessionCookie:9,ErrorPVCalc:10,ExceptionWhileLoggingError:11,FailedAddingTelemetryToBuffer:12,FailedMonitorAjaxAbort:13,FailedMonitorAjaxDur:14,FailedMonitorAjaxOpen:15,FailedMonitorAjaxRSC:16,FailedMonitorAjaxSend:17,FailedMonitorAjaxGetCorrelationHeader:18,FailedToAddHandlerForOnBeforeUnload:19,FailedToSendQueuedTelemetry:20,FailedToReportDataLoss:21,FlushFailed:22,MessageLimitPerPVExceeded:23,MissingRequiredFieldSpecification:24,NavigationTimingNotSupported:25,OnError:26,SessionRenewalDateIsZero:27,SenderNotInitialized:28,StartTrackEventFailed:29,StopTrackEventFailed:30,StartTrackFailed:31,StopTrackFailed:32,TelemetrySampledAndNotSent:33,TrackEventFailed:34,TrackExceptionFailed:35,TrackMetricFailed:36,TrackPVFailed:37,TrackPVFailedCalc:38,TrackTraceFailed:39,TransmissionFailed:40,FailedToSetStorageBuffer:41,FailedToRestoreStorageBuffer:42,InvalidBackendResponse:43,FailedToFixDepricatedValues:44,InvalidDurationValue:45,TelemetryEnvelopeInvalid:46,CreateEnvelopeError:47,CannotSerializeObject:48,CannotSerializeObjectNonSerializable:49,CircularReferenceDetected:50,ClearAuthContextFailed:51,ExceptionTruncated:52,IllegalCharsInName:53,ItemNotInArray:54,MaxAjaxPerPVExceeded:55,MessageTruncated:56,NameTooLong:57,SampleRateOutOfRange:58,SetAuthContextFailed:59,SetAuthContextFailedAccountName:60,StringValueTooLong:61,StartCalledMoreThanOnce:62,StopCalledWithoutStart:63,TelemetryInitializerFailed:64,TrackArgumentsNotSpecified:65,UrlTooLong:66,SessionStorageBufferFull:67,CannotAccessCookie:68,IdTooLong:69,InvalidEvent:70,FailedMonitorAjaxSetRequestHeader:71,SendBrowserInfoOnUserInit:72,PluginException:73,NotificationException:74,SnippetScriptLoadFailure:99,InvalidInstrumentationKey:100,CannotParseAiBlobValue:101,InvalidContentBlob:102,TrackPageActionEventFailed:103}});function at(r){return D.toString.call(r)}function ft(r,e){return typeof r===e}function sr(r){return r===void 0||typeof r===h}function Fe(r){return r===null||sr(r)}function ht(r){return!Fe(r)}function vi(r,e){return r&&Y.call(r,e)}function rt(r){return typeof r===E}function Ge(r){return typeof r===u}function ii(r,e,t,i){i===void 0&&(i=!1);var n=!1;if(!Fe(r))try{Fe(r[Wr])?Fe(r[zr])||(r[zr](jr+e,t),n=!0):(r[Wr](e,t,i),n=!0)}catch(s){}return n}function dt(r,e,t,i){if(i===void 0&&(i=!1),!Fe(r))try{Fe(r[xi])?Fe(r[Kr])||r[Kr](jr+e,t):r[xi](e,t,i)}catch(n){}}function pt(r){var e=r,t=/([^\w\d_$])/g;return t.test(r)&&(e=r.replace(t,"_")),e}function zt(r,e){if(r)for(var t in r)Y.call(r,t)&&e.call(r,t,r[t])}function mt(r,e){if(r&&e){var t=e.length,i=r.length;if(r===e)return!0;if(i>=t){for(var n=i-1,s=t-1;s>=0;s--){if(r[n]!=e[s])return!1;n--}return!0}}return!1}function Ye(r,e){return r&&e?r.indexOf(e)!==-1:!1}function bi(r){return at(r)==="[object Date]"}function et(r){return at(r)==="[object Array]"}function st(r){return at(r)==="[object Error]"}function xt(r){return typeof r=="string"}function ot(r){return typeof r=="number"}function lt(r){return typeof r=="boolean"}function Dr(r){if(bi(r)){var e=function(t){var i=String(t);return i.length===1&&(i="0"+i),i};return r.getUTCFullYear()+"-"+e(r.getUTCMonth()+1)+"-"+e(r.getUTCDate())+"T"+e(r.getUTCHours())+":"+e(r.getUTCMinutes())+":"+e(r.getUTCSeconds())+"."+String((r.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}}function $e(r,e,t){for(var i=r.length,n=0;n<i&&!(n in r&&e.call(t||r,r[n],n,r)===-1);n++);}function nt(r,e,t){for(var i=r.length,n=t||0,s=Math.max(n>=0?n:i-Math.abs(n),0);s<i;s++)if(s in r&&r[s]===e)return s;return-1}function $r(r,e,t){for(var i=r.length,n=t||r,s=new Array(i),c=0;c<i;c++)c in r&&(s[c]=e.call(n,r[c],r));return s}function Ct(r,e,t){var i=r.length,n=0,s;if(arguments.length>=3)s=arguments[2];else{for(;n<i&&!(n in r);)n++;s=r[n++]}for(;n<i;)n in r&&(s=e(s,r[n],n,r)),n++;return s}function gt(r){return typeof r!="string"?r:r.replace(/^\s+|\s+$/g,"")}function yr(r){var e=typeof r;e!==u&&(e!==E||r===null)&&oe("objKeys called on non-object");var t=[];for(var i in r)r&&Y.call(r,i)&&t.push(i);if(Wd)for(var n=so.length,s=0;s<n;s++)r&&Y.call(r,so[s])&&t.push(so[s]);return t}function Cr(r,e,t,i){if(Ti)try{var n={enumerable:!0,configurable:!0};return t&&(n.get=t),i&&(n.set=i),Ti(r,e,n),!0}catch(s){}return!1}function ar(){var r=Date;return r.now?r.now():new r().getTime()}function It(r){return st(r)?r.name:""}function Pt(r,e,t,i,n){var s=t;return r&&(s=r[e],s!==t&&(!n||n(s))&&(!i||i(t))&&(s=t,r[e]=s)),s}function Wt(r,e,t){var i;return r?(i=r[e],!i&&Fe(i)&&(i=sr(t)?{}:t,r[e]=i)):i=sr(t)?{}:t,i}function ni(r){return!r}function Gr(r){return!!r}function fr(r){throw new Error(r)}function si(r,e,t){if(r&&e&&r!==e&&rt(r)&&rt(e)){var i=function(s){if(xt(s)){var c=e[s];Ge(c)?(!t||t(s,!0,e,r))&&(r[s]=function(v){return function(){var S=arguments;return e[v].apply(e,S)}}(s)):(!t||t(s,!1,e,r))&&(vi(r,s)&&delete r[s],Cr(r,s,function(){return e[s]},function(v){e[s]=v})||(r[s]=c))}};for(var n in e)i(n)}return r}function di(r){return function(){function e(){var t=this;r&&zt(r,function(i,n){t[i]=n})}return e}()}function ai(r){return r&&(r=C(T?T({},r):r)),r}var jr,zr,Wr,Kr,xi,Ti,Xi,r0,Wd,so,Br=o(()=>{L(),jr="on",zr="attachEvent",Wr="addEventListener",Kr="detachEvent",xi="removeEventListener",Ti=W,Xi=C.freeze,r0=C.seal,Wd=!{toString:null}.propertyIsEnumerable("toString"),so=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"]});function qr(r){var e=ie();return e&&e[r]?e[r]:r===ql&&ao()?window:null}function ao(){return Boolean(typeof window===E&&window)}function ha(){return ao()?window:qr(ql)}function Kd(){return Boolean(typeof document===E&&document)}function Vi(){return Kd()?document:qr(Qd)}function i0(){return Boolean(typeof navigator===E&&navigator)}function $i(){return i0()?navigator:qr(Yd)}function n0(){return Boolean(typeof history===E&&history)}function s0(){return n0()?history:qr(Jd)}function Hn(r){if(r&&sf){var e=qr("__mockLocation");if(e)return e}return typeof location===E&&location?location:qr(Zd)}function a0(){return typeof console!==h?console:qr(Xd)}function en(){return qr(ef)}function ps(){return Boolean(typeof JSON===E&&JSON||qr(Hl)!==null)}function Ci(){return ps()?JSON||qr(Hl):null}function o0(){return qr(tf)}function l0(){return qr(rf)}function u0(){var r=$i();return r&&r.product?r.product===nf:!1}function oo(){var r=$i();if(r&&(r.userAgent!==fo||co===null)){fo=r.userAgent;var e=(fo||"").toLowerCase();co=Ye(e,lo)||Ye(e,uo)}return co}function Bl(r){if(r===void 0&&(r=null),!r){var e=$i()||{};r=e?(e.userAgent||"").toLowerCase():""}var t=(r||"").toLowerCase();if(Ye(t,lo))return parseInt(t.split(lo)[1]);if(Ye(t,uo)){var i=parseInt(t.split(uo)[1]);if(i)return i+4}return null}function Dt(r){var e=Object[m].toString.call(r),t="";return e==="[object Error]"?t="{ stack: '"+r.stack+"', message: '"+r.message+"', name: '"+r.name+"'":ps()&&(t=Ci().stringify(r)),e+t}var ql,Qd,Yd,Jd,Zd,Xd,ef,Hl,tf,rf,nf,lo,uo,co,fo,sf,pa=o(()=>{L(),Br(),ql="window",Qd="document",Yd="navigator",Jd="history",Zd="location",Xd="console",ef="performance",Hl="JSON",tf="crypto",rf="msCrypto",nf="ReactNative",lo="msie",uo="trident/",co=null,fo=null,sf=!1});function af(r){return r?'"'+r.replace(/\"/g,"")+'"':""}function ho(r,e){return(r||{}).logger||new Vl(e)}var of,lf,uf,ms,Vl,$l=o(()=>{Ft(),pa(),Rt(),Br(),of="AI (Internal): ",lf="AI: ",uf="AITR_",ms=function(){function r(e,t,i,n){i===void 0&&(i=!1);var s=this;s.messageId=e,s.message=(i?lf:of)+e;var c="";ps()&&(c=Ci().stringify(n));var v=(t?" message:"+af(t):"")+(n?" props:"+af(c):"");s.message+=v}return r.dataType="MessageData",r}(),Vl=function(){function r(e){this.identifier="DiagnosticLogger",this.queue=[];var t=0,i={};Ue(r,this,function(n){Fe(e)&&(e={}),n.consoleLoggingLevel=function(){return s("loggingLevelConsole",0)},n.telemetryLoggingLevel=function(){return s("loggingLevelTelemetry",1)},n.maxInternalMessageLimit=function(){return s("maxMessageLimit",25)},n.enableDebugExceptions=function(){return s("enableDebugExceptions",!1)},n.throwInternal=function(v,S,N,U,X){X===void 0&&(X=!1);var ne=new ms(S,N,X,U);if(n.enableDebugExceptions())throw ne;if(!sr(ne.message)){var ce=n.consoleLoggingLevel();if(X){var be=+ne.messageId;!i[be]&&ce>=Ne.WARNING&&(n.warnToConsole(ne.message),i[be]=!0)}else ce>=Ne.WARNING&&n.warnToConsole(ne.message);n.logInternalMessage(v,ne)}},n.warnToConsole=function(v){var S=a0();if(S){var N="log";S.warn&&(N="warn"),Ge(S[N])&&S[N](v)}},n.resetInternalMessageCount=function(){t=0,i={}},n.logInternalMessage=function(v,S){if(!c()){var N=!0,U=uf+S.messageId;if(i[U]?N=!1:i[U]=!0,N&&(v<=n.telemetryLoggingLevel()&&(n.queue.push(S),t++),t===n.maxInternalMessageLimit())){var X="Internal events throttle limit per PageView reached for this app.",ne=new ms(Me.MessageLimitPerPVExceeded,X,!1);n.queue.push(ne),n.warnToConsole(X)}}};function s(v,S){var N=e[v];return Fe(N)?S:N}function c(){return t>=n.maxInternalMessageLimit()}})}return r}()});function gs(r,e,t,i,n){if(r){var s=r;if(Ge(s.getPerfMgr)&&(s=s.getPerfMgr()),s){var c=void 0,v=s.getCtx(po);try{if(c=s.create(e(),i,n),c){if(v&&c.setCtx&&(c.setCtx(vs.ParentContextKey,v),v.getCtx&&v.setCtx)){var S=v.getCtx(vs.ChildrenContextKey);S||(S=[],v.setCtx(vs.ChildrenContextKey,S)),S.push(c)}return s.setCtx(po,c),t(c)}}catch(N){c&&c.setCtx&&c.setCtx("exception",N)}finally{c&&s.fire(c),s.setCtx(po,v)}}}return t()}var Vn,vs,Gl,po,mo=o(()=>{Rt(),Br(),Vn="ctx",vs=function(){function r(e,t,i){var n=this,s=!1;if(n.start=ar(),n.name=e,n.isAsync=i,n.isChildEvt=function(){return!1},Ge(t)){var c;s=Cr(n,"payload",function(){return!c&&Ge(t)&&(c=t(),t=null),c})}n.getCtx=function(v){return v?v===r.ParentContextKey||v===r.ChildrenContextKey?n[v]:(n[Vn]||{})[v]:null},n.setCtx=function(v,S){if(v)if(v===r.ParentContextKey)n[v]||(n.isChildEvt=function(){return!0}),n[v]=S;else if(v===r.ChildrenContextKey)n[v]=S;else{var N=n[Vn]=n[Vn]||{};N[v]=S}},n.complete=function(){var v=0,S=n.getCtx(r.ChildrenContextKey);if(et(S))for(var N=0;N<S.length;N++){var U=S[N];U&&(v+=U.time)}n.time=ar()-n.start,n.exTime=n.time-v,n.complete=function(){},!s&&Ge(t)&&(n.payload=t())}}return r.ParentContextKey="parent",r.ChildrenContextKey="childEvts",r}(),Gl=function(){function r(e){this.ctx={},Ue(r,this,function(t){t.create=function(i,n,s){return new vs(i,n,s)},t.fire=function(i){i&&(i.complete(),e&&e.perfEvent(i))},t.setCtx=function(i,n){if(i){var s=t[Vn]=t[Vn]||{};s[i]=n}},t.getCtx=function(i){return(t[Vn]||{})[i]}})}return r}(),po="CoreUtils.doPerf"}),cf,c0=o(()=>{mo(),Ft(),Br(),cf=function(){function r(e,t){var i=this,n=null,s=Ge(e.processTelemetry),c=Ge(e.setNextPlugin);i._hasRun=!1,i.getPlugin=function(){return e},i.getNext=function(){return n},i.setNext=function(v){n=v},i.processTelemetry=function(v,S){S||(S=t);var N=e?e.identifier:"TelemetryPluginChain";gs(S?S.core():null,function(){return N+":processTelemetry"},function(){if(e&&s){i._hasRun=!0;try{S.setNext(n),c&&e.setNextPlugin(n),n&&(n._hasRun=!1),e.processTelemetry(v,S)}catch(X){var U=n&&n._hasRun;(!n||!U)&&S.diagLog().throwInternal(Ne.CRITICAL,Me.PluginException,"Plugin ["+e.identifier+"] failed during processTelemetry - "+X),n&&!U&&n.processTelemetry(v,S)}}else n&&(i._hasRun=!0,n.processTelemetry(v,S))},function(){return{item:v}},!v.sync)}}return r}()});function jl(r,e){var t=[];if(r&&r.length>0)for(var i=null,n=0;n<r.length;n++){var s=r[n];if(s&&Ge(s.processTelemetry)){var c=new cf(s,e);t.push(c),i&&i.setNext(c),i=c}}return t.length>0?t[0]:null}function d0(r,e,t){var i=[],n=!t;if(r)for(;r;){var s=r.getPlugin();(n||s===t)&&(n=!0,i.push(s)),r=r.getNext()}return n||i.push(t),jl(i,e)}function f0(r,e,t){var i=r,n=!1;return t&&r&&(i=[],$e(r,function(s){(n||s===t)&&(n=!0,i.push(s))})),t&&!n&&(i||(i=[]),i.push(t)),jl(i,e)}var $n,zl=o(()=>{$l(),c0(),Br(),$n=function(){function r(e,t,i,n){var s=this,c=null;n!==null&&(e&&Ge(e.getPlugin)?c=d0(e,s,n||e.getPlugin()):n?c=f0(e,s,n):sr(n)&&(c=jl(e,s))),s.core=function(){return i},s.diagLog=function(){return ho(i,t)},s.getCfg=function(){return t},s.getExtCfg=function(v,S){S===void 0&&(S={});var N;if(t){var U=t.extensionConfig;U&&v&&(N=U[v])}return N||S},s.getConfig=function(v,S,N){N===void 0&&(N=!1);var U,X=s.getExtCfg(v,null);return X&&!Fe(X[S])?U=X[S]:t&&!Fe(t[S])&&(U=t[S]),Fe(U)?N:U},s.hasNext=function(){return c!=null},s.getNext=function(){return c},s.setNext=function(v){c=v},s.processNext=function(v){var S=c;S&&(c=S.getNext(),S.processTelemetry(v,s))},s.createNew=function(v,S){return v===void 0&&(v=null),new r(v||c,t,i,S)}}return r}()}),df,Wl,ff=o(()=>{df="iKey",Wl="extensionConfig"}),ma,Gn,hf=o(()=>{zl(),Br(),ff(),ma="getPlugin",Gn=function(){function r(){var e=this,t=!1,i=null,n=null;e.core=null,e.diagLog=function(s){return e._getTelCtx(s).diagLog()},e.isInitialized=function(){return t},e.setInitialized=function(s){t=s},e.setNextPlugin=function(s){n=s},e.processNext=function(s,c){c?c.processNext(s):n&&Ge(n.processTelemetry)&&n.processTelemetry(s,null)},e._getTelCtx=function(s){s===void 0&&(s=null);var c=s;if(!c){var v=i||new $n(null,{},e.core);n&&n[ma]?c=v.createNew(null,n[ma]):c=v.createNew(null,n)}return c},e._baseTelInit=function(s,c,v,S){s&&Pt(s,Wl,[],null,Fe),!S&&c&&(S=c.getProcessTelContext().getNext());var N=n;n&&n[ma]&&(N=n[ma]()),e.core=c,i=new $n(S,s,c,N),t=!0}}return r.prototype.initialize=function(e,t,i,n){this._baseTelInit(e,t,i,n)},r}()});function Kl(r,e){for(var t=[],i=null,n=r.getNext();n;){var s=n.getPlugin();s&&(i&&Ge(i[Yl])&&Ge(s[go])&&i[Yl](s),(!Ge(s[Jl])||!s[Jl]())&&t.push(s),i=s,n=n.getNext())}$e(t,function(c){c.initialize(r.getCfg(),r.core(),e,r.getNext())})}function pf(r){return r.sort(function(e,t){var i=0,n=Ge(t[go]);return Ge(e[go])?i=n?e[Ql]-t[Ql]:1:n&&(i=-1),i})}var go,Ql,Yl,Jl,mf=o(()=>{Br(),go="processTelemetry",Ql="priority",Yl="setNextPlugin",Jl="isInitialized"}),vo,gf,vf,h0=o(()=>{L(),Rt(),hf(),zl(),mf(),Br(),vo=500,gf="Channel has invalid priority",vf=function(r){te(e,r);function e(){var t=r.call(this)||this;t.identifier="ChannelControllerPlugin",t.priority=vo;var i;Ue(e,t,function(v,S){v.setNextPlugin=function(N){},v.processTelemetry=function(N,U){i&&$e(i,function(X){if(X.length>0){var ne=t._getTelCtx(U).createNew(X);ne.processNext(N)}})},v.getChannelControls=function(){return i},v.initialize=function(N,U,X){v.isInitialized()||(S.initialize(N,U,X),c((N||{}).channels,X),$e(i,function(ne){return Kl(new $n(ne,N,U),X)}))}});function n(v){$e(v,function(S){S.priority<vo&&fr(gf+S.identifier)})}function s(v){v&&v.length>0&&(v=v.sort(function(S,N){return S.priority-N.priority}),n(v),i.push(v))}function c(v,S){if(i=[],v&&$e(v,function(U){return s(U)}),S){var N=[];$e(S,function(U){U.priority>vo&&N.push(U)}),s(N)}}return t}return e._staticInit=function(){var t=e.prototype;Cr(t,"ChannelControls",t.getChannelControls),Cr(t,"channelQueue",t.getChannelControls)}(),e}(Gn)});function bf(r,e){var t=ga[tn]||ba[tn];return t||(t=ga[tn]=ga(r,e),ba[tn]=t),t}function bo(r){return r?r.isEnabled():!0}function p0(r){var e=r.cookieCfg=r.cookieCfg||{};if(Pt(e,"domain",r.cookieDomain,ht,Fe),Pt(e,"path",r.cookiePath||"/",null,Fe),Fe(e[_o])){var t=void 0;sr(r[tu])||(t=!r[tu]),sr(r[ru])||(t=!r[ru]),e[_o]=t}return e}function Zl(r,e){var t;if(r)t=r.getCookieMgr();else if(e){var i=e.cookieCfg;i[tn]?t=i[tn]:t=ga(e)}return t||(t=bf(e,(r||{}).logger)),t}function ga(r,e){var t=p0(r||ba),i=t.path||"/",n=t.domain,s=t[_o]!==!1,c={isEnabled:function(){var v=s&&yf(e),S=ba[tn];return v&&S&&c!==S&&(v=bo(S)),v},setEnabled:function(v){s=v!==!1},set:function(v,S,N,U,X){if(bo(c)){var ne={},ce=gt(S||yi),be=ce.indexOf(";");if(be!==-1&&(ce=gt(S.substring(0,be)),ne=wf(S.substring(be+1))),Pt(ne,"domain",U||n,Gr,sr),!Fe(N)){var ye=oo();if(sr(ne[wo])){var ge=ar(),ve=ge+N*1e3;if(ve>0){var ke=new Date;ke.setTime(ve),Pt(ne,wo,_f(ke,ye?Xl:eu)||_f(ke,ye?Xl:eu)||yi,Gr)}}ye||Pt(ne,"max-age",yi+N,null,sr)}var Ce=Hn();Ce&&Ce.protocol==="https:"&&(Pt(ne,"secure",null,null,sr),So===null&&(So=!Ef(($i()||{}).userAgent)),So&&Pt(ne,"SameSite","None",null,sr)),Pt(ne,"path",X||i,null,sr);var Pe=t.setCookie||kf;Pe(v,Sf(ce,ne))}},get:function(v){var S=yi;return bo(c)&&(S=(t.getCookie||m0)(v)),S},del:function(v,S){bo(c)&&c.purge(v,S)},purge:function(v,S){if(yf(e)){var N=(X={},X.path=S||"/",X[wo]="Thu, 01 Jan 1970 00:00:01 GMT",X);oo()||(N["max-age"]="0");var U=t.delCookie||kf;U(v,Sf(yi,N))}var X}};return c[tn]=c,c}function yf(r){if(va===null){va=!1;try{var e=bs||{};va=e[yo]!==void 0}catch(t){r&&r.throwInternal(Ne.WARNING,Me.CannotAccessCookie,"Cannot access document.cookie - "+It(t),{exception:Dt(t)})}}return va}function wf(r){var e={};if(r&&r.length){var t=gt(r).split(";");$e(t,function(i){if(i=gt(i||yi),i){var n=i.indexOf("=");n===-1?e[i]=null:e[gt(i.substring(0,n))]=gt(i.substring(n+1))}})}return e}function _f(r,e){return Ge(r[e])?r[e]():null}function Sf(r,e){var t=r||yi;return zt(e,function(i,n){t+="; "+i+(Fe(n)?yi:"="+n)}),t}function m0(r){var e=yi;if(bs){var t=bs[yo]||yi;iu!==t&&(nu=wf(t),iu=t),e=gt(nu[r]||yi)}return e}function kf(r,e){bs&&(bs[yo]=r+"="+e)}function Ef(r){return xt(r)?!!(Ye(r,"CPU iPhone OS 12")||Ye(r,"iPad; CPU OS 12")||Ye(r,"Macintosh; Intel Mac OS X 10_14")&&Ye(r,"Version/")&&Ye(r,"Safari")||Ye(r,"Macintosh; Intel Mac OS X 10_14")&&mt(r,"AppleWebKit/605.1.15 (KHTML, like Gecko)")||Ye(r,"Chrome/5")||Ye(r,"Chrome/6")||Ye(r,"UnrealEngine")&&!Ye(r,"Chrome")||Ye(r,"UCBrowser/12")||Ye(r,"UCBrowser/11")):!1}var Xl,eu,yo,wo,_o,tu,ru,tn,yi,va,So,iu,bs,nu,ba,su=o(()=>{Ft(),pa(),Br(),Xl="toGMTString",eu="toUTCString",yo="cookie",wo="expires",_o="enabled",tu="isCookieUseDisabled",ru="disableCookiesUsage",tn="_ckMgr",yi="",va=null,So=null,iu=null,bs=Vi(),nu={},ba={}}),Rf,au,ou,xf=o(()=>{L(),Rt(),h0(),zl(),mf(),mo(),su(),Br(),ff(),Rf="Extensions must provide callback to initialize",au="_notificationManager",ou=function(){function r(){var e=!1,t,i,n,s,c;Ue(r,this,function(v){v._extensions=new Array,i=new vf,v.logger=ae({throwInternal:function(S,N,U,X,ne){ne===void 0&&(ne=!1)},warnToConsole:function(S){},resetInternalMessageCount:function(){}}),t=[],v.isInitialized=function(){return e},v.initialize=function(S,N,U,X){v.isInitialized()&&fr("Core should not be initialized more than once"),(!S||Fe(S.instrumentationKey))&&fr("Please provide instrumentation key"),n=X,v[au]=X,v.config=S||{},S.extensions=Fe(S.extensions)?[]:S.extensions;var ne=Wt(S,Wl);ne.NotificationManager=X,U&&(v.logger=U);var ce=[];ce.push.apply(ce,N.concat(S.extensions)),ce=pf(ce);var be=[],ye=[],ge={};$e(ce,function(ve){(Fe(ve)||Fe(ve.initialize))&&fr(Rf);var ke=ve.priority,Ce=ve.identifier;ve&&ke&&(Fe(ge[ke])?ge[ke]=Ce:U.warnToConsole("Two extensions have same priority #"+ke+" - "+ge[ke]+", "+Ce)),!ke||ke<i.priority?be.push(ve):ye.push(ve)}),ce.push(i),be.push(i),ce=pf(ce),v._extensions=ce,Kl(new $n([i],S,v),ce),Kl(new $n(be,S,v),ce),v._extensions=be,v.getTransmissionControls().length===0&&fr("No channels available"),e=!0,v.releaseQueue()},v.getTransmissionControls=function(){return i.getChannelControls()},v.track=function(S){Pt(S,df,v.config.instrumentationKey,null,ni),Pt(S,"time",Dr(new Date),null,ni),Pt(S,"ver","4.0",null,Fe),v.isInitialized()?v.getProcessTelContext().processNext(S):t.push(S)},v.getProcessTelContext=function(){var S=v._extensions,N=S;return(!S||S.length===0)&&(N=[i]),new $n(N,v.config,v)},v.getNotifyMgr=function(){return n||(n=ae({addNotificationListener:function(S){},removeNotificationListener:function(S){},eventsSent:function(S){},eventsDiscarded:function(S,N){},eventsSendRequest:function(S,N){}}),v[au]=n),n},v.getCookieMgr=function(){return c||(c=ga(v.config,v.logger)),c},v.setCookieMgr=function(S){c=S},v.getPerfMgr=function(){return s||v.config&&v.config.enablePerfMgr&&(s=new Gl(v.getNotifyMgr())),s},v.setPerfMgr=function(S){s=S},v.eventCnt=function(){return t.length},v.releaseQueue=function(){t.length>0&&($e(t,function(S){v.getProcessTelContext().processNext(S)}),t=[])}})}return r}()}),lu,Tf=o(()=>{Rt(),Br(),lu=function(){function r(e){this.listeners=[];var t=!!(e||{}).perfEvtsSendAll;Ue(r,this,function(i){i.addNotificationListener=function(n){i.listeners.push(n)},i.removeNotificationListener=function(n){for(var s=nt(i.listeners,n);s>-1;)i.listeners.splice(s,1),s=nt(i.listeners,n)},i.eventsSent=function(n){$e(i.listeners,function(s){s&&s.eventsSent&&setTimeout(function(){return s.eventsSent(n)},0)})},i.eventsDiscarded=function(n,s){$e(i.listeners,function(c){c&&c.eventsDiscarded&&setTimeout(function(){return c.eventsDiscarded(n,s)},0)})},i.eventsSendRequest=function(n,s){$e(i.listeners,function(c){if(c&&c.eventsSendRequest)if(s)setTimeout(function(){return c.eventsSendRequest(n,s)},0);else try{c.eventsSendRequest(n,s)}catch(v){}})},i.perfEvent=function(n){n&&(t||!n.isChildEvt())&&$e(i.listeners,function(s){if(s&&s.perfEvent)if(n.isAsync)setTimeout(function(){return s.perfEvent(n)},0);else try{s.perfEvent(n)}catch(c){}})}})}return r}()}),uu,g0=o(()=>{L(),xf(),p(),Tf(),mo(),$l(),Rt(),Br(),uu=function(r){te(e,r);function e(){var t=r.call(this)||this;return Ue(e,t,function(i,n){i.initialize=function(v,S,N,U){n.initialize(v,S,N||new Vl(v),U||new lu(v))},i.track=function(v){gs(i.getPerfMgr(),function(){return"AppInsightsCore:track"},function(){v===null&&(c(v),fr("Invalid telemetry item")),s(v),n.track(v)},function(){return{item:v}},!v.sync)},i.addNotificationListener=function(v){var S=i.getNotifyMgr();S&&S.addNotificationListener(v)},i.removeNotificationListener=function(v){var S=i.getNotifyMgr();S&&S.removeNotificationListener(v)},i.pollInternalLogs=function(v){var S=i.config.diagnosticLogInterval;return(!S||!(S>0))&&(S=1e4),setInterval(function(){var N=i.logger?i.logger.queue:[];$e(N,function(U){var X={name:v||"InternalMessageId: "+U.messageId,iKey:i.config.instrumentationKey,time:Dr(new Date),baseType:ms.dataType,baseData:{message:U.message}};i.track(X)}),N.length=0},S)};function s(v){if(Fe(v.name))throw c(v),Error("telemetry name required")}function c(v){var S=i.getNotifyMgr();S&&S.eventsDiscarded([v],_.InvalidEvent)}}),t}return e}(ou)});function Cf(r){r<0&&(r>>>=0),ys=123456789+r&rn,ws=987654321-r&rn,du=!0}function Mf(){try{var r=ar()&2147483647;Cf((Math.random()*cu^r)+r)}catch(e){}}function Nf(r){return r>0?Math.floor(jn()/rn*(r+1))>>>0:0}function jn(r){var e,t=o0()||l0();return t&&t.getRandomValues?e=t.getRandomValues(new Uint32Array(1))[0]&rn:oo()?(du||Mf(),e=Pf()&rn):e=Math.floor(cu*Math.random()|0),r||(e>>>=0),e}function v0(r){r?Cf(r):Mf()}function Pf(r){ws=36969*(ws&65535)+(ws>>16)&rn,ys=18e3*(ys&65535)+(ys>>16)&rn;var e=(ws<<16)+(ys&65535)>>>0&rn|0;return r||(e>>>=0),e}var cu,rn,du,ys,ws,Af=o(()=>{pa(),Br(),cu=4294967296,rn=4294967295,du=!1,ys=123456789,ws=987654321});function zn(r,e){var t=!1,i=ha();i&&(t=ii(i,r,e),t=ii(i.body,r,e)||t);var n=Vi();return n&&(t=wa.Attach(n,r,e)||t),t}function b0(){function r(){return Nf(15)}return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(Df,function(e){var t=r()|0,i=e==="x"?t:t&3|8;return i.toString(16)})}function y0(){var r=en();return r&&r.now?r.now():ar()}function ko(r){r===void 0&&(r=22);for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=jn()>>>0,i=0,n="";n.length<r;)i++,n+=e.charAt(t&63),t>>>=6,i===5&&(t=(jn()<<2&4294967295|t&3)>>>0,i=0);return n}function Gi(){for(var r=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],e="",t,i=0;i<4;i++)t=jn(),e+=r[t&15]+r[t>>4&15]+r[t>>8&15]+r[t>>12&15]+r[t>>16&15]+r[t>>20&15]+r[t>>24&15]+r[t>>28&15];var n=r[8+(jn()&3)|0];return e.substr(0,8)+e.substr(9,4)+"4"+e.substr(13,3)+n+e.substr(16,3)+e.substr(19,12)}function _s(r,e){var t=bf(r,e),i=Eo._canUseCookies;return Ss===null&&(Ss=[],ya=i,Cr(Eo,"_canUseCookies",function(){return ya},function(n){ya=n,$e(Ss,function(s){s.setEnabled(n)})})),nt(Ss,t)===-1&&Ss.push(t),lt(i)&&t.setEnabled(i),lt(ya)&&t.setEnabled(ya),t}function If(){_s().setEnabled(!1)}function w0(r){return _s(null,r).isEnabled()}function _0(r,e){return _s(null,r).get(e)}function S0(r,e,t,i){_s(null,r).set(e,t,null,i)}function k0(r,e){return _s(null,r).del(e)}var Ss,ya,Eo,Df,wa,E0=o(()=>{L(),su(),pa(),Br(),Af(),Ss=null,Eo={_canUseCookies:void 0,isTypeof:ft,isUndefined:sr,isNullOrUndefined:Fe,hasOwnProperty:vi,isFunction:Ge,isObject:rt,isDate:bi,isArray:et,isError:st,isString:xt,isNumber:ot,isBoolean:lt,toISOString:Dr,arrForEach:$e,arrIndexOf:nt,arrMap:$r,arrReduce:Ct,strTrim:gt,objCreate:ae,objKeys:yr,objDefineAccessors:Cr,addEventHandler:zn,dateNow:ar,isIE:oo,disableCookies:If,newGuid:b0,perfNow:y0,newId:ko,randomValue:Nf,random32:jn,mwcRandomSeed:v0,mwcRandom32:Pf,generateW3CId:Gi},Df=/[xy]/g,wa={Attach:ii,AttachEvent:ii,Detach:dt,DetachEvent:dt}});function fu(r,e){if(r)for(var t=0;t<r.length&&!e(r[t],t);t++);}function hu(r,e,t,i,n){n>=0&&n<=2&&fu(r,function(s,c){var v=s.cbks,S=v[gu[n]];if(S){e.ctx=function(){var X=i[c]=i[c]||{};return X};try{S.apply(e.inst,t)}catch(X){var N=e.err;try{var U=v[gu[2]];U&&(e.err=X,U.apply(e.inst,t))}catch(ne){}finally{e.err=N}}}})}function R0(r){return function(){var e=this,t=arguments,i=r.h,n={name:r.n,inst:e,ctx:null,set:S},s=[],c=v([n],t);function v(U,X){return fu(X,function(ne){U.push(ne)}),U}function S(U,X){t=v([],t),t[U]=X,c=v([n],t)}hu(i,n,c,s,0);var N=r.f;try{n.rslt=N.apply(e,t)}catch(U){throw n.err=U,hu(i,n,c,s,3),U}return hu(i,n,c,s,1),n.rslt}}function x0(r){if(r){if(vu)return vu(r);var e=r[Of]||r[m]||r[Lf];if(e)return e}return null}function Ff(r,e,t){var i=null;return r&&(vi(r,e)?i=r:t&&(i=Ff(x0(r),e,!1))),i}function T0(r,e,t){return r?pu(r[m],e,t,!1):null}function pu(r,e,t,i){if(i===void 0&&(i=!0),r&&e&&t){var n=Ff(r,e,i);if(n){var s=n[e];if(typeof s===u){var c=s[mu];if(!c){c={i:0,n:e,f:s,h:[]};var v=R0(c);v[mu]=c,n[e]=v}var S={id:c.i,cbks:t,rm:function(){var N=this.id;fu(c.h,function(U,X){if(U.id===N)return c.h.splice(X,1),1})}};return c.i++,c.h.push(S),S}}}return null}var mu,gu,Of,Lf,vu,C0=o(()=>{L(),Br(),mu="_aiHooks",gu=["req","rsp","hkErr","fnErr"],Of="__proto__",Lf="constructor",vu=Object.getPrototypeOf}),Bt=o(()=>{g0(),xf(),hf(),Af(),E0(),Br(),pa(),L(),Tf(),mo(),$l(),Ft(),C0(),su()}),Xt,Uf=o(()=>{Xt={requestContextHeader:"Request-Context",requestContextTargetKey:"appId",requestContextAppIdFormat:"appId=cid-v1:",requestIdHeader:"Request-Id",traceParentHeader:"traceparent",traceStateHeader:"tracestate",sdkContextHeader:"Sdk-Context",sdkContextHeaderAppIdRequest:"appId",requestContextHeaderLowerCase:"request-context"}});function bu(r,e,t){var i=e.length,n=Bf(r,e);if(n.length!==i){for(var s=0,c=n;t[c]!==void 0;)s++,c=n.substring(0,150-3)+Vf(s);n=c}return n}function Bf(r,e){var t;return e&&(e=gt(e.toString()),e.length>150&&(t=e.substring(0,150),r.throwInternal(Ne.WARNING,Me.NameTooLong,"name is too long. It has been truncated to "+150+" characters.",{name:e},!0))),t||e}function Qr(r,e,t){t===void 0&&(t=1024);var i;return e&&(t=t||1024,e=gt(e),e.toString().length>t&&(i=e.toString().substring(0,t),r.throwInternal(Ne.WARNING,Me.StringValueTooLong,"string value is too long. It has been truncated to "+t+" characters.",{value:e},!0))),i||e}function _a(r,e){return wu(r,e,2048,Me.UrlTooLong)}function yu(r,e){var t;return e&&e.length>32768&&(t=e.substring(0,32768),r.throwInternal(Ne.WARNING,Me.MessageTruncated,"message is too long, it has been truncated to "+32768+" characters.",{message:e},!0)),t||e}function qf(r,e){var t;if(e){var i=""+e;i.length>32768&&(t=i.substring(0,32768),r.throwInternal(Ne.WARNING,Me.ExceptionTruncated,"exception is too long, it has been truncated to "+32768+" characters.",{exception:e},!0))}return t||e}function _n(r,e){if(e){var t={};zt(e,function(i,n){if(rt(n)&&ps())try{n=Ci().stringify(n)}catch(s){r.throwInternal(Ne.WARNING,Me.CannotSerializeObjectNonSerializable,"custom property is not valid",{exception:s},!0)}n=Qr(r,n,8192),i=bu(r,i,t),t[i]=n}),e=t}return e}function Sn(r,e){if(e){var t={};zt(e,function(i,n){i=bu(r,i,t),t[i]=n}),e=t}return e}function Hf(r,e){return e&&wu(r,e,128,Me.IdTooLong).toString()}function wu(r,e,t,i){var n;return e&&(e=gt(e),e.length>t&&(n=e.substring(0,t),r.throwInternal(Ne.WARNING,i,"input is too long, it has been truncated to "+t+" characters.",{data:e},!0))),n||e}function Vf(r){var e="00"+r;return e.substr(e.length-3)}var $f,Mi=o(()=>{Bt(),$f={MAX_NAME_LENGTH:150,MAX_ID_LENGTH:128,MAX_PROPERTY_LENGTH:8192,MAX_STRING_LENGTH:1024,MAX_URL_LENGTH:2048,MAX_MESSAGE_LENGTH:32768,MAX_EXCEPTION_LENGTH:32768,sanitizeKeyAndAddUniqueness:bu,sanitizeKey:Bf,sanitizeString:Qr,sanitizeUrl:_a,sanitizeMessage:yu,sanitizeException:qf,sanitizeProperties:_n,sanitizeMeasurements:Sn,sanitizeId:Hf,sanitizeInput:wu,padNumber:Vf,trim:gt}});function ks(r){var e=null;if(Ge(Event))e=new Event(r);else{var t=Vi();t&&t.createEvent&&(e=t.createEvent("Event"),e.initEvent(r,!0,!0))}return e}var Gf=o(()=>{Bt()});function Kt(r,e){return e===void 0&&(e=!1),r==null?e:r.toString().toLowerCase()==="true"}function nn(r){(isNaN(r)||r<0)&&(r=0),r=Math.round(r);var e=""+r%1e3,t=""+Math.floor(r/1e3)%60,i=""+Math.floor(r/(1e3*60))%60,n=""+Math.floor(r/(1e3*60*60))%24,s=Math.floor(r/(1e3*60*60*24));return e=e.length===1?"00"+e:e.length===2?"0"+e:e,t=t.length<2?"0"+t:t,i=i.length<2?"0"+i:i,n=n.length<2?"0"+n:n,(s>0?s+".":"")+n+":"+i+":"+t+"."+e}function _u(){var r=$i();return"sendBeacon"in r&&r.sendBeacon}function jf(r,e){var t=null;return $e(r,function(i){if(i.identifier===e)return t=i,-1}),t}function zf(r,e,t,i,n){return!n&&xt(r)&&(r==="Script error."||r==="Script error")}var Ro=o(()=>{Bt()}),Wn,xo,Es,To,Su,wi,Ni=o(()=>{Wn="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",xo="sampleRate",Es="ProcessLegacy",To="http.method",Su="https://dc.services.visualstudio.com",wi="not_specified"}),Kn,Pi,Wf=o(()=>{(function(r){r[r.LocalStorage=0]="LocalStorage",r[r.SessionStorage=1]="SessionStorage"})(Kn||(Kn={})),function(r){r[r.AI=0]="AI",r[r.AI_AND_W3C=1]="AI_AND_W3C",r[r.W3C=2]="W3C"}(Pi||(Pi={}))});function ku(){return Ru()?Co(Kn.LocalStorage):null}function Co(r){try{if(Fe(ie()))return null;var e=new Date,t=qr(r===Kn.LocalStorage?"localStorage":"sessionStorage");t.setItem(e.toString(),e.toString());var i=t.getItem(e.toString())!==e.toString();if(t.removeItem(e.toString()),!i)return t}catch(n){}return null}function Eu(){return Rs()?Co(Kn.SessionStorage):null}function Kf(){kn=!1,En=!1}function Ru(){return kn===void 0&&(kn=!!Co(Kn.LocalStorage)),kn}function Qf(r,e){var t=ku();if(t!==null)try{return t.getItem(e)}catch(i){kn=!1,r.throwInternal(Ne.WARNING,Me.BrowserCannotReadLocalStorage,"Browser failed read of local storage. "+It(i),{exception:Dt(i)})}return null}function Yf(r,e,t){var i=ku();if(i!==null)try{return i.setItem(e,t),!0}catch(n){kn=!1,r.throwInternal(Ne.WARNING,Me.BrowserCannotWriteLocalStorage,"Browser failed write to local storage. "+It(n),{exception:Dt(n)})}return!1}function Jf(r,e){var t=ku();if(t!==null)try{return t.removeItem(e),!0}catch(i){kn=!1,r.throwInternal(Ne.WARNING,Me.BrowserFailedRemovalFromLocalStorage,"Browser failed removal of local storage item. "+It(i),{exception:Dt(i)})}return!1}function Rs(){return En===void 0&&(En=!!Co(Kn.SessionStorage)),En}function M0(){var r=[];return Rs()&&zt(qr("sessionStorage"),function(e){r.push(e)}),r}function Mo(r,e){var t=Eu();if(t!==null)try{return t.getItem(e)}catch(i){En=!1,r.throwInternal(Ne.WARNING,Me.BrowserCannotReadSessionStorage,"Browser failed read of session storage. "+It(i),{exception:Dt(i)})}return null}function No(r,e,t){var i=Eu();if(i!==null)try{return i.setItem(e,t),!0}catch(n){En=!1,r.throwInternal(Ne.WARNING,Me.BrowserCannotWriteSessionStorage,"Browser failed write to session storage. "+It(n),{exception:Dt(n)})}return!1}function Zf(r,e){var t=Eu();if(t!==null)try{return t.removeItem(e),!0}catch(i){En=!1,r.throwInternal(Ne.WARNING,Me.BrowserFailedRemovalFromSessionStorage,"Browser failed removal of session storage item. "+It(i),{exception:Dt(i)})}return!1}var kn,En,Xf=o(()=>{Bt(),Wf(),kn=void 0,En=void 0});function Sa(r){var e=Cu,t=ih,i=t[e];return Tu.createElement?t[e]||(i=t[e]=Tu.createElement("a")):i={host:rh(r,!0)},i.href=r,e++,e>=t.length&&(e=0),Cu=e,i}function eh(r){var e,t=Sa(r);return t&&(e=t.href),e}function N0(r){var e,t=Sa(r);return t&&(e=t.pathname),e}function th(r,e){return r?r.toUpperCase()+" "+e:e}function rh(r,e){var t=xu(r,e)||"";if(t){var i=t.match(/(www[0-9]?\.)?(.[^/:]+)(\:[\d]+)?/i);if(i!=null&&i.length>3&&xt(i[2])&&i[2].length>0)return i[2]+(i[3]||"")}return t}function xu(r,e){var t=null;if(r){var i=r.match(/(\w*):\/\/(.[^/:]+)(\:[\d]+)?/i);if(i!=null&&i.length>2&&xt(i[2])&&i[2].length>0&&(t=i[2]||"",e&&i.length>2)){var n=(i[1]||"").toLowerCase(),s=i[3]||"";(n==="http"&&s===":80"||n==="https"&&s===":443")&&(s=""),t+=s}}return t}var Tu,Cu,ih,nh=o(()=>{Bt(),Tu=Vi()||{},Cu=0,ih=[null,null,null,null,null]});function Po(r){return sh.indexOf(r.toLowerCase())!==-1}function P0(r,e,t,i){var n,s=i,c=i;if(e&&e.length>0){var v=Sa(e);if(n=v.host,!s)if(v.pathname!=null){var S=v.pathname.length===0?"/":v.pathname;S.charAt(0)!=="/"&&(S="/"+S),c=v.pathname,s=Qr(r,t?t+" "+S:S)}else s=Qr(r,e)}else n=i,s=i;return{target:n,name:s,data:c}}function ka(){var r=en();if(r&&r.now&&r.timing){var e=r.now()+r.timing.navigationStart;if(e>0)return e}return ar()}function Yr(r,e){var t=null;return r!==0&&e!==0&&!Fe(r)&&!Fe(e)&&(t=e-r),t}var sh,Mu,ah,Rn,oh,lh=o(()=>{Bt(),Uf(),Mi(),Gf(),Ro(),Ni(),Xf(),nh(),sh=["https://dc.services.visualstudio.com/v2/track","https://breeze.aimon.applicationinsights.io/v2/track","https://dc-int.services.visualstudio.com/v2/track"],Mu={NotSpecified:wi,createDomEvent:ks,disableStorage:Kf,isInternalApplicationInsightsEndpoint:Po,canUseLocalStorage:Ru,getStorage:Qf,setStorage:Yf,removeStorage:Jf,canUseSessionStorage:Rs,getSessionStorageKeys:M0,getSessionStorage:Mo,setSessionStorage:No,removeSessionStorage:Zf,disableCookies:If,canUseCookies:w0,disallowsSameSiteNone:Ef,setCookie:S0,stringToBoolOrDefault:Kt,getCookie:_0,deleteCookie:k0,trim:gt,newId:ko,random32:function(){return jn(!0)},generateW3CId:Gi,isArray:et,isError:st,isDate:bi,toISOStringForIE8:Dr,getIEVersion:Bl,msToTimeSpan:nn,isCrossOriginError:zf,dump:Dt,getExceptionName:It,addEventHandler:ii,IsBeaconApiSupported:_u,getExtension:jf},ah={parseUrl:Sa,getAbsoluteUrl:eh,getPathName:N0,getCompleteUrl:th,parseHost:rh,parseFullHost:xu},Rn={correlationIdPrefix:"cid-v1:",canIncludeCorrelationHeader:function(r,e,t){if(!e||r&&r.disableCorrelationHeaders)return!1;if(r&&r.correlationHeaderExcludePatterns){for(var i=0;i<r.correlationHeaderExcludePatterns.length;i++)if(r.correlationHeaderExcludePatterns[i].test(e))return!1}var n=Sa(e).host.toLowerCase();if(n&&(n.indexOf(":443")!==-1||n.indexOf(":80")!==-1)&&(n=(xu(e,!0)||"").toLowerCase()),(!r||!r.enableCorsCorrelation)&&n&&n!==t)return!1;var s=r&&r.correlationHeaderDomains;if(s){var c;if($e(s,function(N){var U=new RegExp(N.toLowerCase().replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*"));c=c||U.test(n)}),!c)return!1}var v=r&&r.correlationHeaderExcludedDomains;if(!v||v.length===0)return!0;for(var i=0;i<v.length;i++){var S=new RegExp(v[i].toLowerCase().replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*"));if(S.test(n))return!1}return n&&n.length>0},getCorrelationContext:function(r){if(r){var e=Rn.getCorrelationContextValue(r,Xt.requestContextTargetKey);if(e&&e!==Rn.correlationIdPrefix)return e}},getCorrelationContextValue:function(r,e){if(r)for(var t=r.split(","),i=0;i<t.length;++i){var n=t[i].split("=");if(n.length===2&&n[0]===e)return n[1]}}},oh={Now:ka,GetDuration:Yr}});function uh(r){if(!r)return{};var e=r.split(ch),t=Ct(e,function(n,s){var c=s.split(dh);if(c.length===2){var v=c[0].toLowerCase(),S=c[1];n[v]=S}return n},{});if(yr(t).length>0){if(t.endpointsuffix){var i=t.location?t.location+".":"";t.ingestionendpoint=t.ingestionendpoint||"https://"+i+"dc."+t.endpointsuffix}t.ingestionendpoint=t.ingestionendpoint||Su}return t}var ch,dh,fh,A0=o(()=>{Ni(),Bt(),ch=";",dh="=",fh={parse:uh}}),Nu,hh=o(()=>{Nu=function(){function r(){}return r}()}),Pu,ph=o(()=>{L(),hh(),Pu=function(r){te(e,r);function e(){return r.call(this)||this}return e}(Nu)}),mh,I0=o(()=>{mh=function(){function r(){this.ver=1,this.sampleRate=100,this.tags={}}return r}()}),Au,D0=o(()=>{L(),I0(),Mi(),Bt(),Ni(),Au=function(r){te(e,r);function e(t,i,n){var s=r.call(this)||this;return s.name=Qr(t,n)||wi,s.data=i,s.time=Dr(new Date),s.aiDataContract={time:1,iKey:1,name:1,sampleRate:function(){return s.sampleRate===100?4:1},tags:1,data:1},s}return e}(mh)}),Iu,gh=o(()=>{Iu=function(){function r(){this.ver=2,this.properties={},this.measurements={}}return r}()}),Ai,F0=o(()=>{L(),gh(),Mi(),Ni(),Ai=function(r){te(e,r);function e(t,i,n,s){var c=r.call(this)||this;return c.aiDataContract={ver:1,name:1,properties:0,measurements:0},c.name=Qr(t,i)||wi,c.properties=_n(t,n),c.measurements=Sn(t,s),c}return e.envelopeType="Microsoft.ApplicationInsights.{0}.Event",e.dataType="EventData",e}(Iu)}),vh,O0=o(()=>{vh=function(){function r(){}return r}()}),bh,L0=o(()=>{bh=function(){function r(){this.ver=2,this.exceptions=[],this.properties={},this.measurements={}}return r}()}),yh,U0=o(()=>{yh=function(){function r(){this.hasFullStack=!0,this.parsedStack=[]}return r}()});function Du(r,e){var t=r;return t&&!xt(t)&&(JSON&&JSON.stringify?(t=JSON.stringify(r),e&&(!t||t==="{}")&&(Ge(r.toString)?t=r.toString():t=""+r)):t=""+r+" - (Missing JSON.stringify)"),t||""}function wh(r,e){var t=r;return r&&(t=r[Do]||r[Lu]||"",t&&!xt(t)&&(t=Du(t,!0)),r.filename&&(t=t+" @"+(r.filename||"")+":"+(r.lineno||"?")+":"+(r.colno||"?"))),e&&e!=="String"&&e!=="Object"&&e!=="Error"&&(t||"").indexOf(e)===-1&&(t=e+": "+t),t||""}function B0(r){return rt(r)?"hasFullStack"in r&&"typeName"in r:!1}function q0(r){return rt(r)?"ver"in r&&"exceptions"in r&&"properties"in r:!1}function _h(r){return r&&r.src&&xt(r.src)&&r.obj&&et(r.obj)}function xs(r){var e=r||"";xt(e)||(xt(e[fi])?e=e[fi]:e=""+e);var t=e.split(`
`);return{src:e,obj:t}}function H0(r){for(var e=[],t=r.split(`
`),i=0;i<t.length;i++){var n=t[i];t[i+1]&&(n+="@"+t[i+1],i++),e.push(n)}return{src:r,obj:e}}function Sh(r){var e=null;if(r)try{if(r[fi])e=xs(r[fi]);else if(r[Qn]&&r[Qn][fi])e=xs(r[Qn][fi]);else if(r.exception&&r.exception[fi])e=xs(r.exception[fi]);else if(_h(r))e=r;else if(_h(r[Io]))e=r[Io];else if(window.opera&&r[Do])e=H0(r.message);else if(xt(r))e=xs(r);else{var t=r[Do]||r[Lu]||"";xt(r[Ou])&&(t&&(t+=`
`),t+=" from "+r[Ou]),t&&(e=xs(t))}}catch(i){e=xs(i)}return e||{src:"",obj:null}}function V0(r){var e="";return r&&(r.obj?$e(r.obj,function(t){e+=t+`
`}):e=r.src||""),e}function $0(r){var e,t=r.obj;if(t&&t.length>0){e=[];var i=0,n=0;$e(t,function(be){var ye=be.toString();if(Fo.regex.test(ye)){var ge=new Fo(ye,i++);n+=ge.sizeInBytes,e.push(ge)}});var s=32*1024;if(n>s)for(var c=0,v=e.length-1,S=0,N=c,U=v;c<v;){var X=e[c].sizeInBytes,ne=e[v].sizeInBytes;if(S+=X+ne,S>s){var ce=U-N+1;e.splice(N,ce);break}N=c,U=v,c++,v--}}return e}function Ao(r){var e="";if(r&&(e=r.typeName||r.name||"",!e))try{var t=/function (.{1,200})\(/,i=t.exec(r.constructor.toString());e=i&&i.length>1?i[1]:""}catch(n){}return e}function Fu(r){if(r)try{if(!xt(r)){var e=Ao(r),t=Du(r,!1);return(!t||t==="{}")&&(r[Qn]&&(r=r[Qn],e=Ao(r)),t=Du(r,!0)),t.indexOf(e)!==0&&e!=="String"?e+":"+t:t}}catch(i){}return""+(r||"")}var kh,Qn,fi,Io,Ou,Do,Lu,Jr,Uu,Fo,G0=o(()=>{L(),O0(),L0(),U0(),Mi(),Bt(),Ni(),kh="<no_method>",Qn="error",fi="stack",Io="stackDetails",Ou="errorSrc",Do="message",Lu="description",Jr=function(r){te(e,r);function e(t,i,n,s,c,v){var S=r.call(this)||this;return S.aiDataContract={ver:1,exceptions:1,severityLevel:0,properties:0,measurements:0},q0(i)?(S.exceptions=i.exceptions,S.properties=i.properties,S.measurements=i.measurements,i.severityLevel&&(S.severityLevel=i.severityLevel),i.id&&(S.id=i.id),i.problemGroup&&(S.problemGroup=i.problemGroup),S.ver=2,Fe(i.isManual)||(S.isManual=i.isManual)):(n||(n={}),S.exceptions=[new Uu(t,i,n)],S.properties=_n(t,n),S.measurements=Sn(t,s),c&&(S.severityLevel=c),v&&(S.id=v)),S}return e.CreateAutoException=function(t,i,n,s,c,v,S,N){var U=Ao(c||v||t);return{message:wh(t,U),url:i,lineNumber:n,columnNumber:s,error:Fu(c||v||t),evt:Fu(v||t),typeName:U,stackDetails:Sh(S||c||v),errorSrc:N}},e.CreateFromInterface=function(t,i,n,s){var c=i.exceptions&&$r(i.exceptions,function(S){return Uu.CreateFromInterface(t,S)}),v=new e(t,a({},i,{exceptions:c}),n,s);return v},e.prototype.toInterface=function(){var t=this,i=t.exceptions,n=t.properties,s=t.measurements,c=t.severityLevel,v=t.ver,S=t.problemGroup,N=t.id,U=t.isManual,X=i instanceof Array&&$r(i,function(ne){return ne.toInterface()})||void 0;return{ver:"4.0",exceptions:X,severityLevel:c,properties:n,measurements:s,problemGroup:S,id:N,isManual:U}},e.CreateSimpleException=function(t,i,n,s,c,v){return{exceptions:[{hasFullStack:!0,message:t,stack:c,typeName:i}]}},e.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",e.dataType="ExceptionData",e.formatError=Fu,e}(bh),Uu=function(r){te(e,r);function e(t,i,n){var s=r.call(this)||this;if(s.aiDataContract={id:0,outerId:0,typeName:1,message:1,hasFullStack:0,stack:0,parsedStack:2},B0(i))s.typeName=i.typeName,s.message=i.message,s[fi]=i[fi],s.parsedStack=i.parsedStack,s.hasFullStack=i.hasFullStack;else{var c=i,v=c&&c.evt;st(c)||(c=c[Qn]||v||c),s.typeName=Qr(t,Ao(c))||wi,s.message=yu(t,wh(i||c,s.typeName))||wi;var S=i[Io]||Sh(i);s.parsedStack=$0(S),s[fi]=qf(t,V0(S)),s.hasFullStack=et(s.parsedStack)&&s.parsedStack.length>0,n&&(n.typeName=n.typeName||s.typeName)}return s}return e.prototype.toInterface=function(){var t=this.parsedStack instanceof Array&&$r(this.parsedStack,function(n){return n.toInterface()}),i={id:this.id,outerId:this.outerId,typeName:this.typeName,message:this.message,hasFullStack:this.hasFullStack,stack:this[fi],parsedStack:t||void 0};return i},e.CreateFromInterface=function(t,i){var n=i.parsedStack instanceof Array&&$r(i.parsedStack,function(c){return Fo.CreateFromInterface(c)})||i.parsedStack,s=new e(t,a({},i,{parsedStack:n}));return s},e}(yh),Fo=function(r){te(e,r);function e(t,i){var n=r.call(this)||this;if(n.sizeInBytes=0,n.aiDataContract={level:1,method:1,assembly:0,fileName:0,line:0},typeof t=="string"){var s=t;n.level=i,n.method=kh,n.assembly=gt(s),n.fileName="",n.line=0;var c=s.match(e.regex);c&&c.length>=5&&(n.method=gt(c[2])||n.method,n.fileName=gt(c[4]),n.line=parseInt(c[5])||0)}else n.level=t.level,n.method=t.method,n.assembly=t.assembly,n.fileName=t.fileName,n.line=t.line,n.sizeInBytes=0;return n.sizeInBytes+=n.method.length,n.sizeInBytes+=n.fileName.length,n.sizeInBytes+=n.assembly.length,n.sizeInBytes+=e.baseSize,n.sizeInBytes+=n.level.toString().length,n.sizeInBytes+=n.line.toString().length,n}return e.CreateFromInterface=function(t){return new e(t,null)},e.prototype.toInterface=function(){return{level:this.level,method:this.method,assembly:this.assembly,fileName:this.fileName,line:this.line}},e.regex=/^([\s]+at)?[\s]{0,50}([^\@\()]+?)[\s]{0,50}(\@|\()([^\(\n]+):([0-9]+):([0-9]+)(\)?)$/,e.baseSize=58,e}(vh)}),Eh,j0=o(()=>{Eh=function(){function r(){this.ver=2,this.metrics=[],this.properties={},this.measurements={}}return r}()}),Bu,z0=o(()=>{(function(r){r[r.Measurement=0]="Measurement",r[r.Aggregation=1]="Aggregation"})(Bu||(Bu={}))}),Rh,W0=o(()=>{z0(),Rh=function(){function r(){this.kind=Bu.Measurement}return r}()}),xh,K0=o(()=>{L(),W0(),xh=function(r){te(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.aiDataContract={name:1,kind:0,value:1,count:0,min:0,max:0,stdDev:0},t}return e}(Rh)}),ji,Q0=o(()=>{L(),j0(),Mi(),K0(),Ni(),ji=function(r){te(e,r);function e(t,i,n,s,c,v,S,N){var U=r.call(this)||this;U.aiDataContract={ver:1,metrics:1,properties:0};var X=new xh;return X.count=s>0?s:void 0,X.max=isNaN(v)||v===null?void 0:v,X.min=isNaN(c)||c===null?void 0:c,X.name=Qr(t,i)||wi,X.value=n,U.metrics=[X],U.properties=_n(t,S),U.measurements=Sn(t,N),U}return e.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",e.dataType="MetricData",e}(Eh)}),Oo,qu=o(()=>{L(),gh(),Oo=function(r){te(e,r);function e(){var t=r.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return e}(Iu)}),Ii,Y0=o(()=>{L(),qu(),Mi(),Ro(),Ni(),Ii=function(r){te(e,r);function e(t,i,n,s,c,v,S){var N=r.call(this)||this;return N.aiDataContract={ver:1,name:0,url:0,duration:0,properties:0,measurements:0,id:0},N.id=Hf(t,S),N.url=_a(t,n),N.name=Qr(t,i)||wi,isNaN(s)||(N.duration=nn(s)),N.properties=_n(t,c),N.measurements=Sn(t,v),N}return e.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",e.dataType="PageviewData",e}(Oo)}),Th,J0=o(()=>{Th=function(){function r(){this.ver=2,this.success=!0,this.properties={},this.measurements={}}return r}()}),zi,Z0=o(()=>{L(),Mi(),lh(),J0(),Ro(),zi=function(r){te(e,r);function e(t,i,n,s,c,v,S,N,U,X,ne,ce){U===void 0&&(U="Ajax");var be=r.call(this)||this;be.aiDataContract={id:1,ver:1,name:0,resultCode:0,duration:0,success:0,data:0,target:0,type:0,properties:0,measurements:0,kind:0,value:0,count:0,min:0,max:0,stdDev:0,dependencyKind:0,dependencySource:0,commandName:0,dependencyTypeName:0},be.id=i,be.duration=nn(c),be.success=v,be.resultCode=S+"",be.type=Qr(t,U);var ye=P0(t,n,N,s);return be.data=_a(t,s)||ye.data,be.target=Qr(t,ye.target),X&&(be.target=be.target+" | "+X),be.name=Qr(t,ye.name),be.properties=_n(t,ne),be.measurements=Sn(t,ce),be}return e.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",e.dataType="RemoteDependencyData",e}(Th)}),Ch,X0=o(()=>{Ch=function(){function r(){this.ver=2,this.properties={},this.measurements={}}return r}()}),sn,eb=o(()=>{L(),X0(),Mi(),Ni(),sn=function(r){te(e,r);function e(t,i,n,s,c){var v=r.call(this)||this;return v.aiDataContract={ver:1,message:1,severityLevel:0,properties:0},i=i||wi,v.message=yu(t,i),v.properties=_n(t,s),v.measurements=Sn(t,c),n&&(v.severityLevel=n),v}return e.envelopeType="Microsoft.ApplicationInsights.{0}.Message",e.dataType="MessageData",e}(Ch)}),Mh,tb=o(()=>{L(),qu(),Mh=function(r){te(e,r);function e(){var t=r.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return e}(Oo)}),an,rb=o(()=>{L(),tb(),Mi(),Ni(),an=function(r){te(e,r);function e(t,i,n,s,c,v,S){var N=r.call(this)||this;return N.aiDataContract={ver:1,name:0,url:0,duration:0,perfTotal:0,networkConnect:0,sentRequest:0,receivedResponse:0,domProcessing:0,properties:0,measurements:0},N.url=_a(t,n),N.name=Qr(t,i)||wi,N.properties=_n(t,c),N.measurements=Sn(t,v),S&&(N.domProcessing=S.domProcessing,N.duration=S.duration,N.networkConnect=S.networkConnect,N.perfTotal=S.perfTotal,N.receivedResponse=S.receivedResponse,N.sentRequest=S.sentRequest),N}return e.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",e.dataType="PageviewPerformanceData",e}(Mh)}),on,ib=o(()=>{L(),ph(),on=function(r){te(e,r);function e(t,i){var n=r.call(this)||this;return n.aiDataContract={baseType:1,baseData:1},n.baseType=t,n.baseData=i,n}return e}(Pu)}),Ea,nb=o(()=>{(function(r){r[r.Verbose=0]="Verbose",r[r.Information=1]="Information",r[r.Warning=2]="Warning",r[r.Error=3]="Error",r[r.Critical=4]="Critical"})(Ea||(Ea={}))}),Nh,sb=o(()=>{Bt(),Nh=function(){function r(){}return r.getConfig=function(e,t,i,n){n===void 0&&(n=!1);var s;return i&&e.extensionConfig&&e.extensionConfig[i]&&!Fe(e.extensionConfig[i][t])?s=e.extensionConfig[i][t]:s=e[t],Fe(s)?n:s},r}()});function xn(r){var e="ai."+r+".";return function(t){return e+t}}var Ts,mr,Ra,Yn,Lo,ln,Tn,Cs,Uo,Ph=o(()=>{L(),Bt(),Ts=xn("application"),mr=xn("device"),Ra=xn("location"),Yn=xn("operation"),Lo=xn("session"),ln=xn("user"),Tn=xn("cloud"),Cs=xn("internal"),Uo=function(r){te(e,r);function e(){return r.call(this)||this}return e}(di({applicationVersion:Ts("ver"),applicationBuild:Ts("build"),applicationTypeId:Ts("typeId"),applicationId:Ts("applicationId"),applicationLayer:Ts("layer"),deviceId:mr("id"),deviceIp:mr("ip"),deviceLanguage:mr("language"),deviceLocale:mr("locale"),deviceModel:mr("model"),deviceFriendlyName:mr("friendlyName"),deviceNetwork:mr("network"),deviceNetworkName:mr("networkName"),deviceOEMName:mr("oemName"),deviceOS:mr("os"),deviceOSVersion:mr("osVersion"),deviceRoleInstance:mr("roleInstance"),deviceRoleName:mr("roleName"),deviceScreenResolution:mr("screenResolution"),deviceType:mr("type"),deviceMachineName:mr("machineName"),deviceVMName:mr("vmName"),deviceBrowser:mr("browser"),deviceBrowserVersion:mr("browserVersion"),locationIp:Ra("ip"),locationCountry:Ra("country"),locationProvince:Ra("province"),locationCity:Ra("city"),operationId:Yn("id"),operationName:Yn("name"),operationParentId:Yn("parentId"),operationRootId:Yn("rootId"),operationSyntheticSource:Yn("syntheticSource"),operationCorrelationVector:Yn("correlationVector"),sessionId:Lo("id"),sessionIsFirst:Lo("isFirst"),sessionIsNew:Lo("isNew"),userAccountAcquisitionDate:ln("accountAcquisitionDate"),userAccountId:ln("accountId"),userAgent:ln("userAgent"),userId:ln("id"),userStoreRegion:ln("storeRegion"),userAuthUserId:ln("authUserId"),userAnonymousUserAcquisitionDate:ln("anonUserAcquisitionDate"),userAuthenticatedUserAcquisitionDate:ln("authUserAcquisitionDate"),cloudName:Tn("name"),cloudRole:Tn("role"),cloudRoleVer:Tn("roleVer"),cloudRoleInstance:Tn("roleInstance"),cloudEnvironment:Tn("environment"),cloudLocation:Tn("location"),cloudDeploymentUnit:Tn("deploymentUnit"),internalNodeName:Cs("nodeName"),internalSdkVersion:Cs("sdkVersion"),internalAgentVersion:Cs("agentVersion"),internalSnippet:Cs("snippet"),internalSdkSrc:Cs("sdkSrc")}))}),Wi,ab=o(()=>{Mi(),Bt(),Ni(),Wi=function(){function r(){}return r.create=function(e,t,i,n,s,c){if(i=Qr(n,i)||wi,Fe(e)||Fe(t)||Fe(i))throw Error("Input doesn't contain all required fields");var v={name:i,time:Dr(new Date),iKey:"",ext:c||{},tags:[],data:{},baseType:t,baseData:e};return Fe(s)||zt(s,function(S,N){v.data[S]=N}),v},r}()}),Zr,Yt,ob=o(()=>{Ph(),Zr={UserExt:"user",DeviceExt:"device",TraceExt:"trace",WebExt:"web",AppExt:"app",OSExt:"os",SessionExt:"ses",SDKExt:"sdk"},Yt=new Uo}),Ms,Bo,Hu,wr=o(()=>{lh(),A0(),Uf(),Ni(),ph(),hh(),D0(),F0(),G0(),Q0(),Y0(),qu(),Z0(),eb(),rb(),ib(),nb(),sb(),Ph(),Mi(),ab(),ob(),Wf(),Ro(),Gf(),Xf(),nh(),Ms="AppInsightsPropertiesPlugin",Bo="AppInsightsChannelPlugin",Hu="ApplicationInsightsAnalytics"}),Ah,lb=o(()=>{wr(),Bt(),Rt(),Ah=function(){function r(e,t,i,n){Ue(r,this,function(s){var c=null,v=[],S=!1,N;i&&(N=i.logger);function U(){i&&$e(i.getTransmissionControls(),function(ne){$e(ne,function(ce){return ce.flush(!0)})})}function X(ne){v.push(ne),c||(c=setInterval(function(){var ce=v.slice(0),be=!1;v=[],$e(ce,function(ye){ye()?be=!0:v.push(ye)}),v.length===0&&(clearInterval(c),c=null),be&&U()},100))}s.trackPageView=function(ne,ce){var be=ne.name;if(Fe(be)||typeof be!="string"){var ye=Vi();be=ne.name=ye&&ye.title||""}var ge=ne.uri;if(Fe(ge)||typeof ge!="string"){var ve=Hn();ge=ne.uri=ve&&ve.href||""}if(!n.isPerformanceTimingSupported()){e.sendPageViewInternal(ne,ce),U(),N.throwInternal(Ne.WARNING,Me.NavigationTimingNotSupported,"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.");return}var ke=!1,Ce,Pe=n.getPerformanceTiming().navigationStart;Pe>0&&(Ce=Yr(Pe,+new Date),n.shouldCollectDuration(Ce)||(Ce=void 0));var Oe;!Fe(ce)&&!Fe(ce.duration)&&(Oe=ce.duration),(t||!isNaN(Oe))&&(isNaN(Oe)&&(ce||(ce={}),ce.duration=Ce),e.sendPageViewInternal(ne,ce),U(),ke=!0);var Ze=6e4;ce||(ce={}),X(function(){var wt=!1;try{if(n.isPerformanceTimingDataReady()){wt=!0;var ct={name:be,uri:ge};n.populatePageViewPerformanceEvent(ct),!ct.isValid&&!ke?(ce.duration=Ce,e.sendPageViewInternal(ne,ce)):(ke||(ce.duration=ct.durationMs,e.sendPageViewInternal(ne,ce)),S||(e.sendPageViewPerformanceInternal(ct,ce),S=!0))}else Pe>0&&Yr(Pe,+new Date)>Ze&&(wt=!0,ke||(ce.duration=Ze,e.sendPageViewInternal(ne,ce)))}catch(_t){N.throwInternal(Ne.CRITICAL,Me.TrackPVFailedCalc,"trackPageView failed on page load calculation: "+It(_t),{exception:Dt(_t)})}return wt})}})}return r}()}),Ih,Dh,ub=o(()=>{wr(),Bt(),Ih=function(){function r(e,t){this.prevPageVisitDataKeyName="prevPageVisitData",this.pageVisitTimeTrackingHandler=t,this._logger=e}return r.prototype.trackPreviousPageVisit=function(e,t){try{var i=this.restartPageVisitTimer(e,t);i&&this.pageVisitTimeTrackingHandler(i.pageName,i.pageUrl,i.pageVisitTime)}catch(n){this._logger.warnToConsole("Auto track page visit time failed, metric will not be collected: "+Dt(n))}},r.prototype.restartPageVisitTimer=function(e,t){try{var i=this.stopPageVisitTimer();return this.startPageVisitTimer(e,t),i}catch(n){return this._logger.warnToConsole("Call to restart failed: "+Dt(n)),null}},r.prototype.startPageVisitTimer=function(e,t){try{if(Rs()){Mo(this._logger,this.prevPageVisitDataKeyName)!=null&&fr("Cannot call startPageVisit consecutively without first calling stopPageVisit");var i=new Dh(e,t),n=Ci().stringify(i);No(this._logger,this.prevPageVisitDataKeyName,n)}}catch(s){this._logger.warnToConsole("Call to start failed: "+Dt(s))}},r.prototype.stopPageVisitTimer=function(){try{if(Rs()){var e=ar(),t=Mo(this._logger,this.prevPageVisitDataKeyName);if(t&&ps()){var i=Ci().parse(t);return i.pageVisitTime=e-i.pageVisitStartTime,Zf(this._logger,this.prevPageVisitDataKeyName),i}else return null}return null}catch(n){return this._logger.warnToConsole("Stop page visit timer failed: "+Dt(n)),null}},r}(),Dh=function(){function r(e,t){this.pageVisitStartTime=ar(),this.pageName=e,this.pageUrl=t}return r}()}),Fh,cb=o(()=>{wr(),Bt(),Fh=function(){function r(e){this.MAX_DURATION_ALLOWED=36e5,e&&(this._logger=e.logger)}return r.prototype.populatePageViewPerformanceEvent=function(e){e.isValid=!1;var t=this.getPerformanceNavigationTiming(),i=this.getPerformanceTiming(),n=0,s=0,c=0,v=0,S=0;(t||i)&&(t?(n=t.duration,s=t.startTime===0?t.connectEnd:Yr(t.startTime,t.connectEnd),c=Yr(t.requestStart,t.responseStart),v=Yr(t.responseStart,t.responseEnd),S=Yr(t.responseEnd,t.loadEventEnd)):(n=Yr(i.navigationStart,i.loadEventEnd),s=Yr(i.navigationStart,i.connectEnd),c=Yr(i.requestStart,i.responseStart),v=Yr(i.responseStart,i.responseEnd),S=Yr(i.responseEnd,i.loadEventEnd)),n===0?this._logger.throwInternal(Ne.WARNING,Me.ErrorPVCalc,"error calculating page view performance.",{total:n,network:s,request:c,response:v,dom:S}):this.shouldCollectDuration(n,s,c,v,S)?n<Math.floor(s)+Math.floor(c)+Math.floor(v)+Math.floor(S)?this._logger.throwInternal(Ne.WARNING,Me.ClientPerformanceMathError,"client performance math error.",{total:n,network:s,request:c,response:v,dom:S}):(e.durationMs=n,e.perfTotal=e.duration=nn(n),e.networkConnect=nn(s),e.sentRequest=nn(c),e.receivedResponse=nn(v),e.domProcessing=nn(S),e.isValid=!0):this._logger.throwInternal(Ne.WARNING,Me.InvalidDurationValue,"Invalid page load duration value. Browser perf data won't be sent.",{total:n,network:s,request:c,response:v,dom:S}))},r.prototype.getPerformanceTiming=function(){return this.isPerformanceTimingSupported()?en().timing:null},r.prototype.getPerformanceNavigationTiming=function(){return this.isPerformanceNavigationTimingSupported()?en().getEntriesByType("navigation")[0]:null},r.prototype.isPerformanceNavigationTimingSupported=function(){var e=en();return e&&e.getEntriesByType&&e.getEntriesByType("navigation").length>0},r.prototype.isPerformanceTimingSupported=function(){var e=en();return e&&e.timing},r.prototype.isPerformanceTimingDataReady=function(){var e=en(),t=e?e.timing:0;return t&&t.domainLookupStart>0&&t.navigationStart>0&&t.responseStart>0&&t.requestStart>0&&t.loadEventEnd>0&&t.responseEnd>0&&t.connectEnd>0&&t.domLoading>0},r.prototype.shouldCollectDuration=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=$i()||{},n=["googlebot","adsbot-google","apis-google","mediapartners-google"],s=i.userAgent,c=!1;if(s)for(var v=0;v<n.length;v++)c=c||s.toLowerCase().indexOf(n[v])!==-1;if(c)return!1;for(var v=0;v<e.length;v++)if(e[v]<0||e[v]>=this.MAX_DURATION_ALLOWED)return!1;return!0},r}()});function xa(r,e){r&&r.dispatchEvent&&e&&r.dispatchEvent(e)}var Vu,qo,$u,Gu,db=o(()=>{L(),wr(),Bt(),lb(),ub(),cb(),Rt(),Vu="duration",qo="event",$u=function(r){te(e,r);function e(){var t=r.call(this)||this;t.identifier=Hu,t.priority=180,t.autoRoutePVDelay=500;var i,n,s,c=0,v,S;return Ue(e,t,function(N,U){var X=Hn(!0);v=X&&X.href||"",N.getCookieMgr=function(){return Zl(N.core)},N.processTelemetry=function(ge,ve){gs(N.core,function(){return N.identifier+":processTelemetry"},function(){var ke=!1,Ce=N._telemetryInitializers.length;ve=N._getTelCtx(ve);for(var Pe=0;Pe<Ce;++Pe){var Oe=N._telemetryInitializers[Pe];if(Oe)try{if(Oe.apply(null,[ge])===!1){ke=!0;break}}catch(Ze){ve.diagLog().throwInternal(Ne.CRITICAL,Me.TelemetryInitializerFailed,"One of telemetry initializers failed, telemetry item will not be sent: "+It(Ze),{exception:Dt(Ze)},!0)}}ke||N.processNext(ge,ve)},function(){return{item:ge}},!ge.sync)},N.trackEvent=function(ge,ve){try{var ke=Wi.create(ge,Ai.dataType,Ai.envelopeType,N.diagLog(),ve);N.core.track(ke)}catch(Ce){N.diagLog().throwInternal(Ne.WARNING,Me.TrackTraceFailed,"trackTrace failed, trace will not be collected: "+It(Ce),{exception:Dt(Ce)})}},N.startTrackEvent=function(ge){try{i.start(ge)}catch(ve){N.diagLog().throwInternal(Ne.CRITICAL,Me.StartTrackEventFailed,"startTrackEvent failed, event will not be collected: "+It(ve),{exception:Dt(ve)})}},N.stopTrackEvent=function(ge,ve,ke){try{i.stop(ge,void 0,ve)}catch(Ce){N.diagLog().throwInternal(Ne.CRITICAL,Me.StopTrackEventFailed,"stopTrackEvent failed, event will not be collected: "+It(Ce),{exception:Dt(Ce)})}},N.trackTrace=function(ge,ve){try{var ke=Wi.create(ge,sn.dataType,sn.envelopeType,N.diagLog(),ve);N.core.track(ke)}catch(Ce){N.diagLog().throwInternal(Ne.WARNING,Me.TrackTraceFailed,"trackTrace failed, trace will not be collected: "+It(Ce),{exception:Dt(Ce)})}},N.trackMetric=function(ge,ve){try{var ke=Wi.create(ge,ji.dataType,ji.envelopeType,N.diagLog(),ve);N.core.track(ke)}catch(Ce){N.diagLog().throwInternal(Ne.CRITICAL,Me.TrackMetricFailed,"trackMetric failed, metric will not be collected: "+It(Ce),{exception:Dt(Ce)})}},N.trackPageView=function(ge,ve){try{var ke=ge||{};N._pageViewManager.trackPageView(ke,a({},ke.properties,ke.measurements,ve)),N.config.autoTrackPageVisitTime&&N._pageVisitTimeManager.trackPreviousPageVisit(ke.name,ke.uri)}catch(Ce){N.diagLog().throwInternal(Ne.CRITICAL,Me.TrackPVFailed,"trackPageView failed, page view will not be collected: "+It(Ce),{exception:Dt(Ce)})}},N.sendPageViewInternal=function(ge,ve,ke){var Ce=Vi();Ce&&(ge.refUri=ge.refUri===void 0?Ce.referrer:ge.refUri);var Pe=Wi.create(ge,Ii.dataType,Ii.envelopeType,N.diagLog(),ve,ke);N.core.track(Pe),c=0},N.sendPageViewPerformanceInternal=function(ge,ve,ke){var Ce=Wi.create(ge,an.dataType,an.envelopeType,N.diagLog(),ve,ke);N.core.track(Ce)},N.trackPageViewPerformance=function(ge,ve){try{N._pageViewPerformanceManager.populatePageViewPerformanceEvent(ge),N.sendPageViewPerformanceInternal(ge,ve)}catch(ke){N.diagLog().throwInternal(Ne.CRITICAL,Me.TrackPVFailed,"trackPageViewPerformance failed, page view will not be collected: "+It(ke),{exception:Dt(ke)})}},N.startTrackPage=function(ge){try{if(typeof ge!="string"){var ve=Vi();ge=ve&&ve.title||""}n.start(ge)}catch(ke){N.diagLog().throwInternal(Ne.CRITICAL,Me.StartTrackFailed,"startTrackPage failed, page view may not be collected: "+It(ke),{exception:Dt(ke)})}},N.stopTrackPage=function(ge,ve,ke,Ce){try{if(typeof ge!="string"){var Pe=Vi();ge=Pe&&Pe.title||""}if(typeof ve!="string"){var Oe=Hn();ve=Oe&&Oe.href||""}n.stop(ge,ve,ke,Ce),N.config.autoTrackPageVisitTime&&N._pageVisitTimeManager.trackPreviousPageVisit(ge,ve)}catch(Ze){N.diagLog().throwInternal(Ne.CRITICAL,Me.StopTrackFailed,"stopTrackPage failed, page view will not be collected: "+It(Ze),{exception:Dt(Ze)})}},N.sendExceptionInternal=function(ge,ve,ke){var Ce=ge.exception||ge.error||new Error(wi),Pe=new Jr(N.diagLog(),Ce,ge.properties||ve,ge.measurements,ge.severityLevel,ge.id).toInterface(),Oe=Wi.create(Pe,Jr.dataType,Jr.envelopeType,N.diagLog(),ve,ke);N.core.track(Oe)},N.trackException=function(ge,ve){try{N.sendExceptionInternal(ge,ve)}catch(ke){N.diagLog().throwInternal(Ne.CRITICAL,Me.TrackExceptionFailed,"trackException failed, exception will not be collected: "+It(ke),{exception:Dt(ke)})}},N._onerror=function(ge){var ve=ge&&ge.error,ke=ge&&ge.evt;try{if(!ke){var Ce=ha();Ce&&(ke=Ce[qo])}var Pe=ge&&ge.url||(Vi()||{}).URL,Oe=ge.errorSrc||"window.onerror@"+Pe+":"+(ge.lineNumber||0)+":"+(ge.columnNumber||0),Ze={errorSrc:Oe,url:Pe,lineNumber:ge.lineNumber||0,columnNumber:ge.columnNumber||0,message:ge.message};zf(ge.message,ge.url,ge.lineNumber,ge.columnNumber,ge.error)?ye(Jr.CreateAutoException("Script error: The browser's same-origin policy prevents us from getting the details of this exception. Consider using the 'crossorigin' attribute.",Pe,ge.lineNumber||0,ge.columnNumber||0,ve,ke,null,Oe),Ze):(ge.errorSrc||(ge.errorSrc=Oe),N.trackException({exception:ge,severityLevel:Ea.Error},Ze))}catch(ct){var wt=ve?ve.name+", "+ve.message:"null";N.diagLog().throwInternal(Ne.CRITICAL,Me.ExceptionWhileLoggingError,"_onError threw exception while logging error, error will not be collected: "+It(ct),{exception:Dt(ct),errorString:wt})}},N.addTelemetryInitializer=function(ge){N._telemetryInitializers.push(ge)},N.initialize=function(ge,ve,ke,Ce){if(!N.isInitialized()){if(Fe(ve))throw Error("Error initializing");U.initialize(ge,ve,ke,Ce),N.setInitialized(!1);var Pe=N._getTelCtx(),Oe=N.identifier;N.config=Pe.getExtCfg(Oe);var Ze=e.getDefaultConfig(ge);Ze!==void 0&&zt(Ze,function(Je,Et){N.config[Je]=Pe.getConfig(Oe,Je,Et),N.config[Je]===void 0&&(N.config[Je]=Et)}),N.config.isStorageUseDisabled&&Kf();var wt={instrumentationKey:function(){return ge.instrumentationKey},accountId:function(){return N.config.accountId||ge.accountId},sessionRenewalMs:function(){return N.config.sessionRenewalMs||ge.sessionRenewalMs},sessionExpirationMs:function(){return N.config.sessionExpirationMs||ge.sessionExpirationMs},sampleRate:function(){return N.config.samplingPercentage||ge.samplingPercentage},sdkExtension:function(){return N.config.sdkExtension||ge.sdkExtension},isBrowserLinkTrackingEnabled:function(){return N.config.isBrowserLinkTrackingEnabled||ge.isBrowserLinkTrackingEnabled},appId:function(){return N.config.appId||ge.appId}};N._pageViewPerformanceManager=new Fh(N.core),N._pageViewManager=new Ah(t,N.config.overridePageViewDuration,N.core,N._pageViewPerformanceManager),N._pageVisitTimeManager=new Ih(N.diagLog(),function(Je,Et,Tt){return ne(Je,Et,Tt)}),N._telemetryInitializers=N._telemetryInitializers||[],ce(wt),i=new Gu(N.diagLog(),"trackEvent"),i.action=function(Je,Et,Tt,Lt){Lt||(Lt={}),Lt[Vu]=Tt.toString(),N.trackEvent({name:Je,properties:Lt})},n=new Gu(N.diagLog(),"trackPageView"),n.action=function(Je,Et,Tt,Lt,Vt){Fe(Lt)&&(Lt={}),Lt[Vu]=Tt.toString();var er={name:Je,uri:Et,properties:Lt,measurements:Vt};N.sendPageViewInternal(er,Lt)};var ct=ha(),_t=s0(),nr=Hn(!0),Ur=t;if(N.config.disableExceptionTracking===!1&&!N.config.autoExceptionInstrumented&&ct){var ur="onerror",Qt=ct[ur];ct.onerror=function(Je,Et,Tt,Lt,Vt){var er=ct[qo],qn=Qt&&Qt(Je,Et,Tt,Lt,Vt);return qn!==!0&&Ur._onerror(Jr.CreateAutoException(Je,Et,Tt,Lt,Vt,er)),qn},N.config.autoExceptionInstrumented=!0}if(N.config.disableExceptionTracking===!1&&N.config.enableUnhandledPromiseRejectionTracking===!0&&!N.config.autoUnhandledPromiseInstrumented&&ct){var Le="onunhandledrejection",We=ct[Le];ct[Le]=function(Je){var Et=ct[qo],Tt=We&&We.call(ct,Je);return Tt!==!0&&Ur._onerror(Jr.CreateAutoException(Je.reason.toString(),nr?nr.href:"",0,0,Je,Et)),Tt},N.config.autoUnhandledPromiseInstrumented=!0}if(N.config.enableAutoRouteTracking===!0&&_t&&Ge(_t.pushState)&&Ge(_t.replaceState)&&ct&&typeof Event!="undefined"){var Xe=t;$e(ke,function(Je){Je.identifier===Ms&&(s=Je)}),_t.pushState=function(Je){return function(){var Et=Je.apply(this,arguments);return xa(ct,ks(Xe.config.namePrefix+"pushState")),xa(ct,ks(Xe.config.namePrefix+"locationchange")),Et}}(_t.pushState),_t.replaceState=function(Je){return function(){var Et=Je.apply(this,arguments);return xa(ct,ks(Xe.config.namePrefix+"replaceState")),xa(ct,ks(Xe.config.namePrefix+"locationchange")),Et}}(_t.replaceState),ct.addEventListener&&(ct.addEventListener(Xe.config.namePrefix+"popstate",function(){xa(ct,ks(Xe.config.namePrefix+"locationchange"))}),ct.addEventListener(Xe.config.namePrefix+"locationchange",function(){if(s&&s.context&&s.context.telemetryTrace){s.context.telemetryTrace.traceID=Gi();var Je="_unknown_";nr&&nr.pathname&&(Je=nr.pathname+(nr.hash||"")),s.context.telemetryTrace.name=Je}S&&(v=S),S=nr&&nr.href||"",setTimeout(function(Et){Xe.trackPageView({refUri:Et,properties:{duration:0}})}.bind(t,v),Xe.autoRoutePVDelay)}))}N.setInitialized(!0)}};function ne(ge,ve,ke){var Ce={PageName:ge,PageUrl:ve};N.trackMetric({name:"PageVisitTime",average:ke,max:ke,min:ke,sampleCount:1},Ce)}function ce(ge){if(!ge.isBrowserLinkTrackingEnabled()){var ve=["/browserLinkSignalR/","/__browserLink/"],ke=function(Ce){if(Ce.baseType===zi.dataType){var Pe=Ce.baseData;if(Pe){for(var Oe=0;Oe<ve.length;Oe++)if(Pe.target&&Pe.target.indexOf(ve[Oe])>=0)return!1}}return!0};be(ke)}}function be(ge){N._telemetryInitializers.push(ge)}function ye(ge,ve){var ke=Wi.create(ge,Jr.dataType,Jr.envelopeType,N.diagLog(),ve);N.core.track(ke)}}),t}return e.getDefaultConfig=function(t){return t||(t={}),t.sessionRenewalMs=30*60*1e3,t.sessionExpirationMs=24*60*60*1e3,t.disableExceptionTracking=Kt(t.disableExceptionTracking),t.autoTrackPageVisitTime=Kt(t.autoTrackPageVisitTime),t.overridePageViewDuration=Kt(t.overridePageViewDuration),t.enableUnhandledPromiseRejectionTracking=Kt(t.enableUnhandledPromiseRejectionTracking),(isNaN(t.samplingPercentage)||t.samplingPercentage<=0||t.samplingPercentage>=100)&&(t.samplingPercentage=100),t.isStorageUseDisabled=Kt(t.isStorageUseDisabled),t.isBrowserLinkTrackingEnabled=Kt(t.isBrowserLinkTrackingEnabled),t.enableAutoRouteTracking=Kt(t.enableAutoRouteTracking),t.namePrefix=t.namePrefix||"",t.enableDebug=Kt(t.enableDebug),t.disableFlushOnBeforeUnload=Kt(t.disableFlushOnBeforeUnload),t.disableFlushOnUnload=Kt(t.disableFlushOnUnload,t.disableFlushOnBeforeUnload),t},e.Version="2.6.4",e}(Gn),Gu=function(){function r(e,t){var i=this,n={};i.start=function(s){typeof n[s]!="undefined"&&e.throwInternal(Ne.WARNING,Me.StartCalledMoreThanOnce,"start was called more than once for this event without calling stop.",{name:s,key:s},!0),n[s]=+new Date},i.stop=function(s,c,v,S){var N=n[s];if(isNaN(N))e.throwInternal(Ne.WARNING,Me.StopCalledWithoutStart,"stop was called without a corresponding start.",{name:s,key:s},!0);else{var U=+new Date,X=Yr(N,U);i.action(s,c,X,v,S)}delete n[s],n[s]=void 0}}return r}()}),Oh=o(()=>{db()}),Lh,Uh,fb=o(()=>{wr(),Bt(),Rt(),Lh=function(){function r(e){var t=[];Ue(r,this,function(i){i.enqueue=function(n){t.push(n)},i.count=function(){return t.length},i.clear=function(){t.length=0},i.getItems=function(){return t.slice(0)},i.batchPayloads=function(n){if(n&&n.length>0){var s=e.emitLineDelimitedJson()?n.join(`
`):"["+n.join(",")+"]";return s}return null},i.markAsSent=function(n){i.clear()},i.clearSent=function(n){}})}return r}(),Uh=function(){function r(e,t){var i=!1,n;Ue(r,this,function(s){var c=N(r.BUFFER_KEY),v=N(r.SENT_BUFFER_KEY);n=c.concat(v),n.length>r.MAX_BUFFER_SIZE&&(n.length=r.MAX_BUFFER_SIZE),U(r.SENT_BUFFER_KEY,[]),U(r.BUFFER_KEY,n),s.enqueue=function(X){if(n.length>=r.MAX_BUFFER_SIZE){i||(e.throwInternal(Ne.WARNING,Me.SessionStorageBufferFull,"Maximum buffer size reached: "+n.length,!0),i=!0);return}n.push(X),U(r.BUFFER_KEY,n)},s.count=function(){return n.length},s.clear=function(){n=[],U(r.BUFFER_KEY,[]),U(r.SENT_BUFFER_KEY,[]),i=!1},s.getItems=function(){return n.slice(0)},s.batchPayloads=function(X){if(X&&X.length>0){var ne=t.emitLineDelimitedJson()?X.join(`
`):"["+X.join(",")+"]";return ne}return null},s.markAsSent=function(X){n=S(X,n),U(r.BUFFER_KEY,n);var ne=N(r.SENT_BUFFER_KEY);ne instanceof Array&&X instanceof Array&&(ne=ne.concat(X),ne.length>r.MAX_BUFFER_SIZE&&(e.throwInternal(Ne.CRITICAL,Me.SessionStorageBufferFull,"Sent buffer reached its maximum size: "+ne.length,!0),ne.length=r.MAX_BUFFER_SIZE),U(r.SENT_BUFFER_KEY,ne))},s.clearSent=function(X){var ne=N(r.SENT_BUFFER_KEY);ne=S(X,ne),U(r.SENT_BUFFER_KEY,ne)};function S(X,ne){var ce=[];return $e(ne,function(be){!Ge(be)&&nt(X,be)===-1&&ce.push(be)}),ce}function N(X){var ne=X;try{ne=t.namePrefix&&t.namePrefix()?t.namePrefix()+"_"+ne:ne;var ce=Mo(e,ne);if(ce){var be=Ci().parse(ce);if(xt(be)&&(be=Ci().parse(be)),be&&et(be))return be}}catch(ye){e.throwInternal(Ne.CRITICAL,Me.FailedToRestoreStorageBuffer," storage key: "+ne+", "+It(ye),{exception:Dt(ye)})}return[]}function U(X,ne){var ce=X;try{ce=t.namePrefix&&t.namePrefix()?t.namePrefix()+"_"+ce:ce;var be=JSON.stringify(ne);No(e,ce,be)}catch(ye){No(e,ce,JSON.stringify([])),e.throwInternal(Ne.WARNING,Me.FailedToSetStorageBuffer," storage key: "+ce+", "+It(ye)+". Buffer cleared",{exception:Dt(ye)})}}})}return r.BUFFER_KEY="AI_buffer",r.SENT_BUFFER_KEY="AI_sentBuffer",r.MAX_BUFFER_SIZE=2e3,r}()});function gr(r,e,t){return Pt(r,e,t,Gr)}var Ho,tr,_r,ju,cr,Bh,zu,qh,Hh,Vh,$h,Gh,hb=o(()=>{L(),wr(),Bt(),Ho="baseType",tr="baseData",_r="properties",ju="true",cr=function(){function r(){}return r.extractPropsAndMeasurements=function(e,t,i){Fe(e)||zt(e,function(n,s){ot(s)?i[n]=s:xt(s)?t[n]=s:ps()&&(t[n]=Ci().stringify(s))})},r.createEnvelope=function(e,t,i,n){var s=new Au(e,n,t);gr(s,"sampleRate",i[xo]),(i[tr]||{}).startTime&&(s.time=Dr(i[tr].startTime)),s.iKey=i.iKey;var c=i.iKey.replace(/-/g,"");return s.name=s.name.replace("{0}",c),r.extractPartAExtensions(i,s),i.tags=i.tags||[],ai(s)},r.extractPartAExtensions=function(e,t){var i=t.tags=t.tags||{},n=e.ext=e.ext||{},s=e.tags=e.tags||[],c=n.user;c&&(gr(i,Yt.userAuthUserId,c.authId),gr(i,Yt.userId,c.id||c.localId));var v=n.app;v&&gr(i,Yt.sessionId,v.sesId);var S=n.device;S&&(gr(i,Yt.deviceId,S.id||S.localId),gr(i,Yt.deviceType,S.deviceClass),gr(i,Yt.deviceIp,S.ip),gr(i,Yt.deviceModel,S.model),gr(i,Yt.deviceType,S.deviceType));var N=e.ext.web;if(N){gr(i,Yt.deviceLanguage,N.browserLang),gr(i,Yt.deviceBrowserVersion,N.browserVer),gr(i,Yt.deviceBrowser,N.browser);var U=t.data=t.data||{},X=U[tr]=U[tr]||{},ne=X[_r]=X[_r]||{};gr(ne,"domain",N.domain),gr(ne,"isManual",N.isManual?ju:null),gr(ne,"screenRes",N.screenRes),gr(ne,"userConsent",N.userConsent?ju:null)}var ce=n.os;ce&&gr(i,Yt.deviceOS,ce.name);var be=n.trace;be&&(gr(i,Yt.operationParentId,be.parentID),gr(i,Yt.operationName,be.name),gr(i,Yt.operationId,be.traceID));for(var ye={},ge=s.length-1;ge>=0;ge--){var ve=s[ge];zt(ve,function(Ce,Pe){ye[Ce]=Pe}),s.splice(ge,1)}zt(s,function(Ce,Pe){ye[Ce]=Pe});var ke=a({},i,ye);ke[Yt.internalSdkVersion]||(ke[Yt.internalSdkVersion]="javascript:"+r.Version),t.tags=ai(ke)},r.prototype.Init=function(e,t){this._logger=e,Fe(t[tr])&&this._logger.throwInternal(Ne.CRITICAL,Me.TelemetryEnvelopeInvalid,"telemetryItem.baseData cannot be null.")},r.Version="2.6.4",r}(),Bh=function(r){te(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.Create=function(t,i){r.prototype.Init.call(this,t,i);var n=i[tr].measurements||{},s=i[tr][_r]||{};cr.extractPropsAndMeasurements(i.data,s,n);var c=i[tr];if(Fe(c))return t.warnToConsole("Invalid input for dependency data"),null;var v=c[_r]&&c[_r][To]?c[_r][To]:"GET",S=new zi(t,c.id,c.target,c.name,c.duration,c.success,c.responseCode,v,c.type,c.correlationContext,s,n),N=new on(zi.dataType,S);return cr.createEnvelope(t,zi.envelopeType,i,N)},e.DependencyEnvelopeCreator=new e,e}(cr),zu=function(r){te(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.Create=function(t,i){r.prototype.Init.call(this,t,i);var n={},s={};i[Ho]!==Ai.dataType&&(n.baseTypeSource=i[Ho]),i[Ho]===Ai.dataType?(n=i[tr][_r]||{},s=i[tr].measurements||{}):i[tr]&&cr.extractPropsAndMeasurements(i[tr],n,s),cr.extractPropsAndMeasurements(i.data,n,s);var c=i[tr].name,v=new Ai(t,c,n,s),S=new on(Ai.dataType,v);return cr.createEnvelope(t,Ai.envelopeType,i,S)},e.EventEnvelopeCreator=new e,e}(cr),qh=function(r){te(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.Create=function(t,i){r.prototype.Init.call(this,t,i);var n=i[tr].measurements||{},s=i[tr][_r]||{};cr.extractPropsAndMeasurements(i.data,s,n);var c=i[tr],v=Jr.CreateFromInterface(t,c,s,n),S=new on(Jr.dataType,v);return cr.createEnvelope(t,Jr.envelopeType,i,S)},e.ExceptionEnvelopeCreator=new e,e}(cr),Hh=function(r){te(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.Create=function(t,i){r.prototype.Init.call(this,t,i);var n=i[tr],s=n[_r]||{},c=n.measurements||{};cr.extractPropsAndMeasurements(i.data,s,c);var v=new ji(t,n.name,n.average,n.sampleCount,n.min,n.max,s,c),S=new on(ji.dataType,v);return cr.createEnvelope(t,ji.envelopeType,i,S)},e.MetricEnvelopeCreator=new e,e}(cr),Vh=function(r){te(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.Create=function(t,i){r.prototype.Init.call(this,t,i);var n="duration",s,c=i[tr];!Fe(c)&&!Fe(c[_r])&&!Fe(c[_r][n])?(s=c[_r][n],delete c[_r][n]):!Fe(i.data)&&!Fe(i.data[n])&&(s=i.data[n],delete i.data[n]);var v=i[tr],S;((i.ext||{}).trace||{}).traceID&&(S=i.ext.trace.traceID);var N=v.id||S,U=v.name,X=v.uri,ne=v[_r]||{},ce=v.measurements||{};if(Fe(v.refUri)||(ne.refUri=v.refUri),Fe(v.pageType)||(ne.pageType=v.pageType),Fe(v.isLoggedIn)||(ne.isLoggedIn=v.isLoggedIn.toString()),!Fe(v[_r])){var be=v[_r];zt(be,function(ve,ke){ne[ve]=ke})}cr.extractPropsAndMeasurements(i.data,ne,ce);var ye=new Ii(t,U,X,s,ne,ce,N),ge=new on(Ii.dataType,ye);return cr.createEnvelope(t,Ii.envelopeType,i,ge)},e.PageViewEnvelopeCreator=new e,e}(cr),$h=function(r){te(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.Create=function(t,i){r.prototype.Init.call(this,t,i);var n=i[tr],s=n.name,c=n.uri||n.url,v=n[_r]||{},S=n.measurements||{};cr.extractPropsAndMeasurements(i.data,v,S);var N=new an(t,s,c,void 0,v,S,n),U=new on(an.dataType,N);return cr.createEnvelope(t,an.envelopeType,i,U)},e.PageViewPerformanceEnvelopeCreator=new e,e}(cr),Gh=function(r){te(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.Create=function(t,i){r.prototype.Init.call(this,t,i);var n=i[tr].message,s=i[tr].severityLevel,c=i[tr][_r]||{},v=i[tr].measurements||{};cr.extractPropsAndMeasurements(i.data,c,v);var S=new sn(t,n,s,c,v),N=new on(sn.dataType,S);return cr.createEnvelope(t,sn.envelopeType,i,N)},e.TraceEnvelopeCreator=new e,e}(cr)}),jh,pb=o(()=>{Bt(),Rt(),jh=function(){function r(e){Ue(r,this,function(t){t.serialize=function(c){var v=i(c,"root");try{return Ci().stringify(v)}catch(S){e.throwInternal(Ne.CRITICAL,Me.CannotSerializeObject,S&&Ge(S.toString)?S.toString():"Error serializing object",null,!0)}};function i(c,v){var S="__aiCircularRefCheck",N={};if(!c)return e.throwInternal(Ne.CRITICAL,Me.CannotSerializeObject,"cannot serialize object because it is null or undefined",{name:v},!0),N;if(c[S])return e.throwInternal(Ne.WARNING,Me.CircularReferenceDetected,"Circular reference detected while serializing object",{name:v},!0),N;if(!c.aiDataContract){if(v==="measurements")N=s(c,"number",v);else if(v==="properties")N=s(c,"string",v);else if(v==="tags")N=s(c,"string",v);else if(et(c))N=n(c,v);else{e.throwInternal(Ne.WARNING,Me.CannotSerializeObjectNonSerializable,"Attempting to serialize an object which does not implement ISerializable",{name:v},!0);try{Ci().stringify(c),N=c}catch(U){e.throwInternal(Ne.CRITICAL,Me.CannotSerializeObject,U&&Ge(U.toString)?U.toString():"Error serializing object",null,!0)}}return N}return c[S]=!0,zt(c.aiDataContract,function(U,X){var ne=Ge(X)?X()&1:X&1,ce=Ge(X)?X()&4:X&4,be=X&2,ye=c[U]!==void 0,ge=rt(c[U])&&c[U]!==null;if(ne&&!ye&&!be)e.throwInternal(Ne.CRITICAL,Me.MissingRequiredFieldSpecification,"Missing required field specification. The field is required but not present on source",{field:U,name:v});else if(!ce){var ve=void 0;ge?be?ve=n(c[U],U):ve=i(c[U],U):ve=c[U],ve!==void 0&&(N[U]=ve)}}),delete c[S],N}function n(c,v){var S;if(c)if(!et(c))e.throwInternal(Ne.CRITICAL,Me.ItemNotInArray,`This field was specified as an array in the contract but the item is not an array.\r
`,{name:v},!0);else{S=[];for(var N=0;N<c.length;N++){var U=c[N],X=i(U,v+"["+N+"]");S.push(X)}}return S}function s(c,v,S){var N;return c&&(N={},zt(c,function(U,X){if(v==="string")X===void 0?N[U]="undefined":X===null?N[U]="null":X.toString?N[U]=X.toString():N[U]="invalid field: toString() is not defined.";else if(v==="number")if(X===void 0)N[U]="undefined";else if(X===null)N[U]="null";else{var ne=parseFloat(X);isNaN(ne)?N[U]="NaN":N[U]=ne}else N[U]="invalid field: "+S+" is of unknown type.",e.throwInternal(Ne.CRITICAL,N[U],null,!0)})),N}})}return r}()}),zh,Wu,mb=o(()=>{Bt(),Rt(),zh=function(){function r(){var e=ha(),t=Vi(),i=!1,n=!0;Ue(r,this,function(s){try{if(e&&wa.Attach(e,"online",S)&&(wa.Attach(e,"offline",N),i=!0),t){var c=t.body||t;sr(c.ononline)||(c.ononline=S,c.onoffline=N,i=!0)}if(i){var v=$i();v&&!Fe(v.onLine)&&(n=v.onLine)}}catch(U){i=!1}s.isListening=i,s.isOnline=function(){var U=!0,X=$i();return i?U=n:X&&!Fe(X.onLine)&&(U=X.onLine),U},s.isOffline=function(){return!s.isOnline()};function S(){n=!0}function N(){n=!1}})}return r.Offline=new r,r}(),Wu=zh.Offline}),Wh,gb=o(()=>{Wh=function(){function r(){}return r.prototype.getHashCodeScore=function(e){var t=this.getHashCode(e)/r.INT_MAX_VALUE;return t*100},r.prototype.getHashCode=function(e){if(e==="")return 0;for(;e.length<r.MIN_INPUT_LENGTH;)e=e.concat(e);for(var t=5381,i=0;i<e.length;++i)t=(t<<5)+t+e.charCodeAt(i),t=t&t;return Math.abs(t)},r.INT_MAX_VALUE=2147483647,r.MIN_INPUT_LENGTH=8,r}()}),Kh,vb=o(()=>{gb(),wr(),Kh=function(){function r(){this.hashCodeGeneragor=new Wh,this.keys=new Uo}return r.prototype.getSamplingScore=function(e){var t=0;return e.tags&&e.tags[this.keys.userId]?t=this.hashCodeGeneragor.getHashCodeScore(e.tags[this.keys.userId]):e.ext&&e.ext.user&&e.ext.user.id?t=this.hashCodeGeneragor.getHashCodeScore(e.ext.user.id):e.tags&&e.tags[this.keys.operationId]?t=this.hashCodeGeneragor.getHashCodeScore(e.tags[this.keys.operationId]):e.ext&&e.ext.telemetryTrace&&e.ext.telemetryTrace.traceID?t=this.hashCodeGeneragor.getHashCodeScore(e.ext.telemetryTrace.traceID):t=Math.random()*100,t},r}()}),Qh,bb=o(()=>{vb(),wr(),Bt(),Qh=function(){function r(e,t){this.INT_MAX_VALUE=2147483647,this._logger=t||ho(null),(e>100||e<0)&&(this._logger.throwInternal(Ne.WARNING,Me.SampleRateOutOfRange,"Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.",{samplingRate:e},!0),e=100),this.sampleRate=e,this.samplingScoreGenerator=new Kh}return r.prototype.isSampledIn=function(e){var t=this.sampleRate,i=!1;return t==null||t>=100||e.baseType===ji.dataType?!0:(i=this.samplingScoreGenerator.getSamplingScore(e)<t,i)},r}()});function Vo(r){try{return r.responseText}catch(e){}return null}var Ku,yb=o(()=>{L(),fb(),hb(),pb(),wr(),Bt(),mb(),bb(),Rt(),Ku=function(r){te(e,r);function e(){var t=r.call(this)||this;t.priority=1001,t.identifier=Bo,t._XMLHttpRequestSupported=!1;var i,n,s,c,v,S,N={};return Ue(e,t,function(U,X){function ne(){fr("Method not implemented.")}U.pause=ne,U.resume=ne,U.flush=function(){try{U.triggerSend(!0,null,1)}catch(Le){U.diagLog().throwInternal(Ne.CRITICAL,Me.FlushFailed,"flush failed, telemetry will not be collected: "+It(Le),{exception:Dt(Le)})}},U.onunloadFlush=function(){if((U._senderConfig.onunloadDisableBeacon()===!1||U._senderConfig.isBeaconApiDisabled()===!1)&&_u())try{U.triggerSend(!0,ge,2)}catch(Le){U.diagLog().throwInternal(Ne.CRITICAL,Me.FailedToSendQueuedTelemetry,"failed to flush with beacon sender on page unload, telemetry will not be collected: "+It(Le),{exception:Dt(Le)})}else U.flush()},U.teardown=ne,U.addHeader=function(Le,We){N[Le]=We},U.initialize=function(Le,We,Xe,Je){X.initialize(Le,We,Xe,Je);var Et=U._getTelCtx(),Tt=U.identifier;v=new jh(We.logger),i=0,n=null,s=0,U._sender=null,S=0;var Lt=e._getDefaultAppInsightsChannelConfig();if(U._senderConfig=e._getEmptyAppInsightsChannelConfig(),zt(Lt,function(Be,Qe){U._senderConfig[Be]=function(){return Et.getConfig(Tt,Be,Qe())}}),U._buffer=U._senderConfig.enableSessionStorageBuffer()&&Rs()?new Uh(U.diagLog(),U._senderConfig):new Lh(U._senderConfig),U._sample=new Qh(U._senderConfig.samplingPercentage(),U.diagLog()),Qt(Le)||U.diagLog().throwInternal(Ne.CRITICAL,Me.InvalidInstrumentationKey,"Invalid Instrumentation key "+Le.instrumentationKey),!Po(U._senderConfig.endpointUrl())&&U._senderConfig.customHeaders()&&U._senderConfig.customHeaders().length>0&&$e(U._senderConfig.customHeaders(),function(Be){t.addHeader(Be.header,Be.value)}),!U._senderConfig.isBeaconApiDisabled()&&_u())U._sender=ge;else{var Vt=qr("XMLHttpRequest");if(Vt){var er=new Vt;"withCredentials"in er?(U._sender=ve,U._XMLHttpRequestSupported=!0):typeof XDomainRequest!==h&&(U._sender=_t)}else{var qn=qr("fetch");qn&&(U._sender=ke)}}},U.processTelemetry=function(Le,We){We=U._getTelCtx(We);try{if(U._senderConfig.disableTelemetry())return;if(!Le){We.diagLog().throwInternal(Ne.CRITICAL,Me.CannotSendEmptyTelemetry,"Cannot send empty telemetry");return}if(Le.baseData&&!Le.baseType){We.diagLog().throwInternal(Ne.CRITICAL,Me.InvalidEvent,"Cannot send telemetry without baseData and baseType");return}if(Le.baseType||(Le.baseType="EventData"),!U._sender){We.diagLog().throwInternal(Ne.CRITICAL,Me.SenderNotInitialized,"Sender was not initialized");return}if(ce(Le))Le[xo]=U._sample.sampleRate;else{We.diagLog().throwInternal(Ne.WARNING,Me.TelemetrySampledAndNotSent,"Telemetry item was sampled out and not sent",{SampleRate:U._sample.sampleRate});return}var Xe=e.constructEnvelope(Le,U._senderConfig.instrumentationKey(),We.diagLog());if(!Xe){We.diagLog().throwInternal(Ne.CRITICAL,Me.CreateEnvelopeError,"Unable to create an AppInsights envelope");return}var Je=!1;if(Le.tags&&Le.tags[Es]&&($e(Le.tags[Es],function(Vt){try{Vt&&Vt(Xe)===!1&&(Je=!0,We.diagLog().warnToConsole("Telemetry processor check returns false"))}catch(er){We.diagLog().throwInternal(Ne.CRITICAL,Me.TelemetryInitializerFailed,"One of telemetry initializers failed, telemetry item will not be sent: "+It(er),{exception:Dt(er)},!0)}}),delete Le.tags[Es]),Je)return;var Et=v.serialize(Xe),Tt=U._buffer.getItems(),Lt=U._buffer.batchPayloads(Tt);Lt&&Lt.length+Et.length>U._senderConfig.maxBatchSizeInBytes()&&U.triggerSend(!0,null,10),U._buffer.enqueue(Et),Ze()}catch(Vt){We.diagLog().throwInternal(Ne.WARNING,Me.FailedAddingTelemetryToBuffer,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+It(Vt),{exception:Dt(Vt)})}U.processNext(Le,We)},U._xhrReadyStateChange=function(Le,We,Xe){Le.readyState===4&&be(Le.status,We,Le.responseURL,Xe,ct(Le),Vo(Le)||Le.response)},U.triggerSend=function(Le,We,Xe){Le===void 0&&(Le=!0);try{if(U._senderConfig.disableTelemetry())U._buffer.clear();else{if(U._buffer.count()>0){var Je=U._buffer.getItems();ur(Xe||0,Le),We?We.call(t,Je,Le):U._sender(Je,Le)}s=+new Date}clearTimeout(c),c=null,n=null}catch(Tt){var Et=Bl();(!Et||Et>9)&&U.diagLog().throwInternal(Ne.CRITICAL,Me.TransmissionFailed,"Telemetry transmission failed, some telemetry will be lost: "+It(Tt),{exception:Dt(Tt)})}},U._onError=function(Le,We,Xe){U.diagLog().throwInternal(Ne.WARNING,Me.OnError,"Failed to send telemetry.",{message:We}),U._buffer.clearSent(Le)},U._onPartialSuccess=function(Le,We){for(var Xe=[],Je=[],Et=We.errors.reverse(),Tt=0,Lt=Et;Tt<Lt.length;Tt++){var Vt=Lt[Tt],er=Le.splice(Vt.index,1)[0];wt(Vt.statusCode)?Je.push(er):Xe.push(er)}Le.length>0&&U._onSuccess(Le,We.itemsAccepted),Xe.length>0&&U._onError(Xe,ct(null,["partial success",We.itemsAccepted,"of",We.itemsReceived].join(" "))),Je.length>0&&(Pe(Je),U.diagLog().throwInternal(Ne.WARNING,Me.TransmissionFailed,"Partial success. Delivered: "+Le.length+", Failed: "+Xe.length+". Will retry to send "+Je.length+" our of "+We.itemsReceived+" items"))},U._onSuccess=function(Le,We){U._buffer.clearSent(Le)},U._xdrOnLoad=function(Le,We){var Xe=Vo(Le);if(Le&&(Xe+""=="200"||Xe===""))i=0,U._onSuccess(We,0);else{var Je=Ce(Xe);Je&&Je.itemsReceived&&Je.itemsReceived>Je.itemsAccepted&&!U._senderConfig.isRetryDisabled()?U._onPartialSuccess(We,Je):U._onError(We,nr(Le))}};function ce(Le){return U._sample.isSampledIn(Le)}function be(Le,We,Xe,Je,Et,Tt){var Lt=null;if(U._appId||(Lt=Ce(Tt),Lt&&Lt.appId&&(U._appId=Lt.appId)),(Le<200||Le>=300)&&Le!==0){if((Le===301||Le===307||Le===308)&&!ye(Xe)){U._onError(We,Et);return}!U._senderConfig.isRetryDisabled()&&wt(Le)?(Pe(We),U.diagLog().throwInternal(Ne.WARNING,Me.TransmissionFailed,". Response code "+Le+". Will retry to send "+We.length+" items.")):U._onError(We,Et)}else if(Wu.isOffline()){if(!U._senderConfig.isRetryDisabled()){var Vt=10;Pe(We,Vt),U.diagLog().throwInternal(Ne.WARNING,Me.TransmissionFailed,". Offline - Response Code: "+Le+". Offline status: "+Wu.isOffline()+". Will retry to send "+We.length+" items.")}}else ye(Xe),Le===206?(Lt||(Lt=Ce(Tt)),Lt&&!U._senderConfig.isRetryDisabled()?U._onPartialSuccess(We,Lt):U._onError(We,Et)):(i=0,U._onSuccess(We,Je))}function ye(Le){return S>=10?!1:!Fe(Le)&&Le!==""&&Le!==U._senderConfig.endpointUrl()?(U._senderConfig.endpointUrl=function(){return Le},++S,!0):!1}function ge(Le,We){var Xe=U._senderConfig.endpointUrl(),Je=U._buffer.batchPayloads(Le),Et=new Blob([Je],{type:"text/plain;charset=UTF-8"}),Tt=$i().sendBeacon(Xe,Et);Tt?(U._buffer.markAsSent(Le),U._onSuccess(Le,Le.length)):(ve(Le,!0),U.diagLog().throwInternal(Ne.WARNING,Me.TransmissionFailed,". Failed to send telemetry with Beacon API, retried with xhrSender."))}function ve(Le,We){var Xe=new XMLHttpRequest,Je=U._senderConfig.endpointUrl();try{Xe[Wn]=!0}catch(Tt){}Xe.open("POST",Je,We),Xe.setRequestHeader("Content-type","application/json"),Po(Je)&&Xe.setRequestHeader(Xt.sdkContextHeader,Xt.sdkContextHeaderAppIdRequest),$e(yr(N),function(Tt){Xe.setRequestHeader(Tt,N[Tt])}),Xe.onreadystatechange=function(){return U._xhrReadyStateChange(Xe,Le,Le.length)},Xe.onerror=function(Tt){return U._onError(Le,ct(Xe),Tt)};var Et=U._buffer.batchPayloads(Le);Xe.send(Et),U._buffer.markAsSent(Le)}function ke(Le,We){var Xe=U._senderConfig.endpointUrl(),Je=U._buffer.batchPayloads(Le),Et=new Blob([Je],{type:"text/plain;charset=UTF-8"}),Tt=new Headers;Po(Xe)&&Tt.append(Xt.sdkContextHeader,Xt.sdkContextHeaderAppIdRequest),$e(yr(N),function(er){Tt.append(er,N[er])});var Lt={method:"POST",headers:Tt,body:Et},Vt=new Request(Xe,Lt);fetch(Vt).then(function(er){if(er.ok)er.text().then(function(qn){be(er.status,Le,er.url,Le.length,er.statusText,qn)}),U._buffer.markAsSent(Le);else throw Error(er.statusText)}).catch(function(er){U._onError(Le,er.message)})}function Ce(Le){try{if(Le&&Le!==""){var We=Ci().parse(Le);if(We&&We.itemsReceived&&We.itemsReceived>=We.itemsAccepted&&We.itemsReceived-We.itemsAccepted===We.errors.length)return We}}catch(Xe){U.diagLog().throwInternal(Ne.CRITICAL,Me.InvalidBackendResponse,"Cannot parse the response. "+It(Xe),{response:Le})}return null}function Pe(Le,We){if(We===void 0&&(We=1),!(!Le||Le.length===0)){U._buffer.clearSent(Le),i++;for(var Xe=0,Je=Le;Xe<Je.length;Xe++){var Et=Je[Xe];U._buffer.enqueue(Et)}Oe(We),Ze()}}function Oe(Le){var We=10,Xe;if(i<=1)Xe=We;else{var Je=(Math.pow(2,i)-1)/2,Et=Math.floor(Math.random()*Je*We)+1;Et=Le*Et,Xe=Math.max(Math.min(Et,3600),We)}var Tt=ar()+Xe*1e3;n=Tt}function Ze(){if(!c){var Le=n?Math.max(0,n-ar()):0,We=Math.max(U._senderConfig.maxBatchInterval(),Le);c=setTimeout(function(){U.triggerSend(!0,null,1)},We)}}function wt(Le){return Le===408||Le===429||Le===500||Le===503}function ct(Le,We){return Le?"XMLHttpRequest,Status:"+Le.status+",Response:"+Vo(Le)||0||0:We}function _t(Le,We){var Xe=ha(),Je=new XDomainRequest;Je.onload=function(){return U._xdrOnLoad(Je,Le)},Je.onerror=function(Vt){return U._onError(Le,nr(Je),Vt)};var Et=Xe&&Xe.location&&Xe.location.protocol||"";if(U._senderConfig.endpointUrl().lastIndexOf(Et,0)!==0){U.diagLog().throwInternal(Ne.WARNING,Me.TransmissionFailed,". Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol."),U._buffer.clear();return}var Tt=U._senderConfig.endpointUrl().replace(/^(https?:)/,"");Je.open("POST",Tt);var Lt=U._buffer.batchPayloads(Le);Je.send(Lt),U._buffer.markAsSent(Le)}function nr(Le,We){return Le?"XDomainRequest,Response:"+Vo(Le)||0:We}function Ur(){var Le="getNotifyMgr";return U.core[Le]?U.core[Le]():U.core._notificationManager}function ur(Le,We){var Xe=Ur();if(Xe&&Xe.eventsSendRequest)try{Xe.eventsSendRequest(Le,We)}catch(Je){U.diagLog().throwInternal(Ne.CRITICAL,Me.NotificationException,"send request notification failed: "+It(Je),{exception:Dt(Je)})}}function Qt(Le){var We=Fe(Le.disableInstrumentationKeyValidation)?!1:Le.disableInstrumentationKeyValidation;if(We)return!0;var Xe="^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",Je=new RegExp(Xe);return Je.test(Le.instrumentationKey)}}),t}return e.constructEnvelope=function(t,i,n){var s;switch(i!==t.iKey&&!Fe(i)?s=a({},t,{iKey:i}):s=t,s.baseType){case Ai.dataType:return zu.EventEnvelopeCreator.Create(n,s);case sn.dataType:return Gh.TraceEnvelopeCreator.Create(n,s);case Ii.dataType:return Vh.PageViewEnvelopeCreator.Create(n,s);case an.dataType:return $h.PageViewPerformanceEnvelopeCreator.Create(n,s);case Jr.dataType:return qh.ExceptionEnvelopeCreator.Create(n,s);case ji.dataType:return Hh.MetricEnvelopeCreator.Create(n,s);case zi.dataType:return Bh.DependencyEnvelopeCreator.Create(n,s);default:return zu.EventEnvelopeCreator.Create(n,s)}},e._getDefaultAppInsightsChannelConfig=function(){return{endpointUrl:function(){return"https://dc.services.visualstudio.com/v2/track"},emitLineDelimitedJson:function(){return!1},maxBatchInterval:function(){return 15e3},maxBatchSizeInBytes:function(){return 102400},disableTelemetry:function(){return!1},enableSessionStorageBuffer:function(){return!0},isRetryDisabled:function(){return!1},isBeaconApiDisabled:function(){return!0},onunloadDisableBeacon:function(){return!1},instrumentationKey:function(){},namePrefix:function(){},samplingPercentage:function(){return 100},customHeaders:function(){}}},e._getEmptyAppInsightsChannelConfig=function(){return{endpointUrl:void 0,emitLineDelimitedJson:void 0,maxBatchInterval:void 0,maxBatchSizeInBytes:void 0,disableTelemetry:void 0,enableSessionStorageBuffer:void 0,isRetryDisabled:void 0,isBeaconApiDisabled:void 0,onunloadDisableBeacon:void 0,instrumentationKey:void 0,namePrefix:void 0,samplingPercentage:void 0,customHeaders:void 0}},e}(Gn)}),Yh=o(()=>{yb()}),Jh,Qu,Zh,wb=o(()=>{Rt(),wr(),Bt(),Jh="ai_session",Qu=function(){function r(){}return r}(),Zh=function(){function r(e,t){var i=this,n,s,c=ho(t),v=Zl(t);Ue(r,i,function(S){e||(e={}),Ge(e.sessionExpirationMs)||(e.sessionExpirationMs=function(){return r.acquisitionSpan}),Ge(e.sessionRenewalMs)||(e.sessionRenewalMs=function(){return r.renewalSpan}),S.config=e;var N=S.config.sessionCookiePostfix&&S.config.sessionCookiePostfix()?S.config.sessionCookiePostfix():S.config.namePrefix&&S.config.namePrefix()?S.config.namePrefix():"";n=function(){return Jh+N},S.automaticSession=new Qu,S.update=function(){var ye=ar(),ge=!1,ve=S.automaticSession;ve.id||(ge=!U(ve,ye));var ke=S.config.sessionExpirationMs();if(!ge&&ke>0){var Ce=S.config.sessionRenewalMs(),Pe=ye-ve.acquisitionDate,Oe=ye-ve.renewalDate;ge=Pe<0||Oe<0,ge=ge||Pe>ke,ge=ge||Oe>Ce}ge?ne(ye):(!s||ye-s>r.cookieUpdateInterval)&&ce(ve,ye)},S.backup=function(){var ye=S.automaticSession;be(ye.id,ye.acquisitionDate,ye.renewalDate)};function U(ye,ge){var ve=!1,ke=v.get(n());if(ke&&Ge(ke.split))ve=X(ye,ke);else{var Ce=Qf(c,n());Ce&&(ve=X(ye,Ce))}return ve||!!ye.id}function X(ye,ge){var ve=!1,ke=", session will be reset",Ce=ge.split("|");if(Ce.length>=2)try{var Pe=+Ce[1]||0,Oe=+Ce[2]||0;isNaN(Pe)||Pe<=0?c.throwInternal(Ne.WARNING,Me.SessionRenewalDateIsZero,"AI session acquisition date is 0"+ke):isNaN(Oe)||Oe<=0?c.throwInternal(Ne.WARNING,Me.SessionRenewalDateIsZero,"AI session renewal date is 0"+ke):Ce[0]&&(ye.id=Ce[0],ye.acquisitionDate=Pe,ye.renewalDate=Oe,ve=!0)}catch(Ze){c.throwInternal(Ne.CRITICAL,Me.ErrorParsingAISessionCookie,"Error parsing ai_session value ["+(ge||"")+"]"+ke+" - "+It(Ze),{exception:Dt(Ze)})}return ve}function ne(ye){var ge=S.config||{},ve=(ge.getNewId?ge.getNewId():null)||ko;S.automaticSession.id=ve(ge.idLength?ge.idLength():22),S.automaticSession.acquisitionDate=ye,ce(S.automaticSession,ye),Ru()||c.throwInternal(Ne.WARNING,Me.BrowserDoesNotSupportLocalStorage,"Browser does not support local storage. Session durations will be inaccurate.")}function ce(ye,ge){var ve=ye.acquisitionDate;ye.renewalDate=ge;var ke=S.config,Ce=ke.sessionRenewalMs(),Pe=ve+ke.sessionExpirationMs()-ge,Oe=[ye.id,ve,ge],Ze=0;Pe<Ce?Ze=Pe/1e3:Ze=Ce/1e3;var wt=ke.cookieDomain?ke.cookieDomain():null;v.set(n(),Oe.join("|"),ke.sessionExpirationMs()>0?Ze:null,wt),s=ge}function be(ye,ge,ve){Yf(c,n(),[ye,ge,ve].join("|"))}})}return r.acquisitionSpan=864e5,r.renewalSpan=18e5,r.cookieUpdateInterval=6e4,r}()}),Xh,_b=o(()=>{Xh=function(){function r(){}return r}()}),ep,Sb=o(()=>{ep=function(){function r(){this.id="browser",this.deviceClass="Browser"}return r}()}),tp,rp,kb=o(()=>{tp="2.6.4",rp=function(){function r(e){this.sdkVersion=(e.sdkExtension&&e.sdkExtension()?e.sdkExtension()+"_":"")+"javascript:"+tp}return r}()});function ip(r){return!(typeof r!="string"||!r||r.match(/,|;|=| |\|/))}var np,Eb=o(()=>{Rt(),wr(),Bt(),np=function(){function r(e,t){this.isNewUser=!1;var i=ho(t),n=Zl(t),s;Ue(r,this,function(c){c.config=e;var v=c.config.userCookiePostfix&&c.config.userCookiePostfix()?c.config.userCookiePostfix():"";s=function(){return r.userCookieName+v};var S=n.get(s());if(S){c.isNewUser=!1;var N=S.split(r.cookieSeparator);N.length>0&&(c.id=N[0])}if(!c.id){var U=e||{},X=(U.getNewId?U.getNewId():null)||ko;c.id=X(U.idLength?e.idLength():22);var ne=31536e3,ce=Dr(new Date);c.accountAcquisitionDate=ce,c.isNewUser=!0;var be=[c.id,ce];n.set(s(),be.join(r.cookieSeparator),ne);var ye=e.namePrefix&&e.namePrefix()?e.namePrefix()+"ai_session":"ai_session";Jf(i,ye)}c.accountId=e.accountId?e.accountId():void 0;var ge=n.get(r.authUserCookieName);if(ge){ge=decodeURI(ge);var ve=ge.split(r.cookieSeparator);ve[0]&&(c.authenticatedId=ve[0]),ve.length>1&&ve[1]&&(c.accountId=ve[1])}c.setAuthenticatedUserContext=function(ke,Ce,Pe){Pe===void 0&&(Pe=!1);var Oe=!ip(ke)||Ce&&!ip(Ce);if(Oe){i.throwInternal(Ne.WARNING,Me.SetAuthContextFailedAccountName,"Setting auth user context failed. User auth/account id should be of type string, and not contain commas, semi-colons, equal signs, spaces, or vertical-bars.",!0);return}c.authenticatedId=ke;var Ze=c.authenticatedId;Ce&&(c.accountId=Ce,Ze=[c.authenticatedId,c.accountId].join(r.cookieSeparator)),Pe&&n.set(r.authUserCookieName,encodeURI(Ze))},c.clearAuthenticatedUserContext=function(){c.authenticatedId=null,c.accountId=null,n.del(r.authUserCookieName)}})}return r.cookieSeparator="|",r.userCookieName="ai_user",r.authUserCookieName="ai_authUser",r}()}),sp,Rb=o(()=>{sp=function(){function r(){}return r}()}),ap,xb=o(()=>{wr(),Bt(),ap=function(){function r(e,t,i,n){var s=this;s.traceID=e||Gi(),s.parentID=t,s.name=i;var c=Hn();!i&&c&&c.pathname&&(s.name=c.pathname),s.name=Qr(n,s.name)}return r}()});function Ns(r,e){r&&r[e]&&yr(r[e]).length===0&&delete r[e]}var Ta,Ca,op,Tb=o(()=>{Rt(),Bt(),wb(),wr(),_b(),Sb(),kb(),Eb(),Rb(),xb(),Ta="ext",Ca="tags",op=function(){function r(e,t){var i=this,n=e.logger;this.appId=function(){return null},Ue(r,this,function(s){s.application=new Xh,s.internal=new rp(t),ao()&&(s.sessionManager=new Zh(t,e),s.device=new ep,s.location=new sp,s.user=new np(t,e),s.telemetryTrace=new ap(void 0,void 0,void 0,n),s.session=new Qu),s.applySessionContext=function(c,v){var S=s.session,N=s.sessionManager;S&&xt(S.id)?Pt(Wt(c.ext,Zr.AppExt),"sesId",S.id):N&&N.automaticSession&&Pt(Wt(c.ext,Zr.AppExt),"sesId",N.automaticSession.id,xt)},s.applyOperatingSystemContxt=function(c,v){Pt(c.ext,Zr.OSExt,s.os)},s.applyApplicationContext=function(c,v){var S=s.application;if(S){var N=Wt(c,Ca);Pt(N,Yt.applicationVersion,S.ver,xt),Pt(N,Yt.applicationBuild,S.build,xt)}},s.applyDeviceContext=function(c,v){var S=s.device;if(S){var N=Wt(Wt(c,Ta),Zr.DeviceExt);Pt(N,"localId",S.id,xt),Pt(N,"ip",S.ip,xt),Pt(N,"model",S.model,xt),Pt(N,"deviceClass",S.deviceClass,xt)}},s.applyInternalContext=function(c,v){var S=s.internal;if(S){var N=Wt(c,Ca);Pt(N,Yt.internalAgentVersion,S.agentVersion,xt),Pt(N,Yt.internalSdkVersion,S.sdkVersion,xt),(c.baseType===ms.dataType||c.baseType===Ii.dataType)&&(Pt(N,Yt.internalSnippet,S.snippetVer,xt),Pt(N,Yt.internalSdkSrc,S.sdkSrc,xt))}},s.applyLocationContext=function(c,v){var S=i.location;S&&Pt(Wt(c,Ca,[]),Yt.locationIp,S.ip,xt)},s.applyOperationContext=function(c,v){var S=s.telemetryTrace;if(S){var N=Wt(Wt(c,Ta),Zr.TraceExt,{traceID:void 0,parentID:void 0});Pt(N,"traceID",S.traceID,xt),Pt(N,"name",S.name,xt),Pt(N,"parentID",S.parentID,xt)}},s.applyWebContext=function(c,v){var S=i.web;S&&Pt(Wt(c,Ta),Zr.WebExt,S)},s.applyUserContext=function(c,v){var S=s.user;if(S){var N=Wt(c,Ca,[]);Pt(N,Yt.userAccountId,S.accountId,xt);var U=Wt(Wt(c,Ta),Zr.UserExt);Pt(U,"id",S.id,xt),Pt(U,"authId",S.authenticatedId,xt)}},s.cleanUp=function(c,v){var S=c.ext;S&&(Ns(S,Zr.DeviceExt),Ns(S,Zr.UserExt),Ns(S,Zr.WebExt),Ns(S,Zr.OSExt),Ns(S,Zr.AppExt),Ns(S,Zr.TraceExt))}})}return r}()}),lp,Yu,Cb=o(()=>{L(),Rt(),Bt(),Tb(),wr(),lp=function(r){te(e,r);function e(){var t=r.call(this)||this;t.priority=110,t.identifier=Ms;var i,n;return Ue(e,t,function(s,c){s.initialize=function(S,N,U,X){c.initialize(S,N,U,X);var ne=s._getTelCtx(),ce=s.identifier,be=e.getDefaultConfig();n=n||{},zt(be,function(ye,ge){n[ye]=function(){return ne.getConfig(ce,ye,ge())}}),s.context=new op(N,n),i=jf(U,Bo),s.context.appId=function(){return i?i._appId:null},s._extConfig=n},s.processTelemetry=function(S,N){if(!Fe(S)){N=s._getTelCtx(N),S.name===Ii.envelopeType&&N.diagLog().resetInternalMessageCount();var U=s.context||{};if(U.session&&typeof s.context.session.id!="string"&&U.sessionManager&&U.sessionManager.update(),v(S,N),U.user&&U.user.isNewUser){U.user.isNewUser=!1;var X=new ms(Me.SendBrowserInfoOnUserInit,($i()||{}).userAgent||"");N.diagLog().logInternalMessage(Ne.CRITICAL,X)}s.processNext(S,N)}};function v(S,N){Wt(S,"tags",[]),Wt(S,"ext",{});var U=s.context;U.applySessionContext(S,N),U.applyApplicationContext(S,N),U.applyDeviceContext(S,N),U.applyOperationContext(S,N),U.applyUserContext(S,N),U.applyOperatingSystemContxt(S,N),U.applyWebContext(S,N),U.applyLocationContext(S,N),U.applyInternalContext(S,N),U.cleanUp(S,N)}}),t}return e.getDefaultConfig=function(){var t={instrumentationKey:function(){},accountId:function(){return null},sessionRenewalMs:function(){return 30*60*1e3},samplingPercentage:function(){return 100},sessionExpirationMs:function(){return 24*60*60*1e3},cookieDomain:function(){return null},sdkExtension:function(){return null},isBrowserLinkTrackingEnabled:function(){return!1},appId:function(){return null},namePrefix:function(){},sessionCookiePostfix:function(){},userCookiePostfix:function(){},idLength:function(){return 22},getNewId:function(){return null}};return t},e}(Gn),Yu=lp}),up=o(()=>{Cb()});function cp(r,e,t){var i=0,n=r[e],s=r[t];return n&&s&&(i=Yr(n,s)),i}function Jn(r,e,t,i,n){var s=0,c=cp(t,i,n);return c&&(s=Cn(r,e,nn(c))),s}function Cn(r,e,t){var i="ajaxPerf",n=0;if(r&&e&&t){var s=r[i]=r[i]||{};s[e]=t,n=1}return n}function Mb(r,e){var t=r.perfTiming,i=e[oi]||{},n=0,s="name",c="Start",v="End",S="domainLookup",N="connect",U="redirect",X="request",ne="response",ce="duration",be="startTime",ye=S+c,ge=S+v,ve=N+c,ke=N+v,Ce=X+c,Pe=X+v,Oe=ne+c,Ze=ne+v,wt=U+c,ct=U=v,_t="transferSize",nr="encodedBodySize",Ur="decodedBodySize",ur="serverTiming";if(t){n|=Jn(i,U,t,wt,ct),n|=Jn(i,S,t,ye,ge),n|=Jn(i,N,t,ve,ke),n|=Jn(i,X,t,Ce,Pe),n|=Jn(i,ne,t,Oe,Ze),n|=Jn(i,"networkConnect",t,be,ke),n|=Jn(i,"sentRequest",t,Ce,Ze);var Qt=t[ce];Qt||(Qt=cp(t,be,Ze)||0),n|=Cn(i,ce,Qt),n|=Cn(i,"perfTotal",Qt);var Le=t[ur];if(Le){var We={};$e(Le,function(Xe,Je){var Et=pt(Xe[s]||""+Je),Tt=We[Et]||{};zt(Xe,function(Lt,Vt){(Lt!==s&&xt(Vt)||ot(Vt))&&(Tt[Lt]&&(Vt=Tt[Lt]+";"+Vt),(Vt||!xt(Vt))&&(Tt[Lt]=Vt))}),We[Et]=Tt}),n|=Cn(i,ur,We)}n|=Cn(i,_t,t[_t]),n|=Cn(i,nr,t[nr]),n|=Cn(i,Ur,t[Ur])}else r.perfMark&&(n|=Cn(i,"missing",r.perfAttempts));n&&(e[oi]=i)}var oi,dp,Ju,Nb=o(()=>{wr(),Bt(),Rt(),oi="properties",dp=function(){function r(){var e=this;e.openDone=!1,e.setRequestHeaderDone=!1,e.sendDone=!1,e.abortDone=!1,e.stateChangeAttached=!1}return r}(),Ju=function(){function r(e,t,i){var n=this,s=i,c="responseText";n.perfMark=null,n.completed=!1,n.requestHeadersSize=null,n.requestHeaders=null,n.responseReceivingDuration=null,n.callbackDuration=null,n.ajaxTotalDuration=null,n.aborted=0,n.pageUrl=null,n.requestUrl=null,n.requestSize=0,n.method=null,n.status=null,n.requestSentTime=null,n.responseStartedTime=null,n.responseFinishedTime=null,n.callbackFinishedTime=null,n.endTime=null,n.xhrMonitoringState=new dp,n.clientFailure=0,n.traceID=e,n.spanID=t,Ue(r,n,function(v){v.getAbsoluteUrl=function(){return v.requestUrl?eh(v.requestUrl):null},v.getPathName=function(){return v.requestUrl?_a(s,th(v.method,v.requestUrl)):null},v.CreateTrackItem=function(S,N,U){if(v.ajaxTotalDuration=Math.round(Yr(v.requestSentTime,v.responseFinishedTime)*1e3)/1e3,v.ajaxTotalDuration<0)return null;var X=(ye={id:"|"+v.traceID+"."+v.spanID,target:v.getAbsoluteUrl(),name:v.getPathName(),type:S,startTime:null,duration:v.ajaxTotalDuration,success:+v.status>=200&&+v.status<400,responseCode:+v.status,method:v.method},ye[oi]={HttpMethod:v.method},ye);if(v.requestSentTime&&(X.startTime=new Date,X.startTime.setTime(v.requestSentTime)),Mb(v,X),N&&yr(v.requestHeaders).length>0&&(X[oi]=X[oi]||{},X[oi].requestHeaders=v.requestHeaders),U){var ne=U();if(ne){var ce=ne.correlationContext;if(ce&&(X.correlationContext=ce),ne.headerMap&&yr(ne.headerMap).length>0&&(X[oi]=X[oi]||{},X[oi].responseHeaders=ne.headerMap),v.status>=400){var be=ne.type;X[oi]=X[oi]||{},(be===""||be==="text")&&(X[oi][c]=ne[c]?ne.statusText+" - "+ne[c]:ne.statusText),be==="json"&&(X[oi][c]=ne.response?ne.statusText+" - "+JSON.stringify(ne.response):ne.statusText)}}}return X;var ye}})}return r}()}),Pb,Ab=o(()=>{Bt(),Bt(),Pb=function(){function r(){}return r.GetLength=function(e){var t=0;if(!Fe(e)){var i="";try{i=e.toString()}catch(n){}t=i.length,t=isNaN(t)?0:t}return t},r}()}),Zu,Ib=o(()=>{Bt(),Zu=function(){function r(e,t){var i=this;i.traceFlag=r.DEFAULT_TRACE_FLAG,i.version=r.DEFAULT_VERSION,e&&r.isValidTraceId(e)?i.traceId=e:i.traceId=Gi(),t&&r.isValidSpanId(t)?i.spanId=t:i.spanId=Gi().substr(0,16)}return r.isValidTraceId=function(e){return e.match(/^[0-9a-f]{32}$/)&&e!=="00000000000000000000000000000000"},r.isValidSpanId=function(e){return e.match(/^[0-9a-f]{16}$/)&&e!=="0000000000000000"},r.prototype.toString=function(){var e=this;return e.version+"-"+e.traceId+"-"+e.spanId+"-"+e.traceFlag},r.DEFAULT_TRACE_FLAG="01",r.DEFAULT_VERSION="00",r}()});function Db(){var r=ie();return!r||Fe(r.Request)||Fe(r.Request[m])||Fe(r[Is])?null:r[Is]}function Fb(r){var e=!1;if(typeof XMLHttpRequest!==h&&!Fe(XMLHttpRequest)){var t=XMLHttpRequest[m];e=!Fe(t)&&!Fe(t.open)&&!Fe(t.send)&&!Fe(t.abort)}var i=Bl();if(i&&i<9&&(e=!1),e)try{var n=new XMLHttpRequest;n[li]={};var s=XMLHttpRequest[m].open;XMLHttpRequest[m].open=s}catch(c){e=!1,Ma(r,Me.FailedMonitorAjaxOpen,"Failed to enable XMLHttpRequest monitoring, extension is not supported",{exception:Dt(c)})}return e}function $o(r){var e="";try{!Fe(r)&&!Fe(r[li])&&!Fe(r[li].requestUrl)&&(e+="(url: '"+r[li].requestUrl+"')")}catch(t){}return e}function Ma(r,e,t,i,n){r[As]()[ec](Ne.CRITICAL,e,t,i,n)}function Go(r,e,t,i,n){r[As]()[ec](Ne.WARNING,e,t,i,n)}function Na(r,e,t){return function(i){Ma(r,e,t,{ajaxDiagnosticsMessage:$o(i.inst),exception:Dt(i.err)})}}function Ps(r,e){return r&&e?r.indexOf(e):-1}var Xu,As,li,ec,Is,tc,rc,Ob=o(()=>{L(),wr(),Bt(),Nb(),Ab(),Ib(),Rt(),Xu="ai.ajxmn.",As="diagLog",li="ajaxData",ec="throwInternal",Is="fetch",tc=0,rc=function(r){te(e,r);function e(){var t=r.call(this)||this;t.identifier=e.identifier,t.priority=120;var i="trackDependencyDataInternal",n=Hn(),s=!1,c=!1,v=n&&n.host&&n.host.toLowerCase(),S=e.getEmptyConfig(),N=!1,U=0,X,ne,ce,be,ye=!1,ge=0,ve=!1,ke=[],Ce={},Pe;return Ue(e,t,function(Oe,Ze){Oe.initialize=function(Be,Qe,tt,it){if(!Oe.isInitialized()){Ze.initialize(Be,Qe,tt,it);var vt=Oe._getTelCtx(),At=e.getDefaultConfig();zt(At,function(ci,fa){S[ci]=vt.getConfig(e.identifier,ci,fa)});var Nt=S.distributedTracingMode;if(N=S.enableRequestHeaderTracking,ye=S.enableAjaxPerfTracking,ge=S.maxAjaxCallsPerView,ve=S.enableResponseHeaderTracking,Pe=S.excludeRequestFromAutoTrackingPatterns,ce=Nt===Pi.AI||Nt===Pi.AI_AND_W3C,ne=Nt===Pi.AI_AND_W3C||Nt===Pi.W3C,ye){var $t=Be.instrumentationKey||"unkwn";$t.length>5?be=Xu+$t.substring($t.length-5)+".":be=Xu+$t+"."}if(S.disableAjaxTracking===!1&&nr(),ct(),tt.length>0&&tt){for(var dr=void 0,Tr=0;!dr&&Tr<tt.length;)tt[Tr]&&tt[Tr].identifier===Ms&&(dr=tt[Tr]),Tr++;dr&&(X=dr.context)}}},Oe.teardown=function(){$e(ke,function(Be){Be.rm()}),ke=[],s=!1,c=!1,Oe.setInitialized(!1)},Oe.trackDependencyData=function(Be,Qe){Oe[i](Be,Qe)},Oe.includeCorrelationHeaders=function(Be,Qe,tt,it){var vt=Oe._currentWindowHost||v;if(Qe){if(Rn.canIncludeCorrelationHeader(S,Be.getAbsoluteUrl(),vt)){if(tt||(tt={}),tt.headers=new Headers(tt.headers||(Qe instanceof Request?Qe.headers||{}:{})),ce){var At="|"+Be.traceID+"."+Be.spanID;tt.headers.set(Xt.requestIdHeader,At),N&&(Be.requestHeaders[Xt.requestIdHeader]=At)}var Nt=S.appId||X&&X.appId();if(Nt&&(tt.headers.set(Xt.requestContextHeader,Xt.requestContextAppIdFormat+Nt),N&&(Be.requestHeaders[Xt.requestContextHeader]=Xt.requestContextAppIdFormat+Nt)),ne){var $t=new Zu(Be.traceID,Be.spanID);tt.headers.set(Xt.traceParentHeader,$t.toString()),N&&(Be.requestHeaders[Xt.traceParentHeader]=$t.toString())}}return tt}else if(it){if(Rn.canIncludeCorrelationHeader(S,Be.getAbsoluteUrl(),vt)){if(ce){var At="|"+Be.traceID+"."+Be.spanID;it.setRequestHeader(Xt.requestIdHeader,At),N&&(Be.requestHeaders[Xt.requestIdHeader]=At)}var Nt=S.appId||X&&X.appId();if(Nt&&(it.setRequestHeader(Xt.requestContextHeader,Xt.requestContextAppIdFormat+Nt),N&&(Be.requestHeaders[Xt.requestContextHeader]=Xt.requestContextAppIdFormat+Nt)),ne){var $t=new Zu(Be.traceID,Be.spanID);it.setRequestHeader(Xt.traceParentHeader,$t.toString()),N&&(Be.requestHeaders[Xt.traceParentHeader]=$t.toString())}}return it}},Oe[i]=function(Be,Qe,tt){if(ge===-1||U<ge){(S.distributedTracingMode===Pi.W3C||S.distributedTracingMode===Pi.AI_AND_W3C)&&typeof Be.id=="string"&&Be.id[Be.id.length-1]!=="."&&(Be.id+="."),Fe(Be.startTime)&&(Be.startTime=new Date);var it=Wi.create(Be,zi.dataType,zi.envelopeType,Oe[As](),Qe,tt);Oe.core.track(it)}else U===ge&&Ma(Oe,Me.MaxAjaxPerPVExceeded,"Maximum ajax per page view limit reached, ajax monitoring is paused until the next trackPageView(). In order to increase the limit set the maxAjaxCallsPerView configuration parameter.",!0);++U};function wt(Be){var Qe=!0;return(Be||S.ignoreHeaders)&&$e(S.ignoreHeaders,function(tt){if(tt.toLowerCase()===Be.toLowerCase())return Qe=!1,-1}),Qe}function ct(){var Be=Db();if(Be){var Qe=ie(),tt=Be.polyfill;S.disableFetchTracking===!1?(ke.push(pu(Qe,Is,{req:function(it,vt,At){var Nt;if(s&&!Ur(null,vt,At)&&!(tt&&c)){var $t=it.ctx();Nt=Lt(vt,At);var dr=Oe.includeCorrelationHeaders(Nt,vt,At);dr!==At&&it.set(1,dr),$t.data=Nt}},rsp:function(it,vt){var At=it.ctx().data;At&&(it.rslt=it.rslt.then(function(Nt){return er(it,(Nt||{}).status,Nt,At,function(){var $t={statusText:Nt.statusText,headerMap:null,correlationContext:qn(Nt)};if(ve){var dr={};Nt.headers.forEach(function(Tr,ci){wt(ci)&&(dr[ci]=Tr)}),$t.headerMap=dr}return $t}),Nt}).catch(function(Nt){throw er(it,0,vt,At,null,{error:Nt.message}),Nt}))},hkErr:Na(Oe,Me.FailedMonitorAjaxOpen,"Failed to monitor Window.fetch, monitoring data for this fetch call may be incorrect.")})),s=!0):tt&&ke.push(pu(Qe,Is,{req:function(it,vt,At){Ur(null,vt,At)}})),tt&&(Qe[Is].polyfill=tt)}}function _t(Be,Qe,tt){ke.push(T0(Be,Qe,tt))}function nr(){Fb(Oe)&&!c&&(_t(XMLHttpRequest,"open",{req:function(Be,Qe,tt,it){var vt=Be.inst,At=vt[li];!Ur(vt,tt)&&ur(vt,!0)&&(!At||!At.xhrMonitoringState.openDone)&&Qt(vt,Qe,tt,it)},hkErr:Na(Oe,Me.FailedMonitorAjaxOpen,"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.")}),_t(XMLHttpRequest,"send",{req:function(Be,Qe){var tt=Be.inst,it=tt[li];ur(tt)&&!it.xhrMonitoringState.sendDone&&(Et("xhr",it),it.requestSentTime=ka(),Oe.includeCorrelationHeaders(it,void 0,void 0,tt),it.xhrMonitoringState.sendDone=!0)},hkErr:Na(Oe,Me.FailedMonitorAjaxSend,"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.")}),_t(XMLHttpRequest,"abort",{req:function(Be){var Qe=Be.inst,tt=Qe[li];ur(Qe)&&!tt.xhrMonitoringState.abortDone&&(tt.aborted=1,tt.xhrMonitoringState.abortDone=!0)},hkErr:Na(Oe,Me.FailedMonitorAjaxAbort,"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.")}),N&&_t(XMLHttpRequest,"setRequestHeader",{req:function(Be,Qe,tt){var it=Be.inst;ur(it)&&wt(Qe)&&(it[li].requestHeaders[Qe]=tt)},hkErr:Na(Oe,Me.FailedMonitorAjaxSetRequestHeader,"Failed to monitor XMLHttpRequest.setRequestHeader, monitoring data for this ajax call may be incorrect.")}),c=!0)}function Ur(Be,Qe,tt){var it=!1,vt=((xt(Qe)?Qe:(Qe||{}).url||"")||"").toLowerCase();if($e(Pe,function($t){var dr=$t;xt($t)&&(dr=new RegExp($t)),it||(it=dr.test(vt))}),it)return it;var At=Ps(vt,"?"),Nt=Ps(vt,"#");return(At===-1||Nt!==-1&&Nt<At)&&(At=Nt),At!==-1&&(vt=vt.substring(0,At)),Fe(Be)?Fe(Qe)||(it=(typeof Qe=="object"?Qe[Wn]===!0:!1)||(tt?tt[Wn]===!0:!1)):it=Be[Wn]===!0||vt[Wn]===!0,it?Ce[vt]||(Ce[vt]=1):Ce[vt]&&(it=!0),it}function ur(Be,Qe){var tt=!0,it=c;return Fe(Be)||(tt=Qe===!0||!Fe(Be[li])),it&&tt}function Qt(Be,Qe,tt,it){var vt=X&&X.telemetryTrace&&X.telemetryTrace.traceID||Gi(),At=Gi().substr(0,16),Nt=new Ju(vt,At,Oe[As]());Nt.method=Qe,Nt.requestUrl=tt,Nt.xhrMonitoringState.openDone=!0,Nt.requestHeaders={},Nt.async=it,Be[li]=Nt,Le(Be)}function Le(Be){Be[li].xhrMonitoringState.stateChangeAttached=wa.Attach(Be,"readystatechange",function(){try{Be&&Be.readyState===4&&ur(Be)&&Xe(Be)}catch(tt){var Qe=Dt(tt);(!Qe||Ps(Qe.toLowerCase(),"c00c023f")===-1)&&Ma(Oe,Me.FailedMonitorAjaxRSC,"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.",{ajaxDiagnosticsMessage:$o(Be),exception:Qe})}})}function We(Be){try{var Qe=Be.responseType;if(Qe===""||Qe==="text")return Be.responseText}catch(tt){}return null}function Xe(Be){var Qe=Be[li];Qe.responseFinishedTime=ka(),Qe.status=Be.status;function tt(it,vt){var At=vt||{};At.ajaxDiagnosticsMessage=$o(Be),it&&(At.exception=Dt(it)),Go(Oe,Me.FailedMonitorAjaxDur,"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.",At)}Tt("xmlhttprequest",Qe,function(){try{var it=Qe.CreateTrackItem("Ajax",N,function(){var vt={statusText:Be.statusText,headerMap:null,correlationContext:Je(Be),type:Be.responseType,responseText:We(Be),response:Be.response};if(ve){var At=Be.getAllResponseHeaders();if(At){var Nt=gt(At).split(/[\r\n]+/),$t={};$e(Nt,function(dr){var Tr=dr.split(": "),ci=Tr.shift(),fa=Tr.join(": ");wt(ci)&&($t[ci]=fa)}),vt.headerMap=$t}}return vt});it?Oe[i](it):tt(null,{requestSentTime:Qe.requestSentTime,responseFinishedTime:Qe.responseFinishedTime})}finally{try{Be[li]=null}catch(vt){}}},function(it){tt(it,null)})}function Je(Be){try{var Qe=Be.getAllResponseHeaders();if(Qe!==null){var tt=Ps(Qe.toLowerCase(),Xt.requestContextHeaderLowerCase);if(tt!==-1){var it=Be.getResponseHeader(Xt.requestContextHeader);return Rn.getCorrelationContext(it)}}}catch(vt){Go(Oe,Me.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{ajaxDiagnosticsMessage:$o(Be),exception:Dt(vt)})}}function Et(Be,Qe){if(Qe.requestUrl&&be&&ye){var tt=en();if(tt&&Ge(tt.mark)){tc++;var it=be+Be+"#"+tc;tt.mark(it);var vt=tt.getEntriesByName(it);vt&&vt.length===1&&(Qe.perfMark=vt[0])}}}function Tt(Be,Qe,tt,it){var vt=Qe.perfMark,At=en(),Nt=S.maxAjaxPerfLookupAttempts,$t=S.ajaxPerfLookupDelay,dr=Qe.requestUrl,Tr=0;(function ci(){try{if(At&&vt){Tr++;for(var fa=null,e0=At.getEntries(),jd=e0.length-1;jd>=0;jd--){var wn=e0[jd];if(wn){if(wn.entryType==="resource")wn.initiatorType===Be&&(Ps(wn.name,dr)!==-1||Ps(dr,wn.name)!==-1)&&(fa=wn);else if(wn.entryType==="mark"&&wn.name===vt.name){Qe.perfTiming=fa;break}if(wn.startTime<vt.startTime-1e3)break}}}!vt||Qe.perfTiming||Tr>=Nt||Qe.async===!1?(vt&&Ge(At.clearMarks)&&At.clearMarks(vt.name),Qe.perfAttempts=Tr,tt()):setTimeout(ci,$t)}catch(pE){it(pE)}})()}function Lt(Be,Qe){var tt=X&&X.telemetryTrace&&X.telemetryTrace.traceID||Gi(),it=Gi().substr(0,16),vt=new Ju(tt,it,Oe[As]());vt.requestSentTime=ka(),Be instanceof Request?vt.requestUrl=Be?Be.url:"":vt.requestUrl=Be;var At="GET";Qe&&Qe.method?At=Qe.method:Be&&Be instanceof Request&&(At=Be.method),vt.method=At;var Nt={};if(N){var $t=new Headers((Qe?Qe.headers:0)||(Be instanceof Request?Be.headers||{}:{}));$t.forEach(function(dr,Tr){wt(Tr)&&(Nt[Tr]=dr)})}return vt.requestHeaders=Nt,Et("fetch",vt),vt}function Vt(Be){var Qe="";try{Fe(Be)||(typeof Be=="string"?Qe+="(url: '"+Be+"')":Qe+="(url: '"+Be.url+"')")}catch(tt){Ma(Oe,Me.FailedMonitorAjaxOpen,"Failed to grab failed fetch diagnostics message",{exception:Dt(tt)})}return Qe}function er(Be,Qe,tt,it,vt,At){if(!it)return;function Nt($t,dr,Tr){var ci=Tr||{};ci.fetchDiagnosticsMessage=Vt(tt),dr&&(ci.exception=Dt(dr)),Go(Oe,$t,"Failed to calculate the duration of the fetch call, monitoring data for this fetch call won't be sent.",ci)}it.responseFinishedTime=ka(),it.status=Qe,Tt("fetch",it,function(){var $t=it.CreateTrackItem("Fetch",N,vt);$t?Oe[i]($t):Nt(Me.FailedMonitorAjaxDur,null,{requestSentTime:it.requestSentTime,responseFinishedTime:it.responseFinishedTime})},function($t){Nt(Me.FailedMonitorAjaxGetCorrelationHeader,$t,null)})}function qn(Be){if(Be&&Be.headers)try{var Qe=Be.headers.get(Xt.requestContextHeader);return Rn.getCorrelationContext(Qe)}catch(tt){Go(Oe,Me.FailedMonitorAjaxGetCorrelationHeader,"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",{fetchDiagnosticsMessage:Vt(Be),exception:Dt(tt)})}}}),t}return e.getDefaultConfig=function(){var t={maxAjaxCallsPerView:500,disableAjaxTracking:!1,disableFetchTracking:!0,excludeRequestFromAutoTrackingPatterns:void 0,disableCorrelationHeaders:!1,distributedTracingMode:Pi.AI_AND_W3C,correlationHeaderExcludedDomains:["*.blob.core.windows.net","*.blob.core.chinacloudapi.cn","*.blob.core.cloudapi.de","*.blob.core.usgovcloudapi.net"],correlationHeaderDomains:void 0,correlationHeaderExcludePatterns:void 0,appId:void 0,enableCorsCorrelation:!1,enableRequestHeaderTracking:!1,enableResponseHeaderTracking:!1,enableAjaxErrorStatusText:!1,enableAjaxPerfTracking:!1,maxAjaxPerfLookupAttempts:3,ajaxPerfLookupDelay:25,ignoreHeaders:["Authorization","X-API-Key","WWW-Authenticate"]};return t},e.getEmptyConfig=function(){var t=this.getDefaultConfig();return zt(t,function(i){t[i]=void 0}),t},e.prototype.processTelemetry=function(t,i){this.processNext(t,i)},e.identifier="AjaxDependencyPlugin",e}(Gn)}),fp=o(()=>{Ob()}),ic,nc,hp,pp,sc,mp=o(()=>{Bt(),Oh(),Yh(),up(),fp(),wr(),nc=["snippet","dependencies","properties","_snippetVersion","appInsightsNew","getSKUDefaults"],hp={Default:0,Required:1,Array:2,Hidden:4},pp={__proto__:null,PropertiesPluginIdentifier:Ms,BreezeChannelIdentifier:Bo,AnalyticsPluginIdentifier:Hu,Util:Mu,CorrelationIdHelper:Rn,UrlHelper:ah,DateTimeUtils:oh,ConnectionStringParser:fh,FieldType:hp,RequestHeaders:Xt,DisabledPropertyName:Wn,ProcessLegacy:Es,SampleRate:xo,HttpMethod:To,DEFAULT_BREEZE_ENDPOINT:Su,AIData:Pu,AIBase:Nu,Envelope:Au,Event:Ai,Exception:Jr,Metric:ji,PageView:Ii,PageViewData:Oo,RemoteDependencyData:zi,Trace:sn,PageViewPerformance:an,Data:on,SeverityLevel:Ea,ConfigurationManager:Nh,ContextTagKeys:Uo,DataSanitizer:$f,TelemetryItemCreator:Wi,CtxTagKeys:Yt,Extensions:Zr,DistributedTracingModes:Pi},sc=function(){function r(e){var t=this;t._snippetVersion=""+(e.sv||e.version||""),e.queue=e.queue||[],e.version=e.version||2;var i=e.config||{};if(i.connectionString){var n=uh(i.connectionString),s=n.ingestionendpoint;i.endpointUrl=s?s+"/v2/track":i.endpointUrl,i.instrumentationKey=n.instrumentationkey||i.instrumentationKey}t.appInsights=new $u,t.properties=new Yu,t.dependencies=new rc,t.core=new uu,t._sender=new Ku,t.snippet=e,t.config=i,t.getSKUDefaults()}return r.prototype.getCookieMgr=function(){return this.appInsights.getCookieMgr()},r.prototype.trackEvent=function(e,t){this.appInsights.trackEvent(e,t)},r.prototype.trackPageView=function(e){var t=e||{};this.appInsights.trackPageView(t)},r.prototype.trackPageViewPerformance=function(e){var t=e||{};this.appInsights.trackPageViewPerformance(t)},r.prototype.trackException=function(e){e&&!e.exception&&e.error&&(e.exception=e.error),this.appInsights.trackException(e)},r.prototype._onerror=function(e){this.appInsights._onerror(e)},r.prototype.trackTrace=function(e,t){this.appInsights.trackTrace(e,t)},r.prototype.trackMetric=function(e,t){this.appInsights.trackMetric(e,t)},r.prototype.startTrackPage=function(e){this.appInsights.startTrackPage(e)},r.prototype.stopTrackPage=function(e,t,i,n){this.appInsights.stopTrackPage(e,t,i,n)},r.prototype.startTrackEvent=function(e){this.appInsights.startTrackEvent(e)},r.prototype.stopTrackEvent=function(e,t,i){this.appInsights.stopTrackEvent(e,t,i)},r.prototype.addTelemetryInitializer=function(e){return this.appInsights.addTelemetryInitializer(e)},r.prototype.setAuthenticatedUserContext=function(e,t,i){i===void 0&&(i=!1),this.properties.context.user.setAuthenticatedUserContext(e,t,i)},r.prototype.clearAuthenticatedUserContext=function(){this.properties.context.user.clearAuthenticatedUserContext()},r.prototype.trackDependencyData=function(e){this.dependencies.trackDependencyData(e)},r.prototype.flush=function(e){var t=this;e===void 0&&(e=!0),gs(this.core,function(){return"AISKU.flush"},function(){$e(t.core.getTransmissionControls(),function(i){$e(i,function(n){n.flush(e)})})},null,e)},r.prototype.onunloadFlush=function(e){e===void 0&&(e=!0),$e(this.core.getTransmissionControls(),function(t){$e(t,function(i){i.onunloadFlush?i.onunloadFlush():i.flush(e)})})},r.prototype.loadAppInsights=function(e,t,i){var n=this;e===void 0&&(e=!1);var s=this;function c(v){if(v){var S="";Fe(s._snippetVersion)||(S+=s._snippetVersion),e&&(S+=".lg"),s.context&&s.context.internal&&(s.context.internal.snippetVer=S||"-"),zt(s,function(N,U){xt(N)&&!Ge(U)&&N&&N[0]!=="_"&&nc.indexOf(N)===-1&&(v[N]=U)})}}return e&&s.config.extensions&&s.config.extensions.length>0&&fr("Extensions not allowed in legacy mode"),gs(s.core,function(){return"AISKU.loadAppInsights"},function(){var v=[];v.push(s._sender),v.push(s.properties),v.push(s.dependencies),v.push(s.appInsights),s.core.initialize(s.config,v,t,i),s.context=s.properties.context,ic&&s.context&&(s.context.internal.sdkSrc=ic),c(s.snippet),s.emptyQueue(),s.pollInternalLogs(),s.addHousekeepingBeforeUnload(n)}),s},r.prototype.updateSnippetDefinitions=function(e){si(e,this,function(t){return t&&nc.indexOf(t)===-1})},r.prototype.emptyQueue=function(){var e=this;try{if(et(e.snippet.queue)){for(var t=e.snippet.queue.length,i=0;i<t;i++){var n=e.snippet.queue[i];n()}e.snippet.queue=void 0,delete e.snippet.queue}}catch(c){var s={};c&&Ge(c.toString)&&(s.exception=c.toString())}},r.prototype.pollInternalLogs=function(){this.core.pollInternalLogs()},r.prototype.addHousekeepingBeforeUnload=function(e){if(ao()||Kd()){var t=function(){e.onunloadFlush(!1),$e(e.appInsights.core._extensions,function(n){if(n.identifier===Ms)return n&&n.context&&n.context._sessionManager&&n.context._sessionManager.backup(),-1})};if(!e.appInsights.config.disableFlushOnBeforeUnload){var i=zn("beforeunload",t);i=zn("unload",t)||i,i=zn("pagehide",t)||i,i=zn("visibilitychange",t)||i,!i&&!u0()&&e.appInsights.core.logger.throwInternal(Ne.CRITICAL,Me.FailedToAddHandlerForOnBeforeUnload,"Could not add handler for beforeunload and pagehide")}e.appInsights.config.disableFlushOnUnload||(zn("pagehide",t),zn("visibilitychange",t))}},r.prototype.getSender=function(){return this._sender},r.prototype.getSKUDefaults=function(){var e=this;e.config.diagnosticLogInterval=e.config.diagnosticLogInterval&&e.config.diagnosticLogInterval>0?e.config.diagnosticLogInterval:1e4},r}(),function(){var r=null,e=!1,t=["://js.monitor.azure.com/","://az416426.vo.msecnd.net/"];try{var i=(document||{}).currentScript;i&&(r=i.src)}catch(v){}if(r)try{var n=r.toLowerCase();if(n){for(var s="",c=0;c<t.length;c++)if(n.indexOf(t[c])!==-1){s="cdn"+(c+1),n.indexOf("/scripts/")===-1&&(n.indexOf("/next/")!==-1?s+="-next":n.indexOf("/beta/")!==-1&&(s+="-beta")),ic=s+(e?".mod":"");break}}}catch(v){}}()}),gp,vp,Lb=o(()=>{wr(),Bt(),gp=["snippet","getDefaultConfig","_hasLegacyInitializers","_queue","_processLegacyInitializers"],vp=function(){function r(e,t){this._hasLegacyInitializers=!1,this._queue=[],this.config=r.getDefaultConfig(e.config),this.appInsightsNew=t,this.context={addTelemetryInitializer:this.addTelemetryInitializers.bind(this)}}return r.getDefaultConfig=function(e){return e||(e={}),e.endpointUrl=e.endpointUrl||"https://dc.services.visualstudio.com/v2/track",e.sessionRenewalMs=30*60*1e3,e.sessionExpirationMs=24*60*60*1e3,e.maxBatchSizeInBytes=e.maxBatchSizeInBytes>0?e.maxBatchSizeInBytes:102400,e.maxBatchInterval=isNaN(e.maxBatchInterval)?15e3:e.maxBatchInterval,e.enableDebug=Kt(e.enableDebug),e.disableExceptionTracking=Kt(e.disableExceptionTracking),e.disableTelemetry=Kt(e.disableTelemetry),e.verboseLogging=Kt(e.verboseLogging),e.emitLineDelimitedJson=Kt(e.emitLineDelimitedJson),e.diagnosticLogInterval=e.diagnosticLogInterval||1e4,e.autoTrackPageVisitTime=Kt(e.autoTrackPageVisitTime),(isNaN(e.samplingPercentage)||e.samplingPercentage<=0||e.samplingPercentage>=100)&&(e.samplingPercentage=100),e.disableAjaxTracking=Kt(e.disableAjaxTracking),e.maxAjaxCallsPerView=isNaN(e.maxAjaxCallsPerView)?500:e.maxAjaxCallsPerView,e.isBeaconApiDisabled=Kt(e.isBeaconApiDisabled,!0),e.disableCorrelationHeaders=Kt(e.disableCorrelationHeaders),e.correlationHeaderExcludedDomains=e.correlationHeaderExcludedDomains||["*.blob.core.windows.net","*.blob.core.chinacloudapi.cn","*.blob.core.cloudapi.de","*.blob.core.usgovcloudapi.net"],e.disableFlushOnBeforeUnload=Kt(e.disableFlushOnBeforeUnload),e.disableFlushOnUnload=Kt(e.disableFlushOnUnload,e.disableFlushOnBeforeUnload),e.enableSessionStorageBuffer=Kt(e.enableSessionStorageBuffer,!0),e.isRetryDisabled=Kt(e.isRetryDisabled),e.isCookieUseDisabled=Kt(e.isCookieUseDisabled),e.isStorageUseDisabled=Kt(e.isStorageUseDisabled),e.isBrowserLinkTrackingEnabled=Kt(e.isBrowserLinkTrackingEnabled),e.enableCorsCorrelation=Kt(e.enableCorsCorrelation),e},r.prototype.addTelemetryInitializers=function(e){var t=this;this._hasLegacyInitializers||(this.appInsightsNew.addTelemetryInitializer(function(i){t._processLegacyInitializers(i)}),this._hasLegacyInitializers=!0),this._queue.push(e)},r.prototype.getCookieMgr=function(){return this.appInsightsNew.getCookieMgr()},r.prototype.startTrackPage=function(e){this.appInsightsNew.startTrackPage(e)},r.prototype.stopTrackPage=function(e,t,i,n){this.appInsightsNew.stopTrackPage(e,t,i)},r.prototype.trackPageView=function(e,t,i,n,s){var c={name:e,uri:t,properties:i,measurements:n};this.appInsightsNew.trackPageView(c)},r.prototype.trackEvent=function(e,t,i){this.appInsightsNew.trackEvent({name:e})},r.prototype.trackDependency=function(e,t,i,n,s,c,v){this.appInsightsNew.trackDependencyData({id:e,target:i,type:n,duration:s,properties:{HttpMethod:t},success:c,responseCode:v})},r.prototype.trackException=function(e,t,i,n,s){this.appInsightsNew.trackException({exception:e})},r.prototype.trackMetric=function(e,t,i,n,s,c){this.appInsightsNew.trackMetric({name:e,average:t,sampleCount:i,min:n,max:s})},r.prototype.trackTrace=function(e,t,i){this.appInsightsNew.trackTrace({message:e,severityLevel:i})},r.prototype.flush=function(e){this.appInsightsNew.flush(e)},r.prototype.setAuthenticatedUserContext=function(e,t,i){this.appInsightsNew.context.user.setAuthenticatedUserContext(e,t,i)},r.prototype.clearAuthenticatedUserContext=function(){this.appInsightsNew.context.user.clearAuthenticatedUserContext()},r.prototype._onerror=function(e,t,i,n,s){this.appInsightsNew._onerror({message:e,url:t,lineNumber:i,columnNumber:n,error:s})},r.prototype.startTrackEvent=function(e){this.appInsightsNew.startTrackEvent(e)},r.prototype.stopTrackEvent=function(e,t,i){this.appInsightsNew.stopTrackEvent(e,t,i)},r.prototype.downloadAndSetup=function(e){fr("downloadAndSetup not implemented in web SKU")},r.prototype.updateSnippetDefinitions=function(e){si(e,this,function(t){return t&&gp.indexOf(t)===-1})},r.prototype.loadAppInsights=function(){var e=this;if(this.config.iKey){var t=this.trackPageView;this.trackPageView=function(s,c,v){t.apply(e,[null,s,c,v])}}var i="logPageView";typeof this.snippet[i]=="function"&&(this[i]=function(s,c,v){e.trackPageView(null,s,c,v)});var n="logEvent";return typeof this.snippet[n]=="function"&&(this[n]=function(s,c,v){e.trackEvent(s,c,v)}),this},r.prototype._processLegacyInitializers=function(e){return e.tags[Es]=this._queue,e},r}()}),bp,Ub=o(()=>{Lb(),mp(),Bt(),bp=function(){function r(){}return r.getAppInsights=function(e,t){var i=new sc(e),n=t!==2;if(_s(),t===2)return i.updateSnippetDefinitions(e),i.loadAppInsights(n),i;var s=new vp(e,i);return s.updateSnippetDefinitions(e),i.loadAppInsights(n),s},r}()}),yp={};d(yp,{AppInsightsCore:()=>uu,ApplicationAnalytics:()=>$u,ApplicationInsights:()=>sc,ApplicationInsightsContainer:()=>bp,BaseCore:()=>ou,BaseTelemetryPlugin:()=>Gn,CoreUtils:()=>Eo,DependenciesPlugin:()=>rc,DistributedTracingModes:()=>Pi,Event:()=>Ai,Exception:()=>Jr,LoggingSeverity:()=>Ne,Metric:()=>ji,NotificationManager:()=>lu,PageView:()=>Ii,PageViewPerformance:()=>an,PerfEvent:()=>vs,PerfManager:()=>Gl,PropertiesPlugin:()=>Yu,RemoteDependencyData:()=>zi,Sender:()=>Ku,SeverityLevel:()=>Ea,Telemetry:()=>pp,Trace:()=>sn,Util:()=>Mu,_InternalMessageId:()=>Me,doPerf:()=>gs});var Bb=o(()=>{mp(),Ub(),Bt(),wr(),Yh(),Oh(),up(),fp()}),_i;(function(r){r.ON="on",r.OFF="off"})(_i||(_i={}));function Pa(){let r="telemetry",e="enableTelemetry";return g.env.isTelemetryEnabled!==void 0?g.env.isTelemetryEnabled?_i.ON:_i.OFF:g.workspace.getConfiguration(r).get(e)?_i.ON:_i.OFF}var qb=class{constructor(r,e){this._isInstantiated=!1,this._eventQueue=[],this._exceptionQueue=[],this._clientFactory=e,this._key=r,Pa()!==_i.OFF&&this.instantiateAppender()}logEvent(r,e){if(!this._telemetryClient){!this._isInstantiated&&Pa()===_i.ON&&this._eventQueue.push({eventName:r,data:e});return}this._telemetryClient.logEvent(r,e)}logException(r,e){if(!this._telemetryClient){!this._isInstantiated&&Pa()!==_i.OFF&&this._exceptionQueue.push({exception:r,data:e});return}this._telemetryClient.logException(r,e)}flush(){return f(this,null,function*(){this._telemetryClient&&(yield this._telemetryClient.flush(),this._telemetryClient=void 0)})}_flushQueues(){this._eventQueue.forEach(({eventName:r,data:e})=>this.logEvent(r,e)),this._eventQueue=[],this._exceptionQueue.forEach(({exception:r,data:e})=>this.logException(r,e)),this._exceptionQueue=[]}instantiateAppender(){this._isInstantiated||this._clientFactory(this._key).then(r=>{this._telemetryClient=r,this._isInstantiated=!0,this._flushQueues()}).catch(r=>{console.error(r)})}},Hb=class{constructor(r,e,t,i,n){this.extensionId=r,this.extensionVersion=e,this.telemetryAppender=t,this.osShim=i,this.firstParty=!1,this.userOptIn=!1,this.errorOptIn=!1,this.disposables=[],this.firstParty=!!n,this.updateUserOptStatus(),g.env.onDidChangeTelemetryEnabled!==void 0?(this.disposables.push(g.env.onDidChangeTelemetryEnabled(()=>this.updateUserOptStatus())),this.disposables.push(g.workspace.onDidChangeConfiguration(()=>this.updateUserOptStatus()))):this.disposables.push(g.workspace.onDidChangeConfiguration(()=>this.updateUserOptStatus()))}updateUserOptStatus(){let r=Pa();this.userOptIn=r===_i.ON,this.errorOptIn=r===_i.ON,(this.userOptIn||this.errorOptIn)&&this.telemetryAppender.instantiateAppender()}cleanRemoteName(r){if(!r)return"none";let e="other";return["ssh-remote","dev-container","attached-container","wsl","codespaces"].forEach(t=>{r.indexOf(`${t}+`)===0&&(e=t)}),e}get extension(){return this._extension===void 0&&(this._extension=g.extensions.getExtension(this.extensionId)),this._extension}cloneAndChange(r,e){if(r===null||typeof r!="object"||typeof e!="function")return r;let t={};for(let i in r)t[i]=e(i,r[i]);return t}shouldSendErrorTelemetry(){return this.errorOptIn===!1?!1:this.firstParty?this.cleanRemoteName(g.env.remoteName)!=="other"?!0:!(this.extension===void 0||this.extension.extensionKind===g.ExtensionKind.Workspace||g.env.uiKind===g.UIKind.Web):!0}getCommonProperties(){let r=Object.create(null);if(r["common.os"]=this.osShim.platform,r["common.nodeArch"]=this.osShim.architecture,r["common.platformversion"]=(this.osShim.release||"").replace(/^(\d+)(\.\d+)?(\.\d+)?(.*)/,"$1$2$3"),r["common.extname"]=this.extensionId,r["common.extversion"]=this.extensionVersion,g&&g.env){switch(r["common.vscodemachineid"]=g.env.machineId,r["common.vscodesessionid"]=g.env.sessionId,r["common.vscodeversion"]=g.version,r["common.isnewappinstall"]=g.env.isNewAppInstall?g.env.isNewAppInstall.toString():"false",r["common.product"]=g.env.appHost,g.env.uiKind){case g.UIKind.Web:r["common.uikind"]="web";break;case g.UIKind.Desktop:r["common.uikind"]="desktop";break;default:r["common.uikind"]="unknown"}r["common.remotename"]=this.cleanRemoteName(g.env.remoteName)}return r}anonymizeFilePaths(r,e){let t;if(r==null)return"";let i=[];g.env.appRoot!==""&&i.push(new RegExp(g.env.appRoot.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gi")),this.extension&&i.push(new RegExp(this.extension.extensionPath.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gi"));let n=r;if(e){let s=[];for(let N of i)for(;(t=N.exec(r))&&t;)s.push([t.index,N.lastIndex]);let c=/^[\\/]?(node_modules|node_modules\.asar)[\\/]/,v=/(file:\/\/)?([a-zA-Z]:(\\\\|\\|\/)|(\\\\|\\|\/))?([\w-._]+(\\\\|\\|\/))+[\w-._]*/g,S=0;for(n="";(t=v.exec(r))&&t;)t[0]&&!c.test(t[0])&&s.every(([N,U])=>t.index<N||t.index>=U)&&(n+=r.substring(S,t.index)+"<REDACTED: user-file-path>",S=v.lastIndex);S<r.length&&(n+=r.substr(S))}for(let s of i)n=n.replace(s,"");return n}removePropertiesWithPossibleUserInfo(r){if(typeof r!="object")return;let e=Object.create(null);for(let t of Object.keys(r)){let i=r[t];if(!i)continue;let n=/@[a-zA-Z0-9-.]+/;/(key|token|sig|signature|password|passwd|pwd)[="':\s]/.test(i.toLowerCase())?e[t]="<REDACTED: secret>":n.test(i)?e[t]="<REDACTED: email>":e[t]=i}return e}sendTelemetryEvent(r,e,t){if(this.userOptIn&&r!==""){e=M(M({},e),this.getCommonProperties());let i=this.cloneAndChange(e,(n,s)=>this.anonymizeFilePaths(s,this.firstParty));this.telemetryAppender.logEvent(`${this.extensionId}/${r}`,{properties:this.removePropertiesWithPossibleUserInfo(i),measurements:t})}}sendRawTelemetryEvent(r,e,t){this.userOptIn&&r!==""&&(e=M(M({},e),this.getCommonProperties()),this.telemetryAppender.logEvent(`${this.extensionId}/${r}`,{properties:e,measurements:t}))}sendTelemetryErrorEvent(r,e,t,i){if(this.errorOptIn&&r!==""){e=M(M({},e),this.getCommonProperties());let n=this.cloneAndChange(e,(s,c)=>this.shouldSendErrorTelemetry()?this.anonymizeFilePaths(c,this.firstParty):i===void 0||i.indexOf(s)!==-1?"REDACTED":this.anonymizeFilePaths(c,this.firstParty));this.telemetryAppender.logEvent(`${this.extensionId}/${r}`,{properties:this.removePropertiesWithPossibleUserInfo(n),measurements:t})}}sendTelemetryException(r,e,t){if(this.shouldSendErrorTelemetry()&&this.errorOptIn&&r){e=M(M({},e),this.getCommonProperties());let i=this.cloneAndChange(e,(n,s)=>this.anonymizeFilePaths(s,this.firstParty));r.stack&&(r.stack=this.anonymizeFilePaths(r.stack,this.firstParty)),this.telemetryAppender.logException(r,{properties:this.removePropertiesWithPossibleUserInfo(i),measurements:t})}}dispose(){return this.telemetryAppender.flush(),Promise.all(this.disposables.map(r=>r.dispose()))}},Vb=r=>f(void 0,null,function*(){let e;try{let t=yield Promise.resolve().then(()=>(Bb(),yp)),i;r&&r.indexOf("AIF-")===0&&(i="https://vortex.data.microsoft.com/collect/v1"),e=new t.ApplicationInsights({config:{instrumentationKey:r,endpointUrl:i,disableAjaxTracking:!0,disableExceptionTracking:!0,disableFetchTracking:!0,disableCorrelationHeaders:!0,disableCookiesUsage:!0,autoTrackPageVisitTime:!1,emitLineDelimitedJson:!0,disableInstrumentationKeyValidation:!0}}),e.loadAppInsights();let n=Pa();i&&n===_i.ON&&fetch(i).catch(()=>e=void 0)}catch(t){return Promise.reject(t)}return{logEvent:(t,i)=>{e==null||e.trackEvent({name:t},M(M({},i==null?void 0:i.properties),i==null?void 0:i.measurements))},logException:(t,i)=>{e==null||e.trackException({exception:t,properties:M(M({},i==null?void 0:i.properties),i==null?void 0:i.measurements)})},flush:()=>f(void 0,null,function*(){e==null||e.flush()})}}),$b=class extends Hb{constructor(r,e,t,i){let n=new qb(t,Vb);t&&t.indexOf("AIF-")===0&&(i=!0),super(r,e,n,{release:navigator.appVersion,platform:"web",architecture:"web"},i)}};/*!
* Microsoft Dynamic Proto Utility, 1.1.4
* Copyright (c) Microsoft and contributors. All rights reserved.
*/var Gb=Object.defineProperty,jo=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?Gb(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t),wp;(function(r){r[r.Info=0]="Info",r[r.Debug=1]="Debug",r[r.Off=2]="Off"})(wp||(wp={}));const jb="githubPullRequests",zb="logLevel";class Wb{constructor(){jo(this,"_outputChannel"),jo(this,"_logLevel"),jo(this,"_disposable"),jo(this,"_activePerfMarkers",new Map),this._outputChannel=g.window.createOutputChannel("GitHub Pull Request"),this._disposable=g.workspace.onDidChangeConfiguration(()=>{this.getLogLevel()}),this.getLogLevel()}startPerfMarker(e){const t=new Date().getTime();this._outputChannel.appendLine(`PERF_MARKER> Start ${e}`),this._activePerfMarkers.set(e,t)}endPerfMarker(e){const t=new Date().getTime();this._outputChannel.appendLine(`PERF_MARKER> End ${e}: ${t-this._activePerfMarkers.get(e)} ms`),this._activePerfMarkers.delete(e)}appendLine(e,t){switch(this._logLevel){case 2:return;case 1:const n=`${new Date().getTime()/1e3}s`,s=t?`${t}> ${e}`:`${e}`;this._outputChannel.appendLine(`[Debug ${n}] ${s}`);return;case 0:default:this._outputChannel.appendLine("[Info] "+(t?`${t}> ${e}`:`${e}`));return}}debug(e,t){this._logLevel===1&&this.appendLine(e,t)}dispose(){this._disposable&&this._disposable.dispose()}getLogLevel(){switch(g.workspace.getConfiguration(jb).get(zb)){case"debug":this._logLevel=1;break;case"off":this._logLevel=2;break;case"info":default:this._logLevel=0;break}}}const xe=new Wb;var qt=St(26470),Kb=St(27484),ac=St.n(Kb),Qb=St(84110),Yb=St.n(Qb),Jb=St(70660),Zb=St.n(Jb),Xb=Object.defineProperty,vr=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?Xb(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);ac().extend(Yb(),{thresholds:[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:6,d:"day"},{l:"w",r:7},{l:"ww",r:3,d:"week"},{l:"M",r:4},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}]}),ac().extend(Zb()),ac().updateLocale("en",{relativeTime:{future:"in %s",past:"%s ago",s:"seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"}});function oc(r,e){const t=Object.create(null);return r.filter(i=>{const n=e(i);return t[n]?!1:(t[n]=!0,!0)})}function ey(r){return r.forEach(e=>e.dispose()),[]}function ty(r){return{dispose:r}}function ry(r){return ty(()=>ey(r))}function gE(...r){return(e,t=null,i)=>{const n=ry(r.map(s=>s(c=>e.call(t,c))));return i&&i.push(n),n}}function vE(r,e){return(t,i=null,n)=>r(s=>e(s)&&t.call(i,s),null,n)}function bE(r){return(e,t=null,i)=>{const n=r(s=>(n.dispose(),e.call(t,s)),null,i);return n}}function iy(r){return/^[a-zA-Z]:\\/.test(r)}function yE(r,e){return r===e?!0:(r.charAt(r.length-1)!==sep&&(r+=sep),iy(r)&&(r=r.toLowerCase(),e=e.toLowerCase()),e.startsWith(r))}function Zn(r,e){return r.reduce((t,i)=>{const n=e(i);return t[n]=[...t[n]||[],i],t},Object.create(null))}function ny(r){return!!r.errors}function sy(r){let e=!0;if(!!r.errors&&Array.isArray(r.errors)){for(const t of r.errors)if(!t.field||!t.value||!t.code){e=!1;break}}else e=!1;return e}function bt(r){if(!(r instanceof Error))return typeof r=="string"?r:r.gitErrorCode?`${r.message}. Please check git output for more details`:r.stderr?`${r.stderr}. Please check git output for more details`:"Error";let e=r.message,t;if(r.message==="Validation Failed"&&sy(r))t=r.errors.map(i=>`Value "${i.value}" cannot be set for field ${i.field} (code: ${i.code})`).join(", ");else if(ny(r)&&r.errors)return r.errors.map(i=>typeof i=="string"?i:i.message).join(", ");return t&&(e=`${e}: ${t}`),e}const ay=(r,e)=>e(r);async function wE(r,e=ay){let t;return new Promise((i,n)=>t=r(s=>{try{Promise.resolve(e(s,i,n)).catch(n)}catch(c){n(c)}})).then(i=>(t.dispose(),i),i=>{throw t.dispose(),i})}function _E(r){const e=dayjs(r),t=Date.now();return e.diff(t,"month"),e.diff(t,"month")<1?e.fromNow():e.diff(t,"year")<1?`on ${e.format("MMM D")}`:`on ${e.format("MMM D, YYYY")}`}var _p;(function(r){r[r.Period=46]="Period",r[r.Slash=47]="Slash",r[r.A=65]="A",r[r.Z=90]="Z",r[r.Backslash=92]="Backslash",r[r.a=97]="a",r[r.z=122]="z"})(_p||(_p={}));function Sp(r,e){return r<e?-1:r>e?1:0}function lc(r,e,t=0,i=r.length,n=0,s=e.length){for(;t<i&&n<s;t++,n++){const S=r.charCodeAt(t),N=e.charCodeAt(n);if(S<N)return-1;if(S>N)return 1}const c=i-t,v=s-n;return c<v?-1:c>v?1:0}function zo(r,e){return uc(r,e,0,r.length,0,e.length)}function uc(r,e,t=0,i=r.length,n=0,s=e.length){for(;t<i&&n<s;t++,n++){let S=r.charCodeAt(t),N=e.charCodeAt(n);if(S===N)continue;const U=S-N;if(!(U===32&&Ep(N))&&!(U===-32&&Ep(S)))return kp(S)&&kp(N)?U:lc(r.toLowerCase(),e.toLowerCase(),t,i,n,s)}const c=i-t,v=s-n;return c<v?-1:c>v?1:0}function kp(r){return r>=97&&r<=122}function Ep(r){return r>=65&&r<=90}class oy{constructor(){vr(this,"_value",""),vr(this,"_pos",0)}reset(e){return this._value=e,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos<this._value.length-1}cmp(e){const t=e.charCodeAt(0),i=this._value.charCodeAt(this._pos);return t-i}value(){return this._value[this._pos]}}class ly{constructor(e=!0){this._caseSensitive=e,vr(this,"_value"),vr(this,"_from"),vr(this,"_to")}reset(e){return this._value=e,this._from=0,this._to=0,this.next()}hasNext(){return this._to<this._value.length}next(){this._from=this._to;let e=!0;for(;this._to<this._value.length;this._to++)if(this._value.charCodeAt(this._to)===46)if(e)this._from++;else break;else e=!1;return this}cmp(e){return this._caseSensitive?lc(e,this._value,0,e.length,this._from,this._to):uc(e,this._value,0,e.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}class Rp{constructor(e=!0,t=!0){this._splitOnBackslash=e,this._caseSensitive=t,vr(this,"_value"),vr(this,"_from"),vr(this,"_to")}reset(e){return this._value=e.replace(/\\$|\/$/,""),this._from=0,this._to=0,this.next()}hasNext(){return this._to<this._value.length}next(){this._from=this._to;let e=!0;for(;this._to<this._value.length;this._to++){const t=this._value.charCodeAt(this._to);if(t===47||this._splitOnBackslash&&t===92)if(e)this._from++;else break;else e=!1}return this}cmp(e){return this._caseSensitive?lc(e,this._value,0,e.length,this._from,this._to):uc(e,this._value,0,e.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}var xp;(function(r){r[r.Scheme=1]="Scheme",r[r.Authority=2]="Authority",r[r.Path=3]="Path",r[r.Query=4]="Query",r[r.Fragment=5]="Fragment"})(xp||(xp={}));class uy{constructor(e){this._ignorePathCasing=e,vr(this,"_pathIterator"),vr(this,"_value"),vr(this,"_states",[]),vr(this,"_stateIdx",0)}reset(e){return this._value=e,this._states=[],this._value.scheme&&this._states.push(1),this._value.authority&&this._states.push(2),this._value.path&&(this._pathIterator=new Rp(!1,!this._ignorePathCasing(e)),this._pathIterator.reset(e.path),this._pathIterator.value()&&this._states.push(3)),this._value.query&&this._states.push(4),this._value.fragment&&this._states.push(5),this._stateIdx=0,this}next(){return this._states[this._stateIdx]===3&&this._pathIterator.hasNext()?this._pathIterator.next():this._stateIdx+=1,this}hasNext(){return this._states[this._stateIdx]===3&&this._pathIterator.hasNext()||this._stateIdx<this._states.length-1}cmp(e){if(this._states[this._stateIdx]===1)return zo(e,this._value.scheme);if(this._states[this._stateIdx]===2)return zo(e,this._value.authority);if(this._states[this._stateIdx]===3)return this._pathIterator.cmp(e);if(this._states[this._stateIdx]===4)return Sp(e,this._value.query);if(this._states[this._stateIdx]===5)return Sp(e,this._value.fragment);throw new Error}value(){if(this._states[this._stateIdx]===1)return this._value.scheme;if(this._states[this._stateIdx]===2)return this._value.authority;if(this._states[this._stateIdx]===3)return this._pathIterator.value();if(this._states[this._stateIdx]===4)return this._value.query;if(this._states[this._stateIdx]===5)return this._value.fragment;throw new Error}}class Wo{constructor(){vr(this,"segment"),vr(this,"value"),vr(this,"key"),vr(this,"left"),vr(this,"mid"),vr(this,"right")}isEmpty(){return!this.left&&!this.mid&&!this.right&&!this.value}}class Ds{constructor(e){vr(this,"_iter"),vr(this,"_root"),this._iter=e}static forUris(e=()=>!1){return new Ds(new uy(e))}static forPaths(){return new Ds(new Rp)}static forStrings(){return new Ds(new oy)}static forConfigKeys(){return new Ds(new ly)}clear(){this._root=void 0}set(e,t){const i=this._iter.reset(e);let n;for(this._root||(this._root=new Wo,this._root.segment=i.value()),n=this._root;;){const c=i.cmp(n.segment);if(c>0)n.left||(n.left=new Wo,n.left.segment=i.value()),n=n.left;else if(c<0)n.right||(n.right=new Wo,n.right.segment=i.value()),n=n.right;else if(i.hasNext())i.next(),n.mid||(n.mid=new Wo,n.mid.segment=i.value()),n=n.mid;else break}const s=n.value;return n.value=t,n.key=e,s}get(e){var t;return(t=this._getNode(e))==null?void 0:t.value}_getNode(e){const t=this._iter.reset(e);let i=this._root;for(;i;){const n=t.cmp(i.segment);if(n>0)i=i.left;else if(n<0)i=i.right;else if(t.hasNext())t.next(),i=i.mid;else break}return i}has(e){const t=this._getNode(e);return!((t==null?void 0:t.value)===void 0&&(t==null?void 0:t.mid)===void 0)}delete(e){return this._delete(e,!1)}deleteSuperstr(e){return this._delete(e,!0)}_delete(e,t){const i=this._iter.reset(e),n=[];let s=this._root;for(;s;){const c=i.cmp(s.segment);if(c>0)n.push([1,s]),s=s.left;else if(c<0)n.push([-1,s]),s=s.right;else if(i.hasNext())i.next(),n.push([0,s]),s=s.mid;else{for(t?(s.left=void 0,s.mid=void 0,s.right=void 0):s.value=void 0;n.length>0&&s.isEmpty();){let[v,S]=n.pop();switch(v){case 1:S.left=void 0;break;case 0:S.mid=void 0;break;case-1:S.right=void 0;break}s=S}break}}}findSubstr(e){const t=this._iter.reset(e);let i=this._root,n;for(;i;){const s=t.cmp(i.segment);if(s>0)i=i.left;else if(s<0)i=i.right;else if(t.hasNext())t.next(),n=i.value||n,i=i.mid;else break}return i&&i.value||n}findSuperstr(e){const t=this._iter.reset(e);let i=this._root;for(;i;){const n=t.cmp(i.segment);if(n>0)i=i.left;else if(n<0)i=i.right;else if(t.hasNext())t.next(),i=i.mid;else return i.mid?this._entries(i.mid):void 0}}forEach(e){for(const[t,i]of this)e(i,t)}*[Symbol.iterator](){yield*this._entries(this._root)}*_entries(e){e&&(yield*this._entries(e.left),e.value&&(yield[e.key,e.value]),yield*this._entries(e.mid),yield*this._entries(e.right))}}var cy=Object.defineProperty,Di=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?cy(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t),cc;(function(r){r[r.Head=0]="Head",r[r.RemoteHead=1]="RemoteHead",r[r.Tag=2]="Tag"})(cc||(cc={}));var Mn;(function(r){r.BadConfigFile="BadConfigFile",r.AuthenticationFailed="AuthenticationFailed",r.NoUserNameConfigured="NoUserNameConfigured",r.NoUserEmailConfigured="NoUserEmailConfigured",r.NoRemoteRepositorySpecified="NoRemoteRepositorySpecified",r.NotAGitRepository="NotAGitRepository",r.NotAtRepositoryRoot="NotAtRepositoryRoot",r.Conflict="Conflict",r.StashConflict="StashConflict",r.UnmergedChanges="UnmergedChanges",r.PushRejected="PushRejected",r.RemoteConnectionError="RemoteConnectionError",r.DirtyWorkTree="DirtyWorkTree",r.CantOpenResource="CantOpenResource",r.GitNotFound="GitNotFound",r.CantCreatePipe="CantCreatePipe",r.CantAccessRemote="CantAccessRemote",r.RepositoryNotFound="RepositoryNotFound",r.RepositoryIsLocked="RepositoryIsLocked",r.BranchNotFullyMerged="BranchNotFullyMerged",r.NoRemoteReference="NoRemoteReference",r.InvalidBranchName="InvalidBranchName",r.BranchAlreadyExists="BranchAlreadyExists",r.NoLocalChanges="NoLocalChanges",r.NoStashFound="NoStashFound",r.LocalChangesOverwritten="LocalChangesOverwritten",r.NoUpstreamBranch="NoUpstreamBranch",r.IsInSubmodule="IsInSubmodule",r.WrongCase="WrongCase",r.CantLockRef="CantLockRef",r.CantRebaseMultipleBranches="CantRebaseMultipleBranches",r.PatchDoesNotApply="PatchDoesNotApply"})(Mn||(Mn={}));const Tp=class{constructor(){Di(this,"_providers",new Map),Di(this,"_onDidOpenRepository",new g.EventEmitter),Di(this,"onDidOpenRepository",this._onDidOpenRepository.event),Di(this,"_onDidCloseRepository",new g.EventEmitter),Di(this,"onDidCloseRepository",this._onDidCloseRepository.event),Di(this,"_onDidChangeState",new g.EventEmitter),Di(this,"onDidChangeState",this._onDidChangeState.event),Di(this,"_onDidPublish",new g.EventEmitter),Di(this,"onDidPublish",this._onDidPublish.event),Di(this,"_disposables"),this._disposables=[]}get repositories(){const r=[];return this._providers.forEach(({repositories:e})=>{e&&r.push(...e)}),r}get state(){if(this._providers.size!==0){for(const[,{state:r}]of this._providers)if(r!=="initialized")return"uninitialized";return"initialized"}}_updateReposContext(){const r=Array.from(this._providers.values()).reduce((e,t)=>e+t.repositories.length,0);g.commands.executeCommand("setContext","gitHubOpenRepositoryCount",r)}registerGitProvider(r){xe.appendLine("Registering git provider");const e=this._nextHandle();return this._providers.set(e,r),this._disposables.push(r.onDidCloseRepository(t=>this._onDidCloseRepository.fire(t))),this._disposables.push(r.onDidOpenRepository(t=>{xe.appendLine(`Repository ${t.rootUri} has been opened`),this._updateReposContext(),this._onDidOpenRepository.fire(t)})),r.onDidChangeState&&this._disposables.push(r.onDidChangeState(t=>this._onDidChangeState.fire(t))),r.onDidPublish&&this._disposables.push(r.onDidPublish(t=>this._onDidPublish.fire(t))),this._updateReposContext(),r.repositories.forEach(t=>{this._onDidOpenRepository.fire(t)}),{dispose:()=>{const t=r==null?void 0:r.repositories;t&&t.length>0&&t.forEach(i=>this._onDidCloseRepository.fire(i)),this._providers.delete(e)}}}getGitProvider(r){const e=Ds.forUris();return this._providers.forEach(t=>{const i=t.repositories;if(i&&i.length>0)for(const n of i)e.set(n.rootUri,t)}),e.findSubstr(r)}_nextHandle(){return Tp._handlePool++}dispose(){this._disposables.forEach(r=>r.dispose())}};let Cp=Tp;Di(Cp,"_handlePool",0);const dc=new Map;function Mp(r,e){dc.set(r,e)}function Np(r){dc.delete(r)}function Nn(r){for(const e of dc.values())if(e.hasCommentThread(r))return e;xe.appendLine(`Unable to find handler for comment thread ${r.gitHubThreadId}`)}var Pp=St(48764),yt;(function(r){r[r.ADD=0]="ADD",r[r.COPY=1]="COPY",r[r.DELETE=2]="DELETE",r[r.MODIFY=3]="MODIFY",r[r.RENAME=4]="RENAME",r[r.TYPE=5]="TYPE",r[r.UNKNOWN=6]="UNKNOWN",r[r.UNMERGED=7]="UNMERGED"})(yt||(yt={}));class Ap{constructor(e,t,i,n,s,c,v,S){this.baseCommit=e,this.status=t,this.fileName=i,this.previousFileName=n,this.patch=s,this.diffHunks=c,this.isPartial=v,this.blobUrl=S}}class Ip{constructor(e,t,i,n,s){this.baseCommit=e,this.blobUrl=t,this.status=i,this.fileName=n,this.previousFileName=s}}var dy=Object.defineProperty,fy=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?dy(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t),hi;(function(r){r[r.Context=0]="Context",r[r.Add=1]="Add",r[r.Delete=2]="Delete",r[r.Control=3]="Control"})(hi||(hi={}));class Dp{constructor(e,t,i,n,s,c=!0){this.type=e,this.oldLineNumber=t,this.newLineNumber=i,this.positionInHunk=n,this._raw=s,this.endwithLineBreak=c}get raw(){return this._raw}get text(){return this._raw.substr(1)}}function hy(r){switch(r[0]){case" ":return 0;case"+":return 1;case"-":return 2;default:return 3}}class py{constructor(e,t,i,n,s){this.oldLineNumber=e,this.oldLength=t,this.newLineNumber=i,this.newLength=n,this.positionInHunk=s,fy(this,"diffLines",[])}}const Fp=/^@@ \-(\d+)(,(\d+))?( \+(\d+)(,(\d+)?)?)? @@/;function my(r){let e=0,t=0;for(;(t=r.indexOf("\r",t))!==-1;)t++,e++;return e}function*gy(r){let e=0;for(;e!==-1&&e<r.length;){const t=e;e=r.indexOf(`
`,e);let n=(e!==-1?e:r.length)-t;e!==-1&&(e>0&&r[e-1]==="\r"&&n--,e++),yield r.substr(t,n)}}function*Aa(r){const e=gy(r);let t=e.next(),i,n=-1,s=-1,c=-1;for(;!t.done;){const v=t.value;if(Fp.test(v)){i&&(yield i,i=void 0),n===-1&&(n=0);const S=Fp.exec(v),N=s=Number(S[1]),U=Number(S[3])||1,X=c=Number(S[5]),ne=Number(S[7])||1;i=new py(N,U,X,ne,n),i.diffLines.push(new Dp(3,-1,-1,n,v))}else if(i){const S=hy(v);if(S===3)i.diffLines&&i.diffLines.length&&(i.diffLines[i.diffLines.length-1].endwithLineBreak=!1);else{i.diffLines.push(new Dp(S,S!==1?s:-1,S!==2?c:-1,n,v));const N=1+my(v);switch(S){case 0:s+=N,c+=N;break;case 2:s+=N;break;case 1:c+=N;break}}}n!==-1&&++n,t=e.next()}i&&(yield i)}function Op(r){const e=Aa(r);let t=e.next();const i=[],n=[];for(;!t.done;){const s=t.value;i.push(s);for(let c=0;c<s.diffLines.length;c++){const v=s.diffLines[c];if(!(v.type===2||v.type===3))if(v.type===1)n.push(v.text);else{const S=v.text;n.push(S)}}t=e.next()}return i}function vy(r,e){const t=r.split(/\r?\n/),i=Aa(e);let n=i.next();const s=[],c=[];let v=0;for(;!n.done;){const S=n.value;s.push(S);const N=S.oldLineNumber;for(let U=v+1;U<N;U++)c.push(t[U-1]);v=N+S.oldLength-1;for(let U=0;U<S.diffLines.length;U++){const X=S.diffLines[U];if(!(X.type===2||X.type===3))if(X.type===1)c.push(X.text);else{const ne=X.text;c.push(ne)}}n=i.next()}if(v<t.length)for(let S=v+1;S<=t.length;S++)c.push(t[S-1]);return c.join(`
`)}function fc(r){switch(r){case"removed":return yt.DELETE;case"added":return yt.ADD;case"renamed":return yt.RENAME;case"modified":return yt.MODIFY;default:return yt.UNKNOWN}}async function by(r,e,t){const i=[];for(let n=0;n<r.length;n++){const s=r[n],c=fc(s.status);if(!s.patch){i.push(new Ip(t,s.blob_url,c,s.filename,s.previous_filename));continue}let v=!1;switch(c){case yt.DELETE:case yt.MODIFY:try{await e.getObjectDetails(t,s.filename),v=!0}catch(U){}break;case yt.RENAME:try{await e.getObjectDetails(t,s.previous_filename),v=!0}catch(U){}break}const S=Op(s.patch),N=!v&&c!==yt.ADD;i.push(new Ap(t,c,s.filename,s.previous_filename,s.patch,S,N,s.blob_url))}return i}var yy=Object.defineProperty,Lp=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?yy(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);class hc{constructor(){Lp(this,"_onDidChangeFile",new g.EventEmitter),Lp(this,"onDidChangeFile",this._onDidChangeFile.event)}watch(e,t){return{dispose:()=>{}}}stat(e){return{type:g.FileType.File,ctime:0,mtime:0,size:0}}readDirectory(e){return[]}createDirectory(e){}writeFile(e,t,i){}delete(e,t){}rename(e,t,i){}}var or;(function(r){r.LEFT="LEFT",r.RIGHT="RIGHT"})(or||(or={}));var Hr;(function(r){r.DISMISSED="DISMISSED",r.VIEWED="VIEWED",r.UNVIEWED="UNVIEWED"})(Hr||(Hr={}));const Xn="githubPullRequests",Up="terminalLinksHandler",pc="createOnPublishBranch",wy="useReviewMode",Fs="fileListLayout";var _y=St(54098),Ko=St.n(_y);const Bp=void 0;var Sy=St(34155);let qp=!1;const Hp=class{static async getApiHost(r){const e=Sy.env.GITHUB_TEST_SERVER;if(e){if(qp)return g.Uri.parse(e);if(await g.window.showInformationMessage(`The 'GITHUB_TEST_SERVER' environment variable is set to '${e}'. Use this as the GitHub API endpoint?`,{modal:!0},"Yes")==="Yes")return qp=!0,g.Uri.parse(e)}const t=r instanceof g.Uri?r:g.Uri.parse(r.host);return t.authority==="github.com"?g.Uri.parse("https://api.github.com"):g.Uri.parse(`${t.scheme}://${t.authority}`)}static getApiPath(r,e){return(r instanceof g.Uri?r:g.Uri.parse(r.host)).authority==="github.com"?e:`/api/v3${e}`}};var ky=Object.defineProperty,Ey=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?ky(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);class mc{constructor(){Ey(this,"_servers",new Map().set("github.com",!0).set("ssh.github.com",!0))}async isGitHub(e){if(e===null||e.path.endsWith(".wiki")||e.authority.match(/gist[.]github[.]com/))return!1;if(this._servers.has(e.authority))return!!this._servers.get(e.authority);const[t,i]=await mc.getOptions(e,"HEAD","/rate_limit");let n=!1;try{const c=(await Ko()(t.toString(),i)).headers.get("x-github-request-id");return n=c!=null,n}catch(s){return xe.appendLine(`No response from host ${e}: ${s.message}`,"GitHubServer"),n}finally{xe.debug(`Host ${e} is associated with GitHub: ${n}`,"GitHubServer"),this._servers.set(e.authority,n)}}static async getOptions(e,t="GET",i,n){const s={"user-agent":"GitHub VSCode Pull Requests"};n&&(s.authorization=`token ${n}`);const c=g.Uri.joinPath(await Hp.getApiHost(e),Hp.getApiPath(e,i)),v={hostname:c.authority,port:443,method:t,headers:s,agent:Bp};return[c,v]}}var Ry=St(6200),xy=Object.defineProperty,Vp=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?xy(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);const Ty=/^(?:([^@:]+)@)?([^:/]+):?(.+)$/,Cy=/^([a-z-]+):\/\//,My=r=>{const e=Cy.exec(r);if(e){const[c,v]=e;if(v==="ssh")r=r.slice(c.length);else return}const t=Ty.exec(r);if(!t)return;const[,i,n,s]=t;return{User:i,Host:n,path:s}},Ny=(r,e=gc.current)=>{const t=My(r);return t&&e(t)};function $p(r){return{...r,Hostname:r.Host}}function Py(...r){const e=r.filter(t=>!!t);return t=>e.reduce((i,n)=>({...i,...n(i)}),t)}function Ay(r){const e=(0,Ry.parse)(r);return t=>e.compute(t.Host)}const Gp=class{static fromConfig(r){return Py($p,Ay(r))}};let gc=Gp;Vp(gc,"default",$p),Vp(gc,"current",Gp.default);var Iy=Object.defineProperty,Ia=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?Iy(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t),vc;(function(r){r[r.Local=0]="Local",r[r.HTTP=1]="HTTP",r[r.SSH=2]="SSH",r[r.GIT=3]="GIT",r[r.OTHER=4]="OTHER"})(vc||(vc={}));class un{constructor(e){if(Ia(this,"type",4),Ia(this,"host",""),Ia(this,"owner",""),Ia(this,"repositoryName",""),Ia(this,"url"),!this.parseSshProtocol(e))try{this.url=g.Uri.parse(e),this.type=this.getType(this.url.scheme),this.host=this.getHostName(this.url.authority),this.host&&(this.repositoryName=this.getRepositoryName(this.url.path)||"",this.owner=this.getOwnerName(this.url.path)||"")}catch(t){xe.appendLine(`Failed to parse '${e}'`),g.window.showWarningMessage(`Unable to parse remote '${e}'. Please check that it is correctly formatted.`)}}get nameWithOwner(){return this.owner?`${this.owner}/${this.repositoryName}`:this.repositoryName}getType(e){switch(e){case"file":return 0;case"http":case"https":return 1;case"git":return 3;case"ssh":return 2;default:return 4}}parseSshProtocol(e){const t=Ny(e);if(!t)return!1;const{Hostname:i,HostName:n,path:s}=t;return this.host=n||i,this.owner=this.getOwnerName(s)||"",this.repositoryName=this.getRepositoryName(s)||"",this.type=2,!0}getHostName(e){const t=/^(?:.*:?@)?([^:]*)(?::.*)?$/.exec(e);return t&&t.length>=2?t[1].toLocaleLowerCase()==="www.github.com"?"github.com":t[1]:""}getRepositoryName(e){let t=e.replace(/\\/g,"/");t.endsWith("/")&&(t=t.substr(0,t.length-1));const i=t.lastIndexOf("/"),n=t.substr(i+1);if(!(n===""||n==="/"))return n.replace(/\/$/,"").replace(/\.git$/,"")}getOwnerName(e){let t=e.replace(/\\/g,"/");t.endsWith("/")&&(t=t.substr(0,t.length-1));const i=t.split("/");if(i.length>1)return i[i.length-2]}normalizeUri(){if(this.type===4&&!this.url)return;if(this.type===0)return this.url;let e="https";this.url&&(this.url.scheme==="http"||this.url.scheme==="https")&&(e=this.url.scheme);try{return g.Uri.parse(`${e}://${this.host.toLocaleLowerCase()}/${this.nameWithOwner.toLocaleLowerCase()}`)}catch(t){return}}toString(){if(this.type===2)return`git@${this.host}:${this.owner}/${this.repositoryName}`;if(this.type===3)return`git://git@${this.host}:${this.owner}/${this.repositoryName}`;const e=this.normalizeUri();if(e)return e.toString()}update(e){return e.type&&(this.type=e.type),e.host&&(this.host=e.host),e.owner&&(this.owner=e.owner),e.repositoryName&&(this.repositoryName=e.repositoryName),this}equals(e){const t=this.normalizeUri();if(!t)return!1;const i=e.normalizeUri();return i?t.toString().toLocaleLowerCase()===i.toString().toLocaleLowerCase():!1}}var Da=St(34155);function Qo(){return typeof navigator=="object"&&"userAgent"in navigator?navigator.userAgent:typeof Da=="object"&&"version"in Da?`Node.js/${Da.version.substr(1)} (${Da.platform}; ${Da.arch})`:"<environment undetectable>"}var Dy=St(85186);/*!
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/function jp(r){return Object.prototype.toString.call(r)==="[object Object]"}function zp(r){var e,t;return jp(r)===!1?!1:(e=r.constructor,e===void 0?!0:(t=e.prototype,!(jp(t)===!1||t.hasOwnProperty("isPrototypeOf")===!1)))}function Fy(r){return r?Object.keys(r).reduce((e,t)=>(e[t.toLowerCase()]=r[t],e),{}):{}}function Wp(r,e){const t=Object.assign({},r);return Object.keys(e).forEach(i=>{zp(e[i])?i in r?t[i]=Wp(r[i],e[i]):Object.assign(t,{[i]:e[i]}):Object.assign(t,{[i]:e[i]})}),t}function Kp(r){for(const e in r)r[e]===void 0&&delete r[e];return r}function bc(r,e,t){if(typeof e=="string"){let[n,s]=e.split(" ");t=Object.assign(s?{method:n,url:s}:{url:n},t)}else t=Object.assign({},e);t.headers=Fy(t.headers),Kp(t),Kp(t.headers);const i=Wp(r||{},t);return r&&r.mediaType.previews.length&&(i.mediaType.previews=r.mediaType.previews.filter(n=>!i.mediaType.previews.includes(n)).concat(i.mediaType.previews)),i.mediaType.previews=i.mediaType.previews.map(n=>n.replace(/-preview/,"")),i}function Oy(r,e){const t=/\?/.test(r)?"&":"?",i=Object.keys(e);return i.length===0?r:r+t+i.map(n=>n==="q"?"q="+e.q.split("+").map(encodeURIComponent).join("+"):`${n}=${encodeURIComponent(e[n])}`).join("&")}const Ly=/\{[^}]+\}/g;function Uy(r){return r.replace(/^\W+|\W+$/g,"").split(/,/)}function By(r){const e=r.match(Ly);return e?e.map(Uy).reduce((t,i)=>t.concat(i),[]):[]}function Qp(r,e){return Object.keys(r).filter(t=>!e.includes(t)).reduce((t,i)=>(t[i]=r[i],t),{})}function Yp(r){return r.split(/(%[0-9A-Fa-f]{2})/g).map(function(e){return/%[0-9A-Fa-f]/.test(e)||(e=encodeURI(e).replace(/%5B/g,"[").replace(/%5D/g,"]")),e}).join("")}function Os(r){return encodeURIComponent(r).replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function Fa(r,e,t){return e=r==="+"||r==="#"?Yp(e):Os(e),t?Os(t)+"="+e:e}function Ls(r){return r!=null}function yc(r){return r===";"||r==="&"||r==="?"}function qy(r,e,t,i){var n=r[t],s=[];if(Ls(n)&&n!=="")if(typeof n=="string"||typeof n=="number"||typeof n=="boolean")n=n.toString(),i&&i!=="*"&&(n=n.substring(0,parseInt(i,10))),s.push(Fa(e,n,yc(e)?t:""));else if(i==="*")Array.isArray(n)?n.filter(Ls).forEach(function(c){s.push(Fa(e,c,yc(e)?t:""))}):Object.keys(n).forEach(function(c){Ls(n[c])&&s.push(Fa(e,n[c],c))});else{const c=[];Array.isArray(n)?n.filter(Ls).forEach(function(v){c.push(Fa(e,v))}):Object.keys(n).forEach(function(v){Ls(n[v])&&(c.push(Os(v)),c.push(Fa(e,n[v].toString())))}),yc(e)?s.push(Os(t)+"="+c.join(",")):c.length!==0&&s.push(c.join(","))}else e===";"?Ls(n)&&s.push(Os(t)):n===""&&(e==="&"||e==="?")?s.push(Os(t)+"="):n===""&&s.push("");return s}function Hy(r){return{expand:Vy.bind(null,r)}}function Vy(r,e){var t=["+","#",".","/",";","?","&"];return r.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g,function(i,n,s){if(n){let v="";const S=[];if(t.indexOf(n.charAt(0))!==-1&&(v=n.charAt(0),n=n.substr(1)),n.split(/,/g).forEach(function(N){var U=/([^:\*]*)(?::(\d+)|(\*))?/.exec(N);S.push(qy(e,v,U[1],U[2]||U[3]))}),v&&v!=="+"){var c=",";return v==="?"?c="&":v!=="#"&&(c=v),(S.length!==0?v:"")+S.join(c)}else return S.join(",")}else return Yp(s)})}function Jp(r){let e=r.method.toUpperCase(),t=(r.url||"/").replace(/:([a-z]\w+)/g,"{$1}"),i=Object.assign({},r.headers),n,s=Qp(r,["method","baseUrl","url","headers","request","mediaType"]);const c=By(t);t=Hy(t).expand(s),/^http/.test(t)||(t=r.baseUrl+t);const v=Object.keys(r).filter(U=>c.includes(U)).concat("baseUrl"),S=Qp(s,v);if(!/application\/octet-stream/i.test(i.accept)&&(r.mediaType.format&&(i.accept=i.accept.split(/,/).map(U=>U.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/,`application/vnd$1$2.${r.mediaType.format}`)).join(",")),r.mediaType.previews.length)){const U=i.accept.match(/[\w-]+(?=-preview)/g)||[];i.accept=U.concat(r.mediaType.previews).map(X=>{const ne=r.mediaType.format?`.${r.mediaType.format}`:"+json";return`application/vnd.github.${X}-preview${ne}`}).join(",")}return["GET","HEAD"].includes(e)?t=Oy(t,S):"data"in S?n=S.data:Object.keys(S).length?n=S:i["content-length"]=0,!i["content-type"]&&typeof n!="undefined"&&(i["content-type"]="application/json; charset=utf-8"),["PATCH","PUT"].includes(e)&&typeof n=="undefined"&&(n=""),Object.assign({method:e,url:t,headers:i},typeof n!="undefined"?{body:n}:null,r.request?{request:r.request}:null)}function $y(r,e,t){return Jp(bc(r,e,t))}function Zp(r,e){const t=bc(r,e),i=$y.bind(null,t);return Object.assign(i,{DEFAULTS:t,defaults:Zp.bind(null,t),merge:bc.bind(null,t),parse:Jp})}const Gy=`octokit-endpoint.js/6.0.11 ${Qo()}`,jy=Zp(null,{method:"GET",baseUrl:"https://api.github.com",headers:{accept:"application/vnd.github.v3+json","user-agent":Gy},mediaType:{format:"",previews:[]}});class zy extends Error{constructor(e){super(e);Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="Deprecation"}}var Wy=St(30778),Ky=St.n(Wy);const Qy=Ky()(r=>console.warn(r));class Oa extends Error{constructor(e,t,i){super(e);Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="HttpError",this.status=t,Object.defineProperty(this,"code",{get(){return Qy(new zy("[@octokit/request-error] `error.code` is deprecated, use `error.status`.")),t}}),this.headers=i.headers||{};const n=Object.assign({},i.request);i.request.headers.authorization&&(n.headers=Object.assign({},i.request.headers,{authorization:i.request.headers.authorization.replace(/ .*$/," [REDACTED]")})),n.url=n.url.replace(/\bclient_secret=\w+/g,"client_secret=[REDACTED]").replace(/\baccess_token=\w+/g,"access_token=[REDACTED]"),this.request=n}}const Yy="5.4.14";function Jy(r){return r.arrayBuffer()}function Xp(r){(zp(r.body)||Array.isArray(r.body))&&(r.body=JSON.stringify(r.body));let e={},t,i;return(r.request&&r.request.fetch||Ko())(r.url,Object.assign({method:r.method,body:r.body,headers:r.headers,redirect:r.redirect},r.request)).then(s=>{i=s.url,t=s.status;for(const v of s.headers)e[v[0]]=v[1];if(t===204||t===205)return;if(r.method==="HEAD"){if(t<400)return;throw new Oa(s.statusText,t,{headers:e,request:r})}if(t===304)throw new Oa("Not modified",t,{headers:e,request:r});if(t>=400)return s.text().then(v=>{const S=new Oa(v,t,{headers:e,request:r});try{let N=JSON.parse(S.message);Object.assign(S,N);let U=N.errors;S.message=S.message+": "+U.map(JSON.stringify).join(", ")}catch(N){}throw S});const c=s.headers.get("content-type");return/application\/json/.test(c)?s.json():!c||/^text\/|charset=utf-8$/.test(c)?s.text():Jy(s)}).then(s=>({status:t,url:i,headers:e,data:s})).catch(s=>{throw s instanceof Oa?s:new Oa(s.message,500,{headers:e,request:r})})}function wc(r,e){const t=r.defaults(e);return Object.assign(function(n,s){const c=t.merge(n,s);if(!c.request||!c.request.hook)return Xp(t.parse(c));const v=(S,N)=>Xp(t.parse(t.merge(S,N)));return Object.assign(v,{endpoint:t,defaults:wc.bind(null,t)}),c.request.hook(v,c)},{endpoint:t,defaults:wc.bind(null,t)})}const Yo=wc(jy,{headers:{"user-agent":`octokit-request.js/${Yy} ${Qo()}`}}),Zy="4.6.1";class Xy extends Error{constructor(e,t){const i=t.data.errors[0].message;super(i);Object.assign(this,t.data),Object.assign(this,{headers:t.headers}),this.name="GraphqlError",this.request=e,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}const ew=["method","baseUrl","url","headers","request","query","mediaType"],tw=["query","method","url"],em=/\/api\/v3\/?$/;function rw(r,e,t){if(t){if(typeof e=="string"&&"query"in t)return Promise.reject(new Error('[@octokit/graphql] "query" cannot be used as variable name'));for(const c in t)if(!!tw.includes(c))return Promise.reject(new Error(`[@octokit/graphql] "${c}" cannot be used as variable name`))}const i=typeof e=="string"?Object.assign({query:e},t):e,n=Object.keys(i).reduce((c,v)=>ew.includes(v)?(c[v]=i[v],c):(c.variables||(c.variables={}),c.variables[v]=i[v],c),{}),s=i.baseUrl||r.endpoint.DEFAULTS.baseUrl;return em.test(s)&&(n.url=s.replace(em,"/api/graphql")),r(n).then(c=>{if(c.data.errors){const v={};for(const S of Object.keys(c.headers))v[S]=c.headers[S];throw new Xy(n,{headers:v,data:c.data})}return c.data.data})}function _c(r,e){const t=r.defaults(e);return Object.assign((n,s)=>rw(t,n,s),{defaults:_c.bind(null,t),endpoint:Yo.endpoint})}const EE=_c(Yo,{headers:{"user-agent":`octokit-graphql.js/${Zy} ${Qo()}`},method:"POST",url:"/graphql"});function iw(r){return _c(r,{method:"POST",url:"/graphql"})}async function nw(r){const e=r.split(/\./).length===3?"app":/^v\d+\./.test(r)?"installation":"oauth";return{type:"token",token:r,tokenType:e}}function sw(r){return r.split(/\./).length===3?`bearer ${r}`:`token ${r}`}async function aw(r,e,t,i){const n=e.endpoint.merge(t,i);return n.headers.authorization=sw(r),e(n)}const ow=function(e){if(!e)throw new Error("[@octokit/auth-token] No token passed to createTokenAuth");if(typeof e!="string")throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string");return e=e.replace(/^(token|bearer) +/i,""),Object.assign(nw.bind(null,e),{hook:aw.bind(null,e)})},tm="3.3.1";class Sc{constructor(e={}){const t=new Dy.Collection,i={baseUrl:Yo.endpoint.DEFAULTS.baseUrl,headers:{},request:Object.assign({},e.request,{hook:t.bind(null,"request")}),mediaType:{previews:[],format:""}};if(i.headers["user-agent"]=[e.userAgent,`octokit-core.js/${tm} ${Qo()}`].filter(Boolean).join(" "),e.baseUrl&&(i.baseUrl=e.baseUrl),e.previews&&(i.mediaType.previews=e.previews),e.timeZone&&(i.headers["time-zone"]=e.timeZone),this.request=Yo.defaults(i),this.graphql=iw(this.request).defaults(i),this.log=Object.assign({debug:()=>{},info:()=>{},warn:console.warn.bind(console),error:console.error.bind(console)},e.log),this.hook=t,e.authStrategy){const{authStrategy:s,...c}=e,v=s(Object.assign({request:this.request,log:this.log,octokit:this,octokitOptions:c},e.auth));t.wrap("request",v.hook),this.auth=v}else if(!e.auth)this.auth=async()=>({type:"unauthenticated"});else{const s=ow(e.auth);t.wrap("request",s.hook),this.auth=s}this.constructor.plugins.forEach(s=>{Object.assign(this,s(this,e))})}static defaults(e){return class extends this{constructor(...i){const n=i[0]||{};if(typeof e=="function"){super(e(n));return}super(Object.assign({},e,n,n.userAgent&&e.userAgent?{userAgent:`${n.userAgent} ${e.userAgent}`}:null))}}}static plugin(...e){var t;const i=this.plugins;return t=class extends this{},t.plugins=i.concat(e.filter(s=>!i.includes(s))),t}}Sc.VERSION=tm,Sc.plugins=[];const lw="1.0.3";function rm(r){r.hook.wrap("request",(e,t)=>{r.log.debug("request",t);const i=Date.now(),n=r.request.endpoint.parse(t),s=n.url.replace(t.baseUrl,"");return e(t).then(c=>(r.log.info(`${n.method} ${s} - ${c.status} in ${Date.now()-i}ms`),c)).catch(c=>{throw r.log.info(`${n.method} ${s} - ${c.status} in ${Date.now()-i}ms`),c})})}rm.VERSION=lw;const uw="2.13.2";function cw(r){if(!("total_count"in r.data&&!("url"in r.data)))return r;const t=r.data.incomplete_results,i=r.data.repository_selection,n=r.data.total_count;delete r.data.incomplete_results,delete r.data.repository_selection,delete r.data.total_count;const s=Object.keys(r.data)[0],c=r.data[s];return r.data=c,typeof t!="undefined"&&(r.data.incomplete_results=t),typeof i!="undefined"&&(r.data.repository_selection=i),r.data.total_count=n,r}function kc(r,e,t){const i=typeof e=="function"?e.endpoint(t):r.request.endpoint(e,t),n=typeof e=="function"?e:r.request,s=i.method,c=i.headers;let v=i.url;return{[Symbol.asyncIterator]:()=>({async next(){if(!v)return{done:!0};const S=await n({method:s,url:v,headers:c}),N=cw(S);return v=((N.headers.link||"").match(/<([^>]+)>;\s*rel="next"/)||[])[1],{value:N}}})}}function im(r,e,t,i){return typeof t=="function"&&(i=t,t=void 0),nm(r,[],kc(r,e,t)[Symbol.asyncIterator](),i)}function nm(r,e,t,i){return t.next().then(n=>{if(n.done)return e;let s=!1;function c(){s=!0}return e=e.concat(i?i(n.value,c):n.value.data),s?e:nm(r,e,t,i)})}const RE=Object.assign(im,{iterator:kc}),dw=null;function xE(r){return typeof r=="string"?dw.includes(r):!1}function sm(r){return{paginate:Object.assign(im.bind(null,r),{iterator:kc.bind(null,r)})}}sm.VERSION=uw;const fw={actions:{addSelectedRepoToOrgSecret:["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"],cancelWorkflowRun:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel"],createOrUpdateOrgSecret:["PUT /orgs/{org}/actions/secrets/{secret_name}"],createOrUpdateRepoSecret:["PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}"],createRegistrationTokenForOrg:["POST /orgs/{org}/actions/runners/registration-token"],createRegistrationTokenForRepo:["POST /repos/{owner}/{repo}/actions/runners/registration-token"],createRemoveTokenForOrg:["POST /orgs/{org}/actions/runners/remove-token"],createRemoveTokenForRepo:["POST /repos/{owner}/{repo}/actions/runners/remove-token"],createWorkflowDispatch:["POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches"],deleteArtifact:["DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"],deleteOrgSecret:["DELETE /orgs/{org}/actions/secrets/{secret_name}"],deleteRepoSecret:["DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}"],deleteSelfHostedRunnerFromOrg:["DELETE /orgs/{org}/actions/runners/{runner_id}"],deleteSelfHostedRunnerFromRepo:["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}"],deleteWorkflowRun:["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}"],deleteWorkflowRunLogs:["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs"],disableSelectedRepositoryGithubActionsOrganization:["DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}"],disableWorkflow:["PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable"],downloadArtifact:["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}"],downloadJobLogsForWorkflowRun:["GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs"],downloadWorkflowRunLogs:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs"],enableSelectedRepositoryGithubActionsOrganization:["PUT /orgs/{org}/actions/permissions/repositories/{repository_id}"],enableWorkflow:["PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable"],getAllowedActionsOrganization:["GET /orgs/{org}/actions/permissions/selected-actions"],getAllowedActionsRepository:["GET /repos/{owner}/{repo}/actions/permissions/selected-actions"],getArtifact:["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"],getGithubActionsPermissionsOrganization:["GET /orgs/{org}/actions/permissions"],getGithubActionsPermissionsRepository:["GET /repos/{owner}/{repo}/actions/permissions"],getJobForWorkflowRun:["GET /repos/{owner}/{repo}/actions/jobs/{job_id}"],getOrgPublicKey:["GET /orgs/{org}/actions/secrets/public-key"],getOrgSecret:["GET /orgs/{org}/actions/secrets/{secret_name}"],getRepoPermissions:["GET /repos/{owner}/{repo}/actions/permissions",{},{renamed:["actions","getGithubActionsPermissionsRepository"]}],getRepoPublicKey:["GET /repos/{owner}/{repo}/actions/secrets/public-key"],getRepoSecret:["GET /repos/{owner}/{repo}/actions/secrets/{secret_name}"],getSelfHostedRunnerForOrg:["GET /orgs/{org}/actions/runners/{runner_id}"],getSelfHostedRunnerForRepo:["GET /repos/{owner}/{repo}/actions/runners/{runner_id}"],getWorkflow:["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}"],getWorkflowRun:["GET /repos/{owner}/{repo}/actions/runs/{run_id}"],getWorkflowRunUsage:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing"],getWorkflowUsage:["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing"],listArtifactsForRepo:["GET /repos/{owner}/{repo}/actions/artifacts"],listJobsForWorkflowRun:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs"],listOrgSecrets:["GET /orgs/{org}/actions/secrets"],listRepoSecrets:["GET /repos/{owner}/{repo}/actions/secrets"],listRepoWorkflows:["GET /repos/{owner}/{repo}/actions/workflows"],listRunnerApplicationsForOrg:["GET /orgs/{org}/actions/runners/downloads"],listRunnerApplicationsForRepo:["GET /repos/{owner}/{repo}/actions/runners/downloads"],listSelectedReposForOrgSecret:["GET /orgs/{org}/actions/secrets/{secret_name}/repositories"],listSelectedRepositoriesEnabledGithubActionsOrganization:["GET /orgs/{org}/actions/permissions/repositories"],listSelfHostedRunnersForOrg:["GET /orgs/{org}/actions/runners"],listSelfHostedRunnersForRepo:["GET /repos/{owner}/{repo}/actions/runners"],listWorkflowRunArtifacts:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts"],listWorkflowRuns:["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs"],listWorkflowRunsForRepo:["GET /repos/{owner}/{repo}/actions/runs"],reRunWorkflow:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun"],removeSelectedRepoFromOrgSecret:["DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"],setAllowedActionsOrganization:["PUT /orgs/{org}/actions/permissions/selected-actions"],setAllowedActionsRepository:["PUT /repos/{owner}/{repo}/actions/permissions/selected-actions"],setGithubActionsPermissionsOrganization:["PUT /orgs/{org}/actions/permissions"],setGithubActionsPermissionsRepository:["PUT /repos/{owner}/{repo}/actions/permissions"],setSelectedReposForOrgSecret:["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories"],setSelectedRepositoriesEnabledGithubActionsOrganization:["PUT /orgs/{org}/actions/permissions/repositories"]},activity:{checkRepoIsStarredByAuthenticatedUser:["GET /user/starred/{owner}/{repo}"],deleteRepoSubscription:["DELETE /repos/{owner}/{repo}/subscription"],deleteThreadSubscription:["DELETE /notifications/threads/{thread_id}/subscription"],getFeeds:["GET /feeds"],getRepoSubscription:["GET /repos/{owner}/{repo}/subscription"],getThread:["GET /notifications/threads/{thread_id}"],getThreadSubscriptionForAuthenticatedUser:["GET /notifications/threads/{thread_id}/subscription"],listEventsForAuthenticatedUser:["GET /users/{username}/events"],listNotificationsForAuthenticatedUser:["GET /notifications"],listOrgEventsForAuthenticatedUser:["GET /users/{username}/events/orgs/{org}"],listPublicEvents:["GET /events"],listPublicEventsForRepoNetwork:["GET /networks/{owner}/{repo}/events"],listPublicEventsForUser:["GET /users/{username}/events/public"],listPublicOrgEvents:["GET /orgs/{org}/events"],listReceivedEventsForUser:["GET /users/{username}/received_events"],listReceivedPublicEventsForUser:["GET /users/{username}/received_events/public"],listRepoEvents:["GET /repos/{owner}/{repo}/events"],listRepoNotificationsForAuthenticatedUser:["GET /repos/{owner}/{repo}/notifications"],listReposStarredByAuthenticatedUser:["GET /user/starred"],listReposStarredByUser:["GET /users/{username}/starred"],listReposWatchedByUser:["GET /users/{username}/subscriptions"],listStargazersForRepo:["GET /repos/{owner}/{repo}/stargazers"],listWatchedReposForAuthenticatedUser:["GET /user/subscriptions"],listWatchersForRepo:["GET /repos/{owner}/{repo}/subscribers"],markNotificationsAsRead:["PUT /notifications"],markRepoNotificationsAsRead:["PUT /repos/{owner}/{repo}/notifications"],markThreadAsRead:["PATCH /notifications/threads/{thread_id}"],setRepoSubscription:["PUT /repos/{owner}/{repo}/subscription"],setThreadSubscription:["PUT /notifications/threads/{thread_id}/subscription"],starRepoForAuthenticatedUser:["PUT /user/starred/{owner}/{repo}"],unstarRepoForAuthenticatedUser:["DELETE /user/starred/{owner}/{repo}"]},apps:{addRepoToInstallation:["PUT /user/installations/{installation_id}/repositories/{repository_id}"],checkToken:["POST /applications/{client_id}/token"],createContentAttachment:["POST /content_references/{content_reference_id}/attachments",{mediaType:{previews:["corsair"]}}],createFromManifest:["POST /app-manifests/{code}/conversions"],createInstallationAccessToken:["POST /app/installations/{installation_id}/access_tokens"],deleteAuthorization:["DELETE /applications/{client_id}/grant"],deleteInstallation:["DELETE /app/installations/{installation_id}"],deleteToken:["DELETE /applications/{client_id}/token"],getAuthenticated:["GET /app"],getBySlug:["GET /apps/{app_slug}"],getInstallation:["GET /app/installations/{installation_id}"],getOrgInstallation:["GET /orgs/{org}/installation"],getRepoInstallation:["GET /repos/{owner}/{repo}/installation"],getSubscriptionPlanForAccount:["GET /marketplace_listing/accounts/{account_id}"],getSubscriptionPlanForAccountStubbed:["GET /marketplace_listing/stubbed/accounts/{account_id}"],getUserInstallation:["GET /users/{username}/installation"],getWebhookConfigForApp:["GET /app/hook/config"],listAccountsForPlan:["GET /marketplace_listing/plans/{plan_id}/accounts"],listAccountsForPlanStubbed:["GET /marketplace_listing/stubbed/plans/{plan_id}/accounts"],listInstallationReposForAuthenticatedUser:["GET /user/installations/{installation_id}/repositories"],listInstallations:["GET /app/installations"],listInstallationsForAuthenticatedUser:["GET /user/installations"],listPlans:["GET /marketplace_listing/plans"],listPlansStubbed:["GET /marketplace_listing/stubbed/plans"],listReposAccessibleToInstallation:["GET /installation/repositories"],listSubscriptionsForAuthenticatedUser:["GET /user/marketplace_purchases"],listSubscriptionsForAuthenticatedUserStubbed:["GET /user/marketplace_purchases/stubbed"],removeRepoFromInstallation:["DELETE /user/installations/{installation_id}/repositories/{repository_id}"],resetToken:["PATCH /applications/{client_id}/token"],revokeInstallationAccessToken:["DELETE /installation/token"],scopeToken:["POST /applications/{client_id}/token/scoped"],suspendInstallation:["PUT /app/installations/{installation_id}/suspended"],unsuspendInstallation:["DELETE /app/installations/{installation_id}/suspended"],updateWebhookConfigForApp:["PATCH /app/hook/config"]},billing:{getGithubActionsBillingOrg:["GET /orgs/{org}/settings/billing/actions"],getGithubActionsBillingUser:["GET /users/{username}/settings/billing/actions"],getGithubPackagesBillingOrg:["GET /orgs/{org}/settings/billing/packages"],getGithubPackagesBillingUser:["GET /users/{username}/settings/billing/packages"],getSharedStorageBillingOrg:["GET /orgs/{org}/settings/billing/shared-storage"],getSharedStorageBillingUser:["GET /users/{username}/settings/billing/shared-storage"]},checks:{create:["POST /repos/{owner}/{repo}/check-runs"],createSuite:["POST /repos/{owner}/{repo}/check-suites"],get:["GET /repos/{owner}/{repo}/check-runs/{check_run_id}"],getSuite:["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}"],listAnnotations:["GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations"],listForRef:["GET /repos/{owner}/{repo}/commits/{ref}/check-runs"],listForSuite:["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs"],listSuitesForRef:["GET /repos/{owner}/{repo}/commits/{ref}/check-suites"],rerequestSuite:["POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest"],setSuitesPreferences:["PATCH /repos/{owner}/{repo}/check-suites/preferences"],update:["PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}"]},codeScanning:{deleteAnalysis:["DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}"],getAlert:["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}",{},{renamedParameters:{alert_id:"alert_number"}}],getAnalysis:["GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}"],getSarif:["GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}"],listAlertsForRepo:["GET /repos/{owner}/{repo}/code-scanning/alerts"],listAlertsInstances:["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances"],listRecentAnalyses:["GET /repos/{owner}/{repo}/code-scanning/analyses"],updateAlert:["PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}"],uploadSarif:["POST /repos/{owner}/{repo}/code-scanning/sarifs"]},codesOfConduct:{getAllCodesOfConduct:["GET /codes_of_conduct",{mediaType:{previews:["scarlet-witch"]}}],getConductCode:["GET /codes_of_conduct/{key}",{mediaType:{previews:["scarlet-witch"]}}],getForRepo:["GET /repos/{owner}/{repo}/community/code_of_conduct",{mediaType:{previews:["scarlet-witch"]}}]},emojis:{get:["GET /emojis"]},enterpriseAdmin:{disableSelectedOrganizationGithubActionsEnterprise:["DELETE /enterprises/{enterprise}/actions/permissions/organizations/{org_id}"],enableSelectedOrganizationGithubActionsEnterprise:["PUT /enterprises/{enterprise}/actions/permissions/organizations/{org_id}"],getAllowedActionsEnterprise:["GET /enterprises/{enterprise}/actions/permissions/selected-actions"],getGithubActionsPermissionsEnterprise:["GET /enterprises/{enterprise}/actions/permissions"],listSelectedOrganizationsEnabledGithubActionsEnterprise:["GET /enterprises/{enterprise}/actions/permissions/organizations"],setAllowedActionsEnterprise:["PUT /enterprises/{enterprise}/actions/permissions/selected-actions"],setGithubActionsPermissionsEnterprise:["PUT /enterprises/{enterprise}/actions/permissions"],setSelectedOrganizationsEnabledGithubActionsEnterprise:["PUT /enterprises/{enterprise}/actions/permissions/organizations"]},gists:{checkIsStarred:["GET /gists/{gist_id}/star"],create:["POST /gists"],createComment:["POST /gists/{gist_id}/comments"],delete:["DELETE /gists/{gist_id}"],deleteComment:["DELETE /gists/{gist_id}/comments/{comment_id}"],fork:["POST /gists/{gist_id}/forks"],get:["GET /gists/{gist_id}"],getComment:["GET /gists/{gist_id}/comments/{comment_id}"],getRevision:["GET /gists/{gist_id}/{sha}"],list:["GET /gists"],listComments:["GET /gists/{gist_id}/comments"],listCommits:["GET /gists/{gist_id}/commits"],listForUser:["GET /users/{username}/gists"],listForks:["GET /gists/{gist_id}/forks"],listPublic:["GET /gists/public"],listStarred:["GET /gists/starred"],star:["PUT /gists/{gist_id}/star"],unstar:["DELETE /gists/{gist_id}/star"],update:["PATCH /gists/{gist_id}"],updateComment:["PATCH /gists/{gist_id}/comments/{comment_id}"]},git:{createBlob:["POST /repos/{owner}/{repo}/git/blobs"],createCommit:["POST /repos/{owner}/{repo}/git/commits"],createRef:["POST /repos/{owner}/{repo}/git/refs"],createTag:["POST /repos/{owner}/{repo}/git/tags"],createTree:["POST /repos/{owner}/{repo}/git/trees"],deleteRef:["DELETE /repos/{owner}/{repo}/git/refs/{ref}"],getBlob:["GET /repos/{owner}/{repo}/git/blobs/{file_sha}"],getCommit:["GET /repos/{owner}/{repo}/git/commits/{commit_sha}"],getRef:["GET /repos/{owner}/{repo}/git/ref/{ref}"],getTag:["GET /repos/{owner}/{repo}/git/tags/{tag_sha}"],getTree:["GET /repos/{owner}/{repo}/git/trees/{tree_sha}"],listMatchingRefs:["GET /repos/{owner}/{repo}/git/matching-refs/{ref}"],updateRef:["PATCH /repos/{owner}/{repo}/git/refs/{ref}"]},gitignore:{getAllTemplates:["GET /gitignore/templates"],getTemplate:["GET /gitignore/templates/{name}"]},interactions:{getRestrictionsForAuthenticatedUser:["GET /user/interaction-limits"],getRestrictionsForOrg:["GET /orgs/{org}/interaction-limits"],getRestrictionsForRepo:["GET /repos/{owner}/{repo}/interaction-limits"],getRestrictionsForYourPublicRepos:["GET /user/interaction-limits",{},{renamed:["interactions","getRestrictionsForAuthenticatedUser"]}],removeRestrictionsForAuthenticatedUser:["DELETE /user/interaction-limits"],removeRestrictionsForOrg:["DELETE /orgs/{org}/interaction-limits"],removeRestrictionsForRepo:["DELETE /repos/{owner}/{repo}/interaction-limits"],removeRestrictionsForYourPublicRepos:["DELETE /user/interaction-limits",{},{renamed:["interactions","removeRestrictionsForAuthenticatedUser"]}],setRestrictionsForAuthenticatedUser:["PUT /user/interaction-limits"],setRestrictionsForOrg:["PUT /orgs/{org}/interaction-limits"],setRestrictionsForRepo:["PUT /repos/{owner}/{repo}/interaction-limits"],setRestrictionsForYourPublicRepos:["PUT /user/interaction-limits",{},{renamed:["interactions","setRestrictionsForAuthenticatedUser"]}]},issues:{addAssignees:["POST /repos/{owner}/{repo}/issues/{issue_number}/assignees"],addLabels:["POST /repos/{owner}/{repo}/issues/{issue_number}/labels"],checkUserCanBeAssigned:["GET /repos/{owner}/{repo}/assignees/{assignee}"],create:["POST /repos/{owner}/{repo}/issues"],createComment:["POST /repos/{owner}/{repo}/issues/{issue_number}/comments"],createLabel:["POST /repos/{owner}/{repo}/labels"],createMilestone:["POST /repos/{owner}/{repo}/milestones"],deleteComment:["DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}"],deleteLabel:["DELETE /repos/{owner}/{repo}/labels/{name}"],deleteMilestone:["DELETE /repos/{owner}/{repo}/milestones/{milestone_number}"],get:["GET /repos/{owner}/{repo}/issues/{issue_number}"],getComment:["GET /repos/{owner}/{repo}/issues/comments/{comment_id}"],getEvent:["GET /repos/{owner}/{repo}/issues/events/{event_id}"],getLabel:["GET /repos/{owner}/{repo}/labels/{name}"],getMilestone:["GET /repos/{owner}/{repo}/milestones/{milestone_number}"],list:["GET /issues"],listAssignees:["GET /repos/{owner}/{repo}/assignees"],listComments:["GET /repos/{owner}/{repo}/issues/{issue_number}/comments"],listCommentsForRepo:["GET /repos/{owner}/{repo}/issues/comments"],listEvents:["GET /repos/{owner}/{repo}/issues/{issue_number}/events"],listEventsForRepo:["GET /repos/{owner}/{repo}/issues/events"],listEventsForTimeline:["GET /repos/{owner}/{repo}/issues/{issue_number}/timeline",{mediaType:{previews:["mockingbird"]}}],listForAuthenticatedUser:["GET /user/issues"],listForOrg:["GET /orgs/{org}/issues"],listForRepo:["GET /repos/{owner}/{repo}/issues"],listLabelsForMilestone:["GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels"],listLabelsForRepo:["GET /repos/{owner}/{repo}/labels"],listLabelsOnIssue:["GET /repos/{owner}/{repo}/issues/{issue_number}/labels"],listMilestones:["GET /repos/{owner}/{repo}/milestones"],lock:["PUT /repos/{owner}/{repo}/issues/{issue_number}/lock"],removeAllLabels:["DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels"],removeAssignees:["DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees"],removeLabel:["DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}"],setLabels:["PUT /repos/{owner}/{repo}/issues/{issue_number}/labels"],unlock:["DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock"],update:["PATCH /repos/{owner}/{repo}/issues/{issue_number}"],updateComment:["PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}"],updateLabel:["PATCH /repos/{owner}/{repo}/labels/{name}"],updateMilestone:["PATCH /repos/{owner}/{repo}/milestones/{milestone_number}"]},licenses:{get:["GET /licenses/{license}"],getAllCommonlyUsed:["GET /licenses"],getForRepo:["GET /repos/{owner}/{repo}/license"]},markdown:{render:["POST /markdown"],renderRaw:["POST /markdown/raw",{headers:{"content-type":"text/plain; charset=utf-8"}}]},meta:{get:["GET /meta"],getOctocat:["GET /octocat"],getZen:["GET /zen"],root:["GET /"]},migrations:{cancelImport:["DELETE /repos/{owner}/{repo}/import"],deleteArchiveForAuthenticatedUser:["DELETE /user/migrations/{migration_id}/archive",{mediaType:{previews:["wyandotte"]}}],deleteArchiveForOrg:["DELETE /orgs/{org}/migrations/{migration_id}/archive",{mediaType:{previews:["wyandotte"]}}],downloadArchiveForOrg:["GET /orgs/{org}/migrations/{migration_id}/archive",{mediaType:{previews:["wyandotte"]}}],getArchiveForAuthenticatedUser:["GET /user/migrations/{migration_id}/archive",{mediaType:{previews:["wyandotte"]}}],getCommitAuthors:["GET /repos/{owner}/{repo}/import/authors"],getImportStatus:["GET /repos/{owner}/{repo}/import"],getLargeFiles:["GET /repos/{owner}/{repo}/import/large_files"],getStatusForAuthenticatedUser:["GET /user/migrations/{migration_id}",{mediaType:{previews:["wyandotte"]}}],getStatusForOrg:["GET /orgs/{org}/migrations/{migration_id}",{mediaType:{previews:["wyandotte"]}}],listForAuthenticatedUser:["GET /user/migrations",{mediaType:{previews:["wyandotte"]}}],listForOrg:["GET /orgs/{org}/migrations",{mediaType:{previews:["wyandotte"]}}],listReposForOrg:["GET /orgs/{org}/migrations/{migration_id}/repositories",{mediaType:{previews:["wyandotte"]}}],listReposForUser:["GET /user/migrations/{migration_id}/repositories",{mediaType:{previews:["wyandotte"]}}],mapCommitAuthor:["PATCH /repos/{owner}/{repo}/import/authors/{author_id}"],setLfsPreference:["PATCH /repos/{owner}/{repo}/import/lfs"],startForAuthenticatedUser:["POST /user/migrations"],startForOrg:["POST /orgs/{org}/migrations"],startImport:["PUT /repos/{owner}/{repo}/import"],unlockRepoForAuthenticatedUser:["DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock",{mediaType:{previews:["wyandotte"]}}],unlockRepoForOrg:["DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock",{mediaType:{previews:["wyandotte"]}}],updateImport:["PATCH /repos/{owner}/{repo}/import"]},orgs:{blockUser:["PUT /orgs/{org}/blocks/{username}"],cancelInvitation:["DELETE /orgs/{org}/invitations/{invitation_id}"],checkBlockedUser:["GET /orgs/{org}/blocks/{username}"],checkMembershipForUser:["GET /orgs/{org}/members/{username}"],checkPublicMembershipForUser:["GET /orgs/{org}/public_members/{username}"],convertMemberToOutsideCollaborator:["PUT /orgs/{org}/outside_collaborators/{username}"],createInvitation:["POST /orgs/{org}/invitations"],createWebhook:["POST /orgs/{org}/hooks"],deleteWebhook:["DELETE /orgs/{org}/hooks/{hook_id}"],get:["GET /orgs/{org}"],getMembershipForAuthenticatedUser:["GET /user/memberships/orgs/{org}"],getMembershipForUser:["GET /orgs/{org}/memberships/{username}"],getWebhook:["GET /orgs/{org}/hooks/{hook_id}"],getWebhookConfigForOrg:["GET /orgs/{org}/hooks/{hook_id}/config"],list:["GET /organizations"],listAppInstallations:["GET /orgs/{org}/installations"],listBlockedUsers:["GET /orgs/{org}/blocks"],listFailedInvitations:["GET /orgs/{org}/failed_invitations"],listForAuthenticatedUser:["GET /user/orgs"],listForUser:["GET /users/{username}/orgs"],listInvitationTeams:["GET /orgs/{org}/invitations/{invitation_id}/teams"],listMembers:["GET /orgs/{org}/members"],listMembershipsForAuthenticatedUser:["GET /user/memberships/orgs"],listOutsideCollaborators:["GET /orgs/{org}/outside_collaborators"],listPendingInvitations:["GET /orgs/{org}/invitations"],listPublicMembers:["GET /orgs/{org}/public_members"],listWebhooks:["GET /orgs/{org}/hooks"],pingWebhook:["POST /orgs/{org}/hooks/{hook_id}/pings"],removeMember:["DELETE /orgs/{org}/members/{username}"],removeMembershipForUser:["DELETE /orgs/{org}/memberships/{username}"],removeOutsideCollaborator:["DELETE /orgs/{org}/outside_collaborators/{username}"],removePublicMembershipForAuthenticatedUser:["DELETE /orgs/{org}/public_members/{username}"],setMembershipForUser:["PUT /orgs/{org}/memberships/{username}"],setPublicMembershipForAuthenticatedUser:["PUT /orgs/{org}/public_members/{username}"],unblockUser:["DELETE /orgs/{org}/blocks/{username}"],update:["PATCH /orgs/{org}"],updateMembershipForAuthenticatedUser:["PATCH /user/memberships/orgs/{org}"],updateWebhook:["PATCH /orgs/{org}/hooks/{hook_id}"],updateWebhookConfigForOrg:["PATCH /orgs/{org}/hooks/{hook_id}/config"]},packages:{deletePackageForAuthenticatedUser:["DELETE /user/packages/{package_type}/{package_name}"],deletePackageForOrg:["DELETE /orgs/{org}/packages/{package_type}/{package_name}"],deletePackageVersionForAuthenticatedUser:["DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}"],deletePackageVersionForOrg:["DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}"],getAllPackageVersionsForAPackageOwnedByAnOrg:["GET /orgs/{org}/packages/{package_type}/{package_name}/versions"],getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser:["GET /user/packages/{package_type}/{package_name}/versions"],getAllPackageVersionsForPackageOwnedByUser:["GET /users/{username}/packages/{package_type}/{package_name}/versions"],getPackageForAuthenticatedUser:["GET /user/packages/{package_type}/{package_name}"],getPackageForOrganization:["GET /orgs/{org}/packages/{package_type}/{package_name}"],getPackageForUser:["GET /users/{username}/packages/{package_type}/{package_name}"],getPackageVersionForAuthenticatedUser:["GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}"],getPackageVersionForOrganization:["GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}"],getPackageVersionForUser:["GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}"],restorePackageForAuthenticatedUser:["POST /user/packages/{package_type}/{package_name}/restore"],restorePackageForOrg:["POST /orgs/{org}/packages/{package_type}/{package_name}/restore"],restorePackageVersionForAuthenticatedUser:["POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"],restorePackageVersionForOrg:["POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore"]},projects:{addCollaborator:["PUT /projects/{project_id}/collaborators/{username}",{mediaType:{previews:["inertia"]}}],createCard:["POST /projects/columns/{column_id}/cards",{mediaType:{previews:["inertia"]}}],createColumn:["POST /projects/{project_id}/columns",{mediaType:{previews:["inertia"]}}],createForAuthenticatedUser:["POST /user/projects",{mediaType:{previews:["inertia"]}}],createForOrg:["POST /orgs/{org}/projects",{mediaType:{previews:["inertia"]}}],createForRepo:["POST /repos/{owner}/{repo}/projects",{mediaType:{previews:["inertia"]}}],delete:["DELETE /projects/{project_id}",{mediaType:{previews:["inertia"]}}],deleteCard:["DELETE /projects/columns/cards/{card_id}",{mediaType:{previews:["inertia"]}}],deleteColumn:["DELETE /projects/columns/{column_id}",{mediaType:{previews:["inertia"]}}],get:["GET /projects/{project_id}",{mediaType:{previews:["inertia"]}}],getCard:["GET /projects/columns/cards/{card_id}",{mediaType:{previews:["inertia"]}}],getColumn:["GET /projects/columns/{column_id}",{mediaType:{previews:["inertia"]}}],getPermissionForUser:["GET /projects/{project_id}/collaborators/{username}/permission",{mediaType:{previews:["inertia"]}}],listCards:["GET /projects/columns/{column_id}/cards",{mediaType:{previews:["inertia"]}}],listCollaborators:["GET /projects/{project_id}/collaborators",{mediaType:{previews:["inertia"]}}],listColumns:["GET /projects/{project_id}/columns",{mediaType:{previews:["inertia"]}}],listForOrg:["GET /orgs/{org}/projects",{mediaType:{previews:["inertia"]}}],listForRepo:["GET /repos/{owner}/{repo}/projects",{mediaType:{previews:["inertia"]}}],listForUser:["GET /users/{username}/projects",{mediaType:{previews:["inertia"]}}],moveCard:["POST /projects/columns/cards/{card_id}/moves",{mediaType:{previews:["inertia"]}}],moveColumn:["POST /projects/columns/{column_id}/moves",{mediaType:{previews:["inertia"]}}],removeCollaborator:["DELETE /projects/{project_id}/collaborators/{username}",{mediaType:{previews:["inertia"]}}],update:["PATCH /projects/{project_id}",{mediaType:{previews:["inertia"]}}],updateCard:["PATCH /projects/columns/cards/{card_id}",{mediaType:{previews:["inertia"]}}],updateColumn:["PATCH /projects/columns/{column_id}",{mediaType:{previews:["inertia"]}}]},pulls:{checkIfMerged:["GET /repos/{owner}/{repo}/pulls/{pull_number}/merge"],create:["POST /repos/{owner}/{repo}/pulls"],createReplyForReviewComment:["POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies"],createReview:["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews"],createReviewComment:["POST /repos/{owner}/{repo}/pulls/{pull_number}/comments"],deletePendingReview:["DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"],deleteReviewComment:["DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}"],dismissReview:["PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals"],get:["GET /repos/{owner}/{repo}/pulls/{pull_number}"],getReview:["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"],getReviewComment:["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}"],list:["GET /repos/{owner}/{repo}/pulls"],listCommentsForReview:["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments"],listCommits:["GET /repos/{owner}/{repo}/pulls/{pull_number}/commits"],listFiles:["GET /repos/{owner}/{repo}/pulls/{pull_number}/files"],listRequestedReviewers:["GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"],listReviewComments:["GET /repos/{owner}/{repo}/pulls/{pull_number}/comments"],listReviewCommentsForRepo:["GET /repos/{owner}/{repo}/pulls/comments"],listReviews:["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews"],merge:["PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge"],removeRequestedReviewers:["DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"],requestReviewers:["POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"],submitReview:["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events"],update:["PATCH /repos/{owner}/{repo}/pulls/{pull_number}"],updateBranch:["PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch",{mediaType:{previews:["lydian"]}}],updateReview:["PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"],updateReviewComment:["PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}"]},rateLimit:{get:["GET /rate_limit"]},reactions:{createForCommitComment:["POST /repos/{owner}/{repo}/comments/{comment_id}/reactions",{mediaType:{previews:["squirrel-girl"]}}],createForIssue:["POST /repos/{owner}/{repo}/issues/{issue_number}/reactions",{mediaType:{previews:["squirrel-girl"]}}],createForIssueComment:["POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions",{mediaType:{previews:["squirrel-girl"]}}],createForPullRequestReviewComment:["POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions",{mediaType:{previews:["squirrel-girl"]}}],createForTeamDiscussionCommentInOrg:["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions",{mediaType:{previews:["squirrel-girl"]}}],createForTeamDiscussionInOrg:["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions",{mediaType:{previews:["squirrel-girl"]}}],deleteForCommitComment:["DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}",{mediaType:{previews:["squirrel-girl"]}}],deleteForIssue:["DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}",{mediaType:{previews:["squirrel-girl"]}}],deleteForIssueComment:["DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}",{mediaType:{previews:["squirrel-girl"]}}],deleteForPullRequestComment:["DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}",{mediaType:{previews:["squirrel-girl"]}}],deleteForTeamDiscussion:["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}",{mediaType:{previews:["squirrel-girl"]}}],deleteForTeamDiscussionComment:["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}",{mediaType:{previews:["squirrel-girl"]}}],deleteLegacy:["DELETE /reactions/{reaction_id}",{mediaType:{previews:["squirrel-girl"]}},{deprecated:"octokit.reactions.deleteLegacy() is deprecated, see https://docs.github.com/v3/reactions/#delete-a-reaction-legacy"}],listForCommitComment:["GET /repos/{owner}/{repo}/comments/{comment_id}/reactions",{mediaType:{previews:["squirrel-girl"]}}],listForIssue:["GET /repos/{owner}/{repo}/issues/{issue_number}/reactions",{mediaType:{previews:["squirrel-girl"]}}],listForIssueComment:["GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions",{mediaType:{previews:["squirrel-girl"]}}],listForPullRequestReviewComment:["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions",{mediaType:{previews:["squirrel-girl"]}}],listForTeamDiscussionCommentInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions",{mediaType:{previews:["squirrel-girl"]}}],listForTeamDiscussionInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions",{mediaType:{previews:["squirrel-girl"]}}]},repos:{acceptInvitation:["PATCH /user/repository_invitations/{invitation_id}"],addAppAccessRestrictions:["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps",{},{mapToData:"apps"}],addCollaborator:["PUT /repos/{owner}/{repo}/collaborators/{username}"],addStatusCheckContexts:["POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts",{},{mapToData:"contexts"}],addTeamAccessRestrictions:["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams",{},{mapToData:"teams"}],addUserAccessRestrictions:["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users",{},{mapToData:"users"}],checkCollaborator:["GET /repos/{owner}/{repo}/collaborators/{username}"],checkVulnerabilityAlerts:["GET /repos/{owner}/{repo}/vulnerability-alerts",{mediaType:{previews:["dorian"]}}],compareCommits:["GET /repos/{owner}/{repo}/compare/{base}...{head}"],createCommitComment:["POST /repos/{owner}/{repo}/commits/{commit_sha}/comments"],createCommitSignatureProtection:["POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures",{mediaType:{previews:["zzzax"]}}],createCommitStatus:["POST /repos/{owner}/{repo}/statuses/{sha}"],createDeployKey:["POST /repos/{owner}/{repo}/keys"],createDeployment:["POST /repos/{owner}/{repo}/deployments"],createDeploymentStatus:["POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"],createDispatchEvent:["POST /repos/{owner}/{repo}/dispatches"],createForAuthenticatedUser:["POST /user/repos"],createFork:["POST /repos/{owner}/{repo}/forks"],createInOrg:["POST /orgs/{org}/repos"],createOrUpdateFileContents:["PUT /repos/{owner}/{repo}/contents/{path}"],createPagesSite:["POST /repos/{owner}/{repo}/pages",{mediaType:{previews:["switcheroo"]}}],createRelease:["POST /repos/{owner}/{repo}/releases"],createUsingTemplate:["POST /repos/{template_owner}/{template_repo}/generate",{mediaType:{previews:["baptiste"]}}],createWebhook:["POST /repos/{owner}/{repo}/hooks"],declineInvitation:["DELETE /user/repository_invitations/{invitation_id}"],delete:["DELETE /repos/{owner}/{repo}"],deleteAccessRestrictions:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions"],deleteAdminBranchProtection:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"],deleteBranchProtection:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection"],deleteCommitComment:["DELETE /repos/{owner}/{repo}/comments/{comment_id}"],deleteCommitSignatureProtection:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures",{mediaType:{previews:["zzzax"]}}],deleteDeployKey:["DELETE /repos/{owner}/{repo}/keys/{key_id}"],deleteDeployment:["DELETE /repos/{owner}/{repo}/deployments/{deployment_id}"],deleteFile:["DELETE /repos/{owner}/{repo}/contents/{path}"],deleteInvitation:["DELETE /repos/{owner}/{repo}/invitations/{invitation_id}"],deletePagesSite:["DELETE /repos/{owner}/{repo}/pages",{mediaType:{previews:["switcheroo"]}}],deletePullRequestReviewProtection:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"],deleteRelease:["DELETE /repos/{owner}/{repo}/releases/{release_id}"],deleteReleaseAsset:["DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}"],deleteWebhook:["DELETE /repos/{owner}/{repo}/hooks/{hook_id}"],disableAutomatedSecurityFixes:["DELETE /repos/{owner}/{repo}/automated-security-fixes",{mediaType:{previews:["london"]}}],disableVulnerabilityAlerts:["DELETE /repos/{owner}/{repo}/vulnerability-alerts",{mediaType:{previews:["dorian"]}}],downloadArchive:["GET /repos/{owner}/{repo}/zipball/{ref}",{},{renamed:["repos","downloadZipballArchive"]}],downloadTarballArchive:["GET /repos/{owner}/{repo}/tarball/{ref}"],downloadZipballArchive:["GET /repos/{owner}/{repo}/zipball/{ref}"],enableAutomatedSecurityFixes:["PUT /repos/{owner}/{repo}/automated-security-fixes",{mediaType:{previews:["london"]}}],enableVulnerabilityAlerts:["PUT /repos/{owner}/{repo}/vulnerability-alerts",{mediaType:{previews:["dorian"]}}],get:["GET /repos/{owner}/{repo}"],getAccessRestrictions:["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions"],getAdminBranchProtection:["GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"],getAllStatusCheckContexts:["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts"],getAllTopics:["GET /repos/{owner}/{repo}/topics",{mediaType:{previews:["mercy"]}}],getAppsWithAccessToProtectedBranch:["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps"],getBranch:["GET /repos/{owner}/{repo}/branches/{branch}"],getBranchProtection:["GET /repos/{owner}/{repo}/branches/{branch}/protection"],getClones:["GET /repos/{owner}/{repo}/traffic/clones"],getCodeFrequencyStats:["GET /repos/{owner}/{repo}/stats/code_frequency"],getCollaboratorPermissionLevel:["GET /repos/{owner}/{repo}/collaborators/{username}/permission"],getCombinedStatusForRef:["GET /repos/{owner}/{repo}/commits/{ref}/status"],getCommit:["GET /repos/{owner}/{repo}/commits/{ref}"],getCommitActivityStats:["GET /repos/{owner}/{repo}/stats/commit_activity"],getCommitComment:["GET /repos/{owner}/{repo}/comments/{comment_id}"],getCommitSignatureProtection:["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures",{mediaType:{previews:["zzzax"]}}],getCommunityProfileMetrics:["GET /repos/{owner}/{repo}/community/profile"],getContent:["GET /repos/{owner}/{repo}/contents/{path}"],getContributorsStats:["GET /repos/{owner}/{repo}/stats/contributors"],getDeployKey:["GET /repos/{owner}/{repo}/keys/{key_id}"],getDeployment:["GET /repos/{owner}/{repo}/deployments/{deployment_id}"],getDeploymentStatus:["GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}"],getLatestPagesBuild:["GET /repos/{owner}/{repo}/pages/builds/latest"],getLatestRelease:["GET /repos/{owner}/{repo}/releases/latest"],getPages:["GET /repos/{owner}/{repo}/pages"],getPagesBuild:["GET /repos/{owner}/{repo}/pages/builds/{build_id}"],getParticipationStats:["GET /repos/{owner}/{repo}/stats/participation"],getPullRequestReviewProtection:["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"],getPunchCardStats:["GET /repos/{owner}/{repo}/stats/punch_card"],getReadme:["GET /repos/{owner}/{repo}/readme"],getRelease:["GET /repos/{owner}/{repo}/releases/{release_id}"],getReleaseAsset:["GET /repos/{owner}/{repo}/releases/assets/{asset_id}"],getReleaseByTag:["GET /repos/{owner}/{repo}/releases/tags/{tag}"],getStatusChecksProtection:["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"],getTeamsWithAccessToProtectedBranch:["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams"],getTopPaths:["GET /repos/{owner}/{repo}/traffic/popular/paths"],getTopReferrers:["GET /repos/{owner}/{repo}/traffic/popular/referrers"],getUsersWithAccessToProtectedBranch:["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users"],getViews:["GET /repos/{owner}/{repo}/traffic/views"],getWebhook:["GET /repos/{owner}/{repo}/hooks/{hook_id}"],getWebhookConfigForRepo:["GET /repos/{owner}/{repo}/hooks/{hook_id}/config"],listBranches:["GET /repos/{owner}/{repo}/branches"],listBranchesForHeadCommit:["GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head",{mediaType:{previews:["groot"]}}],listCollaborators:["GET /repos/{owner}/{repo}/collaborators"],listCommentsForCommit:["GET /repos/{owner}/{repo}/commits/{commit_sha}/comments"],listCommitCommentsForRepo:["GET /repos/{owner}/{repo}/comments"],listCommitStatusesForRef:["GET /repos/{owner}/{repo}/commits/{ref}/statuses"],listCommits:["GET /repos/{owner}/{repo}/commits"],listContributors:["GET /repos/{owner}/{repo}/contributors"],listDeployKeys:["GET /repos/{owner}/{repo}/keys"],listDeploymentStatuses:["GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"],listDeployments:["GET /repos/{owner}/{repo}/deployments"],listForAuthenticatedUser:["GET /user/repos"],listForOrg:["GET /orgs/{org}/repos"],listForUser:["GET /users/{username}/repos"],listForks:["GET /repos/{owner}/{repo}/forks"],listInvitations:["GET /repos/{owner}/{repo}/invitations"],listInvitationsForAuthenticatedUser:["GET /user/repository_invitations"],listLanguages:["GET /repos/{owner}/{repo}/languages"],listPagesBuilds:["GET /repos/{owner}/{repo}/pages/builds"],listPublic:["GET /repositories"],listPullRequestsAssociatedWithCommit:["GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls",{mediaType:{previews:["groot"]}}],listReleaseAssets:["GET /repos/{owner}/{repo}/releases/{release_id}/assets"],listReleases:["GET /repos/{owner}/{repo}/releases"],listTags:["GET /repos/{owner}/{repo}/tags"],listTeams:["GET /repos/{owner}/{repo}/teams"],listWebhooks:["GET /repos/{owner}/{repo}/hooks"],merge:["POST /repos/{owner}/{repo}/merges"],pingWebhook:["POST /repos/{owner}/{repo}/hooks/{hook_id}/pings"],removeAppAccessRestrictions:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps",{},{mapToData:"apps"}],removeCollaborator:["DELETE /repos/{owner}/{repo}/collaborators/{username}"],removeStatusCheckContexts:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts",{},{mapToData:"contexts"}],removeStatusCheckProtection:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"],removeTeamAccessRestrictions:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams",{},{mapToData:"teams"}],removeUserAccessRestrictions:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users",{},{mapToData:"users"}],renameBranch:["POST /repos/{owner}/{repo}/branches/{branch}/rename"],replaceAllTopics:["PUT /repos/{owner}/{repo}/topics",{mediaType:{previews:["mercy"]}}],requestPagesBuild:["POST /repos/{owner}/{repo}/pages/builds"],setAdminBranchProtection:["POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"],setAppAccessRestrictions:["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps",{},{mapToData:"apps"}],setStatusCheckContexts:["PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts",{},{mapToData:"contexts"}],setTeamAccessRestrictions:["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams",{},{mapToData:"teams"}],setUserAccessRestrictions:["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users",{},{mapToData:"users"}],testPushWebhook:["POST /repos/{owner}/{repo}/hooks/{hook_id}/tests"],transfer:["POST /repos/{owner}/{repo}/transfer"],update:["PATCH /repos/{owner}/{repo}"],updateBranchProtection:["PUT /repos/{owner}/{repo}/branches/{branch}/protection"],updateCommitComment:["PATCH /repos/{owner}/{repo}/comments/{comment_id}"],updateInformationAboutPagesSite:["PUT /repos/{owner}/{repo}/pages"],updateInvitation:["PATCH /repos/{owner}/{repo}/invitations/{invitation_id}"],updatePullRequestReviewProtection:["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"],updateRelease:["PATCH /repos/{owner}/{repo}/releases/{release_id}"],updateReleaseAsset:["PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}"],updateStatusCheckPotection:["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks",{},{renamed:["repos","updateStatusCheckProtection"]}],updateStatusCheckProtection:["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"],updateWebhook:["PATCH /repos/{owner}/{repo}/hooks/{hook_id}"],updateWebhookConfigForRepo:["PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config"],uploadReleaseAsset:["POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}",{baseUrl:"https://uploads.github.com"}]},search:{code:["GET /search/code"],commits:["GET /search/commits",{mediaType:{previews:["cloak"]}}],issuesAndPullRequests:["GET /search/issues"],labels:["GET /search/labels"],repos:["GET /search/repositories"],topics:["GET /search/topics",{mediaType:{previews:["mercy"]}}],users:["GET /search/users"]},secretScanning:{getAlert:["GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}"],listAlertsForRepo:["GET /repos/{owner}/{repo}/secret-scanning/alerts"],updateAlert:["PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}"]},teams:{addOrUpdateMembershipForUserInOrg:["PUT /orgs/{org}/teams/{team_slug}/memberships/{username}"],addOrUpdateProjectPermissionsInOrg:["PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}",{mediaType:{previews:["inertia"]}}],addOrUpdateRepoPermissionsInOrg:["PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"],checkPermissionsForProjectInOrg:["GET /orgs/{org}/teams/{team_slug}/projects/{project_id}",{mediaType:{previews:["inertia"]}}],checkPermissionsForRepoInOrg:["GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"],create:["POST /orgs/{org}/teams"],createDiscussionCommentInOrg:["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"],createDiscussionInOrg:["POST /orgs/{org}/teams/{team_slug}/discussions"],deleteDiscussionCommentInOrg:["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"],deleteDiscussionInOrg:["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"],deleteInOrg:["DELETE /orgs/{org}/teams/{team_slug}"],getByName:["GET /orgs/{org}/teams/{team_slug}"],getDiscussionCommentInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"],getDiscussionInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"],getMembershipForUserInOrg:["GET /orgs/{org}/teams/{team_slug}/memberships/{username}"],list:["GET /orgs/{org}/teams"],listChildInOrg:["GET /orgs/{org}/teams/{team_slug}/teams"],listDiscussionCommentsInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"],listDiscussionsInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions"],listForAuthenticatedUser:["GET /user/teams"],listMembersInOrg:["GET /orgs/{org}/teams/{team_slug}/members"],listPendingInvitationsInOrg:["GET /orgs/{org}/teams/{team_slug}/invitations"],listProjectsInOrg:["GET /orgs/{org}/teams/{team_slug}/projects",{mediaType:{previews:["inertia"]}}],listReposInOrg:["GET /orgs/{org}/teams/{team_slug}/repos"],removeMembershipForUserInOrg:["DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}"],removeProjectInOrg:["DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}"],removeRepoInOrg:["DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"],updateDiscussionCommentInOrg:["PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"],updateDiscussionInOrg:["PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"],updateInOrg:["PATCH /orgs/{org}/teams/{team_slug}"]},users:{addEmailForAuthenticated:["POST /user/emails"],block:["PUT /user/blocks/{username}"],checkBlocked:["GET /user/blocks/{username}"],checkFollowingForUser:["GET /users/{username}/following/{target_user}"],checkPersonIsFollowedByAuthenticated:["GET /user/following/{username}"],createGpgKeyForAuthenticated:["POST /user/gpg_keys"],createPublicSshKeyForAuthenticated:["POST /user/keys"],deleteEmailForAuthenticated:["DELETE /user/emails"],deleteGpgKeyForAuthenticated:["DELETE /user/gpg_keys/{gpg_key_id}"],deletePublicSshKeyForAuthenticated:["DELETE /user/keys/{key_id}"],follow:["PUT /user/following/{username}"],getAuthenticated:["GET /user"],getByUsername:["GET /users/{username}"],getContextForUser:["GET /users/{username}/hovercard"],getGpgKeyForAuthenticated:["GET /user/gpg_keys/{gpg_key_id}"],getPublicSshKeyForAuthenticated:["GET /user/keys/{key_id}"],list:["GET /users"],listBlockedByAuthenticated:["GET /user/blocks"],listEmailsForAuthenticated:["GET /user/emails"],listFollowedByAuthenticated:["GET /user/following"],listFollowersForAuthenticatedUser:["GET /user/followers"],listFollowersForUser:["GET /users/{username}/followers"],listFollowingForUser:["GET /users/{username}/following"],listGpgKeysForAuthenticated:["GET /user/gpg_keys"],listGpgKeysForUser:["GET /users/{username}/gpg_keys"],listPublicEmailsForAuthenticated:["GET /user/public_emails"],listPublicKeysForUser:["GET /users/{username}/keys"],listPublicSshKeysForAuthenticated:["GET /user/keys"],setPrimaryEmailVisibilityForAuthenticated:["PATCH /user/email/visibility"],unblock:["DELETE /user/blocks/{username}"],unfollow:["DELETE /user/following/{username}"],updateAuthenticated:["PATCH /user"]}},hw="4.12.0";function pw(r,e){const t={};for(const[i,n]of Object.entries(e))for(const[s,c]of Object.entries(n)){const[v,S,N]=c,[U,X]=v.split(/ /),ne=Object.assign({method:U,url:X},S);t[i]||(t[i]={});const ce=t[i];if(N){ce[s]=mw(r,i,s,ne,N);continue}ce[s]=r.request.defaults(ne)}return t}function mw(r,e,t,i,n){const s=r.request.defaults(i);function c(...v){let S=s.endpoint.merge(...v);if(n.mapToData)return S=Object.assign({},S,{data:S[n.mapToData],[n.mapToData]:void 0}),s(S);if(n.renamed){const[N,U]=n.renamed;r.log.warn(`octokit.${e}.${t}() has been renamed to octokit.${N}.${U}()`)}if(n.deprecated&&r.log.warn(n.deprecated),n.renamedParameters){const N=s.endpoint.merge(...v);for(const[U,X]of Object.entries(n.renamedParameters))U in N&&(r.log.warn(`"${U}" parameter is deprecated for "octokit.${e}.${t}()". Use "${X}" instead`),X in N||(N[X]=N[U]),delete N[U]);return s(N)}return s(...v)}return Object.assign(c,s)}function am(r){return pw(r,fw)}am.VERSION=hw;const gw="18.2.0",vw=Sc.plugin(rm,am,sm).defaults({userAgent:`octokit-rest.js/${gw}`});/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var Ec=function(r,e){return Ec=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var n in i)i.hasOwnProperty(n)&&(t[n]=i[n])},Ec(r,e)};function cn(r,e){Ec(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var je=function(){return je=Object.assign||function(e){for(var t,i=1,n=arguments.length;i<n;i++){t=arguments[i];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},je.apply(this,arguments)};function om(r,e){var t={};for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&e.indexOf(i)<0&&(t[i]=r[i]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,i=Object.getOwnPropertySymbols(r);n<i.length;n++)e.indexOf(i[n])<0&&Object.prototype.propertyIsEnumerable.call(r,i[n])&&(t[i[n]]=r[i[n]]);return t}function TE(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var v=r.length-1;v>=0;v--)(c=r[v])&&(s=(n<3?c(s):n>3?c(e,t,s):c(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s}function CE(r,e){return function(t,i){e(t,i,r)}}function ME(r,e){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,e)}function Pn(r,e,t,i){function n(s){return s instanceof t?s:new t(function(c){c(s)})}return new(t||(t=Promise))(function(s,c){function v(U){try{N(i.next(U))}catch(X){c(X)}}function S(U){try{N(i.throw(U))}catch(X){c(X)}}function N(U){U.done?s(U.value):n(U.value).then(v,S)}N((i=i.apply(r,e||[])).next())})}function An(r,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,n,s,c;return c={next:v(0),throw:v(1),return:v(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function v(N){return function(U){return S([N,U])}}function S(N){if(i)throw new TypeError("Generator is already executing.");for(;t;)try{if(i=1,n&&(s=N[0]&2?n.return:N[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,N[1])).done)return s;switch(n=0,s&&(N=[N[0]&2,s.value]),N[0]){case 0:case 1:s=N;break;case 4:return t.label++,{value:N[1],done:!1};case 5:t.label++,n=N[1],N=[0];continue;case 7:N=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(N[0]===6||N[0]===2)){t=0;continue}if(N[0]===3&&(!s||N[1]>s[0]&&N[1]<s[3])){t.label=N[1];break}if(N[0]===6&&t.label<s[1]){t.label=s[1],s=N;break}if(s&&t.label<s[2]){t.label=s[2],t.ops.push(N);break}s[2]&&t.ops.pop(),t.trys.pop();continue}N=e.call(r,t)}catch(U){N=[6,U],n=0}finally{i=s=0}if(N[0]&5)throw N[1];return{value:N[0]?N[1]:void 0,done:!0}}}function NE(r,e,t,i){i===void 0&&(i=t),r[i]=e[t]}function PE(r,e){for(var t in r)t!=="default"&&!e.hasOwnProperty(t)&&(e[t]=r[t])}function lm(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],i=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&i>=r.length&&(r=void 0),{value:r&&r[i++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function bw(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var i=t.call(r),n,s=[],c;try{for(;(e===void 0||e-- >0)&&!(n=i.next()).done;)s.push(n.value)}catch(v){c={error:v}}finally{try{n&&!n.done&&(t=i.return)&&t.call(i)}finally{if(c)throw c.error}}return s}function AE(){for(var r=[],e=0;e<arguments.length;e++)r=r.concat(bw(arguments[e]));return r}function Rc(){for(var r=0,e=0,t=arguments.length;e<t;e++)r+=arguments[e].length;for(var i=Array(r),n=0,e=0;e<t;e++)for(var s=arguments[e],c=0,v=s.length;c<v;c++,n++)i[n]=s[c];return i}function Jo(r){return this instanceof Jo?(this.v=r,this):new Jo(r)}function IE(r,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=t.apply(r,e||[]),n,s=[];return n={},c("next"),c("throw"),c("return"),n[Symbol.asyncIterator]=function(){return this},n;function c(ne){i[ne]&&(n[ne]=function(ce){return new Promise(function(be,ye){s.push([ne,ce,be,ye])>1||v(ne,ce)})})}function v(ne,ce){try{S(i[ne](ce))}catch(be){X(s[0][3],be)}}function S(ne){ne.value instanceof Jo?Promise.resolve(ne.value.v).then(N,U):X(s[0][2],ne)}function N(ne){v("next",ne)}function U(ne){v("throw",ne)}function X(ne,ce){ne(ce),s.shift(),s.length&&v(s[0][0],s[0][1])}}function DE(r){var e,t;return e={},i("next"),i("throw",function(n){throw n}),i("return"),e[Symbol.iterator]=function(){return this},e;function i(n,s){e[n]=r[n]?function(c){return(t=!t)?{value:Jo(r[n](c)),done:n==="return"}:s?s(c):c}:s}}function FE(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=r[Symbol.asyncIterator],t;return e?e.call(r):(r=typeof lm=="function"?lm(r):r[Symbol.iterator](),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(s){t[s]=r[s]&&function(c){return new Promise(function(v,S){c=r[s](c),n(v,S,c.done,c.value)})}}function n(s,c,v,S){Promise.resolve(S).then(function(N){s({value:N,done:v})},c)}}function OE(r,e){return Object.defineProperty?Object.defineProperty(r,"raw",{value:e}):r.raw=e,r}function LE(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)Object.hasOwnProperty.call(r,t)&&(e[t]=r[t]);return e.default=r,e}function UE(r){return r&&r.__esModule?r:{default:r}}function BE(r,e){if(!e.has(r))throw new TypeError("attempted to get private field on non-instance");return e.get(r)}function qE(r,e,t){if(!e.has(r))throw new TypeError("attempted to set private field on non-instance");return e.set(r,t),t}var dn=St(80285),um=St(34155),xc="Invariant Violation",cm=Object.setPrototypeOf,yw=cm===void 0?function(r,e){return r.__proto__=e,r}:cm,Fr=function(r){cn(e,r);function e(t){t===void 0&&(t=xc);var i=r.call(this,typeof t=="number"?xc+": "+t+" (see https://github.com/apollographql/invariant-packages)":t)||this;return i.framesToPop=1,i.name=xc,yw(i,e.prototype),i}return e}(Error);function Ht(r,e){if(!r)throw new Fr(e)}function dm(r){return function(){return console[r].apply(console,arguments)}}(function(r){r.warn=dm("warn"),r.error=dm("error")})(Ht||(Ht={}));var fm={env:{}};if(typeof um=="object")fm=um;else try{Function("stub","process = stub")(fm)}catch(r){}var HE=null;const VE=null;var ww=St(35035),_w=St.n(ww),hm=Object.prototype,pm=hm.toString,Sw=hm.hasOwnProperty,Tc=new Map;function Fi(r,e){try{return Cc(r,e)}finally{Tc.clear()}}function Cc(r,e){if(r===e)return!0;var t=pm.call(r),i=pm.call(e);if(t!==i)return!1;switch(t){case"[object Array]":if(r.length!==e.length)return!1;case"[object Object]":{if(mm(r,e))return!0;var n=Object.keys(r),s=Object.keys(e),c=n.length;if(c!==s.length)return!1;for(var v=0;v<c;++v)if(!Sw.call(e,n[v]))return!1;for(var v=0;v<c;++v){var S=n[v];if(!Cc(r[S],e[S]))return!1}return!0}case"[object Error]":return r.name===e.name&&r.message===e.message;case"[object Number]":if(r!==r)return e!==e;case"[object Boolean]":case"[object Date]":return+r==+e;case"[object RegExp]":case"[object String]":return r==""+e;case"[object Map]":case"[object Set]":{if(r.size!==e.size)return!1;if(mm(r,e))return!0;for(var N=r.entries(),U=t==="[object Map]";;){var X=N.next();if(X.done)break;var ne=X.value,ce=ne[0],be=ne[1];if(!e.has(ce)||U&&!Cc(be,e.get(ce)))return!1}return!0}}return!1}function mm(r,e){var t=Tc.get(r);if(t){if(t.has(e))return!0}else Tc.set(r,t=new Set);return t.add(e),!1}const $E=null;var kw=St(34155);function GE(r){return["StringValue","BooleanValue","EnumValue"].indexOf(r.kind)>-1}function jE(r){return["IntValue","FloatValue"].indexOf(r.kind)>-1}function Ew(r){return r.kind==="StringValue"}function Rw(r){return r.kind==="BooleanValue"}function xw(r){return r.kind==="IntValue"}function Tw(r){return r.kind==="FloatValue"}function Cw(r){return r.kind==="Variable"}function Mw(r){return r.kind==="ObjectValue"}function Nw(r){return r.kind==="ListValue"}function Pw(r){return r.kind==="EnumValue"}function Aw(r){return r.kind==="NullValue"}function Us(r,e,t,i){if(xw(t)||Tw(t))r[e.value]=Number(t.value);else if(Rw(t)||Ew(t))r[e.value]=t.value;else if(Mw(t)){var n={};t.fields.map(function(c){return Us(n,c.name,c.value,i)}),r[e.value]=n}else if(Cw(t)){var s=(i||{})[t.name.value];r[e.value]=s}else if(Nw(t))r[e.value]=t.values.map(function(c){var v={};return Us(v,e,c,i),v[e.value]});else if(Pw(t))r[e.value]=t.value;else if(Aw(t))r[e.value]=null;else throw new Fr(17)}function Iw(r,e){var t=null;r.directives&&(t={},r.directives.forEach(function(n){t[n.name.value]={},n.arguments&&n.arguments.forEach(function(s){var c=s.name,v=s.value;return Us(t[n.name.value],c,v,e)})}));var i=null;return r.arguments&&r.arguments.length&&(i={},r.arguments.forEach(function(n){var s=n.name,c=n.value;return Us(i,s,c,e)})),gm(r.name.value,i,t)}var Dw=["connection","include","skip","client","rest","export"];function gm(r,e,t){if(t&&t.connection&&t.connection.key)if(t.connection.filter&&t.connection.filter.length>0){var i=t.connection.filter?t.connection.filter:[];i.sort();var n=e,s={};return i.forEach(function(S){s[S]=n[S]}),t.connection.key+"("+JSON.stringify(s)+")"}else return t.connection.key;var c=r;if(e){var v=_w()(e);c+="("+v+")"}return t&&Object.keys(t).forEach(function(S){Dw.indexOf(S)===-1&&(t[S]&&Object.keys(t[S]).length?c+="@"+S+"("+JSON.stringify(t[S])+")":c+="@"+S)}),c}function Mc(r,e){if(r.arguments&&r.arguments.length){var t={};return r.arguments.forEach(function(i){var n=i.name,s=i.value;return Us(t,n,s,e)}),t}return null}function La(r){return r.alias?r.alias.value:r.name.value}function In(r){return r.kind==="Field"}function Zo(r){return r.kind==="InlineFragment"}function Xo(r){return r&&r.type==="id"&&typeof r.generated=="boolean"}function el(r,e){return e===void 0&&(e=!1),je({type:"id",generated:e},typeof r=="string"?{id:r,typename:void 0}:r)}function Fw(r){return r!=null&&typeof r=="object"&&r.type==="json"}function Ow(r){throw new InvariantError(18)}function vm(r,e){switch(e===void 0&&(e=Ow),r.kind){case"Variable":return e(r);case"NullValue":return null;case"IntValue":return parseInt(r.value,10);case"FloatValue":return parseFloat(r.value);case"ListValue":return r.values.map(function(c){return vm(c,e)});case"ObjectValue":{for(var t={},i=0,n=r.fields;i<n.length;i++){var s=n[i];t[s.name.value]=vm(s.value,e)}return t}default:return r.value}}function Lw(r,e){if(r.directives&&r.directives.length){var t={};return r.directives.forEach(function(i){t[i.name.value]=Mc(i,e)}),t}return null}function Nc(r,e){return e===void 0&&(e={}),Hw(r.directives).every(function(t){var i=t.directive,n=t.ifArgument,s=!1;return n.value.kind==="Variable"?(s=e[n.value.name.value],Ht(s!==void 0,13)):s=n.value.value,i.name.value==="skip"?!s:s})}function Uw(r){var e=[];return(0,dn.visit)(r,{Directive:function(t){e.push(t.name.value)}}),e}function tl(r,e){return Uw(e).some(function(t){return r.indexOf(t)>-1})}function Bw(r){return r&&tl(["client"],r)&&tl(["export"],r)}function qw(r){var e=r.name.value;return e==="skip"||e==="include"}function Hw(r){return r?r.filter(qw).map(function(e){var t=e.arguments,i=e.name.value;Ht(t&&t.length===1,14);var n=t[0];Ht(n.name&&n.name.value==="if",15);var s=n.value;return Ht(s&&(s.kind==="Variable"||s.kind==="BooleanValue"),16),{directive:e,ifArgument:n}}):[]}function bm(r,e){var t=e,i=[];r.definitions.forEach(function(s){if(s.kind==="OperationDefinition")throw new Fr(11);s.kind==="FragmentDefinition"&&i.push(s)}),typeof t=="undefined"&&(Ht(i.length===1,12),t=i[0].name.value);var n=je(je({},r),{definitions:Rc([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:t}}]}}],r.definitions)});return n}function Pc(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return e.forEach(function(i){typeof i=="undefined"||i===null||Object.keys(i).forEach(function(n){r[n]=i[n]})}),r}function zE(r){es(r);var e=r.definitions.filter(function(t){return t.kind==="OperationDefinition"&&t.operation==="mutation"})[0];return invariant(e,1),e}function es(r){Ht(r&&r.kind==="Document",2);var e=r.definitions.filter(function(t){return t.kind!=="FragmentDefinition"}).map(function(t){if(t.kind!=="OperationDefinition")throw new Fr(3);return t});return Ht(e.length<=1,4),r}function Bs(r){return es(r),r.definitions.filter(function(e){return e.kind==="OperationDefinition"})[0]}function WE(r){var e=Bs(r);return invariant(e,5),e}function Ac(r){return r.definitions.filter(function(e){return e.kind==="OperationDefinition"&&e.name}).map(function(e){return e.name.value})[0]||null}function rl(r){return r.definitions.filter(function(e){return e.kind==="FragmentDefinition"})}function Vw(r){var e=Bs(r);return Ht(e&&e.operation==="query",6),e}function $w(r){Ht(r.kind==="Document",7),Ht(r.definitions.length<=1,8);var e=r.definitions[0];return Ht(e.kind==="FragmentDefinition",9),e}function Ic(r){es(r);for(var e,t=0,i=r.definitions;t<i.length;t++){var n=i[t];if(n.kind==="OperationDefinition"){var s=n.operation;if(s==="query"||s==="mutation"||s==="subscription")return n}n.kind==="FragmentDefinition"&&!e&&(e=n)}if(e)return e;throw new Fr(10)}function il(r){r===void 0&&(r=[]);var e={};return r.forEach(function(t){e[t.name.value]=t}),e}function Dc(r){if(r&&r.variableDefinitions&&r.variableDefinitions.length){var e=r.variableDefinitions.filter(function(t){var i=t.defaultValue;return i}).map(function(t){var i=t.variable,n=t.defaultValue,s={};return Us(s,i.name,n),s});return Pc.apply(void 0,Rc([{}],e))}return{}}function KE(r){var e=new Set;if(r.variableDefinitions)for(var t=0,i=r.variableDefinitions;t<i.length;t++){var n=i[t];e.add(n.variable.name.value)}return e}function ym(r,e,t){var i=0;return r.forEach(function(n,s){e.call(this,n,s,r)&&(r[i++]=n)},t),r.length=i,r}var Gw={kind:"Field",name:{kind:"Name",value:"__typename"}};function wm(r,e){return r.selectionSet.selections.every(function(t){return t.kind==="FragmentSpread"&&wm(e[t.name.value],e)})}function nl(r){return wm(Bs(r)||$w(r),il(rl(r)))?null:r}function Fc(r){return function(t){return r.some(function(i){return i.name&&i.name===t.name.value||i.test&&i.test(t)})}}function _m(r,e){var t=Object.create(null),i=[],n=Object.create(null),s=[],c=nl((0,dn.visit)(e,{Variable:{enter:function(v,S,N){N.kind!=="VariableDefinition"&&(t[v.name.value]=!0)}},Field:{enter:function(v){if(r&&v.directives){var S=r.some(function(N){return N.remove});if(S&&v.directives&&v.directives.some(Fc(r)))return v.arguments&&v.arguments.forEach(function(N){N.value.kind==="Variable"&&i.push({name:N.value.name.value})}),v.selectionSet&&Em(v.selectionSet).forEach(function(N){s.push({name:N.name.value})}),null}}},FragmentSpread:{enter:function(v){n[v.name.value]=!0}},Directive:{enter:function(v){if(Fc(r)(v))return null}}}));return c&&ym(i,function(v){return!t[v.name]}).length&&(c=Qw(i,c)),c&&ym(s,function(v){return!n[v.name]}).length&&(c=Yw(s,c)),c}function jw(r){return(0,dn.visit)(es(r),{SelectionSet:{enter:function(e,t,i){if(!(i&&i.kind==="OperationDefinition")){var n=e.selections;if(!!n){var s=n.some(function(v){return In(v)&&(v.name.value==="__typename"||v.name.value.lastIndexOf("__",0)===0)});if(!s){var c=i;if(!(In(c)&&c.directives&&c.directives.some(function(v){return v.name.value==="export"})))return je(je({},e),{selections:Rc(n,[Gw])})}}}}}})}var zw={test:function(r){var e=r.name.value==="connection";return e&&(!r.arguments||!r.arguments.some(function(t){return t.name.value==="key"})),e}};function Ww(r){return _m([zw],es(r))}function Sm(r,e,t){return t===void 0&&(t=!0),e&&e.selections&&e.selections.some(function(i){return km(r,i,t)})}function km(r,e,t){return t===void 0&&(t=!0),In(e)?e.directives?e.directives.some(Fc(r))||t&&Sm(r,e.selectionSet,t):!1:!0}function QE(r,e){es(e);var t;return nl(visit(e,{SelectionSet:{enter:function(i,n,s,c){var v=c.join("-");if(!t||v===t||!v.startsWith(t))if(i.selections){var S=i.selections.filter(function(N){return km(r,N)});return Sm(r,i,!1)&&(t=v),__assign(__assign({},i),{selections:S})}else return null}}}))}function Kw(r){return function(t){return r.some(function(i){return t.value&&t.value.kind==="Variable"&&t.value.name&&(i.name===t.value.name.value||i.test&&i.test(t))})}}function Qw(r,e){var t=Kw(r);return nl((0,dn.visit)(e,{OperationDefinition:{enter:function(i){return je(je({},i),{variableDefinitions:i.variableDefinitions.filter(function(n){return!r.some(function(s){return s.name===n.variable.name.value})})})}},Field:{enter:function(i){var n=r.some(function(c){return c.remove});if(n){var s=0;if(i.arguments.forEach(function(c){t(c)&&(s+=1)}),s===1)return null}}},Argument:{enter:function(i){if(t(i))return null}}}))}function Yw(r,e){function t(i){if(r.some(function(n){return n.name===i.name.value}))return null}return nl((0,dn.visit)(e,{FragmentSpread:{enter:t},FragmentDefinition:{enter:t}}))}function Em(r){var e=[];return r.selections.forEach(function(t){(In(t)||Zo(t))&&t.selectionSet?Em(t.selectionSet).forEach(function(i){return e.push(i)}):t.kind==="FragmentSpread"&&e.push(t)}),e}function Jw(r){var e=Ic(r),t=e.operation;if(t==="query")return r;var i=(0,dn.visit)(r,{OperationDefinition:{enter:function(n){return je(je({},n),{operation:"query"})}}});return i}function Zw(r){es(r);var e=_m([{test:function(t){return t.name.value==="client"},remove:!0}],r);return e&&(e=(0,dn.visit)(e,{FragmentDefinition:{enter:function(t){if(t.selectionSet){var i=t.selectionSet.selections.every(function(n){return In(n)&&n.name.value==="__typename"});if(i)return null}}}})),e}var Oc=typeof WeakMap=="function"&&!(typeof navigator=="object"&&navigator.product==="ReactNative"),Xw=Object.prototype.toString;function e1(r){return Lc(r,new Map)}function Lc(r,e){switch(Xw.call(r)){case"[object Array]":{if(e.has(r))return e.get(r);var t=r.slice(0);return e.set(r,t),t.forEach(function(n,s){t[s]=Lc(n,e)}),t}case"[object Object]":{if(e.has(r))return e.get(r);var i=Object.create(Object.getPrototypeOf(r));return e.set(r,i),Object.keys(r).forEach(function(n){i[n]=Lc(r[n],e)}),i}default:return r}}function t1(){return typeof kw!="undefined"?"production":"development"}function Uc(r){return t1()===r}function Rm(){return Uc("production")===!0}function r1(){return Uc("development")===!0}function Bc(){return Uc("test")===!0}function qc(r){try{return r()}catch(e){console.error&&console.error(e)}}function ts(r){return r.errors&&r.errors.length}function xm(r){return Object.freeze(r),Object.getOwnPropertyNames(r).forEach(function(e){r[e]!==null&&(typeof r[e]=="object"||typeof r[e]=="function")&&!Object.isFrozen(r[e])&&xm(r[e])}),r}function YE(r){if(r1()||Bc()){var e=typeof Symbol=="function"&&typeof Symbol("")=="string";if(!e)return xm(r)}return r}var i1=Object.prototype.hasOwnProperty;function Tm(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return Hc(r)}function Hc(r){var e=r[0]||{},t=r.length;if(t>1){var i=[];e=Vc(e,i);for(var n=1;n<t;++n)e=Mm(e,r[n],i)}return e}function Cm(r){return r!==null&&typeof r=="object"}function Mm(r,e,t){return Cm(e)&&Cm(r)?(Object.isExtensible&&!Object.isExtensible(r)&&(r=Vc(r,t)),Object.keys(e).forEach(function(i){var n=e[i];if(i1.call(r,i)){var s=r[i];n!==s&&(r[i]=Mm(Vc(s,t),n,t))}else r[i]=n}),r):e}function Vc(r,e){return r!==null&&typeof r=="object"&&e.indexOf(r)<0&&(Array.isArray(r)?r=r.slice(0):r=je({__proto__:Object.getPrototypeOf(r)},r),e.push(r)),r}var Nm=Object.create({});function JE(r,e){e===void 0&&(e="warn"),!Rm()&&!Nm[r]&&(Bc()||(Nm[r]=!0),e==="error"?console.error(r):console.warn(r))}function ZE(r){return JSON.parse(JSON.stringify(r))}var n1=St(49329),s1=St.n(n1),a1=s1();const Xr=a1;function o1(r){for(var e=["query","operationName","variables","extensions","context"],t=0,i=Object.keys(r);t<i.length;t++){var n=i[t];if(e.indexOf(n)<0)throw new Fr(2)}return r}var XE=function(r){cn(e,r);function e(t,i){var n=r.call(this,t)||this;return n.link=i,n}return e}(Error);function sl(r){return r.request.length<=1}function eR(r){var e=!1;return new Promise(function(t,i){r.subscribe({next:function(n){e||(e=!0,t(n))},error:i})})}var tR=null;function rR(r){return new Observable(function(e){r.then(function(t){e.next(t),e.complete()}).catch(e.error.bind(e))})}function Pm(r){return new Xr(function(e){e.error(r)})}function l1(r){var e={variables:r.variables||{},extensions:r.extensions||{},operationName:r.operationName,query:r.query};return e.operationName||(e.operationName=typeof e.query!="string"?Ac(e.query):""),e}function u1(r,e){var t=je({},r),i=function(s){typeof s=="function"?t=je({},t,s(t)):t=je({},t,s)},n=function(){return je({},t)};return Object.defineProperty(e,"setContext",{enumerable:!1,value:i}),Object.defineProperty(e,"getContext",{enumerable:!1,value:n}),Object.defineProperty(e,"toKey",{enumerable:!1,value:function(){return c1(e)}}),e}function c1(r){var e=r.query,t=r.variables,i=r.operationName;return JSON.stringify([i,e,t])}function Am(r,e){return e?e(r):Xr.of()}function Ua(r){return typeof r=="function"?new Oi(r):r}function Im(){return new Oi(function(){return Xr.of()})}function d1(r){return r.length===0?Im():r.map(Ua).reduce(function(e,t){return e.concat(t)})}function Dm(r,e,t){var i=Ua(e),n=Ua(t||new Oi(Am));return sl(i)&&sl(n)?new Oi(function(s){return r(s)?i.request(s)||Xr.of():n.request(s)||Xr.of()}):new Oi(function(s,c){return r(s)?i.request(s,c)||Xr.of():n.request(s,c)||Xr.of()})}var f1=function(r,e){var t=Ua(r);if(sl(t))return t;var i=Ua(e);return sl(i)?new Oi(function(n){return t.request(n,function(s){return i.request(s)||Xr.of()})||Xr.of()}):new Oi(function(n,s){return t.request(n,function(c){return i.request(c,s)||Xr.of()})||Xr.of()})},Oi=function(){function r(e){e&&(this.request=e)}return r.prototype.split=function(e,t,i){return this.concat(Dm(e,t,i||new r(Am)))},r.prototype.concat=function(e){return f1(this,e)},r.prototype.request=function(e,t){throw new Fr(1)},r.empty=Im,r.from=d1,r.split=Dm,r.execute=al,r}();function al(r,e){return r.request(u1(e.context,l1(o1(e))))||Xr.of()}var h1=St(67121),hr;(function(r){r[r.loading=1]="loading",r[r.setVariables=2]="setVariables",r[r.fetchMore=3]="fetchMore",r[r.refetch=4]="refetch",r[r.poll=6]="poll",r[r.ready=7]="ready",r[r.error=8]="error"})(hr||(hr={}));function Fm(r){return r<7}var Ba=function(r){cn(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype[h1.Z]=function(){return this},e.prototype["@@observable"]=function(){return this},e}(Xr);function qs(r){return Array.isArray(r)&&r.length>0}function p1(r){return r.hasOwnProperty("graphQLErrors")}var m1=function(r){var e="";return qs(r.graphQLErrors)&&r.graphQLErrors.forEach(function(t){var i=t?t.message:"Error message not found.";e+="GraphQL error: "+i+`
`}),r.networkError&&(e+="Network error: "+r.networkError.message+`
`),e=e.replace(/\n$/,""),e},Dn=function(r){cn(e,r);function e(t){var i=t.graphQLErrors,n=t.networkError,s=t.errorMessage,c=t.extraInfo,v=r.call(this,s)||this;return v.graphQLErrors=i||[],v.networkError=n||null,s?v.message=s:v.message=m1(v),v.extraInfo=c,v.__proto__=e.prototype,v}return e}(Error),rs;(function(r){r[r.normal=1]="normal",r[r.refetch=2]="refetch",r[r.poll=3]="poll"})(rs||(rs={}));var g1=function(r,e){return e===void 0&&(e="none"),r&&(r.networkError||e==="none"&&qs(r.graphQLErrors))},v1=function(r){cn(e,r);function e(t){var i=t.queryManager,n=t.options,s=t.shouldSubscribe,c=s===void 0?!0:s,v=r.call(this,function(N){return v.onSubscribe(N)})||this;v.observers=new Set,v.subscriptions=new Set,v.isTornDown=!1,v.options=n,v.variables=n.variables||{},v.queryId=i.generateQueryId(),v.shouldSubscribe=c;var S=Bs(n.query);return v.queryName=S&&S.name&&S.name.value,v.queryManager=i,v}return e.prototype.result=function(){var t=this;return new Promise(function(i,n){var s={next:function(v){i(v),t.observers.delete(s),t.observers.size||t.queryManager.removeQuery(t.queryId),setTimeout(function(){c.unsubscribe()},0)},error:n},c=t.subscribe(s)})},e.prototype.currentResult=function(){var t=this.getCurrentResult();return t.data===void 0&&(t.data={}),t},e.prototype.getCurrentResult=function(){if(this.isTornDown){var t=this.lastResult;return{data:!this.lastError&&t&&t.data||void 0,error:this.lastError,loading:!1,networkStatus:hr.error}}var i=this.queryManager.getCurrentQueryResult(this),n=i.data,s=i.partial,c=this.queryManager.queryStore.get(this.queryId),v,S=this.options.fetchPolicy,N=S==="network-only"||S==="no-cache";if(c){var U=c.networkStatus;if(g1(c,this.options.errorPolicy))return{data:void 0,loading:!1,networkStatus:U,error:new Dn({graphQLErrors:c.graphQLErrors,networkError:c.networkError})};c.variables&&(this.options.variables=je(je({},this.options.variables),c.variables),this.variables=this.options.variables),v={data:n,loading:Fm(U),networkStatus:U},c.graphQLErrors&&this.options.errorPolicy==="all"&&(v.errors=c.graphQLErrors)}else{var X=N||s&&S!=="cache-only";v={data:n,loading:X,networkStatus:X?hr.loading:hr.ready}}return s||this.updateLastResult(je(je({},v),{stale:!1})),je(je({},v),{partial:s})},e.prototype.isDifferentFromLastResult=function(t){var i=this.lastResultSnapshot;return!(i&&t&&i.networkStatus===t.networkStatus&&i.stale===t.stale&&Fi(i.data,t.data))},e.prototype.getLastResult=function(){return this.lastResult},e.prototype.getLastError=function(){return this.lastError},e.prototype.resetLastResults=function(){delete this.lastResult,delete this.lastResultSnapshot,delete this.lastError,this.isTornDown=!1},e.prototype.resetQueryStoreErrors=function(){var t=this.queryManager.queryStore.get(this.queryId);t&&(t.networkError=null,t.graphQLErrors=[])},e.prototype.refetch=function(t){var i=this.options.fetchPolicy;return i==="cache-only"?Promise.reject(new Fr(1)):(i!=="no-cache"&&i!=="cache-and-network"&&(i="network-only"),Fi(this.variables,t)||(this.variables=je(je({},this.variables),t)),Fi(this.options.variables,this.variables)||(this.options.variables=je(je({},this.options.variables),this.variables)),this.queryManager.fetchQuery(this.queryId,je(je({},this.options),{fetchPolicy:i}),rs.refetch))},e.prototype.fetchMore=function(t){var i=this;Ht(t.updateQuery,2);var n=je(je({},t.query?t:je(je(je({},this.options),t),{variables:je(je({},this.variables),t.variables)})),{fetchPolicy:"network-only"}),s=this.queryManager.generateQueryId();return this.queryManager.fetchQuery(s,n,rs.normal,this.queryId).then(function(c){return i.updateQuery(function(v){return t.updateQuery(v,{fetchMoreResult:c.data,variables:n.variables})}),i.queryManager.stopQuery(s),c},function(c){throw i.queryManager.stopQuery(s),c})},e.prototype.subscribeToMore=function(t){var i=this,n=this.queryManager.startGraphQLSubscription({query:t.document,variables:t.variables}).subscribe({next:function(s){var c=t.updateQuery;c&&i.updateQuery(function(v,S){var N=S.variables;return c(v,{subscriptionData:s,variables:N})})},error:function(s){if(t.onError){t.onError(s);return}}});return this.subscriptions.add(n),function(){i.subscriptions.delete(n)&&n.unsubscribe()}},e.prototype.setOptions=function(t){var i=this.options.fetchPolicy;this.options=je(je({},this.options),t),t.pollInterval?this.startPolling(t.pollInterval):t.pollInterval===0&&this.stopPolling();var n=t.fetchPolicy;return this.setVariables(this.options.variables,i!==n&&(i==="cache-only"||i==="standby"||n==="network-only"),t.fetchResults)},e.prototype.setVariables=function(t,i,n){return i===void 0&&(i=!1),n===void 0&&(n=!0),this.isTornDown=!1,t=t||this.variables,!i&&Fi(t,this.variables)?this.observers.size&&n?this.result():Promise.resolve():(this.variables=this.options.variables=t,this.observers.size?this.queryManager.fetchQuery(this.queryId,this.options):Promise.resolve())},e.prototype.updateQuery=function(t){var i=this.queryManager,n=i.getQueryWithPreviousResult(this.queryId),s=n.previousResult,c=n.variables,v=n.document,S=qc(function(){return t(s,{variables:c})});S&&(i.dataStore.markUpdateQueryResult(v,c,S),i.broadcastQueries())},e.prototype.stopPolling=function(){this.queryManager.stopPollingQuery(this.queryId),this.options.pollInterval=void 0},e.prototype.startPolling=function(t){Om(this),this.options.pollInterval=t,this.queryManager.startPollingQuery(this.options,this.queryId)},e.prototype.updateLastResult=function(t){var i=this.lastResult;return this.lastResult=t,this.lastResultSnapshot=this.queryManager.assumeImmutableResults?t:e1(t),i},e.prototype.onSubscribe=function(t){var i=this;try{var n=t._subscription._observer;n&&!n.error&&(n.error=b1)}catch(c){}var s=!this.observers.size;return this.observers.add(t),t.next&&this.lastResult&&t.next(this.lastResult),t.error&&this.lastError&&t.error(this.lastError),s&&this.setUpQuery(),function(){i.observers.delete(t)&&!i.observers.size&&i.tearDownQuery()}},e.prototype.setUpQuery=function(){var t=this,i=this,n=i.queryManager,s=i.queryId;this.shouldSubscribe&&n.addObservableQuery(s,this),this.options.pollInterval&&(Om(this),n.startPollingQuery(this.options,s));var c=function(v){t.updateLastResult(je(je({},t.lastResult),{errors:v.graphQLErrors,networkStatus:hr.error,loading:!1})),$c(t.observers,"error",t.lastError=v)};n.observeQuery(s,this.options,{next:function(v){if(t.lastError||t.isDifferentFromLastResult(v)){var S=t.updateLastResult(v),N=t.options,U=N.query,X=N.variables,ne=N.fetchPolicy;n.transform(U).hasClientExports?n.getLocalState().addExportedVariables(U,X).then(function(ce){var be=t.variables;t.variables=t.options.variables=ce,!v.loading&&S&&ne!=="cache-only"&&n.transform(U).serverQuery&&!Fi(be,ce)?t.refetch():$c(t.observers,"next",v)}):$c(t.observers,"next",v)}},error:c}).catch(c)},e.prototype.tearDownQuery=function(){var t=this.queryManager;this.isTornDown=!0,t.stopPollingQuery(this.queryId),this.subscriptions.forEach(function(i){return i.unsubscribe()}),this.subscriptions.clear(),t.removeObservableQuery(this.queryId),t.stopQuery(this.queryId),this.observers.clear()},e}(Ba);function b1(r){}function $c(r,e,t){var i=[];r.forEach(function(n){return n[e]&&i.push(n)}),i.forEach(function(n){return n[e](t)})}function Om(r){var e=r.options.fetchPolicy;Ht(e!=="cache-first"&&e!=="cache-only",3)}var y1=function(){function r(){this.store={}}return r.prototype.getStore=function(){return this.store},r.prototype.get=function(e){return this.store[e]},r.prototype.initMutation=function(e,t,i){this.store[e]={mutation:t,variables:i||{},loading:!0,error:null}},r.prototype.markMutationError=function(e,t){var i=this.store[e];i&&(i.loading=!1,i.error=t)},r.prototype.markMutationResult=function(e){var t=this.store[e];t&&(t.loading=!1,t.error=null)},r.prototype.reset=function(){this.store={}},r}(),w1=function(){function r(){this.store={}}return r.prototype.getStore=function(){return this.store},r.prototype.get=function(e){return this.store[e]},r.prototype.initQuery=function(e){var t=this.store[e.queryId];Ht(!t||t.document===e.document||Fi(t.document,e.document),19);var i=!1,n=null;e.storePreviousVariables&&t&&t.networkStatus!==hr.loading&&(Fi(t.variables,e.variables)||(i=!0,n=t.variables));var s;i?s=hr.setVariables:e.isPoll?s=hr.poll:e.isRefetch?s=hr.refetch:s=hr.loading;var c=[];t&&t.graphQLErrors&&(c=t.graphQLErrors),this.store[e.queryId]={document:e.document,variables:e.variables,previousVariables:n,networkError:null,graphQLErrors:c,networkStatus:s,metadata:e.metadata},typeof e.fetchMoreForQueryId=="string"&&this.store[e.fetchMoreForQueryId]&&(this.store[e.fetchMoreForQueryId].networkStatus=hr.fetchMore)},r.prototype.markQueryResult=function(e,t,i){!this.store||!this.store[e]||(this.store[e].networkError=null,this.store[e].graphQLErrors=qs(t.errors)?t.errors:[],this.store[e].previousVariables=null,this.store[e].networkStatus=hr.ready,typeof i=="string"&&this.store[i]&&(this.store[i].networkStatus=hr.ready))},r.prototype.markQueryError=function(e,t,i){!this.store||!this.store[e]||(this.store[e].networkError=t,this.store[e].networkStatus=hr.error,typeof i=="string"&&this.markQueryResultClient(i,!0))},r.prototype.markQueryResultClient=function(e,t){var i=this.store&&this.store[e];i&&(i.networkError=null,i.previousVariables=null,t&&(i.networkStatus=hr.ready))},r.prototype.stopQuery=function(e){delete this.store[e]},r.prototype.reset=function(e){var t=this;Object.keys(this.store).forEach(function(i){e.indexOf(i)<0?t.stopQuery(i):t.store[i].networkStatus=hr.loading})},r}();function _1(r){return r.charAt(0).toUpperCase()+r.slice(1)}var Lm=function(){function r(e){var t=e.cache,i=e.client,n=e.resolvers,s=e.fragmentMatcher;this.cache=t,i&&(this.client=i),n&&this.addResolvers(n),s&&this.setFragmentMatcher(s)}return r.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach(function(i){t.resolvers=Tm(t.resolvers,i)}):this.resolvers=Tm(this.resolvers,e)},r.prototype.setResolvers=function(e){this.resolvers={},this.addResolvers(e)},r.prototype.getResolvers=function(){return this.resolvers||{}},r.prototype.runResolvers=function(e){var t=e.document,i=e.remoteResult,n=e.context,s=e.variables,c=e.onlyRunForcedResolvers,v=c===void 0?!1:c;return Pn(this,void 0,void 0,function(){return An(this,function(S){return t?[2,this.resolveDocument(t,i.data,n,s,this.fragmentMatcher,v).then(function(N){return je(je({},i),{data:N.result})})]:[2,i]})})},r.prototype.setFragmentMatcher=function(e){this.fragmentMatcher=e},r.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},r.prototype.clientQuery=function(e){return tl(["client"],e)&&this.resolvers?e:null},r.prototype.serverQuery=function(e){return this.resolvers?Zw(e):e},r.prototype.prepareContext=function(e){e===void 0&&(e={});var t=this.cache,i=je(je({},e),{cache:t,getCacheKey:function(n){if(t.config)return t.config.dataIdFromObject(n);Ht(!1,6)}});return i},r.prototype.addExportedVariables=function(e,t,i){return t===void 0&&(t={}),i===void 0&&(i={}),Pn(this,void 0,void 0,function(){return An(this,function(n){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(i),t).then(function(s){return je(je({},t),s.exportedVariables)})]:[2,je({},t)]})})},r.prototype.shouldForceResolvers=function(e){var t=!1;return(0,dn.visit)(e,{Directive:{enter:function(i){if(i.name.value==="client"&&i.arguments&&(t=i.arguments.some(function(n){return n.name.value==="always"&&n.value.kind==="BooleanValue"&&n.value.value===!0}),t))return dn.BREAK}}}),t},r.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:Jw(e),variables:t,returnPartialData:!0,optimistic:!1}).result},r.prototype.resolveDocument=function(e,t,i,n,s,c){return i===void 0&&(i={}),n===void 0&&(n={}),s===void 0&&(s=function(){return!0}),c===void 0&&(c=!1),Pn(this,void 0,void 0,function(){var v,S,N,U,X,ne,ce,be,ye;return An(this,function(ge){return v=Ic(e),S=rl(e),N=il(S),U=v.operation,X=U?_1(U):"Query",ne=this,ce=ne.cache,be=ne.client,ye={fragmentMap:N,context:je(je({},i),{cache:ce,client:be}),variables:n,fragmentMatcher:s,defaultOperationType:X,exportedVariables:{},onlyRunForcedResolvers:c},[2,this.resolveSelectionSet(v.selectionSet,t,ye).then(function(ve){return{result:ve,exportedVariables:ye.exportedVariables}})]})})},r.prototype.resolveSelectionSet=function(e,t,i){return Pn(this,void 0,void 0,function(){var n,s,c,v,S,N=this;return An(this,function(U){return n=i.fragmentMap,s=i.context,c=i.variables,v=[t],S=function(X){return Pn(N,void 0,void 0,function(){var ne,ce;return An(this,function(be){return Nc(X,c)?In(X)?[2,this.resolveField(X,t,i).then(function(ye){var ge;typeof ye!="undefined"&&v.push((ge={},ge[La(X)]=ye,ge))})]:(Zo(X)?ne=X:(ne=n[X.name.value],Ht(ne,7)),ne&&ne.typeCondition&&(ce=ne.typeCondition.name.value,i.fragmentMatcher(t,ce,s))?[2,this.resolveSelectionSet(ne.selectionSet,t,i).then(function(ye){v.push(ye)})]:[2]):[2]})})},[2,Promise.all(e.selections.map(S)).then(function(){return Hc(v)})]})})},r.prototype.resolveField=function(e,t,i){return Pn(this,void 0,void 0,function(){var n,s,c,v,S,N,U,X,ne,ce=this;return An(this,function(be){return n=i.variables,s=e.name.value,c=La(e),v=s!==c,S=t[c]||t[s],N=Promise.resolve(S),(!i.onlyRunForcedResolvers||this.shouldForceResolvers(e))&&(U=t.__typename||i.defaultOperationType,X=this.resolvers&&this.resolvers[U],X&&(ne=X[v?s:c],ne&&(N=Promise.resolve(ne(t,Mc(e,n),i.context,{field:e,fragmentMap:i.fragmentMap}))))),[2,N.then(function(ye){if(ye===void 0&&(ye=S),e.directives&&e.directives.forEach(function(ge){ge.name.value==="export"&&ge.arguments&&ge.arguments.forEach(function(ve){ve.name.value==="as"&&ve.value.kind==="StringValue"&&(i.exportedVariables[ve.value.value]=ye)})}),!e.selectionSet||ye==null)return ye;if(Array.isArray(ye))return ce.resolveSubSelectedArray(e,ye,i);if(e.selectionSet)return ce.resolveSelectionSet(e.selectionSet,ye,i)})]})})},r.prototype.resolveSubSelectedArray=function(e,t,i){var n=this;return Promise.all(t.map(function(s){if(s===null)return null;if(Array.isArray(s))return n.resolveSubSelectedArray(e,s,i);if(e.selectionSet)return n.resolveSelectionSet(e.selectionSet,s,i)}))},r}();function Um(r){var e=new Set,t=null;return new Ba(function(i){return e.add(i),t=t||r.subscribe({next:function(n){e.forEach(function(s){return s.next&&s.next(n)})},error:function(n){e.forEach(function(s){return s.error&&s.error(n)})},complete:function(){e.forEach(function(n){return n.complete&&n.complete()})}}),function(){e.delete(i)&&!e.size&&t&&(t.unsubscribe(),t=null)}})}function S1(r,e){return new Ba(function(t){var i=t.next,n=t.error,s=t.complete,c=0,v=!1,S={next:function(U){++c,new Promise(function(X){X(e(U))}).then(function(X){--c,i&&i.call(t,X),v&&S.complete()},function(X){--c,n&&n.call(t,X)})},error:function(U){n&&n.call(t,U)},complete:function(){v=!0,c||s&&s.call(t)}},N=r.subscribe(S);return function(){return N.unsubscribe()}})}var k1=Object.prototype.hasOwnProperty,E1=function(){function r(e){var t=e.link,i=e.queryDeduplication,n=i===void 0?!1:i,s=e.store,c=e.onBroadcast,v=c===void 0?function(){}:c,S=e.ssrMode,N=S===void 0?!1:S,U=e.clientAwareness,X=U===void 0?{}:U,ne=e.localState,ce=e.assumeImmutableResults;this.mutationStore=new y1,this.queryStore=new w1,this.clientAwareness={},this.idCounter=1,this.queries=new Map,this.fetchQueryRejectFns=new Map,this.transformCache=new(Oc?WeakMap:Map),this.inFlightLinkObservables=new Map,this.pollingInfoByQueryId=new Map,this.link=t,this.queryDeduplication=n,this.dataStore=s,this.onBroadcast=v,this.clientAwareness=X,this.localState=ne||new Lm({cache:s.getCache()}),this.ssrMode=N,this.assumeImmutableResults=!!ce}return r.prototype.stop=function(){var e=this;this.queries.forEach(function(t,i){e.stopQueryNoBroadcast(i)}),this.fetchQueryRejectFns.forEach(function(t){t(new Fr(8))})},r.prototype.mutate=function(e){var t=e.mutation,i=e.variables,n=e.optimisticResponse,s=e.updateQueries,c=e.refetchQueries,v=c===void 0?[]:c,S=e.awaitRefetchQueries,N=S===void 0?!1:S,U=e.update,X=e.errorPolicy,ne=X===void 0?"none":X,ce=e.fetchPolicy,be=e.context,ye=be===void 0?{}:be;return Pn(this,void 0,void 0,function(){var ge,ve,ke,Ce=this;return An(this,function(Pe){switch(Pe.label){case 0:return Ht(t,9),Ht(!ce||ce==="no-cache",10),ge=this.generateQueryId(),t=this.transform(t).document,this.setQuery(ge,function(){return{document:t}}),i=this.getVariables(t,i),this.transform(t).hasClientExports?[4,this.localState.addExportedVariables(t,i,ye)]:[3,2];case 1:i=Pe.sent(),Pe.label=2;case 2:return ve=function(){var Oe={};return s&&Ce.queries.forEach(function(Ze,wt){var ct=Ze.observableQuery;if(ct){var _t=ct.queryName;_t&&k1.call(s,_t)&&(Oe[wt]={updater:s[_t],query:Ce.queryStore.get(wt)})}}),Oe},this.mutationStore.initMutation(ge,t,i),this.dataStore.markMutationInit({mutationId:ge,document:t,variables:i,updateQueries:ve(),update:U,optimisticResponse:n}),this.broadcastQueries(),ke=this,[2,new Promise(function(Oe,Ze){var wt,ct;ke.getObservableFromLink(t,je(je({},ye),{optimisticResponse:n}),i,!1).subscribe({next:function(_t){if(ts(_t)&&ne==="none"){ct=new Dn({graphQLErrors:_t.errors});return}ke.mutationStore.markMutationResult(ge),ce!=="no-cache"&&ke.dataStore.markMutationResult({mutationId:ge,result:_t,document:t,variables:i,updateQueries:ve(),update:U}),wt=_t},error:function(_t){ke.mutationStore.markMutationError(ge,_t),ke.dataStore.markMutationComplete({mutationId:ge,optimisticResponse:n}),ke.broadcastQueries(),ke.setQuery(ge,function(){return{document:null}}),Ze(new Dn({networkError:_t}))},complete:function(){if(ct&&ke.mutationStore.markMutationError(ge,ct),ke.dataStore.markMutationComplete({mutationId:ge,optimisticResponse:n}),ke.broadcastQueries(),ct){Ze(ct);return}typeof v=="function"&&(v=v(wt));var _t=[];qs(v)&&v.forEach(function(nr){if(typeof nr=="string")ke.queries.forEach(function(ur){var Qt=ur.observableQuery;Qt&&Qt.queryName===nr&&_t.push(Qt.refetch())});else{var Ur={query:nr.query,variables:nr.variables,fetchPolicy:"network-only"};nr.context&&(Ur.context=nr.context),_t.push(ke.query(Ur))}}),Promise.all(N?_t:[]).then(function(){ke.setQuery(ge,function(){return{document:null}}),ne==="ignore"&&wt&&ts(wt)&&delete wt.errors,Oe(wt)})}})})]}})})},r.prototype.fetchQuery=function(e,t,i,n){return Pn(this,void 0,void 0,function(){var s,c,v,S,N,U,X,ne,ce,be,ye,ge,ve,ke,Ce,Pe,Oe,Ze,wt=this;return An(this,function(ct){switch(ct.label){case 0:return s=t.metadata,c=s===void 0?null:s,v=t.fetchPolicy,S=v===void 0?"cache-first":v,N=t.context,U=N===void 0?{}:N,X=this.transform(t.query).document,ne=this.getVariables(X,t.variables),this.transform(X).hasClientExports?[4,this.localState.addExportedVariables(X,ne,U)]:[3,2];case 1:ne=ct.sent(),ct.label=2;case 2:if(t=je(je({},t),{variables:ne}),be=S==="network-only"||S==="no-cache",ye=be,be||(ge=this.dataStore.getCache().diff({query:X,variables:ne,returnPartialData:!0,optimistic:!1}),ve=ge.complete,ke=ge.result,ye=!ve||S==="cache-and-network",ce=ke),Ce=ye&&S!=="cache-only"&&S!=="standby",tl(["live"],X)&&(Ce=!0),Pe=this.idCounter++,Oe=S!=="no-cache"?this.updateQueryWatch(e,X,t):void 0,this.setQuery(e,function(){return{document:X,lastRequestId:Pe,invalidated:!0,cancel:Oe}}),this.invalidate(n),this.queryStore.initQuery({queryId:e,document:X,storePreviousVariables:Ce,variables:ne,isPoll:i===rs.poll,isRefetch:i===rs.refetch,metadata:c,fetchMoreForQueryId:n}),this.broadcastQueries(),Ce){if(Ze=this.fetchRequest({requestId:Pe,queryId:e,document:X,options:t,fetchMoreForQueryId:n}).catch(function(_t){throw p1(_t)?_t:(Pe>=wt.getQuery(e).lastRequestId&&(wt.queryStore.markQueryError(e,_t,n),wt.invalidate(e),wt.invalidate(n),wt.broadcastQueries()),new Dn({networkError:_t}))}),S!=="cache-and-network")return[2,Ze];Ze.catch(function(){})}return this.queryStore.markQueryResultClient(e,!Ce),this.invalidate(e),this.invalidate(n),this.transform(X).hasForcedResolvers?[2,this.localState.runResolvers({document:X,remoteResult:{data:ce},context:U,variables:ne,onlyRunForcedResolvers:!0}).then(function(_t){return wt.markQueryResult(e,_t,t,n),wt.broadcastQueries(),_t})]:(this.broadcastQueries(),[2,{data:ce}])}})})},r.prototype.markQueryResult=function(e,t,i,n){var s=i.fetchPolicy,c=i.variables,v=i.errorPolicy;s==="no-cache"?this.setQuery(e,function(){return{newData:{result:t.data,complete:!0}}}):this.dataStore.markQueryResult(t,this.getQuery(e).document,c,n,v==="ignore"||v==="all")},r.prototype.queryListenerForObserver=function(e,t,i){var n=this;function s(c,v){if(i[c])try{i[c](v)}catch(S){}}return function(c,v){if(n.invalidate(e,!1),!!c){var S=n.getQuery(e),N=S.observableQuery,U=S.document,X=N?N.options.fetchPolicy:t.fetchPolicy;if(X!=="standby"){var ne=Fm(c.networkStatus),ce=N&&N.getLastResult(),be=!!(ce&&ce.networkStatus!==c.networkStatus),ye=t.returnPartialData||!v&&c.previousVariables||be&&t.notifyOnNetworkStatusChange||X==="cache-only"||X==="cache-and-network";if(!(ne&&!ye)){var ge=qs(c.graphQLErrors),ve=N&&N.options.errorPolicy||t.errorPolicy||"none";if(ve==="none"&&ge||c.networkError)return s("error",new Dn({graphQLErrors:c.graphQLErrors,networkError:c.networkError}));try{var ke=void 0,Ce=void 0;if(v)X!=="no-cache"&&X!=="network-only"&&n.setQuery(e,function(){return{newData:null}}),ke=v.result,Ce=!v.complete;else{var Pe=N&&N.getLastError(),Oe=ve!=="none"&&(Pe&&Pe.graphQLErrors)!==c.graphQLErrors;if(ce&&ce.data&&!Oe)ke=ce.data,Ce=!1;else{var Ze=n.dataStore.getCache().diff({query:U,variables:c.previousVariables||c.variables,returnPartialData:!0,optimistic:!0});ke=Ze.result,Ce=!Ze.complete}}var wt=Ce&&!(t.returnPartialData||X==="cache-only"),ct={data:wt?ce&&ce.data:ke,loading:ne,networkStatus:c.networkStatus,stale:wt};ve==="all"&&ge&&(ct.errors=c.graphQLErrors),s("next",ct)}catch(_t){s("error",new Dn({networkError:_t}))}}}}}},r.prototype.transform=function(e){var t=this.transformCache;if(!t.has(e)){var i=this.dataStore.getCache(),n=i.transformDocument(e),s=Ww(i.transformForLink(n)),c=this.localState.clientQuery(n),v=this.localState.serverQuery(s),S={document:n,hasClientExports:Bw(n),hasForcedResolvers:this.localState.shouldForceResolvers(n),clientQuery:c,serverQuery:v,defaultVars:Dc(Bs(n))},N=function(U){U&&!t.has(U)&&t.set(U,S)};N(e),N(n),N(c),N(v)}return t.get(e)},r.prototype.getVariables=function(e,t){return je(je({},this.transform(e).defaultVars),t)},r.prototype.watchQuery=function(e,t){t===void 0&&(t=!0),Ht(e.fetchPolicy!=="standby",11),e.variables=this.getVariables(e.query,e.variables),typeof e.notifyOnNetworkStatusChange=="undefined"&&(e.notifyOnNetworkStatusChange=!1);var i=je({},e);return new v1({queryManager:this,options:i,shouldSubscribe:t})},r.prototype.query=function(e){var t=this;return Ht(e.query,12),Ht(e.query.kind==="Document",13),Ht(!e.returnPartialData,14),Ht(!e.pollInterval,15),new Promise(function(i,n){var s=t.watchQuery(e,!1);t.fetchQueryRejectFns.set("query:"+s.queryId,n),s.result().then(i,n).then(function(){return t.fetchQueryRejectFns.delete("query:"+s.queryId)})})},r.prototype.generateQueryId=function(){return String(this.idCounter++)},r.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},r.prototype.stopQueryInStoreNoBroadcast=function(e){this.stopPollingQuery(e),this.queryStore.stopQuery(e),this.invalidate(e)},r.prototype.addQueryListener=function(e,t){this.setQuery(e,function(i){var n=i.listeners;return n.add(t),{invalidated:!1}})},r.prototype.updateQueryWatch=function(e,t,i){var n=this,s=this.getQuery(e).cancel;s&&s();var c=function(){var v=null,S=n.getQuery(e).observableQuery;if(S){var N=S.getLastResult();N&&(v=N.data)}return v};return this.dataStore.getCache().watch({query:t,variables:i.variables,optimistic:!0,previousResult:c,callback:function(v){n.setQuery(e,function(){return{invalidated:!0,newData:v}})}})},r.prototype.addObservableQuery=function(e,t){this.setQuery(e,function(){return{observableQuery:t}})},r.prototype.removeObservableQuery=function(e){var t=this.getQuery(e).cancel;this.setQuery(e,function(){return{observableQuery:null}}),t&&t()},r.prototype.clearStore=function(){this.fetchQueryRejectFns.forEach(function(t){t(new Fr(16))});var e=[];return this.queries.forEach(function(t,i){var n=t.observableQuery;n&&e.push(i)}),this.queryStore.reset(e),this.mutationStore.reset(),this.dataStore.reset()},r.prototype.resetStore=function(){var e=this;return this.clearStore().then(function(){return e.reFetchObservableQueries()})},r.prototype.reFetchObservableQueries=function(e){var t=this;e===void 0&&(e=!1);var i=[];return this.queries.forEach(function(n,s){var c=n.observableQuery;if(c){var v=c.options.fetchPolicy;c.resetLastResults(),v!=="cache-only"&&(e||v!=="standby")&&i.push(c.refetch()),t.setQuery(s,function(){return{newData:null}}),t.invalidate(s)}}),this.broadcastQueries(),Promise.all(i)},r.prototype.observeQuery=function(e,t,i){return this.addQueryListener(e,this.queryListenerForObserver(e,t,i)),this.fetchQuery(e,t)},r.prototype.startQuery=function(e,t,i){return this.addQueryListener(e,i),this.fetchQuery(e,t).catch(function(){}),e},r.prototype.startGraphQLSubscription=function(e){var t=this,i=e.query,n=e.fetchPolicy,s=e.variables;i=this.transform(i).document,s=this.getVariables(i,s);var c=function(S){return t.getObservableFromLink(i,{},S,!1).map(function(N){if((!n||n!=="no-cache")&&(t.dataStore.markSubscriptionResult(N,i,S),t.broadcastQueries()),ts(N))throw new Dn({graphQLErrors:N.errors});return N})};if(this.transform(i).hasClientExports){var v=this.localState.addExportedVariables(i,s).then(c);return new Ba(function(S){var N=null;return v.then(function(U){return N=U.subscribe(S)},S.error),function(){return N&&N.unsubscribe()}})}return c(s)},r.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},r.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},r.prototype.removeQuery=function(e){this.fetchQueryRejectFns.delete("query:"+e),this.fetchQueryRejectFns.delete("fetchRequest:"+e),this.getQuery(e).subscriptions.forEach(function(t){return t.unsubscribe()}),this.queries.delete(e)},r.prototype.getCurrentQueryResult=function(e,t){t===void 0&&(t=!0);var i=e.options,n=i.variables,s=i.query,c=i.fetchPolicy,v=i.returnPartialData,S=e.getLastResult(),N=this.getQuery(e.queryId).newData;if(N&&N.complete)return{data:N.result,partial:!1};if(c==="no-cache"||c==="network-only")return{data:void 0,partial:!1};var U=this.dataStore.getCache().diff({query:s,variables:n,previousResult:S?S.data:void 0,returnPartialData:!0,optimistic:t}),X=U.result,ne=U.complete;return{data:ne||v?X:void 0,partial:!ne}},r.prototype.getQueryWithPreviousResult=function(e){var t;if(typeof e=="string"){var i=this.getQuery(e).observableQuery;Ht(i,17),t=i}else t=e;var n=t.options,s=n.variables,c=n.query;return{previousResult:this.getCurrentQueryResult(t,!1).data,variables:s,document:c}},r.prototype.broadcastQueries=function(){var e=this;this.onBroadcast(),this.queries.forEach(function(t,i){t.invalidated&&t.listeners.forEach(function(n){n&&n(e.queryStore.get(i),t.newData)})})},r.prototype.getLocalState=function(){return this.localState},r.prototype.getObservableFromLink=function(e,t,i,n){var s=this;n===void 0&&(n=this.queryDeduplication);var c,v=this.transform(e).serverQuery;if(v){var S=this,N=S.inFlightLinkObservables,U=S.link,X={query:v,variables:i,operationName:Ac(v)||void 0,context:this.prepareContext(je(je({},t),{forceFetch:!n}))};if(t=X.context,n){var ne=N.get(v)||new Map;N.set(v,ne);var ce=JSON.stringify(i);if(c=ne.get(ce),!c){ne.set(ce,c=Um(al(U,X)));var be=function(){ne.delete(ce),ne.size||N.delete(v),ye.unsubscribe()},ye=c.subscribe({next:be,error:be,complete:be})}}else c=Um(al(U,X))}else c=Ba.of({data:{}}),t=this.prepareContext(t);var ge=this.transform(e).clientQuery;return ge&&(c=S1(c,function(ve){return s.localState.runResolvers({document:ge,remoteResult:ve,context:t,variables:i})})),c},r.prototype.fetchRequest=function(e){var t=this,i=e.requestId,n=e.queryId,s=e.document,c=e.options,v=e.fetchMoreForQueryId,S=c.variables,N=c.errorPolicy,U=N===void 0?"none":N,X=c.fetchPolicy,ne,ce;return new Promise(function(be,ye){var ge=t.getObservableFromLink(s,c.context,S),ve="fetchRequest:"+n;t.fetchQueryRejectFns.set(ve,ye);var ke=function(){t.fetchQueryRejectFns.delete(ve),t.setQuery(n,function(Pe){var Oe=Pe.subscriptions;Oe.delete(Ce)})},Ce=ge.map(function(Pe){if(i>=t.getQuery(n).lastRequestId&&(t.markQueryResult(n,Pe,c,v),t.queryStore.markQueryResult(n,Pe,v),t.invalidate(n),t.invalidate(v),t.broadcastQueries()),U==="none"&&qs(Pe.errors))return ye(new Dn({graphQLErrors:Pe.errors}));if(U==="all"&&(ce=Pe.errors),v||X==="no-cache")ne=Pe.data;else{var Oe=t.dataStore.getCache().diff({variables:S,query:s,optimistic:!1,returnPartialData:!0}),Ze=Oe.result,wt=Oe.complete;(wt||c.returnPartialData)&&(ne=Ze)}}).subscribe({error:function(Pe){ke(),ye(Pe)},complete:function(){ke(),be({data:ne,errors:ce,loading:!1,networkStatus:hr.ready,stale:!1})}});t.setQuery(n,function(Pe){var Oe=Pe.subscriptions;Oe.add(Ce)})})},r.prototype.getQuery=function(e){return this.queries.get(e)||{listeners:new Set,invalidated:!1,document:null,newData:null,lastRequestId:1,observableQuery:null,subscriptions:new Set}},r.prototype.setQuery=function(e,t){var i=this.getQuery(e),n=je(je({},i),t(i));this.queries.set(e,n)},r.prototype.invalidate=function(e,t){t===void 0&&(t=!0),e&&this.setQuery(e,function(){return{invalidated:t}})},r.prototype.prepareContext=function(e){e===void 0&&(e={});var t=this.localState.prepareContext(e);return je(je({},t),{clientAwareness:this.clientAwareness})},r.prototype.checkInFlight=function(e){var t=this.queryStore.get(e);return t&&t.networkStatus!==hr.ready&&t.networkStatus!==hr.error},r.prototype.startPollingQuery=function(e,t,i){var n=this,s=e.pollInterval;if(Ht(s,18),!this.ssrMode){var c=this.pollingInfoByQueryId.get(t);c||this.pollingInfoByQueryId.set(t,c={}),c.interval=s,c.options=je(je({},e),{fetchPolicy:"network-only"});var v=function(){var N=n.pollingInfoByQueryId.get(t);N&&(n.checkInFlight(t)?S():n.fetchQuery(t,N.options,rs.poll).then(S,S))},S=function(){var N=n.pollingInfoByQueryId.get(t);N&&(clearTimeout(N.timeout),N.timeout=setTimeout(v,N.interval))};i&&this.addQueryListener(t,i),S()}return t},r.prototype.stopPollingQuery=function(e){this.pollingInfoByQueryId.delete(e)},r}(),R1=function(){function r(e){this.cache=e}return r.prototype.getCache=function(){return this.cache},r.prototype.markQueryResult=function(e,t,i,n,s){s===void 0&&(s=!1);var c=!ts(e);s&&ts(e)&&e.data&&(c=!0),!n&&c&&this.cache.write({result:e.data,dataId:"ROOT_QUERY",query:t,variables:i})},r.prototype.markSubscriptionResult=function(e,t,i){ts(e)||this.cache.write({result:e.data,dataId:"ROOT_SUBSCRIPTION",query:t,variables:i})},r.prototype.markMutationInit=function(e){var t=this;if(e.optimisticResponse){var i;typeof e.optimisticResponse=="function"?i=e.optimisticResponse(e.variables):i=e.optimisticResponse,this.cache.recordOptimisticTransaction(function(n){var s=t.cache;t.cache=n;try{t.markMutationResult({mutationId:e.mutationId,result:{data:i},document:e.document,variables:e.variables,updateQueries:e.updateQueries,update:e.update})}finally{t.cache=s}},e.mutationId)}},r.prototype.markMutationResult=function(e){var t=this;if(!ts(e.result)){var i=[{result:e.result.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}],n=e.updateQueries;n&&Object.keys(n).forEach(function(s){var c=n[s],v=c.query,S=c.updater,N=t.cache.diff({query:v.document,variables:v.variables,returnPartialData:!0,optimistic:!1}),U=N.result,X=N.complete;if(X){var ne=qc(function(){return S(U,{mutationResult:e.result,queryName:Ac(v.document)||void 0,queryVariables:v.variables})});ne&&i.push({result:ne,dataId:"ROOT_QUERY",query:v.document,variables:v.variables})}}),this.cache.performTransaction(function(s){i.forEach(function(v){return s.write(v)});var c=e.update;c&&qc(function(){return c(s,e.result)})})}},r.prototype.markMutationComplete=function(e){var t=e.mutationId,i=e.optimisticResponse;i&&this.cache.removeOptimistic(t)},r.prototype.markUpdateQueryResult=function(e,t,i){this.cache.write({result:i,dataId:"ROOT_QUERY",variables:t,query:e})},r.prototype.reset=function(){return this.cache.reset()},r}(),x1="2.6.10",T1=!1,C1=function(){function r(e){var t=this;this.defaultOptions={},this.resetStoreCallbacks=[],this.clearStoreCallbacks=[];var i=e.cache,n=e.ssrMode,s=n===void 0?!1:n,c=e.ssrForceFetchDelay,v=c===void 0?0:c,S=e.connectToDevTools,N=e.queryDeduplication,U=N===void 0?!0:N,X=e.defaultOptions,ne=e.assumeImmutableResults,ce=ne===void 0?!1:ne,be=e.resolvers,ye=e.typeDefs,ge=e.fragmentMatcher,ve=e.name,ke=e.version,Ce=e.link;if(!Ce&&be&&(Ce=Oi.empty()),!Ce||!i)throw new Fr(4);this.link=Ce,this.cache=i,this.store=new R1(i),this.disableNetworkFetches=s||v>0,this.queryDeduplication=U,this.defaultOptions=X||{},this.typeDefs=ye,v&&setTimeout(function(){return t.disableNetworkFetches=!1},v),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this);var Pe=!1;(typeof S=="undefined"?Pe:S&&typeof window!="undefined")&&(window.__APOLLO_CLIENT__=this),this.version=x1,this.localState=new Lm({cache:i,client:this,resolvers:be,fragmentMatcher:ge}),this.queryManager=new E1({link:this.link,store:this.store,queryDeduplication:U,ssrMode:s,clientAwareness:{name:ve,version:ke},localState:this.localState,assumeImmutableResults:ce,onBroadcast:function(){t.devToolsHookCb&&t.devToolsHookCb({action:{},state:{queries:t.queryManager.queryStore.getStore(),mutations:t.queryManager.mutationStore.getStore()},dataWithOptimisticResults:t.cache.extract(!0)})}})}return r.prototype.stop=function(){this.queryManager.stop()},r.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=je(je({},this.defaultOptions.watchQuery),e)),this.disableNetworkFetches&&(e.fetchPolicy==="network-only"||e.fetchPolicy==="cache-and-network")&&(e=je(je({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},r.prototype.query=function(e){return this.defaultOptions.query&&(e=je(je({},this.defaultOptions.query),e)),Ht(e.fetchPolicy!=="cache-and-network",5),this.disableNetworkFetches&&e.fetchPolicy==="network-only"&&(e=je(je({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},r.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=je(je({},this.defaultOptions.mutate),e)),this.queryManager.mutate(e)},r.prototype.subscribe=function(e){return this.queryManager.startGraphQLSubscription(e)},r.prototype.readQuery=function(e,t){return t===void 0&&(t=!1),this.cache.readQuery(e,t)},r.prototype.readFragment=function(e,t){return t===void 0&&(t=!1),this.cache.readFragment(e,t)},r.prototype.writeQuery=function(e){var t=this.cache.writeQuery(e);return this.queryManager.broadcastQueries(),t},r.prototype.writeFragment=function(e){var t=this.cache.writeFragment(e);return this.queryManager.broadcastQueries(),t},r.prototype.writeData=function(e){var t=this.cache.writeData(e);return this.queryManager.broadcastQueries(),t},r.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},r.prototype.__requestRaw=function(e){return al(this.link,e)},r.prototype.initQueryManager=function(){return this.queryManager},r.prototype.resetStore=function(){var e=this;return Promise.resolve().then(function(){return e.queryManager.clearStore()}).then(function(){return Promise.all(e.resetStoreCallbacks.map(function(t){return t()}))}).then(function(){return e.reFetchObservableQueries()})},r.prototype.clearStore=function(){var e=this;return Promise.resolve().then(function(){return e.queryManager.clearStore()}).then(function(){return Promise.all(e.clearStoreCallbacks.map(function(t){return t()}))})},r.prototype.onResetStore=function(e){var t=this;return this.resetStoreCallbacks.push(e),function(){t.resetStoreCallbacks=t.resetStoreCallbacks.filter(function(i){return i!==e})}},r.prototype.onClearStore=function(e){var t=this;return this.clearStoreCallbacks.push(e),function(){t.clearStoreCallbacks=t.clearStoreCallbacks.filter(function(i){return i!==e})}},r.prototype.reFetchObservableQueries=function(e){return this.queryManager.reFetchObservableQueries(e)},r.prototype.extract=function(e){return this.cache.extract(e)},r.prototype.restore=function(e){return this.cache.restore(e)},r.prototype.addResolvers=function(e){this.localState.addResolvers(e)},r.prototype.setResolvers=function(e){this.localState.setResolvers(e)},r.prototype.getResolvers=function(){return this.localState.getResolvers()},r.prototype.setLocalStateFragmentMatcher=function(e){this.localState.setFragmentMatcher(e)},r}();const iR=null;function M1(r){var e={kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GeneratedClientQuery"},selectionSet:ol(r)},t={kind:"Document",definitions:[e]};return t}function N1(r,e){var t={kind:"FragmentDefinition",typeCondition:{kind:"NamedType",name:{kind:"Name",value:e||"__FakeType"}},name:{kind:"Name",value:"GeneratedClientQuery"},selectionSet:ol(r)},i={kind:"Document",definitions:[t]};return i}function ol(r){if(typeof r=="number"||typeof r=="boolean"||typeof r=="string"||typeof r=="undefined"||r===null)return null;if(Array.isArray(r))return ol(r[0]);var e=[];Object.keys(r).forEach(function(i){var n=ol(r[i]),s={kind:"Field",name:{kind:"Name",value:i},selectionSet:n||void 0};e.push(s)});var t={kind:"SelectionSet",selections:e};return t}var P1={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:null,variableDefinitions:null,directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:null,name:{kind:"Name",value:"__typename"},arguments:[],directives:[],selectionSet:null}]}}]},A1=function(){function r(){}return r.prototype.transformDocument=function(e){return e},r.prototype.transformForLink=function(e){return e},r.prototype.readQuery=function(e,t){return t===void 0&&(t=!1),this.read({query:e.query,variables:e.variables,optimistic:t})},r.prototype.readFragment=function(e,t){return t===void 0&&(t=!1),this.read({query:bm(e.fragment,e.fragmentName),variables:e.variables,rootId:e.id,optimistic:t})},r.prototype.writeQuery=function(e){this.write({dataId:"ROOT_QUERY",result:e.data,query:e.query,variables:e.variables})},r.prototype.writeFragment=function(e){this.write({dataId:e.id,result:e.data,variables:e.variables,query:bm(e.fragment,e.fragmentName)})},r.prototype.writeData=function(e){var t=e.id,i=e.data;if(typeof t!="undefined"){var n=null;try{n=this.read({rootId:t,optimistic:!1,query:P1})}catch(v){}var s=n&&n.__typename||"__ClientData",c=Object.assign({__typename:s},i);this.writeFragment({id:t,fragment:N1(c,s),data:c})}else this.writeQuery({query:M1(i),data:i})},r}(),Bm;(function(r){})(Bm||(Bm={}));var Or=null,qm={},I1=1,D1=function(){return function(){function r(){this.id=["slot",I1++,Date.now(),Math.random().toString(36).slice(2)].join(":")}return r.prototype.hasValue=function(){for(var e=Or;e;e=e.parent)if(this.id in e.slots){var t=e.slots[this.id];if(t===qm)break;return e!==Or&&(Or.slots[this.id]=t),!0}return Or&&(Or.slots[this.id]=qm),!1},r.prototype.getValue=function(){if(this.hasValue())return Or.slots[this.id]},r.prototype.withValue=function(e,t,i,n){var s,c=(s={__proto__:null},s[this.id]=e,s),v=Or;Or={parent:v,slots:c};try{return t.apply(n,i)}finally{Or=v}},r.bind=function(e){var t=Or;return function(){var i=Or;try{return Or=t,e.apply(this,arguments)}finally{Or=i}}},r.noContext=function(e,t,i){if(Or){var n=Or;try{return Or=null,e.apply(i,t)}finally{Or=n}}else return e.apply(i,t)},r}()},Gc="@wry/context:Slot",jc=Array,zc=jc[Gc]||function(){var r=D1();try{Object.defineProperty(jc,Gc,{value:jc[Gc]=r,enumerable:!1,writable:!1,configurable:!1})}finally{return r}}(),Wc=zc.bind,F1=zc.noContext;function nR(r,e){return setTimeout(Wc(r),e)}function sR(r){return function(){var e=r.apply(this,arguments),t=Wc(e.next),i=Wc(e.throw);return new Promise(function(n,s){function c(N,U){try{var X=N.call(e,U)}catch(ce){return s(ce)}var ne=X.done?n:v;O1(X.value)?X.value.then(ne,X.done?s:S):ne(X.value)}var v=function(N){return c(t,N)},S=function(N){return c(i,N)};v()})}}function O1(r){return r&&typeof r.then=="function"}var Hm=null;function aR(r){if(Hm.indexOf(r)<0){var e=function(t,i){var n=t[i];t[i]=function(){return F1(n,arguments,this)}};e(r,"yield"),e(r.prototype,"run"),e(r.prototype,"throwInto"),Hm.push(r)}return r}function L1(){}var U1=function(){function r(e,t){e===void 0&&(e=Infinity),t===void 0&&(t=L1),this.max=e,this.dispose=t,this.map=new Map,this.newest=null,this.oldest=null}return r.prototype.has=function(e){return this.map.has(e)},r.prototype.get=function(e){var t=this.getEntry(e);return t&&t.value},r.prototype.getEntry=function(e){var t=this.map.get(e);if(t&&t!==this.newest){var i=t.older,n=t.newer;n&&(n.older=i),i&&(i.newer=n),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=n)}return t},r.prototype.set=function(e,t){var i=this.getEntry(e);return i?i.value=t:(i={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=i),this.newest=i,this.oldest=this.oldest||i,this.map.set(e,i),i.value)},r.prototype.clean=function(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)},r.prototype.delete=function(e){var t=this.map.get(e);return t?(t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.map.delete(e),this.dispose(t.value,e),!0):!1},r}(),ll=new zc,B1=[],Kc=[],q1=100;function Hs(r,e){if(!r)throw new Error(e||"assertion failure")}function H1(r,e){var t=r.length;return t>0&&t===e.length&&r[t-1]===e[t-1]}function Vm(r){switch(r.length){case 0:throw new Error("unknown value");case 1:return r[0];case 2:throw r[1]}}function V1(r){return r.slice(0)}var $1=function(){function r(e,t){this.fn=e,this.args=t,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],++r.count}return r.prototype.recompute=function(){if(Hs(!this.recomputing,"already recomputing"),!(!G1(this)&&Qc(this)))return Vs(this)?j1(this):Vm(this.value)},r.prototype.setDirty=function(){this.dirty||(this.dirty=!0,this.value.length=0,$m(this),Yc(this))},r.prototype.dispose=function(){var e=this;Km(this).forEach(Qc),Yc(this),this.parents.forEach(function(t){t.setDirty(),Qm(t,e)})},r.count=0,r}();function G1(r){var e=ll.getValue();if(e)return r.parents.add(e),e.childValues.has(r)||e.childValues.set(r,[]),Vs(r)?jm(e,r):zm(e,r),e}function j1(r){var e=Km(r);return ll.withValue(r,z1,[r]),K1(r)&&W1(r),e.forEach(Qc),Vm(r.value)}function z1(r){r.recomputing=!0,r.value.length=0;try{r.value[0]=r.fn.apply(null,r.args)}catch(e){r.value[1]=e}r.recomputing=!1}function Vs(r){return r.dirty||!!(r.dirtyChildren&&r.dirtyChildren.size)}function W1(r){r.dirty=!1,!Vs(r)&&Gm(r)}function $m(r){r.parents.forEach(function(e){return jm(e,r)})}function Gm(r){r.parents.forEach(function(e){return zm(e,r)})}function jm(r,e){if(Hs(r.childValues.has(e)),Hs(Vs(e)),!r.dirtyChildren)r.dirtyChildren=Kc.pop()||new Set;else if(r.dirtyChildren.has(e))return;r.dirtyChildren.add(e),$m(r)}function zm(r,e){Hs(r.childValues.has(e)),Hs(!Vs(e));var t=r.childValues.get(e);t.length===0?r.childValues.set(e,V1(e.value)):H1(t,e.value)||r.setDirty(),Wm(r,e),!Vs(r)&&Gm(r)}function Wm(r,e){var t=r.dirtyChildren;t&&(t.delete(e),t.size===0&&(Kc.length<q1&&Kc.push(t),r.dirtyChildren=null))}function Qc(r){return r.parents.size===0&&typeof r.reportOrphan=="function"&&r.reportOrphan()===!0}function Km(r){var e=B1;return r.childValues.size>0&&(e=[],r.childValues.forEach(function(t,i){Qm(r,i),e.push(i)})),Hs(r.dirtyChildren===null),e}function Qm(r,e){e.parents.delete(r),r.childValues.delete(e),Wm(r,e)}function K1(r){if(typeof r.subscribe=="function")try{Yc(r),r.unsubscribe=r.subscribe.apply(null,r.args)}catch(e){return r.setDirty(),!1}return!0}function Yc(r){var e=r.unsubscribe;typeof e=="function"&&(r.unsubscribe=void 0,e())}var Jc=function(){function r(e){this.weakness=e}return r.prototype.lookup=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.lookupArray(e)},r.prototype.lookupArray=function(e){var t=this;return e.forEach(function(i){return t=t.getChildTrie(i)}),t.data||(t.data=Object.create(null))},r.prototype.getChildTrie=function(e){var t=this.weakness&&Q1(e)?this.weak||(this.weak=new WeakMap):this.strong||(this.strong=new Map),i=t.get(e);return i||t.set(e,i=new r(this.weakness)),i},r}();function Q1(r){switch(typeof r){case"object":if(r===null)break;case"function":return!0}return!1}var Y1=new Jc(typeof WeakMap=="function");function J1(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return Y1.lookupArray(r)}var Zc=new Set;function qa(r,e){e===void 0&&(e=Object.create(null));var t=new U1(e.max||Math.pow(2,16),function(c){return c.dispose()}),i=!!e.disposable,n=e.makeCacheKey||J1;function s(){if(!(i&&!ll.hasValue())){var c=n.apply(null,arguments);if(c===void 0)return r.apply(null,arguments);var v=Array.prototype.slice.call(arguments),S=t.get(c);S?S.args=v:(S=new $1(r,v),t.set(c,S),S.subscribe=e.subscribe,i&&(S.reportOrphan=function(){return t.delete(c)}));var N=S.recompute();return t.set(c,S),Zc.add(t),ll.hasValue()||(Zc.forEach(function(U){return U.clean()}),Zc.clear()),i?void 0:N}}return s.dirty=function(){var c=n.apply(null,arguments),v=c!==void 0&&t.get(c);v&&v.setDirty()},s}var Ym=!1;function Jm(){var r=!Ym;return Bc()||(Ym=!0),r}var Z1=function(){function r(){}return r.prototype.ensureReady=function(){return Promise.resolve()},r.prototype.canBypassInit=function(){return!0},r.prototype.match=function(e,t,i){var n=i.store.get(e.id),s=e.id==="ROOT_QUERY";if(!n)return s;var c=n.__typename,v=c===void 0?s&&"Query":c;return v&&v===t?!0:(Jm(),"heuristic")},r}(),oR=function(){function r(e){e&&e.introspectionQueryResultData?(this.possibleTypesMap=this.parseIntrospectionResult(e.introspectionQueryResultData),this.isReady=!0):this.isReady=!1,this.match=this.match.bind(this)}return r.prototype.match=function(e,t,i){Ht(this.isReady,1);var n=i.store.get(e.id),s=e.id==="ROOT_QUERY";if(!n)return s;var c=n.__typename,v=c===void 0?s&&"Query":c;if(Ht(v,2),v===t)return!0;var S=this.possibleTypesMap[t];return!!(v&&S&&S.indexOf(v)>-1)},r.prototype.parseIntrospectionResult=function(e){var t={};return e.__schema.types.forEach(function(i){(i.kind==="UNION"||i.kind==="INTERFACE")&&(t[i.name]=i.possibleTypes.map(function(n){return n.name}))}),t},r}(),Zm=Object.prototype.hasOwnProperty,$s=function(){function r(e){var t=this;e===void 0&&(e=Object.create(null)),this.data=e,this.depend=qa(function(i){return t.data[i]},{disposable:!0,makeCacheKey:function(i){return i}})}return r.prototype.toObject=function(){return this.data},r.prototype.get=function(e){return this.depend(e),this.data[e]},r.prototype.set=function(e,t){var i=this.data[e];t!==i&&(this.data[e]=t,this.depend.dirty(e))},r.prototype.delete=function(e){Zm.call(this.data,e)&&(delete this.data[e],this.depend.dirty(e))},r.prototype.clear=function(){this.replace(null)},r.prototype.replace=function(e){var t=this;e?(Object.keys(e).forEach(function(i){t.set(i,e[i])}),Object.keys(this.data).forEach(function(i){Zm.call(e,i)||t.delete(i)})):Object.keys(this.data).forEach(function(i){t.delete(i)})},r}();function Xm(r){return new $s(r)}var X1=function(){function r(e){var t=this,i=e===void 0?{}:e,n=i.cacheKeyRoot,s=n===void 0?new Jc(Oc):n,c=i.freezeResults,v=c===void 0?!1:c,S=this,N=S.executeStoreQuery,U=S.executeSelectionSet,X=S.executeSubSelectedArray;this.freezeResults=v,this.executeStoreQuery=qa(function(ne){return N.call(t,ne)},{makeCacheKey:function(ne){var ce=ne.query,be=ne.rootValue,ye=ne.contextValue,ge=ne.variableValues,ve=ne.fragmentMatcher;if(ye.store instanceof $s)return s.lookup(ye.store,ce,ve,JSON.stringify(ge),be.id)}}),this.executeSelectionSet=qa(function(ne){return U.call(t,ne)},{makeCacheKey:function(ne){var ce=ne.selectionSet,be=ne.rootValue,ye=ne.execContext;if(ye.contextValue.store instanceof $s)return s.lookup(ye.contextValue.store,ce,ye.fragmentMatcher,JSON.stringify(ye.variableValues),be.id)}}),this.executeSubSelectedArray=qa(function(ne){return X.call(t,ne)},{makeCacheKey:function(ne){var ce=ne.field,be=ne.array,ye=ne.execContext;if(ye.contextValue.store instanceof $s)return s.lookup(ye.contextValue.store,ce,be,JSON.stringify(ye.variableValues))}})}return r.prototype.readQueryFromStore=function(e){return this.diffQueryAgainstStore(je(je({},e),{returnPartialData:!1})).result},r.prototype.diffQueryAgainstStore=function(e){var t=e.store,i=e.query,n=e.variables,s=e.previousResult,c=e.returnPartialData,v=c===void 0?!0:c,S=e.rootId,N=S===void 0?"ROOT_QUERY":S,U=e.fragmentMatcherFunction,X=e.config,ne=Vw(i);n=Pc({},Dc(ne),n);var ce={store:t,dataIdFromObject:X&&X.dataIdFromObject,cacheRedirects:X&&X.cacheRedirects||{}},be=this.executeStoreQuery({query:i,rootValue:{type:"id",id:N,generated:!0,typename:"Query"},contextValue:ce,variableValues:n,fragmentMatcher:U}),ye=be.missing&&be.missing.length>0;return ye&&!v&&be.missing.forEach(function(ge){if(!ge.tolerable)throw new Fr(8)}),s&&Fi(s,be.result)&&(be.result=s),{result:be.result,complete:!ye}},r.prototype.executeStoreQuery=function(e){var t=e.query,i=e.rootValue,n=e.contextValue,s=e.variableValues,c=e.fragmentMatcher,v=c===void 0?e_:c,S=Ic(t),N=rl(t),U=il(N),X={query:t,fragmentMap:U,contextValue:n,variableValues:s,fragmentMatcher:v};return this.executeSelectionSet({selectionSet:S.selectionSet,rootValue:i,execContext:X})},r.prototype.executeSelectionSet=function(e){var t=this,i=e.selectionSet,n=e.rootValue,s=e.execContext,c=s.fragmentMap,v=s.contextValue,S=s.variableValues,N={result:null},U=[],X=v.store.get(n.id),ne=X&&X.__typename||n.id==="ROOT_QUERY"&&"Query"||void 0;function ce(be){var ye;return be.missing&&(N.missing=N.missing||[],(ye=N.missing).push.apply(ye,be.missing)),be.result}return i.selections.forEach(function(be){var ye;if(!!Nc(be,S))if(In(be)){var ge=ce(t.executeField(X,ne,be,s));typeof ge!="undefined"&&U.push((ye={},ye[La(be)]=ge,ye))}else{var ve=void 0;if(Zo(be))ve=be;else if(ve=c[be.name.value],!ve)throw new Fr(9);var ke=ve.typeCondition&&ve.typeCondition.name.value,Ce=!ke||s.fragmentMatcher(n,ke,v);if(Ce){var Pe=t.executeSelectionSet({selectionSet:ve.selectionSet,rootValue:n,execContext:s});Ce==="heuristic"&&Pe.missing&&(Pe=je(je({},Pe),{missing:Pe.missing.map(function(Oe){return je(je({},Oe),{tolerable:!0})})})),U.push(ce(Pe))}}}),N.result=Hc(U),this.freezeResults,N},r.prototype.executeField=function(e,t,i,n){var s=n.variableValues,c=n.contextValue,v=i.name.value,S=Mc(i,s),N={resultKey:La(i),directives:Lw(i,s)},U=t_(e,t,v,S,c,N);return Array.isArray(U.result)?this.combineExecResults(U,this.executeSubSelectedArray({field:i,array:U.result,execContext:n})):i.selectionSet?U.result==null?U:this.combineExecResults(U,this.executeSelectionSet({selectionSet:i.selectionSet,rootValue:U.result,execContext:n})):(eg(i,U.result),this.freezeResults,U)},r.prototype.combineExecResults=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i;return e.forEach(function(n){n.missing&&(i=i||[],i.push.apply(i,n.missing))}),{result:e.pop().result,missing:i}},r.prototype.executeSubSelectedArray=function(e){var t=this,i=e.field,n=e.array,s=e.execContext,c;function v(S){return S.missing&&(c=c||[],c.push.apply(c,S.missing)),S.result}return n=n.map(function(S){return S===null?null:Array.isArray(S)?v(t.executeSubSelectedArray({field:i,array:S,execContext:s})):i.selectionSet?v(t.executeSelectionSet({selectionSet:i.selectionSet,rootValue:S,execContext:s})):(eg(i,S),S)}),this.freezeResults,{result:n,missing:c}},r}();function eg(r,e){if(!r.selectionSet&&Xo(e))throw new Fr(10)}function e_(){return!0}function lR(r){invariant(isIdValue(r),11)}function t_(r,e,t,i,n,s){var c=s.resultKey,v=s.directives,S=t;(i||v)&&(S=gm(S,i,v));var N=void 0;if(r&&(N=r[S],typeof N=="undefined"&&n.cacheRedirects&&typeof e=="string")){var U=n.cacheRedirects[e];if(U){var X=U[t];X&&(N=X(r,i,{getCacheKey:function(ne){var ce=n.dataIdFromObject(ne);return ce&&el({id:ce,typename:ne.__typename})}}))}}return typeof N=="undefined"?{result:N,missing:[{object:r,fieldName:S,tolerable:!1}]}:(Fw(N)&&(N=N.json),{result:N})}var ul=function(){function r(e){e===void 0&&(e=Object.create(null)),this.data=e}return r.prototype.toObject=function(){return this.data},r.prototype.get=function(e){return this.data[e]},r.prototype.set=function(e,t){this.data[e]=t},r.prototype.delete=function(e){this.data[e]=void 0},r.prototype.clear=function(){this.data=Object.create(null)},r.prototype.replace=function(e){this.data=e||Object.create(null)},r}();function uR(r){return new ul(r)}var r_=function(r){cn(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="WriteError",t}return e}(Error);function i_(r,e){var t=new r_(`Error writing result to store for query:
`+JSON.stringify(e));return t.message+=`
`+r.message,t.stack=r.stack,t}var n_=function(){function r(){}return r.prototype.writeQueryToStore=function(e){var t=e.query,i=e.result,n=e.store,s=n===void 0?Xm():n,c=e.variables,v=e.dataIdFromObject,S=e.fragmentMatcherFunction;return this.writeResultToStore({dataId:"ROOT_QUERY",result:i,document:t,store:s,variables:c,dataIdFromObject:v,fragmentMatcherFunction:S})},r.prototype.writeResultToStore=function(e){var t=e.dataId,i=e.result,n=e.document,s=e.store,c=s===void 0?Xm():s,v=e.variables,S=e.dataIdFromObject,N=e.fragmentMatcherFunction,U=Bs(n);try{return this.writeSelectionSetToStore({result:i,dataId:t,selectionSet:U.selectionSet,context:{store:c,processedData:{},variables:Pc({},Dc(U),v),dataIdFromObject:S,fragmentMap:il(rl(n)),fragmentMatcherFunction:N}})}catch(X){throw i_(X,n)}},r.prototype.writeSelectionSetToStore=function(e){var t=this,i=e.result,n=e.dataId,s=e.selectionSet,c=e.context,v=c.variables,S=c.store,N=c.fragmentMap;return s.selections.forEach(function(U){var X;if(!!Nc(U,v))if(In(U)){var ne=La(U),ce=i[ne];if(typeof ce!="undefined")t.writeFieldToStore({dataId:n,value:ce,field:U,context:c});else{var be=!1,ye=!1;U.directives&&U.directives.length&&(be=U.directives.some(function(Ze){return Ze.name&&Ze.name.value==="defer"}),ye=U.directives.some(function(Ze){return Ze.name&&Ze.name.value==="client"})),!be&&!ye&&c.fragmentMatcherFunction}}else{var ge=void 0;Zo(U)?ge=U:(ge=(N||{})[U.name.value],Ht(ge,3));var ve=!0;if(c.fragmentMatcherFunction&&ge.typeCondition){var ke=n||"self",Ce=el({id:ke,typename:void 0}),Pe={store:new ul((X={},X[ke]=i,X)),cacheRedirects:{}},Oe=c.fragmentMatcherFunction(Ce,ge.typeCondition.name.value,Pe);!Rm()&&Oe==="heuristic",ve=!!Oe}ve&&t.writeSelectionSetToStore({result:i,selectionSet:ge.selectionSet,dataId:n,context:c})}}),S},r.prototype.writeFieldToStore=function(e){var t,i=e.field,n=e.value,s=e.dataId,c=e.context,v=c.variables,S=c.dataIdFromObject,N=c.store,U,X,ne=Iw(i,v);if(!i.selectionSet||n===null)U=n!=null&&typeof n=="object"?{type:"json",json:n}:n;else if(Array.isArray(n)){var ce=s+"."+ne;U=this.processArrayValue(n,ce,i.selectionSet,c)}else{var be=s+"."+ne,ye=!0;if(Xc(be)||(be="$"+be),S){var ge=S(n);Ht(!ge||!Xc(ge),4),(ge||typeof ge=="number"&&ge===0)&&(be=ge,ye=!1)}rg(be,i,c.processedData)||this.writeSelectionSetToStore({dataId:be,result:n,selectionSet:i.selectionSet,context:c});var ve=n.__typename;U=el({id:be,typename:ve},ye),X=N.get(s);var ke=X&&X[ne];if(ke!==U&&Xo(ke)){var Ce=ke.typename!==void 0,Pe=ve!==void 0,Oe=Ce&&Pe&&ke.typename!==ve;Ht(!ye||ke.generated||Oe,5),Ht(!Ce||Pe,6),ke.generated&&(Oe?ye||N.delete(ke.id):tg(ke.id,U.id,N))}}X=N.get(s),(!X||!Fi(U,X[ne]))&&N.set(s,je(je({},X),(t={},t[ne]=U,t)))},r.prototype.processArrayValue=function(e,t,i,n){var s=this;return e.map(function(c,v){if(c===null)return null;var S=t+"."+v;if(Array.isArray(c))return s.processArrayValue(c,S,i,n);var N=!0;if(n.dataIdFromObject){var U=n.dataIdFromObject(c);U&&(S=U,N=!1)}return rg(S,i,n.processedData)||s.writeSelectionSetToStore({dataId:S,result:c,selectionSet:i,context:n}),el({id:S,typename:c.__typename},N)})},r}();function Xc(r){return r[0]==="$"}function tg(r,e,t){if(r===e)return!1;var i=t.get(r),n=t.get(e),s=!1;Object.keys(i).forEach(function(v){var S=i[v],N=n[v];Xo(S)&&Xc(S.id)&&Xo(N)&&!Fi(S,N)&&tg(S.id,N.id,t)&&(s=!0)}),t.delete(r);var c=je(je({},i),n);return Fi(c,n)?s:(t.set(e,c),!0)}function rg(r,e,t){if(!t)return!1;if(t[r]){if(t[r].indexOf(e)>=0)return!0;t[r].push(e)}else t[r]=[e];return!1}var s_={fragmentMatcher:new Z1,dataIdFromObject:a_,addTypename:!0,resultCaching:!0,freezeResults:!1};function a_(r){if(r.__typename){if(r.id!==void 0)return r.__typename+":"+r.id;if(r._id!==void 0)return r.__typename+":"+r._id}return null}var o_=Object.prototype.hasOwnProperty,ig=function(r){cn(e,r);function e(t,i,n){var s=r.call(this,Object.create(null))||this;return s.optimisticId=t,s.parent=i,s.transaction=n,s}return e.prototype.toObject=function(){return je(je({},this.parent.toObject()),this.data)},e.prototype.get=function(t){return o_.call(this.data,t)?this.data[t]:this.parent.get(t)},e}(ul),l_=function(r){cn(e,r);function e(t){t===void 0&&(t={});var i=r.call(this)||this;i.watches=new Set,i.typenameDocumentCache=new Map,i.cacheKeyRoot=new Jc(Oc),i.silenceBroadcast=!1,i.config=je(je({},s_),t),i.config.customResolvers&&(i.config.cacheRedirects=i.config.customResolvers),i.config.cacheResolvers&&(i.config.cacheRedirects=i.config.cacheResolvers),i.addTypename=!!i.config.addTypename,i.data=i.config.resultCaching?new $s:new ul,i.optimisticData=i.data,i.storeWriter=new n_,i.storeReader=new X1({cacheKeyRoot:i.cacheKeyRoot,freezeResults:t.freezeResults});var n=i,s=n.maybeBroadcastWatch;return i.maybeBroadcastWatch=qa(function(c){return s.call(i,c)},{makeCacheKey:function(c){if(!c.optimistic&&!c.previousResult&&n.data instanceof $s)return n.cacheKeyRoot.lookup(c.query,JSON.stringify(c.variables))}}),i}return e.prototype.restore=function(t){return t&&this.data.replace(t),this},e.prototype.extract=function(t){return t===void 0&&(t=!1),(t?this.optimisticData:this.data).toObject()},e.prototype.read=function(t){if(typeof t.rootId=="string"&&typeof this.data.get(t.rootId)=="undefined")return null;var i=this.config.fragmentMatcher,n=i&&i.match;return this.storeReader.readQueryFromStore({store:t.optimistic?this.optimisticData:this.data,query:this.transformDocument(t.query),variables:t.variables,rootId:t.rootId,fragmentMatcherFunction:n,previousResult:t.previousResult,config:this.config})||null},e.prototype.write=function(t){var i=this.config.fragmentMatcher,n=i&&i.match;this.storeWriter.writeResultToStore({dataId:t.dataId,result:t.result,variables:t.variables,document:this.transformDocument(t.query),store:this.data,dataIdFromObject:this.config.dataIdFromObject,fragmentMatcherFunction:n}),this.broadcastWatches()},e.prototype.diff=function(t){var i=this.config.fragmentMatcher,n=i&&i.match;return this.storeReader.diffQueryAgainstStore({store:t.optimistic?this.optimisticData:this.data,query:this.transformDocument(t.query),variables:t.variables,returnPartialData:t.returnPartialData,previousResult:t.previousResult,fragmentMatcherFunction:n,config:this.config})},e.prototype.watch=function(t){var i=this;return this.watches.add(t),function(){i.watches.delete(t)}},e.prototype.evict=function(t){throw new Fr(7)},e.prototype.reset=function(){return this.data.clear(),this.broadcastWatches(),Promise.resolve()},e.prototype.removeOptimistic=function(t){for(var i=[],n=0,s=this.optimisticData;s instanceof ig;)s.optimisticId===t?++n:i.push(s),s=s.parent;if(n>0){for(this.optimisticData=s;i.length>0;){var c=i.pop();this.performTransaction(c.transaction,c.optimisticId)}this.broadcastWatches()}},e.prototype.performTransaction=function(t,i){var n=this,s=n.data,c=n.silenceBroadcast;this.silenceBroadcast=!0,typeof i=="string"&&(this.data=this.optimisticData=new ig(i,this.optimisticData,t));try{t(this)}finally{this.silenceBroadcast=c,this.data=s}this.broadcastWatches()},e.prototype.recordOptimisticTransaction=function(t,i){return this.performTransaction(t,i)},e.prototype.transformDocument=function(t){if(this.addTypename){var i=this.typenameDocumentCache.get(t);return i||(i=jw(t),this.typenameDocumentCache.set(t,i),this.typenameDocumentCache.set(i,i)),i}return t},e.prototype.broadcastWatches=function(){var t=this;this.silenceBroadcast||this.watches.forEach(function(i){return t.maybeBroadcastWatch(i)})},e.prototype.maybeBroadcastWatch=function(t){t.callback(this.diff({query:t.query,variables:t.variables,previousResult:t.previousResult&&t.previousResult(),optimistic:t.optimistic}))},e}(A1);function u_(r){return new Oi(function(e,t){var i=om(e,[]);return new Xr(function(n){var s;return Promise.resolve(i).then(function(c){return r(c,e.getContext())}).then(e.setContext).then(function(){s=t(e).subscribe({next:n.next.bind(n),error:n.error.bind(n),complete:n.complete.bind(n)})}).catch(n.error.bind(n)),function(){s&&s.unsubscribe()}})})}var c_=St(23033),d_={includeQuery:!0,includeExtensions:!1},f_={accept:"*/*","content-type":"application/json"},h_={method:"POST"},p_={http:d_,headers:f_,options:h_},ng=function(r,e,t){var i=new Error(t);throw i.name="ServerError",i.response=r,i.statusCode=r.status,i.result=e,i},m_=function(r){return function(e){return e.text().then(function(t){try{return JSON.parse(t)}catch(n){var i=n;return i.name="ServerParseError",i.response=e,i.statusCode=e.status,i.bodyText=t,Promise.reject(i)}}).then(function(t){return e.status>=300&&ng(e,t,"Response not successful: Received status code "+e.status),!Array.isArray(t)&&!t.hasOwnProperty("data")&&!t.hasOwnProperty("errors")&&ng(e,t,"Server response was missing for query '"+(Array.isArray(r)?r.map(function(i){return i.operationName}):r.operationName)+"'."),t})}},g_=function(r){if(!r&&typeof fetch=="undefined"){var e="unfetch";throw typeof window=="undefined"&&(e="node-fetch"),new Fr(1)}},v_=function(){if(typeof AbortController=="undefined")return{controller:!1,signal:!1};var r=new AbortController,e=r.signal;return{controller:r,signal:e}},b_=function(r,e){for(var t=[],i=2;i<arguments.length;i++)t[i-2]=arguments[i];var n=je({},e.options,{headers:e.headers,credentials:e.credentials}),s=e.http;t.forEach(function(X){n=je({},n,X.options,{headers:je({},n.headers,X.headers)}),X.credentials&&(n.credentials=X.credentials),s=je({},s,X.http)});var c=r.operationName,v=r.extensions,S=r.variables,N=r.query,U={operationName:c,variables:S};return s.includeExtensions&&(U.extensions=v),s.includeQuery&&(U.query=(0,c_.S)(N)),{options:n,body:U}},ed=function(r,e){var t;try{t=JSON.stringify(r)}catch(n){var i=new Fr(2);throw i.parseError=n,i}return t},y_=function(r,e){var t=r.getContext(),i=t.uri;return i||(typeof e=="function"?e(r):e||"/graphql")},sg=function(r){r===void 0&&(r={});var e=r.uri,t=e===void 0?"/graphql":e,i=r.fetch,n=r.includeExtensions,s=r.useGETForQueries,c=om(r,["uri","fetch","includeExtensions","useGETForQueries"]);g_(i),i||(i=fetch);var v={http:{includeExtensions:n},options:c.fetchOptions,credentials:c.credentials,headers:c.headers};return new Oi(function(S){var N=y_(S,t),U=S.getContext(),X={};if(U.clientAwareness){var ne=U.clientAwareness,ce=ne.name,be=ne.version;ce&&(X["apollographql-client-name"]=ce),be&&(X["apollographql-client-version"]=be)}var ye=je({},X,U.headers),ge={http:U.http,options:U.fetchOptions,credentials:U.credentials,headers:ye},ve=b_(S,p_,v,ge),ke=ve.options,Ce=ve.body,Pe;if(!ke.signal){var Oe=v_(),Ze=Oe.controller,wt=Oe.signal;Pe=Ze,Pe&&(ke.signal=wt)}var ct=function(ur){return ur.kind==="OperationDefinition"&&ur.operation==="mutation"};if(s&&!S.query.definitions.some(ct)&&(ke.method="GET"),ke.method==="GET"){var _t=w_(N,Ce),nr=_t.newURI,Ur=_t.parseError;if(Ur)return Pm(Ur);N=nr}else try{ke.body=ed(Ce,"Payload")}catch(ur){return Pm(ur)}return new Xr(function(ur){return i(N,ke).then(function(Qt){return S.setContext({response:Qt}),Qt}).then(m_(S)).then(function(Qt){return ur.next(Qt),ur.complete(),Qt}).catch(function(Qt){Qt.name!=="AbortError"&&(Qt.result&&Qt.result.errors&&Qt.result.data&&ur.next(Qt.result),ur.error(Qt))}),function(){Pe&&Pe.abort()}})})};function w_(r,e){var t=[],i=function(X,ne){t.push(X+"="+encodeURIComponent(ne))};if("query"in e&&i("query",e.query),e.operationName&&i("operationName",e.operationName),e.variables){var n=void 0;try{n=ed(e.variables,"Variables map")}catch(X){return{parseError:X}}i("variables",n)}if(e.extensions){var s=void 0;try{s=ed(e.extensions,"Extensions map")}catch(X){return{parseError:X}}i("extensions",s)}var c="",v=r,S=r.indexOf("#");S!==-1&&(c=r.substr(S),v=r.substr(0,S));var N=v.indexOf("?")===-1?"?":"&",U=v+N+t.join("&")+c;return{newURI:U}}var cR=function(r){cn(e,r);function e(t){return r.call(this,sg(t).request)||this}return e}(Oi);let Ha;const __={};function S_(r){Ha=r.globalState}const ag=(r,e)=>{if(!Ha)throw new Error("Persistent store not initialized.");return Ha.get(r+":"+e,__)},og=(r,e,t)=>{if(!Ha)throw new Error("Persistent store not initialized.");return Ha.update(r+":"+e,t)};var k_=St(55835),E_=Object.defineProperty,R_=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?E_(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);const lg=class{static initialize(r){lg.icons={reactions:{THUMBS_UP:r.asAbsolutePath(qt.join("resources","icons","reactions","thumbs_up.png")),THUMBS_DOWN:r.asAbsolutePath(qt.join("resources","icons","reactions","thumbs_down.png")),CONFUSED:r.asAbsolutePath(qt.join("resources","icons","reactions","confused.png")),EYES:r.asAbsolutePath(qt.join("resources","icons","reactions","eyes.png")),HEART:r.asAbsolutePath(qt.join("resources","icons","reactions","heart.png")),HOORAY:r.asAbsolutePath(qt.join("resources","icons","reactions","hooray.png")),LAUGH:r.asAbsolutePath(qt.join("resources","icons","reactions","laugh.png")),ROCKET:r.asAbsolutePath(qt.join("resources","icons","reactions","rocket.png"))}}}};let Ki=lg;R_(Ki,"icons");var Sr;(function(r){r[r.Committed=0]="Committed",r[r.Mentioned=1]="Mentioned",r[r.Subscribed=2]="Subscribed",r[r.Commented=3]="Commented",r[r.Reviewed=4]="Reviewed",r[r.Labeled=5]="Labeled",r[r.Milestoned=6]="Milestoned",r[r.Assigned=7]="Assigned",r[r.HeadRefDeleted=8]="HeadRefDeleted",r[r.Merged=9]="Merged",r[r.Other=10]="Other"})(Sr||(Sr={}));function td(r){return r.event===4}function x_(r){return r.event===0}function T_(r){return r.event===3}function dR(r){return r.event===9}function fR(r){return r.event===7}function hR(r){return r.event===8}var C_=Object.defineProperty,ug=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?C_(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);class cl extends Error{constructor(e){super(e);this.message=e,ug(this,"name"),ug(this,"stack")}}function M_(r){var e;return!!((e=r.message)==null?void 0:e.startsWith("Resource protected by organization SAML enforcement."))}var dl,N_=new Uint8Array(16);function P_(){if(!dl&&(dl=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!dl))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return dl(N_)}const A_=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function I_(r){return typeof r=="string"&&A_.test(r)}const D_=I_;for(var Lr=[],rd=0;rd<256;++rd)Lr.push((rd+256).toString(16).substr(1));function F_(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,t=(Lr[r[e+0]]+Lr[r[e+1]]+Lr[r[e+2]]+Lr[r[e+3]]+"-"+Lr[r[e+4]]+Lr[r[e+5]]+"-"+Lr[r[e+6]]+Lr[r[e+7]]+"-"+Lr[r[e+8]]+Lr[r[e+9]]+"-"+Lr[r[e+10]]+Lr[r[e+11]]+Lr[r[e+12]]+Lr[r[e+13]]+Lr[r[e+14]]+Lr[r[e+15]]).toLowerCase();if(!D_(t))throw TypeError("Stringified UUID is invalid");return t}const O_=F_;function L_(r,e,t){r=r||{};var i=r.random||(r.rng||P_)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,e){t=t||0;for(var n=0;n<16;++n)e[t+n]=i[n];return e}return O_(i)}const cg=L_;var U_=Object.defineProperty,pr=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?U_(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);const fl=class{constructor(r,e,t,i,n){pr(this,"commentId"),pr(this,"id"),pr(this,"parent"),pr(this,"body"),pr(this,"originalBody"),pr(this,"mode"),pr(this,"author"),pr(this,"label"),pr(this,"commentReactions"),pr(this,"contextValue"),this.parent=r,this.body=new g.MarkdownString(e),this.mode=g.CommentMode.Preview,this.author={name:i.login,iconPath:i.avatarUrl?g.Uri.parse(`${i.avatarUrl}&s=64`):void 0},this.label=t?"Pending":void 0,this.contextValue="canEdit,canDelete",this.originalBody=n?n._rawComment.body:void 0,this.commentReactions=n?n.reactions:void 0,this.id=fl.idPool++}static is(r){return r.commentId===void 0}startEdit(){this.parent.comments=this.parent.comments.map(r=>(r instanceof fl&&r.id===this.id&&(r.mode=g.CommentMode.Editing),r))}cancelEdit(){this.parent.comments=this.parent.comments.map(r=>(r instanceof fl&&r.id===this.id&&(r.mode=g.CommentMode.Preview,r.body=r.originalBody||r.body),r))}};let pi=fl;pr(pi,"idPool",0);class kr{constructor(e,t){pr(this,"commentId"),pr(this,"parent"),pr(this,"body"),pr(this,"mode"),pr(this,"author"),pr(this,"label"),pr(this,"reactions"),pr(this,"_rawComment"),pr(this,"contextValue"),pr(this,"timestamp"),this._rawComment=e,this.commentId=e.id.toString(),this.body=new g.MarkdownString(e.body),this.author={name:e.user.login,iconPath:e.user&&e.user.avatarUrl?g.Uri.parse(e.user.avatarUrl):void 0},sS(this,e.reactions),this.label=e.isDraft?"Pending":void 0;const i=[];e.canEdit&&i.push("canEdit"),e.canDelete&&i.push("canDelete"),this.contextValue=i.join(","),this.parent=t,this.timestamp=new Date(e.createdAt)}static is(e){return e.commentId!==void 0}startEdit(){this.parent.comments=this.parent.comments.map(e=>(e instanceof kr&&e.commentId===this.commentId&&(e.mode=g.CommentMode.Editing),e))}cancelEdit(){this.parent.comments=this.parent.comments.map(e=>(e instanceof kr&&e.commentId===this.commentId&&(e.mode=g.CommentMode.Preview,e.body=e._rawComment.body),e))}}var Mr;(function(r){r[r.Query=0]="Query",r[r.All=1]="All",r[r.LocalPullRequest=2]="LocalPullRequest"})(Mr||(Mr={}));var fn;(function(r){r.Approve="APPROVE",r.RequestChanges="REQUEST_CHANGES",r.Comment="COMMENT"})(fn||(fn={}));var lr;(function(r){r[r.Open=0]="Open",r[r.Merged=1]="Merged",r[r.Closed=2]="Closed"})(lr||(lr={}));var Fn;(function(r){r[r.Mergeable=0]="Mergeable",r[r.NotMergeable=1]="NotMergeable",r[r.Unknown=2]="Unknown"})(Fn||(Fn={}));var Va;(function(r){function e(i){return g.commands.executeCommand(i)}r.executeCommand=e;function t(i){return e(`${i}.focus`)}r.focusView=t})(Va||(Va={}));var B_=Object.defineProperty,is=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?B_(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);function id(){let r="";const e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let t=0;t<32;t++)r+=e.charAt(Math.floor(Math.random()*e.length));return r}class dg{constructor(){is(this,"_webview"),is(this,"_disposables",[]),is(this,"_waitForReady"),is(this,"_onIsReady",new g.EventEmitter),is(this,"MESSAGE_UNHANDLED","message not handled"),this._waitForReady=new Promise(e=>{const t=this._onIsReady.event(()=>{t.dispose(),e()})})}initialize(){var e;const t=(e=this._webview)==null?void 0:e.onDidReceiveMessage(async i=>{await this._onDidReceiveMessage(i)},null,this._disposables);t&&this._disposables.push(t)}async _onDidReceiveMessage(e){switch(e.command){case"ready":this._onIsReady.fire();return;default:return this.MESSAGE_UNHANDLED}}async _postMessage(e){var t;await this._waitForReady,(t=this._webview)==null||t.postMessage({res:e})}async _replyMessage(e,t){var i;const n={seq:e.req,res:t};(i=this._webview)==null||i.postMessage(n)}async _throwError(e,t){var i;const n={seq:e.req,err:t};(i=this._webview)==null||i.postMessage(n)}dispose(){this._disposables.forEach(e=>e.dispose())}}class fg extends dg{constructor(e){super();this._extensionUri=e,is(this,"viewType"),is(this,"_view")}resolveWebviewView(e,t,i){this._view=e,this._webview=e.webview,super.initialize(),e.webview.options={enableScripts:!0,localResourceRoots:[this._extensionUri]},this._disposables.push(this._view.onDidDispose(()=>{this._webview=void 0,this._view=void 0}))}show(){this._view?this._view.show():Va.focusView(this.viewType)}}var q_=St(34155),H_=Object.defineProperty,hn=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?H_(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);const Qi=class extends dg{constructor(r,e,t,i,n=Qi._viewType){super();this._extensionUri=r,hn(this,"_panel"),hn(this,"_disposables",[]),hn(this,"_descriptionNode"),hn(this,"_item"),hn(this,"_folderRepositoryManager"),hn(this,"_scrollPosition",{x:0,y:0}),this._folderRepositoryManager=i,this._panel=g.window.createWebviewPanel(n,t,e,{enableScripts:!0,retainContextWhenHidden:!0,localResourceRoots:[g.Uri.joinPath(r,"dist")]}),this._webview=this._panel.webview,super.initialize(),this._panel.onDidDispose(()=>this.dispose(),null,this._disposables),this._folderRepositoryManager.onDidChangeActiveIssue(s=>{if(this._folderRepositoryManager&&this._item){const c=this._item.equals(this._folderRepositoryManager.activeIssue);this._postMessage({command:"pr.update-checkout-status",isCurrentlyCheckedOut:c})}},null,this._disposables)}static async createOrShow(r,e,t,i=!1){const n=i?g.ViewColumn.Beside:g.window.activeTextEditor?g.window.activeTextEditor.viewColumn:g.ViewColumn.One;if(Qi.currentPanel)Qi.currentPanel._panel.reveal(n,!0);else{const s=`Issue #${t.number.toString()}`;Qi.currentPanel=new Qi(r,n||g.ViewColumn.Active,s,e)}await Qi.currentPanel.update(e,t)}static refresh(){this.currentPanel&&this.currentPanel.refreshPanel()}async refreshPanel(){this._panel&&this._panel.visible&&this.update(this._folderRepositoryManager,this._item)}async updateIssue(r){return Promise.all([this._folderRepositoryManager.resolveIssue(r.remote.owner,r.remote.repositoryName,r.number),r.getIssueTimelineEvents(),this._folderRepositoryManager.getPullRequestRepositoryDefaultBranch(r)]).then(e=>{const[t,i,n]=e;if(!t)throw new Error(`Fail to resolve issue #${r.number} in ${r.remote.owner}/${r.remote.repositoryName}`);this._item=t,this._panel.title=`Pull Request #${r.number.toString()}`,xe.debug("pr.initialize",Qi.ID),this._postMessage({command:"pr.initialize",pullrequest:{number:this._item.number,title:this._item.title,url:this._item.html_url,createdAt:this._item.createdAt,body:this._item.body,bodyHTML:this._item.bodyHTML,labels:this._item.item.labels,author:{login:this._item.author.login,name:this._item.author.name,avatarUrl:this._item.userAvatar,url:this._item.author.url},state:this._item.state,events:i,repositoryDefaultBranch:n,canEdit:!0,status:{statuses:[]},isIssue:!0}})}).catch(e=>{g.window.showErrorMessage(bt(e))})}async update(r,e){return this._folderRepositoryManager=r,this._postMessage({command:"set-scroll",scrollPosition:this._scrollPosition}),this._panel.webview.html=this.getHtmlForWebview(e.number.toString()),this.updateIssue(e)}async _onDidReceiveMessage(r){if(await super._onDidReceiveMessage(r)===this.MESSAGE_UNHANDLED)switch(r.command){case"alert":g.window.showErrorMessage(r.args);return;case"pr.close":return this.close(r);case"pr.comment":return this.createComment(r);case"scroll":this._scrollPosition=r.args;return;case"pr.edit-comment":return this.editComment(r);case"pr.delete-comment":return this.deleteComment(r);case"pr.edit-description":return this.editDescription(r);case"pr.edit-title":return this.editTitle(r);case"pr.refresh":this.refreshPanel();return;case"pr.add-labels":return this.addLabels(r);case"pr.remove-label":return this.removeLabel(r);case"pr.debug":return this.webviewDebug(r);default:return this.MESSAGE_UNHANDLED}}async addLabels(r){try{let e=[];async function t(n,s){return e=(await n.getLabels(s)).filter(v=>!s.item.labels.some(S=>S.name===v.name)),e.map(v=>({label:v.name}))}const i=await g.window.showQuickPick(t(this._folderRepositoryManager,this._item),{canPickMany:!0});if(i&&i.length){await this._item.addLabels(i.map(s=>s.label));const n=i.map(s=>e.find(c=>c.name===s.label));this._item.item.labels=this._item.item.labels.concat(...n),this._replyMessage(r,{added:n})}}catch(e){g.window.showErrorMessage(bt(e))}}async removeLabel(r){try{await this._item.removeLabel(r.args);const e=this._item.item.labels.findIndex(t=>t.name===r.args);this._item.item.labels.splice(e,1),this._replyMessage(r,{})}catch(e){g.window.showErrorMessage(bt(e))}}webviewDebug(r){xe.debug(r.args,Qi.ID)}editDescription(r){this._item.edit({body:r.args.text}).then(e=>{this._replyMessage(r,{body:e.body,bodyHTML:e.bodyHTML})}).catch(e=>{this._throwError(r,e),g.window.showErrorMessage(`Editing description failed: ${bt(e)}`)})}editTitle(r){this._item.edit({title:r.args.text}).then(e=>{this._replyMessage(r,{text:e.title})}).catch(e=>{this._throwError(r,e),g.window.showErrorMessage(`Editing title failed: ${bt(e)}`)})}editCommentPromise(r,e){return this._item.editIssueComment(r,e)}editComment(r){this.editCommentPromise(r.args.comment,r.args.text).then(e=>{this._replyMessage(r,{body:e.body,bodyHTML:e.bodyHTML})}).catch(e=>{this._throwError(r,e),g.window.showErrorMessage(bt(e))})}deleteCommentPromise(r){return this._item.deleteIssueComment(r.id.toString())}deleteComment(r){g.window.showWarningMessage("Are you sure you want to delete this comment?",{modal:!0},"Delete").then(e=>{e==="Delete"&&this.deleteCommentPromise(r.args).then(t=>{this._replyMessage(r,{})}).catch(t=>{this._throwError(r,t),g.window.showErrorMessage(bt(t))})})}close(r){g.commands.executeCommand("pr.close",this._item,r.args).then(e=>{e?this._replyMessage(r,{value:e}):this._throwError(r,"Close cancelled")})}createComment(r){this._item.createIssueComment(r.args).then(e=>{this._replyMessage(r,{value:e})})}set _currentPanel(r){Qi.currentPanel=r}dispose(){for(this._currentPanel=void 0,this._panel.dispose(),this._webview=void 0;this._disposables.length;){const r=this._disposables.pop();r&&r.dispose()}}getHtmlForWebview(r){const e=id(),t=g.Uri.joinPath(this._extensionUri,"dist","webview-pr-description.js");return`<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src vscode-resource: https:; script-src 'nonce-${e}'; style-src vscode-resource: 'unsafe-inline' http: https: data:;">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Pull Request #${r}</title>
</head>
<body class="${q_.platform}">
<div id=app></div>
<script nonce="${e}" src="${this._webview.asWebviewUri(t).toString()}"></script>
</body>
</html>`}getCurrentTitle(){return this._panel.title}};let hl=Qi;hn(hl,"ID","PullRequestOverviewPanel"),hn(hl,"currentPanel"),hn(hl,"_viewType","IssueOverview");var V_=St(64063),$_=St.n(V_),G_=Object.defineProperty,j_=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?G_(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);class hg{constructor(e,t,i,n){this.ref=e,this.label=t,this.sha=i,j_(this,"repositoryCloneUrl"),this.repositoryCloneUrl=new un(n)}}function z_(r){return r.__typename==="CheckRun"}var W_=Object.defineProperty,Nr=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?W_(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);const pl=class{constructor(r,e,t,i=!1){Nr(this,"id"),Nr(this,"graphNodeId"),Nr(this,"number"),Nr(this,"title"),Nr(this,"html_url"),Nr(this,"state",lr.Open),Nr(this,"author"),Nr(this,"assignees"),Nr(this,"createdAt"),Nr(this,"updatedAt"),Nr(this,"milestone"),Nr(this,"githubRepository"),Nr(this,"remote"),Nr(this,"item"),Nr(this,"bodyHTML"),Nr(this,"_onDidInvalidate",new g.EventEmitter),Nr(this,"onDidInvalidate",this._onDidInvalidate.event),this.githubRepository=r,this.remote=e,this.item=t,i||this.update(t)}invalidate(){this._onDidInvalidate.fire()}get isOpen(){return this.state===lr.Open}get isClosed(){return this.state===lr.Closed}get isMerged(){return this.state===lr.Merged}get userAvatar(){if(this.item)return this.item.user.avatarUrl}get userAvatarUri(){if(this.item){const r=this.userAvatar;if(r){const e=g.Uri.parse(`${r}&s=${64}`),t=e.toString;return e.toString=function(i){return t.call(e,!0)},e}}}get body(){return this.item?this.item.body:""}updateState(r){r.toLowerCase()==="open"?this.state=lr.Open:this.state=lr.Closed}update(r){this.id=r.id,this.graphNodeId=r.graphNodeId,this.number=r.number,this.title=r.title,this.bodyHTML=r.bodyHTML,this.html_url=r.url,this.author=r.user,this.milestone=r.milestone,this.createdAt=r.createdAt,this.updatedAt=r.updatedAt,this.updateState(r.state),r.assignees&&(this.assignees=r.assignees),this.item=r}equals(r){return!(!r||this.number!==r.number||this.html_url!==r.html_url)}async edit(r){try{const{mutate:e,schema:t}=await this.githubRepository.ensure(),{data:i}=await e({mutation:t.UpdatePullRequest,variables:{input:{pullRequestId:this.graphNodeId,body:r.body,title:r.title}}});return(i==null?void 0:i.updatePullRequest.pullRequest)&&(this.item.body=i.updatePullRequest.pullRequest.body,this.bodyHTML=i.updatePullRequest.pullRequest.bodyHTML,this.title=i.updatePullRequest.pullRequest.title,this.invalidate()),i.updatePullRequest.pullRequest}catch(e){throw new Error(bt(e))}}canEdit(){const r=this.author&&this.author.login;return this.githubRepository.isCurrentUser(r)}async getIssueComments(){xe.debug(`Fetch issue comments of PR #${this.number} - enter`,pl.ID);const{octokit:r,remote:e}=await this.githubRepository.ensure(),t=await r.issues.listComments({owner:e.owner,repo:e.repositoryName,issue_number:this.number,per_page:100});return xe.debug(`Fetch issue comments of PR #${this.number} - done`,pl.ID),t.data}async createIssueComment(r){const{mutate:e,schema:t}=await this.githubRepository.ensure(),{data:i}=await e({mutation:t.AddIssueComment,variables:{input:{subjectId:this.graphNodeId,body:r}}});return Sg(i.addComment.commentEdge.node)}async editIssueComment(r,e){try{const{mutate:t,schema:i}=await this.githubRepository.ensure(),{data:n}=await t({mutation:i.EditIssueComment,variables:{input:{id:r.graphNodeId,body:e}}});return Sg(n.updateIssueComment.issueComment)}catch(t){throw new Error(bt(t))}}async deleteIssueComment(r){try{const{octokit:e,remote:t}=await this.githubRepository.ensure();await e.issues.deleteComment({owner:t.owner,repo:t.repositoryName,comment_id:Number(r)})}catch(e){throw new Error(bt(e))}}async addLabels(r){const{octokit:e,remote:t}=await this.githubRepository.ensure();await e.issues.addLabels({owner:t.owner,repo:t.repositoryName,issue_number:this.number,labels:r})}async removeLabel(r){const{octokit:e,remote:t}=await this.githubRepository.ensure();await e.issues.removeLabel({owner:t.owner,repo:t.repositoryName,issue_number:this.number,name:r})}async getIssueTimelineEvents(){xe.debug(`Fetch timeline events of issue #${this.number} - enter`,pl.ID);const r=this.githubRepository,{query:e,remote:t,schema:i}=await r.ensure();try{const{data:n}=await e({query:i.IssueTimelineEvents,variables:{owner:t.owner,name:t.repositoryName,number:this.number}}),s=n.repository.pullRequest.timelineItems.nodes;return Tg(s,r)}catch(n){return console.log(n),[]}}};let Pr=pl;Nr(Pr,"ID","IssueModel");var K_=Object.defineProperty,rr=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?K_(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);const Li=class extends Pr{constructor(r,e,t,i,n){super(e,t,i,!0);rr(this,"isDraft"),rr(this,"localBranchName"),rr(this,"mergeBase"),rr(this,"suggestedReviewers"),rr(this,"_hasPendingReview",!1),rr(this,"_onDidChangePendingReviewState",new g.EventEmitter),rr(this,"onDidChangePendingReviewState",this._onDidChangePendingReviewState.event),rr(this,"_reviewThreadsCache",[]),rr(this,"_reviewThreadsCacheInitialized",!1),rr(this,"_onDidChangeReviewThreads",new g.EventEmitter),rr(this,"onDidChangeReviewThreads",this._onDidChangeReviewThreads.event),rr(this,"_fileChangeViewedState",{}),rr(this,"_onDidChangeFileViewedState",new g.EventEmitter),rr(this,"onDidChangeFileViewedState",this._onDidChangeFileViewedState.event),rr(this,"_comments"),rr(this,"_onDidChangeComments",new g.EventEmitter),rr(this,"onDidChangeComments",this._onDidChangeComments.event),rr(this,"isActive"),rr(this,"_telemetry"),rr(this,"isRemoteHeadDeleted"),rr(this,"head"),rr(this,"isRemoteBaseDeleted"),rr(this,"base"),rr(this,"_fileChanges",new Map),this._telemetry=r,this.isActive=!!n,this.update(i)}clear(){this.comments=[],this._reviewThreadsCacheInitialized=!1,this._reviewThreadsCache=[]}async initializeReviewThreadCache(){await this.getReviewThreads(),this._reviewThreadsCacheInitialized=!0}get reviewThreadsCache(){return this._reviewThreadsCache}get reviewThreadsCacheReady(){return this._reviewThreadsCacheInitialized}get isMerged(){return this.state===lr.Merged}get hasPendingReview(){return this._hasPendingReview}set hasPendingReview(r){this._hasPendingReview!==r&&(this._hasPendingReview=r,this._onDidChangePendingReviewState.fire(this._hasPendingReview))}get comments(){var r;return(r=this._comments)!=null?r:[]}set comments(r){this._comments=r,this._onDidChangeComments.fire()}get fileChangeViewedState(){return this._fileChangeViewedState}updateState(r){r.toLowerCase()==="open"?this.state=lr.Open:this.state=this.item.merged?lr.Merged:lr.Closed}update(r){super.update(r),this.isDraft=r.isDraft,this.suggestedReviewers=r.suggestedReviewers,r.isRemoteHeadDeleted!=null&&(this.isRemoteHeadDeleted=r.isRemoteHeadDeleted),r.head&&(this.head=new hg(r.head.ref,r.head.label,r.head.sha,r.head.repo.cloneUrl)),r.isRemoteBaseDeleted!=null&&(this.isRemoteBaseDeleted=r.isRemoteBaseDeleted),r.base&&(this.base=new hg(r.base.ref,r.base.label,r.base.sha,r.base.repo.cloneUrl))}isResolved(){return!!this.head}validatePullRequestModel(r){if(this.head)return!0;const e=`There is no upstream branch for Pull Request #${this.number}. View it on GitHub for more details`;return r?r+=`: ${e}`:r=e,g.window.showWarningMessage(r,"Open on GitHub").then(t=>{t&&t==="Open on GitHub"&&g.commands.executeCommand("vscode.open",g.Uri.parse(this.html_url))}),!1}async approve(r){return(await this.getPendingReviewId()?this.submitReview(fn.Approve,r):this.createReview(fn.Approve,r)).then(t=>(this._telemetry.sendTelemetryEvent("pr.approve"),t))}async requestChanges(r){return(await this.getPendingReviewId()?this.submitReview(fn.RequestChanges,r):this.createReview(fn.RequestChanges,r)).then(t=>(this._telemetry.sendTelemetryEvent("pr.requestChanges"),t))}async close(){const{octokit:r,remote:e}=await this.githubRepository.ensure(),t=await r.pulls.update({owner:e.owner,repo:e.repositoryName,pull_number:this.number,state:"closed"});return this._telemetry.sendTelemetryEvent("pr.close"),ns(t.data,this.githubRepository)}async createReview(r,e){const{octokit:t,remote:i}=await this.githubRepository.ensure(),{data:n}=await t.pulls.createReview({owner:i.owner,repo:i.repositoryName,pull_number:this.number,event:r,body:e});return oS(n,this.githubRepository)}async submitReview(r,e){const t=await this.getPendingReviewId(),{mutate:i,schema:n}=await this.githubRepository.ensure();if(t){const{data:s}=await i({mutation:n.SubmitReview,variables:{id:t,event:r||fn.Comment,body:e}});this.hasPendingReview=!1,await this.updateDraftModeContext();const c=cS(s.submitPullRequestReview.pullRequestReview,this.githubRepository),v=this._reviewThreadsCache.find(S=>S.comments.length?S.comments[0].pullRequestReviewId===c.id:void 0);return v&&(v.comments=c.comments,v.viewerCanResolve=!0,this._onDidChangeReviewThreads.fire({added:[],changed:[v],removed:[]})),c}else throw new Error(`Submitting review failed, no pending review for current pull request: ${this.number}.`)}async updateMilestone(r){const{mutate:e,schema:t}=await this.githubRepository.ensure(),i=r==="null"?null:r;try{await e({mutation:t.UpdatePullRequest,variables:{input:{pullRequestId:this.item.graphNodeId,milestoneId:i}}})}catch(n){xe.appendLine(n)}}async updateAssignees(r){const{octokit:e,remote:t}=await this.githubRepository.ensure();await e.issues.addAssignees({owner:t.owner,repo:t.repositoryName,issue_number:this.number,assignees:r})}async getPendingReviewId(){const{query:r,schema:e}=await this.githubRepository.ensure(),t=await this.githubRepository.getAuthenticatedUser();try{const{data:i}=await r({query:e.GetPendingReviewId,variables:{pullRequestId:this.item.graphNodeId,author:t}});return i.node.reviews.nodes.length>0?i.node.reviews.nodes[0].id:void 0}catch(i){return}}async deleteReview(){const r=await this.getPendingReviewId(),{mutate:e,schema:t}=await this.githubRepository.ensure(),{data:i}=await e({mutation:t.DeleteReview,variables:{input:{pullRequestReviewId:r}}}),{comments:n,databaseId:s}=i.deletePullRequestReview.pullRequestReview;return this.hasPendingReview=!1,await this.updateDraftModeContext(),this.getReviewThreads(),{deletedReviewId:s,deletedReviewComments:n.nodes.map(c=>Ks(c,!1))}}async startReview(r){var e;const{mutate:t,schema:i}=await this.githubRepository.ensure(),{data:n}=await t({mutation:i.StartReview,variables:{input:{body:"",pullRequestId:this.item.graphNodeId,commitOID:r||((e=this.head)==null?void 0:e.sha)}}});if(!n)throw new Error("Failed to start review");return n.addPullRequestReview.pullRequestReview.id}async createReviewThread(r,e,t,i,n){if(!this.validatePullRequestModel("Creating comment failed"))return;const s=await this.getPendingReviewId(),{mutate:c,schema:v}=await this.githubRepository.ensure(),{data:S}=await c({mutation:v.AddReviewThread,variables:{input:{path:e,body:r,pullRequestId:this.graphNodeId,pullRequestReviewId:s,line:t,side:i}}});if(!S)throw new Error("Creating review thread failed.");n||(this.hasPendingReview=!0,await this.updateDraftModeContext());const N=S.addPullRequestReviewThread.thread,U=gl(N);return this._reviewThreadsCache.push(U),this._onDidChangeReviewThreads.fire({added:[U],changed:[],removed:[]}),U}async createCommentReply(r,e,t,i){var n;if(!this.validatePullRequestModel("Creating comment failed"))return;let s=await this.getPendingReviewId();s||(s=await this.startReview(i));const{mutate:c,schema:v}=await this.githubRepository.ensure(),{data:S}=await c({mutation:v.AddComment,variables:{input:{pullRequestReviewId:s,body:r,inReplyTo:e,commitOID:i||((n=this.head)==null?void 0:n.sha)}}});if(!S)throw new Error("Creating comment reply failed.");const{comment:N}=S.addPullRequestReviewComment,U=Ks(N,!1);t&&(U.isDraft=!1);const X=this._reviewThreadsCache.find(ne=>ne.comments.some(ce=>ce.graphNodeId===e));return X&&(X.comments.push(U),this._onDidChangeReviewThreads.fire({added:[],changed:[X],removed:[]})),U}async validateDraftMode(){const r=!!await this.getPendingReviewId();return r!==this.hasPendingReview&&(this.hasPendingReview=r),await this.updateDraftModeContext(),r}async updateDraftModeContext(){this.isActive&&await g.commands.executeCommand("setContext","reviewInDraftMode",this.hasPendingReview)}async editReviewComment(r,e){const{mutate:t,schema:i}=await this.githubRepository.ensure();let n=this._reviewThreadsCache.find(v=>v.comments.some(S=>S.graphNodeId===r.graphNodeId));if(!n)return this.editIssueComment(r,e);const{data:s}=await t({mutation:i.EditComment,variables:{input:{pullRequestReviewCommentId:r.graphNodeId,body:e}}});if(!s)throw new Error("Editing review comment failed.");const c=Ks(s.updatePullRequestReviewComment.pullRequestReviewComment,!!r.isResolved);if(n){const v=n.comments.findIndex(S=>S.graphNodeId===r.graphNodeId);n.comments.splice(v,1,c),this._onDidChangeReviewThreads.fire({added:[],changed:[n],removed:[]})}return c}async deleteReviewComment(r){try{const{octokit:e,remote:t}=await this.githubRepository.ensure(),i=Number(r),n=this._reviewThreadsCache.findIndex(s=>s.comments.some(c=>c.id===i));if(n===-1)this.deleteIssueComment(r);else if(await e.pulls.deleteReviewComment({owner:t.owner,repo:t.repositoryName,comment_id:i}),n>-1){const s=this._reviewThreadsCache[n],c=s.comments.findIndex(v=>v.id===i);s.comments.splice(c,1),s.comments.length===0?(this._reviewThreadsCache.splice(n,1),this._onDidChangeReviewThreads.fire({added:[],changed:[],removed:[s]})):this._onDidChangeReviewThreads.fire({added:[],changed:[s],removed:[]})}}catch(e){throw new Error(bt(e))}}async getReviewRequests(){const r=this.githubRepository,{remote:e,octokit:t}=await r.ensure();return(await t.pulls.listRequestedReviewers({owner:e.owner,repo:e.repositoryName,pull_number:this.number})).data.users.map(n=>On(n,r))}async requestReview(r){const{octokit:e,remote:t}=await this.githubRepository.ensure();await e.pulls.requestReviewers({owner:t.owner,repo:t.repositoryName,pull_number:this.number,reviewers:r})}async deleteReviewRequest(r){const{octokit:e,remote:t}=await this.githubRepository.ensure();await e.pulls.removeRequestedReviewers({owner:t.owner,repo:t.repositoryName,pull_number:this.number,reviewers:[r]})}async deleteAssignees(r){const{octokit:e,remote:t}=await this.githubRepository.ensure();await e.issues.removeAssignees({owner:t.owner,repo:t.repositoryName,issue_number:this.number,assignees:[r]})}diffThreads(r){const e=[],t=[],i=[];r.forEach(n=>{const s=this._reviewThreadsCache.find(c=>c.id===n.id);s?$_()(n,s)||t.push(n):e.push(n)}),this._reviewThreadsCache.forEach(n=>{r.find(s=>s.id===n.id)||i.push(n)}),this._onDidChangeReviewThreads.fire({added:e,changed:t,removed:i})}async getReviewThreads(){const{remote:r,query:e,schema:t}=await this.githubRepository.ensure();try{const{data:i}=await e({query:t.PullRequestComments,variables:{owner:r.owner,name:r.repositoryName,number:this.number}}),n=i.repository.pullRequest.reviewThreads.nodes.map(s=>gl(s));return this.diffThreads(n),this._reviewThreadsCache=n,n}catch(i){return xe.appendLine(`Failed to get pull request review comments: ${i}`),[]}}async initializeReviewComments(){const{remote:r,query:e,schema:t}=await this.githubRepository.ensure();try{const{data:i}=await e({query:t.PullRequestComments,variables:{owner:r.owner,name:r.repositoryName,number:this.number}}),n=i.repository.pullRequest.reviewThreads.nodes.map(s=>s.comments.nodes.map(c=>Ks(c,s.isResolved),r)).reduce((s,c)=>s.concat(c),[]).sort((s,c)=>s.createdAt>c.createdAt?1:-1);this.comments=n}catch(i){xe.appendLine(`Failed to get pull request review comments: ${i}`)}}async getCommits(){try{xe.debug(`Fetch commits of PR #${this.number} - enter`,Li.ID);const{remote:r,octokit:e}=await this.githubRepository.ensure(),t=await e.pulls.listCommits({pull_number:this.number,owner:r.owner,repo:r.repositoryName});return xe.debug(`Fetch commits of PR #${this.number} - done`,Li.ID),t.data}catch(r){return g.window.showErrorMessage(`Fetching commits failed: ${bt(r)}`),[]}}async getCommitChangedFiles(r){var e,t;try{xe.debug(`Fetch file changes of commit ${r.sha} in PR #${this.number} - enter`,Li.ID);const{octokit:i,remote:n}=await this.githubRepository.ensure(),s=await i.repos.getCommit({owner:n.owner,repo:n.repositoryName,ref:r.sha});return xe.debug(`Fetch file changes of commit ${r.sha} in PR #${this.number} - done`,Li.ID),(t=(e=s.data.files)==null?void 0:e.filter(c=>!!c.patch))!=null?t:[]}catch(i){return g.window.showErrorMessage(`Fetching commit file changes failed: ${bt(i)}`),[]}}async getFile(r,e){var t;const{octokit:i,remote:n}=await this.githubRepository.ensure(),s=await i.repos.getContent({owner:n.owner,repo:n.repositoryName,path:r,ref:e});if(Array.isArray(s.data))throw new Error(`Unexpected array response when getting file ${r}`);const c=(t=s.data.content)!=null?t:"";return Pp.Buffer.from(c,s.data.encoding).toString()}async getTimelineEvents(){xe.debug(`Fetch timeline events of PR #${this.number} - enter`,Li.ID);const{query:r,remote:e,schema:t}=await this.githubRepository.ensure();try{const{data:i}=await r({query:t.TimelineEvents,variables:{owner:e.owner,name:e.repositoryName,number:this.number}}),n=i.repository.pullRequest.timelineItems.nodes,s=Tg(n,this.githubRepository);return await this.addReviewTimelineEventComments(s),s}catch(i){return console.log(i),[]}}async addReviewTimelineEventComments(r){const e=r.filter(td),i=(await this.getReviewThreads()).reduce((N,U)=>N.concat(U.comments),[]),n=e.reduce((N,U)=>(N[U.id]=U,U.comments=[],N),{}),s=i.reduce((N,U)=>(N[U.id]=U,N),{}),c=[];let v=i.length;for(;v-- >0;){const N=i[v];if(!N.inReplyToId){c.unshift(N);continue}const U=s[N.inReplyToId];U.childComments=U.childComments||[],U.childComments=[N,...N.childComments||[],...U.childComments]}c.forEach(N=>{const U=n[N.pullRequestReviewId];U&&(U.comments=U.comments.concat(N).concat(N.childComments||[]))});const S=e.filter(N=>N.state.toLowerCase()==="pending")[0];S&&(S.comments=i.filter(N=>N.isDraft))}async getStatusChecks(){var r;const{query:e,remote:t,schema:i}=await this.githubRepository.ensure();let n;try{n=await e({query:i.GetChecks,variables:{owner:t.owner,name:t.repositoryName,number:this.number}})}catch(c){if((r=c.message)==null?void 0:r.startsWith("GraphQL error: Resource protected by organization SAML enforcement."))return{state:"pending",statuses:[]}}const s=n.data.repository.pullRequest.commits.nodes[0].commit.statusCheckRollup;return s?{state:s.state.toLowerCase(),statuses:s.contexts.nodes.map(c=>{var v,S,N,U;return z_(c)?{id:c.id,url:(v=c.checkSuite.app)==null?void 0:v.url,avatar_url:(S=c.checkSuite.app)==null?void 0:S.logoUrl,state:((N=c.conclusion)==null?void 0:N.toLowerCase())||"pending",description:c.title,context:c.name,target_url:c.detailsUrl}:{id:c.id,url:c.targetUrl,avatar_url:c.avatarUrl,state:(U=c.state)==null?void 0:U.toLowerCase(),description:c.description,context:c.context,target_url:c.targetUrl}})}:{state:"pending",statuses:[]}}static async openDiffFromComment(r,e,t){const n=(await e.getFileChangesInfo(r.repository)).find(S=>S.fileName===t.path||S.previousFileName===t.path);if(!n)throw new Error("Can't find matching file");let s,c;if(e.equals(r.activePullRequest)){const S=g.Uri.file(qt.resolve(r.repository.rootUri.fsPath,n.fileName));s=n.status===yt.DELETE?Ri(S,void 0,void 0,"",!1,{base:!1},r.repository.rootUri):S;const N=e.mergeBase||e.base.sha;c=Ri(S,n.status===yt.RENAME?n.previousFileName:n.fileName,void 0,n.status===yt.ADD?"":N,!1,{base:!0},r.repository.rootUri)}else{const S=e.head.sha,N=n.status===yt.RENAME?n.previousFileName:n.fileName;s=sa(g.Uri.file(aa(r.repository.rootUri,n.fileName)),e,n.baseCommit,S,n.fileName,!1,n.status),c=sa(g.Uri.file(aa(r.repository.rootUri,N)),e,n.baseCommit,S,n.fileName,!0,n.status)}const v=t.path.split("/");g.commands.executeCommand("vscode.diff",c,s,`${v[v.length-1]} (Pull Request)`,{})}get fileChanges(){return this._fileChanges}async getFileChangesInfo(r){this._fileChanges.clear();const e=await this.getRawFileChangesInfo(),t=this.mergeBase||this.base.sha,i=await by(e,r,t);return i.forEach(n=>{this._fileChanges.set(n.fileName,n)}),i}async getRawFileChangesInfo(){xe.debug(`Fetch file changes, base, head and merge base of PR #${this.number} - enter`,Li.ID);const r=this.githubRepository,{octokit:e,remote:t}=await r.ensure();if(!this.base){const c=await e.pulls.get({owner:t.owner,repo:t.repositoryName,pull_number:this.number});this.update(ns(c.data,r))}if(this.item.merged){const c=await e.pulls.listFiles({repo:t.repositoryName,owner:t.owner,pull_number:this.number});return this.mergeBase=this.base.sha,c.data}const{data:i}=await e.repos.compareCommits({repo:t.repositoryName,owner:t.owner,base:`${this.base.repositoryCloneUrl.owner}:${this.base.ref}`,head:`${this.head.repositoryCloneUrl.owner}:${this.head.ref}`});this.mergeBase=i.merge_base_commit.sha;const n=300;let s=[];return i.files.length>=n?(xe.debug(`More than ${n} files changed, fetching all file changes of PR #${this.number}`,Li.ID),s=await e.paginate("GET /repos/:owner/:repo/pulls/:pull_number/files",{owner:this.base.repositoryCloneUrl.owner,pull_number:this.number,repo:t.repositoryName,per_page:100})):s=i.files,xe.debug(`Fetch file changes and merge base of PR #${this.number} - done, total files ${s.length} `,Li.ID),s}async getMergeability(){try{xe.debug(`Fetch pull request mergeability ${this.number} - enter`,Li.ID);const{query:r,remote:e,schema:t}=await this.githubRepository.ensure(),{data:i}=await r({query:t.PullRequestMergeability,variables:{owner:e.owner,name:e.repositoryName,number:this.number}});return xe.debug(`Fetch pull request mergeability ${this.number} - done`,Li.ID),ad(i.repository.pullRequest.mergeable)}catch(r){return xe.appendLine(`PullRequestModel> Unable to fetch PR Mergeability: ${r}`),Fn.Unknown}}async setReadyForReview(){try{const{mutate:r,schema:e}=await this.githubRepository.ensure(),{data:t}=await r({mutation:e.ReadyForReview,variables:{input:{pullRequestId:this.graphNodeId}}});return this._telemetry.sendTelemetryEvent("pr.readyForReview.success"),t.markPullRequestReadyForReview.pullRequest.isDraft}catch(r){throw this._telemetry.sendTelemetryErrorEvent("pr.readyForReview.failure"),r}}updateCommentReactions(r,e){const t=this._reviewThreadsCache.find(i=>i.comments.some(n=>n.graphNodeId===r));if(t){const i=t.comments.find(n=>n.graphNodeId===r);i&&(i.reactions=kg(e),this._onDidChangeReviewThreads.fire({added:[],changed:[t],removed:[]}))}}async addCommentReaction(r,e){const t=bl().reduce((v,S)=>(v[S.label]=S.title,v),{}),{mutate:i,schema:n}=await this.githubRepository.ensure(),{data:s}=await i({mutation:n.AddReaction,variables:{input:{subjectId:r,content:t[e.label]}}});if(!s)throw new Error("Add comment reaction failed.");const c=s.addReaction.subject.reactionGroups;return this.updateCommentReactions(r,c),s}async deleteCommentReaction(r,e){const t=bl().reduce((v,S)=>(v[S.label]=S.title,v),{}),{mutate:i,schema:n}=await this.githubRepository.ensure(),{data:s}=await i({mutation:n.DeleteReaction,variables:{input:{subjectId:r,content:t[e.label]}}});if(!s)throw new Error("Delete comment reaction failed.");const c=s.removeReaction.subject.reactionGroups;return this.updateCommentReactions(r,c),s}async resolveReviewThread(r){const{mutate:e,schema:t}=await this.githubRepository.ensure(),{data:i}=await e({mutation:t.ResolveReviewThread,variables:{input:{threadId:r}}});if(!i)throw new Error("Resolve review thread failed.");const n=this._reviewThreadsCache.findIndex(s=>s.id===r);if(n>-1){const s=gl(i.resolveReviewThread.thread);this._reviewThreadsCache.splice(n,1,s),this._onDidChangeReviewThreads.fire({added:[],changed:[s],removed:[]})}}async unresolveReviewThread(r){const{mutate:e,schema:t}=await this.githubRepository.ensure(),{data:i}=await e({mutation:t.UnresolveReviewThread,variables:{input:{threadId:r}}});if(!i)throw new Error("Unresolve review thread failed.");const n=this._reviewThreadsCache.findIndex(s=>s.id===r);if(n>-1){const s=gl(i.unresolveReviewThread.thread);this._reviewThreadsCache.splice(n,1,s),this._onDidChangeReviewThreads.fire({added:[],changed:[s],removed:[]})}}async initializePullRequestFileViewState(){const{query:r,schema:e,remote:t}=await this.githubRepository.ensure(),i=[];let n=null,s=!1;do{const{data:c}=await r({query:e.PullRequestFiles,variables:{owner:t.owner,name:t.repositoryName,number:this.number,after:n}});c.repository.pullRequest.files.nodes.forEach(v=>{this._fileChangeViewedState[v.path]!==v.viewerViewedState&&i.push({fileName:v.path,viewed:v.viewerViewedState}),this._fileChangeViewedState[v.path]=v.viewerViewedState}),s=c.repository.pullRequest.files.pageInfo.hasNextPage,n=c.repository.pullRequest.files.pageInfo.endCursor}while(s);i.length&&this._onDidChangeFileViewedState.fire({changed:i})}async markFileAsViewed(r){const{mutate:e,schema:t}=await this.githubRepository.ensure();await e({mutation:t.MarkFileAsViewed,variables:{input:{path:r,pullRequestId:this.graphNodeId}}}),this._fileChangeViewedState[r]=Hr.VIEWED,this._onDidChangeFileViewedState.fire({changed:[{fileName:r,viewed:Hr.VIEWED}]})}async unmarkFileAsViewed(r){const{mutate:e,schema:t}=await this.githubRepository.ensure();await e({mutation:t.UnmarkFileAsViewed,variables:{input:{path:r,pullRequestId:this.graphNodeId}}}),this._fileChangeViewedState[r]=Hr.UNVIEWED,this._onDidChangeFileViewedState.fire({changed:[{fileName:r,viewed:Hr.UNVIEWED}]})}};let pn=Li;rr(pn,"ID","PullRequestModel");var Q_=Object.defineProperty,Gs=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?Q_(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);function Y_(r){return!!r.id&&!!r.milestone}const Yi=class extends hl{constructor(r,e,t,i){super(r,e,t,i,Yi._viewType);Gs(this,"_repositoryDefaultBranch"),Gs(this,"_existingReviewers",[]),Gs(this,"_changeActivePullRequestListener"),this.registerFolderRepositoryListener(),Dv(n=>{n&&this._item.update(n),this._postMessage({command:"update-state",state:this._item.state})},null,this._disposables),this._disposables.push(i.onDidMergePullRequest(n=>{this._postMessage({command:"update-state",state:lr.Merged})}))}static async createOrShow(r,e,t,i=!1){const n=i?g.ViewColumn.Beside:g.window.activeTextEditor?g.window.activeTextEditor.viewColumn:g.ViewColumn.One;if(Yi.currentPanel)Yi.currentPanel._panel.reveal(n,!0);else{const s=`Pull Request #${t.number.toString()}`;Yi.currentPanel=new Yi(r,n||g.ViewColumn.Active,s,e)}await Yi.currentPanel.update(e,t)}set _currentPanel(r){Yi.currentPanel=r}static refresh(){this.currentPanel&&this.currentPanel.refreshPanel()}static scrollToReview(){this.currentPanel&&this.currentPanel._postMessage({command:"pr.scrollToPendingReview"})}registerFolderRepositoryListener(){this._changeActivePullRequestListener=this._folderRepositoryManager.onDidChangeActivePullRequest(r=>{if(this._folderRepositoryManager&&this._item){const e=this._item.equals(this._folderRepositoryManager.activePullRequest);this._postMessage({command:"pr.update-checkout-status",isCurrentlyCheckedOut:e})}})}getCurrentUserReviewState(r,e){const t=r.find(i=>i.reviewer.login===e.login);return t==null?void 0:t.state}async updatePullRequest(r){return Promise.all([this._folderRepositoryManager.resolvePullRequest(r.remote.owner,r.remote.repositoryName,r.number),r.getTimelineEvents(),this._folderRepositoryManager.getPullRequestRepositoryDefaultBranch(r),r.getStatusChecks(),r.getReviewRequests(),this._folderRepositoryManager.getPullRequestRepositoryAccessAndMergeMethods(r),this._folderRepositoryManager.getBranchNameForPullRequest(r)]).then(e=>{var t,i;const[n,s,c,v,S,N,U]=e;if(!n)throw new Error(`Fail to resolve Pull Request #${r.number} in ${r.remote.owner}/${r.remote.repositoryName}`);this._item=n,this._repositoryDefaultBranch=c,this._panel.title=`Pull Request #${r.number.toString()}`;const X=r.equals(this._folderRepositoryManager.activePullRequest),ne=N.hasWritePermission,ce=N.mergeMethodsAvailability,be=ne||this._item.canEdit(),ye=g.workspace.getConfiguration("githubPullRequests").get("defaultMergeMethod"),ge=pg(ce,ye);this._existingReviewers=Cg(S,s,n.author);const ve=this._folderRepositoryManager.getCurrentUser(this._item),Ce=n.base&&n.head&&!n.base.repositoryCloneUrl.equals(n.head.repositoryCloneUrl)&&ud(),Pe=this.getCurrentUserReviewState(this._existingReviewers,ve);xe.debug("pr.initialize",Yi.ID),this._postMessage({command:"pr.initialize",pullrequest:{number:n.number,title:n.title,url:n.html_url,createdAt:n.createdAt,body:n.body,bodyHTML:n.bodyHTML,labels:n.item.labels,author:{login:n.author.login,name:n.author.name,avatarUrl:n.userAvatar,url:n.author.url},state:n.state,events:s,isCurrentlyCheckedOut:X,isRemoteBaseDeleted:n.isRemoteBaseDeleted,base:n.base.label,isRemoteHeadDeleted:n.isRemoteHeadDeleted,isLocalHeadDeleted:!U,head:(i=(t=n.head)==null?void 0:t.label)!=null?i:"",repositoryDefaultBranch:c,canEdit:be,hasWritePermission:ne,status:v||{statuses:[]},mergeable:n.item.mergeable,reviewers:this._existingReviewers,isDraft:n.isDraft,mergeMethodsAvailability:ce,defaultMergeMethod:ge,isIssue:!1,milestone:n.milestone,assignees:n.assignees,continueOnGitHub:Ce,isAuthor:ve.login===n.author.login,currentUserReviewState:Pe}})}).catch(e=>{g.window.showErrorMessage(bt(e))})}async update(r,e){return this._folderRepositoryManager!==r&&(this._folderRepositoryManager=r,this._changeActivePullRequestListener&&(this._changeActivePullRequestListener.dispose(),this._changeActivePullRequestListener=void 0,this.registerFolderRepositoryListener())),this._postMessage({command:"set-scroll",scrollPosition:this._scrollPosition}),this._panel.webview.html=this.getHtmlForWebview(e.number.toString()),this.updatePullRequest(e)}async _onDidReceiveMessage(r){if(await super._onDidReceiveMessage(r)===this.MESSAGE_UNHANDLED)switch(r.command){case"pr.checkout":return this.checkoutPullRequest(r);case"pr.merge":return this.mergePullRequest(r);case"pr.deleteBranch":return this.deleteBranch(r);case"pr.readyForReview":return this.setReadyForReview(r);case"pr.approve":return this.approvePullRequest(r);case"pr.request-changes":return this.requestChanges(r);case"pr.submit":return this.submitReview(r);case"pr.checkout-default-branch":return this.checkoutDefaultBranch(r);case"pr.apply-patch":return this.applyPatch(r);case"pr.open-diff":return this.openDiff(r);case"pr.checkMergeability":return this._replyMessage(r,await this._item.getMergeability());case"pr.add-reviewers":return this.addReviewers(r);case"pr.remove-milestone":return this.removeMilestone(r);case"pr.add-milestone":return this.addMilestone(r);case"pr.add-assignees":return this.addAssignees(r);case"pr.remove-reviewer":return this.removeReviewer(r);case"pr.remove-assignee":return this.removeAssignee(r);case"pr.copy-prlink":return this.copyPrLink();case"pr.openOnGitHub":return Xa(this._item,this._item._telemetry)}}async getReviewersQuickPickItems(r){var e;if(!r)return[];const i=(e=(await this._folderRepositoryManager.getAssignableUsers())[this._item.remote.remoteName])!=null?e:[],n=new Set([this._item.author.login,...this._existingReviewers.map(c=>c.reviewer.login)]),s=[];for(const c of r){const{login:v,name:S,isAuthor:N,isCommenter:U}=c;if(n.has(v))continue;const X=N&&U?"Recently edited and reviewed changes to these files":N?"Recently edited these files":U?"Recently reviewed changes to these files":"Suggested reviewer";s.push({label:v,description:S,detail:X,reviewer:c}),n.add(v)}for(const c of i)n.has(c.login)||s.push({label:c.login,description:c.name,reviewer:c});return s.length===0&&s.push({label:"No reviewers available for this repository"}),s}getAssigneesQuickPickItems(r,e){var t,i;if(!e)return[];r=r!=null?r:[];const n=new Set([...(i=(t=this._item.assignees)==null?void 0:t.map(c=>c.login))!=null?i:[]]),s=[];for(const c of e){const{login:v,name:S,isAuthor:N,isCommenter:U}=c;if(n.has(v))continue;const X=N&&U?"Recently edited and reviewed changes to these files":N?"Recently edited these files":U?"Recently reviewed changes to these files":"Suggested reviewer";s.push({label:v,description:S,detail:X,assignee:c}),n.add(v)}for(const c of r)n.has(c.login)||s.push({label:c.login,description:c.name,assignee:c});return s.length===0&&s.push({label:"No assignees available for this repository"}),s}async addReviewers(r){var e;try{const t=(e=await g.window.showQuickPick(this.getReviewersQuickPickItems(this._item.suggestedReviewers),{canPickMany:!0,matchOnDescription:!0}))==null?void 0:e.filter(i=>i.reviewer);if(t){await this._item.requestReview(t.map(n=>n.label));const i=t.map(n=>({reviewer:n.reviewer,state:"REQUESTED"}));this._existingReviewers=this._existingReviewers.concat(i),this._replyMessage(r,{added:i})}}catch(t){g.window.showErrorMessage(bt(t))}}async addMilestone(r){try{async function e(i){const n=await i.getMilestones();return n.items.length?n.items.map(s=>({label:s.milestone.title,id:s.milestone.id,milestone:s.milestone})):[{label:"No milestones created for this repository."}]}const t=await g.window.showQuickPick(e(this._folderRepositoryManager),{canPickMany:!1});t&&Y_(t)&&(await this._item.updateMilestone(t.id),this._replyMessage(r,{added:t.milestone}))}catch(e){g.window.showErrorMessage(bt(e))}}async removeMilestone(r){try{await this._item.updateMilestone("null"),this._replyMessage(r,{})}catch(e){g.window.showErrorMessage(bt(e))}}async addAssignees(r){var e,t;try{const n=(await this._folderRepositoryManager.getAssignableUsers())[this._item.remote.remoteName],s=(e=await g.window.showQuickPick(this.getAssigneesQuickPickItems(n,[]),{canPickMany:!0,matchOnDescription:!0}))==null?void 0:e.filter(c=>c.assignee);if(s){const c=s.map(v=>v.assignee);this._item.assignees=(t=this._item.assignees)==null?void 0:t.concat(c),await this._item.updateAssignees(c.map(v=>v.login)),this._replyMessage(r,{added:c})}}catch(i){g.window.showErrorMessage(bt(i))}}async removeReviewer(r){try{await this._item.deleteReviewRequest(r.args);const e=this._existingReviewers.findIndex(t=>t.reviewer.login===r.args);this._existingReviewers.splice(e,1),this._replyMessage(r,{})}catch(e){g.window.showErrorMessage(bt(e))}}async removeAssignee(r){var e,t,i;try{await this._item.deleteAssignees(r.args);const n=(t=(e=this._item.assignees)==null?void 0:e.findIndex(s=>s.login===r.args))!=null?t:-1;(i=this._item.assignees)==null||i.splice(n,1),this._replyMessage(r,{})}catch(n){g.window.showErrorMessage(bt(n))}}async applyPatch(r){try{const e=r.args.comment,i=/```diff\n([\s\S]*)\n```/g.exec(e.body),n=qt.join(this._folderRepositoryManager.repository.rootUri.path,".git",`${e.id}.diff`),s=new TextEncoder,c=g.Uri.parse(n);await g.workspace.fs.writeFile(c,s.encode(i[1])),await this._folderRepositoryManager.repository.apply(n,!0),await g.workspace.fs.delete(c)}catch(e){xe.appendLine(`Applying patch failed: ${e}`),g.window.showErrorMessage(`Applying patch failed: ${bt(e)}`)}}async openDiff(r){try{const e=r.args.comment;return pn.openDiffFromComment(this._folderRepositoryManager,this._item,e)}catch(e){xe.appendLine(`Open diff view failed: ${bt(e)}`,Yi.ID)}}checkoutPullRequest(r){g.commands.executeCommand("pr.pick",this._item).then(()=>{const e=this._item.equals(this._folderRepositoryManager.activePullRequest);this._replyMessage(r,{isCurrentlyCheckedOut:e})},()=>{const e=this._item.equals(this._folderRepositoryManager.activePullRequest);this._replyMessage(r,{isCurrentlyCheckedOut:e})})}mergePullRequest(r){const{title:e,description:t,method:i}=r.args;this._folderRepositoryManager.mergePullRequest(this._item,e,t,i).then(n=>{g.commands.executeCommand("pr.refreshList"),n.merged||g.window.showErrorMessage(`Merging PR failed: ${n.message}`),this._replyMessage(r,{state:n.merged?lr.Merged:lr.Open})}).catch(n=>{g.window.showErrorMessage(`Unable to merge pull request. ${bt(n)}`),this._throwError(r,{})})}async deleteBranch(r){const e=await this._folderRepositoryManager.getBranchNameForPullRequest(this._item),t=[];if(this._item.isResolved()){const s=this._item.head.ref;!(this._repositoryDefaultBranch===this._item.head.ref)&&!this._item.isRemoteHeadDeleted&&t.push({label:`Delete remote branch ${this._item.remote.remoteName}/${s}`,description:`${this._item.remote.normalizedHost}/${this._item.remote.owner}/${this._item.remote.repositoryName}`,type:"upstream",picked:!0})}if(e){const s=g.workspace.getConfiguration("githubPullRequests").get("defaultDeletionMethod.selectLocalBranch");t.push({label:`Delete local branch ${e.branch}`,type:"local",picked:!!s});const c=g.workspace.getConfiguration("githubPullRequests").get("defaultDeletionMethod.selectRemote");e.remote&&e.createdForPullRequest&&!e.remoteInUse&&t.push({label:`Delete remote ${e.remote}, which is no longer used by any other branch`,type:"remote",picked:!!c})}if(g.env.remoteName==="codespaces"&&t.push({label:"Suspend Codespace",type:"suspend"}),!t.length){g.window.showWarningMessage(`There is no longer an upstream or local branch for Pull Request #${this._item.number}`),this._replyMessage(r,{cancelled:!0});return}const i=await g.window.showQuickPick(t,{canPickMany:!0,ignoreFocusOut:!0}),n=[];if(i){const s=this._item.equals(this._folderRepositoryManager.activePullRequest),c=i.map(async v=>{switch(v.type){case"upstream":return await this._folderRepositoryManager.deleteBranch(this._item),n.push(v.type),this._folderRepositoryManager.repository.fetch({prune:!0});case"local":if(s){if(this._folderRepositoryManager.repository.state.workingTreeChanges.length)if(await g.window.showWarningMessage("Your local changes will be lost, do you want to continue?",{modal:!0},"Yes")==="Yes")await g.commands.executeCommand("git.cleanAll");else return;await this._folderRepositoryManager.repository.checkout(this._repositoryDefaultBranch)}return await this._folderRepositoryManager.repository.deleteBranch(e.branch,!0),n.push(v.type);case"remote":return n.push(v.type),this._folderRepositoryManager.repository.removeRemote(e.remote);case"suspend":return n.push(v.type),g.commands.executeCommand("github.codespaces.disconnectSuspend")}});await Promise.all(c),this.refreshPanel(),g.commands.executeCommand("pr.refreshList"),this._postMessage({command:"pr.deleteBranch",branchTypes:n})}else this._replyMessage(r,{cancelled:!0})}setReadyForReview(r){this._item.setReadyForReview().then(e=>{g.commands.executeCommand("pr.refreshList"),this._replyMessage(r,{isDraft:e})}).catch(e=>{g.window.showErrorMessage(`Unable to set PR ready for review. ${bt(e)}`),this._throwError(r,{})})}async checkoutDefaultBranch(r){try{await this._folderRepositoryManager.checkoutDefaultBranch(r.args)}finally{this._replyMessage(r,{})}}updateReviewers(r){if(r){const e=this._existingReviewers.find(t=>r.user.login===t.reviewer.login);e?e.state=r.state:this._existingReviewers.push({reviewer:r.user,state:r.state})}}approvePullRequest(r){this._item.approve(r.args).then(e=>{this.updateReviewers(e),this._replyMessage(r,{review:e,reviewers:this._existingReviewers}),g.commands.executeCommand("pr.refreshList")},e=>{g.window.showErrorMessage(`Approving pull request failed. ${bt(e)}`),this._throwError(r,`${bt(e)}`)})}requestChanges(r){this._item.requestChanges(r.args).then(e=>{this.updateReviewers(e),this._replyMessage(r,{review:e,reviewers:this._existingReviewers})},e=>{g.window.showErrorMessage(`Requesting changes failed. ${bt(e)}`),this._throwError(r,`${bt(e)}`)})}submitReview(r){this._item.submitReview(fn.Comment,r.args).then(e=>{this.updateReviewers(e),this._replyMessage(r,{review:e,reviewers:this._existingReviewers})},e=>{g.window.showErrorMessage(`Submitting review failed. ${bt(e)}`),this._throwError(r,`${bt(e)}`)})}async copyPrLink(){await g.env.clipboard.writeText(this._item.html_url),g.window.showInformationMessage(`Copied link to PR ${this._item.title}!`)}editCommentPromise(r,e){return this._item.editReviewComment(r,e)}deleteCommentPromise(r){return this._item.deleteReviewComment(r.id.toString())}dispose(){super.dispose(),this._changeActivePullRequestListener&&this._changeActivePullRequestListener.dispose()}};let Si=Yi;Gs(Si,"ID","PullRequestOverviewPanel"),Gs(Si,"currentPanel"),Gs(Si,"_viewType","PullRequestOverview");function pg(r,e){return e&&r.hasOwnProperty(e)&&r[e]?e:["merge","squash","rebase"].find(i=>r[i])}var J_=Object.defineProperty,js=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?J_(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);class Z_{constructor(e,t,i,n){if(this.pullRequestModel=e,this._folderReposManager=t,this._commentController=i,this._sessionState=n,js(this,"_pendingCommentThreadAdds",[]),js(this,"_commentHandlerId"),js(this,"_commentThreadCache",{}),js(this,"_openPREditors",[]),js(this,"_closedEditorCachedThreads",new Set),js(this,"_disposables",[]),this._commentHandlerId=cg(),Mp(this._commentHandlerId,this),this.pullRequestModel.reviewThreadsCacheReady)this.initializeThreadsInOpenEditors(),this.registerListeners();else{const s=this.pullRequestModel.onDidChangeReviewThreads(()=>{s.dispose(),this.initializeThreadsInOpenEditors(),this.registerListeners()})}}registerListeners(){this._disposables.push(this.pullRequestModel.onDidChangeReviewThreads(e=>this.onDidChangeReviewThreads(e))),this._disposables.push(g.window.onDidChangeVisibleTextEditors(async e=>{this.onDidChangeOpenEditors(e)})),this._disposables.push(this.pullRequestModel.onDidChangePendingReviewState(e=>{for(const t in this._commentThreadCache)this._commentThreadCache[t].forEach(i=>{yg(i,e)})})),this._disposables.push(g.window.onDidChangeActiveTextEditor(e=>{this.refreshContextKey(e)})),this._disposables.push(this._sessionState.onDidChangeCommentsExpandState(e=>{for(const t of this.pullRequestModel.reviewThreadsCache){const i=this.getCommentThreadCacheKey(t.path,t.diffSide===or.LEFT),n=this._commentThreadCache[i];if(!n){xe.appendLine(`PullRequestCommentController> Thread with ID ${i} is no longer in cache`);continue}const s=n.findIndex(c=>c.gitHubThreadId===t.id);if(s>-1){const c=n[s];Ga(c,t,e)}}}))}refreshContextKey(e){if(!e)return;const t=e.document.uri;if(t.scheme!=="pr")return;const i=ti(t);!i||i.prNumber!==this.pullRequestModel.number||this.setContextKey(this.pullRequestModel.hasPendingReview)}getPREditors(e){return e.filter(t=>{if(t.document.uri.scheme!=="pr")return!1;const i=ti(t.document.uri);return!(!i||i.prNumber!==this.pullRequestModel.number)})}getCommentThreadCacheKey(e,t){return`${e}-${t?"original":"modified"}`}tryUsedCachedEditor(e){const t=[];return e.forEach(i=>{const{fileName:n,isBase:s}=ti(i.document.uri),c=this.getCommentThreadCacheKey(n,s);this._closedEditorCachedThreads.has(c)?(this._closedEditorCachedThreads.delete(c),this._closedEditorCachedThreads.add(c)):t.push(i)}),t}addThreadsForEditors(e){const t=this.tryUsedCachedEditor(e),i=this.pullRequestModel.reviewThreadsCache,n=Zn(i,s=>s.path);t.forEach(s=>{const{fileName:c,isBase:v}=ti(s.document.uri);n[c]&&(this._commentThreadCache[this.getCommentThreadCacheKey(c,v)]=n[c].filter(S=>(S.diffSide===or.LEFT&&v||S.diffSide===or.RIGHT&&!v)&&S.line!==null).map(S=>{const N=new g.Range(new g.Position(S.line-1,0),new g.Position(S.line-1,0));return $a(s.document.uri,N,S,this._commentController)}))})}initializeThreadsInOpenEditors(){const e=this.getPREditors(g.window.visibleTextEditors);this._openPREditors=e,this.addThreadsForEditors(e)}cleanCachedEditors(){if(this._closedEditorCachedThreads.size>8){const e=Array.from(this._closedEditorCachedThreads.keys());for(let t=0;t<this._closedEditorCachedThreads.size-4;t++){const i=e[t];this.cleanCachedEditor(i),this._closedEditorCachedThreads.delete(i)}}}cleanCachedEditor(e){(this._commentThreadCache[e]||[]).forEach(i=>i.dispose()),delete this._commentThreadCache[e]}addCachedEditors(e){e.forEach(t=>{const{fileName:i,isBase:n}=ti(t.document.uri),s=this.getCommentThreadCacheKey(i,n);this._closedEditorCachedThreads.has(s)&&this._closedEditorCachedThreads.delete(s),this._closedEditorCachedThreads.add(s)})}onDidChangeOpenEditors(e){const t=this.getPREditors(e),i=this._openPREditors.filter(s=>!t.includes(s));this.addCachedEditors(i),this.cleanCachedEditors();const n=t.filter(s=>!this._openPREditors.includes(s));this._openPREditors=t,n.length&&this.addThreadsForEditors(n)}onDidChangeReviewThreads(e){e.added.forEach(t=>{const i=t.path,n=this._pendingCommentThreadAdds.findIndex(v=>{const S=this.gitRelativeRootPath(v.uri.path)===t.path,N=v.range.start.line+1===t.line;return S&&N});let s;if(n>-1)s=this._pendingCommentThreadAdds[n],s.gitHubThreadId=t.id,s.comments=t.comments.map(v=>new kr(v,s)),this._pendingCommentThreadAdds.splice(n,1);else{const S=this.getPREditors(g.window.visibleTextEditors).find(N=>{const U=ti(N.document.uri),X=t.diffSide===or.RIGHT&&!(U==null?void 0:U.isBase)||t.diffSide===or.LEFT&&(U==null?void 0:U.isBase);return(U==null?void 0:U.fileName)===i&&X});if(S){const N=new g.Range(new g.Position(t.line-1,0),new g.Position(t.line-1,0));s=$a(S.document.uri,N,t,this._commentController)}}if(!s)return;const c=this.getCommentThreadCacheKey(t.path,t.diffSide===or.LEFT);this._commentThreadCache[c]?this._commentThreadCache[c].push(s):this._commentThreadCache[c]=[s]}),e.changed.forEach(t=>{const i=this.getCommentThreadCacheKey(t.path,t.diffSide===or.LEFT),n=this._commentThreadCache[i].findIndex(s=>s.gitHubThreadId===t.id);if(n>-1){const s=this._commentThreadCache[i][n];Ga(s,t)}}),e.removed.forEach(async t=>{const i=this.getCommentThreadCacheKey(t.path,t.diffSide===or.LEFT),n=this._commentThreadCache[i].findIndex(s=>s.gitHubThreadId===t.id);if(n>-1){const s=this._commentThreadCache[i][n];this._commentThreadCache[i].splice(n,1),s.dispose()}})}hasCommentThread(e){if(e.uri.scheme!=="pr")return!1;const t=ti(e.uri);return!(!t||t.prNumber!==this.pullRequestModel.number)}getCommentSide(e){const t=ti(e.uri);return(t==null?void 0:t.isBase)?or.LEFT:or.RIGHT}async createOrReplyComment(e,t,i,n){var s;const c=e.comments.length,v=i?!1:n!==void 0?n:this.pullRequestModel.hasPendingReview,S=this.optimisticallyAddComment(e,t,v);try{if(c)await this.reply(e,t,i);else{const N=this.gitRelativeRootPath(e.uri.path),U=this.getCommentSide(e);this._pendingCommentThreadAdds.push(e),await this.pullRequestModel.createReviewThread(t,N,e.range.start.line+1,U,i)}i&&await this.pullRequestModel.submitReview()}catch(N){((s=N.graphQLErrors)==null?void 0:s.length)&&N.graphQLErrors[0].type==="NOT_FOUND"?g.window.showWarningMessage("The comment that you're replying to was deleted. Refresh to update.","Refresh").then(U=>{U==="Refresh"&&this.pullRequestModel.invalidate()}):g.window.showErrorMessage(`Creating comment failed: ${N}`),e.comments=e.comments.map(U=>(U instanceof pi&&U.id===S&&(U.mode=g.CommentMode.Editing),U))}}reply(e,t,i){const n=e.comments[0];if(n instanceof kr)return this.pullRequestModel.createCommentReply(t,n._rawComment.graphNodeId,i);throw new Error("Cannot respond to temporary comment")}optimisticallyEditComment(e,t){const i=this._folderReposManager.getCurrentUser(this.pullRequestModel),n=new pi(e,t.body instanceof g.MarkdownString?t.body.value:t.body,!!t.label,i,t);return e.comments=e.comments.map(s=>s instanceof kr&&s.commentId===t.commentId?n:s),n.id}async editComment(e,t){if(t instanceof kr){const i=this.optimisticallyEditComment(e,t);try{await this.pullRequestModel.editReviewComment(t._rawComment,t.body instanceof g.MarkdownString?t.body.value:t.body)}catch(n){g.window.showErrorMessage(`Editing comment failed ${n}`),e.comments=e.comments.map(s=>s instanceof pi&&s.id===i?new kr(t._rawComment,e):s)}}else this.createOrReplyComment(e,t.body instanceof g.MarkdownString?t.body.value:t.body,!1)}async deleteComment(e,t){t instanceof kr?await this.pullRequestModel.deleteReviewComment(t.commentId):e.comments=e.comments.filter(i=>!(i instanceof pi&&i.id===t.id)),await this.pullRequestModel.validateDraftMode()}gitRelativeRootPath(e){return qt.relative(this._folderReposManager.repository.rootUri.path,e).replace(/\\/g,"/")}async startReview(e,t){const i=e.comments.length,n=this.optimisticallyAddComment(e,t,!0);try{if(i)await this.reply(e,t,!1);else{const s=this.gitRelativeRootPath(e.uri.path),c=this.getCommentSide(e);this._pendingCommentThreadAdds.push(e),await this.pullRequestModel.createReviewThread(t,s,e.range.start.line+1,c)}this.setContextKey(!0)}catch(s){g.window.showErrorMessage(`Starting a review failed: ${s}`),e.comments=e.comments.map(c=>(c instanceof pi&&c.id===n&&(c.mode=g.CommentMode.Editing),c))}}async openReview(){await Si.createOrShow(this._folderReposManager.context.extensionUri,this._folderReposManager,this.pullRequestModel),Si.scrollToReview(),this._folderReposManager.telemetry.sendTelemetryEvent("pr.openDescription")}optimisticallyAddComment(e,t,i){const n=this._folderReposManager.getCurrentUser(this.pullRequestModel),s=new pi(e,t,i,n);return this.updateCommentThreadComments(e,[...e.comments,s]),s.id}updateCommentThreadComments(e,t){e.comments=t,Ws(e)}async createCommentOnResolve(e,t){const i=await this.pullRequestModel.getPendingReviewId();await this.createOrReplyComment(e,t,!i)}async resolveReviewThread(e,t){try{t&&await this.createCommentOnResolve(e,t),await this.pullRequestModel.resolveReviewThread(e.gitHubThreadId)}catch(i){g.window.showErrorMessage(`Resolving conversation failed: ${i}`)}}async unresolveReviewThread(e,t){try{t&&await this.createCommentOnResolve(e,t),await this.pullRequestModel.unresolveReviewThread(e.gitHubThreadId)}catch(i){g.window.showErrorMessage(`Unresolving conversation failed: ${i}`)}}async toggleReaction(e,t){e.parent.uri.scheme==="pr"&&(e.reactions&&!e.reactions.find(i=>i.label===t.label&&!!i.authorHasReacted)?await this.pullRequestModel.addCommentReaction(e._rawComment.graphNodeId,t):await this.pullRequestModel.deleteCommentReaction(e._rawComment.graphNodeId,t))}setContextKey(e){g.commands.executeCommand("setContext","prInDraft",e)}dispose(){Object.keys(this._commentThreadCache).forEach(e=>{this._commentThreadCache[e].forEach(t=>t.dispose())}),Np(this._commentHandlerId),this._disposables.forEach(e=>e.dispose())}}var X_=Object.defineProperty,mg=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?X_(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);class eS{constructor(e,t){this.commentsController=e,this._sessionState=t,mg(this,"_prCommentHandlers",{}),mg(this,"_prCommentingRangeProviders",{}),this.commentsController.commentingRangeProvider=this,this.commentsController.reactionHandler=this.toggleReaction.bind(this)}async provideCommentingRanges(e,t){const i=e.uri,n=ti(i);return!n||!this._prCommentingRangeProviders[n.prNumber]?void 0:this._prCommentingRangeProviders[n.prNumber].provideCommentingRanges.bind(this._prCommentingRangeProviders[n.prNumber])(e,t)}async toggleReaction(e,t){const i=e.parent.uri,n=ti(i);return!n||!this._prCommentHandlers[n.prNumber]||!this._prCommentHandlers[n.prNumber].handler.toggleReaction?void 0:this._prCommentHandlers[n.prNumber].handler.toggleReaction.bind(this._prCommentHandlers[n.prNumber].handler)(e,t)}registerCommentController(e,t,i){if(this._prCommentHandlers[e])return this._prCommentHandlers[e].refCount+=1,this._prCommentHandlers[e];const n=new Z_(t,i,this.commentsController,this._sessionState);return this._prCommentHandlers[e]={handler:n,refCount:1,dispose:()=>{!this._prCommentHandlers[e]||(this._prCommentHandlers[e].refCount-=1,this._prCommentHandlers[e].refCount===0&&(this._prCommentHandlers[e].handler.dispose(),delete this._prCommentHandlers[e]))}},this._prCommentHandlers[e]}registerCommentingRangeProvider(e,t){return this._prCommentingRangeProviders[e]=t,{dispose:()=>{delete this._prCommentingRangeProviders[e]}}}dispose(){Object.keys(this._prCommentHandlers).forEach(e=>{this._prCommentHandlers[e].handler.dispose()}),this._prCommentingRangeProviders={},this._prCommentHandlers={}}}var tS=St(89967),rS=St.n(tS),iS=Object.defineProperty,mi=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?iS(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);const gg=20,zs="GraphQL";var ui;(function(r){r.Unknown="unknown",r.Admin="ADMIN",r.Maintain="MAINTAIN",r.Read="READ",r.Triage="TRIAGE",r.Write="WRITE"})(ui||(ui={}));const Ot=class{constructor(r,e,t,i){this.remote=r,this._credentialStore=e,this._telemetry=t,this._sessionState=i,mi(this,"_initialized",!1),mi(this,"_hub"),mi(this,"_metadata"),mi(this,"_toDispose",[]),mi(this,"commentsController"),mi(this,"commentsHandler"),mi(this,"_pullRequestModels",new Map),mi(this,"isGitHubDotCom"),mi(this,"_onDidAddPullRequest",new g.EventEmitter),mi(this,"onDidAddPullRequest",this._onDidAddPullRequest.event),mi(this,"query",async n=>{var s;const c=this.hub&&this.hub.graphql;if(!c)return xe.debug(`Not available for query: ${n}`,zs),{data:null,loading:!1,networkStatus:hr.error,stale:!1};xe.debug(`Request: ${JSON.stringify(n,null,2)}`,zs);let v;try{v=await c.query(n)}catch(S){if(n.query!==this.schema.GetChecks&&((s=S.message)==null?void 0:s.startsWith("GraphQL error: Resource protected by organization SAML enforcement.")))await this._credentialStore.recreate(),v=await c.query(n);else throw S}return xe.debug(`Response: ${JSON.stringify(v,null,2)}`,zs),v}),mi(this,"mutate",async n=>{const s=this.hub&&this.hub.graphql;if(!s)return xe.debug(`Not available for query: ${n}`,zs),{data:null,loading:!1,networkStatus:hr.error,stale:!1};xe.debug(`Request: ${JSON.stringify(n,null,2)}`,zs);const c=await s.mutate(n);return xe.debug(`Response: ${JSON.stringify(c,null,2)}`,zs),c}),this.isGitHubDotCom=r.host.toLowerCase()==="github.com"}get hub(){if(!this._hub)throw this._initialized?new cl("Not authenticated."):new Error("Call ensure() before accessing this property.");return this._hub}equals(r){return this.remote.equals(r.remote)}get pullRequestModels(){return this._pullRequestModels}async ensureCommentsController(){try{if(this.commentsController)return;await this.ensure(),this.commentsController=g.comments.createCommentController(`github-browse-${this.remote.normalizedHost}`,`GitHub Pull Request for ${this.remote.normalizedHost}`),this.commentsHandler=new eS(this.commentsController,this._sessionState),this._toDispose.push(this.commentsHandler),this._toDispose.push(this.commentsController)}catch(r){console.log(r)}}dispose(){this._toDispose.forEach(r=>r.dispose())}get octokit(){return this.hub&&this.hub.octokit}get schema(){return rS()}async getMetadata(){var r;if(xe.debug("Fetch metadata - enter",Ot.ID),this._metadata)return xe.debug(`Fetch metadata ${(r=this._metadata.owner)==null?void 0:r.login}/${this._metadata.name} - done`,Ot.ID),this._metadata;const{octokit:e,remote:t}=await this.ensure(),i=await e.repos.get({owner:t.owner,repo:t.repositoryName});return xe.debug(`Fetch metadata ${t.owner}/${t.repositoryName} - done`,Ot.ID),this._metadata={...i.data,currentUser:e.currentUser},this._metadata}async resolveRemote(){try{const{clone_url:r}=await this.getMetadata();this.remote=Dg(this.remote.remoteName,r,this.remote.gitProtocol)}catch(r){if(xe.appendLine(`Unable to resolve remote: ${r}`),M_(r))return!1}return!0}async ensure(){return this._initialized=!0,this._credentialStore.isAuthenticated(this.remote.authProviderId)?this._hub=this._credentialStore.getHub(this.remote.authProviderId):(await this._credentialStore.create(),this._credentialStore.isAuthenticated(this.remote.authProviderId)||(this._hub=await this._credentialStore.showSignInNotification(this.remote.authProviderId))),this}async getDefaultBranch(){try{xe.debug("Fetch default branch - enter",Ot.ID);const{octokit:r,remote:e}=await this.ensure(),{data:t}=await r.repos.get({owner:e.owner,repo:e.repositoryName});return xe.debug("Fetch default branch - done",Ot.ID),t.default_branch}catch(r){xe.appendLine(`GitHubRepository> Fetching default branch failed: ${r}`)}return"master"}async getRepoAccessAndMergeMethods(){var r,e,t,i,n;try{xe.debug("Fetch repo permissions and available merge methods - enter",Ot.ID);const{octokit:s,remote:c}=await this.ensure(),{data:v}=await s.repos.get({owner:c.owner,repo:c.repositoryName});return xe.debug("Fetch repo permissions and available merge methods - done",Ot.ID),{hasWritePermission:(e=(r=v.permissions)==null?void 0:r.push)!=null?e:!1,mergeMethodsAvailability:{merge:(t=v.allow_merge_commit)!=null?t:!1,squash:(i=v.allow_squash_merge)!=null?i:!1,rebase:(n=v.allow_rebase_merge)!=null?n:!1}}}catch(s){xe.appendLine(`GitHubRepository> Fetching repo permissions and available merge methods failed: ${s}`)}return{hasWritePermission:!0,mergeMethodsAvailability:{merge:!0,squash:!0,rebase:!0}}}async getAllPullRequests(r){try{xe.debug("Fetch all pull requests - enter",Ot.ID);const{octokit:e,remote:t}=await this.ensure(),i=await e.pulls.list({owner:t.owner,repo:t.repositoryName,per_page:gg,page:r||1}),n=!!i.headers.link&&i.headers.link.indexOf('rel="next"')>-1;if(!i.data)return xe.appendLine(`Warning: no result data for ${t.owner}/${t.repositoryName} Status: ${i.status}`),{items:[],hasMorePages:!1};const s=i.data.map(c=>c.head.repo?this.createOrUpdatePullRequestModel(ns(c,this)):(xe.appendLine("GitHubRepository> The remote branch for this PR was already deleted."),null)).filter(c=>c!==null);return xe.debug("Fetch all pull requests - done",Ot.ID),{items:s,hasMorePages:n}}catch(e){if(xe.appendLine(`Fetching all pull requests failed: ${e}`,Ot.ID),e.code===404)g.window.showWarningMessage(`Fetching pull requests for remote '${this.remote.remoteName}' failed, please check if the url ${this.remote.url} is valid.`);else throw e}}async getPullRequestForBranch(r){try{xe.debug("Fetch pull requests for branch - enter",Ot.ID);const{octokit:e,remote:t}=await this.ensure(),n=(await e.pulls.list({owner:t.owner,repo:t.repositoryName,head:r})).data.map(s=>this.createOrUpdatePullRequestModel(ns(s,this))).filter(s=>s!==null);return xe.debug("Fetch pull requests for branch - done",Ot.ID),n}catch(e){if(xe.appendLine(`Fetching pull requests for branch failed: ${e}`,Ot.ID),e.code===404)g.window.showWarningMessage(`Fetching pull requests for remote '${this.remote.remoteName}' failed, please check if the url ${this.remote.url} is valid.`);else throw e}}getRepoForIssue(r,e){if(e.repositoryName&&e.repositoryUrl&&(r.remote.owner!==e.repositoryOwner||r.remote.repositoryName!==e.repositoryName)){const t=new wl(e.repositoryName,e.repositoryUrl,new un(e.repositoryUrl));r=new Ot(t,this._credentialStore,this._telemetry,this._sessionState)}return r}async getIssuesForUserByMilestone(r){var e;try{xe.debug("Fetch all issues - enter",Ot.ID);const{query:t,remote:i,schema:n}=await this.ensure(),{data:s}=await t({query:n.GetMilestones,variables:{owner:i.owner,name:i.repositoryName,assignee:(e=this._credentialStore.getCurrentUser(i.authProviderId))==null?void 0:e.login}});xe.debug("Fetch all issues - done",Ot.ID);const c=[];let v=this;return s&&s.repository.milestones&&s.repository.milestones.nodes&&s.repository.milestones.nodes.forEach(S=>{const N=sd(S);if(N){const U=[];S.issues.edges.forEach(X=>{const ne=od(X.node,this);v=this.getRepoForIssue(v,ne),U.push(new Pr(v,v.remote,ne))}),c.push({milestone:N,issues:U})}}),{items:c,hasMorePages:s.repository.milestones.pageInfo.hasNextPage}}catch(t){xe.appendLine(`GithubRepository> Unable to fetch issues: ${t}`);return}}async getIssuesWithoutMilestone(r){var e;try{xe.debug("Fetch issues without milestone- enter",Ot.ID);const{query:t,remote:i,schema:n}=await this.ensure(),{data:s}=await t({query:n.IssuesWithoutMilestone,variables:{owner:i.owner,name:i.repositoryName,assignee:(e=this._credentialStore.getCurrentUser(i.authProviderId))==null?void 0:e.login}});xe.debug("Fetch issues without milestone - done",Ot.ID);const c=[];let v=this;return s&&s.repository.issues.edges&&s.repository.issues.edges.forEach(S=>{if(S.node.id){const N=od(S.node,this);v=this.getRepoForIssue(v,N),c.push(new Pr(v,v.remote,N))}}),{items:c,hasMorePages:s.repository.issues.pageInfo.hasNextPage}}catch(t){xe.appendLine(`GithubRepository> Unable to fetch issues without milestone: ${t}`);return}}async getIssues(r,e){try{xe.debug("Fetch issues with query - enter",Ot.ID);const{query:t,schema:i}=await this.ensure(),{data:n}=await t({query:i.Issues,variables:{query:`${e} type:issue`}});xe.debug("Fetch issues with query - done",Ot.ID);const s=[];let c=this;return n&&n.search.edges&&n.search.edges.forEach(v=>{if(v.node.id){const S=od(v.node,this);c=this.getRepoForIssue(c,S),s.push(new Pr(c,c.remote,S))}}),{items:s,hasMorePages:n.search.pageInfo.hasNextPage}}catch(t){xe.appendLine(`GithubRepository> Unable to fetch issues with query: ${t}`);return}}async getMaxIssue(){try{xe.debug("Fetch max issue - enter",Ot.ID);const{query:r,remote:e,schema:t}=await this.ensure(),{data:i}=await r({query:t.MaxIssue,variables:{owner:e.owner,name:e.repositoryName}});return xe.debug("Fetch max issue - done",Ot.ID),i&&i.repository.issues.edges.length===1?i.repository.issues.edges[0].node.number:void 0}catch(r){xe.appendLine(`GithubRepository> Unable to fetch issues with query: ${r}`);return}}async getViewerPermission(){try{xe.debug("Fetch viewer permission - enter",Ot.ID);const{query:r,remote:e,schema:t}=await this.ensure(),{data:i}=await r({query:t.GetViewerPermission,variables:{owner:e.owner,name:e.repositoryName}});return xe.debug("Fetch viewer permission - done",Ot.ID),pS(i)}catch(r){return xe.appendLine(`GithubRepository> Unable to fetch viewer permission: ${r}`),ui.Unknown}}async fork(){try{xe.debug("Fork repository",Ot.ID);const{octokit:r,remote:e}=await this.ensure();return(await r.repos.createFork({owner:e.owner,repo:e.repositoryName})).data.clone_url}catch(r){xe.appendLine(`GitHubRepository> Forking repository failed: ${r}`);return}}async getRepositoryForkDetails(){try{xe.debug("Fetch repository fork details - enter",Ot.ID);const{query:r,remote:e,schema:t}=await this.ensure(),{data:i}=await r({query:t.GetRepositoryForkDetails,variables:{owner:e.owner,name:e.repositoryName}});return xe.debug("Fetch repository fork details - done",Ot.ID),i.repository}catch(r){xe.appendLine(`GithubRepository> Unable to fetch repository fork details: ${r}`);return}}async getAuthenticatedUser(){const{octokit:r}=await this.ensure();return(await r.users.getAuthenticated({})).data.login}async getPullRequestsForCategory(r,e){try{xe.debug(`Fetch pull request category ${r} - enter`,Ot.ID);const{octokit:t,remote:i}=await this.ensure(),n=await t.users.getAuthenticated({}),s=await t.repos.get({owner:this.remote.owner,repo:this.remote.repositoryName}),{data:c,headers:v}=await t.search.issuesAndPullRequests({q:mS(s.data.full_name,n.data.login,r),per_page:gg,page:e||1}),S=[];c.items.forEach(ne=>{S.push(new Promise(async(ce,be)=>{const ye=await t.pulls.get({owner:i.owner,repo:i.repositoryName,pull_number:ne.number});ce(ye)}))});const N=!!v.link&&v.link.indexOf('rel="next"')>-1,X=(await Promise.all(S)).map(ne=>ne.data.head.repo?this.createOrUpdatePullRequestModel(ns(ne.data,this)):(xe.appendLine("GitHubRepository> The remote branch for this PR was already deleted."),null)).filter(ne=>ne!==null);return xe.debug(`Fetch pull request category ${r} - done`,Ot.ID),{items:X,hasMorePages:N}}catch(t){if(xe.appendLine(`GitHubRepository> Fetching all pull requests failed: ${t}`),t.code===404)g.window.showWarningMessage(`Fetching pull requests for remote ${this.remote.remoteName}, please check if the url ${this.remote.url} is valid.`);else throw t}}createOrUpdatePullRequestModel(r){let e=this._pullRequestModels.get(r.number);return e?e.update(r):(e=new pn(this._telemetry,this,this.remote,r),e.onDidInvalidate(()=>this.getPullRequest(r.number)),this._pullRequestModels.set(r.number,e),this._onDidAddPullRequest.fire(e)),e}async createPullRequest(r){const{octokit:e}=await this.ensure(),{data:t}=await e.pulls.create(r);return this.createOrUpdatePullRequestModel(ns(t,this))}async getPullRequest(r){try{xe.debug(`Fetch pull request ${r} - enter`,Ot.ID);const{query:e,remote:t,schema:i}=await this.ensure(),{data:n}=await e({query:i.PullRequest,variables:{owner:t.owner,name:t.repositoryName,number:r}});return xe.debug(`Fetch pull request ${r} - done`,Ot.ID),this.createOrUpdatePullRequestModel(Eg(n,this))}catch(e){xe.appendLine(`GithubRepository> Unable to fetch PR: ${e}`);return}}async getIssue(r,e=!1){try{xe.debug(`Fetch issue ${r} - enter`,Ot.ID);const{query:t,remote:i,schema:n}=await this.ensure(),{data:s}=await t({query:e?n.IssueWithComments:n.Issue,variables:{owner:i.owner,name:i.repositoryName,number:r}});return xe.debug(`Fetch issue ${r} - done`,Ot.ID),new Pr(this,i,Eg(s,this))}catch(t){xe.appendLine(`GithubRepository> Unable to fetch PR: ${t}`);return}}async listBranches(r,e){const{octokit:t}=await this.ensure();xe.debug(`List branches for ${r}/${e} - enter`,Ot.ID);try{let i=[];const n=new Date().getTime();for await(const s of t.paginate.iterator("GET /repos/:owner/:repo/branches",{owner:r,repo:e,per_page:100}))if(i.push(...s.data.map(c=>c.name)),new Date().getTime()-n>5e3)break;return xe.debug(`List branches for ${r}/${e} - done`,Ot.ID),i}catch(i){throw xe.debug(`List branches for ${r}/${e} failed`,Ot.ID),i}}async deleteBranch(r){const{octokit:e}=await this.ensure();if(!!r.validatePullRequestModel("Unable to delete branch"))try{await e.git.deleteRef({owner:r.head.repositoryCloneUrl.owner,repo:r.head.repositoryCloneUrl.repositoryName,ref:`heads/${r.head.ref}`})}catch(t){xe.appendLine(`GithubRepository> Unable to delete branch: ${t}`);return}}async getMentionableUsers(){xe.debug("Fetch mentionable users - enter",Ot.ID);const{query:r,remote:e,schema:t}=await this.ensure();let i=null,n=!1;const s=[];do try{const c=await r({query:t.GetMentionableUsers,variables:{owner:e.owner,name:e.repositoryName,first:100,after:i}});s.push(...c.data.repository.mentionableUsers.nodes.map(v=>({login:v.login,avatarUrl:v.avatarUrl,name:v.name,url:v.url,email:v.email}))),n=c.data.repository.mentionableUsers.pageInfo.hasNextPage,i=c.data.repository.mentionableUsers.pageInfo.endCursor}catch(c){return xe.debug(`Unable to fetch mentionable users: ${c}`,Ot.ID),s}while(n);return s}async getAssignableUsers(){xe.debug("Fetch assignable users - enter",Ot.ID);const{query:r,remote:e,schema:t}=await this.ensure();let i=null,n=!1;const s=[];do try{const c=await r({query:t.GetAssignableUsers,variables:{owner:e.owner,name:e.repositoryName,first:100,after:i}});s.push(...c.data.repository.assignableUsers.nodes.map(v=>({login:v.login,avatarUrl:v.avatarUrl,name:v.name,url:v.url,email:v.email}))),n=c.data.repository.assignableUsers.pageInfo.hasNextPage,i=c.data.repository.assignableUsers.pageInfo.endCursor}catch(c){return xe.debug(`Unable to fetch assignable users: ${c}`,Ot.ID),c.graphQLErrors&&c.graphQLErrors.length>0&&c.graphQLErrors[0].type==="INSUFFICIENT_SCOPES"&&g.window.showWarningMessage(`GitHub user features will not work. ${c.graphQLErrors[0].message}`),s}while(n);return s}async compareCommits(r,e){const{remote:t,octokit:i}=await this.ensure(),{data:n}=await i.repos.compareCommits({repo:t.repositoryName,owner:t.owner,base:r,head:e});return n}isCurrentUser(r){return this._credentialStore.isCurrentUser(r)}};let vg=Ot;mi(vg,"ID","GitHubRepository");function $a(r,e,t,i){const n=i.createCommentThread(r,e,[]);return n.gitHubThreadId=t.id,n.comments=t.comments.map(s=>new kr(s,n)),n.isResolved=t.isResolved,t.viewerCanResolve&&!t.isResolved?n.contextValue="canResolve":t.viewerCanUnresolve&&t.isResolved&&(n.contextValue="canUnresolve"),Ws(n),n.collapsibleState=bg(t.isResolved),n}const ml="commentExpandState",pR="collapseAll",nd="expandUnresolved";function bg(r,e){var t;return r?g.CommentThreadCollapsibleState.Collapsed:(e===void 0&&(e=((t=g.workspace.getConfiguration(Ir))==null?void 0:t.get(ml))===nd),e?g.CommentThreadCollapsibleState.Expanded:g.CommentThreadCollapsibleState.Collapsed)}function Ga(r,e,t){e.viewerCanResolve&&!e.isResolved?r.contextValue="canResolve":e.viewerCanUnresolve&&e.isResolved&&(r.contextValue="canUnresolve"),r.isResolved!==e.isResolved&&(r.isResolved=e.isResolved),r.collapsibleState=bg(e.isResolved,t),r.comments=e.comments.map(i=>new kr(i,r)),Ws(r)}function Ws(r){if(r.isResolved){r.label="This thread has been marked as resolved";return}if(r.comments.length){const e=oc(r.comments,t=>t.author.name).map(t=>`@${t.author.name}`).join(", ");r.label=`Participants: ${e}`}else r.label="Start discussion"}function nS(r){return bl().map(e=>{if(!r)return{label:e.label,authorHasReacted:!1,count:0,iconPath:e.icon||""};const t=r.find(i=>i.label===e.label);return t?{label:t.label,authorHasReacted:t.viewerHasReacted,count:t.count,iconPath:e.icon||""}:{label:e.label,authorHasReacted:!1,count:0,iconPath:e.icon||""}})}function sS(r,e){r.reactions=nS(e)}function yg(r,e){e||(r.comments=r.comments.map(t=>(t instanceof kr&&(t._rawComment.isDraft=!1),t.label=void 0,t)))}function On(r,e){var t;return{login:r.login,url:r.html_url,avatarUrl:dd(r.avatar_url,(t=r.gravatar_id)!=null?t:void 0,e.remote.authProviderId)}}function wg(r){return{label:r.label,ref:r.ref,sha:r.sha,repo:{cloneUrl:r.repo.clone_url}}}function ns(r,e){const{number:t,body:i,title:n,html_url:s,user:c,state:v,assignees:S,created_at:N,updated_at:U,head:X,base:ne,labels:ce,node_id:be,id:ye,draft:ge}=r;return{id:ye,graphNodeId:be,number:t,body:i!=null?i:"",title:n,url:s,user:On(c,e),state:v,merged:r.merged||!1,assignees:S?S.map(ke=>On(ke,e)):void 0,createdAt:N,updatedAt:U,head:wg(X),base:wg(ne),mergeable:r.mergeable?Fn.Mergeable:Fn.NotMergeable,labels:ce.map(ke=>({name:"",color:"",...ke})),isDraft:ge,suggestedReviewers:[]}}function aS(r,e){const{number:t,body:i,title:n,html_url:s,user:c,state:v,assignees:S,created_at:N,updated_at:U,labels:X,node_id:ne,id:ce}=r;return{id:ce,graphNodeId:ne,number:t,body:i!=null?i:"",title:n,url:s,user:On(c,e),state:v,assignees:S?S.map(ye=>On(ye,e)):void 0,createdAt:N,updatedAt:U,labels:X.map(ye=>{var ge,ve;return typeof ye=="string"?{name:ye,color:""}:{name:(ge=ye.name)!=null?ge:"",color:(ve=ye.color)!=null?ve:""}}),suggestedReviewers:[]}}function oS(r,e){return{event:Sr.Reviewed,comments:[],submittedAt:r.submitted_at,body:r.body,bodyHTML:r.body,htmlUrl:r.html_url,user:On(r.user,e),authorAssociation:r.user.type,state:r.state,id:r.id}}function _g(r){const e=[],t=Aa(r.diffHunk);let i=t.next();for(;!i.done;){const n=i.value;e.push(n),i=t.next()}return e}function mR(r,e){var t;const i={url:r.url,id:r.id,pullRequestReviewId:(t=r.pull_request_review_id)!=null?t:void 0,diffHunk:r.diff_hunk,path:r.path,position:r.position,commitId:r.commit_id,originalPosition:r.original_position,originalCommitId:r.original_commit_id,user:On(r.user,e),body:r.body,createdAt:r.created_at,htmlUrl:r.html_url,inReplyToId:r.in_reply_to_id,graphNodeId:r.node_id},n=_g(i);return i.diffHunks=n,i}function lS(r){switch(r){case"PullRequestCommit":return Sr.Committed;case"LabeledEvent":return Sr.Labeled;case"MilestonedEvent":return Sr.Milestoned;case"AssignedEvent":return Sr.Assigned;case"HeadRefDeletedEvent":return Sr.HeadRefDeleted;case"IssueComment":return Sr.Commented;case"PullRequestReview":return Sr.Reviewed;case"MergedEvent":return Sr.Merged;default:return Sr.Other}}function gl(r){return{id:r.id,isResolved:r.isResolved,viewerCanResolve:r.viewerCanResolve,viewerCanUnresolve:r.viewerCanUnresolve,path:r.path,line:r.line,originalLine:r.originalLine,diffSide:r.diffSide,isOutdated:r.isOutdated,comments:r.comments.nodes.map(e=>Ks(e,r.isResolved))}}function Ks(r,e){const t={id:r.databaseId,url:r.url,body:r.body,bodyHTML:r.bodyHTML,path:r.path,canEdit:r.viewerCanDelete,canDelete:r.viewerCanDelete,pullRequestReviewId:r.pullRequestReview&&r.pullRequestReview.databaseId,diffHunk:r.diffHunk,position:r.position,commitId:r.commit.oid,originalPosition:r.originalPosition,originalCommitId:r.originalCommit&&r.originalCommit.oid,user:r.author,createdAt:r.createdAt,htmlUrl:r.url,graphNodeId:r.id,isDraft:r.state==="PENDING",inReplyToId:r.replyTo&&r.replyTo.databaseId,reactions:kg(r.reactionGroups),isResolved:e},i=_g(t);return t.diffHunks=i,t}function Sg(r){return{id:r.databaseId,url:r.url,body:r.body,bodyHTML:r.bodyHTML,canEdit:r.viewerCanDelete,canDelete:r.viewerCanDelete,user:r.author,createdAt:r.createdAt,htmlUrl:r.url,graphNodeId:r.id,diffHunk:""}}function kg(r){const e=bl().reduce((i,n)=>(i[n.title]=n,i),{});return r.filter(i=>i.users.totalCount>0).map(i=>({label:e[i.content].label,count:i.users.totalCount,icon:e[i.content].icon,viewerHasReacted:i.viewerHasReacted}))}function vl(r,e,t){if(!!t)return{label:`${t.owner.login}:${r}`,ref:r,sha:e,repo:{cloneUrl:t.url}}}function Ui(r,e){return r?{login:r.login,url:r.url,avatarUrl:dd(r.avatarUrl,void 0,e.remote.authProviderId),email:r.email}:{login:"",url:""}}function sd(r){if(!!r)return{title:r.title,dueOn:r.dueOn,createdAt:r.createdAt,id:r.id}}function ad(r){switch(r){case"UNKNOWN":return Fn.Unknown;case"MERGEABLE":return Fn.Mergeable;case"CONFLICTING":return Fn.NotMergeable}}function Eg(r,e){var t,i,n,s,c,v;const S=r.repository.pullRequest;return{id:S.databaseId,graphNodeId:S.id,url:S.url,number:S.number,state:S.state,body:S.body,bodyHTML:S.bodyHTML,title:S.title,createdAt:S.createdAt,updatedAt:S.updatedAt,isRemoteHeadDeleted:!S.headRef,head:vl((i=(t=S.headRef)==null?void 0:t.name)!=null?i:S.headRefName,S.headRefOid,S.headRepository),isRemoteBaseDeleted:!S.baseRef,base:vl((s=(n=S.baseRef)==null?void 0:n.name)!=null?s:S.baseRefName,S.baseRefOid,S.baseRepository),user:Ui(S.author,e),merged:S.merged,mergeable:ad(S.mergeable),labels:S.labels.nodes,isDraft:S.isDraft,suggestedReviewers:Rg(S.suggestedReviewers),comments:uS((c=S.comments)==null?void 0:c.nodes,e),milestone:sd(S.milestone),assignees:(v=S.assignees)==null?void 0:v.nodes.map(N=>Ui(N,e))}}function uS(r,e){if(!r)return;const t=[];for(const i of r)t.push({author:Ui(i.author,e),body:i.body,databaseId:i.databaseId});return t}function od(r,e){var t,i,n,s;return{id:r.databaseId,graphNodeId:r.id,url:r.url,number:r.number,state:r.state,body:r.body,bodyHTML:r.bodyHTML,title:r.title,createdAt:r.createdAt,updatedAt:r.updatedAt,assignees:(t=r.assignees)==null?void 0:t.nodes.map(c=>Ui(c,e)),user:Ui(r.author,e),labels:r.labels.nodes,repositoryName:(i=r.repository)==null?void 0:i.name,repositoryOwner:(n=r.repository)==null?void 0:n.owner.login,repositoryUrl:(s=r.repository)==null?void 0:s.url}}function gR(r,e){var t,i,n,s;const c=r;return{id:c.databaseId,graphNodeId:c.id,url:c.url,number:c.number,state:c.state,body:c.body,bodyHTML:c.bodyHTML,title:c.title,createdAt:c.createdAt,updatedAt:c.updatedAt,isRemoteHeadDeleted:!c.headRef,head:vl((i=(t=c.headRef)==null?void 0:t.name)!=null?i:c.headRefName,c.headRefOid,c.headRepository),isRemoteBaseDeleted:!c.baseRef,base:vl((s=(n=c.baseRef)==null?void 0:n.name)!=null?s:c.baseRefName,c.baseRefOid,c.baseRepository),user:Ui(c.author,e),merged:c.merged,mergeable:ad(c.mergeable),labels:c.labels.nodes,isDraft:c.isDraft,suggestedReviewers:Rg(c.suggestedReviewers),milestone:sd(c.milestone)}}function Rg(r){return r?r.map(t=>({login:t.reviewer.login,avatarUrl:t.reviewer.avatarUrl,name:t.reviewer.name,url:t.reviewer.url,isAuthor:t.isAuthor,isCommenter:t.isCommenter})).sort(xg):[]}function xg(r,e){return r.login.localeCompare(e.login,"en",{sensitivity:"accent"})}function cS(r,e){return{event:Sr.Reviewed,comments:r.comments.nodes.map(t=>Ks(t,!1)).filter(t=>!t.inReplyToId),submittedAt:r.submittedAt,body:r.body,bodyHTML:r.bodyHTML,htmlUrl:r.url,user:Ui(r.author,e),authorAssociation:r.authorAssociation,state:r.state,id:r.databaseId}}function Tg(r,e){const t=[];return r.forEach(i=>{const n=lS(i.__typename);switch(n){case Sr.Commented:const s=i;t.push({htmlUrl:s.url,body:s.body,bodyHTML:s.bodyHTML,user:Ui(s.author,e),event:n,canEdit:s.viewerCanUpdate,canDelete:s.viewerCanDelete,id:s.databaseId,graphNodeId:s.id,createdAt:s.createdAt});return;case Sr.Reviewed:const c=i;t.push({event:n,comments:[],submittedAt:c.submittedAt,body:c.body,bodyHTML:c.bodyHTML,htmlUrl:c.url,user:Ui(c.author,e),authorAssociation:c.authorAssociation,state:c.state,id:c.databaseId});return;case Sr.Committed:const v=i;t.push({id:v.id,event:n,sha:v.commit.oid,author:v.commit.author.user?Ui(v.commit.author.user,e):{login:v.commit.committer.name},htmlUrl:v.url,message:v.commit.message,authoredDate:new Date(v.commit.authoredDate)});return;case Sr.Merged:const S=i;t.push({id:S.id,event:n,user:Ui(S.actor,e),createdAt:S.createdAt,mergeRef:S.mergeRef.name,sha:S.commit.oid,commitUrl:S.commit.commitUrl,url:S.url,graphNodeId:S.id});return;case Sr.Assigned:const N=i;t.push({id:N.databaseId,event:n,user:N.user,actor:N.actor});return;case Sr.HeadRefDeleted:const U=i;t.push({id:U.id,event:n,actor:U.actor,createdAt:U.createdAt,headRef:U.headRefName});return;default:break}}),t}function dS(r,e){return{login:r.user.login,name:r.user.name,avatarUrl:r.user.avatarUrl?dd(r.user.avatarUrl,void 0,e.remote.authProviderId):void 0,url:r.user.url,bio:r.user.bio,company:r.user.company,location:r.user.location,commitContributions:fS(r.user.contributionsCollection)}}function fS(r){const e=[];return r.commitContributionsByRepository.forEach(t=>{t.contributions.nodes.forEach(i=>{e.push({createdAt:new Date(i.occurredAt),repoNameWithOwner:t.repository.nameWithOwner})})}),e}function bl(){return[{title:"THUMBS_UP",label:"\u{1F44D}",icon:Ki.icons.reactions.THUMBS_UP},{title:"THUMBS_DOWN",label:"\u{1F44E}",icon:Ki.icons.reactions.THUMBS_DOWN},{title:"LAUGH",label:"\u{1F604}",icon:Ki.icons.reactions.LAUGH},{title:"HOORAY",label:"\u{1F389}",icon:Ki.icons.reactions.HOORAY},{title:"CONFUSED",label:"\u{1F615}",icon:Ki.icons.reactions.CONFUSED},{title:"HEART",label:"\u2764\uFE0F",icon:Ki.icons.reactions.HEART},{title:"ROCKET",label:"\u{1F680}",icon:Ki.icons.reactions.ROCKET},{title:"EYES",label:"\u{1F440}",icon:Ki.icons.reactions.EYES}]}function hS(r){const e=[];return r.forEach(t=>{var i,n;x_(t)&&e.push({login:t.author.login,name:t.author.name||""}),td(t)&&e.push({login:t.user.login,name:(i=t.user.name)!=null?i:t.user.login}),T_(t)&&e.push({login:t.user.login,name:(n=t.user.name)!=null?n:t.user.login})}),e}function pS(r){return r&&r.repository.viewerPermission&&Object.values(ui).includes(r.repository.viewerPermission)?r.repository.viewerPermission:ui.Unknown}function ld(r,e){for(const t of r.repositories)if(e.path.toLowerCase()===t.rootUri.path.toLowerCase()||e.path.toLowerCase().startsWith(t.rootUri.path.toLowerCase())&&e.path.substring(t.rootUri.path.length).startsWith("/"))return t}function Cg(r,e,t){const i=e.filter(td).filter(c=>c.state!=="PENDING");let n=[];const s=new Map;s.set(t.login,!0);for(let c=i.length-1;c>=0;c--){const v=i[c].user;s.get(v.login)||(s.set(v.login,!0),n.push({reviewer:v,state:i[c].state}))}return r.forEach(c=>{if(!s.get(c.login))n.push({reviewer:c,state:"REQUESTED"});else{const v=n.find(S=>S.reviewer.login===c.login);v.state="REQUESTED"}}),n=n.sort((c,v)=>c.state==="REQUESTED"&&v.state!=="REQUESTED"?1:v.state==="REQUESTED"&&c.state!=="REQUESTED"||c.reviewer.login.toLowerCase()<v.reviewer.login.toLowerCase()?-1:1),n}function mS(r,e,t){return`is:pull-request ${t.replace(/\$\{user\}/g,e)} type:pr repo:${r}`}function ud(){return g.env.remoteName==="codespaces"&&g.env.uiKind===g.UIKind.Web}function cd(){const r=g.workspace.getConfiguration("github-enterprise").get("uri","");if(r)return g.Uri.parse(r,!0)}function yl(){return!!cd()}function gS(r,e=200){return r?`https://www.gravatar.com/avatar/${r}?s=${e}&d=retro`:void 0}function dd(r,e,t){var i;return t===jt.github?r:e?gS(k_.js("md5").update((i=e==null?void 0:e.trim())==null?void 0:i.toLowerCase()).digest("hex")):void 0}var vS=Object.defineProperty,mn=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?vS(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);const Mg="Try again?",bS="Cancel",Ng="Sign in",yS="Don't show again",Pg="prompt for sign in",Ag="login",Ig=["read:user","user:email","repo"];var jt;(function(r){r.github="github",r["github-enterprise"]="github-enterprise"})(jt||(jt={}));class wS{constructor(e){this._telemetry=e,mn(this,"_githubAPI"),mn(this,"_sessionId"),mn(this,"_githubEnterpriseAPI"),mn(this,"_enterpriseSessionId"),mn(this,"_disposables"),mn(this,"_onDidInitialize",new g.EventEmitter),mn(this,"onDidInitialize",this._onDidInitialize.event),mn(this,"_onDidGetSession",new g.EventEmitter),mn(this,"onDidGetSession",this._onDidGetSession.event),this._disposables=[],this._disposables.push(g.authentication.onDidChangeSessions(async()=>{const t=[];this.isAuthenticated(jt.github)||t.push(this.initialize(jt.github)),!this.isAuthenticated(jt["github-enterprise"])&&yl()&&t.push(this.initialize(jt["github-enterprise"])),await Promise.all(t),this.isAnyAuthenticated()&&this._onDidGetSession.fire()}))}async initialize(e,t){if(e===jt["github-enterprise"]&&!yl()){xe.debug("GitHub Enterprise provider selected without URI.","Authentication");return}t={...t,createIfNone:!1};let i;try{i=await g.authentication.getSession(e,Ig,t)}catch(n){if(!(t.forceNewSession&&n.message==="User did not consent to login."))throw n}if(i){e===jt.github?this._sessionId=i.id:this._enterpriseSessionId=i.id;const n=await this.createHub(i.accessToken,e);e===jt.github?this._githubAPI=n:this._githubEnterpriseAPI=n,await this.setCurrentUser(n),this._onDidInitialize.fire()}else xe.debug(`No GitHub${fd(e)} token found.`,"Authentication")}async doCreate(e){await this.initialize(jt.github,e),yl()&&await this.initialize(jt["github-enterprise"],e)}async create(e={}){return this.doCreate(e)}async recreate(e){return this.doCreate({forceNewSession:e?{detail:e}:!0})}async reset(){return this._githubAPI=void 0,this._githubEnterpriseAPI=void 0,this.create()}isAnyAuthenticated(){return this.isAuthenticated(jt.github)||this.isAuthenticated(jt["github-enterprise"])}isAuthenticated(e){return e===jt.github?!!this._githubAPI:!!this._githubEnterpriseAPI}getHub(e){return e===jt.github?this._githubAPI:this._githubEnterpriseAPI}async getHubOrLogin(e){var t,i;return e===jt.github?(t=this._githubAPI)!=null?t:await this.login(e):(i=this._githubEnterpriseAPI)!=null?i:await this.login(e)}async showSignInNotification(e){if(ag(Pg,Ag)===!1)return;if(await g.window.showInformationMessage(`In order to use the Pull Requests functionality, you must sign in to GitHub${fd(e)}`,Ng,yS)===Ng)return await this.login(e);og(Pg,Ag,!1),this._telemetry.sendTelemetryEvent("auth.cancel")}async login(e){this._telemetry.sendTelemetryEvent("auth.start");const t=`Error signing in to GitHub${fd(e)}`;let i=!0,n;for(;i;){try{const s=await this.getSessionOrLogin(e);n=await this.createHub(s,e)}catch(s){xe.appendLine(`${t}: ${s}`),s instanceof Error&&s.stack&&xe.appendLine(s.stack)}n?i=!1:i=await g.window.showErrorMessage(t,Mg,bS)===Mg}return n?(this._githubAPI=n,await this.setCurrentUser(n),this._telemetry.sendTelemetryEvent("auth.success")):this._telemetry.sendTelemetryEvent("auth.fail"),n}async showSamlMessageAndAuth(){return this.recreate("GitHub Pull Requests and Issues requires that you provide SAML access to your organization when you sign in.")}isCurrentUser(e){var t,i,n,s;return((i=(t=this._githubAPI)==null?void 0:t.currentUser)==null?void 0:i.login)===e||((s=(n=this._githubEnterpriseAPI)==null?void 0:n.currentUser)==null?void 0:s.login)==e}getCurrentUser(e){const t=this.getHub(e);return(t==null?void 0:t.octokit)&&(t==null?void 0:t.currentUser)}async setCurrentUser(e){const t=await e.octokit.users.getAuthenticated({});e.currentUser=t.data}async getSessionOrLogin(e){const t=await g.authentication.getSession(e,Ig,{createIfNone:!0});return e===jt.github?this._sessionId=t.id:this._enterpriseSessionId=t.id,t.accessToken}async createHub(e,t){let i="https://api.github.com",n;t===jt["github-enterprise"]&&(n=cd()),n&&(i=`${n.scheme}://${n.authority}/api/v3`);let s;g.env.uiKind===g.UIKind.Web&&(s=(N,U)=>{if(U.headers!==void 0){const{"user-agent":X,...ne}=U.headers;X&&(U.headers=ne)}return Ko()(N,U)});const c=new vw({request:{agent:Bp,fetch:s},userAgent:"GitHub VSCode Pull Requests",previews:["shadow-cat-preview"],auth:`${e||""}`,baseUrl:i});n&&(i=`${n.scheme}://${n.authority}/api`);const v=new C1({link:_S(i,e||""),cache:new l_,defaultOptions:{query:{fetchPolicy:"no-cache"}}}),S={octokit:c,graphql:v};return await this.setCurrentUser(S),S}dispose(){this._disposables.forEach(e=>e.dispose())}}const _S=(r,e)=>u_((t,{headers:i})=>({headers:{...i,authorization:e?`Bearer ${e}`:"",Accept:"application/vnd.github.shadow-cat-preview+json, application/vnd.github.antiope-preview+json"}})).concat(sg({uri:`${r}/graphql`,fetch:Ko()}));function fd(r){return r===jt.github?"":" Enterprise"}class wl{constructor(e,t,i){this.remoteName=e,this.url=t,this.gitProtocol=i}get host(){return this.gitProtocol.host}get owner(){return this.gitProtocol.owner}get repositoryName(){return this.gitProtocol.repositoryName}get normalizedHost(){const e=this.gitProtocol.normalizeUri();return`${e.scheme}://${e.authority}`}get authProviderId(){var e;return this.host===((e=cd())==null?void 0:e.authority)?jt["github-enterprise"]:jt.github}equals(e){return!(this.remoteName!==e.remoteName||this.host!==e.host||this.owner!==e.owner||this.repositoryName!==e.repositoryName)}}function Dg(r,e,t){if(!e)return null;const i=new un(e);return t&&i.update({type:t.type}),i.host?new wl(r,e,i):null}function Qs(r){const e=[];for(const t of r.state.remotes){const i=[];t.fetchUrl&&i.push(t.fetchUrl),t.pushUrl&&t.pushUrl!==t.fetchUrl&&i.push(t.pushUrl),i.forEach(n=>{const s=Dg(t.name,n);s&&e.push(s)})}return e}const ss="GitHub.vscode-pull-request-github",hd="git",Fg="ghpr",Og="initialize",Lg="statechange",Ys="github:focusedReview",pd="github.pullRequest.pullNotification.show",ja="github.pullRequest.repos";function SS(r){r.globalState.setKeysForSync([pd])}var kS=St(61336),ES=St(39593),RS=St.n(ES);function Ug(){return{baseUrl:null,breaks:!1,extensions:null,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}let Js=Ug();function xS(r){Js=r}const TS=/[&<>"']/,CS=/[&<>"']/g,MS=/[<>"']|&(?!#?\w+;)/,NS=/[<>"']|&(?!#?\w+;)/g,PS={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Bg=r=>PS[r];function Ar(r,e){if(e){if(TS.test(r))return r.replace(CS,Bg)}else if(MS.test(r))return r.replace(NS,Bg);return r}const AS=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function qg(r){return r.replace(AS,(e,t)=>(t=t.toLowerCase(),t==="colon"?":":t.charAt(0)==="#"?t.charAt(1)==="x"?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""))}const IS=/(^|[^\[])\^/g;function Jt(r,e){r=r.source||r,e=e||"";const t={replace:(i,n)=>(n=n.source||n,n=n.replace(IS,"$1"),r=r.replace(i,n),t),getRegex:()=>new RegExp(r,e)};return t}const DS=/[^\w:]/g,FS=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function Hg(r,e,t){if(r){let i;try{i=decodeURIComponent(qg(t)).replace(DS,"").toLowerCase()}catch(n){return null}if(i.indexOf("javascript:")===0||i.indexOf("vbscript:")===0||i.indexOf("data:")===0)return null}e&&!FS.test(t)&&(t=BS(e,t));try{t=encodeURI(t).replace(/%25/g,"%")}catch(i){return null}return t}const _l={},OS=/^[^:]+:\/*[^/]*$/,LS=/^([^:]+:)[\s\S]*$/,US=/^([^:]+:\/*[^/]*)[\s\S]*$/;function BS(r,e){_l[" "+r]||(OS.test(r)?_l[" "+r]=r+"/":_l[" "+r]=kl(r,"/",!0)),r=_l[" "+r];const t=r.indexOf(":")===-1;return e.substring(0,2)==="//"?t?e:r.replace(LS,"$1")+e:e.charAt(0)==="/"?t?e:r.replace(US,"$1")+e:r+e}const Sl={exec:function(){}};function Bi(r){let e=1,t,i;for(;e<arguments.length;e++){t=arguments[e];for(i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i])}return r}function Vg(r,e){const t=r.replace(/\|/g,(s,c,v)=>{let S=!1,N=c;for(;--N>=0&&v[N]==="\\";)S=!S;return S?"|":" |"}),i=t.split(/ \|/);let n=0;if(i[0].trim()||i.shift(),i[i.length-1].trim()||i.pop(),i.length>e)i.splice(e);else for(;i.length<e;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(/\\\|/g,"|");return i}function kl(r,e,t){const i=r.length;if(i===0)return"";let n=0;for(;n<i;){const s=r.charAt(i-n-1);if(s===e&&!t)n++;else if(s!==e&&t)n++;else break}return r.substr(0,i-n)}function qS(r,e){if(r.indexOf(e[1])===-1)return-1;const t=r.length;let i=0,n=0;for(;n<t;n++)if(r[n]==="\\")n++;else if(r[n]===e[0])i++;else if(r[n]===e[1]&&(i--,i<0))return n;return-1}function $g(r){r&&r.sanitize&&!r.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function Gg(r,e){if(e<1)return"";let t="";for(;e>1;)e&1&&(t+=r),e>>=1,r+=r;return t+r}function jg(r,e,t,i){const n=e.href,s=e.title?Ar(e.title):null,c=r[1].replace(/\\([\[\]])/g,"$1");if(r[0].charAt(0)!=="!"){i.state.inLink=!0;const v={type:"link",raw:t,href:n,title:s,text:c,tokens:i.inlineTokens(c,[])};return i.state.inLink=!1,v}else return{type:"image",raw:t,href:n,title:s,text:Ar(c)}}function HS(r,e){const t=r.match(/^(\s+)(?:```)/);if(t===null)return e;const i=t[1];return e.split(`
`).map(n=>{const s=n.match(/^\s+/);if(s===null)return n;const[c]=s;return c.length>=i.length?n.slice(i.length):n}).join(`
`)}class md{constructor(e){this.options=e||Js}space(e){const t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){const t=this.rules.block.code.exec(e);if(t){const i=t[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?i:kl(i,`
`)}}}fences(e){const t=this.rules.block.fences.exec(e);if(t){const i=t[0],n=HS(i,t[3]||"");return{type:"code",raw:i,lang:t[2]?t[2].trim():t[2],text:n}}}heading(e){const t=this.rules.block.heading.exec(e);if(t){let i=t[2].trim();if(/#$/.test(i)){const s=kl(i,"#");(this.options.pedantic||!s||/ $/.test(s))&&(i=s.trim())}const n={type:"heading",raw:t[0],depth:t[1].length,text:i,tokens:[]};return this.lexer.inline(n.text,n.tokens),n}}hr(e){const t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:t[0]}}blockquote(e){const t=this.rules.block.blockquote.exec(e);if(t){const i=t[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:t[0],tokens:this.lexer.blockTokens(i,[]),text:i}}}list(e){let t=this.rules.block.list.exec(e);if(t){let i,n,s,c,v,S,N,U,X,ne,ce,be,ye=t[1].trim();const ge=ye.length>1,ve={type:"list",raw:"",ordered:ge,start:ge?+ye.slice(0,-1):"",loose:!1,items:[]};ye=ge?`\\d{1,9}\\${ye.slice(-1)}`:`\\${ye}`,this.options.pedantic&&(ye=ge?ye:"[*+-]");const ke=new RegExp(`^( {0,3}${ye})((?: [^\\n]*)?(?:\\n|$))`);for(;e&&(be=!1,!(!(t=ke.exec(e))||this.rules.block.hr.test(e)));){if(i=t[0],e=e.substring(i.length),U=t[2].split(`
`,1)[0],X=e.split(`
`,1)[0],this.options.pedantic?(c=2,ce=U.trimLeft()):(c=t[2].search(/[^ ]/),c=c>4?1:c,ce=U.slice(c),c+=t[1].length),S=!1,!U&&/^ *$/.test(X)&&(i+=X+`
`,e=e.substring(X.length+1),be=!0),!be){const Pe=new RegExp(`^ {0,${Math.min(3,c-1)}}(?:[*+-]|\\d{1,9}[.)])`);for(;e&&(ne=e.split(`
`,1)[0],U=ne,this.options.pedantic&&(U=U.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),!Pe.test(U));){if(U.search(/[^ ]/)>=c||!U.trim())ce+=`
`+U.slice(c);else if(!S)ce+=`
`+U;else break;!S&&!U.trim()&&(S=!0),i+=ne+`
`,e=e.substring(ne.length+1)}}ve.loose||(N?ve.loose=!0:/\n *\n *$/.test(i)&&(N=!0)),this.options.gfm&&(n=/^\[[ xX]\] /.exec(ce),n&&(s=n[0]!=="[ ] ",ce=ce.replace(/^\[[ xX]\] +/,""))),ve.items.push({type:"list_item",raw:i,task:!!n,checked:s,loose:!1,text:ce}),ve.raw+=i}ve.items[ve.items.length-1].raw=i.trimRight(),ve.items[ve.items.length-1].text=ce.trimRight(),ve.raw=ve.raw.trimRight();const Ce=ve.items.length;for(v=0;v<Ce;v++){this.lexer.state.top=!1,ve.items[v].tokens=this.lexer.blockTokens(ve.items[v].text,[]);const Pe=ve.items[v].tokens.filter(Ze=>Ze.type==="space"),Oe=Pe.every(Ze=>{const wt=Ze.raw.split("");let ct=0;for(const _t of wt)if(_t===`
`&&(ct+=1),ct>1)return!0;return!1});!ve.loose&&Pe.length&&Oe&&(ve.loose=!0,ve.items[v].loose=!0)}return ve}}html(e){const t=this.rules.block.html.exec(e);if(t){const i={type:"html",raw:t[0],pre:!this.options.sanitizer&&(t[1]==="pre"||t[1]==="script"||t[1]==="style"),text:t[0]};return this.options.sanitize&&(i.type="paragraph",i.text=this.options.sanitizer?this.options.sanitizer(t[0]):Ar(t[0]),i.tokens=[],this.lexer.inline(i.text,i.tokens)),i}}def(e){const t=this.rules.block.def.exec(e);if(t){t[3]&&(t[3]=t[3].substring(1,t[3].length-1));const i=t[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:i,raw:t[0],href:t[2],title:t[3]}}}table(e){const t=this.rules.block.table.exec(e);if(t){const i={type:"table",header:Vg(t[1]).map(n=>({text:n})),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:t[3]?t[3].replace(/\n[ \t]*$/,"").split(`
`):[]};if(i.header.length===i.align.length){i.raw=t[0];let n=i.align.length,s,c,v,S;for(s=0;s<n;s++)/^ *-+: *$/.test(i.align[s])?i.align[s]="right":/^ *:-+: *$/.test(i.align[s])?i.align[s]="center":/^ *:-+ *$/.test(i.align[s])?i.align[s]="left":i.align[s]=null;for(n=i.rows.length,s=0;s<n;s++)i.rows[s]=Vg(i.rows[s],i.header.length).map(N=>({text:N}));for(n=i.header.length,c=0;c<n;c++)i.header[c].tokens=[],this.lexer.inlineTokens(i.header[c].text,i.header[c].tokens);for(n=i.rows.length,c=0;c<n;c++)for(S=i.rows[c],v=0;v<S.length;v++)S[v].tokens=[],this.lexer.inlineTokens(S[v].text,S[v].tokens);return i}}}lheading(e){const t=this.rules.block.lheading.exec(e);if(t){const i={type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:[]};return this.lexer.inline(i.text,i.tokens),i}}paragraph(e){const t=this.rules.block.paragraph.exec(e);if(t){const i={type:"paragraph",raw:t[0],text:t[1].charAt(t[1].length-1)===`
`?t[1].slice(0,-1):t[1],tokens:[]};return this.lexer.inline(i.text,i.tokens),i}}text(e){const t=this.rules.block.text.exec(e);if(t){const i={type:"text",raw:t[0],text:t[0],tokens:[]};return this.lexer.inline(i.text,i.tokens),i}}escape(e){const t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:Ar(t[1])}}tag(e){const t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&/^<a /i.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):Ar(t[0]):t[0]}}link(e){const t=this.rules.inline.link.exec(e);if(t){const i=t[2].trim();if(!this.options.pedantic&&/^</.test(i)){if(!/>$/.test(i))return;const c=kl(i.slice(0,-1),"\\");if((i.length-c.length)%2==0)return}else{const c=qS(t[2],"()");if(c>-1){const S=(t[0].indexOf("!")===0?5:4)+t[1].length+c;t[2]=t[2].substring(0,c),t[0]=t[0].substring(0,S).trim(),t[3]=""}}let n=t[2],s="";if(this.options.pedantic){const c=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(n);c&&(n=c[1],s=c[3])}else s=t[3]?t[3].slice(1,-1):"";return n=n.trim(),/^</.test(n)&&(this.options.pedantic&&!/>$/.test(i)?n=n.slice(1):n=n.slice(1,-1)),jg(t,{href:n&&n.replace(this.rules.inline._escapes,"$1"),title:s&&s.replace(this.rules.inline._escapes,"$1")},t[0],this.lexer)}}reflink(e,t){let i;if((i=this.rules.inline.reflink.exec(e))||(i=this.rules.inline.nolink.exec(e))){let n=(i[2]||i[1]).replace(/\s+/g," ");if(n=t[n.toLowerCase()],!n||!n.href){const s=i[0].charAt(0);return{type:"text",raw:s,text:s}}return jg(i,n,i[0],this.lexer)}}emStrong(e,t,i=""){let n=this.rules.inline.emStrong.lDelim.exec(e);if(!n||n[3]&&i.match(/[\p{L}\p{N}]/u))return;const s=n[1]||n[2]||"";if(!s||s&&(i===""||this.rules.inline.punctuation.exec(i))){const c=n[0].length-1;let v,S,N=c,U=0;const X=n[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(X.lastIndex=0,t=t.slice(-1*e.length+c);(n=X.exec(t))!=null;){if(v=n[1]||n[2]||n[3]||n[4]||n[5]||n[6],!v)continue;if(S=v.length,n[3]||n[4]){N+=S;continue}else if((n[5]||n[6])&&c%3&&!((c+S)%3)){U+=S;continue}if(N-=S,N>0)continue;if(S=Math.min(S,S+N+U),Math.min(c,S)%2){const ce=e.slice(1,c+n.index+S);return{type:"em",raw:e.slice(0,c+n.index+S+1),text:ce,tokens:this.lexer.inlineTokens(ce,[])}}const ne=e.slice(2,c+n.index+S-1);return{type:"strong",raw:e.slice(0,c+n.index+S+1),text:ne,tokens:this.lexer.inlineTokens(ne,[])}}}}codespan(e){const t=this.rules.inline.code.exec(e);if(t){let i=t[2].replace(/\n/g," ");const n=/[^ ]/.test(i),s=/^ /.test(i)&&/ $/.test(i);return n&&s&&(i=i.substring(1,i.length-1)),i=Ar(i,!0),{type:"codespan",raw:t[0],text:i}}}br(e){const t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e){const t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2],[])}}autolink(e,t){const i=this.rules.inline.autolink.exec(e);if(i){let n,s;return i[2]==="@"?(n=Ar(this.options.mangle?t(i[1]):i[1]),s="mailto:"+n):(n=Ar(i[1]),s=n),{type:"link",raw:i[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}url(e,t){let i;if(i=this.rules.inline.url.exec(e)){let n,s;if(i[2]==="@")n=Ar(this.options.mangle?t(i[0]):i[0]),s="mailto:"+n;else{let c;do c=i[0],i[0]=this.rules.inline._backpedal.exec(i[0])[0];while(c!==i[0]);n=Ar(i[0]),i[1]==="www."?s="http://"+n:s=n}return{type:"link",raw:i[0],text:n,href:s,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e,t){const i=this.rules.inline.text.exec(e);if(i){let n;return this.lexer.state.inRawBlock?n=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):Ar(i[0]):i[0]:n=Ar(this.options.smartypants?t(i[0]):i[0]),{type:"text",raw:i[0],text:n}}}}const kt={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?=\n|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)( [^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *(?:\n *)?<?([^\s>]+)>?(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,table:Sl,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,text:/^[^\n]+/};kt._label=/(?!\s*\])(?:\\.|[^\[\]\\])+/,kt._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,kt.def=Jt(kt.def).replace("label",kt._label).replace("title",kt._title).getRegex(),kt.bullet=/(?:[*+-]|\d{1,9}[.)])/,kt.listItemStart=Jt(/^( *)(bull) */).replace("bull",kt.bullet).getRegex(),kt.list=Jt(kt.list).replace(/bull/g,kt.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+kt.def.source+")").getRegex(),kt._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",kt._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,kt.html=Jt(kt.html,"i").replace("comment",kt._comment).replace("tag",kt._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),kt.paragraph=Jt(kt._paragraph).replace("hr",kt.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",kt._tag).getRegex(),kt.blockquote=Jt(kt.blockquote).replace("paragraph",kt.paragraph).getRegex(),kt.normal=Bi({},kt),kt.gfm=Bi({},kt.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)(?:\\| *)?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),kt.gfm.table=Jt(kt.gfm.table).replace("hr",kt.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",kt._tag).getRegex(),kt.gfm.paragraph=Jt(kt._paragraph).replace("hr",kt.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("table",kt.gfm.table).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",kt._tag).getRegex(),kt.pedantic=Bi({},kt.normal,{html:Jt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",kt._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Sl,paragraph:Jt(kt.normal._paragraph).replace("hr",kt.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",kt.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});const ut={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Sl,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(ref)\]/,nolink:/^!?\[(ref)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/^[^_*]*?\_\_[^_*]*?\*[^_*]*?(?=\_\_)|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/^[^_*]*?\*\*[^_*]*?\_[^_*]*?(?=\*\*)|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:Sl,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};ut._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",ut.punctuation=Jt(ut.punctuation).replace(/punctuation/g,ut._punctuation).getRegex(),ut.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,ut.escapedEmSt=/\\\*|\\_/g,ut._comment=Jt(kt._comment).replace("(?:-->|$)","-->").getRegex(),ut.emStrong.lDelim=Jt(ut.emStrong.lDelim).replace(/punct/g,ut._punctuation).getRegex(),ut.emStrong.rDelimAst=Jt(ut.emStrong.rDelimAst,"g").replace(/punct/g,ut._punctuation).getRegex(),ut.emStrong.rDelimUnd=Jt(ut.emStrong.rDelimUnd,"g").replace(/punct/g,ut._punctuation).getRegex(),ut._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,ut._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,ut._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,ut.autolink=Jt(ut.autolink).replace("scheme",ut._scheme).replace("email",ut._email).getRegex(),ut._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,ut.tag=Jt(ut.tag).replace("comment",ut._comment).replace("attribute",ut._attribute).getRegex(),ut._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,ut._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,ut._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,ut.link=Jt(ut.link).replace("label",ut._label).replace("href",ut._href).replace("title",ut._title).getRegex(),ut.reflink=Jt(ut.reflink).replace("label",ut._label).replace("ref",kt._label).getRegex(),ut.nolink=Jt(ut.nolink).replace("ref",kt._label).getRegex(),ut.reflinkSearch=Jt(ut.reflinkSearch,"g").replace("reflink",ut.reflink).replace("nolink",ut.nolink).getRegex(),ut.normal=Bi({},ut),ut.pedantic=Bi({},ut.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:Jt(/^!?\[(label)\]\((.*?)\)/).replace("label",ut._label).getRegex(),reflink:Jt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ut._label).getRegex()}),ut.gfm=Bi({},ut.normal,{escape:Jt(ut.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),ut.gfm.url=Jt(ut.gfm.url,"i").replace("email",ut.gfm._extended_email).getRegex(),ut.breaks=Bi({},ut.gfm,{br:Jt(ut.br).replace("{2,}","*").getRegex(),text:Jt(ut.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});function VS(r){return r.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function zg(r){let e="",t,i;const n=r.length;for(t=0;t<n;t++)i=r.charCodeAt(t),Math.random()>.5&&(i="x"+i.toString(16)),e+="&#"+i+";";return e}class gn{constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Js,this.options.tokenizer=this.options.tokenizer||new md,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const t={block:kt.normal,inline:ut.normal};this.options.pedantic?(t.block=kt.pedantic,t.inline=ut.pedantic):this.options.gfm&&(t.block=kt.gfm,this.options.breaks?t.inline=ut.breaks:t.inline=ut.gfm),this.tokenizer.rules=t}static get rules(){return{block:kt,inline:ut}}static lex(e,t){return new gn(t).lex(e)}static lexInline(e,t){return new gn(t).inlineTokens(e)}lex(e){e=e.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(e,this.tokens);let t;for(;t=this.inlineQueue.shift();)this.inlineTokens(t.src,t.tokens);return this.tokens}blockTokens(e,t=[]){this.options.pedantic&&(e=e.replace(/^ +$/gm,""));let i,n,s,c;for(;e;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(v=>(i=v.call({lexer:this},e,t))?(e=e.substring(i.raw.length),t.push(i),!0):!1))){if(i=this.tokenizer.space(e)){e=e.substring(i.raw.length),i.raw.length===1&&t.length>0?t[t.length-1].raw+=`
`:t.push(i);continue}if(i=this.tokenizer.code(e)){e=e.substring(i.raw.length),n=t[t.length-1],n&&(n.type==="paragraph"||n.type==="text")?(n.raw+=`
`+i.raw,n.text+=`
`+i.text,this.inlineQueue[this.inlineQueue.length-1].src=n.text):t.push(i);continue}if(i=this.tokenizer.fences(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.heading(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.hr(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.blockquote(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.list(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.html(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.def(e)){e=e.substring(i.raw.length),n=t[t.length-1],n&&(n.type==="paragraph"||n.type==="text")?(n.raw+=`
`+i.raw,n.text+=`
`+i.raw,this.inlineQueue[this.inlineQueue.length-1].src=n.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title});continue}if(i=this.tokenizer.table(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.lheading(e)){e=e.substring(i.raw.length),t.push(i);continue}if(s=e,this.options.extensions&&this.options.extensions.startBlock){let v=Infinity;const S=e.slice(1);let N;this.options.extensions.startBlock.forEach(function(U){N=U.call({lexer:this},S),typeof N=="number"&&N>=0&&(v=Math.min(v,N))}),v<Infinity&&v>=0&&(s=e.substring(0,v+1))}if(this.state.top&&(i=this.tokenizer.paragraph(s))){n=t[t.length-1],c&&n.type==="paragraph"?(n.raw+=`
`+i.raw,n.text+=`
`+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):t.push(i),c=s.length!==e.length,e=e.substring(i.raw.length);continue}if(i=this.tokenizer.text(e)){e=e.substring(i.raw.length),n=t[t.length-1],n&&n.type==="text"?(n.raw+=`
`+i.raw,n.text+=`
`+i.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=n.text):t.push(i);continue}if(e){const v="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(v);break}else throw new Error(v)}}return this.state.top=!0,t}inline(e,t){this.inlineQueue.push({src:e,tokens:t})}inlineTokens(e,t=[]){let i,n,s,c=e,v,S,N;if(this.tokens.links){const U=Object.keys(this.tokens.links);if(U.length>0)for(;(v=this.tokenizer.rules.inline.reflinkSearch.exec(c))!=null;)U.includes(v[0].slice(v[0].lastIndexOf("[")+1,-1))&&(c=c.slice(0,v.index)+"["+Gg("a",v[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(v=this.tokenizer.rules.inline.blockSkip.exec(c))!=null;)c=c.slice(0,v.index)+"["+Gg("a",v[0].length-2)+"]"+c.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(v=this.tokenizer.rules.inline.escapedEmSt.exec(c))!=null;)c=c.slice(0,v.index)+"++"+c.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;e;)if(S||(N=""),S=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(U=>(i=U.call({lexer:this},e,t))?(e=e.substring(i.raw.length),t.push(i),!0):!1))){if(i=this.tokenizer.escape(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.tag(e)){e=e.substring(i.raw.length),n=t[t.length-1],n&&i.type==="text"&&n.type==="text"?(n.raw+=i.raw,n.text+=i.text):t.push(i);continue}if(i=this.tokenizer.link(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(i.raw.length),n=t[t.length-1],n&&i.type==="text"&&n.type==="text"?(n.raw+=i.raw,n.text+=i.text):t.push(i);continue}if(i=this.tokenizer.emStrong(e,c,N)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.codespan(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.br(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.del(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.autolink(e,zg)){e=e.substring(i.raw.length),t.push(i);continue}if(!this.state.inLink&&(i=this.tokenizer.url(e,zg))){e=e.substring(i.raw.length),t.push(i);continue}if(s=e,this.options.extensions&&this.options.extensions.startInline){let U=Infinity;const X=e.slice(1);let ne;this.options.extensions.startInline.forEach(function(ce){ne=ce.call({lexer:this},X),typeof ne=="number"&&ne>=0&&(U=Math.min(U,ne))}),U<Infinity&&U>=0&&(s=e.substring(0,U+1))}if(i=this.tokenizer.inlineText(s,VS)){e=e.substring(i.raw.length),i.raw.slice(-1)!=="_"&&(N=i.raw.slice(-1)),S=!0,n=t[t.length-1],n&&n.type==="text"?(n.raw+=i.raw,n.text+=i.text):t.push(i);continue}if(e){const U="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(U);break}else throw new Error(U)}}return t}}class El{constructor(e){this.options=e||Js}code(e,t,i){const n=(t||"").match(/\S*/)[0];if(this.options.highlight){const s=this.options.highlight(e,n);s!=null&&s!==e&&(i=!0,e=s)}return e=e.replace(/\n$/,"")+`
`,n?'<pre><code class="'+this.options.langPrefix+Ar(n,!0)+'">'+(i?e:Ar(e,!0))+`</code></pre>
`:"<pre><code>"+(i?e:Ar(e,!0))+`</code></pre>
`}blockquote(e){return`<blockquote>
`+e+`</blockquote>
`}html(e){return e}heading(e,t,i,n){return this.options.headerIds?"<h"+t+' id="'+this.options.headerPrefix+n.slug(i)+'">'+e+"</h"+t+`>
`:"<h"+t+">"+e+"</h"+t+`>
`}hr(){return this.options.xhtml?`<hr/>
`:`<hr>
`}list(e,t,i){const n=t?"ol":"ul",s=t&&i!==1?' start="'+i+'"':"";return"<"+n+s+`>
`+e+"</"+n+`>
`}listitem(e){return"<li>"+e+`</li>
`}checkbox(e){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "}paragraph(e){return"<p>"+e+`</p>
`}table(e,t){return t&&(t="<tbody>"+t+"</tbody>"),`<table>
<thead>
`+e+`</thead>
`+t+`</table>
`}tablerow(e){return`<tr>
`+e+`</tr>
`}tablecell(e,t){const i=t.header?"th":"td";return(t.align?"<"+i+' align="'+t.align+'">':"<"+i+">")+e+"</"+i+`>
`}strong(e){return"<strong>"+e+"</strong>"}em(e){return"<em>"+e+"</em>"}codespan(e){return"<code>"+e+"</code>"}br(){return this.options.xhtml?"<br/>":"<br>"}del(e){return"<del>"+e+"</del>"}link(e,t,i){if(e=Hg(this.options.sanitize,this.options.baseUrl,e),e===null)return i;let n='<a href="'+Ar(e)+'"';return t&&(n+=' title="'+t+'"'),n+=">"+i+"</a>",n}image(e,t,i){if(e=Hg(this.options.sanitize,this.options.baseUrl,e),e===null)return i;let n='<img src="'+e+'" alt="'+i+'"';return t&&(n+=' title="'+t+'"'),n+=this.options.xhtml?"/>":">",n}text(e){return e}}class Wg{strong(e){return e}em(e){return e}codespan(e){return e}del(e){return e}html(e){return e}text(e){return e}link(e,t,i){return""+i}image(e,t,i){return""+i}br(){return""}}class Kg{constructor(){this.seen={}}serialize(e){return e.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")}getNextSafeSlug(e,t){let i=e,n=0;if(this.seen.hasOwnProperty(i)){n=this.seen[e];do n++,i=e+"-"+n;while(this.seen.hasOwnProperty(i))}return t||(this.seen[e]=n,this.seen[i]=0),i}slug(e,t={}){const i=this.serialize(e);return this.getNextSafeSlug(i,t.dryrun)}}class vn{constructor(e){this.options=e||Js,this.options.renderer=this.options.renderer||new El,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Wg,this.slugger=new Kg}static parse(e,t){return new vn(t).parse(e)}static parseInline(e,t){return new vn(t).parseInline(e)}parse(e,t=!0){let i="",n,s,c,v,S,N,U,X,ne,ce,be,ye,ge,ve,ke,Ce,Pe,Oe,Ze;const wt=e.length;for(n=0;n<wt;n++){if(ce=e[n],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[ce.type]&&(Ze=this.options.extensions.renderers[ce.type].call({parser:this},ce),Ze!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(ce.type))){i+=Ze||"";continue}switch(ce.type){case"space":continue;case"hr":{i+=this.renderer.hr();continue}case"heading":{i+=this.renderer.heading(this.parseInline(ce.tokens),ce.depth,qg(this.parseInline(ce.tokens,this.textRenderer)),this.slugger);continue}case"code":{i+=this.renderer.code(ce.text,ce.lang,ce.escaped);continue}case"table":{for(X="",U="",v=ce.header.length,s=0;s<v;s++)U+=this.renderer.tablecell(this.parseInline(ce.header[s].tokens),{header:!0,align:ce.align[s]});for(X+=this.renderer.tablerow(U),ne="",v=ce.rows.length,s=0;s<v;s++){for(N=ce.rows[s],U="",S=N.length,c=0;c<S;c++)U+=this.renderer.tablecell(this.parseInline(N[c].tokens),{header:!1,align:ce.align[c]});ne+=this.renderer.tablerow(U)}i+=this.renderer.table(X,ne);continue}case"blockquote":{ne=this.parse(ce.tokens),i+=this.renderer.blockquote(ne);continue}case"list":{for(be=ce.ordered,ye=ce.start,ge=ce.loose,v=ce.items.length,ne="",s=0;s<v;s++)ke=ce.items[s],Ce=ke.checked,Pe=ke.task,ve="",ke.task&&(Oe=this.renderer.checkbox(Ce),ge?ke.tokens.length>0&&ke.tokens[0].type==="paragraph"?(ke.tokens[0].text=Oe+" "+ke.tokens[0].text,ke.tokens[0].tokens&&ke.tokens[0].tokens.length>0&&ke.tokens[0].tokens[0].type==="text"&&(ke.tokens[0].tokens[0].text=Oe+" "+ke.tokens[0].tokens[0].text)):ke.tokens.unshift({type:"text",text:Oe}):ve+=Oe),ve+=this.parse(ke.tokens,ge),ne+=this.renderer.listitem(ve,Pe,Ce);i+=this.renderer.list(ne,be,ye);continue}case"html":{i+=this.renderer.html(ce.text);continue}case"paragraph":{i+=this.renderer.paragraph(this.parseInline(ce.tokens));continue}case"text":{for(ne=ce.tokens?this.parseInline(ce.tokens):ce.text;n+1<wt&&e[n+1].type==="text";)ce=e[++n],ne+=`
`+(ce.tokens?this.parseInline(ce.tokens):ce.text);i+=t?this.renderer.paragraph(ne):ne;continue}default:{const ct='Token with "'+ce.type+'" type was not found.';if(this.options.silent){console.error(ct);return}else throw new Error(ct)}}}return i}parseInline(e,t){t=t||this.renderer;let i="",n,s,c;const v=e.length;for(n=0;n<v;n++){if(s=e[n],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[s.type]&&(c=this.options.extensions.renderers[s.type].call({parser:this},s),c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type))){i+=c||"";continue}switch(s.type){case"escape":{i+=t.text(s.text);break}case"html":{i+=t.html(s.text);break}case"link":{i+=t.link(s.href,s.title,this.parseInline(s.tokens,t));break}case"image":{i+=t.image(s.href,s.title,s.text);break}case"strong":{i+=t.strong(this.parseInline(s.tokens,t));break}case"em":{i+=t.em(this.parseInline(s.tokens,t));break}case"codespan":{i+=t.codespan(s.text);break}case"br":{i+=t.br();break}case"del":{i+=t.del(this.parseInline(s.tokens,t));break}case"text":{i+=t.text(s.text);break}default:{const S='Token with "'+s.type+'" type was not found.';if(this.options.silent){console.error(S);return}else throw new Error(S)}}}return i}}function Mt(r,e,t){if(typeof r=="undefined"||r===null)throw new Error("marked(): input parameter is undefined or null");if(typeof r!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected");if(typeof e=="function"&&(t=e,e=null),e=Bi({},Mt.defaults,e||{}),$g(e),t){const i=e.highlight;let n;try{n=gn.lex(r,e)}catch(v){return t(v)}const s=function(v){let S;if(!v)try{e.walkTokens&&Mt.walkTokens(n,e.walkTokens),S=vn.parse(n,e)}catch(N){v=N}return e.highlight=i,v?t(v):t(null,S)};if(!i||i.length<3||(delete e.highlight,!n.length))return s();let c=0;Mt.walkTokens(n,function(v){v.type==="code"&&(c++,setTimeout(()=>{i(v.text,v.lang,function(S,N){if(S)return s(S);N!=null&&N!==v.text&&(v.text=N,v.escaped=!0),c--,c===0&&s()})},0))}),c===0&&s();return}try{const i=gn.lex(r,e);return e.walkTokens&&Mt.walkTokens(i,e.walkTokens),vn.parse(i,e)}catch(i){if(i.message+=`
Please report this to https://github.com/markedjs/marked.`,e.silent)return"<p>An error occurred:</p><pre>"+Ar(i.message+"",!0)+"</pre>";throw i}}Mt.options=Mt.setOptions=function(r){return Bi(Mt.defaults,r),xS(Mt.defaults),Mt},Mt.getDefaults=Ug,Mt.defaults=Js,Mt.use=function(...r){const e=Bi({},...r),t=Mt.defaults.extensions||{renderers:{},childTokens:{}};let i;r.forEach(n=>{if(n.extensions&&(i=!0,n.extensions.forEach(s=>{if(!s.name)throw new Error("extension name required");if(s.renderer){const c=t.renderers?t.renderers[s.name]:null;c?t.renderers[s.name]=function(...v){let S=s.renderer.apply(this,v);return S===!1&&(S=c.apply(this,v)),S}:t.renderers[s.name]=s.renderer}if(s.tokenizer){if(!s.level||s.level!=="block"&&s.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");t[s.level]?t[s.level].unshift(s.tokenizer):t[s.level]=[s.tokenizer],s.start&&(s.level==="block"?t.startBlock?t.startBlock.push(s.start):t.startBlock=[s.start]:s.level==="inline"&&(t.startInline?t.startInline.push(s.start):t.startInline=[s.start]))}s.childTokens&&(t.childTokens[s.name]=s.childTokens)})),n.renderer){const s=Mt.defaults.renderer||new El;for(const c in n.renderer){const v=s[c];s[c]=(...S)=>{let N=n.renderer[c].apply(s,S);return N===!1&&(N=v.apply(s,S)),N}}e.renderer=s}if(n.tokenizer){const s=Mt.defaults.tokenizer||new md;for(const c in n.tokenizer){const v=s[c];s[c]=(...S)=>{let N=n.tokenizer[c].apply(s,S);return N===!1&&(N=v.apply(s,S)),N}}e.tokenizer=s}if(n.walkTokens){const s=Mt.defaults.walkTokens;e.walkTokens=function(c){n.walkTokens.call(this,c),s&&s.call(this,c)}}i&&(e.extensions=t),Mt.setOptions(e)})},Mt.walkTokens=function(r,e){for(const t of r)switch(e.call(Mt,t),t.type){case"table":{for(const i of t.header)Mt.walkTokens(i.tokens,e);for(const i of t.rows)for(const n of i)Mt.walkTokens(n.tokens,e);break}case"list":{Mt.walkTokens(t.items,e);break}default:Mt.defaults.extensions&&Mt.defaults.extensions.childTokens&&Mt.defaults.extensions.childTokens[t.type]?Mt.defaults.extensions.childTokens[t.type].forEach(function(i){Mt.walkTokens(t[i],e)}):t.tokens&&Mt.walkTokens(t.tokens,e)}},Mt.parseInline=function(r,e){if(typeof r=="undefined"||r===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof r!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected");e=Bi({},Mt.defaults,e||{}),$g(e);try{const t=gn.lexInline(r,e);return e.walkTokens&&Mt.walkTokens(t,e.walkTokens),vn.parseInline(t,e)}catch(t){if(t.message+=`
Please report this to https://github.com/markedjs/marked.`,e.silent)return"<p>An error occurred:</p><pre>"+Ar(t.message+"",!0)+"</pre>";throw t}},Mt.Parser=vn,Mt.parser=vn.parse,Mt.Renderer=El,Mt.TextRenderer=Wg,Mt.Lexer=gn,Mt.lexer=gn.lex,Mt.Tokenizer=md,Mt.Slugger=Kg,Mt.parse=Mt;const vR=Mt.options,bR=Mt.setOptions,yR=Mt.use,wR=Mt.walkTokens,_R=Mt.parseInline,gd=Mt,SR=vn.parse,kR=gn.lex,Qg=/http(s)?\:\/\/github\.com\/([^\/]+)\/([^\/]+)\/blob\/([0-9a-fA-F]{40})\/([^#]+)#L(\d+)(-L(\d+))?/;function Yg(r){return r.match(Qg)}function $S(r){return!!Yg(r.body)}async function Jg(r,e,t=!0){const i=r[2],n=r[3],s=r[5],c=Number(r[6])-1,v=r[8]?Number(r[8])-1:c;let S;for(const U of e.folderManagers){const X=U.getGitHubRemotes();for(const ne of X)if(i.toLowerCase()===ne.owner.toLowerCase()&&n.toLowerCase()===ne.repositoryName.toLowerCase()){S=U;break}if(S)break}if(!S)return;const N=g.Uri.joinPath(S.repository.rootUri,s);try{await g.workspace.fs.stat(N)}catch(U){return}return{file:N,start:c,end:v}}async function GS(r,e){const t=Yg(r.body);if(!t){g.window.showInformationMessage("Issue has no link.");return}const i=await Jg(t,e,!1);if(!i)return g.env.openExternal(g.Uri.parse(t[0]));const n=await g.workspace.openTextDocument(i==null?void 0:i.file),s=n.lineAt(i.end<n.lineCount?i.end:n.lineCount-1),c=new g.Range(i.start,0,i.end,s.text.length);return g.window.showTextDocument(i.file,{selection:c})}var jS=Object.defineProperty,Zg=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?jS(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);const ER=/(([A-Za-z0-9_.\-]+)\/([A-Za-z0-9_.\-]+))?(#|GH-)([1-9][0-9]*)($|\b)/,za=/(https?:\/\/github\.com\/(([^\s]+)\/([^\s]+))\/([^\s]+\/)?(issues|pull)\/([0-9]+)(#issuecomment\-([0-9]+))?)|(([A-Za-z0-9_.\-]+)\/([A-Za-z0-9_.\-]+))?(#|GH-)([1-9][0-9]*)($|\b)/,vd=/\@([^\s]+)/,zS=150,Er="githubIssues",Zs="queries",WS="default",Xg="issueBranchTitle",ev="useBranchForIssues",KS="workingIssueFormatScm";function bd(r){if(!r)return;const e={owner:void 0,name:void 0,issueNumber:0};return r.length===7?(e.owner=r[2],e.name=r[3],e.issueNumber=parseInt(r[5]),e):r.length===16?(e.owner=r[3]||r[11],e.name=r[4]||r[12],e.issueNumber=parseInt(r[7]||r[14]),e.commentNumber=r[9]!==void 0?parseInt(r[9]):void 0,e):void 0}async function QS(r,e,t,i){var n;const s=(n=r.resolvedIssues.get(e.repository.rootUri.path))==null?void 0:n.get(t);if(s)return s;{let c,v,S;const N=e.getGitHubRemotes();for(const U of N){if(i)c=i.owner?i.owner:U.owner,v=i.name?i.name:U.repositoryName,S=i.issueNumber;else{const X=bd(t.match(za));X&&(!X.name||!X.owner)&&(c=U.owner,v=U.repositoryName)}if(c&&v&&S!==void 0){let X=await e.resolveIssue(c,v,S,!!i.commentNumber);if(X||(X=await e.resolvePullRequest(c,v,S)),X){let ne;return r.resolvedIssues.has(e.repository.rootUri.path)?ne=r.resolvedIssues.get(e.repository.rootUri.path):r.resolvedIssues.set(e.repository.rootUri.path,ne=new(RS())(50)),ne.set(t,X),X}}}}}function YS(r,e){let t;return r.commitContributions.forEach(i=>{e.toLowerCase()===i.repoNameWithOwner.toLowerCase()&&(t=i.createdAt.toLocaleString("default",{day:"numeric",month:"short",year:"numeric"}))}),t}class JS extends g.CompletionItem{constructor(){super(...arguments);Zg(this,"login"),Zg(this,"uri")}}function yd(r,e){const t=new g.MarkdownString(void 0,!0);t.appendMarkdown(`![Avatar](${e.avatarUrl}|height=50,width=50) **${e.name}** [${e.login}](${e.url})`),e.bio&&t.appendText(` \r
`+e.bio.replace(/\r\n/g," "));const i=YS(e,r.owner+"/"+r.repo);return(e.location||i)&&t.appendMarkdown(` \r
\r
---`),e.location&&t.appendMarkdown(` \r
$(location) ${e.location}`),i&&t.appendMarkdown(` \r
$(git-commit) Committed to this repository on ${i}`),e.company&&t.appendMarkdown(` \r
$(jersey) Member of ${e.company}`),t}function ZS(r){const e=/^([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(r);return e?{r:parseInt(e[1],16),g:parseInt(e[2],16),b:parseInt(e[3],16)}:void 0}function XS(r,e){const t=ZS(r);let i="ffffff";return t&&(.299*t.r+.587*t.g+.114*t.b)/255>.5&&(i="000000"),`<span style="color:#${i};background-color:#${r};">&nbsp;&nbsp;${e}&nbsp;&nbsp;</span>`}async function tv(r,e,t){let i=r.search(e),n=0;for(;i>=0&&i<r.length;){let s;if(i===0||r.charAt(i-1)!=="&"){const v=r.substring(i).match(e);if(v){const S=await t(v);S&&(s=r.slice(0,i)+S,r=s+r.slice(i+v[0].length))}}n=s?s.length:i+1;const c=r.substring(n).search(e);i=c>0?n+c:c}return r}function rv(r,e){return tv(r,za,async t=>{const i=bd(t);if(i){const n=uv(i);return(!i.owner||!i.name)&&(i.owner=e.remote.owner,i.name=e.remote.repositoryName),`[${n}](https://github.com/${i.owner}/${i.name}/issues/${i.issueNumber})`}})}async function ek(r,e){return tv(r,Qg,async t=>{const i=await Jg(t,e);if(i){const n=await g.workspace.openTextDocument(i==null?void 0:i.file),s=n.lineAt(i.end<n.lineCount?i.end:n.lineCount-1),c=[i.file,{selection:{start:{line:i.start,character:0},end:{line:i.end,character:s.text.length}}}],v=g.Uri.parse(`command:vscode.open?${encodeURIComponent(JSON.stringify(c))}`);return`[${t[0]}](${v} "Open ${i.file.fsPath}")`}})}const Rl=200;async function wd(r,e,t,i){const n=new g.MarkdownString(void 0,!0);n.isTrusted=!0;const s=new Date(r.createdAt),c=`${r.remote.owner}/${r.remote.repositoryName}`;n.appendMarkdown(`[${c}](https://github.com/${c}) on ${s.toLocaleString("default",{day:"numeric",month:"short",year:"numeric"})}
`);const v=gd(r.title,{renderer:new Ed}).trim();n.appendMarkdown(`${rk(r)} **${v}** [#${r.number}](${r.html_url})
`);let S=gd(r.body,{renderer:new Ed});if(n.appendMarkdown(`
`),S=S.length>Rl?S.substr(0,Rl)+"...":S,S=await rv(S,r),S=await ek(S,t),n.appendMarkdown(S+`
`),n.appendMarkdown(`&nbsp;
`),r.item.labels.length>0&&r.item.labels.forEach(N=>{n.appendMarkdown(`[${XS(N.color,N.name)}](https://github.com/${c}/labels/${encodeURIComponent(N.name)}) `)}),r.item.comments&&i){for(const N of r.item.comments)if(N.databaseId===i){n.appendMarkdown(` \r
\r
---\r
`),n.appendMarkdown(`&nbsp;
`),n.appendMarkdown(`![Avatar](${N.author.avatarUrl}|height=15,width=15) &nbsp;&nbsp;**${N.author.login}** commented`),n.appendMarkdown(`&nbsp;
`);let U=gd(N.body.length>Rl?N.body.substr(0,Rl)+"...":N.body,{renderer:new Ed});U=await rv(U,r),n.appendMarkdown(U)}}return n}function tk(r){switch(r.state){case lr.Open:return r instanceof pn?"$(git-pull-request)":"$(issues)";case lr.Closed:return r instanceof pn?"$(git-pull-request)":"$(issue-closed)";case lr.Merged:return"$(git-merge)"}}function rk(r){if(r instanceof pn)return tk(r);switch(r.state){case lr.Open:return'<span style="color:#22863a;">$(issues)</span>';case lr.Closed:return'<span style="color:#cb2431;">$(issue-closed)</span>'}}const iv="HEAD",ik=1,nk=2,sk=3,nv=4,xl=new Map([["upstream",ik],["ups",nk],["origin",sk]]);async function ak(r,e){var t,i,n;const s=((t=r.state.HEAD)==null?void 0:t.upstream)&&!xl.has(r.state.HEAD.upstream.remote)?r.state.HEAD.upstream.remote:void 0;let c;const v=r.state.remotes.map(X=>({name:X.name,remote:X})).filter(X=>(X.name===s&&(c=X.remote),xl.has(X.name))).sort((X,ne)=>{var ce,be;const ye=(ce=xl.get(X.name))!=null?ce:nv,ge=(be=xl.get(ne.name))!=null?be:nv;return ye-ge});s&&v.push({name:s,remote:c});const S=[iv];((i=r.state.HEAD)==null?void 0:i.name)&&r.state.HEAD.name!==iv&&S.unshift((n=r.state.HEAD)==null?void 0:n.name);let N,U;for(let X=0;X<S.length&&!N;X++)for(let ne=0;ne<v.length&&!N;ne++){const ce=(await r.getBranches({contains:e.hash,remote:!0,pattern:`remotes/${v[ne].name}/${S[X]}`,count:1})).filter(be=>be.remote&&be.name);ce&&ce.length>0&&(N=ce[0],U=v[ne].remote)}return U}function sv(r,e){var t;let i,n;if(r)i=r,((t=g.window.activeTextEditor)==null?void 0:t.document.uri.fsPath)===i.fsPath&&(n=g.window.activeTextEditor.selection);else if(!e&&g.window.activeTextEditor)i=g.window.activeTextEditor.document.uri,n=g.window.activeTextEditor.selection;else if(e)i=e.document.uri,n=e.range;else return{uri:void 0,range:void 0};return{uri:i,range:n}}function av(r){var e;if((e=r.state.HEAD)==null?void 0:e.upstream){for(const t of r.state.remotes)if(r.state.HEAD.upstream.remote===t.name)return t}}async function _d(r,e,t){var i;const{uri:n,range:s}=sv(t,e);if(!n)return{permalink:void 0,error:"No active text editor position to create permalink from.",originalFile:void 0};const c=ld(r,n);if(!c)return{permalink:void 0,error:"The current file isn't part of repository.",originalFile:n};let v,S;try{const ne=await c.log({maxEntries:1,path:n.fsPath});if(ne.length===0)return{permalink:void 0,error:"No branch on a remote contains the most recent commit for the file.",originalFile:n};v=ne[0],S=ne[0].hash}catch(ne){S=(i=c.state.HEAD)==null?void 0:i.commit}const N=new Promise(ne=>{ne(av(c))});let U=v?await Promise.race([ak(c,v),new Promise(ne=>{setTimeout(()=>{ne(N)},1500)})]):await N;if((!U||!U.fetchUrl)&&(U=await N,!U||!U.fetchUrl))return{permalink:void 0,error:"The selection may not exist on any remote.",originalFile:n};const X=n.path.substring(c.rootUri.path.length);return{permalink:`https://github.com/${new un(U.fetchUrl).nameWithOwner}/blob/${S}${X}${ov(s)}`,error:void 0,originalFile:n}}function ov(r){if(!r)return"";let e=`#L${r.start.line+1}`;return r.start.line!==r.end.line&&(e+=`-L${r.end.line+1}`),e}async function ok(r,e){const{uri:t,range:i}=sv(e);if(!t)return{permalink:void 0,error:"No active text editor position to create permalink from.",originalFile:void 0};const n=r.getManagerForFile(t);if(!n)return{permalink:void 0,error:"Current file does not belong to an open repository.",originalFile:void 0};const s=await n.getPullRequestDefaults(),c=av(n.repository);if(!(c==null?void 0:c.fetchUrl))return{permalink:void 0,error:"Repository does not have any remotes.",originalFile:void 0};const v=t.path.substring(n.repository.rootUri.path.length);return{permalink:`https://github.com/${new un(c.fetchUrl).nameWithOwner}/blob/${s.base}${v}${ov(i)}`,error:void 0,originalFile:t}}function lv(r){const e=/[~^:;'".,~#?%*[\]@\\{}()]|\/\//g;return r.replace(e,"").trim().replace(/\s+/g,"-")}const lk=/\$\{(.*?)\}/g;async function Tl(r,e,t,i){return r.replace(lk,(n,s)=>{switch(s){case"user":return i||n;case"issueNumber":return e?`${e.number}`:n;case"issueNumberLabel":return e?`${Xs(e,t)}`:n;case"issueTitle":return e?e.title:n;case"repository":return t?t.repo:n;case"owner":return t?t.owner:n;case"sanitizedIssueTitle":return e?lv(e.title):n;case"sanitizedLowercaseIssueTitle":return e?lv(e.title).toLowerCase():n;default:return n}})}function Xs(r,e){const t={issueNumber:r.number,owner:void 0,name:void 0};return e&&(e.owner.toLowerCase()!==r.remote.owner.toLowerCase()||e.repo.toLowerCase()!==r.remote.repositoryName.toLowerCase())&&(t.owner=r.remote.owner,t.name=r.remote.repositoryName),uv(t)}function uv(r){return!r.owner||!r.name?`#${r.issueNumber}`:`${r.owner}/${r.name}#${r.issueNumber}`}async function cv(r,e,t){var i;const n=await((i=e.currentIssue(r.repository.rootUri))==null?void 0:i.getCommitMessage());if(n)return r.repository.commit(n,{all:t})}const dv="Commit Staged",fv="Commit All";async function uk(r,e,t){var i,n;if(r.repository.state.workingTreeChanges.length>0||r.repository.state.indexChanges.length>0){const s=[];switch(r.repository.state.indexChanges&&s.push(dv),r.repository.state.workingTreeChanges&&s.push(fv),await g.window.showInformationMessage("There are uncommitted changes. Do you want to commit them with the default commit message?",{modal:!0},...s)){case dv:{await cv(r,t,!1);break}case fv:{await cv(r,t,!0);break}default:return!1}}if((i=r.repository.state.HEAD)==null?void 0:i.upstream)return await r.repository.push(),await e.createPullRequest(void 0),!0;{let s;return r.repository.state.remotes.length===1?s=r.repository.state.remotes[0].name:r.repository.state.remotes.length>1&&(s=await g.window.showQuickPick(r.repository.state.remotes.map(c=>c.name),{placeHolder:"Remote to push to"})),s?(await r.repository.push(s,(n=r.repository.state.HEAD)==null?void 0:n.name,!0),await e.createPullRequest(void 0),!0):(g.window.showWarningMessage("The current repository has no remotes to push to. Please set up a remote and try again."),!1)}}async function Sd(r,e){return!(r.languageId!=="markdown"&&r.languageId!=="plaintext"&&(await g.languages.getTokenInformationAtPosition(r,e)).type!==g.StandardTokenType.Comment)}async function hv(r,e){return r.lineAt(e.line).range.end.character>1e4?!1:Sd(r,e)}function kd(r){const e=new kS.URLSearchParams(r.query).get("rootUri");return e?g.Uri.parse(e):void 0}class Ed extends El{code(e){return e}blockquote(e){return e}html(e){return""}heading(e,t,i,n){return e+" "}hr(){return""}list(e,t,i){return e}listitem(e){return" "+e}checkbox(e){return""}paragraph(e){return e.replace(/\</g,"\\<").replace(/\>/g,"\\>")+" "}table(e,t){return e+" "+t}tablerow(e){return e}tablecell(e,t){return e}strong(e){return e}em(e){return e}codespan(e){return`\\\`${e}\\\``}br(){return" "}del(e){return e}image(e,t,i){return""}text(e){return e}link(e,t,i){return i+" "}}var ck=Object.defineProperty,dk=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?ck(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);const pv="github-pr-remote",mv="github-pr-owner-number",gv=/branch\.(.+)\.github-pr-owner-number/,fk=/branch\.(.+)\.remote/,ir=class{static async checkoutFromFork(r,e,t){const i=await ir.calculateUniqueBranchNameForPR(r,e);t||(xe.appendLine(`Branch ${i} is from a fork. Create a remote first.`,ir.ID),t=await ir.createRemote(r,e.remote,e.head.repositoryCloneUrl));const n=`${e.head.ref}:${i}`;xe.debug(`Fetch ${t}/${e.head.ref}:${i} - start`,ir.ID),await r.fetch(t,n,1),xe.debug(`Fetch ${t}/${e.head.ref}:${i} - done`,ir.ID),await r.checkout(i),await r.setBranchUpstream(i,`refs/remotes/${t}/${e.head.ref}`),await this.unshallow(r),await ir.associateBranchWithPullRequest(r,e,i)}static async fetchAndCheckout(r,e,t){var i;if(!t.validatePullRequestModel("Checkout pull request failed"))return;const n=ir.getHeadRemoteForPullRequest(e,t),s=t.head.repositoryCloneUrl.owner!==t.base.repositoryCloneUrl.owner;if(!n||s)return ir.checkoutFromFork(r,t,n&&n.remoteName);const c=t.head.ref,v=n.remoteName;let S;try{if(S=await r.getBranch(c),((i=r.state.HEAD)==null?void 0:i.name)===S.name){xe.appendLine(`Tried to checkout ${c}, but branch is already checked out.`,ir.ID);return}if(xe.debug(`Checkout ${c}`,ir.ID),await r.checkout(c),!S.upstream){const N=`refs/remotes/${v}/${c}`;await r.setBranchUpstream(c,N)}S.behind!==void 0&&S.behind>0&&S.ahead===0&&(xe.debug("Pull from upstream",ir.ID),await r.pull())}catch(N){xe.appendLine(`Branch ${v}/${c} doesn't exist on local disk yet.`,ir.ID);const U=`refs/remotes/${v}/${c}`;xe.appendLine(`Fetch tracked branch ${U}`,ir.ID),await r.fetch(v,c,1);const X=await r.getBranch(U);await r.createBranch(c,!0,X.commit),await r.setBranchUpstream(c,U),await this.unshallow(r)}await ir.associateBranchWithPullRequest(r,t,c)}static async unshallow(r){try{await r.pull(!0)}catch(e){xe.appendLine(`Unshallowing failed: ${e}. Falling back to git pull`);try{await r.pull(!1)}catch(t){throw xe.appendLine(`Pull after failed unshallow still failed: ${t}`),t}}}static async checkoutExistingPullRequestBranch(r,e){const t=ir.buildPullRequestMetadata(e),i=await r.getConfigs(),n=c=>i.filter(({key:v})=>c===v).map(({value:v})=>v)[0],s=i.map(c=>{const v=gv.exec(c.key);return{branch:v&&v.length?v[1]:null,value:c.value}}).filter(c=>c.branch&&c.value===t);if(s&&s.length){const c=s[0].branch;await r.checkout(c);const v=n(`branch.${c}.remote`),S=n(`branch.${c}.merge`);await r.fetch(v,S);const N=await r.getBranch(s[0].branch);return N.behind!==void 0&&N.behind>0&&N.ahead===0&&(xe.debug("Pull from upstream",ir.ID),await r.pull()),!0}else return!1}static async getBranchNRemoteForPullRequest(r,e){const t=ir.buildPullRequestMetadata(e),i=await r.getConfigs(),n=i.map(s=>{const c=gv.exec(s.key);return{branch:c&&c.length?c[1]:null,value:s.value}}).find(s=>!!s.branch&&s.value===t);if(n){const s=n.branch;try{const c=`branch.${s}.remote`,v=i.filter(X=>X.key===c).map(X=>X.value);let S;v.length&&(S=v[0]);let N=!1;if(S){const X=`remote.${S}.github-pr-remote`;i.filter(ce=>ce.key===X&&ce.value).length&&(N=!0)}let U;return N&&(U=i.some(X=>!!(fk.exec(X.key)&&X.key!==`branch.${s}.remote`&&X.value===S))),{branch:s,remote:S,createdForPullRequest:N,remoteInUse:U}}catch(c){return{branch:s}}}return null}static buildPullRequestMetadata(r){return`${r.base.repositoryCloneUrl.owner}#${r.base.repositoryCloneUrl.repositoryName}#${r.number}`}static parsePullRequestMetadata(r){if(r){const e=/(.*)#(.*)#(.*)/g.exec(r);if(e&&e.length===4){const[,t,i,n]=e;return{owner:t,repositoryName:i,prNumber:Number(n)}}}}static getMetadataKeyForBranch(r){return`branch.${r}.${mv}`}static async getMatchingPullRequestMetadataForBranch(r,e){try{const t=this.getMetadataKeyForBranch(e),i=await r.getConfig(t);return ir.parsePullRequestMetadata(i)}catch(t){return}}static async createRemote(r,e,t){xe.appendLine(`create remote for ${t}.`,ir.ID);const i=Qs(r);for(const s of i)if(new un(s.url).equals(t))return s.remoteName;const n=ir.getUniqueRemoteName(r,t.owner);return t.update({type:e.gitProtocol.type}),await r.addRemote(n,t.toString()),await r.setConfig(`remote.${n}.${pv}`,"true"),n}static async isRemoteCreatedForPullRequest(r,e){try{xe.debug(`Check if remote '${e}' is created for pull request - start`,ir.ID);const t=await r.getConfig(`remote.${e}.${pv}`);return xe.debug(`Check if remote '${e}' is created for pull request - end`,ir.ID),t==="true"}catch(t){return!1}}static async calculateUniqueBranchNameForPR(r,e){const t=`pr/${e.author.login}/${e.number}`;let i=t,n=1;for(;;)try{await r.getBranch(i),i=`${t}-${n++}`}catch(s){break}return i}static getUniqueRemoteName(r,e){let t=e,i=1;const n=Qs(r);for(;n.find(s=>s.remoteName===t);)t=`${e}${i++}`;return t}static getHeadRemoteForPullRequest(r,e){return r.find(t=>t.gitProtocol&&t.gitProtocol.equals(e.head.repositoryCloneUrl))}static async associateBranchWithPullRequest(r,e,t){xe.appendLine(`associate ${t} with Pull Request #${e.number}`,ir.ID);const i=`branch.${t}.${mv}`;await r.setConfig(i,ir.buildPullRequestMetadata(e))}};let qi=ir;dk(qi,"ID","PullRequestGitHelper");var hk=Object.defineProperty,Zt=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?hk(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);class pk extends Error{constructor(e){super();this.repository=e}get message(){return`${this.repository.rootUri.toString()} has no GitHub remotes`}}class vv extends Error{constructor(e){super();this.repository=e}get message(){return`${this.repository.rootUri.toString()} has a detached HEAD (create a branch first)`}}class mk extends Error{constructor(e,t,i){super();this.branchName=e,this.upstreamRef=t,this.problem=i}get message(){const{upstreamRef:{remote:e,name:t},branchName:i,problem:n}=this;return`The upstream ref ${e}/${t} for branch ${i} ${n}.`}}const Ir="githubPullRequests",Wa="remotes",bv="ReposManagerStateContext";var ki;(function(r){r.Initializing="Initializing",r.NeedsAuthentication="NeedsAuthentication",r.RepositoriesLoaded="RepositoriesLoaded"})(ki||(ki={}));const yv="No Milestone";var wv;(function(r){r[r.PullRequest=0]="PullRequest",r[r.Milestones=1]="Milestones",r[r.IssuesWithoutMilestone=2]="IssuesWithoutMilestone",r[r.IssueSearch=3]="IssueSearch"})(wv||(wv={}));const Ei=class{constructor(r,e,t,i,n,s){this.context=r,this._repository=e,this.telemetry=t,this._git=i,this._credentialStore=n,this._sessionState=s,Zt(this,"_subs"),Zt(this,"_activePullRequest"),Zt(this,"_activeIssue"),Zt(this,"_githubRepositories"),Zt(this,"_allGitHubRemotes",[]),Zt(this,"_mentionableUsers"),Zt(this,"_fetchMentionableUsersPromise"),Zt(this,"_assignableUsers"),Zt(this,"_fetchAssignableUsersPromise"),Zt(this,"_gitBlameCache",{}),Zt(this,"_githubManager"),Zt(this,"_repositoryPageInformation",new Map),Zt(this,"_onDidMergePullRequest",new g.EventEmitter),Zt(this,"onDidMergePullRequest",this._onDidMergePullRequest.event),Zt(this,"_onDidChangeActivePullRequest",new g.EventEmitter),Zt(this,"onDidChangeActivePullRequest",this._onDidChangeActivePullRequest.event),Zt(this,"_onDidChangeActiveIssue",new g.EventEmitter),Zt(this,"onDidChangeActiveIssue",this._onDidChangeActiveIssue.event),Zt(this,"_onDidLoadRepositories",new g.EventEmitter),Zt(this,"onDidLoadRepositories",this._onDidLoadRepositories.event),Zt(this,"_onDidChangeRepositories",new g.EventEmitter),Zt(this,"onDidChangeRepositories",this._onDidChangeRepositories.event),Zt(this,"_onDidChangeAssignableUsers",new g.EventEmitter),Zt(this,"onDidChangeAssignableUsers",this._onDidChangeAssignableUsers.event),Zt(this,"_updatingRepositories"),Zt(this,"totalFetchedPages",new Map),this._subs=[],this._githubRepositories=[],this._githubManager=new mc,this._subs.push(g.workspace.onDidChangeConfiguration(async c=>{c.affectsConfiguration(`${Ir}.${Wa}`)&&await this.updateRepositories()})),this._subs.push(n.onDidInitialize(()=>this.updateRepositories())),this.setUpCompletionItemProvider(),this.cleanStoredRepoState()}cleanStoredRepoState(){const r=new Date().valueOf()-30*864e5,e=this.context.globalState.get(ja);if(e==null?void 0:e.repos){let t=!1;Object.keys(e.repos).forEach(i=>{var n;((n=e.repos[i].stateModifiedTime)!=null?n:0)<r&&(t=!0,delete e.repos[i])}),t&&this.context.globalState.update(ja,e)}}get gitHubRepositories(){return this._githubRepositories}computeAllGitHubRemotes(){const e=Qs(this.repository).filter(t=>t.host);return Promise.all(e.map(t=>this._githubManager.isGitHub(t.gitProtocol.normalizeUri()))).then(t=>e.filter((i,n,s)=>t[n])).catch(t=>(xe.appendLine(`Resolving GitHub remotes failed: ${t}`),g.window.showErrorMessage(`Resolving GitHub remotes failed: ${bt(t)}`),[]))}async getActiveGitHubRemotes(r){const e=g.workspace.getConfiguration(Ir).get(Wa);if(!e)return xe.appendLine("Unable to read remotes setting"),Promise.resolve([]);const t=e.filter(i=>!r.some(n=>n.remoteName===i));return t.length===e.length?xe.appendLine(`No remotes found. The following remotes are missing: ${t.join(", ")}`):xe.debug(`Not all remotes found. The following remotes are missing: ${t.join(", ")}`,Ei.ID),xe.debug(`Displaying configured remotes: ${e.join(", ")}`,Ei.ID),e.map(i=>r.find(n=>n.remoteName===i)).filter(i=>!!i)}setUpCompletionItemProvider(){let r,e=[],t=[];g.languages.registerCompletionItemProvider({scheme:"comment"},{provideCompletionItems:async(i,n,s)=>{try{const c=JSON.parse(i.uri.query);if(zo(c.extensionId,ss)!==0)return;const v=i.getWordRangeAtPosition(n,/@([a-z\d](?:[a-z\d]|-(?=[a-z\d])){0,38})?/i);if(!v||v.isEmpty)return;let S=[];const N={};let U={},X,ne;const ce=g.window.visibleTextEditors;if(ce.length){const Ce=ce.find(Pe=>Pe.document.uri.scheme==="pr");if(Ce){const Pe=ti(Ce.document.uri);X=Pe.prNumber,ne=Pe.remoteName}else this._activePullRequest&&(X=this._activePullRequest.number,ne=this._activePullRequest.remote.remoteName);if(r&&X&&X===r.number)return t}const be=new Promise(async Ce=>{if(X&&ne){if(xe.debug("get Timeline Events and parse users",Ei.ID),r&&r.number===X)return e;const Pe=this._githubRepositories.find(Oe=>Oe.remote.remoteName===ne);Pe&&(r=await Pe.getPullRequest(X),e=await r.getTimelineEvents()),S=hS(e),Ce()}Ce()}),ye=new Promise(async Ce=>{if(ce.length)try{xe.debug("git blame and parse users",Ei.ID);const Pe=qt.resolve(ce[0].document.uri.fsPath);let Oe;this._gitBlameCache[Pe]?Oe=this._gitBlameCache[Pe]:(Oe=await this.repository.blame(Pe),this._gitBlameCache[Pe]=Oe);const Ze=Oe.split(`
`);for(const wt of Ze){const ct=/^\w{11} \S*\s*\((.*)\s*\d{4}\-/.exec(wt);if(ct&&ct.length===2){const _t=ct[1].trim();N[_t]=!0}}}catch(Pe){xe.debug(Pe,Ei.ID)}Ce()}),ge=new Promise(async Ce=>{xe.debug("get mentionable users",Ei.ID),U=await this.getMentionableUsers(),Ce()});await Promise.all([be,ye,ge]),t=[];const ve={};xe.debug("prepare user suggestions",Ei.ID),S.forEach(Ce=>{ve[Ce.login]||(ve[Ce.login]=Ce)});const ke={};for(const Ce in U)for(const Pe of U[Ce])if(!ve[Pe.login]&&!ke[Pe.login]){ke[Pe.login]=!0;let Oe=2;(N[Pe.login]||Pe.name&&N[Pe.name])&&(Oe=1),ve[Pe.login]&&(Oe=0),t.push({label:Pe.login,insertText:Pe.login,filterText:`${Pe.login}`+(Pe.name&&Pe.name!==Pe.login?`_${Pe.name.toLowerCase().replace(" ","_")}`:""),sortText:`${Oe}_${Pe.login}`,detail:Pe.name,kind:g.CompletionItemKind.User,login:Pe.login,uri:this.repository.rootUri})}for(const Ce in ve)ke[Ce]||t.push({label:ve[Ce].login,insertText:`${ve[Ce].login}`,filterText:`${ve[Ce].login}`+(ve[Ce].name&&ve[Ce].name!==ve[Ce].login?`_${ve[Ce].name.toLowerCase().replace(" ","_")}`:""),sortText:`0_${ve[Ce].login}`,detail:ve[Ce].name,kind:g.CompletionItemKind.User,login:ve[Ce].login,uri:this.repository.rootUri});return xe.debug("done",Ei.ID),t}catch(c){return[]}},resolveCompletionItem:async(i,n)=>{try{const s=await this.getPullRequestDefaults(),c=await this.resolveUser(s.owner,s.repo,typeof i.label=="string"?i.label:i.label.label);c&&(i.documentation=yd(s,c))}catch(s){}return i}},"@")}get activeIssue(){return this._activeIssue}set activeIssue(r){this._activeIssue=r,this._onDidChangeActiveIssue.fire()}get activePullRequest(){return this._activePullRequest}set activePullRequest(r){this._activePullRequest&&(this._activePullRequest.isActive=!1),r&&(r.isActive=!0),this._activePullRequest=r,this._onDidChangeActivePullRequest.fire()}get repository(){return this._repository}set repository(r){this._repository=r}get credentialStore(){return this._credentialStore}async loginAndUpdate(){if(!this._credentialStore.isAnyAuthenticated()){const r=new Promise(e=>{const t=this.onDidChangeRepositories(()=>{t.dispose(),e()})});await this._credentialStore.login(jt.github),await r}}async getActiveRemotes(){this._allGitHubRemotes=await this.computeAllGitHubRemotes();const r=await this.getActiveGitHubRemotes(this._allGitHubRemotes);return r.length?(await g.commands.executeCommand("setContext","github:hasGitHubRemotes",!0),xe.appendLine("Found GitHub remote")):(await g.commands.executeCommand("setContext","github:hasGitHubRemotes",!1),xe.appendLine("No GitHub remotes found")),r}async updateRepositories(r=!1){return this._updatingRepositories&&await this._updatingRepositories,this._updatingRepositories=this.doUpdateRepositories(r),this._updatingRepositories}async doUpdateRepositories(r){if(this._git.state==="uninitialized"){xe.appendLine("Cannot updates repositories as git is uninitialized");return}const e=await this.getActiveRemotes(),t=this._credentialStore.isAuthenticated(jt.github)||this._credentialStore.isAuthenticated(jt["github-enterprise"]);g.commands.executeCommand("setContext","github:authenticated",t);const i=[],n=[],s=[];return this._githubRepositories.forEach(v=>s.push(v)),e.filter(v=>this._credentialStore.isAuthenticated(v.authProviderId)).forEach(v=>{const S=this.createGitHubRepository(v,this._credentialStore);n.push(S.resolveRemote()),i.push(S)}),Promise.all(n).then(async v=>{if(v.some(N=>!N))return this._credentialStore.showSamlMessageAndAuth();this._githubRepositories=i,s.filter(N=>this._githubRepositories.indexOf(N)<0).forEach(N=>N.dispose());const S=s.length!==this._githubRepositories.length||!s.every(N=>this._githubRepositories.some(U=>U.remote.equals(N.remote)));if(this._githubRepositories.length&&S&&await this.checkIfMissingUpstream()){this.updateRepositories(r);return}this.activePullRequest&&this.getMentionableUsers(S,!0),this.getAssignableUsers(S),t&&e.length?this._onDidLoadRepositories.fire(ki.RepositoriesLoaded):t||this._onDidLoadRepositories.fire(ki.NeedsAuthentication),r||this._onDidChangeRepositories.fire()})}async checkIfMissingUpstream(){var r;try{const t=await(await this.getOrigin()).getMetadata();if(t.fork&&t.parent){const i=new un(t.parent.git_url);if(!this._githubRepositories.some(s=>s.remote.owner===i.owner&&s.remote.repositoryName===i.repositoryName)){const c=!this.repository.state.remotes.some(v=>v.name==="upstream")?"upstream":(r=t.parent.owner)==null?void 0:r.login;if(c)return this.gitHubRepositories[0].remote.gitProtocol.type===vc.SSH?await this.repository.addRemote(c,t.parent.git_url):await this.repository.addRemote(c,t.parent.clone_url),!0}}}catch(e){xe.appendLine(`Missing upstream check failed: ${e}`)}return!1}getAllAssignableUsers(){if(this._assignableUsers){const r=[];return Object.keys(this._assignableUsers).forEach(e=>{r.push(...this._assignableUsers[e])}),r}}getMentionableUsersFromGlobalState(){xe.appendLine("Trying to use globalState for mentionable users.");const r=this.context.globalState.get(ja);if(r){const e={};if(this._githubRepositories.every(i=>{var n;const s=`${i.remote.owner}/${i.remote.repositoryName}`;return r.repos[s]?(e[i.remote.repositoryName]=(n=r.repos[s].mentionableUsers)!=null?n:[],!0):!1}))return xe.appendLine(`Using globalState mentionable users for ${Object.keys(e).length}.`),e}xe.appendLine("No globalState for mentionable users.")}createFetchMentionableUsersPromise(){const r={};return new Promise(e=>{const t=this._githubRepositories.map(async i=>{const n=await i.getMentionableUsers();r[i.remote.remoteName]=n});Promise.all(t).then(()=>{this._mentionableUsers=r,this._fetchMentionableUsersPromise=void 0;const i=this.context.globalState.get(ja,{repos:{}});this._githubRepositories.forEach(n=>{const s=`${n.remote.owner}/${n.remote.repositoryName}`;i.repos[s]||(i.repos[s]={}),i.repos[s].mentionableUsers=r[n.remote.remoteName],i.repos[s].stateModifiedTime=new Date().valueOf()}),this.context.globalState.update(ja,i),e(r)})})}async getMentionableUsers(r,e){if(r&&delete this._mentionableUsers,this._mentionableUsers)return this._mentionableUsers;let t=this.getMentionableUsersFromGlobalState();return e&&!this._fetchMentionableUsersPromise&&t?t:this._fetchMentionableUsersPromise?this._fetchMentionableUsersPromise:(this._fetchMentionableUsersPromise=this.createFetchMentionableUsersPromise(),t!=null?t:this._fetchMentionableUsersPromise)}async getAssignableUsers(r){if(r&&delete this._assignableUsers,this._assignableUsers)return this._assignableUsers;if(!this._fetchAssignableUsersPromise){const e={},t=[];return this._fetchAssignableUsersPromise=new Promise(i=>{const n=this._githubRepositories.map(async s=>{const c=await s.getAssignableUsers();e[s.remote.remoteName]=c.sort(xg),t.push(...c)});Promise.all(n).then(()=>{this._assignableUsers=e,this._fetchAssignableUsersPromise=void 0,i(e),this._onDidChangeAssignableUsers.fire(t)})})}return this._fetchAssignableUsersPromise}getGitHubRemotes(){const r=this._githubRepositories;return!r||!r.length?[]:r.map(e=>e.remote)}async getAllGitHubRemotes(){return await this.computeAllGitHubRemotes()}async getLocalPullRequests(){const r=this._githubRepositories;if(!r||!r.length)return[];const t=this.repository.state.refs.filter(i=>i.type===cc.Head&&i.name!==void 0).map(i=>i.name).map(async i=>{const n=await qi.getMatchingPullRequestMetadataForBranch(this.repository,i);if(n){const{owner:s,prNumber:c}=n,v=r.find(S=>S.remote.owner.toLocaleLowerCase()===s.toLocaleLowerCase());if(v){const S=await v.getPullRequest(c);if(S)return S.localBranchName=i,S}}return Promise.resolve(null)});return Promise.all(t).then(i=>i.filter(n=>n!==null))}async getLabels(r,e){const t=r?r.githubRepository:this._githubRepositories.find(S=>S.remote.owner===(e==null?void 0:e.owner)&&S.remote.repositoryName===(e==null?void 0:e.repo));if(!t)throw new Error("No matching repository found for getting labels.");const{remote:i,octokit:n}=await t.ensure();let s=!1,c=1,v=[];do{const S=await n.issues.listLabelsForRepo({owner:i.owner,repo:i.repositoryName,per_page:100,page:c});v=v.concat(S.data.map(N=>({name:N.name,color:N.color}))),v=v.sort((N,U)=>N.name.localeCompare(U.name)),s=!!S.headers.link&&S.headers.link.indexOf('rel="next"')>-1,c+=1}while(s);return v}async deleteLocalPullRequest(r,e){if(!r.localBranchName)return;await this.repository.deleteBranch(r.localBranchName,e);let t;try{t=await this.repository.getConfig(`branch.${r.localBranchName}.remote`)}catch(n){}if(!t)return;await qi.isRemoteCreatedForPullRequest(this.repository,t)&&((await this.repository.getConfigs()).some(({key:c,value:v})=>/^branch.*\.remote$/.test(c)&&v===t)||await this.repository.removeRemote(t)),this.telemetry.sendTelemetryEvent("branch.delete")}async fetchPagedData(r={fetchNextPage:!1},e,t=0,i=Mr.All,n){if(!this._githubRepositories||!this._githubRepositories.length)return{items:[],hasMorePages:!1,hasUnsearchedRepositories:!1};const s=()=>this.totalFetchedPages.get(e)||0,c=X=>this.totalFetchedPages.set(e,X);for(const X of this._githubRepositories){const ne=X.remote.url.toString()+e;this._repositoryPageInformation.get(ne)||this._repositoryPageInformation.set(ne,{pullRequestPage:0,hasMorePages:null})}let v=0;const S={hasMorePages:!1,items:[]},N=X=>{v++,X&&(S.items=S.items.concat(X.items),S.hasMorePages=X.hasMorePages)},U=this._githubRepositories.filter(X=>{const ne=this._repositoryPageInformation.get(X.remote.url.toString()+e);return ne&&(r.fetchNextPage===!1||ne.hasMorePages!==!1)});for(let X=0;X<U.length;X++){const ne=U[X],ce=ne.remote.url.toString()+e,be=this._repositoryPageInformation.get(ce),ye=async ge=>{switch(t){case 0:return i===Mr.All?ne.getAllPullRequests(ge):ne.getPullRequestsForCategory(n||"",ge);case 1:return ne.getIssuesForUserByMilestone(be.pullRequestPage);case 2:return ne.getIssuesWithoutMilestone(be.pullRequestPage);case 3:return ne.getIssues(be.pullRequestPage,n)}};if(r.fetchNextPage?(be.pullRequestPage++,N(await ye(be.pullRequestPage)),c(s()+1)):(be.pullRequestPage===0&&(be.pullRequestPage=1),(await Promise.all(Array.from({length:be.pullRequestPage}).map((ve,ke)=>ye(ke+1)))).forEach(ve=>N(ve))),be.hasMorePages=S.hasMorePages,S.items.length&&(r.fetchNextPage===!0||r.fetchNextPage===!1&&v>=s()))return s()===0&&c(v),{items:S.items,hasMorePages:be.hasMorePages,hasUnsearchedRepositories:X<U.length-1}}return{items:[],hasMorePages:!1,hasUnsearchedRepositories:!1}}async getPullRequests(r,e={fetchNextPage:!1},t){const i=r.toString()+(t||"");return this.fetchPagedData(e,i,0,r,t)}async getMilestones(r={fetchNextPage:!1},e=!1,t){const i=await this.fetchPagedData(r,"issuesKey",1,Mr.All,t);if(e){const n=await this.fetchPagedData(r,"issuesKey",2,Mr.All,t);i.items.push({milestone:{createdAt:new Date(0).toDateString(),id:"",title:yv},issues:n.items})}return i}async getIssues(r={fetchNextPage:!1},e){return this.fetchPagedData(r,"issuesKey",3,Mr.All,e)}async getMaxIssue(){const r=await Promise.all(this._githubRepositories.map(t=>t.getMaxIssue()));let e=0;for(const t of r)t!==void 0&&(e=Math.max(e,t));return e}async getPullRequestTemplates(){const r="{pull_request_template,PULL_REQUEST_TEMPLATE}.md",e=g.workspace.findFiles(new g.RelativePattern(this._repository.rootUri,r)),t="{docs,.github}/{pull_request_template,PULL_REQUEST_TEMPLATE}.md",i=g.workspace.findFiles(new g.RelativePattern(this._repository.rootUri,t),null),n="PULL_REQUEST_TEMPLATE/*.md",s=g.workspace.findFiles(new g.RelativePattern(this._repository.rootUri,n)),c="{docs,.github}/PULL_REQUEST_TEMPLATE/*.md",v=g.workspace.findFiles(new g.RelativePattern(this._repository.rootUri,c),null),S=await Promise.all([e,i,s,v]);return[...S[0],...S[1],...S[2],...S[3]]}async getPullRequestDefaults(r){var e;if(!r&&!this.repository.state.HEAD)throw new vv(this.repository);const t=await this.getOrigin(r),i=await t.getMetadata(),n=(e=g.workspace.getConfiguration(Ir).inspect(Wa))==null?void 0:e.defaultValue,s=g.workspace.getConfiguration(Ir).get(Wa),c=!s||(n==null?void 0:n.every((S,N)=>s[N]===S)),v=i.fork&&i.parent&&c?i.parent:await(this.findRepo(ta("upstream"))||t).getMetadata();return{owner:v.owner.login,repo:v.name,base:v.default_branch}}async getMetadata(r){const e=this.findRepo(ta(r));return e&&e.getMetadata()}async getHeadCommitMessage(){const{repository:r}=this;if(r.state.HEAD&&r.state.HEAD.commit){const{message:e}=await r.getCommit(r.state.HEAD.commit);return e}return""}async getTipCommitMessage(r){const{repository:e}=this,{commit:t}=await e.getBranch(r);if(t){const{message:i}=await e.getCommit(t);return i}return""}async getOrigin(r){if(!this._githubRepositories.length)throw new pk(this.repository);const e=r?r.upstream:this.upstreamRef;if(e){const n=this.findRepo(ta(e.remote));if(!n){const s=(await this.getAllGitHubRemotes()).find(c=>c.remoteName===e.remote);if(s)return this.createAndAddGitHubRepository(s,this._credentialStore);throw xe.appendLine(`The remote '${e.remote}' is not a GitHub repository.`),new mk(this.repository.state.HEAD.name,e,"is not a GitHub repo")}return n}const[t,...i]=this._githubRepositories;return i.length&&(this.findRepo(ta("origin"))||this.findRepo(gk))||t}findRepo(r){return this._githubRepositories.filter(r)[0]}get upstreamRef(){const{HEAD:r}=this.repository.state;return r&&r.upstream}async createPullRequest(r){var e,t;const i=this._githubRepositories.find(n=>n.remote.owner===r.owner&&n.remote.repositoryName===r.repo);if(!i)throw new Error(`No matching repository ${r.repo} found for ${r.owner}`);try{const n=await i.createPullRequest(r),s=r.head.indexOf(":"),c=r.head.slice(s+1);return await qi.associateBranchWithPullRequest(this._repository,n,c),this.telemetry.sendTelemetryEvent("pr.create.success",{isDraft:(r.draft||"").toString()}),n}catch(n){if(n.message.indexOf("No commits between ")>-1){if((e=this._repository.state.HEAD)==null?void 0:e.ahead)return await g.window.showInformationMessage(`There are no commits between '${r.base}' and '${r.head}'.
Do you want to push your local commits and create the pull request?`,{modal:!0},"Push commits")==="Push commits"?(await this._repository.push(),this.createPullRequest(r)):void 0;if(this._repository.state.workingTreeChanges.length||this._repository.state.indexChanges.length)return await g.window.showInformationMessage(`There are no commits between '${r.base}' and '${r.head}'.
Do you want to commit your changes and create the pull request?`,{modal:!0},"Commit changes")==="Commit changes"?(await g.commands.executeCommand("git.commit"),await this._repository.push(),this.createPullRequest(r)):void 0}if(!((t=this._repository.state.HEAD)==null?void 0:t.upstream))return await g.window.showInformationMessage(`There is no upstream branch for '${r.base}'.
Do you want to publish it and create the pull request?`,{modal:!0},"Publish branch")==="Publish branch"?(await this._repository.push(i.remote.remoteName,r.base,!0),this.createPullRequest(r)):void 0;throw xe.appendLine(`GitHubRepository> Creating pull requests failed: ${n}`),this.telemetry.sendTelemetryErrorEvent("pr.create.failure",{isDraft:(r.draft||"").toString()}),new Error(bt(n))}}async createIssue(r){try{const e=this._githubRepositories.find(s=>s.remote.owner===r.owner&&s.remote.repositoryName===r.repo);if(!e)throw new Error(`No matching repository ${r.repo} found for ${r.owner}`);await e.ensure();const{data:t}=await e.octokit.issues.create(r),i=aS(t,e),n=new Pr(e,e.remote,i);return this.telemetry.sendTelemetryEvent("issue.create.success"),n}catch(e){xe.appendLine(`GitHubRepository> Creating issue failed: ${e}`),this.telemetry.sendTelemetryErrorEvent("issue.create.failure"),g.window.showWarningMessage(`Creating issue failed: ${bt(e)}`)}}async assignIssue(r,e){try{const t=this._githubRepositories.find(n=>n.remote.owner===r.remote.owner&&n.remote.repositoryName===r.remote.repositoryName);if(!t)throw new Error(`No matching repository ${r.remote.repositoryName} found for ${r.remote.owner}`);await t.ensure();const i={assignees:[e],owner:r.remote.owner,repo:r.remote.repositoryName,issue_number:r.number};await t.octokit.issues.addAssignees(i),this.telemetry.sendTelemetryEvent("issue.assign.success")}catch(t){xe.appendLine(`GitHubRepository> Assigning issue failed: ${t}`),this.telemetry.sendTelemetryErrorEvent("issue.assign.failure"),g.window.showWarningMessage(`Assigning issue failed: ${bt(t)}`)}}getCurrentUser(r){return On(this._credentialStore.getCurrentUser(r.githubRepository.remote.authProviderId),r.githubRepository)}async mergePullRequest(r,e,t,i){const{octokit:n,remote:s}=await r.githubRepository.ensure(),c=this.activePullRequest&&this.activePullRequest.head&&this.activePullRequest.head.sha,v=this.repository.state.HEAD&&this.repository.state.HEAD.commit,S=r.head&&r.head.sha,N=this.repository.state.workingTreeChanges.length>0;if(c===S){if(v!==S){const{ahead:U}=this.repository.state.HEAD;if(U&&await g.window.showWarningMessage(`You have ${U} unpushed ${U>1?"commits":"commit"} on this PR branch.
Would you like to proceed anyway?`,{modal:!0},"Yes")===void 0)return{merged:!1,message:"unpushed changes"}}if(N&&await g.window.showWarningMessage(`You have uncommitted changes on this PR branch.
Would you like to proceed anyway?`,{modal:!0},"Yes")===void 0)return{merged:!1,message:"uncommitted changes"}}return await n.pulls.merge({commit_message:t,commit_title:e,merge_method:i||g.workspace.getConfiguration("githubPullRequests").get("defaultMergeMethod"),owner:s.owner,repo:s.repositoryName,pull_number:r.number}).then(U=>(this.telemetry.sendTelemetryEvent("pr.merge.success"),this._onDidMergePullRequest.fire(),U.data)).catch(U=>{throw this.telemetry.sendTelemetryErrorEvent("pr.merge.failure"),U})}async deleteBranch(r){await r.githubRepository.deleteBranch(r)}async getBranchDeletionItems(){const r=await this.repository.getConfigs(),e=new Map;r.forEach(n=>{const s=n.key,c=/^branch\.(.*)\.(.*)$/.exec(s);if(c&&c.length===3){const v=c[1];e.has(v)||e.set(v,{});const S=e.get(v);if(c[2]==="remote"&&(S.remote=n.value),c[2]==="github-pr-owner-number"){const N=qi.parsePullRequestMetadata(n.value);S.metadata=N}e.set(v,S)}});const t=[];e.forEach((n,s)=>{if(n.metadata){const c=this.activePullRequest&&this.activePullRequest.base.repositoryCloneUrl;(c?c.owner===n.metadata.owner&&c.repositoryName===n.metadata.repositoryName&&this.activePullRequest&&this.activePullRequest.number===n.metadata.prNumber:!1)||t.push({label:`${s}`,description:`${n.metadata.repositoryName}/${n.metadata.owner} #${n.metadata.prNumber}`,picked:!1,metadata:n.metadata})}});const i=await Promise.all(t.map(async n=>{const s=n.metadata,c=this._githubRepositories.find(U=>U.remote.owner.toLowerCase()===s.owner.toLowerCase()&&U.remote.repositoryName.toLowerCase()===s.repositoryName.toLowerCase());if(!c)return n;const{remote:v,query:S,schema:N}=await c.ensure();try{const{data:U}=await S({query:N.PullRequestState,variables:{owner:v.owner,name:v.repositoryName,number:s.prNumber}});n.legacy=U.repository.pullRequest.state!=="OPEN"}catch{}return n}));return i.forEach(n=>{n.legacy?n.picked=!0:n.description=`${n.description} is still Open`}),i}async getRemoteDeletionItems(){const r=await this.repository.getConfigs(),e=new Map;r.forEach(i=>{const n=i.key;let s=/^branch\.(.*)\.(.*)$/.exec(n);if(s&&s.length===3){const c=s[1];if(s[2]==="remote"){const v=i.value;e.has(v)||e.set(v,{branches:new Set}),e.get(v).branches.add(c)}}if(s=/^remote\.(.*)\.(.*)$/.exec(n),s&&s.length===3){const c=s[1];e.has(c)||e.set(c,{branches:new Set});const v=e.get(c);s[2]==="github-pr-remote"&&(v.createdForPullRequest=i.value==="true"),s[2]==="url"&&(v.url=i.value)}});const t=[];return e.forEach((i,n)=>{if(i.branches.size===0){let s=i.createdForPullRequest?"":"Not created by GitHub Pull Request extension";i.url&&(s=s?s+" "+i.url:i.url),t.push({label:n,description:s,picked:i.createdForPullRequest,remote:n})}}),t}async deleteLocalBranchesNRemotes(){return new Promise(async r=>{const e=g.window.createQuickPick();e.canSelectMany=!0,e.ignoreFocusOut=!0,e.placeholder="Choose local branches you want to delete permanently",e.show(),e.busy=!0;const t=await this.getBranchDeletionItems();e.items=t,e.selectedItems=t.filter(n=>n.picked),e.busy=!1;let i=!0;e.onDidAccept(async()=>{if(i){const n=e.selectedItems;if(n.length){e.busy=!0;try{await Promise.all(n.map(async c=>{await this.repository.deleteBranch(c.label,!0)})),e.busy=!1}catch(c){e.hide(),g.window.showErrorMessage(`Deleting branches failed: ${c}`)}}i=!1,e.busy=!0;const s=await this.getRemoteDeletionItems();s?(e.placeholder="Choose remotes you want to delete permanently",e.busy=!1,e.items=s,e.selectedItems=s.filter(c=>c.picked)):e.hide()}else{const n=e.selectedItems;n.length&&(e.busy=!0,await Promise.all(n.map(async s=>{await this.repository.removeRemote(s.label)})),e.busy=!1),e.hide()}}),e.onDidHide(()=>{r()})})}async getPullRequestRepositoryDefaultBranch(r){return await r.githubRepository.getDefaultBranch()}async getPullRequestRepositoryAccessAndMergeMethods(r){return await r.githubRepository.getRepoAccessAndMergeMethods()}async fulfillPullRequestMissingInfo(r){try{if(!r.isResolved())return;xe.debug("Fulfill pull request missing info - start",Ei.ID);const e=r.githubRepository,{octokit:t,remote:i}=await e.ensure();if(!r.base){const{data:n}=await t.pulls.get({owner:i.owner,repo:i.repositoryName,pull_number:r.number});r.update(ns(n,e))}if(!r.mergeBase){const{data:n}=await t.repos.compareCommits({repo:i.repositoryName,owner:i.owner,base:`${r.base.repositoryCloneUrl.owner}:${r.base.ref}`,head:`${r.head.repositoryCloneUrl.owner}:${r.head.ref}`});r.mergeBase=n.merge_base_commit.sha}}catch(e){g.window.showErrorMessage(`Fetching Pull Request merge base failed: ${bt(e)}`)}xe.debug("Fulfill pull request missing info - done",Ei.ID)}async resolveItem(r,e){let t=this._githubRepositories.find(i=>i.remote.owner.toLowerCase()===r.toLowerCase()&&i.remote.repositoryName.toLowerCase()===e.toLowerCase());return t||(t=this.createGitHubRepositoryFromOwnerName(r,e)),t}async resolvePullRequest(r,e,t){const i=await this.resolveItem(r,e);if(i)return i.getPullRequest(t)}async resolveIssue(r,e,t,i=!1){const n=await this.resolveItem(r,e);if(n)return n.getIssue(t,i)}async resolveUser(r,e,t){var i;xe.debug(`Fetch user ${t}`,Ei.ID);const n=this.createGitHubRepositoryFromOwnerName(r,e),{query:s,schema:c}=await n.ensure();try{const{data:v}=await s({query:c.GetUser,variables:{login:t}});return dS(v,n)}catch(v){((i=v.message)==null?void 0:i.startsWith("GraphQL error: Could not resolve to a User with the login of"))||xe.appendLine(v.message)}}async getMatchingPullRequestMetadataForBranch(){return!this.repository||!this.repository.state.HEAD||!this.repository.state.HEAD.name?null:await qi.getMatchingPullRequestMetadataForBranch(this.repository,this.repository.state.HEAD.name)}async getMatchingPullRequestMetadataFromGitHub(){if(!this.repository||!this.repository.state.HEAD||!this.repository.state.HEAD.name||!this.repository.state.HEAD.upstream)return null;const r=this.gitHubRepositories.find(e=>{var t,i;return e.remote.remoteName===((i=(t=this.repository.state.HEAD)==null?void 0:t.upstream)==null?void 0:i.remote)});for(const e of this.gitHubRepositories)if(e.remote.remoteName===this.repository.state.HEAD.upstream.remote){const t=await e.getPullRequestForBranch(`${r==null?void 0:r.remote.owner}:${this.repository.state.HEAD.upstream.name}`);if(t&&t.length>0)return{owner:e.remote.owner,repositoryName:e.remote.repositoryName,prNumber:t[0].number,model:t[0]};break}return null}async checkoutExistingPullRequestBranch(r){return await qi.checkoutExistingPullRequestBranch(this.repository,r)}async getBranchNameForPullRequest(r){return await qi.getBranchNRemoteForPullRequest(this.repository,r)}async fetchAndCheckout(r){await qi.fetchAndCheckout(this.repository,this._allGitHubRemotes,r)}async checkout(r){return this.repository.checkout(r)}async fetchById(r,e){const t=await r.getPullRequest(e);if(t)return t;g.window.showErrorMessage(`Pull request number ${e} does not exist in ${r.remote.owner}/${r.remote.repositoryName}`,{modal:!0})}async checkoutDefaultBranch(r){var e;try{const t=await this.repository.getBranch(r);if(((e=this.repository.state.HEAD)==null?void 0:e.name)===t.name){const n="Choose a branch";g.window.showInformationMessage("The default branch is already checked out.","Choose a branch").then(s=>{if(s===n)return g.commands.executeCommand("git.checkout")});return}t.upstream&&r===t.upstream.name?await this.repository.checkout(r):await g.commands.executeCommand("git.checkout")}catch(t){if(t.gitErrorCode&&t.gitErrorCode===Mn.DirtyWorkTree){g.window.showErrorMessage("Your local changes would be overwritten by checkout, please commit your changes or stash them before you switch branches");return}g.window.showErrorMessage(`Exiting failed: ${t}`)}}findExistingGitHubRepository(r){return this._githubRepositories.find(e=>e.remote.owner===r.owner&&e.remote.repositoryName===r.repositoryName&&(!r.remoteName||e.remote.remoteName===r.remoteName))}createAndAddGitHubRepository(r,e){const t=new vg(r,e,this.telemetry,this._sessionState);return this._githubRepositories.push(t),t}createGitHubRepository(r,e){var t;return(t=this.findExistingGitHubRepository(r))!=null?t:this.createAndAddGitHubRepository(r,e)}createGitHubRepositoryFromOwnerName(r,e){const t=this.findExistingGitHubRepository({owner:r,repositoryName:e});if(t)return t;const i=`https://github.com/${r}/${e}`;return this.createAndAddGitHubRepository(new wl(e,i,new un(i)),this._credentialStore)}async findUpstreamForItem(r){let e,t;for(const n of this.gitHubRepositories){if(!e&&n.remote.owner===r.remote.owner&&n.remote.repositoryName===r.remote.repositoryName){e=n;continue}const s=await n.getRepositoryForkDetails();if(s&&s.isFork&&s.parent.owner.login===r.remote.owner&&s.parent.name===r.remote.repositoryName){const c=await n.getViewerPermission();if(c===ui.Admin||c===ui.Maintain||c===ui.Write){t=n.remote;break}}}let i=!1;if(e&&!t){const n=await r.githubRepository.getViewerPermission();(n===ui.Read||n===ui.Triage||n===ui.Unknown)&&(i=!0)}return{needsFork:i,upstream:e,remote:t}}async forkWithProgress(r,e,t,i){r.report({message:`Forking ${t}...`});const n=await e.fork();if(r.report({increment:50}),!n){g.window.showErrorMessage(`Unable to create a fork of ${t}. Check that your GitHub credentials are correct.`);return}const s=i.state.remotes.length>1?"origin":i.state.remotes[0].name;return r.report({message:"Adding remotes. This may take a few moments."}),await i.renameRemote(s,"upstream"),await i.addRemote(s,n),await new Promise(c=>{if(this.gitHubRepositories.length===0){const v=this.onDidChangeRepositories(()=>{this.gitHubRepositories.length>0&&(v.dispose(),c())})}else c()}),r.report({increment:50}),s}async doFork(r,e,t){return g.window.withProgress({location:g.ProgressLocation.Notification,title:"Creating Fork"},async i=>{try{return this.forkWithProgress(i,r,e,t)}catch(n){g.window.showErrorMessage(`Creating fork failed: ${n}`)}})}async tryOfferToFork(r){const e=`${r.remote.owner}/${r.remote.repositoryName}`,t="Fork",i="Don't Fork";switch(await g.window.showInformationMessage(`You don't have permission to push to ${e}. Do you want to fork ${e}? This will modify your git remotes to set \`origin\` to the fork, and \`upstream\` to ${e}.`,{modal:!0},t,i)){case t:return this.doFork(r,e,this.repository);case i:return!1;default:return}}dispose(){this._subs.forEach(r=>r.dispose())}};let ea=Ei;Zt(ea,"ID","FolderRepositoryManager");function RR(r){switch(r){case"committed":return EventType.Committed;case"mentioned":return EventType.Mentioned;case"subscribed":return EventType.Subscribed;case"commented":return EventType.Commented;case"reviewed":return EventType.Reviewed;default:return EventType.Other}}const gk=r=>{const{currentUser:e=null}=r.octokit;return e&&r.remote.owner===e.login},ta=r=>({remote:{remoteName:e}})=>e===r,_v=r=>{const e=r.indexOf(`
`);return{title:e===-1?r:r.substr(0,e),body:e===-1?"":r.slice(e+1).trim()}};var vk=Object.defineProperty,Rd=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?vk(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);class bk{constructor(){Rd(this,"fileHasComments",new Map),Rd(this,"_onDidChangeFileDecorations",new g.EventEmitter),Rd(this,"onDidChangeFileDecorations",this._onDidChangeFileDecorations.event)}updateFileComments(e,t,i,n){const s=`${t}:${i}`;this.fileHasComments.get(s)!==n&&(this.fileHasComments.set(`${t}:${i}`,n),this._onDidChangeFileDecorations.fire(e))}provideFileDecoration(e,t){const i=Tv(e);if(i){const n=`${i.prNumber}:${i.fileName}`;if(this.fileHasComments.get(n))return{propagate:!1,tooltip:"Commented",badge:"\u{1F4AC}"}}}}const Sv=new bk;var yk=Object.defineProperty,Cl=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?yk(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);class ei{constructor(){Cl(this,"childrenDisposables"),Cl(this,"parent"),Cl(this,"label"),Cl(this,"accessibilityInformation")}getParent(){if(this.parent instanceof ei)return this.parent}async reveal(e,t){try{await this.parent.reveal(e||this,t)}catch(i){xe.appendLine(i,"TreeNode")}}refresh(e){return this.parent.refresh(e)}async getChildren(){return[]}dispose(){this.childrenDisposables&&(this.childrenDisposables.forEach(e=>e.dispose()),this.childrenDisposables=[])}}var wk=Object.defineProperty,br=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?wk(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);function kv(r){const e=g.window.activeTextEditor,t={preserveFocus:!0,viewColumn:g.ViewColumn.Active};return e&&e.document.uri.path===r.path&&(t.selection=e.selection),{command:"vscode.open",arguments:[r,t],title:"Open File"}}async function xd(r,e,t,i,n){let s=await Cd(e,r.repository)||e,c=await Cd(t,r.repository)||t;(s.scheme==="data"||c.scheme==="data")&&(n===yt.ADD&&(s=xv),n===yt.DELETE&&(c=xv));const v=t.path.split("/");return{command:"vscode.diff",arguments:[s,c,`${v[v.length-1]} (Pull Request)`,i],title:"Open Changed File in PR"}}class Ka extends ei{constructor(e,t,i,n,s,c,v,S){super();this.parent=e,this.pullRequest=t,this.status=i,this.fileName=n,this.previousFileName=s,this.blobUrl=c,this.filePath=v,this.parentFilePath=S,br(this,"description"),br(this,"iconPath"),br(this,"command"),br(this,"fileChangeResourceUri"),br(this,"contextValue"),br(this,"childrenDisposables",[]),br(this,"_viewed");var N;const U=(N=this.pullRequest.fileChangeViewedState[n])!=null?N:Hr.UNVIEWED;this.contextValue=`${Qa}:${yt[i]}:${U===Hr.VIEWED?"viewed":"unviewed"}`,this.label=qt.basename(n),this.description=g.workspace.asRelativePath(qt.dirname(n),!1),this.description==="."&&(this.description=""),this.iconPath=g.ThemeIcon.File,this.fileChangeResourceUri=Md(g.Uri.parse(this.blobUrl),t.number,n,i),this.updateViewed(U),this.command={command:"pr.openFileOnGitHub",title:"Open File on GitHub",arguments:[this]},this.childrenDisposables.push(this.pullRequest.onDidChangeFileViewedState(X=>{const ne=X.changed.find(ce=>ce.fileName===this.fileName);ne&&(this.updateViewed(ne.viewed),this.refresh(this))})),this.accessibilityInformation={label:`View diffs and comments for file ${this.label}`,role:"link"}}get resourceUri(){return this.filePath.with({query:this.fileChangeResourceUri.query})}updateViewed(e){this._viewed!==e&&(this._viewed=e,this.contextValue=`${Qa}:${yt[this.status]}:${e===Hr.VIEWED?"viewed":"unviewed"}`)}getTreeItem(){return this}}class Ev extends ei{constructor(e,t,i,n,s,c,v){super();this.parent=e,this.pullRequestManager=t,this.pullRequest=i,this.change=n,this.filePath=s,this.parentFilePath=c,this.sha=v,br(this,"iconPath"),br(this,"fileChangeResourceUri"),br(this,"parentSha"),br(this,"contextValue"),br(this,"command"),br(this,"opts"),br(this,"childrenDisposables",[]),br(this,"_viewed");var S;const N=(S=this.pullRequest.fileChangeViewedState[this.fileName])!=null?S:Hr.UNVIEWED;this.contextValue=`${Qa}:${yt[this.status]}:${N===Hr.VIEWED?"viewed":"unviewed"}`,this.label=qt.basename(this.fileName),this.iconPath=g.ThemeIcon.File,this.opts={preserveFocus:!0},this.updateShowOptions(),this.fileChangeResourceUri=Md(g.Uri.file(this.fileName),this.pullRequest.number,this.fileName,this.status),this.updateViewed(N),this.childrenDisposables.push(this.pullRequest.onDidChangeReviewThreads(U=>{[...U.added,...U.removed].some(X=>X.path===this.fileName)&&this.updateShowOptions()})),this.childrenDisposables.push(this.pullRequest.onDidChangeFileViewedState(U=>{const X=U.changed.find(ne=>ne.fileName===this.fileName);X&&(this.updateViewed(X.viewed),this.refresh(this))})),this.accessibilityInformation={label:`View diffs and comments for file ${this.label}`,role:"link"}}get status(){return this.change.status}get fileName(){return this.change.fileName}get blobUrl(){return this.change.blobUrl}async diffHunks(){var e;let t=[];if(this.change instanceof Ap)t=this.change.diffHunks;else if(this.status!==yt.RENAME)try{const i=(e=this.sha)!=null?e:this.pullRequest.head.sha,n=await this.pullRequestManager.repository.diffBetween(this.pullRequest.base.sha,i,this.change.fileName);t=Op(n)}catch(i){xe.appendLine(`Failed to parse patch for outdated comments: ${i}`)}return t}get resourceUri(){return this.filePath.with({query:this.fileChangeResourceUri.query})}get description(){return g.workspace.getConfiguration(Ir).get(Fs)==="flat"?!0:""}updateViewed(e){this._viewed!==e&&(this._viewed=e,this.contextValue=`${Qa}:${yt[this.status]}:${e===Hr.VIEWED?"viewed":"unviewed"}`)}updateShowOptions(){const e=this.pullRequest.reviewThreadsCache,i=(Zn(e,n=>n.path)[this.fileName]||[]).filter(n=>!n.isOutdated);Sv.updateFileComments(this.fileChangeResourceUri,this.pullRequest.number,this.fileName,i.length>0),i.length?(i.sort((n,s)=>n.line-s.line),this.opts.selection=new g.Range(i[0].line,0,i[0].line,0)):delete this.opts.selection}getTreeItem(){return this}openFileCommand(){return kv(this.filePath)}async openDiff(e,t){var i;const n=await xd(e,this.parentFilePath,this.filePath,{...this.opts,...t},this.status);g.commands.executeCommand(n.command,...(i=n.arguments)!=null?i:[])}}class Ml extends Ev{constructor(e,t,i,n,s,c,v,S,N,U){super(t,e,i,n,c,v,U);this.folderRepositoryManager=e,this.parent=t,this.pullRequest=i,this.previousFileName=s,this.filePath=c,this.parentFilePath=v,this.isPartial=S,this.patch=N,this.sha=U}get comments(){return this.pullRequest.comments.filter(e=>e.path===this.change.fileName&&e.position!==null)}getTreeItem(){return this}async resolve(){this.command=await xd(this.folderRepositoryManager,this.parentFilePath,this.filePath,void 0,this.status)}}class ra extends Ev{constructor(e,t,i,n,s,c,v,S,N){super(e,t,i,n,s,c,v);this.parent=e,this.pullRequest=i,this.filePath=s,this.parentFilePath=c,this.sha=v,this.isCurrent=S,this._comments=N,br(this,"_useViewChangesCommand",!1)}get comments(){return this._comments?this._comments:this.pullRequest.comments.filter(e=>!this.sha||this.sha===this.pullRequest.head.sha?e.position&&e.path===this.change.fileName:e.path===this.change.fileName&&e.originalCommitId===this.sha)}useViewChangesCommand(){this._useViewChangesCommand=!0}async alternateCommand(){if(this.status===yt.DELETE||this.status===yt.ADD){const ce=this.parentFilePath.with({query:JSON.stringify({path:null,commit:null})});return{command:"vscode.diff",arguments:this.status===yt.DELETE?[this.parentFilePath,ce,`${this.fileName}`,{preserveFocus:!0}]:[ce,this.parentFilePath,`${this.fileName}`,{preserveFocus:!0}],title:"Open Diff"}}const{path:e,ref:t,commit:i,rootPath:n}=na(this.filePath.query),s=`${i}^`,c={path:e,ref:t,commit:s,base:!0,isOutdated:!0,rootPath:n},v=this.filePath.with({query:JSON.stringify(c)});let S=this.filePath;this.isCurrent&&(S=this.pullRequestManager.repository.rootUri.with({path:qt.posix.join(c.rootPath,c.path)}));const N={preserveFocus:!0},U=this.pullRequest.reviewThreadsCache,ne=(Zn(U,ce=>ce.path)[this.fileName]||[]).filter(ce=>ce.isOutdated).sort((ce,be)=>ce.line-be.line);return ne.length&&(N.selection=new g.Range(ne[0].originalLine,0,ne[0].originalLine,0)),{command:"vscode.diff",arguments:[v,S,`${this.fileName} from ${(i||"").substr(0,8)}`,N],title:"View Changes"}}async resolve(){this._useViewChangesCommand?this.command=await this.alternateCommand():g.workspace.getConfiguration().get("git.openDiffOnClick",!0)?this.command=await xd(this.pullRequestManager,this.parentFilePath,this.filePath,this.opts,this.status):this.command=this.openFileCommand()}}class _k extends ei{constructor(e,t,i,n,s,c){super();this.parent=e,this.fileName=t,this.previousFileName=i,this.status=n,this.baseBranch=s,this.headBranch=c,br(this,"description"),br(this,"iconPath"),br(this,"fileChangeResourceUri"),br(this,"command"),this.label=t,this.iconPath=g.ThemeIcon.File,this.fileChangeResourceUri=g.Uri.file(t).with({scheme:as,query:JSON.stringify({status:n,fileName:t})});let v=g.Uri.file(t).with({scheme:as,query:JSON.stringify({fileName:t,branch:s})}),S=g.Uri.file(t).with({scheme:as,query:JSON.stringify({fileName:t,branch:c})});switch(n){case yt.ADD:v=g.Uri.file(t).with({scheme:as,query:JSON.stringify({fileName:t,branch:s,isEmpty:!0})});break;case yt.RENAME:v=g.Uri.file(i).with({scheme:as,query:JSON.stringify({fileName:i,branch:s,isEmpty:!0})});break;case yt.DELETE:S=g.Uri.file(t).with({scheme:as,query:JSON.stringify({fileName:t,branch:c,isEmpty:!0})});break}this.command={title:"Open Diff",command:"vscode.diff",arguments:[v,S,`${t} (Pull Request Preview)`]}}get resourceUri(){return g.Uri.file(this.fileName).with({query:this.fileChangeResourceUri.query})}getTreeItem(){return this}}function Td(r){return r.filter(e=>e instanceof ra)}var Sk=Object.defineProperty,ia=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?Sk(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);const as="githubpr",Qa="filechange";class kk{constructor(e,t,i,n,s,c,v){this.repository=e,this.baseOwner=t,this.baseBranchName=i,this._compareOwner=n,this.compareBranchName=s,this.compareHasUpstream=c,this.folderRepoManager=v,ia(this,"_view"),ia(this,"_onDidChangeTreeData",new g.EventEmitter),ia(this,"onDidChangeTreeData",this._onDidChangeTreeData.event),ia(this,"_contentProvider"),ia(this,"_disposables",[]),ia(this,"_gitHubRepository"),this._view=g.window.createTreeView("github:compareChanges",{treeDataProvider:this}),this._gitHubRepository=this.folderRepoManager.gitHubRepositories.find(S=>S.remote.owner===this._compareOwner),this._disposables.push(this._view)}get view(){return this._view}updateBaseBranch(e){this.baseBranchName=e,this._onDidChangeTreeData.fire()}updateBaseOwner(e){this.baseOwner=e,this._onDidChangeTreeData.fire()}async reveal(e,t){return this._view.reveal(e,t)}refresh(){this._onDidChangeTreeData.fire()}async updateHasUpstream(e){var t;if(((t=this.repository.state.HEAD)==null?void 0:t.name)===e){const i=await this.repository.getBranch(e);this.compareHasUpstream=!!i.upstream}else this.compareHasUpstream=!0}async updateCompareBranch(e){e&&(await this.updateHasUpstream(e),this.compareBranchName=e),this._onDidChangeTreeData.fire()}get compareOwner(){return this._compareOwner}set compareOwner(e){this._gitHubRepository=this.folderRepoManager.gitHubRepositories.find(t=>t.remote.owner===e),this._contentProvider&&this._gitHubRepository&&(this._contentProvider.gitHubRepository=this._gitHubRepository),this._compareOwner=e,this._onDidChangeTreeData.fire()}getTreeItem(e){return e.getTreeItem()}async getChildren(){if(this.compareHasUpstream)g.commands.executeCommand("setContext","github:noUpstream",!1);else return g.commands.executeCommand("setContext","github:noUpstream",!0),this._view.message=void 0,[];if(!this._gitHubRepository)return[];this._contentProvider||(this._contentProvider=new Ek(this._gitHubRepository),this._disposables.push(g.workspace.registerFileSystemProvider(as,this._contentProvider,{isReadonly:!0})));const{octokit:e,remote:t}=await this._gitHubRepository.ensure();try{const{data:i}=await e.repos.compareCommits({repo:t.repositoryName,owner:t.owner,base:`${this.baseOwner}:${this.baseBranchName}`,head:`${this.compareOwner}:${this.compareBranchName}`});return i.files.length?this._view.message=void 0:this._view.message=`There are no commits between the base '${this.baseBranchName}' branch and the comparing '${this.compareBranchName}' branch`,i.files.map(n=>new _k(this,n.filename,n.previous_filename,fc(n.status),i.merge_base_commit.sha,this.compareBranchName))}catch(i){return xe.appendLine(`Comparing changes failed: ${i}`),[]}}dispose(){this._disposables.forEach(e=>e.dispose()),this._contentProvider=void 0}}class Ek extends hc{constructor(e){super();this.gitHubRepository=e}async readFile(e){var t;const i=xk(e);if(!i||i.isEmpty)return new TextEncoder().encode("");const{octokit:n,remote:s}=await this.gitHubRepository.ensure(),c=await n.repos.getContent({owner:s.owner,repo:s.repositoryName,path:i.fileName,ref:i.branch}),v=(t=c.data.content)!=null?t:"";return Pp.Buffer.from(v,c.data.encoding)}}var Rk=Object.defineProperty,Rv=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?Rk(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);let Ln;class Nl extends g.Disposable{constructor(e){super(()=>this.disposables.forEach(t=>t.dispose()));this._storageUri=e,Rv(this,"SUBPATH","temp"),Rv(this,"disposables",[])}get path(){return g.Uri.joinPath(this._storageUri,this.SUBPATH)}addDisposable(e){if(this.disposables.length>30){const t=this.disposables.shift();t==null||t.dispose()}this.disposables.push(e)}async writeState(e,t,i){let n=this.path;const s=g.workspace.workspaceFolders&&g.workspace.workspaceFolders.length>0?g.workspace.workspaceFolders[0].name:void 0;s&&(n=g.Uri.joinPath(n,s)),e&&(n=g.Uri.joinPath(n,e)),await g.workspace.fs.createDirectory(n);const c=g.Uri.joinPath(n,t);await g.workspace.fs.writeFile(c,i);const v={dispose:()=>g.workspace.fs.delete(c,{recursive:!0})};return this.addDisposable(v),c}static async init(e){if(e.globalStorageUri&&!Ln){Ln=new Nl(e.globalStorageUri);try{await g.workspace.fs.delete(Ln.path,{recursive:!0})}catch(t){xe.appendLine(`TemporaryState> Error in initialization: ${t.message}`)}try{await g.workspace.fs.createDirectory(Ln.path)}catch(t){xe.appendLine(`TemporaryState> Error in initialization: ${t.message}`)}return e.subscriptions.push(Ln),Ln}}static async write(e,t,i){if(!!Ln)return Ln.writeState(e,t,i)}}function na(r){return JSON.parse(r)}function ti(r){try{return JSON.parse(r.query)}catch(e){}}function xk(r){try{return JSON.parse(r.query)}catch(e){}}const Tk=["image/png","image/gif","image/jpeg","image/webp","image/tiff","image/bmp"],xv=g.Uri.parse("data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==");async function Cd(r,e){try{const{commit:t,baseCommit:i,headCommit:n,isBase:s,path:c}=JSON.parse(r.query),v=r.scheme==="review"?t:s?i:n,{object:S}=await e.getObjectDetails(v,r.fsPath),{mimetype:N}=await e.detectObjectType(S);if(N==="text/plain")return;if(Tk.indexOf(N)>-1){const U=await e.buffer(v,r.fsPath);return Nl.write(qt.dirname(c),qt.basename(c),U)}}catch(t){return}}function Ri(r,e,t,i,n,s,c){const v={path:e||r.path,ref:t,commit:i,base:s.base,isOutdated:n,rootPath:c.path};let S=r.path;return s.replaceFileExtension&&(S=`${S}.git`),r.with({scheme:"review",path:S,query:JSON.stringify(v)})}function Md(r,e,t,i){const n={prNumber:e,fileName:t,status:i};return r.with({scheme:Qa,query:JSON.stringify(n)})}function Tv(r){try{return r.query?JSON.parse(r.query):void 0}catch(e){}}function sa(r,e,t,i,n,s,c){const v={baseCommit:t,headCommit:i,isBase:s,fileName:n,prNumber:e.number,status:c,remoteName:e.githubRepository.remote.remoteName},S=r.path;return r.with({scheme:"pr",path:S,query:JSON.stringify(v)})}var Nd;(function(r){r.file="file"})(Nd||(Nd={}));function aa(r,e){return r.scheme===Nd.file?qt.resolve(r.fsPath,e):qt.posix.resolve(r.path,e)}class Ck extends g.EventEmitter{handleUri(e){this.fire(e)}}const Mk=new Ck;var Nk=Object.defineProperty,Pd=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?Nk(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);class Pk extends fg{constructor(e,t,i){super(e);this._folderRepositoryManager=t,this._item=i,Pd(this,"viewType","github:activePullRequest"),Pd(this,"_existingReviewers",[]),Pd(this,"_prChangeListener"),Dv(n=>{n&&this._item.update(n),this._postMessage({command:"update-state",state:this._item.state})},null,this._disposables),this._disposables.push(this._folderRepositoryManager.onDidMergePullRequest(n=>{this._postMessage({command:"update-state",state:lr.Merged})}))}resolveWebviewView(e,t,i){super.resolveWebviewView(e,t,i),e.webview.html=this._getHtmlForWebview(),this.updatePullRequest(this._item)}async _onDidReceiveMessage(e){if(await super._onDidReceiveMessage(e)===this.MESSAGE_UNHANDLED)switch(e.command){case"alert":g.window.showErrorMessage(e.args);return;case"pr.close":return this.close(e);case"pr.comment":return this.createComment(e);case"pr.merge":return this.mergePullRequest(e);case"pr.deleteBranch":return this.deleteBranch(e);case"pr.readyForReview":return this.setReadyForReview(e);case"pr.approve":return this.approvePullRequest(e);case"pr.request-changes":return this.requestChanges(e);case"pr.submit":return this.submitReview(e);case"pr.openOnGitHub":return Xa(this._item,this._item._telemetry);case"pr.checkout-default-branch":return this.checkoutDefaultBranch(e)}}async checkoutDefaultBranch(e){try{const t=await this._folderRepositoryManager.getPullRequestRepositoryDefaultBranch(this._item);await this._folderRepositoryManager.checkoutDefaultBranch(t)}finally{this._replyMessage(e,{})}}async refresh(){await this.updatePullRequest(this._item)}async updatePullRequest(e){var t;return(!this._prChangeListener||e.number!==this._item.number)&&((t=this._prChangeListener)==null||t.dispose(),this._prChangeListener=e.onDidInvalidate(()=>this.updatePullRequest(e))),Promise.all([this._folderRepositoryManager.resolvePullRequest(e.remote.owner,e.remote.repositoryName,e.number),this._folderRepositoryManager.getPullRequestRepositoryAccessAndMergeMethods(e),e.getTimelineEvents(),e.getReviewRequests(),this._folderRepositoryManager.getBranchNameForPullRequest(e)]).then(i=>{var n,s;const[c,v,S,N,U]=i;if(!c)throw new Error(`Fail to resolve Pull Request #${e.number} in ${e.remote.owner}/${e.remote.repositoryName}`);if(this._item=c,!this._view)return;this._view.title=`${c.title} #${e.number.toString()}`;const X=e.equals(this._folderRepositoryManager.activePullRequest),ne=v.hasWritePermission,ce=v.mergeMethodsAvailability,be=ne||this._item.canEdit(),ye=g.workspace.getConfiguration("githubPullRequests").get("defaultMergeMethod"),ge=pg(ce,ye),ve=this._folderRepositoryManager.getCurrentUser(this._item);this._existingReviewers=Cg(N!=null?N:[],S!=null?S:[],c.author);const Ce=c.base&&c.head&&!c.base.repositoryCloneUrl.equals(c.head.repositoryCloneUrl)&&ud();this._postMessage({command:"pr.initialize",pullrequest:{number:c.number,title:c.title,url:c.html_url,createdAt:c.createdAt,body:c.body,bodyHTML:c.bodyHTML,labels:c.item.labels,author:{login:c.author.login,name:c.author.name,avatarUrl:c.userAvatar,url:c.author.url},state:c.state,isCurrentlyCheckedOut:X,isRemoteBaseDeleted:c.isRemoteBaseDeleted,base:c.base.label,isRemoteHeadDeleted:c.isRemoteHeadDeleted,isLocalHeadDeleted:!U,head:(s=(n=c.head)==null?void 0:n.label)!=null?s:"",canEdit:be,hasWritePermission:ne,mergeable:c.item.mergeable,isDraft:c.isDraft,status:{statuses:[]},events:[],mergeMethodsAvailability:ce,defaultMergeMethod:ge,isIssue:!1,isAuthor:ve.login===c.author.login,reviewers:this._existingReviewers,continueOnGitHub:Ce}})}).catch(i=>{g.window.showErrorMessage(bt(i))})}close(e){g.commands.executeCommand("pr.close",this._item,e.args).then(t=>{t&&this._replyMessage(e,{value:t})})}createComment(e){this._item.createIssueComment(e.args).then(t=>{this._replyMessage(e,{value:t})})}updateReviewers(e){if(e){const t=this._existingReviewers.find(i=>e.user.login===i.reviewer.login);t?t.state=e.state:this._existingReviewers.push({reviewer:e.user,state:e.state})}}approvePullRequest(e){this._item.approve(e.args).then(t=>{this.updateReviewers(t),this._replyMessage(e,{review:t,reviewers:this._existingReviewers}),g.commands.executeCommand("pr.refreshList")},t=>{g.window.showErrorMessage(`Approving pull request failed. ${bt(t)}`),this._throwError(e,`${bt(t)}`)})}requestChanges(e){this._item.requestChanges(e.args).then(t=>{this.updateReviewers(t),this._replyMessage(e,{review:t,reviewers:this._existingReviewers})},t=>{g.window.showErrorMessage(`Requesting changes failed. ${bt(t)}`),this._throwError(e,`${bt(t)}`)})}submitReview(e){this._item.submitReview(fn.Comment,e.args).then(t=>{this.updateReviewers(t),this._replyMessage(e,{review:t,reviewers:this._existingReviewers})},t=>{g.window.showErrorMessage(`Submitting review failed. ${bt(t)}`),this._throwError(e,`${bt(t)}`)})}async deleteBranch(e){const t=await this._folderRepositoryManager.getBranchNameForPullRequest(this._item),i=[];if(this._item.isResolved()){const c=this._item.head.ref;await this._folderRepositoryManager.getPullRequestRepositoryDefaultBranch(this._item)===this._item.head.ref||i.push({label:`Delete remote branch ${this._item.remote.remoteName}/${c}`,description:`${this._item.remote.normalizedHost}/${this._item.remote.owner}/${this._item.remote.repositoryName}`,type:"upstream",picked:!0})}if(t){const c=g.workspace.getConfiguration("githubPullRequests").get("defaultDeletionMethod.selectLocalBranch");i.push({label:`Delete local branch ${t.branch}`,type:"local",picked:!!c});const v=g.workspace.getConfiguration("githubPullRequests").get("defaultDeletionMethod.selectRemote");t.remote&&t.createdForPullRequest&&!t.remoteInUse&&i.push({label:`Delete remote ${t.remote}, which is no longer used by any other branch`,type:"remote",picked:!!v})}if(g.env.remoteName==="codespaces"&&i.push({label:"Suspend Codespace",type:"suspend"}),!i.length){g.window.showWarningMessage(`There is no longer an upstream or local branch for Pull Request #${this._item.number}`),this._replyMessage(e,{cancelled:!0});return}const n=await g.window.showQuickPick(i,{canPickMany:!0,ignoreFocusOut:!0}),s=[];if(n){const c=this._item.equals(this._folderRepositoryManager.activePullRequest),v=n.map(async S=>{switch(S.type){case"upstream":return await this._folderRepositoryManager.deleteBranch(this._item),s.push(S.type),this._folderRepositoryManager.repository.fetch({prune:!0});case"local":if(c){if(this._folderRepositoryManager.repository.state.workingTreeChanges.length)if(await g.window.showWarningMessage("Your local changes will be lost, do you want to continue?",{modal:!0},"Yes")==="Yes")await g.commands.executeCommand("git.cleanAll");else return;const N=await this._folderRepositoryManager.getPullRequestRepositoryDefaultBranch(this._item);await this._folderRepositoryManager.repository.checkout(N)}return await this._folderRepositoryManager.repository.deleteBranch(t.branch,!0),s.push(S.type);case"remote":return await this._folderRepositoryManager.repository.removeRemote(t.remote),s.push(S.type);case"suspend":return await g.commands.executeCommand("github.codespaces.disconnectSuspend"),s.push(S.type)}});await Promise.all(v),g.commands.executeCommand("pr.refreshList"),this._postMessage({command:"pr.deleteBranch",branchTypes:s})}else this._replyMessage(e,{cancelled:!0})}setReadyForReview(e){this._item.setReadyForReview().then(t=>{g.commands.executeCommand("pr.refreshList"),this._replyMessage(e,{isDraft:t})}).catch(t=>{g.window.showErrorMessage(`Unable to set PR ready for review. ${bt(t)}`),this._throwError(e,{})})}async mergePullRequest(e){const{title:t,description:i,method:n}=e.args;if(await g.window.showInformationMessage("Merge this pull request?",{modal:!0},"Yes")!=="Yes"){this._replyMessage(e,{state:lr.Open});return}this._folderRepositoryManager.mergePullRequest(this._item,t,i,n).then(c=>{g.commands.executeCommand("pr.refreshList"),c.merged||g.window.showErrorMessage(`Merging PR failed: ${c.message}`),this._replyMessage(e,{state:c.merged?lr.Merged:lr.Open})}).catch(c=>{g.window.showErrorMessage(`Unable to merge pull request. ${bt(c)}`),this._throwError(e,{})})}_getHtmlForWebview(){const e=id(),t=g.Uri.joinPath(this._extensionUri,"dist","webview-open-pr-view.js");return`<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src vscode-resource: https:; script-src 'nonce-${e}'; style-src vscode-resource: 'unsafe-inline' http: https: data:;">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Active Pull Request</title>
</head>
<body>
<div id="app"></div>
<script nonce="${e}" src="${this._webview.asWebviewUri(t).toString()}"></script>
</body>
</html>`}}class Pl{constructor(e,t){this.reviewManager=e,this.folderRepositoryManager=t}static getSettingsValue(){return g.workspace.getConfiguration(Xn).get(Up)}static registerProvider(e,t,i){e.push(g.window.registerTerminalLinkProvider(new Pl(t,i)))}provideTerminalLinks(e,t){var i;const n=e.line.indexOf("https://github.com");if(n===-1)return[];const s=e.line.substring(n),c=new RegExp(/https:\/\/github\.com\/(.*)\/(.*)\/pull\/new\/(.*)/),v=s.match(c);if(v&&v.length===4){const S=v[1],N=v[2],U=v[3];if(this.folderRepositoryManager.gitHubRepositories.findIndex(ne=>ne.remote.owner===S&&ne.remote.repositoryName===N)>-1&&((i=this.reviewManager.repository.state.HEAD)==null?void 0:i.name)===U)return[{startIndex:n,length:e.line.length-n,tooltip:"Create a Pull Request",url:s}]}return[]}openLink(e){return g.env.openExternal(g.Uri.parse(e.url))}handleTerminalLink(e){const t=Pl.getSettingsValue();if(t==="github"){this.openLink(e);return}if(t==="vscode"){this.reviewManager.createPullRequest();return}const i="Yes",n="Don't show again";g.window.showInformationMessage("Do you want to create a pull request using the GitHub Pull Requests and Issues extension?",i,"No, continue to github.com",n).then(s=>{switch(s){case i:{this.reviewManager.createPullRequest();break}case n:{g.workspace.getConfiguration(Xn).update(Up,"github",g.ConfigurationTarget.Global),this.openLink(e);break}default:this.openLink(e)}})}}var Ak=Object.defineProperty,ri=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?Ak(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);class Ik extends fg{constructor(e,t,i,n){super(e);this._folderRepositoryManager=t,this._pullRequestDefaults=i,ri(this,"viewType","github:createPullRequest"),ri(this,"_onDone",new g.EventEmitter),ri(this,"onDone",this._onDone.event),ri(this,"_onDidChangeBaseRemote",new g.EventEmitter),ri(this,"onDidChangeBaseRemote",this._onDidChangeBaseRemote.event),ri(this,"_onDidChangeBaseBranch",new g.EventEmitter),ri(this,"onDidChangeBaseBranch",this._onDidChangeBaseBranch.event),ri(this,"_onDidChangeCompareRemote",new g.EventEmitter),ri(this,"onDidChangeCompareRemote",this._onDidChangeCompareRemote.event),ri(this,"_onDidChangeCompareBranch",new g.EventEmitter),ri(this,"onDidChangeCompareBranch",this._onDidChangeCompareBranch.event),ri(this,"_compareBranch"),ri(this,"_baseBranch"),ri(this,"_firstLoad",!0),ri(this,"_defaultCompareBranch"),this._defaultCompareBranch=n}resolveWebviewView(e,t,i){super.resolveWebviewView(e,t,i),e.webview.html=this._getHtmlForWebview(),this._firstLoad?(this._firstLoad=!1,this.initializeParams(!0)):this.initializeParams()}get defaultCompareBranch(){return this._defaultCompareBranch}set defaultCompareBranch(e){var t,i;e&&((e==null?void 0:e.name)!==this._defaultCompareBranch.name||((t=e==null?void 0:e.upstream)==null?void 0:t.remote)!==((i=this._defaultCompareBranch.upstream)==null?void 0:i.remote))&&(this._defaultCompareBranch=e,this.initializeParams(),this._onDidChangeCompareBranch.fire(this._defaultCompareBranch.name))}show(e){e&&(this.defaultCompareBranch=e),super.show()}async getTotalCommits(e,t){var i;const n=await this._folderRepositoryManager.getOrigin(e);if(e.upstream){const s=this._folderRepositoryManager.findRepo(ta(e.upstream.remote));if(s){const c=`${s.remote.owner}:${(i=e.name)!=null?i:""}`,v=`${this._pullRequestDefaults.owner}:${t}`,{total_commits:S}=await n.compareCommits(v,c);return S}}else if(e.commit){const s=await this._folderRepositoryManager.repository.getBranch(t);if(s.commit)return(await this._folderRepositoryManager.repository.diffBetween(s.commit,e.commit)).length}return 0}async getTitle(e,t){const i=await this._folderRepositoryManager.getOrigin(e);let n=this._pullRequestDefaults.base===e.name;try{await this.getTotalCommits(e,t)>1&&(n=await i.getDefaultBranch()!==e.name)}catch(s){}if(n){const s=e.name;return s?`${s.charAt(0).toUpperCase()}${s.slice(1)}`:""}else return e.name?_v(await this._folderRepositoryManager.getTipCommitMessage(e.name)).title:""}async getPullRequestTemplate(){const e=await this._folderRepositoryManager.getPullRequestTemplates();if(e[0])try{const t=await g.workspace.fs.readFile(e[0]);return new TextDecoder("utf-8").decode(t)}catch(t){xe.appendLine(`Reading pull request template failed: ${t}`);return}}async getDescription(e,t){let i;try{await this.getTotalCommits(e,t)===1&&e.name&&(i=_v(await this._folderRepositoryManager.getTipCommitMessage(e.name)).body)}catch(s){}const n=await this.getPullRequestTemplate();return n&&i?`${i}
${n}`:n||(i&&this._pullRequestDefaults.base!==e.name?i:"")}async initializeParams(e=!1){var t,i;if(!this.defaultCompareBranch)throw new vv(this._folderRepositoryManager.repository);const n={owner:this._pullRequestDefaults.owner,repositoryName:this._pullRequestDefaults.repo},s=await this._folderRepositoryManager.getOrigin(this.defaultCompareBranch),c={owner:s.remote.owner,repositoryName:s.remote.repositoryName},v=this._pullRequestDefaults.base,[S,N,U,X,ne]=await Promise.all([this._folderRepositoryManager.getGitHubRemotes(),this._folderRepositoryManager.getAllGitHubRemotes(),s.listBranches(this._pullRequestDefaults.owner,this._pullRequestDefaults.repo),this.getTitle(this.defaultCompareBranch,v),this.getDescription(this.defaultCompareBranch,v)]),ce=S.map(ve=>({owner:ve.owner,repositoryName:ve.repositoryName})),be=N.map(ve=>({owner:ve.owner,repositoryName:ve.repositoryName}));U.includes(this._pullRequestDefaults.base)||(U.push(this._pullRequestDefaults.base),U.sort());let ye=U;c.owner!==n.owner&&(ye=await s.listBranches(c.owner,c.repositoryName)),this.defaultCompareBranch.name&&!ye.includes(this.defaultCompareBranch.name)&&(ye.push(this.defaultCompareBranch.name),ye.sort());const ge={availableBaseRemotes:ce,availableCompareRemotes:be,defaultBaseRemote:n,defaultBaseBranch:v,defaultCompareRemote:c,defaultCompareBranch:(t=this.defaultCompareBranch.name)!=null?t:"",branchesForRemote:U,branchesForCompare:ye,defaultTitle:X,defaultDescription:ne,isDraft:!1};this._compareBranch=(i=this.defaultCompareBranch.name)!=null?i:"",this._baseBranch=v,this._postMessage({command:e?"reset":"pr.initialize",params:ge})}async changeRemote(e,t){var i,n,s,c;const{owner:v,repositoryName:S}=e.args;let N=this._folderRepositoryManager.findRepo(ce=>v===ce.remote.owner&&S===ce.remote.repositoryName);if(N||(N=this._folderRepositoryManager.createGitHubRepositoryFromOwnerName(v,S)),!N)throw new Error("No matching GitHub repository found.");const U=await N.getDefaultBranch(),X=await N.listBranches(v,S);!t&&((i=this.defaultCompareBranch)==null?void 0:i.name)&&!X.includes(this.defaultCompareBranch.name)&&(X.push(this.defaultCompareBranch.name),X.sort());let ne;return t?(ne=U,this._baseBranch=U,this._onDidChangeBaseRemote.fire({owner:v,repositoryName:S}),this._onDidChangeBaseBranch.fire(U)):(((n=this.defaultCompareBranch)==null?void 0:n.name)&&(ne=(s=this.defaultCompareBranch)==null?void 0:s.name,this._compareBranch=(c=this.defaultCompareBranch)==null?void 0:c.name),this._onDidChangeCompareRemote.fire({owner:v,repositoryName:S})),this._replyMessage(e,{branches:X,defaultBranch:ne})}async create(e){try{const t=e.args.compareOwner,i=e.args.compareRepo,n=e.args.compareBranch,s=`${t}/${i}`;let v=(await this._folderRepositoryManager.repository.getBranch(n)).upstream?this._folderRepositoryManager.findRepo(X=>X.remote.owner===t&&X.remote.repositoryName===i):void 0,S=v==null?void 0:v.remote;if((!S||S.owner!==t||S.repositoryName!==i)&&await g.window.showInformationMessage(`There is no upstream branch for '${n}'.
Do you want to publish it and then create the pull request?`,{modal:!0},"Publish branch")==="Publish branch"){let ne;const ce=this._folderRepositoryManager.repository.state.remotes.find(be=>{if(!be.pushUrl)return!1;const ye=new wl(be.name,be.pushUrl,new un(be.pushUrl));return ye.owner===t&&ye.repositoryName===i?(ne=ye,!0):!1});ce&&ne?(await this._folderRepositoryManager.repository.push(ce.name,n,!0),S=ne,v=this._folderRepositoryManager.findRepo(ta(S.remoteName))):this._throwError(e,`The current repository does not have a push remote for ${s}`)}if(!S){this._throwError(e,"No upstream for the compare branch.");return}if(!v)throw new Error(`Unable to find GitHub repository matching '${S.remoteName}'. You can add '${S.remoteName}' to the setting "githubPullRequests.remotes" to ensure '${S.remoteName}' is found.`);const N=`${v.remote.owner}:${n}`,U=await this._folderRepositoryManager.createPullRequest({...e.args,head:N});U?(await this._replyMessage(e,{}),await qi.associateBranchWithPullRequest(this._folderRepositoryManager.repository,U,n),this._onDone.fire(U)):this._throwError(e,"There must be a difference in commits to create a pull request.")}catch(t){this._throwError(e,t.message)}}async changeBranch(e,t){const i=typeof e.args=="string"?e.args:e.args.name;let n;if(t)this._baseBranch=i,this._onDidChangeBaseBranch.fire(i);else try{n=await this._folderRepositoryManager.repository.getBranch(i),this._onDidChangeCompareBranch.fire(n.name)}catch(v){g.window.showErrorMessage("Branch does not exist locally.")}n=n!=null?n:await this._folderRepositoryManager.repository.getBranch(this._compareBranch);const s=await this.getTitle(n,this._baseBranch),c=await this.getDescription(n,this._baseBranch);return this._replyMessage(e,{title:s,description:c})}async _onDidReceiveMessage(e){if(await super._onDidReceiveMessage(e)===this.MESSAGE_UNHANDLED)switch(e.command){case"pr.cancelCreate":return g.commands.executeCommand("setContext","github:createPullRequest",!1),this._onDone.fire(void 0),this._replyMessage(e,void 0);case"pr.create":return this.create(e);case"pr.changeBaseRemote":return this.changeRemote(e,!0);case"pr.changeBaseBranch":return this.changeBranch(e,!0);case"pr.changeCompareRemote":return this.changeRemote(e,!1);case"pr.changeCompareBranch":return this.changeBranch(e,!1);default:g.window.showErrorMessage("Unsupported webview message")}}_getHtmlForWebview(){const e=id(),t=g.Uri.joinPath(this._extensionUri,"dist","webview-create-pr-view.js");return`<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src vscode-resource: https:; script-src 'nonce-${e}'; style-src vscode-resource: 'unsafe-inline' http: https: data:;">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Create Pull Request</title>
</head>
<body>
<div id="app"></div>
<script nonce="${e}" src="${this._webview.asWebviewUri(t).toString()}"></script>
</body>
</html>`}}var Dk=Object.defineProperty,Ya=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?Dk(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);class Fk{constructor(e){this.repository=e,Ya(this,"_disposables",[]),Ya(this,"_createPRViewProvider"),Ya(this,"_treeView"),Ya(this,"_onDidCreate",new g.EventEmitter),Ya(this,"onDidCreate",this._onDidCreate.event)}registerListeners(e){this._disposables.push(this._createPRViewProvider.onDone(async t=>{var i,n;g.commands.executeCommand("setContext","github:createPullRequest",!1),(i=this._createPRViewProvider)==null||i.dispose(),this._createPRViewProvider=void 0,(n=this._treeView)==null||n.dispose(),this._treeView=void 0,this._disposables.forEach(s=>s.dispose()),t&&this._onDidCreate.fire(t)})),this._disposables.push(this._createPRViewProvider.onDidChangeCompareBranch(t=>{var i;(i=this._treeView)==null||i.updateCompareBranch(t)})),this._disposables.push(this._createPRViewProvider.onDidChangeCompareRemote(t=>{this._treeView&&(this._treeView.compareOwner=t.owner)})),this._disposables.push(this._createPRViewProvider.onDidChangeBaseBranch(t=>{var i;(i=this._treeView)==null||i.updateBaseBranch(t)})),this._disposables.push(this._createPRViewProvider.onDidChangeBaseRemote(t=>{var i;(i=this._treeView)==null||i.updateBaseOwner(t.owner)})),e&&this._disposables.push(this.repository.state.onDidChange(t=>{var i;this._createPRViewProvider&&this.repository.state.HEAD&&(this._createPRViewProvider.defaultCompareBranch=this.repository.state.HEAD,(i=this._treeView)==null||i.updateCompareBranch())}))}get isCreatingPullRequest(){return!!this._createPRViewProvider}async ensureDefaultsAreLocal(e,t){if(e.gitHubRepositories.some(i=>i.remote.owner===t.owner&&i.remote.repositoryName===t.repo))return t;{const i=await e.getOrigin(),n=await e.getMetadata(i.remote.remoteName);return{owner:n.owner.login,repo:n.name,base:n.default_branch}}}async create(e,t,i){var n;await t.loginAndUpdate(),g.commands.executeCommand("setContext","github:createPullRequest",!0);const s=(n=i?await t.repository.getBranch(i):void 0)!=null?n:t.repository.state.HEAD;if(!this._createPRViewProvider){const c=await this.ensureDefaultsAreLocal(t,await t.getPullRequestDefaults(s));this._createPRViewProvider=new Ik(e,t,c,s);const v=await t.getOrigin(s);this._treeView=new kk(this.repository,c.owner,c.base,v.remote.owner,s.name,!!s.upstream,t),this.registerListeners(!i),this._disposables.push(g.window.registerWebviewViewProvider(this._createPRViewProvider.viewType,this._createPRViewProvider))}this._createPRViewProvider.show(s)}}var Ok=Object.defineProperty,Cv=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?Ok(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);class Mv{constructor(e,t,i,n,s=`${e}:${t}`){this.owner=e,this.name=t,this.description=i,this.remote=n,this.label=s,Cv(this,"detail"),Cv(this,"picked")}static fromRemote(e){return new this(e.owner,e.repositoryName,e.url,e)}}function Ja(r){return r===void 0||r===0?0:r-1}function xR(r,e){for(let t=0;t<r.length;t++){const i=r[t];for(let n=0;n<i.diffLines.length;n++)if(i.diffLines[n].positionInHunk===e)return i.diffLines[n]}}function Ad(r,e){const t=Aa(r);let i=t.next(),n=0;for(;!i.done;){const s=i.value;if(!(s.oldLineNumber>e))if(s.oldLineNumber+s.oldLength-1<e)n+=s.newLength-s.oldLength;else return n+=s.newLength-s.oldLength,e+n;i=t.next()}return e+n}function Id(r,e){const t=Aa(r);let i=t.next(),n=0;for(;!i.done;){const s=i.value;if(!(s.newLineNumber>e))if(s.newLineNumber+s.newLength-1<e)n+=s.oldLength-s.newLength;else return n+=s.oldLength-s.newLength,e+n;i=t.next()}return e+n}function Nv(r,e){const t=[];for(let i=0;i<r.length;i++){const n=r[i];let s,c;if(e){let v;for(let S=0;S<n.diffLines.length;S++){const N=n.diffLines[S];N.type===hi.Delete?(s!==void 0||(s=Ja(N.oldLineNumber)),v=Ja(N.oldLineNumber)):s!==void 0&&v!==void 0&&(t.push(new g.Range(s,0,v,0)),s=void 0,v=void 0)}s!==void 0&&v!==void 0&&(t.push(new g.Range(s,0,v,0)),s=void 0,v=void 0)}else n.newLineNumber&&(s=Ja(n.newLineNumber),c=Ja(n.newLength),t.push(new g.Range(s,0,s+c,0)))}return t}var Lk=Object.defineProperty,Ji=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?Lk(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);class Uk{constructor(e,t,i,n,s){this._reviewManager=e,this._reposManager=t,this._repository=i,this._reviewModel=n,this._sessionState=s,Ji(this,"_localToDispose",[]),Ji(this,"_onDidChangeComments",new g.EventEmitter),Ji(this,"onDidChangeComments",this._onDidChangeComments.event),Ji(this,"_commentHandlerId"),Ji(this,"_commentController"),Ji(this,"_workspaceFileChangeCommentThreads",{}),Ji(this,"_reviewSchemeFileChangeCommentThreads",{}),Ji(this,"_obsoleteFileChangeCommentThreads",{}),Ji(this,"_visibleNormalTextEditors",[]),Ji(this,"_pendingCommentThreadAdds",[]),this._commentController=g.comments.createCommentController(`github-review-${t.activePullRequest.number}`,t.activePullRequest.title),this._commentController.commentingRangeProvider=this,this._commentController.reactionHandler=this.toggleReaction.bind(this),this._localToDispose.push(this._commentController),this._commentHandlerId=cg(),Mp(this._commentHandlerId,this)}get commentController(){return this._commentController}async initialize(){this._visibleNormalTextEditors=g.window.visibleTextEditors.filter(e=>e.document.uri.scheme!=="comment"),await this._reposManager.activePullRequest.validateDraftMode(),await this.initializeCommentThreads(),await this.registerListeners()}createOutdatedCommentThread(e,t){const i=t.comments[0].originalCommitId,n=g.Uri.file(qt.join(`commit~${i.substr(0,8)}`,e)),s=Ri(n,e,void 0,i,!0,{base:t.diffSide===or.LEFT},this._repository.rootUri),c=new g.Range(new g.Position(t.originalLine-1,0),new g.Position(t.originalLine-1,0));return $a(s,c,t,this._commentController)}async createWorkspaceCommentThread(e,t,i){let n=i.line;const s=await this._repository.diffWithHEAD(t);s&&(n=Ad(s,i.line));const c=new g.Range(new g.Position(n-1,0),new g.Position(n-1,0));return $a(e,c,i,this._commentController)}createReviewCommentThread(e,t,i){var n;if(!((n=this._reposManager.activePullRequest)==null?void 0:n.mergeBase))throw new Error("Cannot create review comment thread without an active pull request base.");const s=Ri(e,t,void 0,this._reposManager.activePullRequest.mergeBase,!1,{base:!0},this._repository.rootUri),c=new g.Range(new g.Position(i.line-1,0),new g.Position(i.line-1,0));return $a(s,c,i,this._commentController)}async doInitializeCommentThreads(e){const t=Zn(e,i=>i.path);Object.keys(t).forEach(i=>{const n=t[i],s=n[0];if(s){const c=qt.join(this._repository.rootUri.path,s.path).replace(/\\/g,"/"),v=this._repository.rootUri.with({path:c});let S=[],N=[],U=[];const X=n.map(async ne=>{ne.isOutdated?U.push(this.createOutdatedCommentThread(i,ne)):ne.diffSide===or.RIGHT?S.push(await this.createWorkspaceCommentThread(v,i,ne)):N.push(this.createReviewCommentThread(v,i,ne))});Promise.all(X),this._workspaceFileChangeCommentThreads[i]=S,this._reviewSchemeFileChangeCommentThreads[i]=N,this._obsoleteFileChangeCommentThreads[i]=U}})}async initializeCommentThreads(){const e=this._reposManager.activePullRequest;if(!(!e||!e.isResolved()))return this.doInitializeCommentThreads(e.reviewThreadsCache)}async registerListeners(){this._localToDispose.push(this._reposManager.activePullRequest.onDidChangePendingReviewState(e=>{[this._workspaceFileChangeCommentThreads,this._obsoleteFileChangeCommentThreads,this._reviewSchemeFileChangeCommentThreads].forEach(t=>{for(const i in t)t[i].forEach(n=>{yg(n,e),Ws(n)})})})),this._localToDispose.push(this._reposManager.activePullRequest.onDidChangeReviewThreads(e=>{e.added.forEach(async t=>{const{path:i}=t,n=this._pendingCommentThreadAdds.findIndex(async v=>{const S=this.gitRelativeRootPath(v.uri.path);if(S!==t.path)return!1;const N=await this.getContentDiff(v.uri,S);return Id(N,v.range.start.line)+1===t.line});let s;if(n>-1)s=this._pendingCommentThreadAdds[n],s.gitHubThreadId=t.id,s.comments=t.comments.map(v=>new kr(v,s)),Ga(s,t),this._pendingCommentThreadAdds.splice(n,1);else{const v=qt.join(this._repository.rootUri.path,i).replace(/\\/g,"/"),S=this._repository.rootUri.with({path:v});t.isOutdated?s=this.createOutdatedCommentThread(i,t):t.diffSide===or.RIGHT?s=await this.createWorkspaceCommentThread(S,i,t):s=this.createReviewCommentThread(S,i,t)}const c=t.isOutdated?this._obsoleteFileChangeCommentThreads:t.diffSide===or.RIGHT?this._workspaceFileChangeCommentThreads:this._reviewSchemeFileChangeCommentThreads;c[i]?c[i].push(s):c[i]=[s]}),e.changed.forEach(t=>{const i=t.isOutdated?this._obsoleteFileChangeCommentThreads:t.diffSide===or.RIGHT?this._workspaceFileChangeCommentThreads:this._reviewSchemeFileChangeCommentThreads,n=i[t.path].findIndex(s=>s.gitHubThreadId===t.id);if(n>-1){const s=i[t.path][n];Ga(s,t)}}),e.removed.forEach(t=>{const i=t.isOutdated?this._obsoleteFileChangeCommentThreads:t.diffSide===or.RIGHT?this._workspaceFileChangeCommentThreads:this._reviewSchemeFileChangeCommentThreads,n=i[t.path].findIndex(s=>s.gitHubThreadId===t.id);if(n>-1){const s=i[t.path][n];i[t.path].splice(n,1),s.dispose()}})})),this._localToDispose.push(this._sessionState.onDidChangeCommentsExpandState(e=>{this.updateCommentExpandState(e)}))}updateCommentExpandState(e){if(!this._reposManager.activePullRequest)return;function t(c,v){if(v.size!==0)for(const S of v.keys()){const N=v.get(S),U=c[S];for(const X of U){const ne=N.get(X.gitHubThreadId);Ga(X,ne,e)}}}const i=new Map,n=new Map,s=new Map;for(const c of this._reposManager.activePullRequest.reviewThreadsCache){let v;c.isOutdated?v=i:c.diffSide===or.RIGHT?v=s:v=n,v.has(c.path)||v.set(c.path,new Map),v.get(c.path).set(c.id,c)}t(this._obsoleteFileChangeCommentThreads,i),t(this._reviewSchemeFileChangeCommentThreads,n),t(this._workspaceFileChangeCommentThreads,s)}visibleEditorsEqual(e,t){if(e=e.filter(i=>i.document.uri.scheme!=="comment"),t=t.filter(i=>i.document.uri.scheme!=="comment"),e=oc(e,i=>i.document.uri.toString()),t=oc(t,i=>i.document.uri.toString()),e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(!t.find(s=>s.document.uri.toString()===e[i].document.uri.toString()))return!1;return!0}hasCommentThread(e){if(e.uri.scheme==="review")return!0;const t=g.workspace.getWorkspaceFolder(e.uri);return t?!!(e.uri.scheme===t.uri.scheme&&e.uri.fsPath.startsWith(this._repository.rootUri.fsPath)):!1}async provideCommentingRanges(e,t){let i=e.uri.query&&e.uri.query!==""?na(e.uri.query):void 0;if(i){const s=this.findMatchedFileChangeForReviewDiffView(this._reviewModel.localFileChanges,e.uri);if(s)return Nv(await s.diffHunks(),i.base)}const n=g.workspace.getWorkspaceFolder(e.uri);if(!!n&&e.uri.scheme===n.uri.scheme){if(!this._reposManager.activePullRequest.isResolved())return;const s=this.gitRelativeRootPath(e.uri.path),c=Td(this._reviewModel.localFileChanges).find(S=>S.fileName===s),v=[];if(c){const S=await c.diffHunks();if(c.status===yt.RENAME&&S.length===0)return[];const N=await this.getContentDiff(e.uri,c.fileName);for(let U=0;U<S.length;U++){const X=S[U],ne=Ad(N,X.newLineNumber),ce=Ad(N,X.newLineNumber+X.newLength-1);ne>0&&ce>0&&v.push(new g.Range(ne-1,0,ce-1,0))}}return v}}async getContentDiff(e,t){var i;const n=g.window.visibleTextEditors.find(s=>s.document.uri.toString()===e.toString());if(!((i=this._reposManager.activePullRequest)==null?void 0:i.head))throw new Error("Cannot get content diff without an active pull request head.");if(n&&n.document.isDirty){const s=n.document.getText(),v=(await this._repository.getObjectDetails(this._reposManager.activePullRequest.head.sha,t)).object,S=await this._repository.hashObject(s);return await this._repository.diffBlobs(v,S)}else return await this._repository.diffWith(this._reposManager.activePullRequest.head.sha,t)}findMatchedFileChangeForReviewDiffView(e,t){const i=na(t.query),n=e.filter(s=>{if(s instanceof Ka||s.fileName!==i.path)return!1;if(s.filePath.scheme!=="review"&&s.sha===i.commit)return!0;const c=s.filePath.query?JSON.parse(s.filePath.query):void 0;if(c&&c.commit===i.commit)return!0;const v=s.parentFilePath.query?JSON.parse(s.parentFilePath.query):void 0;return!!(v&&v.commit===i.commit)});if(n&&n.length)return n[0]}gitRelativeRootPath(e){return qt.relative(this._repository.rootUri.path,e).replace(/\\/g,"/")}getCommentSide(e){return e.uri.scheme==="review"&&na(e.uri.query).base?or.LEFT:or.RIGHT}async startReview(e,t){const i=e.comments.length,n=this.optimisticallyAddComment(e,t,!0);try{if(i){const s=e.comments[0];if(s instanceof kr)await this._reposManager.activePullRequest.createCommentReply(t,s._rawComment.graphNodeId,!1);else throw new Error("Cannot reply to temporary comment")}else{const s=this.gitRelativeRootPath(e.uri.path),c=this.getCommentSide(e);this._pendingCommentThreadAdds.push(e);let v;if(c===or.RIGHT){const S=await this.getContentDiff(e.uri,s);v=Id(S,e.range.start.line)}else v=e.range.start.line;await this._reposManager.activePullRequest.createReviewThread(t,s,v+1,c)}}catch(s){g.window.showErrorMessage(`Starting review failed: ${s}`),e.comments=e.comments.map(c=>(c instanceof pi&&c.id===n&&(c.mode=g.CommentMode.Editing),c))}}async openReview(){await this._reviewManager.openDescription(),Si.scrollToReview()}optimisticallyAddComment(e,t,i){const n=this._reposManager.getCurrentUser(this._reposManager.activePullRequest),s=new pi(e,t,i,n);return this.updateCommentThreadComments(e,[...e.comments,s]),s.id}updateCommentThreadComments(e,t){e.comments=t,Ws(e)}optimisticallyEditComment(e,t){const i=this._reposManager.getCurrentUser(this._reposManager.activePullRequest),n=new pi(e,t.body instanceof g.MarkdownString?t.body.value:t.body,!!t.label,i,t);return e.comments=e.comments.map(s=>s instanceof kr&&s.commentId===t.commentId?n:s),n.id}async createOrReplyComment(e,t,i,n){var s;if(!this._reposManager.activePullRequest)throw new Error("Cannot create comment without an active pull request.");const c=e.comments.length,v=i?!1:n!==void 0?n:this._reposManager.activePullRequest.hasPendingReview,S=this.optimisticallyAddComment(e,t,v);try{if(c){const N=e.comments[0];if(N instanceof kr)await this._reposManager.activePullRequest.createCommentReply(t,N._rawComment.graphNodeId,i);else throw new Error("Cannot reply to temporary comment")}else{const N=this.gitRelativeRootPath(e.uri.path);this._pendingCommentThreadAdds.push(e);const U=this.getCommentSide(e);let X;if(U===or.RIGHT){const ne=await this.getContentDiff(e.uri,N);X=Id(ne,e.range.start.line)}else X=e.range.start.line;await this._reposManager.activePullRequest.createReviewThread(t,N,X+1,U,i)}i&&await this._reposManager.activePullRequest.submitReview()}catch(N){((s=N.graphQLErrors)==null?void 0:s.length)&&N.graphQLErrors[0].type==="NOT_FOUND"?g.window.showWarningMessage("The comment that you're replying to was deleted. Refresh to update.","Refresh").then(U=>{U==="Refresh"&&this._reviewManager.updateComments()}):g.window.showErrorMessage(`Creating comment failed: ${N}`),e.comments=e.comments.map(U=>(U instanceof pi&&U.id===S&&(U.mode=g.CommentMode.Editing),U))}}async createCommentOnResolve(e,t){if(!this._reposManager.activePullRequest)throw new Error("Cannot create comment on resolve without an active pull request.");const i=await this._reposManager.activePullRequest.getPendingReviewId();await this.createOrReplyComment(e,t,!i)}async resolveReviewThread(e,t){try{t&&await this.createCommentOnResolve(e,t),await this._reposManager.activePullRequest.resolveReviewThread(e.gitHubThreadId)}catch(i){g.window.showErrorMessage(`Resolving conversation failed: ${i}`)}}async unresolveReviewThread(e,t){try{t&&await this.createCommentOnResolve(e,t),await this._reposManager.activePullRequest.unresolveReviewThread(e.gitHubThreadId)}catch(i){g.window.showErrorMessage(`Unresolving conversation failed: ${i}`)}}async editComment(e,t){if(t instanceof kr){const i=this.optimisticallyEditComment(e,t);try{if(!this._reposManager.activePullRequest)throw new Error("Unable to find active pull request");await this._reposManager.activePullRequest.editReviewComment(t._rawComment,t.body instanceof g.MarkdownString?t.body.value:t.body)}catch(n){g.window.showErrorMessage(bt(n)),e.comments=e.comments.map(s=>s instanceof pi&&s.id===i?new kr(t._rawComment,e):s)}}else this.createOrReplyComment(e,t.body instanceof g.MarkdownString?t.body.value:t.body,!1)}async deleteComment(e,t){try{if(!this._reposManager.activePullRequest)throw new Error("Unable to find active pull request");t instanceof kr?await this._reposManager.activePullRequest.deleteReviewComment(t.commentId):e.comments=e.comments.filter(n=>!(n instanceof pi&&n.id===t.id)),e.comments.length===0?e.dispose():Ws(e);const i=await this._reposManager.activePullRequest.validateDraftMode();i!==this._reposManager.activePullRequest.hasPendingReview&&(this._reposManager.activePullRequest.hasPendingReview=i),this.update()}catch(i){throw new Error(bt(i))}}async update(){await this._reposManager.activePullRequest.validateDraftMode()}async toggleReaction(e,t){try{if(!this._reposManager.activePullRequest)throw new Error("Unable to find active pull request");e.reactions&&!e.reactions.find(i=>i.label===t.label&&!!i.authorHasReacted)?await this._reposManager.activePullRequest.addCommentReaction(e._rawComment.graphNodeId,t):await this._reposManager.activePullRequest.deleteCommentReaction(e._rawComment.graphNodeId,t)}catch(i){throw new Error(bt(i))}}dispose(){this._commentController&&this._commentController.dispose(),Np(this._commentHandlerId),this._localToDispose.forEach(e=>e.dispose())}}var Bk=Object.defineProperty,Al=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?Bk(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);class qk{constructor(){Al(this,"_localFileChanges"),Al(this,"_onDidChangeLocalFileChanges",new g.EventEmitter),Al(this,"onDidChangeLocalFileChanges",this._onDidChangeLocalFileChanges.event),Al(this,"_obsoleteFileChanges",[])}get hasLocalFileChanges(){return this._localFileChanges&&this._localFileChanges.length>0}get localFileChanges(){var e;return(e=this._localFileChanges)!=null?e:[]}set localFileChanges(e){this._localFileChanges=e,this._onDidChangeLocalFileChanges.fire()}get obsoleteFileChanges(){return this._obsoleteFileChanges}set obsoleteFileChanges(e){this._obsoleteFileChanges=e}clear(){this.obsoleteFileChanges=[],this._localFileChanges=void 0}}var Hk=Object.defineProperty,Rr=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?Hk(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);const Pv=class{constructor(r,e,t,i,n,s,c){this._context=r,this._repository=e,this._folderRepoManager=t,this._telemetry=i,this.changesInPrDataProvider=n,this._showPullRequest=s,this._sessionState=c,Rr(this,"_localToDispose",[]),Rr(this,"_disposables"),Rr(this,"_reviewModel",new qk),Rr(this,"_lastCommitSha"),Rr(this,"_updateMessageShown",!1),Rr(this,"_validateStatusInProgress"),Rr(this,"_reviewCommentController"),Rr(this,"_statusBarItem"),Rr(this,"_prNumber"),Rr(this,"_previousRepositoryState"),Rr(this,"_webviewViewProvider"),Rr(this,"_createPullRequestHelper"),Rr(this,"_switchingToReviewMode"),Rr(this,"justSwitchedToReviewMode",!1),Rr(this,"_isFirstLoad",!0),this._switchingToReviewMode=!1,this._disposables=[],this._previousRepositoryState={HEAD:e.state.HEAD,remotes:Qs(this._repository)},this.registerListeners(),this.updateState(!0),this.pollForStatusChange()}get switchingToReviewMode(){return this._switchingToReviewMode}set switchingToReviewMode(r){this._switchingToReviewMode=r,r||this.updateState()}registerListeners(){this._disposables.push(this._repository.state.onDidChange(r=>{const e=this._previousRepositoryState.HEAD,t=this._repository.state.HEAD;if(!e&&!t)return;let i;!e||!t?i=!1:i=e.upstream?t.upstream&&e.upstream.name===t.upstream.name&&e.upstream.remote===t.upstream.remote:!t.upstream;const n=i&&e.ahead===t.ahead&&e.behind===t.behind&&e.commit===t.commit&&e.name===t.name&&e.remote===t.remote&&e.type===t.type,s=Qs(this._repository),c=this._previousRepositoryState.remotes.length===s.length&&this._previousRepositoryState.remotes.every(v=>s.some(S=>v.equals(S)));(!n||!c)&&(this._previousRepositoryState={HEAD:this._repository.state.HEAD,remotes:s},this.updateState(!0))})),this._disposables.push(g.workspace.onDidChangeConfiguration(r=>{this.updateFocusedViewMode()})),this._disposables.push(this._folderRepoManager.onDidChangeActivePullRequest(r=>{this.updateFocusedViewMode()})),Pl.registerProvider(this._disposables,this,this._folderRepoManager)}get statusBarItem(){return this._statusBarItem||(this._statusBarItem=g.window.createStatusBarItem("github.pullrequest.status",g.StatusBarAlignment.Left),this._statusBarItem.name="GitHub Active Pull Request"),this._statusBarItem}get repository(){return this._repository}get reviewModel(){return this._reviewModel}pollForStatusChange(){setTimeout(async()=>{this._validateStatusInProgress||await this.updateComments(),this.pollForStatusChange()},1e3*60*5)}async checkBranchUpToDate(r){var e;const t=this._repository.state.HEAD;if(t){const i=t.upstream?t.upstream.remote:null,n=t.upstream?t.upstream.name:t.name;if(i&&(await this._repository.fetch(i,n),!this._context.globalState.get(pd,!1)&&!this._updateMessageShown&&(this._lastCommitSha&&r.head.sha!==this._lastCommitSha||t.behind!==void 0&&t.behind>0))){this._updateMessageShown=!0;const c="Pull",v="Never show again";await g.window.showInformationMessage(`There are updates available for pull request ${r.number}: ${r.title}.`,{},c,v)===c?(((e=this._repository.state.HEAD)==null?void 0:e.name)===t.name&&await this._repository.pull(),this._updateMessageShown=!1):v&&await this._context.globalState.update(pd,!0)}}}async updateState(r=!1,e=!0){if(!this.switchingToReviewMode)return this._validateStatusInProgress?(xe.appendLine("Review> Queuing additional validate state"),this._validateStatusInProgress=this._validateStatusInProgress.then(async t=>await this.validateStatueAndSetContext(r,e)),this._validateStatusInProgress):(xe.appendLine("Review> Validate state in progress"),this._validateStatusInProgress=this.validateStatueAndSetContext(r,e),this._validateStatusInProgress)}async validateStatueAndSetContext(r,e){await this.validateState(r,e),await g.commands.executeCommand("setContext","github:stateValidated",!0)}async validateState(r,e){xe.appendLine("Review> Validating state...");const t=this._lastCommitSha;if(this._lastCommitSha=void 0,await this._folderRepoManager.updateRepositories(!1),!this._repository.state.HEAD){this.clear(!0);return}const i=this._repository.state.HEAD;let n=await this._folderRepoManager.getMatchingPullRequestMetadataForBranch();if(!n){xe.appendLine(`Review> no matching pull request metadata found for current branch ${i.name}`);const ne=await this._folderRepoManager.getMatchingPullRequestMetadataFromGitHub();ne&&(await qi.associateBranchWithPullRequest(this._repository,ne.model,i.name),n=ne)}if(!n){xe.appendLine(`Review> no matching pull request metadata found on GitHub for current branch ${i.name}`),this.clear(!0);return}const s=i.commit!==t&&i.ahead===0&&i.behind===0;if(this._prNumber===n.prNumber&&!s){g.commands.executeCommand("pr.refreshList");return}if(!(i.upstream?i.upstream.remote:null)){xe.appendLine(`Review> current branch ${this._repository.state.HEAD.name} hasn't setup remote yet`),this.clear(!0);return}xe.appendLine(`Review> current branch ${this._repository.state.HEAD.name} is associated with pull request #${n.prNumber}`),this.clear(!1),this._prNumber=n.prNumber;const{owner:v,repositoryName:S}=n;xe.appendLine("Review> Resolving pull request");const N=await this._folderRepoManager.resolvePullRequest(v,S,n.prNumber);if(!N||!N.isResolved()){this._prNumber=void 0,xe.appendLine("Review> This PR is no longer valid");return}const U=g.workspace.getConfiguration(Xn).get(wy,{merged:!0,closed:!1});if(N.isClosed&&!U.closed){this.clear(!0),xe.appendLine("Review> This PR is closed");return}if(N.isMerged&&!U.merged){this.clear(!0),xe.appendLine("Review> This PR is merged");return}this._folderRepoManager.activePullRequest=N,this._lastCommitSha=N.head.sha,this._isFirstLoad&&(this._isFirstLoad=!1,this.checkBranchUpToDate(N)),xe.appendLine("Review> Fetching pull request data"),this.initializePullRequestData(N),await this.changesInPrDataProvider.addPrToView(this._folderRepoManager,N,this._reviewModel,this.justSwitchedToReviewMode),this.justSwitchedToReviewMode=!1,xe.appendLine("Review> register comments provider"),await this.registerCommentController();const X=this._context.workspaceState.get(Ys);if(this._webviewViewProvider?await this._webviewViewProvider.updatePullRequest(N):(this._webviewViewProvider=new Pk(this._context.extensionUri,this._folderRepoManager,N),this._context.subscriptions.push(g.window.registerWebviewViewProvider(this._webviewViewProvider.viewType,this._webviewViewProvider)),this._context.subscriptions.push(g.commands.registerCommand("pr.refreshActivePullRequest",ne=>{var ce;(ce=this._webviewViewProvider)==null||ce.refresh()}))),this.statusBarItem.text=`$(git-pull-request) Pull Request #${this._prNumber}`,this.statusBarItem.command={command:"pr.openDescription",title:"View Pull Request Description",arguments:[N]},xe.appendLine("Review> display pull request status bar indicator and refresh pull request tree view."),this.statusBarItem.show(),g.commands.executeCommand("pr.refreshList"),xe.appendLine(`Review> using focus mode = ${X}.`),xe.appendLine(`Review> state validation silent = ${r}.`),xe.appendLine(`Review> PR show should show = ${this._showPullRequest.shouldShow}.`),(!r||this._showPullRequest.shouldShow)&&X)this._doFocusShow(e);else if(!this._showPullRequest.shouldShow&&X){const ne=this._showPullRequest.onChangedShowValue(ce=>{xe.appendLine(`Review> PR show value changed = ${ce}.`),ce&&this._doFocusShow(e),ne.dispose()});this._localToDispose.push(ne)}this._validateStatusInProgress=void 0}openDiff(){if(this._reviewModel.localFileChanges.length){let r;for(const e of this._reviewModel.localFileChanges)if(e.status===yt.MODIFY){r=e;break}r=r!=null?r:this._reviewModel.localFileChanges[0],r.openDiff(this._folderRepoManager)}}_doFocusShow(r){var e;if(Va.executeCommand("workbench.action.focusCommentsPanel"),(e=this._webviewViewProvider)==null||e.show(),r)if(this._reviewModel.localFileChanges.length)this.openDiff();else{const t=this._reviewModel.onDidChangeLocalFileChanges(()=>{t.dispose(),this.openDiff()})}}async updateComments(){const r=this._repository.state.HEAD;if(!r)return;const e=await this._folderRepoManager.getMatchingPullRequestMetadataForBranch();if(!e||!(r.upstream?r.upstream.remote:null)||this._prNumber===void 0||!this._folderRepoManager.activePullRequest)return;const i=await this._folderRepoManager.resolvePullRequest(e.owner,e.repositoryName,this._prNumber);if(!i||!i.isResolved()){xe.appendLine("Review> This PR is no longer valid");return}return await this.checkBranchUpToDate(i),await this.initializePullRequestData(i),await this._reviewCommentController.update(),Promise.resolve(void 0)}async getLocalChangeNodes(r,e){const t=[],i=r.mergeBase||r.base.sha,n=r.head.sha;for(let s=0;s<e.length;s++){const c=e[s],v=qt.join(this._repository.rootUri.path,c.fileName).replace(/\\/g,"/"),S=this._repository.rootUri.with({path:v}),N=c.status===yt.DELETE?Ri(S,void 0,void 0,"",!1,{base:!1},this._repository.rootUri):S,U=Ri(S,c.status===yt.RENAME?c.previousFileName:c.fileName,void 0,c.status===yt.ADD?"":i,!1,{base:!0},this._repository.rootUri),X=new ra(this.changesInPrDataProvider,this._folderRepoManager,r,c,N,U,n);t.push(X)}return t}async initializePullRequestData(r){try{const e=await r.getFileChangesInfo(this._repository);this._reviewModel.localFileChanges=await this.getLocalChangeNodes(r,e),await Promise.all([r.initializeReviewComments(),r.initializeReviewThreadCache(),r.initializePullRequestFileViewState()]);const t=r.comments.filter(s=>!s.position),i=Zn(t,s=>s.originalCommitId),n=[];for(const s in i){const c=i[s],v=Zn(c,S=>S.path);for(const S in v){const N=v[S],U=g.Uri.file(qt.join(`commit~${s.substr(0,8)}`,S)),X=new ra(this.changesInPrDataProvider,this._folderRepoManager,r,{status:yt.MODIFY,fileName:S,blobUrl:void 0},Ri(U,S,void 0,N[0].originalCommitId,!0,{base:!1},this._repository.rootUri),Ri(U,S,void 0,N[0].originalCommitId,!0,{base:!0},this._repository.rootUri),s,!1,N);n.push(X)}}return this._reviewModel.obsoleteFileChanges=n,Promise.resolve(void 0)}catch(e){xe.appendLine(`Review> ${e}`)}}async registerCommentController(){var r;if(((r=this._folderRepoManager.activePullRequest)==null?void 0:r.reviewThreadsCacheReady)&&this._reviewModel.hasLocalFileChanges)await this.doRegisterCommentController();else{const e=this._reviewModel.onDidChangeLocalFileChanges(async()=>{var t;((t=this._folderRepoManager.activePullRequest)==null?void 0:t.reviewThreadsCache)&&this._reviewModel.hasLocalFileChanges&&(e&&e.dispose(),await this.doRegisterCommentController())})}}async doRegisterCommentController(){this._reviewCommentController=new Uk(this,this._folderRepoManager,this._repository,this._reviewModel,this._sessionState),await this._reviewCommentController.initialize(),this._localToDispose.push(this._reviewCommentController),this._localToDispose.push(this._reviewCommentController.onDidChangeComments(r=>{this._folderRepoManager.activePullRequest&&(this._folderRepoManager.activePullRequest.comments=r)}))}async switch(r){var e;xe.appendLine(`Review> switch to Pull Request #${r.number} - start`),this.statusBarItem.text="$(sync~spin) Switching to Review Mode",this.statusBarItem.command=void 0,this.statusBarItem.show(),this.switchingToReviewMode=!0;try{await this._folderRepoManager.checkoutExistingPullRequestBranch(r)||await this._folderRepoManager.fetchAndCheckout(r)}catch(t){xe.appendLine(`Review> checkout failed #${JSON.stringify(t)}`),this.switchingToReviewMode=!1,t.message==="User aborted"||(t.gitErrorCode&&(t.gitErrorCode===Mn.LocalChangesOverwritten||t.gitErrorCode===Mn.DirtyWorkTree)?g.window.showErrorMessage("Your local changes would be overwritten by checkout, please commit your changes or stash them before you switch branches"):((e=t.stderr)==null?void 0:e.startsWith("fatal: couldn't find remote ref"))?g.window.showErrorMessage("The remote branch for this pull request has been deleted. The pull request cannot be checked out."):g.window.showErrorMessage(bt(t))),this._folderRepoManager.activePullRequest?this.setStatusForPr(this._folderRepoManager.activePullRequest):(this.statusBarItem.hide(),this.switchingToReviewMode=!1);return}try{this.statusBarItem.text=`$(sync~spin) Fetching additional data: pr/${r.number}`,this.statusBarItem.command=void 0,this.statusBarItem.show(),await this._folderRepoManager.fulfillPullRequestMissingInfo(r),this._telemetry.sendTelemetryEvent("pr.checkout"),xe.appendLine(`Review> switch to Pull Request #${r.number} - done`,Pv.ID)}finally{this.setStatusForPr(r),await this._repository.status()}}setStatusForPr(r){this.switchingToReviewMode=!1,this.justSwitchedToReviewMode=!0,this.statusBarItem.text=`Pull Request #${r.number}`,this.statusBarItem.command=void 0,this.statusBarItem.show()}async publishBranch(r){const e=await this._folderRepoManager.getAllGitHubRemotes();let t=(await this.getRemote(e,`Pick a remote to publish the branch '${r.name}' to:`)).remote;if(!t||r.name===void 0)return;const i=this._folderRepoManager.createGitHubRepository(t,this._folderRepoManager.credentialStore),n=await i.getViewerPermission();if(n===ui.Read||n===ui.Triage||n===ui.Unknown){const c=await this._folderRepoManager.tryOfferToFork(i);if(!c)return;t=this._folderRepoManager.getGitHubRemotes().find(v=>v.remoteName===c)}if(!t)return;const s=t;return new Promise(async c=>{const v=g.window.createInputBox();v.value=r.name,v.ignoreFocusOut=!0,v.prompt=e.length===1?`The branch '${r.name}' is not published yet, pick a name for the upstream branch`:"Pick a name for the upstream branch";const S=async function(N){try{v.busy=!0,await this._reposManager.getBranch(s,N)?v.validationMessage=`Branch ${N} already exists in ${s.owner}/${s.repositoryName}`:v.validationMessage=void 0}catch(U){v.validationMessage=void 0}v.busy=!1};await S(r.name),v.onDidChangeValue(S.bind(this)),v.onDidAccept(async()=>{v.validationMessage=void 0,v.hide();try{await this._repository.push(s.remoteName,`${r.name}:${v.value}`,!0)}catch(U){throw U.gitErrorCode===Mn.PushRejected&&(g.window.showWarningMessage("Can't push refs to remote, try running 'git pull' first to integrate with your change",{modal:!0}),c(void 0)),U.gitErrorCode===Mn.RemoteConnectionError&&(g.window.showWarningMessage(`Could not read from remote repository '${s.remoteName}'. Please make sure you have the correct access rights and the repository exists.`,{modal:!0}),c(void 0)),U}const N=await this._repository.getBranch(r.name);(!N||!N.upstream)&&c(void 0),c(N)}),v.show()})}async getRemote(r,e,t){if(!r.length){g.window.showWarningMessage("No GitHub remotes found. Add a remote and try again.");return}if(r.length===1&&!t)return Mv.fromRemote(r[0]);if(r.length===1&&t&&t.owner===r[0].owner&&t.name===r[0].repositoryName)return t;let i=!1;const n=r.map(c=>{const v=Mv.fromRemote(c);if(t){const{owner:S,name:N}=t;v.picked=v.owner===S&&v.name===N,v.picked&&(i=!0)}return v});!i&&t&&n.unshift(t);const s=await g.window.showQuickPick(n,{ignoreFocusOut:!0,placeHolder:e});if(!!s)return s}async createPullRequest(r){this._createPullRequestHelper||(this._createPullRequestHelper=new Fk(this.repository),this._createPullRequestHelper.onDidCreate(async e=>{await this.updateState(!1,!1);const t=this.changesInPrDataProvider.getDescriptionNode(this._folderRepoManager);await Od(this._context,this._telemetry,e,t,this._folderRepoManager)})),this._createPullRequestHelper.create(this._context.extensionUri,this._folderRepoManager,r)}async openDescription(){const r=this._folderRepoManager.activePullRequest;if(!r)return;const e=this.changesInPrDataProvider.getDescriptionNode(this._folderRepoManager);await Od(this._context,this._telemetry,r,e,this._folderRepoManager)}get isCreatingPullRequest(){var r,e;return(e=(r=this._createPullRequestHelper)==null?void 0:r.isCreatingPullRequest)!=null?e:!1}async updateFocusedViewMode(){g.workspace.getConfiguration(Ir).get("focusedMode")?(g.commands.executeCommand("setContext",Ys,!0),await this._context.workspaceState.update(Ys,!0)):(g.commands.executeCommand("setContext",Ys,!1),this._context.workspaceState.update(Ys,!1))}clear(r){var e;this._updateMessageShown=!1,this._reviewModel.clear(),this._localToDispose.forEach(t=>t.dispose()),(e=this._folderRepoManager.activePullRequest)==null||e.clear(),r&&(this._prNumber=void 0,this._folderRepoManager.activePullRequest=void 0,this._statusBarItem&&this._statusBarItem.hide(),this.changesInPrDataProvider&&this.changesInPrDataProvider.removePrFromView(this._folderRepoManager),g.commands.executeCommand("pr.refreshList"))}async provideTextDocumentContent(r){const{path:e,commit:t}=na(r.query);let i=Td(this._reviewModel.localFileChanges).filter(n=>n.fileName===e).filter(n=>n.sha===t||(n.parentSha?n.parentSha:`${n.sha}^`)===t);if(i.length){const n=i[0],s=t===n.sha?hi.Delete:hi.Add;return(await n.diffHunks()).map(v=>v.diffLines.filter(S=>S.type!==s).map(S=>S.text)).reduce((v,S)=>v.concat(...S),[]).join(`
`)}if(i=Td(this._reviewModel.obsoleteFileChanges).filter(n=>n.fileName===e).filter(n=>n.sha===t||(n.parentSha?n.parentSha:`${n.sha}^`)===t),i.length){const n=i[0],s=t===n.sha?hi.Delete:hi.Add,c=[],v=Zn(n.comments,S=>String(S.originalPosition));for(const S in v){if(!v[S][0].diffHunks)continue;const N=v[S][0].diffHunks.map(U=>U.diffLines.filter(X=>X.type!==s).map(X=>X.text)).reduce((U,X)=>U.concat(...X),[]);c.push(...N)}return c.join(`
`)}}dispose(){this.clear(!0),this._disposables.forEach(r=>{r.dispose()})}static getReviewManagerForRepository(r,e){return r.find(t=>t._folderRepoManager.gitHubRepositories.some(i=>i.equals(e)))}static getReviewManagerForFolderManager(r,e){return r.find(t=>t._folderRepoManager===e)}};let bn=Pv;Rr(bn,"ID","Review");class Vk{constructor(){Rr(this,"_shouldShow",!1),Rr(this,"_onChangedShowValue",new g.EventEmitter),Rr(this,"onChangedShowValue",this._onChangedShowValue.event)}get shouldShow(){return this._shouldShow}set shouldShow(e){const t=this._shouldShow;this._shouldShow=e,t!==this._shouldShow&&this._onChangedShowValue.fire(this._shouldShow)}}var $k=Object.defineProperty,Dd=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?$k(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);class os extends ei{constructor(e,t,i,n){super();this.parent=e,this.label=t,this.iconPath=i,this.pullRequestModel=n,Dd(this,"command"),Dd(this,"contextValue"),Dd(this,"tooltip"),this.command={title:"View Pull Request Description",command:"pr.openDescription",arguments:[this]},this.contextValue="description",this.tooltip=`Description of pull request #${n.number}`,this.accessibilityInformation={label:`Pull request page of pull request number ${n.number}`,role:"button"}}getTreeItem(){return this}}var Gk=Object.defineProperty,jk=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?Gk(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);class zk extends hc{constructor(){super(...arguments);jk(this,"_prFileChangeContentProviders",{})}registerTextDocumentContentProvider(e,t){return this._prFileChangeContentProviders[e]=t,{dispose:()=>{delete this._prFileChangeContentProviders[e]}}}async readFile(e){const t=ti(e);if(t&&t.prNumber){const i=this._prFileChangeContentProviders[t.prNumber];if(i){const n=await i(e);return new TextEncoder().encode(n)}}return new TextEncoder().encode("")}}const Wk=new zk;function Av(){return Wk}var Kk=Object.defineProperty,Fd=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?Kk(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);class ls extends ei{constructor(e,t){super();this.parent=e,this.label=t,Fd(this,"collapsibleState"),Fd(this,"children",[]),Fd(this,"pathToChild",new Map),this.collapsibleState=g.TreeItemCollapsibleState.Expanded}async getChildren(){return this.children}finalize(){this.trimTree(),this.sort()}trimTree(){if(this.children.length===0||(this.children.forEach(t=>{t instanceof ls&&t.trimTree()}),this.children.length!==1))return;const e=this.children[0];e instanceof ls&&(this.label=this.label+"/"+e.label,this.label.startsWith("/")&&(this.label=this.label.substr(1)),this.children=e.children)}sort(){if(this.children.length<=1)return;const e=[],t=[];this.children.forEach(i=>{i instanceof ls?(i.sort(),e.push(i)):t.push(i)}),e.sort((i,n)=>i.label<n.label?-1:1),t.sort((i,n)=>i.label<n.label?-1:1),this.children=[...e,...t]}addFile(e){const t=e.fileName.split("/");this.addPathRecc(t,e)}addPathRecc(e,t){if(e.length<=0)return;if(e.length===1){this.children.push(t);return}const i=e[0],n=e.slice(1);let s=this.pathToChild.get(i);s||(s=new ls(this,i),this.pathToChild.set(i,s),this.children.push(s)),s.addPathRecc(n,t)}getTreeItem(){return this}}var Qk=Object.defineProperty,oa=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?Qk(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);const Iv=class extends ei{constructor(r,e,t,i){super();this.parent=r,this._folderReposManager=e,this.pullRequestModel=t,this._isLocal=i,oa(this,"_fileChanges"),oa(this,"_commentController"),oa(this,"_disposables",[]),oa(this,"_inMemPRContentProvider"),oa(this,"_command")}get command(){return this._command}set command(r){this._command=r}async getChildren(){xe.debug(`Fetch children of PRNode #${this.pullRequestModel.number}`,Iv.ID),this.pullRequestModel.onDidInvalidate(()=>this.refresh(this));try{this.childrenDisposables&&this.childrenDisposables.length&&(this.childrenDisposables.forEach(i=>i.dispose()),this.childrenDisposables=[]);const r=new os(this,"Description",new g.ThemeIcon("git-pull-request"),this.pullRequestModel);if(!this.pullRequestModel.isResolved())return[r];await this.pullRequestModel.initializeReviewThreadCache(),await this.pullRequestModel.initializePullRequestFileViewState(),this._fileChanges=await this.resolveFileChanges(),this._inMemPRContentProvider||(this._inMemPRContentProvider=Av().registerTextDocumentContentProvider(this.pullRequestModel.number,this.provideDocumentContent.bind(this))),this._commentController||await this.resolvePRCommentController(),await this.pullRequestModel.validateDraftMode();const e=[r];if(g.workspace.getConfiguration(Ir).get(Fs)==="tree"){const i=new ls(this,"");this._fileChanges.forEach(n=>i.addFile(n)),i.finalize(),i.label===""?e.push(...i.children):e.push(i)}else e.push(...this._fileChanges);return this.childrenDisposables=e,e}catch(r){return xe.appendLine(r),[]}}async resolvePRCommentController(){this.pullRequestModel.equals(this._folderReposManager.activePullRequest)||(await this.pullRequestModel.githubRepository.ensureCommentsController(),this._commentController=this.pullRequestModel.githubRepository.commentsController,this._disposables.push(this.pullRequestModel.githubRepository.commentsHandler.registerCommentingRangeProvider(this.pullRequestModel.number,this)),this._disposables.push(this.pullRequestModel.githubRepository.commentsHandler.registerCommentController(this.pullRequestModel.number,this.pullRequestModel,this._folderReposManager)),this.registerListeners())}registerListeners(){this._disposables.push(this.pullRequestModel.onDidChangePendingReviewState(async r=>{r||(await this.getFileChanges()).forEach(e=>{e instanceof Ml&&e.comments.forEach(t=>t.isDraft=r)})}))}async getFileChanges(){return this._fileChanges||(this._fileChanges=await this.resolveFileChanges()),this._fileChanges}async resolveFileChanges(){if(!this.pullRequestModel.isResolved())return[];const r=this.pullRequestModel.equals(this._folderReposManager.activePullRequest),e=await this.pullRequestModel.getFileChangesInfo(this._folderReposManager.repository),t=this.pullRequestModel.mergeBase;return t?e.map(i=>{const n=this.pullRequestModel.head.sha,s=i.status===yt.RENAME?i.previousFileName:i.fileName;if(i instanceof Ip)return new Ka(this,this.pullRequestModel,i.status,i.fileName,i.previousFileName,i.blobUrl,sa(g.Uri.file(aa(this._folderReposManager.repository.rootUri,i.fileName)),this.pullRequestModel,i.baseCommit,n,i.fileName,!1,i.status),sa(g.Uri.file(aa(this._folderReposManager.repository.rootUri,s)),this.pullRequestModel,i.baseCommit,n,i.fileName,!0,i.status));const c=g.Uri.file(aa(this._folderReposManager.repository.rootUri,i.fileName)),v=g.Uri.file(aa(this._folderReposManager.repository.rootUri,s));return new Ml(this._folderReposManager,this,this.pullRequestModel,i,i.previousFileName,r?i.status===yt.DELETE?Ri(c,void 0,void 0,"",!1,{base:!1},this._folderReposManager.repository.rootUri):c:sa(c,this.pullRequestModel,i.baseCommit,n,i.fileName,!1,i.status),r?Ri(v,i.status===yt.RENAME?i.previousFileName:i.fileName,void 0,i.status===yt.ADD?"":t,!1,{base:!0},this._folderReposManager.repository.rootUri):sa(v,this.pullRequestModel,i.baseCommit,n,i.fileName,!0,i.status),i.isPartial,i.patch)}):[]}getTreeItem(){const r=this.pullRequestModel.equals(this._folderReposManager.activePullRequest),{title:e,number:t,author:i,isDraft:n,html_url:s}=this.pullRequestModel,{login:c}=i,v=r?"\u2713 ":"",S=r?"Current Branch * ":"",N=t.toString(),U=`${v}#${N}: ${n?"[DRAFT] ":""}${e}`,X=`${S}${e} by @${c}`,ne=`by @${c}`;return{label:U,id:`${this.parent instanceof ei?this.parent.label:""}${s}`,tooltip:X,description:ne,collapsibleState:1,contextValue:"pullrequest"+(this._isLocal?":local":"")+(r?":active":":nonactive"),iconPath:this.pullRequestModel.userAvatarUri?this.pullRequestModel.userAvatarUri:new g.ThemeIcon("github"),accessibilityInformation:{label:`${n?"Draft ":""}Pull request number ${N}: ${e} by ${c}`}}}async provideCommentingRanges(r,e){if(r.uri.scheme==="pr"){const t=ti(r.uri);if(!t||t.prNumber!==this.pullRequestModel.number)return;const i=(await this.getFileChanges()).find(n=>n.fileName===t.fileName);return!i||i instanceof Ka?void 0:Nv(await i.diffHunks(),t.isBase)}}async provideDocumentContent(r){const e=ti(r);if(!e)return"";const t=(await this.getFileChanges()).find(i=>i.fileName===e.fileName);if(!t)return xe.appendLine(`PR> can not find content for document ${r.toString()}`),"";if(e.isBase&&t.status===yt.ADD||!e.isBase&&t.status===yt.DELETE)return"";if(t instanceof Ka||t.isPartial)try{return e.isBase?this.pullRequestModel.getFile(t.previousFileName||t.fileName,e.baseCommit):this.pullRequestModel.getFile(t.fileName,e.headCommit)}catch(i){return xe.appendLine(`PR> Fetching file content failed: ${i}`),g.window.showWarningMessage("Opening this file locally failed. Would you like to view it on GitHub?","Open on GitHub").then(n=>{n==="Open on GitHub"&&t.blobUrl&&g.commands.executeCommand("vscode.open",g.Uri.parse(t.blobUrl))}),""}if(t instanceof Ml)if(t.status===yt.ADD||t.status===yt.DELETE)if(e.isBase){const n=[],s=await t.diffHunks();for(let c=0;c<s.length;c++)for(let v=0;v<s[c].diffLines.length;v++){const S=s[c].diffLines[v];S.type===hi.Add||(S.type===hi.Delete?n.push(S.text):S.type===hi.Control||n.push(S.text))}return n.join(`
`)}else{const n=[],s=await t.diffHunks();for(let c=0;c<s.length;c++)for(let v=0;v<s[c].diffLines.length;v++){const S=s[c].diffLines[v];S.type===hi.Add?n.push(S.text):S.type===hi.Delete||S.type===hi.Control||n.push(S.text)}return n.join(`
`)}else{const n=t.status===yt.RENAME?t.previousFileName:t.fileName,s=g.Uri.joinPath(this._folderReposManager.repository.rootUri,n),c=await this._folderReposManager.repository.show(e.baseCommit,s.fsPath);return e.isBase?c:vy(c,t.patch)}return""}dispose(){super.dispose(),this._inMemPRContentProvider&&this._inMemPRContentProvider.dispose(),this._commentController=void 0,this._disposables.forEach(r=>r.dispose()),this._disposables=[]}};let la=Iv;oa(la,"ID","PRNode");const Il=new g.EventEmitter,Dv=Il.event;function Za(r,e){if(e)return e instanceof la?e.pullRequestModel:e;if(!r.activePullRequest)throw g.window.showErrorMessage("Unable to find current pull request."),new Error("Unable to find current pull request.");return r.activePullRequest}async function Od(r,e,t,i,n){const s=Za(n,t);i==null||i.reveal(i,{select:!0,focus:!0}),await Si.createOrShow(r.extensionUri,n,s),e.sendTelemetryEvent("pr.openDescription")}async function us(r,e,t){var i;if(r.length===1)return r[0];const n=r.map(s=>({label:e(s),itemValue:s}));return(i=await g.window.showQuickPick(n,t))==null?void 0:i.itemValue}async function Xa(r,e){r instanceof la||r instanceof os?g.commands.executeCommand("vscode.open",g.Uri.parse(r.pullRequestModel.html_url)):g.commands.executeCommand("vscode.open",g.Uri.parse(r.html_url)),e.sendTelemetryEvent("pr.openInGitHub")}function Yk(r,e,t,i,n,s,c){r.subscriptions.push(g.commands.registerCommand("pr.openPullRequestOnGitHub",async N=>{if(N)Xa(N,n);else{const U=t.folderManagers.map(X=>X.activePullRequest).filter(X=>!!X);if(U.length>=1){const X=await us(U,ne=>ne.html_url);X&&Xa(X,n)}}})),r.subscriptions.push(g.commands.registerCommand("pr.openAllDiffs",async()=>{const N=t.folderManagers.filter(ce=>ce.activePullRequest).map(ce=>({activePr:ce.activePullRequest,folderManager:ce})),U=N.length>=1?await us(N,ce=>ce.activePr.html_url):N[0];if(!U)return;const{folderManager:X}=U,ne=bn.getReviewManagerForFolderManager(i,X);!ne||ne.reviewModel.localFileChanges.forEach(ce=>ce.openDiff(X,{preview:!1}))})),r.subscriptions.push(g.commands.registerCommand("review.suggestDiff",async N=>{try{const U=await us(t.folderManagers,Ce=>qt.basename(Ce.repository.rootUri.fsPath));if(!U||!U.activePullRequest)return;const{indexChanges:X,workingTreeChanges:ne}=U.repository.state;if(!X.length)if(ne.length)if(await g.window.showWarningMessage(`There are no staged changes to suggest.
Would you like to automatically stage all your of changes and suggest them?`,{modal:!0},"Yes")==="Yes")await g.commands.executeCommand("git.stageAll");else return;else{g.window.showInformationMessage("There are no changes to suggest.");return}const ce=await U.repository.diff(!0);let be=`Suggested edit:
`;N&&N.inputBox&&N.inputBox.value&&(be=`${N.inputBox.value}
`,N.inputBox.value="");const ye=`${be}\`\`\`diff
${ce}
\`\`\``;await U.activePullRequest.createIssueComment(ye),await g.commands.executeCommand("git.unstageAll");const ge=qt.join(U.repository.rootUri.fsPath,".git",`${U.activePullRequest.number}.diff`),ve=new TextEncoder,ke=g.Uri.file(ge);await g.workspace.fs.writeFile(ke,ve.encode(ce)),await U.repository.apply(ge,!0),await g.workspace.fs.delete(ke)}catch(U){const X=`${U}${U.stderr?`
${U.stderr}`:""}`;xe.appendLine(`Applying patch failed: ${X}`),g.window.showErrorMessage(`Applying patch failed: ${bt(U)}`)}})),r.subscriptions.push(g.commands.registerCommand("pr.openFileOnGitHub",async N=>{if(!(N instanceof Ka&&!await g.window.showInformationMessage(`${N.fileName} can't be opened locally. Do you want to open it on GitHub?`,"Open"))&&N.blobUrl)return g.commands.executeCommand("vscode.open",g.Uri.parse(N.blobUrl))})),r.subscriptions.push(g.commands.registerCommand("pr.copyCommitHash",N=>{g.env.clipboard.writeText(N.sha)})),r.subscriptions.push(g.commands.registerCommand("pr.openOriginalFile",async N=>{const U=t.getManagerForIssueModel(N.pullRequest);if(U){const X=await Cd(N.parentFilePath,U.repository);g.commands.executeCommand("vscode.open",X||N.parentFilePath)}})),r.subscriptions.push(g.commands.registerCommand("pr.openModifiedFile",N=>{g.commands.executeCommand("vscode.open",N.filePath)})),r.subscriptions.push(g.commands.registerCommand("pr.openDiffView",N=>{const U=t.getManagerForIssueModel(N.pullRequest);!U||N.openDiff(U)})),r.subscriptions.push(g.commands.registerCommand("pr.deleteLocalBranch",async N=>{const U=t.getManagerForIssueModel(N.pullRequestModel);if(!U)return;const X=Za(U,N),ne="delete branch (even if not merged)";let ce=null;try{await U.deleteLocalPullRequest(X)}catch(be){if(be.gitErrorCode===Mn.BranchNotFullyMerged){if(await g.window.showErrorMessage(`The branch '${X.localBranchName}' is not fully merged, are you sure you want to delete it? `,ne)!==ne)return;try{await U.deleteLocalPullRequest(X,!0)}catch(ge){ce=ge}}else ce=be}ce?(n.sendTelemetryErrorEvent("pr.deleteLocalPullRequest.failure"),await g.window.showErrorMessage(`Deleting local pull request branch failed: ${ce}`)):(n.sendTelemetryEvent("pr.deleteLocalPullRequest.success"),g.commands.executeCommand("pr.refreshList"))}));function v(N){if(N){const U=g.Uri.file(N).toString();for(const X of i)if(X.repository.rootUri.toString()===U)return X}return us(i,U=>qt.basename(U.repository.rootUri.fsPath),{placeHolder:"Choose a repository to create a pull request in",ignoreFocusOut:!0})}function S(N){return!!(N==null?void 0:N.rootUri)}r.subscriptions.push(g.commands.registerCommand("pr.create",async N=>{var U,X;S(N)?(U=await v(N.rootUri.fsPath))==null||U.createPullRequest():(X=await v(N==null?void 0:N.repoPath))==null||X.createPullRequest(N==null?void 0:N.compareBranch)})),r.subscriptions.push(g.commands.registerCommand("pr.pick",async N=>{let U;N instanceof la||N instanceof os?U=N.pullRequestModel:U=N;const X=N instanceof pn;return n.sendTelemetryEvent("pr.checkout",{fromDescription:X.toString()}),g.window.withProgress({location:g.ProgressLocation.SourceControl,title:`Switching to Pull Request #${U.number}`},async()=>{var ne;await((ne=bn.getReviewManagerForRepository(i,U.githubRepository))==null?void 0:ne.switch(U))})})),r.subscriptions.push(g.commands.registerCommand("pr.exit",async N=>{let U;N instanceof la||N instanceof os?U=N.pullRequestModel:U=N;const X=N instanceof pn;return n.sendTelemetryEvent("pr.exit",{fromDescription:X.toString()}),g.window.withProgress({location:g.ProgressLocation.SourceControl,title:"Exiting Pull Request"},async()=>{const ne=await U.githubRepository.getDefaultBranch(),ce=t.getManagerForIssueModel(U);ce&&ce.checkoutDefaultBranch(ne)})})),r.subscriptions.push(g.commands.registerCommand("pr.merge",async N=>{const U=t.getManagerForIssueModel(N==null?void 0:N.pullRequestModel);if(!U)return;const X=Za(U,N);return X.base&&X.head&&!X.base.repositoryCloneUrl.equals(X.head.repositoryCloneUrl)&&ud()?Xa(X,n):g.window.showWarningMessage("Are you sure you want to merge this pull request on GitHub?",{modal:!0},"Yes").then(async be=>{let ye;if(be==="Yes")try{return ye=await U.mergePullRequest(X),ye}catch(ge){return g.window.showErrorMessage(`Unable to merge pull request. ${bt(ge)}`),ye}})})),r.subscriptions.push(g.commands.registerCommand("pr.readyForReview",async N=>{const U=t.getManagerForIssueModel(N==null?void 0:N.pullRequestModel);if(!U)return;const X=Za(U,N);return g.window.showWarningMessage("Are you sure you want to mark this pull request as ready to review on GitHub?",{modal:!0},"Yes").then(async ne=>{let ce;if(ne==="Yes")try{return ce=await X.setReadyForReview(),g.commands.executeCommand("pr.refreshList"),ce}catch(be){return g.window.showErrorMessage(`Unable to mark pull request as ready to review. ${bt(be)}`),ce}})})),r.subscriptions.push(g.commands.registerCommand("pr.close",async(N,U)=>{let X;if(N)X=N instanceof pn?N:N.pullRequestModel;else{const ce=t.folderManagers.map(be=>be.activePullRequest).filter(be=>!!be);X=await us(ce,be=>`${be.number}: ${be.title}`,{placeHolder:"Pull request to close"})}if(!X)return;const ne=X;return g.window.showWarningMessage("Are you sure you want to close this pull request on GitHub? This will close the pull request without merging.",{modal:!0},"Yes","No").then(async ce=>{if(ce==="Yes")try{let be;U&&(be=await ne.createIssueComment(U));const ye=await ne.close();return g.commands.executeCommand("pr.refreshList"),Il.fire(ye),be}catch(be){g.window.showErrorMessage(`Unable to close pull request. ${bt(be)}`),Il.fire()}Il.fire()})})),r.subscriptions.push(g.commands.registerCommand("pr.openDescription",async N=>{let U;if(N)U=N instanceof os?N.pullRequestModel:N;else{const ce=t.folderManagers.map(be=>be.activePullRequest).filter(be=>!!be);ce.length>=1&&(U=await us(ce,be=>be.title))}if(!U){xe.appendLine("No pull request found.");return}const X=t.getManagerForIssueModel(U);if(!X)return;let ne;if(N instanceof os)ne=N;else{const ce=bn.getReviewManagerForFolderManager(i,X);if(!ce)return;ne=ce.changesInPrDataProvider.getDescriptionNode(X)}await Od(r,n,U,ne,X)})),r.subscriptions.push(g.commands.registerCommand("pr.refreshDescription",async()=>{Si.currentPanel&&Si.refresh()})),r.subscriptions.push(g.commands.registerCommand("pr.openDescriptionToTheSide",async N=>{const U=t.getManagerForIssueModel(N.pullRequestModel);if(!U)return;const X=N.pullRequestModel,ne=Za(U,X);N.reveal(N,{select:!0,focus:!0}),Si.createOrShow(r.extensionUri,U,ne,!0),n.sendTelemetryEvent("pr.openDescriptionToTheSide")})),r.subscriptions.push(g.commands.registerCommand("pr.signin",async()=>{await t.authenticate()})),r.subscriptions.push(g.commands.registerCommand("pr.deleteLocalBranchesNRemotes",async()=>{for(const N of t.folderManagers)await N.deleteLocalBranchesNRemotes()})),r.subscriptions.push(g.commands.registerCommand("pr.signinAndRefreshList",async()=>{await t.authenticate()&&g.commands.executeCommand("pr.refreshList")})),r.subscriptions.push(g.commands.registerCommand("pr.configureRemotes",async()=>g.commands.executeCommand("workbench.action.openSettings",`@ext:${ss} remotes`))),r.subscriptions.push(g.commands.registerCommand("pr.startReview",async N=>{n.sendTelemetryEvent("pr.startReview");const U=Nn(N.thread);U&&U.startReview(N.thread,N.text)})),r.subscriptions.push(g.commands.registerCommand("pr.openReview",async N=>{n.sendTelemetryEvent("pr.openReview");const U=Nn(N.thread);U&&await U.openReview(N.thread)})),r.subscriptions.push(g.commands.registerCommand("pr.resolveReviewThread",async N=>{n.sendTelemetryEvent("pr.resolveReviewThread");const U=Nn(N.thread);U&&await U.resolveReviewThread(N.thread,N.text)})),r.subscriptions.push(g.commands.registerCommand("pr.unresolveReviewThread",async N=>{n.sendTelemetryEvent("pr.unresolveReviewThread");const U=Nn(N.thread);U&&await U.unresolveReviewThread(N.thread,N.text)})),r.subscriptions.push(g.commands.registerCommand("pr.createComment",async N=>{n.sendTelemetryEvent("pr.createComment");const U=Nn(N.thread);U&&U.createOrReplyComment(N.thread,N.text,!1)})),r.subscriptions.push(g.commands.registerCommand("pr.createSingleComment",async N=>{n.sendTelemetryEvent("pr.createSingleComment");const U=Nn(N.thread);U&&U.createOrReplyComment(N.thread,N.text,!0)})),r.subscriptions.push(g.commands.registerCommand("pr.editComment",async N=>{n.sendTelemetryEvent("pr.editComment"),N.startEdit()})),r.subscriptions.push(g.commands.registerCommand("pr.editQuery",N=>(n.sendTelemetryEvent("pr.editQuery"),N.editQuery()))),r.subscriptions.push(g.commands.registerCommand("pr.cancelEditComment",async N=>{n.sendTelemetryEvent("pr.cancelEditComment"),N.cancelEdit()})),r.subscriptions.push(g.commands.registerCommand("pr.saveComment",async N=>{n.sendTelemetryEvent("pr.saveComment");const U=Nn(N.parent);U&&await U.editComment(N.parent,N)})),r.subscriptions.push(g.commands.registerCommand("pr.deleteComment",async N=>{if(n.sendTelemetryEvent("pr.deleteComment"),await g.window.showWarningMessage("Delete comment?",{modal:!0},"Delete")==="Delete"){const X=Nn(N.parent);X&&await X.deleteComment(N.parent,N)}})),r.subscriptions.push(g.commands.registerCommand("review.openFile",N=>{var U;const X=N instanceof ra?N.openFileCommand():kv(N);g.commands.executeCommand(X.command,...(U=X.arguments)!=null?U:[])})),r.subscriptions.push(g.commands.registerCommand("pr.refreshChanges",N=>{i.forEach(U=>{U.updateComments(),Si.refresh(),U.changesInPrDataProvider.refresh()})})),r.subscriptions.push(g.commands.registerCommand("pr.setFileListLayoutAsTree",N=>{g.workspace.getConfiguration("githubPullRequests").update("fileListLayout","tree",!0)})),r.subscriptions.push(g.commands.registerCommand("pr.setFileListLayoutAsFlat",N=>{g.workspace.getConfiguration("githubPullRequests").update("fileListLayout","flat",!0)})),r.subscriptions.push(g.commands.registerCommand("pr.refreshPullRequest",N=>{var U;const X=t.getManagerForIssueModel(N.pullRequestModel);X&&N.pullRequestModel.equals(X==null?void 0:X.activePullRequest)&&((U=bn.getReviewManagerForFolderManager(i,X))==null||U.updateComments()),Si.refresh(),c.refresh(N)})),r.subscriptions.push(g.commands.registerCommand("pr.markFileAsViewed",async N=>{try{await N.pullRequest.markFileAsViewed(N.fileName)}catch(U){g.window.showErrorMessage(`Marked file as viewed failed: ${U}`)}})),r.subscriptions.push(g.commands.registerCommand("pr.unmarkFileAsViewed",async N=>{try{await N.pullRequest.unmarkFileAsViewed(N.fileName)}catch(U){g.window.showErrorMessage(`Marked file as not viewed failed: ${U}`)}})),r.subscriptions.push(g.commands.registerCommand("pr.expandAllComments",()=>{e.commentsExpandState=!0})),r.subscriptions.push(g.commands.registerCommand("pr.collapseAllComments",()=>{e.commentsExpandState=!1})),r.subscriptions.push(g.commands.registerCommand("pr.checkoutByNumber",async()=>{var N;const U=[];t.folderManagers.forEach(ye=>{U.push(...ye.gitHubRepositories.map(ge=>({manager:ye,repo:ge})))});const X=await us(U,ye=>`${ye.repo.remote.owner}/${ye.repo.remote.repositoryName}`,{placeHolder:"Which GitHub repository do you want to checkout the pull request from?"});if(!X)return;const ne=/^#?(\d*)$/,ce=await g.window.showInputBox({ignoreFocusOut:!0,prompt:"Enter the a pull request number",validateInput:ye=>{const ge=ye.match(ne);if(!ge||ge.length!==2||Number.isNaN(Number(ge[1])))return"Value must be a number"}});if(ce===void 0||ce==="#")return;const be=await X.manager.fetchById(X.repo,Number(ce.match(ne)[1]));if(be)return(N=bn.getReviewManagerForFolderManager(i,X.manager))==null?void 0:N.switch(be)}))}var Jk=Object.defineProperty,Ld=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?Jk(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);class Zk{constructor(e){Ld(this,"_commentsExpandState"),Ld(this,"_onDidChangeCommentsExpandState",new g.EventEmitter),Ld(this,"onDidChangeCommentsExpandState",this._onDidChangeCommentsExpandState.event);var t;const i=(t=g.workspace.getConfiguration(Ir))==null?void 0:t.get(ml);this._commentsExpandState=i===nd,e.subscriptions.push(g.workspace.onDidChangeConfiguration(n=>{var s;if(n.affectsConfiguration(`${Ir}.${ml}`)){const c=(s=g.workspace.getConfiguration(Ir))==null?void 0:s.get(ml);this.commentsExpandState=c===nd}}))}get commentsExpandState(){return this._commentsExpandState}set commentsExpandState(e){this._commentsExpandState=e,this._onDidChangeCommentsExpandState.fire(this._commentsExpandState)}}var ua=St(59035),Xk=Object.defineProperty,Fv=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?Xk(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);class e2{constructor(e){this.baseReporter=e,Fv(this,"sharedProperties",{})}sendTelemetryEvent(e,t,i){var n;(n=this.baseReporter)==null||n.sendTelemetryEvent(e,{...this.sharedProperties,...t},i)}sendTelemetryErrorEvent(e,t,i){var n;(n=this.baseReporter)==null||n.sendTelemetryErrorEvent(e,{...this.sharedProperties,...t})}setSharedProperty(e,t){this.sharedProperties[e]=t}postEvent(e,t){const i={};for(const[n,s]of t)i[n]=s;this.sendTelemetryEvent(e,i)}async dispose(){var e;return(e=this.baseReporter)==null?void 0:e.dispose()}}function t2(){switch(g.env.uriScheme){case"vscode":return ua.aU.Public;case"vscode-insiders":return ua.aU.Insiders;case"vscode-exploration":return ua.aU.Internal;case"code-oss":return ua.aU.Team;default:return ua.aU.Public}}class r2{constructor(){Fv(this,"initializePromise",Promise.resolve())}isFlightEnabled(e){return!1}isCachedFlightEnabled(e){return Promise.resolve(!1)}isFlightEnabledAsync(e){return Promise.resolve(!1)}getTreatmentVariable(e,t){}getTreatmentVariableAsync(e,t){return Promise.resolve(void 0)}}async function i2(r,e){const t=r.extension.id,i=r.extension.packageJSON.name,n=r.extension.packageJSON.version,s=t2();return i==="vscode-pull-request-github"?(0,ua.X7)(t,n,s,e,r.globalState):new r2}var n2=Object.defineProperty,cs=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?n2(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);class TR extends Error{constructor(e){super();this.repository=e}get message(){return`${this.repository.rootUri.toString()} has no GitHub remotes`}}class CR extends Error{constructor(e){super();this.repository=e}get message(){return`${this.repository.rootUri.toString()} has a detached HEAD (create a branch first)`}}class MR extends Error{constructor(e,t,i){super();this.branchName=e,this.upstreamRef=t,this.problem=i}get message(){const{upstreamRef:{remote:e,name:t},branchName:i,problem:n}=this;return`The upstream ref ${e}/${t} for branch ${i} ${n}.`}}const NR="No Milestone";class Ov{constructor(e,t,i,n){this._folderManagers=e,this._credentialStore=t,this._telemetry=i,this._sessionState=n,cs(this,"_subs"),cs(this,"_onDidChangeState",new g.EventEmitter),cs(this,"onDidChangeState",this._onDidChangeState.event),cs(this,"_onDidChangeFolderRepositories",new g.EventEmitter),cs(this,"onDidChangeFolderRepositories",this._onDidChangeFolderRepositories.event),cs(this,"_state",ki.Initializing),this._subs=[],g.commands.executeCommand("setContext",bv,this._state),this._subs.push(...e.map(s=>s.onDidLoadRepositories(c=>this.state=c)))}get folderManagers(){return this._folderManagers}insertFolderManager(e){this._subs.push(e.onDidLoadRepositories(i=>this.state=i));const t=g.workspace.workspaceFolders;if(t){const i=t.findIndex(n=>n.uri.toString()===e.repository.rootUri.toString());if(i>-1){const n=this._folderManagers.slice(i,this._folderManagers.length);this._folderManagers=this._folderManagers.slice(0,i),this._folderManagers.push(e),this._folderManagers.push(...n),this._onDidChangeFolderRepositories.fire();return}}this._folderManagers.push(e),this._onDidChangeFolderRepositories.fire()}removeRepo(e){const t=this._folderManagers.findIndex(i=>i.repository.rootUri.toString()===e.rootUri.toString());if(t>-1){const i=this._folderManagers[t];this._folderManagers.splice(t),i.dispose(),this._onDidChangeFolderRepositories.fire()}}getManagerForIssueModel(e){if(e===void 0)return;const t=e.remote.url.substring(0,e.remote.url.length-qt.extname(e.remote.url).length);for(const i of this._folderManagers)if(i.gitHubRepositories.map(n=>n.remote.url.substring(0,n.remote.url.length-qt.extname(n.remote.url).length)).includes(t))return i}getManagerForFile(e){if(e.scheme==="untitled")return this._folderManagers[0];for(const t of this._folderManagers){const i=t.repository.rootUri.path,n=e.path.substring(i.length>1?i.length+1:i.length);if(zo(g.Uri.joinPath(t.repository.rootUri,n).path,e.path)===0)return t}}get state(){return this._state}set state(e){const t=e!==this._state;this._state=e,t&&(g.commands.executeCommand("setContext",bv,e),this._onDidChangeState.fire())}get credentialStore(){return this._credentialStore}async clearCredentialCache(){await this._credentialStore.reset(),this.state=ki.Initializing}async authenticate(){const e=await this._credentialStore.login(jt.github);let t;return yl()&&(t=await this._credentialStore.login(jt["github-enterprise"])),!!e||!!t}dispose(){this._subs.forEach(e=>e.dispose())}}cs(Ov,"ID","RepositoriesManager");function PR(r){switch(r){case"committed":return EventType.Committed;case"mentioned":return EventType.Mentioned;case"subscribed":return EventType.Subscribed;case"commented":return EventType.Commented;case"reviewed":return EventType.Reviewed;default:return EventType.Other}}var s2=Object.defineProperty,Zi=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?s2(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);class Ud{constructor(e){Zi(this,"_onDidOpenRepository",new g.EventEmitter),Zi(this,"onDidOpenRepository",this._onDidOpenRepository.event),Zi(this,"_onDidCloseRepository",new g.EventEmitter),Zi(this,"onDidCloseRepository",this._onDidCloseRepository.event),Zi(this,"_onDidChangeState",new g.EventEmitter),Zi(this,"onDidChangeState",this._onDidChangeState.event),Zi(this,"_onDidPublish",new g.EventEmitter),Zi(this,"onDidPublish",this._onDidPublish.event),Zi(this,"_gitAPI"),Zi(this,"_disposables");const t=e.exports;try{this._gitAPI=t.getAPI(1)}catch(i){throw g.window.showErrorMessage("Activating the Pull Requests and Issues extension failed. Please make sure you have git installed."),i}this._disposables=[],this._disposables.push(this._gitAPI.onDidCloseRepository(i=>this._onDidCloseRepository.fire(i))),this._disposables.push(this._gitAPI.onDidOpenRepository(i=>this._onDidOpenRepository.fire(i))),this._disposables.push(this._gitAPI.onDidChangeState(i=>this._onDidChangeState.fire(i))),this._disposables.push(this._gitAPI.onDidPublish(i=>this._onDidPublish.fire(i)))}get repositories(){return this._gitAPI.repositories}get state(){return this._gitAPI.state}static async createProvider(){const e=g.extensions.getExtension("vscode.git");if(e)return await e.activate(),new Ud(e)}dispose(){this._disposables.forEach(e=>e.dispose())}}var a2=Object.defineProperty,xr=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?a2(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);class o2{constructor(e){this._liveShareAPI=e,xr(this,"_onDidOpenRepository",new g.EventEmitter),xr(this,"onDidOpenRepository",this._onDidOpenRepository.event),xr(this,"_onDidCloseRepository",new g.EventEmitter),xr(this,"onDidCloseRepository",this._onDidCloseRepository.event),xr(this,"_openRepositories",[]),xr(this,"_sharedServiceProxy"),xr(this,"_disposables"),this._disposables=[]}get repositories(){return this._openRepositories}async initialize(){this._sharedServiceProxy=await this._liveShareAPI.getSharedService(Fg)||void 0,!!this._sharedServiceProxy&&(this._sharedServiceProxy.isServiceAvailable&&await this._refreshWorkspaces(!0),this._disposables.push(this._sharedServiceProxy.onDidChangeIsServiceAvailable(async e=>{await this._refreshWorkspaces(e)})),this._disposables.push(g.workspace.onDidChangeWorkspaceFolders(this._onDidChangeWorkspaceFolders.bind(this))))}async _onDidChangeWorkspaceFolders(e){e.added.forEach(async t=>{t.uri.scheme==="vsls"&&this._sharedServiceProxy&&this._sharedServiceProxy.isServiceAvailable&&await this.openVSLSRepository(t)}),e.removed.forEach(async t=>{t.uri.scheme==="vsls"&&this._sharedServiceProxy&&this._sharedServiceProxy.isServiceAvailable&&await this.closeVSLSRepository(t)})}async _refreshWorkspaces(e){g.workspace.workspaceFolders&&g.workspace.workspaceFolders.forEach(async t=>{t.uri.scheme==="vsls"&&(e?await this.openVSLSRepository(t):await this.closeVSLSRepository(t))})}async openVSLSRepository(e){if(this.getRepository(e))return;const i=new c2(e,this._sharedServiceProxy),n=new l2,s=new Proxy(i,n);await s.initialize(),this.openRepository(s)}async closeVSLSRepository(e){const t=this.getRepository(e);!t||this.closeRepository(t)}openRepository(e){this._openRepositories.push(e),this._onDidOpenRepository.fire(e)}closeRepository(e){this._openRepositories=this._openRepositories.filter(t=>t!==e),this._onDidCloseRepository.fire(e)}getRepository(e){return this._openRepositories.filter(t=>t.workspaceFolder===e)[0]}dispose(){this._sharedServiceProxy=void 0,this._disposables.forEach(e=>e.dispose()),this._disposables=[]}}class l2{constructor(){}get(e,t){return t in e?e[t]:function(...i){return e.proxy.request(hd,[t,e.workspaceFolder.uri.toString(),...i])}}}class u2{constructor(e){xr(this,"HEAD"),xr(this,"refs"),xr(this,"remotes"),xr(this,"submodules",[]),xr(this,"rebaseCommit"),xr(this,"mergeChanges",[]),xr(this,"indexChanges",[]),xr(this,"workingTreeChanges",[]),xr(this,"_onDidChange",new g.EventEmitter),xr(this,"onDidChange",this._onDidChange.event),this.HEAD=e.HEAD,this.remotes=e.remotes,this.refs=e.refs}update(e){this.HEAD=e.HEAD,this.remotes=e.remotes,this.refs=e.refs,this._onDidChange.fire()}}class c2{constructor(e,t){this.workspaceFolder=e,this.proxy=t,xr(this,"rootUri"),xr(this,"state")}async initialize(){const e=await this.proxy.request(hd,[Og,this.workspaceFolder.uri.toString()]);this.state=new u2(e),this.rootUri=g.Uri.parse(e.rootUri),this.proxy.onNotify(Lg,this._notifyHandler.bind(this))}_notifyHandler(e){var t;(t=this.state)==null||t.update(e)}}var d2=Object.defineProperty,Lv=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?d2(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);class f2{constructor(e,t){this._liveShareAPI=e,this._api=t,Lv(this,"_sharedService"),Lv(this,"_disposables"),this._disposables=[]}async initialize(){this._sharedService=await this._liveShareAPI.shareService(Fg)||void 0,this._sharedService&&this._sharedService.onRequest(hd,this._gitHandler.bind(this))}async _gitHandler(e){const t=e[0],i=e[1],n=g.Uri.parse(i),s=this._liveShareAPI.convertSharedUriToLocal(n),c=this._api.getGitProvider(s);if(!c)return;const v=c.repositories.filter(S=>S.rootUri.toString()===s.toString())[0];if(v){const S=e.slice(2);if(t===Og)return this._disposables.push(v.state.onDidChange(N=>{this._sharedService.notify(Lg,{HEAD:v.state.HEAD,remotes:v.state.remotes,refs:v.state.refs})})),{HEAD:v.state.HEAD,remotes:v.state.remotes,refs:v.state.refs,rootUri:n.toString()};if(t==="show"){const N=S[1],U=n.with({path:N}),X=this._liveShareAPI.convertSharedUriToLocal(U);return S[1]=X.fsPath,v[t](...S)}if(v[t])return v[t](...S)}else return null}dispose(){this._disposables.forEach(e=>e.dispose()),this._sharedService=void 0,this._disposables=[]}}var h2=Object.defineProperty,eo=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?h2(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);async function p2(){const r=g.extensions.getExtension("ms-vsliveshare.vsliveshare");if(!r)return null;const e=r.isActive?r.exports:await r.activate();if(!e)return null;const t="0.3.967";return e.getApi?e.getApi(t):e.getApiAsync(t)}class m2{constructor(e){this._api=e,eo(this,"_liveShareAPI"),eo(this,"_host"),eo(this,"_guest"),eo(this,"_localDisposables"),eo(this,"_globalDisposables"),this._localDisposables=[],this._globalDisposables=[]}async initialize(){if(this._liveShareAPI||(this._liveShareAPI=await p2()),!!this._liveShareAPI)return this._globalDisposables.push(this._liveShareAPI.onDidChangeSession(e=>this._onDidChangeSession(e.session),this)),this._liveShareAPI.session&&this._onDidChangeSession(this._liveShareAPI.session),this._liveShareAPI}async _onDidChangeSession(e){if(this._localDisposables.forEach(t=>t.dispose()),e.role===1){this._host=new f2(this._liveShareAPI,this._api),this._localDisposables.push(this._host),await this._host.initialize();return}e.role===2&&(this._guest=new o2(this._liveShareAPI),this._localDisposables.push(this._guest),await this._guest.initialize(),this._localDisposables.push(this._api.registerGitProvider(this._guest)))}dispose(){this._liveShareAPI=void 0,this._localDisposables.forEach(e=>e.dispose()),this._globalDisposables.forEach(e=>e.dispose())}}function g2(r){return new m2(r)}async function v2(r,e){const t=await Ud.createProvider();if(t)return e.registerGitProvider(t),t}var b2=Object.defineProperty,Uv=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?b2(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);class y2{constructor(e){this.pullRequestManager=e,Uv(this,"onNotifiedEmitter",new g.EventEmitter),Uv(this,"onNotified",this.onNotifiedEmitter.event),e.folderManagers.forEach(t=>{t.onDidChangeAssignableUsers(i=>{this.notifySuggestedAccounts(i)})})}async requestAsync(e,t,i){let n=null;switch(e){case"initialize":n={description:"Pullrequest",capabilities:{supportsDispose:!1,supportsInviteLink:!1,supportsPresence:!1,supportsContactPresenceRequest:!1,supportsPublishPresence:!1}};const s=new Map;for(const c of this.pullRequestManager.folderManagers){const v=c.getAllAssignableUsers();if(!!v)for(const S of v)s.has(S.login)||s.set(S.login,S)}s.size>0&&this.notifySuggestedAccounts(Array.from(s.values()));break;default:throw new Error(`type:${e} not supported`)}return n}async notifySuggestedAccounts(e){let t;try{t=await this.getCurrentUserLogin()}catch(i){}t&&e.findIndex(i=>i.login===t)!==-1&&this.notifySuggestedUsers(e.filter(i=>i.email).map(i=>({id:i.login,displayName:i.name?i.name:i.login,email:i.email})),!0)}async getCurrentUserLogin(){var e;if(this.pullRequestManager.folderManagers.length===0)return;const t=await((e=this.pullRequestManager.folderManagers[0])==null?void 0:e.getOrigin());if(t){const i=t.hub.currentUser;if(i)return i.login}}notify(e,t){this.onNotifiedEmitter.fire({type:e,body:t})}notifySuggestedUsers(e,t){this.notify("suggestedUsers",{contacts:e,exclusive:t})}}var w2=Object.defineProperty,Bv=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?w2(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);class _2{constructor(){Bv(this,"_extensionsDisposable"),Bv(this,"_subscriptions",[]),this._extensionsDisposable=g.extensions.onDidChange(this.onExtensionsChanged,this),this.onExtensionsChanged()}dispose(){this._extensionsDisposable.dispose(),g.Disposable.from(...this._subscriptions).dispose()}register(e){this._subscriptions.push(e.registerActionRunner("createPullRequest",{partnerId:"ghpr",name:"GitHub Pull Requests and Issues",label:"Create Pull Request",run:function(t){t.branch.isRemote||g.commands.executeCommand("pr.create",{repoPath:t.repoPath,compareBranch:t.branch.name})}}))}async onExtensionsChanged(){var e;const t=(e=g.extensions.getExtension("eamodio.gitlens"))!=null?e:g.extensions.getExtension("eamodio.gitlens-insiders");if(t)if(this._extensionsDisposable.dispose(),t.isActive)this.register(await t.exports);else{let i=0;const n=setInterval(async()=>{t.isActive?(clearInterval(n),this.register(await t.exports)):(i++,i>60&&clearInterval(n))},1e3)}}}var S2=Object.defineProperty,ds=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?S2(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);class qv{constructor(e,t,i,n,s){this.issueModel=e,this.manager=t,this.stateManager=i,this.shouldPromptForBranch=s,ds(this,"repoChangeDisposable"),ds(this,"_branchName"),ds(this,"user"),ds(this,"repo"),ds(this,"_repoDefaults"),ds(this,"_onDidChangeCurrentIssueState",new g.EventEmitter),ds(this,"onDidChangeCurrentIssueState",this._onDidChangeCurrentIssueState.event),this.setRepo(n!=null?n:this.issueModel.githubRepository.remote)}setRepo(e){var t;for(let i=0;i<this.stateManager.gitAPI.repositories.length;i++){const n=this.stateManager.gitAPI.repositories[i];for(let s=0;s<n.state.remotes.length;s++){const c=n.state.remotes[s];if(c.name===(e==null?void 0:e.remoteName)&&((t=c.fetchUrl)==null?void 0:t.toLowerCase().search(`${e.owner.toLowerCase()}/${e.repositoryName.toLowerCase()}`))!==-1){this.repo=n;return}}}}get branchName(){return this._branchName}get repoDefaults(){return this._repoDefaults}get issue(){return this.issueModel}async startWorking(){var e;try{if(this._repoDefaults=await this.manager.getPullRequestDefaults(),await this.createIssueBranch()){await this.setCommitMessageAndGitEvent(),this._onDidChangeCurrentIssueState.fire();const t=this.manager.getCurrentUser(this.issueModel).login;return g.workspace.getConfiguration("githubIssues").get("assignWhenWorking")&&!((e=this.issueModel.assignees)==null?void 0:e.find(i=>i.login===t))&&(this.manager.gitHubRepositories.find(i=>i.remote.owner===this.issueModel.remote.owner&&i.remote.repositoryName===this.issueModel.remote.repositoryName)&&await this.manager.assignIssue(this.issueModel,t),await this.stateManager.refresh()),!0}}catch(t){g.window.showErrorMessage("There is no remote. Can't start working on an issue.")}return!1}dispose(){var e;(e=this.repoChangeDisposable)==null||e.dispose()}async stopWorking(){this.repo&&(this.repo.inputBox.value=""),this._repoDefaults&&await this.manager.repository.checkout(this._repoDefaults.base),this._onDidChangeCurrentIssueState.fire(),this.dispose()}getBasicBranchName(e){return`${e}/issue${this.issueModel.number}`}async branchExists(e){try{return!!await this.manager.repository.getBranch(e)}catch(t){}return!1}async createOrCheckoutBranch(e){try{return await this.branchExists(e)?await this.manager.repository.checkout(e):await this.manager.repository.createBranch(e,!0),!0}catch(t){return t.message!=="User aborted"&&g.window.showErrorMessage(`Unable to checkout branch ${e}. There may be file conflicts that prevent this branch change. Git error: ${t.error}`),!1}}async getUser(){return this.user||(this.user=await this.issueModel.githubRepository.getAuthenticatedUser()),this.user}async getBranchTitle(){var e;return(e=g.workspace.getConfiguration(Er).get(Xg))!=null?e:this.getBasicBranchName(await this.getUser())}validateBranchName(e){const t=/[^ \\@\~\^\?\*\[]+/,i=e.match(t);if(i&&i.length>0&&i[0]!==e)return"Branch name cannot contain a space or the following characters: \\@~^?*["}showBranchNameError(e){const t="Edit Setting";g.window.showErrorMessage(e,t).then(i=>{i===t&&g.commands.executeCommand("workbench.action.openSettings",`${Er}.${Xg}`)})}async createIssueBranch(){const e=this.shouldPromptForBranch?"prompt":g.workspace.getConfiguration(Er).get(ev);if(e==="off")return!0;const t=this.stateManager.getSavedIssueState(this.issueModel.number);this._branchName=this.shouldPromptForBranch?void 0:t.branch;const i=await Tl(await this.getBranchTitle(),this.issue,void 0,await this.getUser());if(e==="on"&&this._branchName!==i&&(await this.branchExists(this._branchName)||(this._branchName=i)),this._branchName||(this._branchName=await g.window.showInputBox({value:i,prompt:"Enter the label for the new branch."})),!this._branchName)return!1;const n=this.validateBranchName(this._branchName);return n?(this.showBranchNameError(n),!1):(t.branch=this._branchName,await this.stateManager.setSavedIssueState(this.issueModel,t),await this.createOrCheckoutBranch(this._branchName)?!0:(this._branchName=void 0,!1))}async getCommitMessage(){const e=g.workspace.getConfiguration(Er).get(KS);if(typeof e=="string")return Tl(e,this.issueModel,this._repoDefaults)}async setCommitMessageAndGitEvent(){const e=await this.getCommitMessage();this.repo&&e&&(this.repo.inputBox.value=e)}}var k2=Object.defineProperty,to=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?k2(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);const Hi="newIssue",E2="NewIssue.md",ca="Assignees:",ro="Labels:";function Dl(r){const e=JSON.parse(r.query);if(e.origin)return g.Uri.parse(e.origin)}class R2{constructor(){to(this,"content"),to(this,"createTime",0),to(this,"modifiedTime",0),to(this,"_onDidChangeFile",new g.EventEmitter),to(this,"onDidChangeFile",this._onDidChangeFile.event)}watch(e,t){const i=this.onDidChangeFile(n=>{n.length===0&&n[0].type===g.FileChangeType.Deleted&&i.dispose()});return i}stat(e){var t,i;return{type:g.FileType.File,ctime:this.createTime,mtime:this.modifiedTime,size:(i=(t=this.content)==null?void 0:t.length)!=null?i:0}}readDirectory(e){return[]}createDirectory(e){}readFile(e){var t;return(t=this.content)!=null?t:new Uint8Array(0)}writeFile(e,t,i={create:!1,overwrite:!1}){const n=this.content;this.content=t,n===void 0?(this.createTime=new Date().getTime(),this._onDidChangeFile.fire([{uri:e,type:g.FileChangeType.Created}])):(this.modifiedTime=new Date().getTime(),this._onDidChangeFile.fire([{uri:e,type:g.FileChangeType.Changed}]))}delete(e,t){this.content=void 0,this.createTime=0,this.modifiedTime=0,this._onDidChangeFile.fire([{uri:e,type:g.FileChangeType.Deleted}])}rename(e,t,i){}}class x2{constructor(e){this.manager=e}async provideCompletionItems(e,t,i,n){if(!e.lineAt(t.line).text.startsWith(ro))return[];const s=Dl(e.uri);if(!s)return[];const c=this.manager.getManagerForFile(s);if(!c)return[];const v=await c.getPullRequestDefaults();return(await c.getLabels(void 0,v)).map(N=>{const U=new g.CompletionItem(N.name,g.CompletionItemKind.Color);return U.documentation=`#${N.color}`,U.commitCharacters=[" ",","],U})}}class Hv extends g.CompletionItem{constructor(e){super(`${e.number}: ${e.title}`,g.CompletionItemKind.Issue);this.issue=e}}class T2{constructor(e,t,i){this.stateManager=e,this.repositoriesManager=t,this.context=i}async provideCompletionItems(e,t,i,n){var s,c,v,S,N;if(e.languageId!=="scminput"&&e.uri.scheme!=="comment"&&t.character>0&&n.triggerKind===g.CompletionTriggerKind.Invoke&&!e.getText(e.getWordRangeAtPosition(t)).match(/#[0-9]*$/))return[];if(t.character<=6&&e.languageId==="markdown"&&e.getText(new g.Range(t.with(void 0,0),t))===new Array(t.character+1).join("#")&&e.uri.scheme!=="comment"&&n.triggerKind===g.CompletionTriggerKind.TriggerCharacter)return[];if(n.triggerKind===g.CompletionTriggerKind.TriggerCharacter&&g.workspace.getConfiguration(Er).get("ignoreCompletionTrigger",[]).find(ke=>ke===e.languageId))return[];if(e.languageId!=="scminput"&&!await Sd(e,t))return[];let U=new g.Range(t,t);t.character-1>=0&&e.getText(new g.Range(t.translate(0,-1),t))==="#"&&(U=new g.Range(t.translate(0,-1),t)),await this.stateManager.tryInitializeAndWait();const X=new Map,ne=new Date;let ce,be;if(e.languageId==="scminput")be=kd(e.uri);else if(e.uri.scheme==="comment"&&((s=g.workspace.workspaceFolders)==null?void 0:s.length))for(const ke of g.window.visibleTextEditors){const Ce=g.workspace.workspaceFolders[0].uri.with({path:ke.document.uri.path}),Pe=g.workspace.getWorkspaceFolder(Ce);if(Pe){be=Pe.uri;break}}else be=e.uri.scheme===Hi?(c=Dl(e.uri))!=null?c:e.uri:e.languageId==="scminput"?kd(e.uri):e.uri;if(!be)return[];let ye;try{ye=this.repositoriesManager.getManagerForFile(be),ce=await(ye==null?void 0:ye.getPullRequestDefaults())}catch(ke){}const ge=this.stateManager.getIssueCollection((v=ye==null?void 0:ye.repository.rootUri)!=null?v:be);let ve=0;for(const ke of ge){const Ce=(S=await ke[1])!=null?S:[];if(Ce[0]instanceof Pr)ve+=Ce.length;else for(const Pe of Ce)ve+=Pe.issues.length}for(const ke of ge){const Ce=(N=await ke[1])!=null?N:[];if(Ce.length!==0)if(Ce[0]instanceof Pr){let Pe=0;for(const Oe of Ce)X.set(Xs(Oe),await this.completionItemFromIssue(ce,Oe,ne,U,e,Pe++,ve))}else for(let Pe=0;Pe<Ce.length;Pe++){const Oe=Ce[Pe];for(const Ze of Oe.issues)X.set(Xs(Ze),await this.completionItemFromIssue(ce,Ze,ne,U,e,Pe,ve,Oe.milestone))}}return[...X.values()]}async completionItemFromIssue(e,t,i,n,s,c,v,S){var N;const U=new Hv(t);if(s.languageId==="markdown")U.insertText=`[${Xs(t,e)}](${t.html_url})`;else{const X=g.workspace.getConfiguration(Er).get("issueCompletionFormatScm");s.uri.path.match(/scm\/git\/scm\d\/input/)&&typeof X=="string"?U.insertText=await Tl(X,t,e):U.insertText=`${Xs(t,e)}`}return U.documentation=t.body,U.range=n,U.detail=S?S.title:(N=t.milestone)==null?void 0:N.title,U.sortText=`${c}`.padStart(`${v}`.length,"0"),U.filterText=`${U.detail} # ${t.number} ${t.title} ${U.documentation}`,U}async resolveCompletionItem(e,t){return e instanceof Hv&&(e.documentation=await wd(e.issue,this.context,this.repositoriesManager),e.command={command:"issues.issueCompletion",title:"Issue Completion Chose,"}),e}}class C2{constructor(e,t,i,n){this.manager=e,this.stateManager=t,this.context=i,this.telemetry=n}async provideHover(e,t,i){var n;if(!await hv(e,t))return;let s=e.getWordRangeAtPosition(t,za);if(s&&s.start.character>0){s=new g.Range(new g.Position(s.start.line,s.start.character),s.end);const v=e.getText(s).match(za),S=bd(v),N=(n=this.manager.getManagerForFile(e.uri))!=null?n:this.manager.folderManagers[0];if(!N)return;if(S&&v&&S.issueNumber<=this.stateManager.maxIssueNumber(N.repository.rootUri))return this.createHover(N,v[0],S,s)}else return}async createHover(e,t,i,n){const s=await QS(this.stateManager,e,t,i);if(!!s)return this.telemetry.sendTelemetryEvent("issues.issueHover"),new g.Hover(await wd(s,this.context,this.manager,i.commentNumber),n)}}var M2=Object.defineProperty,Vv=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?M2(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);class fs extends g.TreeItem{constructor(e,t,i){super(t,i);this.uri=e}get labelAsString(){var e;return typeof this.label=="string"?this.label:(e=this.label)==null?void 0:e.label}}class N2{constructor(e,t,i){this.stateManager=e,this.manager=t,this.context=i,Vv(this,"_onDidChangeTreeData",new g.EventEmitter),Vv(this,"onDidChangeTreeData",this._onDidChangeTreeData.event),i.subscriptions.push(this.manager.onDidChangeState(()=>{this._onDidChangeTreeData.fire()})),i.subscriptions.push(this.stateManager.onDidChangeIssueData(()=>{this._onDidChangeTreeData.fire()})),i.subscriptions.push(this.stateManager.onDidChangeCurrentIssue(()=>{this._onDidChangeTreeData.fire()}))}getTreeItem(e){var t;let i;return e instanceof fs?i=e:e instanceof ea?i=new fs(e.repository.rootUri,qt.basename(e.repository.rootUri.fsPath),g.TreeItemCollapsibleState.Expanded):e instanceof Pr?(i=new fs(void 0,`${e.number}: ${e.title}`,g.TreeItemCollapsibleState.None),i.iconPath=e.isOpen?new g.ThemeIcon("issues",new g.ThemeColor("issues.open")):new g.ThemeIcon("issue-closed",new g.ThemeColor("issues.closed")),((t=this.stateManager.currentIssue(e.uri))==null?void 0:t.issue.number)===e.number?(i.label=`\u2713 ${i.label}`,i.contextValue="currentissue"):this.stateManager.getSavedIssueState(e.number).branch?i.contextValue="continueissue":i.contextValue="issue",$S(e)&&(i.contextValue="link"+i.contextValue)):i=new fs(e.uri,e.milestone.title,e.issues.length>0?g.TreeItemCollapsibleState.Expanded:g.TreeItemCollapsibleState.None),i}getChildren(e){return e===void 0&&this.manager.state!==ki.RepositoriesLoaded?this.getStateChildren():this.getIssuesChildren(e)}async resolveTreeItem(e,t){return t instanceof Pr&&(e.tooltip=await wd(t,this.context,this.manager)),e}getStateChildren(){return this.manager.state===ki.NeedsAuthentication||!this.manager.folderManagers.length?[]:[new fs(void 0,"Loading...")]}getQueryItems(e){const t=this.stateManager.getIssueCollection(e.repository.rootUri);if(t.size===1)return Array.from(t.values())[0];const i=Array.from(t.keys()),n=i[0];return i.map(s=>{const c=new fs(e.repository.rootUri,s);return c.contextValue="query",c.collapsibleState=s===n?g.TreeItemCollapsibleState.Expanded:g.TreeItemCollapsibleState.Collapsed,c})}getIssuesChildren(e){var t;return e===void 0?this.manager.folderManagers.length===1?this.getQueryItems(this.manager.folderManagers[0]):this.manager.folderManagers.length>1?this.manager.folderManagers:[]:e instanceof ea?this.getQueryItems(e):e instanceof fs?e.uri?(t=this.stateManager.getIssueCollection(e.uri).get(e.labelAsString))!=null?t:[]:[]:e instanceof Pr?[]:e.issues.map(i=>{const n=Object.assign(i);return n.uri=e.uri,n})}}var P2=Object.defineProperty,A2=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?P2(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);class I2{constructor(e){A2(this,"expression"),e.subscriptions.push(g.workspace.onDidChangeConfiguration(()=>{this.updateTriggers()})),this.updateTriggers()}updateTriggers(){const e=g.workspace.getConfiguration(Er).get("createIssueTriggers",[]);this.expression=e.length>0?new RegExp(e.join("|")):void 0}async provideCodeActions(e,t,i,n){if(this.expression===void 0||i.only&&i.only!==g.CodeActionKind.QuickFix)return[];const s=[];let c=t.start.line;do{const v=e.lineAt(c).text,S=v.substring(0,zS);if(!S.match(za)){const U=S.search(this.expression);if(U>=0){const X=new g.CodeAction("Create GitHub Issue",g.CodeActionKind.QuickFix),ne=S.substring(U).search(/\s/),ce=U+(ne>0?ne:S.match(this.expression)[0].length);X.command={title:"Create GitHub Issue",command:"issue.createIssueFromSelection",arguments:[{document:e,lineNumber:c,line:v,insertIndex:ce,range:t}]},s.push(X);break}}c++}while(t.end.line>=c);return s}}var D2=Object.defineProperty,gi=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?D2(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);const F2=["Recovery"],O2="currentIssue",Bd="issues",$v="ignoreMilestones",qd=[{label:"My Issues",query:"default"}];class AR extends null{constructor(){super(...arguments);gi(this,"uri")}}class L2{constructor(e,t,i){this.gitAPI=e,this.manager=t,this.context=i,gi(this,"resolvedIssues",new Map),gi(this,"_singleRepoStates",new Map),gi(this,"_onRefreshCacheNeeded",new g.EventEmitter),gi(this,"onRefreshCacheNeeded",this._onRefreshCacheNeeded.event),gi(this,"_onDidChangeIssueData",new g.EventEmitter),gi(this,"onDidChangeIssueData",this._onDidChangeIssueData.event),gi(this,"_queries",[]),gi(this,"_onDidChangeCurrentIssue",new g.EventEmitter),gi(this,"onDidChangeCurrentIssue",this._onDidChangeCurrentIssue.event),gi(this,"initializePromise"),gi(this,"statusBarItem"),gi(this,"isSettingIssue",!1),t.folderManagers.forEach(n=>{this.context.subscriptions.push(n.onDidChangeRepositories(()=>this.refresh()))})}getIssueCollection(e){var t;let i=(t=this._singleRepoStates.get(e.path))==null?void 0:t.issueCollection;return i||(i=new Map,i)}getOrCreateSingleRepoState(e,t){let i=this._singleRepoStates.get(e.path);return i||(t||(t=this.manager.getManagerForFile(e)),i={issueCollection:new Map,maxIssueNumber:0,folderManager:t},this._singleRepoStates.set(e.path,i),i)}async tryInitializeAndWait(){return this.initializePromise||(this.initializePromise=new Promise(e=>{if(this.manager.credentialStore.isAnyAuthenticated())if(this.manager.state===ki.RepositoriesLoaded)this.doInitialize().then(()=>e());else{const t=this.manager.onDidChangeState(()=>{this.manager.state===ki.RepositoriesLoaded&&this.doInitialize().then(()=>{t.dispose(),e()})});this.context.subscriptions.push(t)}else{const t=this.manager.credentialStore.onDidGetSession(()=>{t.dispose(),this.doInitialize()});e()}})),this.initializePromise}registerRepositoryChangeEvent(){async function e(i,n){var s;const c=i.getOrCreateSingleRepoState(n.rootUri),v=c.lastHead,S=c.lastBranch,N=n.state.HEAD?n.state.HEAD.commit:void 0;(n.state.HEAD?n.state.HEAD.commit:void 0)!==v&&await i.setIssueData(c.folderManager);const U=(s=n.state.HEAD)==null?void 0:s.name;(v!==N||S!==U)&&(!c.currentIssue||U!==c.currentIssue.branchName)&&(U?c.folderManager&&await i.setCurrentIssueFromBranch(c,U):await i.setCurrentIssue(c,void 0)),c.lastHead=n.state.HEAD?n.state.HEAD.commit:void 0,c.lastBranch=n.state.HEAD?n.state.HEAD.name:void 0}function t(i,n){i.context.subscriptions.push(n.state.onDidChange(async()=>{e(i,n)}))}this.context.subscriptions.push(this.gitAPI.onDidOpenRepository(i=>{e(this,i),t(this,i)})),this.gitAPI.repositories.forEach(i=>{t(this,i)})}refreshCacheNeeded(){this._onRefreshCacheNeeded.fire()}async refresh(){return this.setAllIssueData()}async doInitialize(){var e;this.cleanIssueState(),this._queries=g.workspace.getConfiguration(Er).get(Zs,qd),this._queries.length===0&&(this._queries=qd),this.context.subscriptions.push(g.workspace.onDidChangeConfiguration(t=>{t.affectsConfiguration(`${Er}.${Zs}`)?(this._queries=g.workspace.getConfiguration(Er).get(Zs,qd),this._onRefreshCacheNeeded.fire()):t.affectsConfiguration(`${Er}.${$v}`)&&this._onRefreshCacheNeeded.fire()})),this.registerRepositoryChangeEvent(),await this.setAllIssueData(),this.context.subscriptions.push(this.onRefreshCacheNeeded(async()=>{await this.refresh()}));for(const t of this.manager.folderManagers){const i=this.getOrCreateSingleRepoState(t.repository.rootUri,t);i.lastHead=t.repository.state.HEAD?t.repository.state.HEAD.commit:void 0,this._singleRepoStates.set(t.repository.rootUri.path,i);const n=(e=t.repository.state.HEAD)==null?void 0:e.name;!i.currentIssue&&n&&await this.setCurrentIssueFromBranch(i,n)}}cleanIssueState(){const e=this.context.workspaceState.get(Bd),t=e?JSON.parse(e):{issues:[],branches:[]},i=new Date().valueOf()-30*864e5;for(const n in t.issues)t.issues[n].stateModifiedTime<i&&(t.branches&&t.branches[n]&&delete t.branches[n],delete t.issues[n])}async getUsers(e){var t;await this.initializePromise;const i=await((t=this.manager.getManagerForFile(e))==null?void 0:t.getAssignableUsers()),n=new Map;for(const s in i)i[s].forEach(c=>{n.set(c.login,c)});return n}async getUserMap(e){if(!this.initializePromise)return Promise.resolve(new Map);const t=this.getOrCreateSingleRepoState(e);return(!t.userMap||(await t.userMap).size===0)&&(t.userMap=this.getUsers(e)),t.userMap}async getCurrentUser(e){var t;return(t=this.manager.credentialStore.getCurrentUser(e))==null?void 0:t.login}async setAllIssueData(){return Promise.all(this.manager.folderManagers.map(e=>this.setIssueData(e)))}async setIssueData(e){var t,i;const n=this.getOrCreateSingleRepoState(e.repository.rootUri,e);n.issueCollection.clear();let s,c;for(const v of this._queries){let S;if(v.query===WS)S=this.setMilestones(e);else{if(!s)try{s=await e.getPullRequestDefaults()}catch(N){}if(!c){const N=Qs(e.repository).filter(U=>U.authProviderId===jt["github-enterprise"]);c=await this.getCurrentUser(N.length?jt["github-enterprise"]:jt.github)}S=this.setIssues(e,await Tl(v.query,void 0,s,c))}n.issueCollection.set(v.label,S)}n.maxIssueNumber=await e.getMaxIssue(),n.lastHead=(t=e.repository.state.HEAD)==null?void 0:t.commit,n.lastBranch=(i=e.repository.state.HEAD)==null?void 0:i.name}setIssues(e,t){return new Promise(async i=>{const n=await e.getIssues({fetchNextPage:!1},t);this._onDidChangeIssueData.fire(),i(n.items.map(s=>{const c=s;return c.uri=e.repository.rootUri,c}))})}async setCurrentIssueFromBranch(e,t){if(g.workspace.getConfiguration(Er).get(ev)==="off")return;let n;try{n=await e.folderManager.getPullRequestDefaults()}catch(c){return}if(t===n.base){await this.setCurrentIssue(e,void 0);return}if(e.currentIssue&&e.currentIssue.branchName===t)return;const s=this.getSavedState();for(const c in s.branches)if(c===t){const v=await e.folderManager.resolveIssue(s.branches[c].owner,s.branches[c].repositoryName,s.branches[c].number);v&&await this.setCurrentIssue(e,new qv(v,e.folderManager,this));return}}setMilestones(e){return new Promise(async t=>{const i=new Date,n=g.workspace.getConfiguration(Er).get($v,[]),s=await e.getMilestones({fetchNextPage:!1},n.indexOf(yv)<0);let c;const v=new Map,S=[];for(let N=0;N<s.items.length;N++){const U=s.items[N];U.uri=e.repository.rootUri;const X=s.items[N].milestone;if(U.issues&&U.issues.length<=0||n.indexOf(X.title)>=0)continue;S.push(U);let ne=X.dueOn?new Date(X.dueOn):void 0;ne||(ne=new Date(this.removeDateExcludeStrings(X.title)),isNaN(ne.getTime())&&(ne=new Date(X.createdAt))),ne<i&&(c===void 0||ne>c)&&(c=ne),v.set(X.id?X.id:X.title,ne)}S.sort((N,U)=>{const X=v.get(N.milestone.id?N.milestone.id:N.milestone.title),ne=v.get(U.milestone.id?U.milestone.id:U.milestone.title);return c&&X>=c&&ne>=c?X<=ne?-1:1:X>=ne?-1:1}),this._onDidChangeIssueData.fire(),t(S)})}removeDateExcludeStrings(e){return F2.forEach(t=>e=e.replace(t,"")),e}currentIssue(e){var t;return(t=this._singleRepoStates.get(e.path))==null?void 0:t.currentIssue}currentIssues(){return Array.from(this._singleRepoStates.values()).filter(e=>e==null?void 0:e.currentIssue).map(e=>e.currentIssue)}maxIssueNumber(e){var t,i;return(i=(t=this._singleRepoStates.get(e.path))==null?void 0:t.maxIssueNumber)!=null?i:0}async setCurrentIssue(e,t){if(!(this.isSettingIssue&&t===void 0)){if(this.isSettingIssue=!0,e instanceof ea){const i=this._singleRepoStates.get(e.repository.rootUri.path);if(!i)return;e=i}try{if(e.currentIssue&&(t==null?void 0:t.issue.number)===e.currentIssue.issue.number)return;e.currentIssue&&await e.currentIssue.stopWorking(),t&&this.context.subscriptions.push(t.onDidChangeCurrentIssueState(()=>this.updateStatusBar())),this.context.workspaceState.update(O2,t==null?void 0:t.issue.number),(!t||await t.startWorking())&&(e.currentIssue=t,this.updateStatusBar()),this._onDidChangeCurrentIssue.fire()}catch(i){}finally{this.isSettingIssue=!1}}}updateStatusBar(){const e=this.currentIssues(),t=e.length>0;if(!t){this.statusBarItem&&(this.statusBarItem.hide(),this.statusBarItem.dispose(),this.statusBarItem=void 0);return}t&&!this.statusBarItem&&(this.statusBarItem=g.window.createStatusBarItem("github.issues.status",g.StatusBarAlignment.Left,0),this.statusBarItem.name="GitHub Active Issue");const i=this.statusBarItem;i.text=`$(issues) Issue ${e.map(n=>Xs(n.issue,n.repoDefaults)).join(", ")}`,i.tooltip=e.map(n=>n.issue.title).join(", "),i.command="issue.statusBar",i.show()}getSavedState(){const e=this.context.workspaceState.get(Bd);return e?JSON.parse(e):{issues:Object.create(null),branches:Object.create(null)}}getSavedIssueState(e){var t;return(t=this.getSavedState().issues[`${e}`])!=null?t:{}}async setSavedIssueState(e,t){const i=this.getSavedState();return i.issues[`${e.number}`]={...t,stateModifiedTime:new Date().valueOf()},t.branch&&(i.branches||(i.branches=Object.create(null)),i.branches[t.branch]={number:e.number,owner:e.remote.owner,repositoryName:e.remote.repositoryName}),this.context.workspaceState.update(Bd,JSON.stringify(i))}}class U2{constructor(e,t,i){this.stateManager=e,this.manager=t}async provideCompletionItems(e,t,i,n){var s,c,v;if(e.languageId!=="scminput"&&e.uri.scheme!==Hi&&t.character>0&&n.triggerKind===g.CompletionTriggerKind.Invoke&&e.getText(new g.Range(t.with(void 0,t.character-1),t))!=="@")return[];if(e.uri.scheme===Hi&&n.triggerKind===g.CompletionTriggerKind.Invoke&&e.getText(new g.Range(t.with(void 0,0),t.with(void 0,ca.length)))!==ca)return[];if(n.triggerKind===g.CompletionTriggerKind.TriggerCharacter&&g.workspace.getConfiguration(Er).get("ignoreUserCompletionTrigger",[]).find(ne=>ne===e.languageId))return[];if(!this.isCodeownersFiles(e.uri)&&e.languageId!=="scminput"&&!await Sd(e,t))return[];let S=new g.Range(t,t);t.character-1>=0&&e.getText(new g.Range(t.translate(0,-1),t))==="@"&&(S=new g.Range(t.translate(0,-1),t));const N=e.uri.scheme===Hi?(s=Dl(e.uri))!=null?s:e.uri:e.languageId==="scminput"?kd(e.uri):e.uri;if(!N)return[];const U=(v=(c=this.manager.getManagerForFile(N))==null?void 0:c.repository.rootUri)!=null?v:N,X=[];return(await this.stateManager.getUserMap(U)).forEach(ne=>{const ce=new JS({label:ne.login,description:ne.name},g.CompletionItemKind.User);ce.insertText=`@${ne.login}`,ce.login=ne.login,ce.uri=U,ce.range=S,ce.detail=ne.name,ce.filterText=`@ ${ne.login} ${ne.name}`,e.uri.scheme===Hi&&(ce.commitCharacters=[" ",","]),X.push(ce)}),X}isCodeownersFiles(e){const t=this.manager.getManagerForFile(e);if(!t||!e.path.startsWith(t.repository.rootUri.path))return!1;const i=e.path.substring(t.repository.rootUri.path.length).toLowerCase();return!!["/codeowners","/docs/codeowners","/.github/codeowners"].find(s=>s===i)}async resolveCompletionItem(e,t){const i=this.manager.getManagerForFile(e.uri);if(!i)return e;const n=await i.getPullRequestDefaults(),s=await i.resolveUser(n.owner,n.repo,e.login);return s&&(e.documentation=yd(n,s),e.command={command:"issues.userCompletion",title:"User Completion Chosen"}),e}}const B2=["abstract","access","alias","async","augments","author","borrows","callback","class","classdesc","constant","constructs","copyright","default","deprecated","description","enum","event","example","exports","external","host","file","fires","function","generator","global","hideconstructor","ignore","implements","inheritdoc","inner","instance","interface","kind","lends","license","listens","member","memberof","mixes","mixin","module","name","namespace","override","package","param","private","property","protected","public","readonly","requires","returns","see","since","static","summary","this","throws","exception","todo","tutorial","type","typedef","variation","version","yields","yield","link"];class q2{constructor(e,t){this.manager=e,this.telemetry=t}async provideHover(e,t,i){if(!await hv(e,t))return;let n=e.getWordRangeAtPosition(t,vd);if(n&&n.start.character>0){n=new g.Range(new g.Position(n.start.line,n.start.character),n.end);const c=e.getText(n).match(vd);if(c){const v=c[1];return(e.languageId==="javascript"||e.languageId==="typescript")&&B2.indexOf(v)>=0?void 0:this.createHover(e.uri,v,n)}}else return}async createHover(e,t,i){try{const n=this.manager.getManagerForFile(e);if(!n)return;const s=await n.getPullRequestDefaults(),c=await n.resolveUser(s.owner,s.repo,t);return c&&c.name?(this.telemetry.sendTelemetryEvent("issues.userHover"),new g.Hover(yd(s,c),i)):void 0}catch(n){return}}}var H2=Object.defineProperty,Hd=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?H2(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);const V2="issueCompletions.enabled",$2="userCompletions.enabled",Gv="issues.creatingFromFile";class G2{constructor(e,t,i,n,s){this.gitAPI=e,this.manager=t,this.reviewManagers=i,this.context=n,this.telemetry=s,Hd(this,"_stateManager"),Hd(this,"createIssueInfo"),Hd(this,"documentFilters",[{language:"php"},{language:"powershell"},{language:"jade"},{language:"python"},{language:"r"},{language:"razor"},{language:"ruby"},{language:"rust"},{language:"scss"},{language:"search-result"},{language:"shaderlab"},{language:"shellscript"},{language:"sql"},{language:"swift"},{language:"typescript"},{language:"vb"},{language:"xml"},{language:"yaml"},{language:"markdown"},{language:"bat"},{language:"clojure"},{language:"coffeescript"},{language:"jsonc"},{language:"c"},{language:"cpp"},{language:"csharp"},{language:"css"},{language:"dockerfile"},{language:"fsharp"},{language:"git-commit"},{language:"go"},{language:"groovy"},{language:"handlebars"},{language:"hlsl"},{language:"ini"},{language:"java"},{language:"javascriptreact"},{language:"javascript"},{language:"json"},{language:"less"},{language:"log"},{language:"lua"},{language:"makefile"},{language:"ignore"},{language:"properties"},{language:"objective-c"},{language:"perl"},{language:"perl6"},"*"]),this._stateManager=new L2(e,this.manager,this.context)}async initialize(){this.context.subscriptions.push(g.workspace.registerFileSystemProvider(Hi,new R2)),this.registerCompletionProviders(),this.context.subscriptions.push(g.languages.registerCompletionItemProvider({scheme:Hi},new x2(this.manager)," ",",")),this.context.subscriptions.push(g.window.createTreeView("issues:github",{showCollapseAll:!0,treeDataProvider:new N2(this._stateManager,this.manager,this.context)})),this.context.subscriptions.push(g.commands.registerCommand("issue.createIssueFromSelection",(e,t)=>(this.telemetry.sendTelemetryEvent("issue.createIssueFromSelection"),this.createTodoIssue(e,t)),this)),this.context.subscriptions.push(g.commands.registerCommand("issue.createIssueFromClipboard",()=>(this.telemetry.sendTelemetryEvent("issue.createIssueFromClipboard"),this.createTodoIssueClipboard()),this)),this.context.subscriptions.push(g.commands.registerCommand("issue.copyGithubPermalink",e=>(this.telemetry.sendTelemetryEvent("issue.copyGithubPermalink"),this.copyPermalink(e instanceof g.Uri?e:void 0)),this)),this.context.subscriptions.push(g.commands.registerCommand("issue.copyGithubHeadLink",e=>(this.telemetry.sendTelemetryEvent("issue.copyGithubHeadLink"),this.copyHeadLink(e)),this)),this.context.subscriptions.push(g.commands.registerCommand("issue.copyMarkdownGithubPermalink",()=>(this.telemetry.sendTelemetryEvent("issue.copyMarkdownGithubPermalink"),this.copyMarkdownPermalink()),this)),this.context.subscriptions.push(g.commands.registerCommand("issue.openGithubPermalink",()=>(this.telemetry.sendTelemetryEvent("issue.openGithubPermalink"),this.openPermalink()),this)),this.context.subscriptions.push(g.commands.registerCommand("issue.openIssue",e=>(this.telemetry.sendTelemetryEvent("issue.openIssue"),this.openIssue(e)))),this.context.subscriptions.push(g.commands.registerCommand("issue.startWorking",e=>(this.telemetry.sendTelemetryEvent("issue.startWorking"),this.startWorking(e)),this)),this.context.subscriptions.push(g.commands.registerCommand("issue.startWorkingBranchDescriptiveTitle",e=>(this.telemetry.sendTelemetryEvent("issue.startWorking"),this.startWorking(e)),this)),this.context.subscriptions.push(g.commands.registerCommand("issue.continueWorking",e=>(this.telemetry.sendTelemetryEvent("issue.continueWorking"),this.startWorking(e)),this)),this.context.subscriptions.push(g.commands.registerCommand("issue.startWorkingBranchPrompt",e=>(this.telemetry.sendTelemetryEvent("issue.startWorkingBranchPrompt"),this.startWorkingBranchPrompt(e)),this)),this.context.subscriptions.push(g.commands.registerCommand("issue.stopWorking",e=>(this.telemetry.sendTelemetryEvent("issue.stopWorking"),this.stopWorking(e)),this)),this.context.subscriptions.push(g.commands.registerCommand("issue.stopWorkingBranchDescriptiveTitle",e=>(this.telemetry.sendTelemetryEvent("issue.stopWorking"),this.stopWorking(e)),this)),this.context.subscriptions.push(g.commands.registerCommand("issue.statusBar",()=>(this.telemetry.sendTelemetryEvent("issue.statusBar"),this.statusBar()),this)),this.context.subscriptions.push(g.commands.registerCommand("issue.copyIssueNumber",e=>(this.telemetry.sendTelemetryEvent("issue.copyIssueNumber"),this.copyIssueNumber(e)))),this.context.subscriptions.push(g.commands.registerCommand("issue.copyIssueUrl",e=>(this.telemetry.sendTelemetryEvent("issue.copyIssueUrl"),this.copyIssueUrl(e)))),this.context.subscriptions.push(g.commands.registerCommand("issue.refresh",()=>(this.telemetry.sendTelemetryEvent("issue.refresh"),this.refreshView()),this)),this.context.subscriptions.push(g.commands.registerCommand("issue.suggestRefresh",()=>(this.telemetry.sendTelemetryEvent("issue.suggestRefresh"),this.suggestRefresh()),this)),this.context.subscriptions.push(g.commands.registerCommand("issue.getCurrent",()=>(this.telemetry.sendTelemetryEvent("issue.getCurrent"),this.getCurrent()),this)),this.context.subscriptions.push(g.commands.registerCommand("issue.editQuery",e=>(this.telemetry.sendTelemetryEvent("issue.editQuery"),this.editQuery(e)),this)),this.context.subscriptions.push(g.commands.registerCommand("issue.createIssue",()=>(this.telemetry.sendTelemetryEvent("issue.createIssue"),this.createIssue()),this)),this.context.subscriptions.push(g.commands.registerCommand("issue.createIssueFromFile",async()=>{this.telemetry.sendTelemetryEvent("issue.createIssueFromFile"),await g.commands.executeCommand("setContext",Gv,!0),await this.createIssueFromFile(),await g.commands.executeCommand("setContext",Gv,!1)},this)),this.context.subscriptions.push(g.commands.registerCommand("issue.issueCompletion",()=>{this.telemetry.sendTelemetryEvent("issue.issueCompletion")})),this.context.subscriptions.push(g.commands.registerCommand("issue.userCompletion",()=>{this.telemetry.sendTelemetryEvent("issue.userCompletion")})),this.context.subscriptions.push(g.commands.registerCommand("issue.signinAndRefreshList",async()=>this.manager.authenticate())),this.context.subscriptions.push(g.commands.registerCommand("issue.goToLinkedCode",async e=>GS(e,this.manager))),this._stateManager.tryInitializeAndWait().then(()=>{this.context.subscriptions.push(g.languages.registerHoverProvider("*",new C2(this.manager,this._stateManager,this.context,this.telemetry))),this.context.subscriptions.push(g.languages.registerHoverProvider("*",new q2(this.manager,this.telemetry))),this.context.subscriptions.push(g.languages.registerCodeActionsProvider("*",new I2(this.context),{providedCodeActionKinds:[g.CodeActionKind.QuickFix]}))})}dispose(){}registerCompletionProviders(){const e=[{provider:T2,trigger:"#",disposable:void 0,configuration:V2},{provider:U2,trigger:"@",disposable:void 0,configuration:$2}];for(const t of e)g.workspace.getConfiguration(Er).get(t.configuration,!0)&&this.context.subscriptions.push(t.disposable=g.languages.registerCompletionItemProvider(this.documentFilters,new t.provider(this._stateManager,this.manager,this.context),t.trigger));this.context.subscriptions.push(g.workspace.onDidChangeConfiguration(t=>{for(const i of e)if(t.affectsConfiguration(`${Er}.${i.configuration}`)){const n=g.workspace.getConfiguration(Er).get(i.configuration,!0);!n&&i.disposable?(i.disposable.dispose(),i.disposable=void 0):n&&!i.disposable&&this.context.subscriptions.push(i.disposable=g.languages.registerCompletionItemProvider(this.documentFilters,new i.provider(this._stateManager,this.manager,this.context),i.trigger));break}}))}async createIssue(){var e,t;let i=(e=g.window.activeTextEditor)==null?void 0:e.document.uri;if(i||(i=(t=await this.chooseRepo("Select the repo to create the issue in."))==null?void 0:t.repository.rootUri),i)return this.makeNewIssueFile(i)}async createIssueFromFile(){var e,t,i,n;let s;if(!g.window.activeTextEditor||g.window.activeTextEditor.document.uri.scheme!==Hi)return;s=g.window.activeTextEditor.document.getText();const c=s.indexOf(`\r
\r
`),v=s.indexOf(`
`);let S;if(c<0&&v<0)return;c<0?S=v:v<0?S=c:S=Math.min(c,v);const N=s.substring(0,S);let U;if(s=s.substring(S+2).trim(),s.startsWith(ca)){const be=s.split(/\r\n|\n/,1);be.length===1&&(U=be[0].substring(ca.length).split(",").map(ye=>(ye=ye.trim(),ye.startsWith("@")&&(ye=ye.substring(1)),ye)),s=s.substring(be[0].length).trim())}let X;if(s.startsWith(ro)){const be=s.split(/\r\n|\n/,1);be.length===1&&(X=be[0].substring(ro.length).split(",").map(ye=>ye.trim()).filter(ye=>ye),s=s.substring(be[0].length).trim())}const ne=s;if(!N||!ne)return;const ce=await this.doCreateIssue((e=this.createIssueInfo)==null?void 0:e.document,(t=this.createIssueInfo)==null?void 0:t.newIssue,N,ne,U,X,(i=this.createIssueInfo)==null?void 0:i.lineNumber,(n=this.createIssueInfo)==null?void 0:n.insertIndex,Dl(g.window.activeTextEditor.document.uri));this.createIssueInfo=void 0,ce&&await g.commands.executeCommand("workbench.action.closeActiveEditor")}async editQuery(e){const t=g.workspace.getConfiguration(Er),i=t.inspect(Zs);let n;if(i==null?void 0:i.workspaceValue)n="workbench.action.openWorkspaceSettingsFile";else{const c=t.get(Zs);(i==null?void 0:i.defaultValue)&&JSON.stringify(i==null?void 0:i.defaultValue)===JSON.stringify(c)&&t.update(Zs,i.defaultValue,g.ConfigurationTarget.Global),n="workbench.action.openSettingsJson"}await g.commands.executeCommand(n);const s=g.window.activeTextEditor;if(s){const v=s.document.getText().search(e.labelAsString);if(v>=0){const S=s.document.positionAt(v);s.revealRange(new g.Range(S,S)),s.selection=new g.Selection(S,S)}}}getCurrent(){const e=this._stateManager.currentIssues();if(e.length>0)return{owner:e[0].issue.remote.owner,repo:e[0].issue.remote.repositoryName,number:e[0].issue.number}}refreshView(){this._stateManager.refreshCacheNeeded()}async suggestRefresh(){return await g.commands.executeCommand("hideSuggestWidget"),await this._stateManager.refresh(),g.commands.executeCommand("editor.action.triggerSuggest")}openIssue(e){if(e instanceof Pr)return g.env.openExternal(g.Uri.parse(e.html_url))}async doStartWorking(e,t,i){let n=e,s=t.githubRepository,c=t.remote;if(!n){if(n=await this.chooseRepo("Choose which repository you want to work on this isssue in."),!n)return;s=await n.getOrigin(),c=s.remote}const v=await n.findUpstreamForItem({githubRepository:s,remote:c});v.needsFork&&await n.tryOfferToFork(s)===void 0||await this._stateManager.setCurrentIssue(n,new qv(t,n,this._stateManager,v.remote,i))}async startWorking(e){e instanceof Pr&&this.doStartWorking(this.manager.getManagerForIssueModel(e),e)}async startWorkingBranchPrompt(e){e instanceof Pr&&this.doStartWorking(this.manager.getManagerForIssueModel(e),e,!0)}async stopWorking(e){var t;let i=this.manager.getManagerForIssueModel(e);!i&&(i=await this.chooseRepo("Choose which repository you want to stop working on this issue in."),!i)||e instanceof Pr&&((t=this._stateManager.currentIssue(i.repository.rootUri))==null?void 0:t.issue.number)===e.number&&await this._stateManager.setCurrentIssue(i,void 0)}async statusBarActions(e){const t=`$(globe) Open #${e.issue.number} ${e.issue.title}`,i=`$(git-pull-request) Create pull request for #${e.issue.number} (pushes branch)`;let n;try{n=await e.manager.getPullRequestDefaults()}catch(S){}const s=`$(primitive-square) Stop working on #${e.issue.number}`,c=e.branchName&&n?[t,i,s]:[t,i,s];switch(await g.window.showQuickPick(c,{placeHolder:"Current issue options"})){case t:return this.openIssue(e.issue);case i:{const S=bn.getReviewManagerForFolderManager(this.reviewManagers,e.manager);if(S)return uk(e.manager,S,this._stateManager);break}case s:return this._stateManager.setCurrentIssue(e.manager,void 0)}}async statusBar(){const e=this._stateManager.currentIssues();if(e.length===1)return this.statusBarActions(e[0]);{const t=e.map(n=>({label:`#${n.issue.number} from ${n.issue.githubRepository.remote.owner}/${n.issue.githubRepository.remote.repositoryName}`,currentIssue:n})),i=await g.window.showQuickPick(t);if(i)return this.statusBarActions(i.currentIssue)}}stringToUint8Array(e){return new TextEncoder().encode(e)}copyIssueNumber(e){if(e instanceof Pr)return g.env.clipboard.writeText(e.number.toString())}copyIssueUrl(e){if(e instanceof Pr)return g.env.clipboard.writeText(e.html_url)}async createTodoIssueClipboard(){return this.createTodoIssue(void 0,await g.env.clipboard.readText())}async createTodoIssueBody(e,t){if(t||(e==null?void 0:e.document.isUntitled))return t;let i="";if(e){const n=ld(this.gitAPI,e.document.uri);(n==null?void 0:n.state.workingTreeChanges.find(c=>c.uri.toString()===e.document.uri.toString()))&&(i=`\`\`\`
${e.line}
\`\`\`
`)}return i+=(await _d(this.gitAPI,e)).permalink,i}async createTodoIssue(e,t){let i,n,s,c,v,S;if(!e&&g.window.activeTextEditor)i=g.window.activeTextEditor.document,S=i.getText(g.window.activeTextEditor.selection);else if(e)i=e.document,s=e.insertIndex,c=e.lineNumber,n=e.line.substring(s,e.line.length).trim(),S=i.getText(e.range.isEmpty?i.lineAt(e.range.start.line).range:e.range);else return;const N=S.match(vd);N&&N.length===2&&(await this._stateManager.getUserMap(i.uri)).has(N[1])&&(v=[N[1]]);let U;const X=await this.createTodoIssueBody(e,t),ne=g.window.createInputBox();ne.value=n!=null?n:"",ne.prompt="Set the issue title. Confirm to create the issue now or use the edit button to edit the issue title and description.",ne.title="Create Issue",ne.buttons=[{iconPath:new g.ThemeIcon("edit"),tooltip:"Edit Description"}],ne.onDidAccept(async()=>{U=ne.value,U&&(ne.busy=!0,await this.doCreateIssue(i,e,U,X,v,void 0,c,s),ne.busy=!1),ne.hide()}),ne.onDidTriggerButton(async()=>{U=ne.value,ne.busy=!0,this.createIssueInfo={document:i,newIssue:e,lineNumber:c,insertIndex:s},this.makeNewIssueFile(i.uri,U,X,v),ne.busy=!1,ne.hide()}),ne.show()}async makeNewIssueFile(e,t,i,n){const s=`?{"origin":"${e.toString()}"}`,c=g.Uri.parse(`${Hi}:/${E2}${s}`);if(g.window.visibleTextEditors.filter(ye=>ye.document.uri.scheme===Hi).length>0)return;await g.workspace.fs.delete(c);const v=`${ca} ${n&&n.length>0?n.map(ye=>"@"+ye).join(", ")+" ":""}`,S=`${ro} `,N=`${t!=null?t:"Issue Title"}
${v}
${S}
${i!=null?i:""}
<!-- Edit the body of your new issue then click the \u2713 "Create Issue" button in the top right of the editor. The first line will be the issue title. Assignees and Labels follow after a blank line. Leave an empty line before beginning the body of the issue. -->`;await g.workspace.fs.writeFile(c,this.stringToUint8Array(N));const U=g.window.createTextEditorDecorationType({after:{contentText:" Comma-separated usernames, either @username or just username.",fontStyle:"italic",color:new g.ThemeColor("issues.newIssueDecoration")}}),X=g.window.createTextEditorDecorationType({after:{contentText:" Comma-separated labels.",fontStyle:"italic",color:new g.ThemeColor("issues.newIssueDecoration")}}),ne=g.window.onDidChangeActiveTextEditor(ye=>{if((ye==null?void 0:ye.document.uri.scheme)===Hi){const ge=ye.document.lineAt(2);ge.text.startsWith(ca)&&ye.setDecorations(U,[new g.Range(new g.Position(2,0),new g.Position(2,ge.text.length))]);const ve=ye.document.lineAt(3);ve.text.startsWith(ro)&&ye.setDecorations(X,[new g.Range(new g.Position(3,0),new g.Position(3,ve.text.length))])}}),ce=await g.window.showTextDocument(c),be=g.workspace.onDidCloseTextDocument(ye=>{ye===ce.document&&(ne.dispose(),be.dispose())})}async verifyLabels(e,t){var i;if(!t.labels)return!0;const n=(await e.getLabels(void 0,t)).map(v=>v.name),s=[],c=[];if((i=t.labels)==null||i.forEach(v=>{let S=typeof v=="string"?v:v.name;!S||(n.includes(S)?c.push(S):s.push(S))}),s.length>0){const v="Yes",S="No";switch(await g.window.showInformationMessage(`The following labels don't exist in this repository: ${s.join(", ")}.
Do you want to create these labels?`,{modal:!0},v,S)){case v:return!0;case S:return t.labels=c,!0;default:return!1}}return!0}async chooseRepo(e){const t=[];for(const n of this.manager.folderManagers)try{const s=await n.getPullRequestDefaults();t.push({label:`${s.owner}/${s.repo}`,repo:n})}catch(s){}if(t.length===0)return;if(t.length===1)return t[0].repo;const i=await g.window.showQuickPick(t,{placeHolder:e});return i==null?void 0:i.repo}async doCreateIssue(e,t,i,n,s,c,v,S,N){let U,X;if(e?X=this.manager.getManagerForFile(e.uri):N&&(X=this.manager.getManagerForFile(N)),X||(X=await this.chooseRepo("Choose where to create the issue.")),!X)return!1;try{U=await X.getPullRequestDefaults()}catch(ye){return g.window.showErrorMessage("There is no remote. Can't create an issue."),!1}const ne=n||(t==null?void 0:t.document.isUntitled)?n:(await _d(this.gitAPI,t)).permalink,ce={owner:U.owner,repo:U.repo,title:i,body:ne,assignees:s,labels:c};if(!await this.verifyLabels(X,ce))return!1;const be=await X.createIssue(ce);if(be){if(e!==void 0&&S!==void 0&&v!==void 0){const ye=new g.WorkspaceEdit,ge=g.workspace.getConfiguration(Er).get("createInsertFormat","number")==="number"?`#${be.number}`:be.html_url;ye.insert(e.uri,new g.Position(v,S),` ${ge}`),await g.workspace.applyEdit(ye)}else{const ye="Copy URL",ge="Open Issue";g.window.showInformationMessage("Issue created",ye,ge).then(async ve=>{switch(ve){case ye:await g.env.clipboard.writeText(be.html_url);break;case ge:await g.env.openExternal(g.Uri.parse(be.html_url));break}})}return this._stateManager.refreshCacheNeeded(),!0}return!1}async getPermalinkWithError(e){const t=await _d(this.gitAPI,void 0,e);return t.error&&g.window.showWarningMessage(`Unable to create a GitHub permalink for the selection. ${t.error}`),t}async getHeadLinkWithError(e){const t=await ok(this.manager,e);return t.error&&g.window.showWarningMessage(`Unable to create a GitHub link for the selection. ${t.error}`),t}async getContextualizedLink(e,t){let i;try{i=await g.env.asExternalUri(e)}catch(v){return t}const n=i.scheme==="https"&&/^(vscode|github)\./.test(i.authority)?i.authority:void 0;if(!n)return t;const s=g.Uri.parse(t),c=/^(github)\./.test(i.authority)?s.path:`/github${s.path}`;return s.with({authority:n,path:c}).toString()}async copyPermalink(e){const t=await this.getPermalinkWithError(e);if(t.permalink)return g.env.clipboard.writeText(t.originalFile?await this.getContextualizedLink(t.originalFile,t.permalink):t.permalink)}async copyHeadLink(e){const t=await this.getHeadLinkWithError(e);if(t.permalink)return g.env.clipboard.writeText(t.originalFile?await this.getContextualizedLink(t.originalFile,t.permalink):t.permalink)}getMarkdownLinkText(){if(!g.window.activeTextEditor)return;let e=g.window.activeTextEditor.selection;e.start.line!==e.end.line&&(e=new g.Range(e.start,new g.Position(e.start.line+1,0)));const t=g.window.activeTextEditor.document.getText(e);if(t)return t;if(e=g.window.activeTextEditor.document.getWordRangeAtPosition(e.start),e)return g.window.activeTextEditor.document.getText(e)}async copyMarkdownPermalink(){const e=await this.getPermalinkWithError(),t=this.getMarkdownLinkText();if(e.permalink&&t)return g.env.clipboard.writeText(`[${t.trim()}](${e.permalink})`)}async openPermalink(){const e=await this.getPermalinkWithError();if(e.permalink)return g.env.openExternal(g.Uri.parse(e.originalFile?await this.getContextualizedLink(e.originalFile,e.permalink):e.permalink))}}var j2=Object.defineProperty,da=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?j2(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);class z2{constructor(e,t){this._repositoriesManager=e,this._reviewManagers=t,da(this,"_disposables",[]),da(this,"_gitHubReposListeners",[]),da(this,"_pullRequestListeners",[]),da(this,"_fileViewedListeners",[]),da(this,"_onDidChangeFileDecorations",new g.EventEmitter),da(this,"onDidChangeFileDecorations",this._onDidChangeFileDecorations.event),this._disposables.push(g.window.registerFileDecorationProvider(this)),this._registerListeners()}_registerFileViewedListeners(e,t){return t.onDidChangeFileViewedState(i=>{i.changed.forEach(n=>{const s=g.Uri.joinPath(e.repository.rootUri,n.fileName),c=t.fileChanges.get(n.fileName);if(c){const v=Md(s,t.number,n.fileName,c.status);this._onDidChangeFileDecorations.fire(v),this._onDidChangeFileDecorations.fire(v.with({scheme:e.repository.rootUri.scheme})),this._onDidChangeFileDecorations.fire(v.with({scheme:"pr",authority:""}))}})})}_registerPullRequestAddedListeners(e){e.gitHubRepositories.forEach(t=>{this._pullRequestListeners.push(t.onDidAddPullRequest(i=>{this._fileViewedListeners.push(this._registerFileViewedListeners(e,i))})),this._fileViewedListeners.push(...Array.from(t.pullRequestModels.values()).map(i=>this._registerFileViewedListeners(e,i)))})}_registerRepositoriesChangedListeners(){this._gitHubReposListeners.forEach(e=>e.dispose()),this._gitHubReposListeners=[],this._pullRequestListeners.forEach(e=>e.dispose()),this._pullRequestListeners=[],this._fileViewedListeners.forEach(e=>e.dispose()),this._fileViewedListeners=[],this._repositoriesManager.folderManagers.forEach(e=>{this._gitHubReposListeners.push(e.onDidChangeRepositories(()=>{this._registerPullRequestAddedListeners(e)}))})}_registerListeners(){this._registerRepositoriesChangedListeners(),this._disposables.push(this._repositoriesManager.onDidChangeFolderRepositories(()=>{this._registerRepositoriesChangedListeners()}))}getViewedState(e,t,i){var n,s,c;const v=(s=(n=this._repositoriesManager.getManagerForFile(i))==null?void 0:n.gitHubRepositories)!=null?s:[];for(const S of v){const N=S.pullRequestModels.get(e);if(N)return(c=N.fileChangeViewedState[t])!=null?c:Hr.UNVIEWED}return Hr.UNVIEWED}provideFileDecoration(e,t){if(!e.query)return;const i=Tv(e);if(i&&i.status!==void 0){const s=this.getViewedState(i.prNumber,i.fileName,e);return{propagate:!1,badge:this.letter(i.status,s),color:this.color(i.status,s)}}const n=ti(e);if(n&&n.status!==void 0)return{propagate:!1,badge:this.letter(n.status),color:this.color(n.status)}}color(e,t){if(t===Hr.VIEWED)return;let i;switch(e){case yt.MODIFY:i="gitDecoration.modifiedResourceForeground";break;case yt.ADD:i="gitDecoration.addedResourceForeground";break;case yt.DELETE:i="gitDecoration.deletedResourceForeground";break;case yt.RENAME:i="gitDecoration.renamedResourceForeground";break;case yt.UNKNOWN:i=void 0;break;case yt.UNMERGED:i="gitDecoration.conflictingResourceForeground";break}return i?new g.ThemeColor(i):void 0}letter(e,t){if(t===Hr.VIEWED)return"\u2713";switch(e){case yt.MODIFY:return"M";case yt.ADD:return"A";case yt.DELETE:return"D";case yt.RENAME:return"R";case yt.UNKNOWN:return"U";case yt.UNMERGED:return"C"}return""}dispose(){this._disposables.forEach(e=>e.dispose()),this._gitHubReposListeners.forEach(e=>e.dispose()),this._pullRequestListeners.forEach(e=>e.dispose()),this._fileViewedListeners.forEach(e=>e.dispose())}}var W2=Object.defineProperty,Fl=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?W2(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);class K2 extends ei{constructor(e,t,i,n,s){super();this.parent=e,this.pullRequestManager=t,this.pullRequest=i,this.commit=n,this.isCurrent=s,Fl(this,"sha"),Fl(this,"collapsibleState"),Fl(this,"iconPath"),Fl(this,"contextValue"),this.label=n.commit.message,this.sha=n.sha,this.collapsibleState=g.TreeItemCollapsibleState.Collapsed;let c;try{n.author&&n.author.avatar_url&&(c=g.Uri.parse(`${n.author.avatar_url}&s=${64}`))}catch(v){}this.iconPath=c,this.contextValue="commit"}getTreeItem(){return this}async getChildren(){var e;const i=((e=await this.pullRequest.getCommitChangedFiles(this.commit))!=null?e:[]).map(n=>{const s=n.filename,c=g.Uri.parse(qt.posix.join(`commit~${this.commit.sha.substr(0,8)}`,s)),v=new ra(this,this.pullRequestManager,this.pullRequest,{status:fc(n.status),fileName:s,blobUrl:void 0},Ri(c,s,void 0,this.commit.sha,!0,{base:!1},this.pullRequestManager.repository.rootUri),Ri(c,s,void 0,this.commit.sha,!0,{base:!0},this.pullRequestManager.repository.rootUri),this.commit.sha,this.isCurrent);return v.useViewChangesCommand(),v});return Promise.resolve(i)}}var Q2=Object.defineProperty,Ol=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?Q2(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);class Y2 extends ei{constructor(e,t,i){super();Ol(this,"label","Commits"),Ol(this,"collapsibleState"),Ol(this,"_folderRepoManager"),Ol(this,"_pr"),this.parent=e,this._pr=i,this._folderRepoManager=t,this.collapsibleState=g.TreeItemCollapsibleState.Collapsed,this.childrenDisposables=[],this.childrenDisposables.push(this._pr.onDidChangeReviewThreads(()=>this.refresh(this))),this.childrenDisposables.push(this._pr.onDidChangeComments(()=>this.refresh(this)))}getTreeItem(){return this}async getChildren(){try{const e=await this._pr.getCommits(),t=e.map((i,n)=>new K2(this,this._folderRepoManager,this._pr,i,n===e.length-1));return Promise.resolve(t)}catch(e){return Promise.resolve([])}}}var J2=Object.defineProperty,Vd=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?J2(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);class Z2 extends ei{constructor(e,t,i){super();this.parent=e,this._reviewModel=t,Vd(this,"label","Files"),Vd(this,"collapsibleState"),Vd(this,"directories",[]),this.collapsibleState=g.TreeItemCollapsibleState.Expanded,this.childrenDisposables=[],this.childrenDisposables.push(this._reviewModel.onDidChangeLocalFileChanges(()=>this.refresh(this))),this.childrenDisposables.push(i.onDidChangeReviewThreads(()=>this.refresh(this))),this.childrenDisposables.push(i.onDidChangeComments(()=>this.refresh(this)))}getTreeItem(){return this}async getChildren(){if(this._reviewModel.localFileChanges.length===0)return new Promise(n=>{const s=this._reviewModel.onDidChangeLocalFileChanges(()=>{n([]),s.dispose()})});let e;const t=g.workspace.getConfiguration("githubPullRequests").get("fileListLayout"),i=new ls(this,"");return this._reviewModel.localFileChanges.forEach(n=>i.addFile(n)),i.finalize(),i.label===""?this.directories=i.children:this.directories=[i],t==="tree"?e=this.directories:e=this._reviewModel.localFileChanges,Promise.resolve(e)}}var X2=Object.defineProperty,Ll=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?X2(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);class eE extends os{constructor(e,t,i,n){super(e,t.title,t.userAvatarUri,t);this.parent=e,this._pullRequest=t,this._pullRequestManager=i,this._reviewModel=n,Ll(this,"_filesCategoryNode"),Ll(this,"_commitsCategoryNode"),Ll(this,"collapsibleState",g.TreeItemCollapsibleState.Expanded),Ll(this,"_disposables",[]),this.getTreeItem(),this._disposables.push(g.window.onDidChangeActiveTextEditor(s=>{if(g.workspace.getConfiguration("explorer").get("autoReveal")){const c=s==null?void 0:s.document.uri.toString();this.revealActiveEditorInTree(c)}})),this._disposables.push(this.parent.view.onDidChangeVisibility(s=>{var c;const v=(c=g.window.activeTextEditor)==null?void 0:c.document.uri.toString();this.revealActiveEditorInTree(v)})),this._disposables.push(t.onDidInvalidate(()=>{this.refresh()}))}revealActiveEditorInTree(e){if(this.parent.view.visible&&e){const t=this._reviewModel.localFileChanges.find(i=>i.filePath.toString()===e);t&&this.reveal(t,{select:!0})}}async getChildren(){return(!this._filesCategoryNode||!this._commitsCategoryNode)&&(this._filesCategoryNode=new Z2(this.parent,this._reviewModel,this._pullRequest),this._commitsCategoryNode=new Y2(this.parent,this._pullRequestManager,this._pullRequest)),[this._filesCategoryNode,this._commitsCategoryNode]}getTreeItem(){return this.label=this._pullRequest.title,this}dispose(){super.dispose(),this._disposables.forEach(e=>e.dispose()),this._disposables=[]}}var tE=Object.defineProperty,io=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?tE(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);class jv extends g.Disposable{constructor(e){super(()=>this.dispose());this._context=e,io(this,"_onDidChangeTreeData",new g.EventEmitter),io(this,"onDidChangeTreeData",this._onDidChangeTreeData.event),io(this,"_disposables",[]),io(this,"_pullRequestManagerMap",new Map),io(this,"_view"),this._view=g.window.createTreeView("prStatus:github",{treeDataProvider:this,showCollapseAll:!0}),this._context.subscriptions.push(this._view),this._disposables.push(g.workspace.onDidChangeConfiguration(async t=>{if(t.affectsConfiguration(`${Ir}.${Fs}`)){this._onDidChangeTreeData.fire();const i=g.workspace.getConfiguration(`${Ir}`).get(Fs);await g.commands.executeCommand("setContext","fileListLayout:flat",i==="flat")}else t.affectsConfiguration("git.openDiffOnClick")&&this._onDidChangeTreeData.fire()}))}get view(){return this._view}refresh(e){this._onDidChangeTreeData.fire(e)}updateViewTitle(){let e;if(this._pullRequestManagerMap.size===1){const t=this._pullRequestManagerMap.values().next();t.done||(e=t.value.pullRequestModel.number)}this._view.title=e?`Changes in Pull Request #${e}`:"Changes in Pull Request"}async addPrToView(e,t,i,n){if(this._pullRequestManagerMap.has(e)){const c=this._pullRequestManagerMap.get(e);if(c&&c.pullRequestModel===t)return;c==null||c.dispose()}const s=new eE(this,t,e,i);this._pullRequestManagerMap.set(e,s),this.updateViewTitle(),await g.commands.executeCommand("setContext","github:inReviewMode",!0),this._onDidChangeTreeData.fire(),n&&this.reveal(s)}async removePrFromView(e){const t=this._pullRequestManagerMap.has(e)?this._pullRequestManagerMap.get(e):void 0;t==null||t.dispose(),this._pullRequestManagerMap.delete(e),this.updateViewTitle(),this._pullRequestManagerMap.size===0&&this.hide(),this._onDidChangeTreeData.fire()}async hide(){await g.commands.executeCommand("setContext","github:inReviewMode",!1)}getTreeItem(e){return e.getTreeItem()}getParent(e){return e.getParent()}async reveal(e,t){try{await this._view.reveal(e,t)}catch(i){xe.appendLine(i,"PullRequestChangesTreeDataProvider")}}async getChildren(e){if(e)return await e.getChildren();{const t=[];if(this._pullRequestManagerMap.size>=1)for(const i of this._pullRequestManagerMap.values())t.push(i);return t}}getDescriptionNode(e){return this._pullRequestManagerMap.get(e)}async resolveTreeItem(e,t){return t instanceof ra&&await t.resolve(),t}dispose(){this._disposables.forEach(e=>e.dispose())}}var rE=Object.defineProperty,yn=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?rE(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);const $d="queries";var hs;(function(r){r[r.Empty=0]="Empty",r[r.More=1]="More",r[r.TryOtherRemotes=2]="TryOtherRemotes",r[r.Login=3]="Login",r[r.NoRemotes=4]="NoRemotes",r[r.NoMatchingRemotes=5]="NoMatchingRemotes",r[r.ConfigureRemotes=6]="ConfigureRemotes",r[r.Initializing=7]="Initializing"})(hs||(hs={}));class Un extends ei{constructor(e,t,i){super();switch(yn(this,"collapsibleState"),yn(this,"iconPath"),yn(this,"type"),yn(this,"command"),this.parent=e,this.type=t,this.collapsibleState=g.TreeItemCollapsibleState.None,t){case 0:this.label="0 pull requests in this category";break;case 1:this.label="Load more",this.command={title:"Load more",command:"pr.loadMore",arguments:[i]};break;case 2:this.label="Continue fetching from other remotes",this.command={title:"Load more",command:"pr.loadMore",arguments:[i]};break;case 3:this.label="Sign in",this.command={title:"Sign in",command:"pr.signinAndRefreshList",arguments:[]};break;case 4:this.label="No GitHub repositories found.";break;case 5:this.label="No remotes match the current setting.";break;case 6:this.label="Configure remotes...",this.command={title:"Configure remotes",command:"pr.configureRemotes",arguments:[]};break;case 7:this.label="Loading...";break;default:break}}getTreeItem(){return this}}class Gd extends ei{constructor(e,t,i,n,s,c){super();switch(this.parent=e,this._folderRepoManager=t,this._telemetry=i,this._type=n,this._categoryQuery=c,yn(this,"collapsibleState"),yn(this,"prs"),yn(this,"fetchNextPage",!1),yn(this,"repositoryPageInformation",new Map),yn(this,"contextValue"),this.prs=[],this.collapsibleState=this._type===Mr.All?g.TreeItemCollapsibleState.Expanded:g.TreeItemCollapsibleState.Collapsed,n){case Mr.All:this.label="All Open";break;case Mr.Query:this.label=s;break;case Mr.LocalPullRequest:this.label="Local Pull Request Branches";break;default:break}this._categoryQuery&&(this.contextValue="query")}async editQuery(){const e=g.workspace.getConfiguration(Xn),t=e.inspect($d);let i;if(t==null?void 0:t.workspaceValue)i="workbench.action.openWorkspaceSettingsFile";else{const s=e.get($d);(t==null?void 0:t.defaultValue)&&JSON.stringify(t==null?void 0:t.defaultValue)===JSON.stringify(s)&&e.update($d,t.defaultValue,g.ConfigurationTarget.Global),i="workbench.action.openSettingsJson"}await g.commands.executeCommand(i);const n=g.window.activeTextEditor;if(n){const c=n.document.getText().search(this.label);if(c>=0){const v=n.document.positionAt(c);n.revealRange(new g.Range(v,v)),n.selection=new g.Selection(v,v)}}}async getChildren(){this.childrenDisposables&&this.childrenDisposables.length&&(this.childrenDisposables.forEach(n=>n.dispose()),this.childrenDisposables=[]);let e=!1,t=!1,i=!1;if(this._type===Mr.LocalPullRequest)try{this.prs=await this._folderRepoManager.getLocalPullRequests(),this._telemetry.sendTelemetryEvent("pr.expand.local")}catch(n){g.window.showErrorMessage(`Fetching local pull requests failed: ${bt(n)}`),i=n instanceof cl}else if(this.fetchNextPage){try{const n=await this._folderRepoManager.getPullRequests(this._type,{fetchNextPage:!0},this._categoryQuery);this.prs=this.prs.concat(n.items),e=n.hasMorePages,t=n.hasUnsearchedRepositories}catch(n){g.window.showErrorMessage(`Fetching pull requests failed: ${bt(n)}`),i=n instanceof cl}this.fetchNextPage=!1}else try{const n=await this._folderRepoManager.getPullRequests(this._type,{fetchNextPage:!1},this._categoryQuery);switch(this.prs=n.items,e=n.hasMorePages,t=n.hasUnsearchedRepositories,this._type){case Mr.All:this._telemetry.sendTelemetryEvent("pr.expand.all");break;case Mr.Query:this._telemetry.sendTelemetryEvent("pr.expand.query");break}}catch(n){g.window.showErrorMessage(`Fetching pull requests failed: ${bt(n)}`),i=n instanceof cl}if(this.prs&&this.prs.length){const n=this.prs.map(s=>new la(this,this._folderRepoManager,s,this._type===Mr.LocalPullRequest));return e?n.push(new Un(this,1,this)):t&&n.push(new Un(this,2,this)),this.childrenDisposables=n,n}else{const n=i?3:0,s=[new Un(this,n)];return this.childrenDisposables=s,s}}getTreeItem(){return this}}var iE=Object.defineProperty,zv=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?iE(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);const Wv="queries";class no extends ei{constructor(e,t,i,n){super();this.folderManager=i,this.telemetry=n,zv(this,"collapsibleState"),zv(this,"iconPath"),this.parent=e,this.collapsibleState=g.TreeItemCollapsibleState.Expanded,this.label=qt.basename(t.fsPath)}static getQueries(e){return g.workspace.getConfiguration(Ir,e.repository.rootUri).get(Wv)||[]}getTreeItem(){return this}async getChildren(){return no.getCategoryTreeNodes(this.folderManager,this.telemetry,this)}static getCategoryTreeNodes(e,t,i){const n=no.getQueries(e).map(s=>new Gd(i,e,t,Mr.Query,s.label,s.query));return[new Gd(i,e,t,Mr.LocalPullRequest),...n,new Gd(i,e,t,Mr.All)]}}var nE=Object.defineProperty,Bn=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?nE(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);class Kv{constructor(e){this._telemetry=e,Bn(this,"_onDidChangeTreeData",new g.EventEmitter),Bn(this,"onDidChangeTreeData",this._onDidChangeTreeData.event),Bn(this,"_onDidChange",new g.EventEmitter),Bn(this,"_disposables"),Bn(this,"_childrenDisposables"),Bn(this,"_view"),Bn(this,"_reposManager"),Bn(this,"_initialized",!1),this._disposables=[],this._disposables.push(g.window.registerFileDecorationProvider(Sv)),this._disposables.push(g.commands.registerCommand("pr.refreshList",t=>{this._onDidChangeTreeData.fire()})),this._disposables.push(g.commands.registerCommand("pr.loadMore",t=>{t.fetchNextPage=!0,this._onDidChangeTreeData.fire(t)})),this._view=g.window.createTreeView("pr:github",{treeDataProvider:this,showCollapseAll:!0}),this._disposables.push(this._view),this._childrenDisposables=[],this._disposables.push(g.commands.registerCommand("pr.configurePRViewlet",async()=>{switch(await g.window.showQuickPick(["Configure Remotes...","Configure Queries..."])){case"Configure Queries...":return g.commands.executeCommand("workbench.action.openSettings",`@ext:${ss} queries`);case"Configure Remotes...":return g.commands.executeCommand("workbench.action.openSettings",`@ext:${ss} remotes`);default:return}})),this._disposables.push(g.workspace.onDidChangeConfiguration(t=>{t.affectsConfiguration(`${Ir}.${Fs}`)&&this._onDidChangeTreeData.fire()}))}get onDidChange(){return this._onDidChange.event}get view(){return this._view}async reveal(e,t){return this._view.reveal(e,t)}initialize(e){if(this._initialized)throw new Error("Tree has already been initialized!");this._initialized=!0,this._reposManager=e,this._disposables.push(this._reposManager.onDidChangeState(()=>{this._onDidChangeTreeData.fire()})),this._disposables.push(...this._reposManager.folderManagers.map(t=>t.onDidChangeRepositories(()=>{this._onDidChangeTreeData.fire()}))),this.initializeCategories(),this.refresh()}async initializeCategories(){this._disposables.push(g.workspace.onDidChangeConfiguration(async e=>{e.affectsConfiguration(`${Ir}.${Wv}`)&&this.refresh()}))}refresh(e){return e?this._onDidChangeTreeData.fire(e):this._onDidChangeTreeData.fire()}getTreeItem(e){return e.getTreeItem()}async resolveTreeItem(e,t){return t instanceof Ml&&await t.resolve(),t}needsRemotes(){var e;return((e=this._reposManager)==null?void 0:e.state)===ki.NeedsAuthentication?Promise.resolve([]):g.workspace.getConfiguration(Ir).get(Wa)?Promise.resolve([new Un(this,hs.NoMatchingRemotes),new Un(this,hs.ConfigureRemotes)]):Promise.resolve([new Un(this,hs.NoRemotes)])}async getChildren(e){var t;if(!((t=this._reposManager)==null?void 0:t.folderManagers.length))return[];if(this._reposManager.state===ki.Initializing)return Promise.resolve([new Un(this,hs.Initializing)]);if(this._reposManager.folderManagers.filter(i=>i.getGitHubRemotes().length>0).length===0)return this.needsRemotes();if(!e){this._childrenDisposables&&this._childrenDisposables.length&&this._childrenDisposables.forEach(n=>n.dispose());let i;return this._reposManager.folderManagers.length===1?i=no.getCategoryTreeNodes(this._reposManager.folderManagers[0],this._telemetry,this):i=this._reposManager.folderManagers.map(n=>new no(this,n.repository.rootUri,n,this._telemetry)),this._childrenDisposables=i,Promise.resolve(i)}return this._reposManager.folderManagers.filter(i=>i.repository.state.remotes.length>0).length===0?Promise.resolve([new Un(this,hs.Empty)]):e.getChildren()}async getParent(e){return e.getParent()}dispose(){this._disposables.forEach(e=>e.dispose())}}var sE=Object.defineProperty,aE=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?sE(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);class oE extends hc{constructor(e,t){super();this.gitAPI=e,this.credentialStore=t,aE(this,"_fallback")}async waitForRepos(e){xe.appendLine("Waiting for repositories.","GitContentFileSystemProvider");let t;const i=new Promise(c=>{t=this.gitAPI.onDidOpenRepository(()=>{xe.appendLine("Found at least one repository.","GitContentFileSystemProvider"),t==null||t.dispose(),t=void 0,c()})});let n;const s=new Promise(c=>{n=setTimeout(()=>{xe.appendLine("Timed out while waiting for repositories.","GitContentFileSystemProvider"),c()},e)});await Promise.race([i,s]),n&&clearTimeout(n),t&&t.dispose()}async waitForAuth(){if(!this.credentialStore.isAnyAuthenticated())return new Promise(e=>this.credentialStore.onDidGetSession(()=>e()))}async getRepositoryForFile(e){return await this.waitForAuth(),(this.gitAPI.state!=="initialized"||this.gitAPI.repositories.length===0)&&await this.waitForRepos(4e3),ld(this.gitAPI,e)}async readFile(e){if(!this._fallback)return new TextEncoder().encode("");const{path:t,commit:i,rootPath:n}=na(e.query);if(!t||!i)return new TextEncoder().encode("");const s=await this.getRepositoryForFile(g.Uri.file(n));if(!s)return g.window.showErrorMessage(`We couldn't find an open repository for ${i} locally.`),new TextEncoder().encode("");const c=qt.join(s.rootUri.fsPath,t).replace(/\\/g,"/");let v;try{if(xe.appendLine(`Getting repository (${s.rootUri}) content for commit ${i} and path ${c}`,"GitContentFileSystemProvider"),v=await s.show(i,c),!v)throw new Error}catch(S){if(v=await this._fallback(e),!v)try{await s.getCommit(i)}catch(N){g.window.showErrorMessage(`We couldn't find commit ${i} locally. You may want to sync the branch with remote. Sometimes commits can disappear after a force-push`)}}return new TextEncoder().encode(v||"")}registerTextDocumentContentFallback(e){this._fallback=e}}var lE=Object.defineProperty,Qv=(r,e,t)=>(typeof e!="symbol"&&(e+=""),e in r?lE(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t);class Yv{constructor(e,t,i,n,s,c,v,S){this._context=e,this._reposManager=t,this._reviewManagers=i,this._prsTreeDataProvider=n,this._prFileChangesProvider=s,this._telemetry=c,Qv(this,"_disposables"),this._disposables=[];const N=new oE(S,v);N.registerTextDocumentContentFallback(this.provideTextDocumentContent.bind(this)),this._disposables.push(g.workspace.registerFileSystemProvider("review",N,{isReadonly:!0})),this.registerListeners(),this._disposables.push(this._prsTreeDataProvider)}registerListeners(){this._disposables.push(g.workspace.onDidChangeConfiguration(async e=>{if(e.affectsConfiguration("githubPullRequests.showInSCM")){if(this._prFileChangesProvider){this._prFileChangesProvider.dispose(),this._prFileChangesProvider=new jv(this._context);for(const t of this._reviewManagers)t.updateState(!0)}this._prsTreeDataProvider.dispose(),this._prsTreeDataProvider=new Kv(this._telemetry),this._prsTreeDataProvider.initialize(this._reposManager),this._disposables.push(this._prsTreeDataProvider)}}))}async provideTextDocumentContent(e){for(const t of this._reviewManagers)if(e.fsPath.startsWith(t.repository.rootUri.fsPath))return t.provideTextDocumentContent(e);return""}addReviewManager(e){this._reviewManagers.push(e)}removeReviewManager(e){const t=this._reviewManagers.findIndex(i=>i.repository.rootUri.toString()===e.rootUri.toString());if(t){const i=this._reviewManagers[t];this._reviewManagers.splice(t),i.dispose()}}dispose(){this._disposables.forEach(e=>{e.dispose()})}}Qv(Yv,"ID","Reviews");const uE="AIF-d9b70cd4-b9f9-4d70-929b-a071c400b217";let Vr;const Jv="prompts",Zv="createPROnPublish";async function cE(r,e,t,i,n,s,c){r.subscriptions.push(xe),xe.appendLine("Git repository found, initializing review manager and pr tree view."),g.authentication.onDidChangeSessions(async ve=>{ve.provider.id==="github"&&(await U.clearCredentialCache(),ne&&ne.forEach(ke=>ke.updateState(!0)))}),r.subscriptions.push(e.onDidPublish(async ve=>{if(!ve.branch||g.workspace.getConfiguration(Xn).get(pc)!=="ask")return;const ke=ne.find(ct=>ct.repository.rootUri.toString()===ve.repository.rootUri.toString());if(ke==null?void 0:ke.isCreatingPullRequest)return;const Ce=N.find(ct=>ct.repository.rootUri.toString()===ve.repository.rootUri.toString());if(!Ce||Ce.gitHubRepositories.length===0||(await Ce.getPullRequestDefaults()).base===ve.branch)return;const Oe="Create Pull Request...",Ze="Don't Show Again",wt=await g.window.showInformationMessage(`Would you like to create a Pull Request for branch '${ve.branch}'?`,Oe,Ze);wt===Oe?ke==null||ke.createPullRequest(ve.branch):wt===Ze&&await g.workspace.getConfiguration(Xn).update(pc,"never",g.ConfigurationTarget.Global)})),r.subscriptions.push(g.window.registerUriHandler(Mk));const v=g.workspace.workspaceFolders;v&&(i=i.sort((ve,ke)=>{let Ce=v.length,Pe=v.length;for(let Oe=0;Oe<v.length&&(v[Oe].uri.toString()===ve.rootUri.toString()?Ce=Oe:v[Oe].uri.toString()===ke.rootUri.toString()&&(Pe=Oe),!(Ce!==v.length&&Pe!==v.length));Oe++);return Ce-Pe}));const S=new Zk(r),N=i.map(ve=>new ea(r,ve,Vr,e,t,S));r.subscriptions.push(...N);const U=new Ov(N,t,Vr,S);r.subscriptions.push(U),s.then(ve=>{ve&&ve.registerContactServiceProvider("github-pr",new y2(U))});const X=new jv(r);r.subscriptions.push(X);const ne=N.map(ve=>new bn(r,ve.repository,ve,Vr,X,c,S));r.subscriptions.push(new z2(U,ne));const ce=new Yv(r,U,ne,n,X,Vr,t,e);r.subscriptions.push(ce),e.onDidChangeState(()=>{xe.appendLine(`Git initialization state changed: state=${e.state}`),ne.forEach(ve=>ve.updateState(!0))}),e.onDidOpenRepository(ve=>{function ke(){if(U.getManagerForFile(ve.rootUri)){xe.appendLine(`Repo ${ve.rootUri} has already been setup.`);return}const Oe=new ea(r,ve,Vr,e,t,S);U.insertFolderManager(Oe);const Ze=new bn(r,Oe.repository,Oe,Vr,X,c,S);ce.addReviewManager(Ze),n.refresh()}ke();const Ce=ve.state.onDidChange(()=>{xe.appendLine(`Repo state for ${ve.rootUri} changed.`),ke(),Ce.dispose()})}),e.onDidCloseRepository(ve=>{U.removeRepo(ve),ce.removeReviewManager(ve),n.refresh()}),n.initialize(U),SS(r),Yk(r,S,U,ne,Vr,t,n);const be=g.workspace.getConfiguration(Ir).get(Fs);await g.commands.executeCommand("setContext","fileListLayout:flat",be==="flat");const ye=new G2(e,U,ne,r,Vr);r.subscriptions.push(ye),await ye.initialize(),r.subscriptions.push(new _2),await g.commands.executeCommand("setContext","github:initialized",!0);const ge=await i2(r,Vr);await ge.initializePromise,await ge.isCachedFlightEnabled("githubaa"),Vr.sendTelemetryEvent("startup")}async function dE(r){if(ss==="GitHub.vscode-pull-request-github-insiders"&&g.extensions.getExtension("github.vscode-pull-request-github")!==void 0)throw new Error("GitHub Pull Requests and Issues Nightly cannot be used while GitHub Pull Requests and Issues is also installed. Please ensure that only one version of the extension is installed.");const e=new Vk;g.commands.registerCommand("github.api.preloadPullRequest",async s=>{await g.commands.executeCommand("setContext",Ys,!0),await Va.focusView("github:activePullRequest:welcome"),e.shouldShow=s});const t=g.workspace.getConfiguration("git").get("openDiffOnClick",!0);await g.commands.executeCommand("setContext","openDiffOnClick",t),Ki.initialize(r),xe.debug("Creating API implementation.","Activation");const i=new Cp,n=g.extensions.getExtension(ss).packageJSON.version;return Vr=new e2(new $b(ss,n,uE)),r.subscriptions.push(Vr),await fE(r,i,e),i}async function Xv(r,e,t){const i=await v2(e,t);return i?(r.subscriptions.push(i),!0):!1}async function fE(r,e,t){xe.debug("Initializing state.","Activation"),S_(r),ag(Jv,Zv)===!1&&(await g.workspace.getConfiguration(Xn).update(pc,"never",g.ConfigurationTarget.Global),og(Jv,Zv,!0)),Nl.init(r),xe.debug("Creating credential store.","Activation");const i=new wS(Vr);if(r.subscriptions.push(i),await i.create({silent:!0}),xe.debug("Registering built in git provider.","Activation"),!await Xv(r,i,e)){const S=g.extensions.onDidChange(async()=>{await Xv(r,i,e)&&S.dispose()});r.subscriptions.push(S)}xe.debug("Registering live share git provider.","Activation");const n=g2(e);r.subscriptions.push(n);const s=n.initialize();r.subscriptions.push(e),xe.debug("Creating tree view.","Activation");const c=new Kv(Vr);r.subscriptions.push(c),r.subscriptions.push(g.workspace.registerFileSystemProvider("pr",Av(),{isReadonly:!0})),xe.appendLine("Looking for git repository");const v=e.repositories;xe.appendLine(`Found ${v.length} repositories during activation`),await cE(r,e,i,v,c,s,t)}async function hE(){Vr&&Vr.dispose()}})(),module.exports=Ul})();