Files
nix-flake/assets/dotfiles/vscode-extensions/ms-dotnettools.csdevkit-3.20.199-linux-x64/dist/extension.js
T
2026-08-14 21:33:40 +01:00

328 lines
1.4 MiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*! For license information please see extension.js.LICENSE.txt */
(()=>{var e,t={9393(e,t,r){"use strict";r.r(t),r.d(t,{BE_PROFILE:()=>s,NRT_PROFILE:()=>i,PostChannel:()=>xt,RT_PROFILE:()=>o});var n,o="REAL_TIME",i="NEAR_REAL_TIME",s="BEST_EFFORT",a=r(4688),c=r(8279),l=r(269),u=r(5664),d="timings",p="value",h="kind",f="length",g="processTelemetryStart",m=u.Wy.hasOwnProperty,v=((n={})[0]=0,n[2]=6,n[1]=1,n[3]=7,n[4098]=6,n[4097]=1,n[4099]=7,n);function y(e){return!(""===e||(0,l.hXl)(e))}function S(e,t,r){var n=-1;if(!(0,l.b07)(e))if(t>0&&(32===t?n=8192:t<=13&&(n=t<<5)),function(e){return e>=0&&e<=9}(r))-1===n&&(n=0),n|=r;else{var o=v[b(e)]||-1;-1!==n&&-1!==o?n|=o:6===o&&(n=o)}return n}function w(e,t,r,n,o){var i={},s=!1,a=0,c=arguments[f],u=arguments;for((0,l.Lmq)(u[0])&&(s=u[0],a++);a<c;a++)e=u[a],(0,l.zav)(e,function(e,t){s&&t&&(0,l.Gvm)(t)?(0,l.cyL)(t)?(i[e]=i[e]||[],(0,l.Iuo)(t,function(t,r){t&&(0,l.Gvm)(t)?i[e][r]=w(!0,i[e][r],t):i[e][r]=t})):i[e]=w(!0,i[e],t):i[e]=t});return i}(0,l.Wtk)(),(0,l.Vdv)();var E=l.UUD;function _(e,t){var r=e;r[d]=r[d]||{},r[d][g]=r[d][g]||{},r[d][g][t]=E()}function b(e){var t=0;if(null!=e){var r=typeof e;"string"===r?t=1:"number"===r?t=2:"boolean"===r?t=3:r===u._1&&(t=4,(0,l.cyL)(e)?(t=4096,e[f]>0&&(t|=b(e[0]))):m.call(e,"value")&&(t=8192|b(e[p])))}return t}function P(e){return e>0}var T=r(8156),C=r(6149),I=r(4276),O=r(9749),N=r(2317),R=r(6054),A=r(3662),D=r(3775),x=r(638),k=r(8205),j="",M="drop",L="requeue",F="no-cache, no-store",U="application/x-json-stream",$="cache-control",B="content-type",V="client-version",H="client-id",q="time-delta-to-apply-millis",z="upload-time",W="apikey",G="AuthMsaDeviceTicket",K="WebAuthToken",X="AuthXToken",J="msfpc",Q="trace",Y="user",Z="allowRequestSending",ee="firstRequestSent",te="shouldAddClockSkewHeaders",re="getClockSkewHeaderValue",ne="setClockSkew",oe="length",ie="concat",se="iKey",ae="count",ce="events",le="push",ue="split",de="splice",pe="toLowerCase",he="hdrs",fe="useHdrs",ge="initialize",me="setTimeoutOverride",ve="clearTimeoutOverride",ye="overrideEndpointUrl",Se="avoidOptions",we="enableCompoundKey",Ee="disableXhrSync",_e="disableFetchKeepAlive",be="useSendBeacon",Pe="alwaysUseXhrOverride",Te="serializeOfflineEvt",Ce="getOfflineRequestDetails",Ie="createPayload",Oe="createOneDSPayload",Ne="payloadBlob",Re="headers",Ae="_thePayload",De="urlString",xe="batches",ke="sendType",je="addHeader",Me="canSendRequest",Le="sendQueuedRequests",Fe="isCompletelyIdle",Ue="setUnloading",$e="sendSynchronousBatch",Be="_transport",Ve="getWParam",He="isBeacon",qe="timings",ze="isTeardown",We="isSync",Ge="data",Ke="_sendReason",Xe="setKillSwitchTenants",Je="_backOffTransmission",Qe="identifier",Ye="eventsLimitInMem",Ze="autoFlushEventsLimit",et="baseData",tt="sendAttempt",rt="latency",nt="sync";function ot(e){var t=(e.ext||{}).intweb;return t&&y(t[J])?t[J]:null}function it(e){for(var t=null,r=0;null===t&&r<e[oe];r++)t=ot(e[r]);return t}var st=function(){function e(t,r){var n=r?[][ie](r):[],o=this,i=it(n);o[se]=function(){return t},o.Msfpc=function(){return i||j},o[ae]=function(){return n[oe]},o[ce]=function(){return n},o.addEvent=function(e){return!!e&&(n[le](e),i||(i=ot(e)),!0)},o[ue]=function(r,o){var s;if(r<n[oe]){var a=n[oe]-r;(0,l.hXl)(o)||(a=o<a?o:a),s=n[de](r,a),i=it(n)}return new e(t,s)}}return e.create=function(t,r){return new e(t,r)},e}(),at=r(7292),ct=r(856),lt=function(){function e(){var t=!0,r=!0,n=!0,o="use-collector-delta",i=!1;(0,c.A)(e,this,function(e){e[Z]=function(){return t},e[ee]=function(){n&&(n=!1,i||(t=!1))},e[te]=function(){return r},e[re]=function(){return o},e[ne]=function(e){i||(e?(o=e,r=!0,i=!0):r=!1,t=!0)}})}return e.__ieDyn=1,e}(),ut=function(){function e(){var t={};(0,c.A)(e,this,function(e){e[Xe]=function(e,r){if(e&&r)try{var n=(s=e[ue](","),a=[],s&&(0,l.Iuo)(s,function(e){a[le]((0,l.EHq)(e))}),a);if("this-request-only"===r)return n;for(var o=1e3*parseInt(r,10),i=0;i<n[oe];++i)t[n[i]]=(0,l.f0d)()+o}catch(e){return[]}var s,a;return[]},e.isTenantKilled=function(e){var r=t,n=(0,l.EHq)(e);return void 0!==r[n]&&r[n]>(0,l.f0d)()||(delete r[n],!1)}})}return e.__ieDyn=1,e}();function dt(e){var t,r=Math.floor(1200*Math.random())+2400;return t=Math.pow(2,e)*r,Math.min(t,6e5)}var pt,ht=2e6,ft=Math.min(ht,65e3),gt="metadata",mt="f",vt=/\./,yt=function(){function e(t,r,n,o,i,s){var a="data",u="baseData",d=!!o,g=!0,v=r,w={},E=!!s,_=i||S;(0,c.A)(e,this,function(e){function r(e,t,o,i,s,a,c){(0,l.zav)(e,function(e,u){var g=null;if(u||y(u)){var S=o,E=e,_=s,b=t;if(d&&!i&&vt.test(e)){var P=e.split("."),T=P.length;if(T>1){_&&(_=_.slice());for(var C=0;C<T-1;C++){var I=P[C];b=b[I]=b[I]||{},S+="."+I,_&&_.push(I)}E=P[T-1]}}var O=i&&function(e){var t=w[e];return void 0===t&&(e.length>=7&&(t=(0,l.tGl)(e,"ext.metadata")||(0,l.tGl)(e,"ext.web")),w[e]=t),t}(S);if(g=!O&&v&&v.handleField(S,E)?v.value(S,E,u,n):function(e,t,r){if(!t&&!y(t)||"string"!=typeof e)return null;var n,o=typeof t;if("string"===o||"number"===o||"boolean"===o||(0,l.cyL)(t))t={value:t};else if("object"!==o||m.call(t,"value")){if((0,l.hXl)(t[p])||""===t[p]||!(0,l.KgX)(t[p])&&!(0,l.EtT)(t[p])&&!(0,l.Lmq)(t[p])&&!(0,l.cyL)(t[p]))return null}else t={value:r?JSON.stringify(t):t};if((0,l.cyL)(t[p])&&!(t[p][f]>0))return null;if(!(0,l.hXl)(t[h])){if((0,l.cyL)(t[p])||!(0===(n=t[h])||n>0&&n<=13||32===n))return null;t[p]=t[p].toString()}return t}(E,u,n)){var N=g.value;if(b[E]=N,a&&a(_,E,g),c&&"object"==typeof N&&!(0,l.cyL)(N)){var R=_;R&&(R=R.slice()).push(E),r(u,N,S+"."+E,i,R,a,c)}}}})}e.createPayload=function(e,t,r,n,o,i){return{apiKeys:[],payloadBlob:j,overflow:null,sizeExceed:[],failedEvts:[],batches:[],numEvents:0,retryCnt:e,isTeardown:t,isSync:r,isBeacon:n,sendType:i,sendReason:o}},e.appendPayload=function(r,n,o){var i=r&&n&&!r.overflow;return i&&(0,T.r2)(t,function(){return"Serializer:appendPayload"},function(){for(var t=n.events(),i=r.payloadBlob,s=r.numEvents,a=!1,c=[],u=[],d=r.isBeacon,p=d?65e3:3984588,h=d?ft:ht,f=0,g=0;f<t.length;){var m=t[f];if(m){if(s>=o){r.overflow=n.split(f);break}var v=e.getEventBlob(m);if(v&&v.length<=h){var y=v.length;if(i.length+y>p){r.overflow=n.split(f);break}i&&(i+="\n"),i+=v,++g>20&&((0,l.hKY)(i,0,1),g=0),a=!0,s++}else v?c.push(m):u.push(m),t.splice(f,1),f--}f++}if(c.length>0&&r.sizeExceed.push(st.create(n.iKey(),c)),u.length>0&&r.failedEvts.push(st.create(n.iKey(),u)),a){r.batches.push(n),r.payloadBlob=i,r.numEvents=s;var S=n.iKey();-1===(0,l.rDm)(r.apiKeys,S)&&r.apiKeys.push(S)}},function(){return{payload:r,theBatch:{iKey:n.iKey(),evts:n.events()},max:o}}),i},e.getEventBlob=function(e){try{return(0,T.r2)(t,function(){return"Serializer.getEventBlob"},function(){var t={};t.name=e.name,t.time=e.time,t.ver=e.ver,t.iKey="o:"+function(e){if(e){var t=(0,l.HzD)(e,"-");if(t>-1)return(0,l.ZWZ)(e,t)}return""}(e.iKey);var n,o={};E||(n=function(e,t,r){!function(e,t,r,n,o){if(o&&t){var i=e(o.value,o.kind,o.propertyType);if(i>-1){var s=t[gt];s||(s=t[gt]={f:{}});var a=s[mt];if(a||(a=s[mt]={}),r)for(var c=0;c<r.length;c++){var u=r[c];a[u]||(a[u]={f:{}});var d=a[u][mt];d||(d=a[u][mt]={}),a=d}a=a[n]={},(0,l.cyL)(o.value)?a.a={t:i}:a.t=i}}}(_,o,e,t,r)});var i=e.ext;i&&(t.ext=o,(0,l.zav)(i,function(e,t){r(t,o[e]={},"ext."+e,!0,null,null,!0)}));var s=t[a]={};s.baseType=e.baseType;var c=s[u]={};return r(e.baseData,c,u,!1,[u],n,g),r(e.data,s,a,!1,[],n,g),JSON.stringify(t)},function(){return{item:e}})}catch(e){return null}}})}return e.__ieDyn=1,e}();function St(e,t){return{set:function(r,n){for(var o=[],i=2;i<arguments.length;i++)o[i-2]=arguments[i];return(0,l.vKV)([e,t],r,n,o)}}}var wt="sendAttempt",Et="?cors=true&"+B[pe]()+"="+U,_t=((pt={})[1]=L,pt[100]=L,pt[200]="sent",pt[8004]=M,pt[8003]=M,pt),bt={},Pt={};function Tt(e,t,r){bt[e]=t,!1!==r&&(Pt[t]=e)}function Ct(e,t){var r=!1;if(e&&t){var n=(0,l.cGk)(e);if(n&&n[oe]>0)for(var o=t[pe](),i=0;i<n[oe];i++){var s=n[i];if(s&&(0,l.v0u)(t,s)&&s[pe]()===o){r=!0;break}}}return r}function It(e,t,r,n){t&&r&&r[oe]>0&&(n&&bt[t]?(e[he][bt[t]]=r,e[fe]=!0):e.url+="&"+t+"="+r)}Tt(G,G,!1),Tt(V,V),Tt(H,"Client-Id"),Tt(W,W),Tt(q,q),Tt(z,z),Tt(X,X);var Ot=function(){function e(t,r,n,o){var i,s,a,d,p,h,f,g,m,v,_,b,P,C,I,N,A,x,k,L,G,K,X,Q,Y,pe,Qe,Ye,Ze,et,tt,rt=!1;(0,c.A)(e,this,function(e){function c(e,t){try{return tt&&tt.getSenderInst(e,t)}catch(e){}return null}function nt(e,t,r){var n=(0,R.Lo)(e);pt(t,200,{},n),xt(n)}function ot(e,t,r,n){var o={},i=e[Re];i&&i.forEach(function(e,t){o[t]=e}),function(e,r,n){pt(t,e,r,n),xt(n)}(e.status,o,r||j)}function it(e,t,r){var n=(0,R.Lo)(e);pt(t,e.status,(0,R.w3)(e,!0),n),xt(n)}function pt(e,t,r,n){try{e(t,r,n)}catch(e){(0,D.ZP)(f,2,518,(0,l.mmD)(e))}}function ht(e,t,r){var n=200,o=e[Ae],i=e[De]+(X?"&NoResponseBody=true":j);try{var s=(0,l.w3n)();if(o){var a=!!m.getPlugin("LocalStorage"),c=[],u=[];(0,l.Iuo)(o[xe],function(e){if(c&&e&&e[ae]()>0)for(var t=e[ce](),r=0;r<t[oe];r++){if(!s.sendBeacon(i,C.getEventBlob(t[r]))){c[le](e[ue](r));break}u[le](e[r])}else c[le](e[ue](0))}),u[oe]>0&&(o.sentEvts=u),a||kt(c,8003,o[ke],!0)}else n=0}catch(e){(0,D.OG)(f,"Failed to send telemetry using sendBeacon API. Ex:"+(0,l.mmD)(e)),n=0}finally{pt(t,n,{},j)}}function ft(e){return 2===e||3===e}function gt(e){return A&&ft(e)&&(e=2),e}function mt(){return!a&&p<r}function vt(){var e=P;return P=[],e}function bt(e,t,r){var n=!1;return e&&e[oe]>0&&!a&&g[t]&&C&&(n=0!==t||mt()&&(r>0||d[Z]())),n}function Tt(e){var t={};return e&&(0,l.Iuo)(e,function(e,r){t[r]={iKey:e[se](),evts:e[ce]()}}),t}function Ot(e,r,n,o,i){if(e&&0!==e[oe])if(a)kt(e,1,o);else{o=gt(o);try{var c=e,u=0!==o;(0,T.r2)(m,function(){return"HttpManager:_sendBatches"},function(a){a&&(e=e.slice(0));for(var c=[],l=null,d=E(),p=g[o]||(u?g[1]:g[0]),h=p&&p[Be],f=K&&(A||ft(o)||3===h||p._isSync&&2===h);bt(e,o,r);){var m=e.shift();m&&m[ae]()>0&&(s.isTenantKilled(m[se]())?c[le](m):(l=l||C[Ie](r,n,u,f,i,o),C.appendPayload(l,m,t)?null!==l.overflow&&(e=[l.overflow][ie](e),l.overflow=null,At(l,d,E(),i),d=E(),l=null):(At(l,d,E(),i),d=E(),e=[m][ie](e),l=null)))}l&&At(l,d,E(),i),e[oe]>0&&(P=e[ie](P)),kt(c,8004,o)},function(){return{batches:Tt(c),retryCount:r,isTeardown:n,isSynchronous:u,sendReason:i,useSendBeacon:ft(o),sendType:o}},!u)}catch(e){(0,D.ZP)(f,2,48,"Unexpected Exception sending batch: "+(0,l.mmD)(e))}}}function Nt(e,t){var r={url:i,hdrs:{},useHdrs:!1};t?(r[he]=w(r[he],b),r.useHdrs=(0,l.cGk)(r.hdrs)[oe]>0):(0,l.zav)(b,function(e,t){Pt[e]?It(r,Pt[e],t,!1):(r[he][e]=t,r[fe]=!0)}),It(r,H,"NO_AUTH",t),It(r,V,"1DS-Web-JS-4.3.0",t);var n=j;(0,l.Iuo)(e.apiKeys,function(e){n[oe]>0&&(n+=","),n+=e}),It(r,W,n,t),It(r,z,(0,l.f0d)().toString(),t);var o=function(e){for(var t=0;t<e.batches[oe];t++){var r=e[xe][t].Msfpc();if(r)return encodeURIComponent(r)}return j}(e);if(y(o)&&(r.url+="&ext.intweb.msfpc="+o),d[te]()&&It(r,q,d[re](),t),m[Ve]){var s=m[Ve]();s>=0&&(r.url+="&w="+s)}for(var a=0;a<_[oe];a++)r.url+="&"+_[a].name+"="+_[a].value;return r}function Rt(e,t,r){e[t]=e[t]||{},e[t][h.identifier]=r}function At(t,r,o,i){if(t&&t.payloadBlob&&t.payloadBlob[oe]>0){var a=!!Y,c=g[t.sendType];!ft(t[ke])&&t[He]&&2===t.sendReason&&(c=g[2]||g[3]||c);var y=x;(t.isBeacon||3===c[Be])&&(y=!1);var S=Nt(t,y);y=y||S[fe];var _=E();(0,T.r2)(m,function(){return"HttpManager:_doPayloadSend"},function(){for(var g=0;g<t.batches[oe];g++)for(var b=t[xe][g][ce](),P=0;P<b[oe];P++){var C=b[P];if(I){var O=C[qe]=C[qe]||{};Rt(O,"sendEventStart",_),Rt(O,"serializationStart",r),Rt(O,"serializationCompleted",o)}C[wt]>0?C[wt]++:C[wt]=1}kt(t[xe],1e3+(i||0),t[ke],!0);var N={data:t[Ne],urlString:S.url,headers:S[he],_thePayload:t,_sendReason:i,timeout:k,disableXhrSync:L,disableFetchKeepAlive:G};y&&(Ct(N[Re],$)||(N[Re][$]=F),Ct(N[Re],B)||(N[Re][B]=U));var R=null;c&&(R=function(r){d[ee]();var o=function(r,o){!function(t,r,o,i){var a,c=9e3,f=null,g=!1,m=!1;try{var v=!0;if(typeof t!==u.bA){if(r){d[ne](r["time-delta-millis"]);var y=r["kill-duration"]||r["kill-duration-seconds"];(0,l.Iuo)(s[Xe](r["kill-tokens"],y),function(e){(0,l.Iuo)(o[xe],function(t){if(t[se]()===e){f=f||[];var r=t[ue](0);o.numEvents-=r[ae](),f[le](r)}})})}if(200==t||204==t)return void(c=200);((a=t)>=300&&a<500&&429!=a||501==a||505==a||o.numEvents<=0)&&(v=!1),c=9e3+t%1e3}if(v){c=100;var S=o.retryCnt;0===o[ke]&&(S<n?(g=!0,Dt(function(){0===o[ke]&&p--,Ot(o[xe],S+1,o[ze],A?2:o[ke],5)},A,dt(S))):(m=!0,A&&(c=8001)))}}finally{g||(d[ne](),function(t,r,n,o){try{o&&h[Je]();var i=t[xe];200===r&&(i=t.sentEvts||t[xe],o||t[We]||h._clearBackOff(),function(e){if(I){var t=E();(0,l.Iuo)(e,function(e){e&&e[ae]()>0&&function(e,t){I&&(0,l.Iuo)(e,function(e){Rt(e[qe]=e[qe]||{},"sendEventCompleted",t)})}(e[ce](),t)})}}(i)),kt(i,r,t[ke],!0)}finally{0===t[ke]&&(p--,5!==n&&e.sendQueuedRequests(t[ke],n))}}(o,c,i,m)),kt(f,8004,o[ke])}}(r,o,t,i)},a=t[ze]||t[We];try{c.sendPOST(r,o,a),pe&&pe(N,r,a,t[He])}catch(e){(0,D.OG)(f,"Unexpected exception sending payload. Ex:"+(0,l.mmD)(e)),pt(o,0,{})}}),(0,T.r2)(m,function(){return"HttpManager:_doPayloadSend.sender"},function(){if(R)if(0===t[ke]&&p++,a&&!t.isBeacon&&3!==c[Be]){var e={data:N[Ge],urlString:N[De],headers:w({},N[Re]),timeout:N.timeout,disableXhrSync:N[Ee],disableFetchKeepAlive:N[_e]},r=!1;(0,T.r2)(m,function(){return"HttpManager:_doPayloadSend.sendHook"},function(){try{Y(e,function(e){r=!0,v||e[Ae]||(e[Ae]=e[Ae]||N[Ae],e[Ke]=e[Ke]||N[Ke]),R(e)},t.isSync||t[ze])}catch(e){r||R(N)}})}else R(N)})},function(){return{thePayload:t,serializationStart:r,serializationCompleted:o,sendReason:i}},t[We])}t.sizeExceed&&t.sizeExceed[oe]>0&&kt(t.sizeExceed,8003,t[ke]),t.failedEvts&&t.failedEvts[oe]>0&&kt(t.failedEvts,8002,t[ke])}function Dt(e,t,r){t?e():Ze.set(e,r)}function xt(e){var t=Qe;try{for(var r=0;r<t[oe];r++)try{t[r](e)}catch(e){(0,D.ZP)(f,1,519,"Response handler failed: "+e)}if(e){var n=JSON.parse(e);y(n.webResult)&&y(n.webResult[J])&&N.set("MSFPC",n.webResult[J],31536e3)}}catch(e){}}function kt(e,t,r,n){if(e&&e[oe]>0&&o){var i=o[a=t,c=_t[a],y(c)||(c="oth",a>=9e3&&a<=9999?c="rspFail":a>=8e3&&a<=8999?c=M:a>=1e3&&a<=1999&&(c="send")),c];if(i){var s=0!==r;(0,T.r2)(m,function(){return"HttpManager:_sendBatchesNotification"},function(){Dt(function(){try{i.call(o,e,t,s,r)}catch(e){(0,D.ZP)(f,1,74,"send request notification failed: "+e)}},n||s,0)},function(){return{batches:Tt(e),reason:t,isSync:s,sendSync:n,sendType:r}},!s)}}var a,c}!function(){var e;i=null,s=new ut,a=!1,d=new lt,rt=!1,p=0,h=null,f=null,g=null,m=null,v=!0,_=[],b={},P=[],C=null,I=!1,N=null,A=!1,x=!1,k=e,L=e,G=e,K=e,X=e,Q=[],Y=e,pe=e,Qe=[],Ye=!1,Ze=St(),et=!1,tt=null}(),e[ge]=function(e,t,r){Ye||(m=t,N=t.getCookieMgr(),f=(h=r).diagLog(),(0,l.Yny)(Q,(0,O.a)(e,function(e){var n,o=e.cfg,s=e.cfg.extensionConfig[r.identifier];Ze=St(s[me],s[ve]),y(o.anonCookieName)?function(e,t,r){for(var n=0;n<e[oe];n++)if(e[n].name===t)return void(e[n].value=r);e[le]({name:t,value:r})}(_,"anoncknm",o.anonCookieName):function(e){for(var t=0;t<e[oe];t++)if("anoncknm"===e[t].name)return void e[de](t,1)}(_),Y=s.payloadPreprocessor,pe=s.payloadListener;var a=s.httpXHROverride,u=s[ye]?s[ye]:o.endpointUrl;i=u+Et,x=!!(0,l.b07)(s[Se])||!s[Se],I=!s.disableEventTimings;var d=s.valueSanitizer,p=s.stringifyObjects,h=!!o[we];(0,l.b07)(s[we])||(h=!!s[we]),k=s.xhrTimeout,L=!!s[Ee],G=!!s[_e],X=!1!==s.addNoResponse,et=!!s.excludeCsMetaData,t.getPlugin("LocalStorage")&&(G=!0),rt=!(0,at.lV)(),C=new yt(m,d,p,h,S,et),(0,l.hXl)(s[be])||(rt=!!s[be]);var w=function(){try{return{enableSendPromise:!1,isOneDs:!0,disableCredentials:!1,disableXhr:!1,disableBeacon:!rt,disableBeaconSync:!rt,disableFetchKeepAlive:G,timeWrapper:Ze,addNoResponse:X,senderOnCompleteCallBack:{xdrOnComplete:nt,fetchOnComplete:ot,xhrOnComplete:it,beaconOnRetry:ht}}}catch(e){}return null}();tt?tt.SetConfig(w):(tt=new ct.v)[ge](w,f);var E=a,b=s[Pe]?a:null,P=s[Pe]?a:null,T=[3,2];if(!a){v=!1;var O=[];(0,at.lV)()?(O=[2,1],T=[2,1,3]):O=[1,2,3],(a=c(O=(0,R.jL)(O,s.transports),!1))||(0,D.OG)(f,"No available transport to send events"),E=c(O,!0)}b||(b=c(T=(0,R.jL)(T,s.unloadTransports),!0)),K=!v&&(rt&&(0,at.Uf)()||!G&&(0,at.R7)(!0)),(n={})[0]=a,n[1]=E||c([1,2,3],!0),n[2]=b||E||c([1],!0),n[3]=P||c([2,3],!0)||E||c([1],!0),g=n})),Ye=!0)},e.addResponseHandler=function(e){return Qe[le](e),{rm:function(){var t=Qe.indexOf(e);t>=0&&Qe[de](t,1)}}},e[Te]=function(e){try{if(C)return C.getEventBlob(e)}catch(e){}return j},e[Ce]=function(){try{return Nt(C&&C[Ie](0,!1,!1,!1,1,0),x)}catch(e){}return null},e[Oe]=function(e,r){try{var n=[];(0,l.Iuo)(e,function(e){r&&(e=(0,R.hW)(e));var t=st.create(e[se],[e]);n[le](t)});for(var o=null;n[oe]>0&&C;){var i=n.shift();i&&i[ae]()>0&&(o=o||C[Ie](0,!1,!1,!1,1,0),C.appendPayload(o,i,t))}var s=Nt(o,x),a={data:o[Ne],urlString:s.url,headers:s[he],timeout:k,disableXhrSync:L,disableFetchKeepAlive:G};return x&&(Ct(a[Re],$)||(a[Re][$]=F),Ct(a[Re],B)||(a[Re][B]=U)),a}catch(e){}return null},e._getDbgPlgTargets=function(){return[g[0],s,C,g]},e[je]=function(e,t){b[e]=t},e.removeHeader=function(e){delete b[e]},e[Me]=function(){return mt()&&d[Z]()},e[Le]=function(e,t){(0,l.b07)(e)&&(e=0),A&&(e=gt(e),t=2),bt(P,e,0)&&Ot(vt(),0,!1,e,t||0)},e[Fe]=function(){return!a&&0===p&&0===P[oe]},e[Ue]=function(e){A=e},e.addBatch=function(e){if(e&&e[ae]()>0){if(s.isTenantKilled(e[se]()))return!1;P[le](e)}return!0},e.teardown=function(){P[oe]>0&&Ot(vt(),0,!0,2,2),(0,l.Iuo)(Q,function(e){e&&e.rm&&e.rm()}),Q=[]},e.pause=function(){a=!0},e.resume=function(){a=!1,e[Le](0,4)},e[$e]=function(e,t,r){e&&e[ae]()>0&&((0,l.hXl)(t)&&(t=1),A&&(t=gt(t),r=2),Ot([e],0,!1,t,r||0))}})}return e.__ieDyn=1,e}(),Nt=1e4,Rt="eventsDiscarded",At=void 0,Dt=(0,l.ZHX)({eventsLimitInMem:{isVal:P,v:Nt},immediateEventLimit:{isVal:P,v:500},autoFlushEventsLimit:{isVal:P,v:0},disableAutoBatchFlushLimit:!1,httpXHROverride:{isVal:function(e){return e&&e.sendPOST},v:At},overrideInstrumentationKey:At,overrideEndpointUrl:At,disableTelemetry:!1,ignoreMc1Ms0CookieProcessing:!1,setTimeoutOverride:At,clearTimeoutOverride:At,payloadPreprocessor:At,payloadListener:At,disableEventTimings:At,valueSanitizer:At,stringifyObjects:At,enableCompoundKey:At,disableOptimizeObj:!1,transports:At,unloadTransports:At,useSendBeacon:At,disableFetchKeepAlive:At,avoidOptions:!1,xhrTimeout:At,disableXhrSync:At,alwaysUseXhrOverride:!1,maxEventRetryAttempts:{isVal:l.EtT,v:6},maxUnloadEventRetryAttempts:{isVal:l.EtT,v:2},addNoResponse:At,excludeCsMetaData:At}),xt=function(e){function t(){var r,n=e.call(this)||this;n.identifier="PostChannel",n.priority=1011,n.version="4.3.0";var a,u,d,p,h,f,g,m,v,y,S,w,E,b,x,j,M,L,F,U,$,B,V,H,q,z=!1,W=[],X=!1,J=0,Z=0,ee={},te=o;return(0,c.A)(t,n,function(e,t){function n(){(0,C.Ds)(null,L),(0,C.sq)(null,L),(0,C.vF)(null,L)}function c(e){var t="";return e&&e[oe]&&(0,l.Iuo)(e,function(e){t&&(t+="\n"),t+=e}),t}function re(e){var t="";try{he(e),t=m[Te](e)}catch(e){}return t}function ne(e){"beforeunload"!==(e||(0,l.zkX)().event).type&&(x=!0,m[Ue](x)),Pe(2,2)}function pe(e){x=!1,m[Ue](x)}function he(e){e.ext&&e.ext[Q]&&delete e.ext[Q],e.ext&&e.ext[Y]&&e.ext[Y].id&&delete e.ext[Y].id,b&&(e.ext=(0,R.hW)(e.ext),e[et]&&(e[et]=(0,R.hW)(e[et])),e[Ge]&&(e[Ge]=(0,R.hW)(e[Ge])))}function fe(e,t){if(e[tt]||(e[tt]=0),e[rt]||(e[rt]=1),he(e),e[nt])if(f||X)e[rt]=3,e[nt]=!1;else if(m)return b&&(e=(0,R.hW)(e)),void m[$e](st.create(e[se],[e]),!0===e[nt]?1:e[nt],3);var r=e[rt],n=Z,o=d;4===r&&(n=J,o=u);var i=!1;if(n<o)i=!Re(e,t);else{var s=1,a=20;4===r&&(s=4,a=1),i=!0,function(e,t,r,n){for(;r<=t;){var o=Ie(e,t,!0);if(o&&o[ae]()>0){var i=o[ue](0,n),s=i[ae]();if(s>0)return 4===r?J-=s:Z-=s,Ke(Rt,[i],A.x.QueueFull),!0}r++}return Ae(),!1}(e[se],e[rt],s,a)&&(i=!Re(e,t))}i&&We(Rt,[e],A.x.QueueFull)}function ye(e,t,r){var n=De(e,t,r);return m[Le](t,r),n}function Se(){return Z>0}function we(){if(w>=0&&De(w,0,E)&&m[Le](0,E),J>0&&!h&&!X){var e=ee[te][2];e>=0&&(h=_e(function(){h=null,ye(4,0,1),we()},e))}var t=ee[te][1];!p&&!a&&t>=0&&!X&&(Se()?p=_e(function(){p=null,ye(0===g?3:1,0,1),g++,g%=2,we()},t):g=0)}function Ee(){r=null,z=!1,W=[],a=null,X=!1,J=0,u=500,Z=0,d=Nt,ee={},te=o,p=null,h=null,f=0,g=0,v={},y=0,V=!1,S=0,w=-1,E=null,b=!0,x=!1,j=6,M=2,L=null,H=null,q=!1,F=St(),m=new Ot(500,2,1,{requeue:qe,send:Xe,sent:ot,drop:it,rspFail:at,oth:ct}),He(),v[4]={batches:[],iKeyMap:{}},v[3]={batches:[],iKeyMap:{}},v[2]={batches:[],iKeyMap:{}},v[1]={batches:[],iKeyMap:{}},lt()}function _e(e,t){0===t&&f&&(t=1);var r=1e3;return f&&(r=dt(f-1)),F.set(e,t*r)}function be(){return null!==p&&(p.cancel(),p=null,g=0,!0)}function Pe(e,t){be(),a&&(a.cancel(),a=null),X||ye(1,e,t)}function Ie(e,t,r){var n=v[t];n||(n=v[t=1]);var o=n.iKeyMap[e];return!o&&r&&(o=st.create(e),n.batches[le](o),n.iKeyMap[e]=o),o}function Ne(t,r){m[Me]()&&!f&&(y>0&&Z>y&&(r=!0),r&&null==a&&e.flush(t,function(){},20))}function Re(e,t){b&&(e=(0,R.hW)(e));var r=e[rt],n=Ie(e[se],r,!0);return!!n.addEvent(e)&&(4!==r?(Z++,t&&0===e[tt]&&Ne(!e.sync,S>0&&n[ae]()>=S)):J++,!0)}function Ae(){for(var e=0,t=0,r=function(r){var n=v[r];n&&n[xe]&&(0,l.Iuo)(n[xe],function(n){4===r?e+=n[ae]():t+=n[ae]()})},n=1;n<=4;n++)r(n);Z=t,J=e}function De(t,r,n){var o=!1,i=0===r;return!i||m[Me]()?(0,T.r2)(e.core,function(){return"PostChannel._queueBatches"},function(){for(var e=[],r=4;r>=t;){var n=v[r];n&&n.batches&&n.batches[oe]>0&&((0,l.Iuo)(n[xe],function(t){m.addBatch(t)?o=o||t&&t[ae]()>0:e=e[ie](t[ce]()),4===r?J-=t[ae]():Z-=t[ae]()}),n[xe]=[],n.iKeyMap={}),r--}e[oe]>0&&We(Rt,e,A.x.KillSwitch),o&&w>=t&&(w=-1,E=0)},function(){return{latency:t,sendType:r,sendReason:n}},!i):(w=w>=0?Math.min(w,t):t,E=Math.max(E,n)),o}function ke(e,t){ye(1,0,t),Ae(),Be(function(){e&&e(),W[oe]>0?a=_e(function(){a=null,ke(W.shift(),t)},0):(a=null,we())})}function Be(e){m[Fe]()?e():a=_e(function(){a=null,Be(e)},.25)}function He(){(ee={})[o]=[2,1,0],ee[i]=[6,3,0],ee[s]=[18,9,0]}function qe(t,r){var n=[],o=j;x&&(o=M),(0,l.Iuo)(t,function(t){t&&t[ae]()>0&&(0,l.Iuo)(t[ce](),function(t){t&&(t[nt]&&(t[rt]=4,t[nt]=!1),t[tt]<o?(_(t,e[Qe]),fe(t,!1)):n[le](t))})}),n[oe]>0&&We(Rt,n,A.x.NonRetryableStatus),x&&Pe(2,2)}function ze(t,r){var n=B||{},o=n[t];if(o)try{o.apply(n,r)}catch(r){(0,D.ZP)(e.diagLog(),1,74,t+" notification failed: "+r)}}function We(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];t&&t[oe]>0&&ze(e,[t][ie](r))}function Ke(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];t&&t[oe]>0&&(0,l.Iuo)(t,function(t){t&&t[ae]()>0&&ze(e,[t.events()][ie](r))})}function Xe(e,t,r){e&&e[oe]>0&&ze("eventsSendRequest",[t>=1e3&&t<=1999?t-1e3:0,!0!==r])}function ot(e,t){Ke("eventsSent",e,t),we()}function it(e,t){Ke(Rt,e,t>=8e3&&t<=8999?t-8e3:A.x.Unknown)}function at(e){Ke(Rt,e,A.x.NonRetryableStatus),we()}function ct(e,t){Ke(Rt,e,A.x.Unknown),we()}function lt(){S=$?0:Math.max(1500,d/6)}Ee(),e._getDbgPlgTargets=function(){return[m,r]},e[ge]=function(o,i,s){(0,T.r2)(i,function(){return"PostChannel:initialize"},function(){t[ge](o,i,s),B=i.getNotifyMgr();try{L=(0,C.Hm)((0,I.Z)(e[Qe]),i.evtNamespace&&i.evtNamespace()),e._addHook((0,O.a)(o,function(t){var o=t.cfg,s=(0,N.i8)(null,o,i);r=s.getExtCfg(e[Qe],Dt),F=St(r[me],r[ve]),b=!r.disableOptimizeObj&&!!(0,l.zS2)("chrome"),U=r.ignoreMc1Ms0CookieProcessing,function(e){var t=e[Ve];e[Ve]=function(){var r=0;return U&&(r|=2),r|t.call(e)}}(i),d=r[Ye],u=r.immediateEventLimit,y=r[Ze],j=r.maxEventRetryAttempts,M=r.maxUnloadEventRetryAttempts,$=r.disableAutoBatchFlushLimit,lt(),H=r.overrideInstrumentationKey,q=!!r.disableTelemetry,V&&n();var a=o.disablePageUnloadEvents||[];V=(0,C.ee)(ne,a,L),V=(0,C.Fc)(ne,a,L)||V,V=(0,C.oS)(pe,o.disablePageShowEvents,L)||V})),m[ge](o,e.core,e)}catch(t){throw e.setInitialized(!1),t}},function(){return{theConfig:o,core:i,extensions:s}})},e.processTelemetry=function(t,r){_(t,e[Qe]),r=r||e._getTelCtx(r);var n=t;q||z||(H&&(n[se]=H),fe(n,!0),x?Pe(2,2):we()),e.processNext(n,r)},e.getOfflineSupport=function(){try{var e=m&&m[Ce]();if(m)return{getUrl:function(){return e?e.url:null},serialize:re,batch:c,shouldProcess:function(e){return!q},createPayload:function(e){return null},createOneDSPayload:function(e){if(m[Oe])return m[Oe](e,b)}}}catch(e){}return null},e._doTeardown=function(e,t){Pe(2,2),z=!0,m.teardown(),n(),Ee()},e.setEventQueueLimits=function(e,t){r[Ye]=d=P(e)?e:Nt,r[Ze]=y=P(t)?t:0,lt();var n=Z>e;if(!n&&S>0)for(var o=1;!n&&o<=3;o++){var i=v[o];i&&i[xe]&&(0,l.Iuo)(i[xe],function(e){e&&e[ae]()>=S&&(n=!0)})}Ne(!0,n)},e.pause=function(){be(),X=!0,m.pause()},e.resume=function(){X=!1,m.resume(),we()},e._loadTransmitProfiles=function(e){be(),He(),te=o,we(),(0,l.zav)(e,function(e,t){var r=t[oe];if(r>=2){var n=r>2?t[2]:0;if(t[de](0,r-2),t[1]<0&&(t[0]=-1),t[1]>0&&t[0]>0){var o=t[0]/t[1];t[0]=Math.ceil(o)*t[1]}n>=0&&t[1]>=0&&n>t[1]&&(n=t[1]),t[le](n),ee[e]=t}})},e.flush=function(e,t,r){var n;if(void 0===e&&(e=!0),!X)if(r=r||1,e)t||(n=(0,k.Qo)(function(e){t=e})),null==a?(be(),De(1,0,r),a=_e(function(){a=null,ke(t,r)},0)):W[le](t);else{var o=be();ye(1,1,r),t&&t(),o&&we()}return n},e.setMsaAuthTicket=function(e){m[je](G,e)},e.setAuthPluginHeader=function(e){m[je](K,e)},e.removeAuthPluginHeader=function(){m.removeHeader(K)},e.hasEvents=Se,e._setTransmitProfile=function(e){te!==e&&void 0!==ee[e]&&(be(),te=e,we())},(0,R.o$)(e,function(){return m},["addResponseHandler"]),e[Je]=function(){f<4&&(f++,be(),we())},e._clearBackOff=function(){f&&(f=0,be(),we())}}),n}return(0,a.qU)(t,e),t.__ieDyn=1,t}(x.s)},4484(e,t,r){"use strict";r.d(t,{F:()=>a,H:()=>s});var n=r(269),o=r(5025),i=r(5130);function s(e){if(!e)return{};var t=e[i.sY](";"),r=(0,n.KTd)(t,function(e,t){var r=t[i.sY]("=");if(2===r[i.oI]){var n=r[0][i.OL](),o=r[1];e[n]=o}return e},{});if((0,n.cGk)(r)[i.oI]>0){if(r.endpointsuffix){var s=r.location?r.location+".":"";r[i.zV]=r[i.zV]||"https://"+s+"dc."+r.endpointsuffix}r[i.zV]=r[i.zV]||o._G,(0,n.Cv9)(r[i.zV],"/")&&(r[i.zV]=r[i.zV].slice(0,-1))}return r}var a={parse:s}},5025(e,t,r){"use strict";r.d(t,{R2:()=>l,_G:()=>a,jp:()=>i,ks:()=>u,tU:()=>o,wc:()=>c,xF:()=>n,ym:()=>s});var n="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",o="sampleRate",i="ProcessLegacy",s="http.method",a="https://dc.services.visualstudio.com",c="/v2/track",l="not_specified",u="iKey"},7374(e,t,r){"use strict";r.d(t,{eL:()=>o,iD:()=>s,uG:()=>i});var n=r(4282),o=(0,n.H)({LocalStorage:0,SessionStorage:1}),i=(0,n.H)({AI:0,AI_AND_W3C:1,W3C:2}),s=(0,n.H)({Normal:1,Critical:2})},87(e,t,r){"use strict";r.d(t,{Dt:()=>i,Y8:()=>a,bb:()=>s,vv:()=>c});var n=r(269),o=r(5130);function i(e,t){return void 0===t&&(t=!1),null==e?t:"true"===e.toString()[o.OL]()}function s(e){(isNaN(e)||e<0)&&(e=0);var t=""+(e=Math.round(e))%1e3,r=""+Math.floor(e/1e3)%60,n=""+Math.floor(e/6e4)%60,i=""+Math.floor(e/36e5)%24,s=Math.floor(e/864e5);return t=1===t[o.oI]?"00"+t:2===t[o.oI]?"0"+t:t,r=r[o.oI]<2?"0"+r:r,n=n[o.oI]<2?"0"+n:n,(s>0?s+".":"")+(i=i[o.oI]<2?"0"+i:i)+":"+n+":"+r+"."+t}function a(e,t){var r=null;return(0,n.Iuo)(e,function(e){if(e.identifier===t)return r=e,-1}),r}function c(e,t,r,o,i){return!i&&(0,n.KgX)(e)&&("Script error."===e||"Script error"===e)}},8596(e,t,r){"use strict";r.d(t,{o:()=>f});var n=r(4688),o=r(6054);function i(e){var t="ai."+e+".";return function(e){return t+e}}var s=i("application"),a=i("device"),c=i("location"),l=i("operation"),u=i("session"),d=i("user"),p=i("cloud"),h=i("internal"),f=function(e){function t(){return e.call(this)||this}return(0,n.qU)(t,e),t}((0,o.SZ)({applicationVersion:s("ver"),applicationBuild:s("build"),applicationTypeId:s("typeId"),applicationId:s("applicationId"),applicationLayer:s("layer"),deviceId:a("id"),deviceIp:a("ip"),deviceLanguage:a("language"),deviceLocale:a("locale"),deviceModel:a("model"),deviceFriendlyName:a("friendlyName"),deviceNetwork:a("network"),deviceNetworkName:a("networkName"),deviceOEMName:a("oemName"),deviceOS:a("os"),deviceOSVersion:a("osVersion"),deviceRoleInstance:a("roleInstance"),deviceRoleName:a("roleName"),deviceScreenResolution:a("screenResolution"),deviceType:a("type"),deviceMachineName:a("machineName"),deviceVMName:a("vmName"),deviceBrowser:a("browser"),deviceBrowserVersion:a("browserVersion"),locationIp:c("ip"),locationCountry:c("country"),locationProvince:c("province"),locationCity:c("city"),operationId:l("id"),operationName:l("name"),operationParentId:l("parentId"),operationRootId:l("rootId"),operationSyntheticSource:l("syntheticSource"),operationCorrelationVector:l("correlationVector"),sessionId:u("id"),sessionIsFirst:u("isFirst"),sessionIsNew:u("isNew"),userAccountAcquisitionDate:d("accountAcquisitionDate"),userAccountId:d("accountId"),userAgent:d("userAgent"),userId:d("id"),userStoreRegion:d("storeRegion"),userAuthUserId:d("authUserId"),userAnonymousUserAcquisitionDate:d("anonUserAcquisitionDate"),userAuthenticatedUserAcquisitionDate:d("authUserAcquisitionDate"),cloudName:p("name"),cloudRole:p("role"),cloudRoleVer:p("roleVer"),cloudRoleInstance:p("roleInstance"),cloudEnvironment:p("environment"),cloudLocation:p("location"),cloudDeploymentUnit:p("deploymentUnit"),internalNodeName:h("nodeName"),internalSdkVersion:h("sdkVersion"),internalAgentVersion:h("agentVersion"),internalSnippet:h("snippet"),internalSdkSrc:h("sdkSrc")}))},9762(e,t,r){"use strict";r.d(t,{O:()=>n});var n=(0,r(4282).H)({Verbose:0,Information:1,Warning:2,Error:3,Critical:4})},1575(e,t,r){"use strict";r.d(t,{F:()=>o,O:()=>i});var n=r(8596),o={UserExt:"user",DeviceExt:"device",TraceExt:"trace",WebExt:"web",AppExt:"app",OSExt:"os",SessionExt:"ses",SDKExt:"sdk"},i=new n.o},7952(e,t,r){"use strict";r.d(t,{G:()=>c});var n=r(269),o=r(6149),i=r(4276),s=r(5130);function a(e,t){(0,o.ML)(e,null,null,t)}function c(e){var t=(0,n.YEm)(),r=(0,n.w3n)(),c=!1,l=[],u=1;!r||(0,n.hXl)(r.onLine)||r.onLine||(u=2);var d=0,p=m(),h=(0,o.Hm)((0,i.Z)("OfflineListener"),e);try{if(g((0,n.zkX)())&&(c=!0),t){var f=t.body||t;f.ononline&&g(f)&&(c=!0)}}catch(e){c=!1}function g(e){var t=!1;return e&&(t=(0,o.mB)(e,"online",y,h))&&(0,o.mB)(e,"offline",S,h),t}function m(){return 2!==d&&2!==u}function v(){var e=m();p!==e&&(p=e,(0,n.Iuo)(l,function(e){var t={isOnline:p,rState:u,uState:d};try{e(t)}catch(e){}}))}function y(){u=1,v()}function S(){u=2,v()}return{isOnline:function(){return p},isListening:function(){return c},unload:function(){var e=(0,n.zkX)();if(e&&c){if(a(e,h),t){var r=t.body||t;(0,n.b07)(r.ononline)||a(r,h)}c=!1}},addListener:function(e){return l[s.y5](e),{rm:function(){var t=l.indexOf(e);return t>-1?l.splice(t,1):void 0}}},setOnlineState:function(e){d=e,v()}}}},2910(e,t,r){"use strict";r.d(t,{a:()=>n});var n=(0,r(4282).o)({requestContextHeader:[0,"Request-Context"],requestContextTargetKey:[1,"appId"],requestContextAppIdFormat:[2,"appId=cid-v1:"],requestIdHeader:[3,"Request-Id"],traceParentHeader:[4,"traceparent"],traceStateHeader:[5,"tracestate"],sdkContextHeader:[6,"Sdk-Context"],sdkContextHeaderAppIdRequest:[7,"appId"],requestContextHeaderLowerCase:[8,"request-context"]})},4658(e,t,r){"use strict";r.d(t,{AN:()=>_,BW:()=>y,Dt:()=>T,Nu:()=>g,Se:()=>S,T9:()=>b,_M:()=>w,iw:()=>v,tm:()=>E,v7:()=>C,vH:()=>P,vh:()=>m});var n=r(6054),o=r(269),i=r(3775),s=r(1396),a=r(7374),c=r(5130),l=void 0,u=void 0,d="";function p(){return y()?h(a.eL.LocalStorage):null}function h(e){try{if((0,o.hXl)((0,s.mS)()))return null;var t=(new Date)[c.xE](),r=(0,o.zS2)(e===a.eL.LocalStorage?"localStorage":"sessionStorage"),n=d+t;r.setItem(n,t);var i=r.getItem(n)!==t;if(r[c.AZ](n),!i)return r}catch(e){}return null}function f(){return _()?h(a.eL.SessionStorage):null}function g(){l=!1,u=!1}function m(e){d=e||""}function v(){l=y(!0),u=_(!0)}function y(e){return(e||void 0===l)&&(l=!!h(a.eL.LocalStorage)),l}function S(e,t){var r=p();if(null!==r)try{return r.getItem(t)}catch(t){l=!1,(0,i.ZP)(e,2,1,"Browser failed read of local storage. "+(0,n.lL)(t),{exception:(0,o.mmD)(t)})}return null}function w(e,t,r){var s=p();if(null!==s)try{return s.setItem(t,r),!0}catch(t){l=!1,(0,i.ZP)(e,2,3,"Browser failed write to local storage. "+(0,n.lL)(t),{exception:(0,o.mmD)(t)})}return!1}function E(e,t){var r=p();if(null!==r)try{return r[c.AZ](t),!0}catch(t){l=!1,(0,i.ZP)(e,2,5,"Browser failed removal of local storage item. "+(0,n.lL)(t),{exception:(0,o.mmD)(t)})}return!1}function _(e){return(e||void 0===u)&&(u=!!h(a.eL.SessionStorage)),u}function b(){var e=[];return _()&&(0,o.zav)((0,o.zS2)("sessionStorage"),function(t){e[c.y5](t)}),e}function P(e,t){var r=f();if(null!==r)try{return r.getItem(t)}catch(t){u=!1,(0,i.ZP)(e,2,2,"Browser failed read of session storage. "+(0,n.lL)(t),{exception:(0,o.mmD)(t)})}return null}function T(e,t,r){var s=f();if(null!==s)try{return s.setItem(t,r),!0}catch(t){u=!1,(0,i.ZP)(e,2,4,"Browser failed write to session storage. "+(0,n.lL)(t),{exception:(0,o.mmD)(t)})}return!1}function C(e,t){var r=f();if(null!==r)try{return r[c.AZ](t),!0}catch(t){u=!1,(0,i.ZP)(e,2,6,"Browser failed removal of session storage item. "+(0,n.lL)(t),{exception:(0,o.mmD)(t)})}return!1}},7358(e,t,r){"use strict";r.d(t,{B:()=>n});var n=function(e,t){this.aiDataContract={baseType:1,baseData:1},this.baseType=e,this.baseData=t}},7975(e,t,r){"use strict";r.d(t,{HQ:()=>g,Rr:()=>l,Vj:()=>f,Vk:()=>d,Vt:()=>p,_T:()=>m,lq:()=>c,pJ:()=>u,qW:()=>v,xP:()=>h,zx:()=>a});var n=r(269),o=r(7292),i=r(3775),s=r(5130);function a(e,t,r){var o=t[s.oI],i=c(e,t);if(i[s.oI]!==o){for(var a=0,l=i;void 0!==r[l];)a++,l=(0,n.P0f)(i,0,147)+v(a);i=l}return i}function c(e,t){var r;return t&&(t=(0,n.EHq)((0,n.oJg)(t)))[s.oI]>150&&(r=(0,n.P0f)(t,0,150),(0,i.ZP)(e,2,57,"name is too long. It has been truncated to 150 characters.",{name:t},!0)),r||t}function l(e,t,r){var o;return void 0===r&&(r=1024),t&&(r=r||1024,(t=(0,n.EHq)((0,n.oJg)(t)))[s.oI]>r&&(o=(0,n.P0f)(t,0,r),(0,i.ZP)(e,2,61,"string value is too long. It has been truncated to "+r+" characters.",{value:t},!0))),o||t}function u(e,t){return m(e,t,2048,66)}function d(e,t){var r;return t&&t[s.oI]>32768&&(r=(0,n.P0f)(t,0,32768),(0,i.ZP)(e,2,56,"message is too long, it has been truncated to 32768 characters.",{message:t},!0)),r||t}function p(e,t){var r;if(t){var o=""+t;o[s.oI]>32768&&(r=(0,n.P0f)(o,0,32768),(0,i.ZP)(e,2,52,"exception is too long, it has been truncated to 32768 characters.",{exception:t},!0))}return r||t}function h(e,t){if(t){var r={};(0,n.zav)(t,function(t,c){if((0,n.Gvm)(c)&&(0,o.Z)())try{c=(0,o.hm)()[s.Jj](c)}catch(t){(0,i.ZP)(e,2,49,"custom property is not valid",{exception:t},!0)}c=l(e,c,8192),t=a(e,t,r),r[t]=c}),t=r}return t}function f(e,t){if(t){var r={};(0,n.zav)(t,function(t,n){t=a(e,t,r),r[t]=n}),t=r}return t}function g(e,t){return t?m(e,t,128,69)[s.xE]():t}function m(e,t,r,o){var a;return t&&(t=(0,n.EHq)((0,n.oJg)(t)))[s.oI]>r&&(a=(0,n.P0f)(t,0,r),(0,i.ZP)(e,2,o,"input is too long, it has been truncated to "+r+" characters.",{data:t},!0)),a||t}function v(e){var t="00"+e;return(0,n.hKY)(t,t[s.oI]-3)}},1062(e,t,r){"use strict";r.d(t,{L:()=>a});var n=r(6054),o=r(5025),i=r(5130),s=r(7975),a=function(e,t,r){var a=this,c=this;c.ver=1,c.sampleRate=100,c.tags={},c[i.RS]=(0,s.Rr)(e,r)||o.R2,c.data=t,c.time=(0,n._u)(new Date),c.aiDataContract={time:1,iKey:1,name:1,sampleRate:function(){return 100===a.sampleRate?4:1},tags:1,data:1}}},3072(e,t,r){"use strict";r.d(t,{J:()=>s});var n=r(5025),o=r(5130),i=r(7975),s=function(){function e(e,t,r,s){this.aiDataContract={ver:1,name:1,properties:0,measurements:0};var a=this;a.ver=2,a[o.RS]=(0,i.Rr)(e,t)||n.R2,a[o.$y]=(0,i.xP)(e,r),a[o.XA]=(0,i.Vj)(e,s)}return e.envelopeType="Microsoft.ApplicationInsights.{0}.Event",e.dataType="EventData",e}()},5397(e,t,r){"use strict";r.d(t,{WJ:()=>E});var n=r(4688),o=r(269),i=r(5025),s=r(5130),a=r(7975),c="error",l="stack",u="stackDetails",d="errorSrc",p="message",h="description";function f(e,t){var r=e;return r&&!(0,o.KgX)(r)&&(JSON&&JSON[s.Jj]?(r=JSON[s.Jj](e),!t||r&&"{}"!==r||(r=(0,o.Tnt)(e[s.xE])?e[s.xE]():""+e)):r=e+" - (Missing JSON.stringify)"),r||""}function g(e,t){var r=e;return e&&(r&&!(0,o.KgX)(r)&&(r=e[p]||e[h]||r),r&&!(0,o.KgX)(r)&&(r=f(r,!0)),e.filename&&(r=r+" @"+(e.filename||"")+":"+(e.lineno||"?")+":"+(e.colno||"?"))),t&&"String"!==t&&"Object"!==t&&"Error"!==t&&-1===(0,o.HzD)(r||"",t)&&(r=t+": "+r),r||""}function m(e){return e&&e.src&&(0,o.KgX)(e.src)&&e.obj&&(0,o.cyL)(e.obj)}function v(e){var t=e||"";(0,o.KgX)(t)||(t=(0,o.KgX)(t[l])?t[l]:""+t);var r=t[s.sY]("\n");return{src:t,obj:r}}function y(e){var t=null;if(e)try{if(e[l])t=v(e[l]);else if(e[c]&&e[c][l])t=v(e[c][l]);else if(e.exception&&e.exception[l])t=v(e.exception[l]);else if(m(e))t=e;else if(m(e[u]))t=e[u];else if((0,o.zkX)()&&(0,o.zkX)().opera&&e[p])t=function(e){for(var t=[],r=e[s.sY]("\n"),n=0;n<r[s.oI];n++){var o=r[n];r[n+1]&&(o+="@"+r[n+1],n++),t[s.y5](o)}return{src:e,obj:t}}(e[s.pM]);else if(e.reason&&e.reason[l])t=v(e.reason[l]);else if((0,o.KgX)(e))t=v(e);else{var r=e[p]||e[h]||"";(0,o.KgX)(e[d])&&(r&&(r+="\n"),r+=" from "+e[d]),r&&(t=v(r))}}catch(e){t=v(e)}return t||{src:"",obj:null}}function S(e){var t="";if(e&&!(t=e.typeName||e[s.RS]||""))try{var r=/function (.{1,200})\(/.exec(e.constructor[s.xE]());t=r&&r[s.oI]>1?r[1]:""}catch(e){}return t}function w(e){if(e)try{if(!(0,o.KgX)(e)){var t=S(e),r=f(e,!1);return r&&"{}"!==r||(e[c]&&(t=S(e=e[c])),r=f(e,!0)),0!==(0,o.HzD)(r,t)&&"String"!==t?t+":"+r:r}}catch(e){}return""+(e||"")}var E=function(){function e(e,t,r,n,i,c){this.aiDataContract={ver:1,exceptions:1,severityLevel:0,properties:0,measurements:0};var l=this;l.ver=2,function(e){try{if((0,o.Gvm)(e))return"ver"in e&&"exceptions"in e&&"properties"in e}catch(e){}return!1}(t)?(l[s.OK]=t[s.OK]||[],l[s.$y]=t[s.$y],l[s.XA]=t[s.XA],t[s.Ur]&&(l[s.Ur]=t[s.Ur]),t.id&&(l.id=t.id,t[s.$y].id=t.id),t[s.Fq]&&(l[s.Fq]=t[s.Fq]),(0,o.hXl)(t[s.r1])||(l[s.r1]=t[s.r1])):(r||(r={}),c&&(r.id=c),l[s.OK]=[new _(e,t,r)],l[s.$y]=(0,a.xP)(e,r),l[s.XA]=(0,a.Vj)(e,n),i&&(l[s.Ur]=i),c&&(l.id=c))}return e.CreateAutoException=function(e,t,r,n,o,i,a,c){var l,u=S(o||i||e);return(l={})[s.pM]=g(e,u),l.url=t,l.lineNumber=r,l.columnNumber=n,l.error=w(o||i||e),l.evt=w(i||e),l[s.qg]=u,l.stackDetails=y(a||o||i),l.errorSrc=c,l},e.CreateFromInterface=function(t,r,i,a){var c=r[s.OK]&&(0,o.W$7)(r[s.OK],function(e){return _[s.vu](t,e)});return new e(t,(0,n.Im)((0,n.Im)({},r),{exceptions:c}),i,a)},e.prototype.toInterface=function(){var e,t=this,r=t.exceptions,n=t.properties,i=t.measurements,a=t.severityLevel,c=t.problemGroup,l=t.id,u=t.isManual,d=r instanceof Array&&(0,o.W$7)(r,function(e){return e.toInterface()})||void 0;return(e={ver:"4.0"})[s.OK]=d,e.severityLevel=a,e.properties=n,e.measurements=i,e.problemGroup=c,e.id=l,e.isManual=u,e},e.CreateSimpleException=function(e,t,r,n,o,i){var a;return{exceptions:[(a={},a[s.lW]=!0,a.message=e,a.stack=o,a.typeName=t,a)]}},e.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",e.dataType="ExceptionData",e.formatError=w,e}(),_=function(){function e(e,t,r){this.aiDataContract={id:0,outerId:0,typeName:1,message:1,hasFullStack:0,stack:0,parsedStack:2};var n=this;if(function(e){try{if((0,o.Gvm)(e))return"hasFullStack"in e&&"typeName"in e}catch(e){}return!1}(t))n[s.qg]=t[s.qg],n[s.pM]=t[s.pM],n[l]=t[l],n[s.on]=t[s.on]||[],n[s.lW]=t[s.lW];else{var d=t,p=d&&d.evt;(0,o.bJ7)(d)||(d=d[c]||p||d),n[s.qg]=(0,a.Rr)(e,S(d))||i.R2,n[s.pM]=(0,a.Vk)(e,g(t||d,n[s.qg]))||i.R2;var h=t[u]||y(t);n[s.on]=function(e){var t,r=e.obj;if(r&&r[s.oI]>0){t=[];var n=0,i=0;if((0,o.Iuo)(r,function(e){var r=e[s.xE]();if(b.regex.test(r)){var o=new b(r,n++);i+=o[s.J$],t[s.y5](o)}}),i>32768)for(var a=0,c=t[s.oI]-1,l=0,u=a,d=c;a<c;){if((l+=t[a][s.J$]+t[c][s.J$])>32768){var p=d-u+1;t.splice(u,p);break}u=a,d=c,a++,c--}}return t}(h),(0,o.cyL)(n[s.on])&&(0,o.W$7)(n[s.on],function(t){t[s.QE]=(0,a.Rr)(e,t[s.QE]),t[s.IE]=(0,a.Rr)(e,t[s.IE])}),n[l]=(0,a.Vt)(e,function(e){var t="";return e&&(e.obj?(0,o.Iuo)(e.obj,function(e){t+=e+"\n"}):t=e.src||""),t}(h)),n.hasFullStack=(0,o.cyL)(n.parsedStack)&&n.parsedStack[s.oI]>0,r&&(r[s.qg]=r[s.qg]||n[s.qg])}}return e.prototype.toInterface=function(){var e,t=this,r=t[s.on]instanceof Array&&(0,o.W$7)(t[s.on],function(e){return e.toInterface()});return(e={id:t.id,outerId:t.outerId,typeName:t[s.qg],message:t[s.pM],hasFullStack:t[s.lW],stack:t[l]})[s.on]=r||void 0,e},e.CreateFromInterface=function(t,r){var i=r[s.on]instanceof Array&&(0,o.W$7)(r[s.on],function(e){return b[s.vu](e)})||r[s.on];return new e(t,(0,n.Im)((0,n.Im)({},r),{parsedStack:i}))},e}(),b=function(){function e(t,r){this.aiDataContract={level:1,method:1,assembly:0,fileName:0,line:0};var n=this;if(n[s.J$]=0,"string"==typeof t){var i=t;n[s.Av]=r,n[s.lx]="<no_method>",n[s.QE]=(0,o.EHq)(i),n[s.IE]="",n[s.h_]=0;var a=i.match(e.regex);a&&a[s.oI]>=5&&(n[s.lx]=(0,o.EHq)(a[2])||n[s.lx],n[s.IE]=(0,o.EHq)(a[4]),n[s.h_]=parseInt(a[5])||0)}else n[s.Av]=t[s.Av],n[s.lx]=t[s.lx],n[s.QE]=t[s.QE],n[s.IE]=t[s.IE],n[s.h_]=t[s.h_],n[s.J$]=0;n.sizeInBytes+=n.method[s.oI],n.sizeInBytes+=n.fileName[s.oI],n.sizeInBytes+=n.assembly[s.oI],n[s.J$]+=e.baseSize,n.sizeInBytes+=n.level.toString()[s.oI],n.sizeInBytes+=n.line.toString()[s.oI]}return e.CreateFromInterface=function(t){return new e(t,null)},e.prototype.toInterface=function(){var e=this;return{level:e[s.Av],method:e[s.lx],assembly:e[s.QE],fileName:e[s.IE],line:e[s.h_]}},e.regex=/^([\s]+at)?[\s]{0,50}([^\@\()]+?)[\s]{0,50}(\@|\()([^\(\n]+):([0-9]+):([0-9]+)(\)?)$/,e.baseSize=58,e}()},5014(e,t,r){"use strict";r.d(t,{J:()=>a});var n=r(5025),o=r(5130),i=function(){this.aiDataContract={name:1,kind:0,value:1,count:0,min:0,max:0,stdDev:0},this.kind=0},s=r(7975),a=function(){function e(e,t,r,a,c,l,u,d,p){this.aiDataContract={ver:1,metrics:1,properties:0};var h=this;h.ver=2;var f=new i;f[o.F2]=a>0?a:void 0,f.max=isNaN(l)||null===l?void 0:l,f.min=isNaN(c)||null===c?void 0:c,f[o.RS]=(0,s.Rr)(e,t)||n.R2,f.value=r,f.stdDev=isNaN(u)||null===u?void 0:u,h.metrics=[f],h[o.$y]=(0,s.xP)(e,d),h[o.XA]=(0,s.Vj)(e,p)}return e.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",e.dataType="MetricData",e}()},1448(e,t,r){"use strict";r.d(t,{h:()=>a});var n=r(5025),o=r(87),i=r(5130),s=r(7975),a=function(){function e(e,t,r,a,c,l,u){this.aiDataContract={ver:1,name:0,url:0,duration:0,properties:0,measurements:0,id:0};var d=this;d.ver=2,d.id=(0,s.HQ)(e,u),d.url=(0,s.pJ)(e,r),d[i.RS]=(0,s.Rr)(e,t)||n.R2,isNaN(a)||(d[i.qd]=(0,o.bb)(a)),d[i.$y]=(0,s.xP)(e,c),d[i.XA]=(0,s.Vj)(e,l)}return e.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",e.dataType="PageviewData",e}()},4164(e,t,r){"use strict";r.d(t,{H:()=>s});var n=r(5025),o=r(5130),i=r(7975),s=function(){function e(e,t,r,s,a,c,l){this.aiDataContract={ver:1,name:0,url:0,duration:0,perfTotal:0,networkConnect:0,sentRequest:0,receivedResponse:0,domProcessing:0,properties:0,measurements:0};var u=this;u.ver=2,u.url=(0,i.pJ)(e,r),u[o.RS]=(0,i.Rr)(e,t)||n.R2,u[o.$y]=(0,i.xP)(e,a),u[o.XA]=(0,i.Vj)(e,c),l&&(u.domProcessing=l.domProcessing,u[o.qd]=l[o.qd],u.networkConnect=l.networkConnect,u.perfTotal=l.perfTotal,u[o.fd]=l[o.fd],u.sentRequest=l.sentRequest)}return e.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",e.dataType="PageviewPerformanceData",e}()},1365(e,t,r){"use strict";r.d(t,{A:()=>a});var n=r(87),o=r(2318),i=r(5130),s=r(7975),a=function(){function e(e,t,r,a,c,l,u,d,p,h,f,g){void 0===p&&(p="Ajax"),this.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};var m=this;m.ver=2,m.id=t,m[i.qd]=(0,n.bb)(c),m.success=l,m.resultCode=u+"",m.type=(0,s.Rr)(e,p);var v=(0,o._U)(e,r,d,a);m.data=(0,s.pJ)(e,a)||v.data,m.target=(0,s.Rr)(e,v.target),h&&(m.target="".concat(m.target," | ").concat(h)),m[i.RS]=(0,s.Rr)(e,v[i.RS]),m[i.$y]=(0,s.xP)(e,f),m[i.XA]=(0,s.Vj)(e,g)}return e.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",e.dataType="RemoteDependencyData",e}()},2445(e,t,r){"use strict";r.d(t,{C:()=>s});var n=r(5025),o=r(5130),i=r(7975),s=function(){function e(e,t,r,s,a){this.aiDataContract={ver:1,message:1,severityLevel:0,properties:0};var c=this;c.ver=2,t=t||n.R2,c[o.pM]=(0,i.Vk)(e,t),c[o.$y]=(0,i.xP)(e,s),c[o.XA]=(0,i.Vj)(e,a),r&&(c[o.Ur]=r)}return e.envelopeType="Microsoft.ApplicationInsights.{0}.Message",e.dataType="MessageData",e}()},9354(e,t,r){"use strict";r.d(t,{Gz:()=>u,M0:()=>h,PS:()=>p,cM:()=>c,k6:()=>d,wX:()=>l});var n=r(269),o=r(5130),i=(0,n.YEm)()||{},s=0,a=[null,null,null,null,null];function c(e){var t=s,r=a,n=r[t];return i.createElement?r[t]||(n=r[t]=i.createElement("a")):n={host:p(e,!0)},n.href=e,++t>=r[o.oI]&&(t=0),s=t,n}function l(e){var t,r=c(e);return r&&(t=r.href),t}function u(e){var t,r=c(e);return r&&(t=r[o.Ue]),t}function d(e,t){return e?e.toUpperCase()+" "+t:t}function p(e,t){var r=h(e,t)||"";if(r){var i=r.match(/(www\d{0,5}\.)?([^\/:]{1,256})(:\d{1,20})?/i);if(null!=i&&i[o.oI]>3&&(0,n.KgX)(i[2])&&i[2][o.oI]>0)return i[2]+(i[3]||"")}return r}function h(e,t){var r=null;if(e){var i=e.match(/(\w{1,150}):\/\/([^\/:]{1,256})(:\d{1,20})?/i);if(null!=i&&i[o.oI]>2&&(0,n.KgX)(i[2])&&i[2][o.oI]>0&&(r=i[2]||"",t&&i[o.oI]>2)){var s=(i[1]||"")[o.OL](),a=i[3]||"";("http"===s&&":80"===a||"https"===s&&":443"===a)&&(a=""),r+=a}}return r}},2318(e,t,r){"use strict";r.d(t,{Ft:()=>E,Qu:()=>p,Rs:()=>g,Wt:()=>h,_U:()=>y,jj:()=>w,lt:()=>S,mD:()=>v,mp:()=>f,pg:()=>m});var n=r(269),o=r(1864),i=r(5025),s=r(2910),a=r(7975),c=r(9354),l=r(5130),u=[i._G+i.wc,"https://breeze.aimon.applicationinsights.io"+i.wc,"https://dc-int.services.visualstudio.com"+i.wc],d="cid-v1:";function p(e){return-1!==(0,n.rDm)(u,e[l.OL]())}function h(e){d=e}function f(){return d}function g(e,t,r){if(!t||e&&e.disableCorrelationHeaders)return!1;if(e&&e[l.Ol])for(var o=0;o<e.correlationHeaderExcludePatterns[l.oI];o++)if(e[l.Ol][o].test(t))return!1;var i=(0,c.cM)(t).host[l.OL]();if(!i||-1===(0,n.HzD)(i,":443")&&-1===(0,n.HzD)(i,":80")||(i=((0,c.M0)(t,!0)||"")[l.OL]()),(!e||!e.enableCorsCorrelation)&&i&&i!==r)return!1;var s,a=e&&e.correlationHeaderDomains;if(a&&((0,n.Iuo)(a,function(e){var t=new RegExp(e.toLowerCase().replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*"));s=s||t.test(i)}),!s))return!1;var u=e&&e.correlationHeaderExcludedDomains;if(!u||0===u[l.oI])return!0;for(o=0;o<u[l.oI];o++)if(new RegExp(u[o].toLowerCase().replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*")).test(i))return!1;return i&&i[l.oI]>0}function m(e){if(e){var t=v(e,s.a[1]);if(t&&t!==d)return t}}function v(e,t){if(e)for(var r=e[l.sY](","),n=0;n<r[l.oI];++n){var o=r[n][l.sY]("=");if(2===o[l.oI]&&o[0]===t)return o[1]}}function y(e,t,r,n){var o,i=n,s=n;if(t&&t[l.oI]>0){var u=(0,c.cM)(t);if(o=u.host,!i)if(null!=u[l.Ue]){var d=0===u.pathname[l.oI]?"/":u[l.Ue];"/"!==d.charAt(0)&&(d="/"+d),s=u[l.Ue],i=(0,a.Rr)(e,r?r+" "+d:d)}else i=(0,a.Rr)(e,t)}else o=n,i=n;return{target:o,name:i,data:s}}function S(){var e=(0,n.FJj)();if(e&&e.now&&e.timing){var t=e.now()+e.timing.navigationStart;if(t>0)return t}return(0,n.f0d)()}function w(e,t){var r=null;return 0===e||0===t||(0,n.hXl)(e)||(0,n.hXl)(t)||(r=t-e),r}function E(e,t){var r=e||{};return{getName:function(){return r[l.RS]},setName:function(e){t&&t.setName(e),r[l.RS]=e},getTraceId:function(){return r.traceID},setTraceId:function(e){t&&t.setTraceId(e),(0,o.hX)(e)&&(r.traceID=e)},getSpanId:function(){return r.parentID},setSpanId:function(e){t&&t.setSpanId(e),(0,o.wN)(e)&&(r.parentID=e)},getTraceFlags:function(){return r.traceFlags},setTraceFlags:function(e){t&&t.setTraceFlags(e),r.traceFlags=e}}}},5130(e,t,r){"use strict";r.d(t,{$e:()=>y,$y:()=>T,AZ:()=>l,Av:()=>M,C9:()=>v,Cx:()=>f,F2:()=>p,Fq:()=>R,IE:()=>k,J$:()=>I,Jj:()=>S,Jm:()=>h,OK:()=>b,OL:()=>i,Ol:()=>E,QE:()=>x,RS:()=>u,Ue:()=>w,Ur:()=>N,XA:()=>C,fd:()=>$,h_:()=>F,i9:()=>m,lW:()=>j,lx:()=>L,oI:()=>o,on:()=>P,pM:()=>d,qd:()=>U,qg:()=>O,r1:()=>A,sY:()=>n,up:()=>_,vu:()=>D,xE:()=>a,y5:()=>c,zV:()=>s,zw:()=>g});var n="split",o="length",i="toLowerCase",s="ingestionendpoint",a="toString",c="push",l="removeItem",u="name",d="message",p="count",h="preTriggerDate",f="disabled",g="interval",m="daysOfMonth",v="date",y="getUTCDate",S="stringify",w="pathname",E="correlationHeaderExcludePatterns",_="extensionConfig",b="exceptions",P="parsedStack",T="properties",C="measurements",I="sizeInBytes",O="typeName",N="severityLevel",R="problemGroup",A="isManual",D="CreateFromInterface",x="assembly",k="fileName",j="hasFullStack",M="level",L="method",F="line",U="duration",$="receivedResponse"},740(e,t,r){"use strict";r.r(t),r.d(t,{AnalyticsPluginIdentifier:()=>$,BreezeChannelIdentifier:()=>U,ConfigurationManager:()=>T,ConnectionStringParser:()=>p.F,ContextTagKeys:()=>C.o,CtxTagKeys:()=>R.O,DEFAULT_BREEZE_ENDPOINT:()=>f._G,DEFAULT_BREEZE_PATH:()=>f.wc,Data:()=>b.B,DisabledPropertyName:()=>f.xF,DistributedTracingModes:()=>A.uG,Envelope:()=>g.L,Event:()=>m.J,EventPersistence:()=>A.iD,Exception:()=>v.WJ,Extensions:()=>R.F,HttpMethod:()=>f.ym,Metric:()=>y.J,PageView:()=>S.h,PageViewPerformance:()=>_.H,ProcessLegacy:()=>f.jp,PropertiesPluginIdentifier:()=>F,RemoteDependencyData:()=>w.A,RequestHeaders:()=>h.a,SampleRate:()=>f.tU,SeverityLevel:()=>P.O,TelemetryItemCreator:()=>N,ThrottleMgr:()=>d,Trace:()=>E.C,correlationIdCanIncludeCorrelationHeader:()=>n.Rs,correlationIdGetCorrelationContext:()=>n.pg,correlationIdGetCorrelationContextValue:()=>n.mD,correlationIdGetPrefix:()=>n.mp,correlationIdSetPrefix:()=>n.Wt,createDistributedTraceContextFromTrace:()=>n.Ft,createDomEvent:()=>j,createOfflineListener:()=>L.G,createTelemetryItem:()=>O,createTraceParent:()=>k.wk,dataSanitizeException:()=>I.Vt,dataSanitizeId:()=>I.HQ,dataSanitizeInput:()=>I._T,dataSanitizeKey:()=>I.lq,dataSanitizeKeyAndAddUniqueness:()=>I.zx,dataSanitizeMeasurements:()=>I.Vj,dataSanitizeMessage:()=>I.Vk,dataSanitizeProperties:()=>I.xP,dataSanitizeString:()=>I.Rr,dataSanitizeUrl:()=>I.pJ,dateTimeUtilsDuration:()=>n.jj,dateTimeUtilsNow:()=>n.lt,dsPadNumber:()=>I.qW,findW3cTraceParent:()=>k.ef,formatTraceParent:()=>k.L0,getExtensionByName:()=>D.Y8,isBeaconApiSupported:()=>x.Uf,isCrossOriginError:()=>D.vv,isInternalApplicationInsightsEndpoint:()=>n.Qu,isSampledFlag:()=>k.N7,isValidSpanId:()=>k.wN,isValidTraceId:()=>k.hX,isValidTraceParent:()=>k.mJ,msToTimeSpan:()=>D.bb,parseConnectionString:()=>p.H,parseTraceParent:()=>k.ZI,strNotSpecified:()=>f.R2,stringToBoolOrDefault:()=>D.Dt,urlGetAbsoluteUrl:()=>M.wX,urlGetCompleteUrl:()=>M.k6,urlGetPathName:()=>M.Gz,urlParseFullHost:()=>M.M0,urlParseHost:()=>M.PS,urlParseUrl:()=>M.cM,utlCanUseLocalStorage:()=>l.BW,utlCanUseSessionStorage:()=>l.AN,utlDisableStorage:()=>l.Nu,utlEnableStorage:()=>l.iw,utlGetLocalStorage:()=>l.Se,utlGetSessionStorage:()=>l.vH,utlGetSessionStorageKeys:()=>l.T9,utlRemoveSessionStorage:()=>l.v7,utlRemoveStorage:()=>l.tm,utlSetLocalStorage:()=>l._M,utlSetSessionStorage:()=>l.Dt,utlSetStoragePrefix:()=>l.vh});var n=r(2318),o=r(269),i=r(3775),s=r(6054),a=r(9749),c=r(6535),l=r(4658),u=r(5130),d=function(e,t){var r,n,d,p,h,f,g,m=this,v=!1,y=!1;function S(e,t,o,i){if(v){var s=function(e){try{var t=w(e);return(0,c.Z1)(1e6)<=t.limit.samplingRate}catch(e){}return!1}(e);if(!s)return;var a=w(e),l=O(e),d=_(a,r,l),p=!1,f=0,g=N(e);try{d&&!g?(f=Math.min(a.limit.maxSendNumber,l[u.F2]+1),l[u.F2]=0,p=!0,h[e]=!0,l[u.Jm]=new Date):(h[e]=d,l[u.F2]+=1);var m=b(e);T(n,m,l);for(var y=0;y<f;y++)I(e,n,t,o)}catch(e){}return{isThrottled:p,throttleNum:f}}return i&&R(e)[u.y5]({msgID:e,message:t,severity:o}),null}function w(e){return d[e]||d[109]}function E(e,t){var r,n,i,s,a;try{var c=t||{},l={};l[u.Cx]=!!c[u.Cx];var p=c[u.zw]||{};y=(null==p?void 0:p.daysOfMonth)&&(null==p?void 0:p.daysOfMonth[u.oI])>0,l[u.zw]=(s=null===(i=(i=p)||{})||void 0===i?void 0:i.monthInterval,a=null==i?void 0:i.dayInterval,(0,o.hXl)(s)&&(0,o.hXl)(a)&&(i.monthInterval=3,y||(i[u.i9]=[28],y=!0)),i={monthInterval:null==i?void 0:i.monthInterval,dayInterval:null==i?void 0:i.dayInterval,daysOfMonth:null==i?void 0:i.daysOfMonth});var h={samplingRate:(null===(r=c.limit)||void 0===r?void 0:r.samplingRate)||100,maxSendNumber:(null===(n=c.limit)||void 0===n?void 0:n.maxSendNumber)||1};l.limit=h,d[e]=l}catch(e){}}function _(e,t,r){if(e&&!e[u.Cx]&&t&&(0,s.Gh)(r)){var n=P(),i=r[u.C9],a=e[u.zw],c=1;if(null==a?void 0:a.monthInterval){var l=12*(n.getUTCFullYear()-i.getUTCFullYear())+n.getUTCMonth()-i.getUTCMonth();c=C(a.monthInterval,0,l)}var d=1;if(y)d=(0,o.rDm)(a[u.i9],n[u.$e]());else if(null==a?void 0:a.dayInterval){var p=Math.floor((n.getTime()-i.getTime())/864e5);d=C(a.dayInterval,0,p)}return c>=0&&d>=0}return!1}function b(e,t){var r=(0,s.Gh)(t)?t:"";return e?"appInsightsThrottle"+r+"-"+e:null}function P(e){try{if(!e)return new Date;var t=new Date(e);if(!isNaN(t.getDate()))return t}catch(e){}return null}function T(e,t,r){try{return(0,l._M)(e,t,(0,o.EHq)(JSON[u.Jj](r)))}catch(e){}return!1}function C(e,t,r){return e<=0?1:r>=t&&(r-t)%e==0?Math.floor((r-t)/e)+1:-1}function I(e,t,r,n){(0,i.ZP)(t,n||1,e,r)}function O(e){try{var t=p[e];if(!t){var r=b(e,f);t=function(e,t,r){try{var n={date:P(),count:0};if(e){var o=JSON.parse(e);return{date:P(o[u.C9])||n[u.C9],count:o[u.F2]||n[u.F2],preTriggerDate:o.preTriggerDate?P(o[u.Jm]):void 0}}return T(t,r,n),n}catch(e){}return null}((0,l.Se)(n,r),n,r),p[e]=t}return p[e]}catch(e){}return null}function N(e){var t=h[e];if((0,o.hXl)(t)){t=!1;var r=O(e);r&&(t=function(e){try{if(e){var t=new Date;return e.getUTCFullYear()===t.getUTCFullYear()&&e.getUTCMonth()===t.getUTCMonth()&&e[u.$e]()===t[u.$e]()}}catch(e){}return!1}(r[u.Jm])),h[e]=t}return h[e]}function R(e){return g=g||{},(0,o.hXl)(g[e])&&(g[e]=[]),g[e]}n=(0,i.y0)(e),h={},p={},g={},d={},E(109),f=(0,s.Gh)(t)?t:"",e.addUnloadHook((0,a.a)(e.config,function(e){var t=e.cfg;r=(0,l.BW)();var n=t.throttleMgrCfg||{};(0,o.zav)(n,function(e,t){E(parseInt(e),t)})})),m._getDbgPlgTargets=function(){return[g]},m.getConfig=function(){return d},m.canThrottle=function(e){var t=O(e);return _(w(e),r,t)},m.isTriggered=function(e){return N(e)},m.isReady=function(){return v},m.flush=function(e){try{var t=R(e);if(t&&t[u.oI]>0){var r=t.slice(0);return g[e]=[],(0,o.Iuo)(r,function(e){S(e.msgID,e[u.pM],e.severity,!1)}),!0}}catch(e){}return!1},m.flushAll=function(){try{if(g){var e=!0;return(0,o.zav)(g,function(t){var r=m.flush(parseInt(t));e=e&&r}),e}}catch(e){}return!1},m.onReadyState=function(e,t){return void 0===t&&(t=!0),(v=!!(0,o.hXl)(e)||e)&&t?m.flushAll():null},m.sendMessage=function(e,t,r){return S(e,t,r,!0)}},p=r(4484),h=r(2910),f=r(5025),g=r(1062),m=r(3072),v=r(5397),y=r(5014),S=r(1448),w=r(1365),E=r(2445),_=r(4164),b=r(7358),P=r(9762),T=function(){function e(){}return e.getConfig=function(e,t,r,n){var i;return void 0===n&&(n=!1),i=r&&e[u.up]&&e[u.up][r]&&!(0,o.hXl)(e[u.up][r][t])?e[u.up][r][t]:e[t],(0,o.hXl)(i)?n:i},e}(),C=r(8596),I=r(7975);function O(e,t,r,n,i,a){var c;r=(0,I.Rr)(n,r)||f.R2,((0,o.hXl)(e)||(0,o.hXl)(t)||(0,o.hXl)(r))&&(0,o.$8)("Input doesn't contain all required fields");var l="";e[f.ks]&&(l=e[f.ks],delete e[f.ks]);var d=((c={})[u.RS]=r,c.time=(0,s._u)(new Date),c.iKey=l,c.ext=a||{},c.tags=[],c.data={},c.baseType=t,c.baseData=e,c);return(0,o.hXl)(i)||(0,o.zav)(i,function(e,t){d.data[e]=t}),d}var N=function(){function e(){}return e.create=O,e}(),R=r(1575),A=r(7374),D=r(87),x=r(7292),k=r(1864);function j(e){var t=null;if((0,o.Tnt)(Event))t=new Event(e);else{var r=(0,o.YEm)();r&&r.createEvent&&(t=r.createEvent("Event")).initEvent(e,!0,!0)}return t}var M=r(9354),L=r(7952),F="AppInsightsPropertiesPlugin",U="AppInsightsChannelPlugin",$="ApplicationInsightsAnalytics"},2475(e,t,r){"use strict";r.d(t,{DD:()=>c,Lx:()=>a,NU:()=>s});var n=r(269),o=r(6182);function i(e,t,r){return!e&&(0,n.hXl)(e)?t:(0,n.Lmq)(e)?e:"true"===(0,n.oJg)(e)[o.OL]()}function s(e){return{mrg:!0,v:e}}function a(e,t,r){return{fb:r,isVal:e,v:t}}function c(e,t){return{fb:t,set:i,v:!!e}}},991(e,t,r){"use strict";r.d(t,{q:()=>c});var n=r(269),o=r(6182);function i(e){return e&&(0,n.Gvm)(e)&&(e.isVal||e.fb||(0,n.KhI)(e,"v")||(0,n.KhI)(e,"mrg")||(0,n.KhI)(e,"ref")||e.set)}function s(e,t,r){var i,s=r.dfVal||n.O9V;if(t&&r.fb){var a=r.fb;(0,n.cyL)(a)||(a=[a]);for(var c=0;c<a[o.oI];c++){var l=a[c],u=t[l];if(s(u)?i=u:e&&(s(u=e.cfg[l])&&(i=u),e.set(e.cfg,(0,n.oJg)(l),u)),s(i))break}}return!s(i)&&s(r.v)&&(i=r.v),i}function a(e,t,r){var c,l=r;return r&&i(r)&&(l=s(e,t,r)),l&&(i(l)&&(l=a(e,t,l)),(0,n.cyL)(l)?(c=[])[o.oI]=l[o.oI]:(0,n.QdQ)(l)&&(c={}),c&&((0,n.zav)(l,function(r,n){n&&i(n)&&(n=a(e,t,n)),c[r]=n}),l=c)),l}function c(e,t,r,l){var u,d,p,h,f,g,m,v,y=l;i(y)?(u=y.isVal,d=y.set,g=y[o.XW],m=y[o.JQ],h=y.mrg,!(f=y.ref)&&(0,n.b07)(f)&&(f=!!h),p=s(e,t,y)):p=l,m&&e[o.JQ](t,r);var S=!0,w=t[r];!w&&(0,n.hXl)(w)||(v=w,S=!1,u&&v!==p&&!u(v)&&(v=p,S=!0),d&&(S=(v=d(v,p,t))===p)),S?v=p?a(e,t,p):p:((0,n.QdQ)(v)||(0,n.cyL)(p))&&h&&p&&((0,n.QdQ)(p)||(0,n.cyL)(p))&&(0,n.zav)(p,function(t,r){c(e,v,t,r)}),e.set(t,r,v),f&&e.ref(t,r),g&&e[o.XW](t,r)}},9749(e,t,r){"use strict";r.d(t,{e:()=>S,a:()=>w});var n,o=r(269),i=r(4276),s=r(4111),a=r(6182),c=r(991),l=r(9147),u=["push","pop","shift","unshift","splice"],d=function(e,t,r,n){e&&e[a.ih](3,108,"".concat(r," [").concat(t,"] failed - ")+(0,o.mmD)(n))};function p(e,t){var r=(0,o.kgX)(e,t);return r&&r.get}function h(e,t,r,n){if(t){var i=p(t,r);i&&i[e.prop]?t[r]=n:function(e,t,r,n){var i={n:r,h:[],trk:function(t){t&&t.fn&&(-1===(0,o.rDm)(i.h,t)&&i.h[a.y5](t),e.trk(t,i))},clr:function(e){var t=(0,o.rDm)(i.h,e);-1!==t&&i.h[a.Ic](t,1)}},c=!0,u=!1;function f(){c&&(u=u||(0,l.hF)(f,e,n),n&&!n[l.nM]&&u&&(n=g(e,n,r,"Converting")),c=!1);var t=e.act;return t&&i.trk(t),n}f[e.prop]={chng:function(){e.add(i)}},(0,o.vF1)(t,i.n,{g:f,s:function(m){if(n!==m){f[e.ro]&&!e.upd&&(0,l.If)("["+r+"] is read-only:"+(0,o.mmD)(t)),c&&(u=u||(0,l.hF)(f,e,n),c=!1);var v=u&&f[e.rf];if(u)if(v){(0,o.zav)(n,function(e){n[e]=m?m[e]:s.HP});try{(0,o.zav)(m,function(t,r){h(e,n,t,r)}),m=n}catch(t){d((e.hdlr||{})[a.Uw],r,"Assigning",t),u=!1}}else n&&n[l.nM]&&(0,o.zav)(n,function(t){var r=p(n,t);if(r){var o=r[e.prop];o&&o.chng()}});if(m!==n){var y=m&&(0,l.hF)(f,e,m);!v&&y&&(m=g(e,m,r,"Converting")),n=m,u=y}e.add(i)}}})}(e,t,r,n)}return t}function f(e,t,r,n){if(t){var o=p(t,r),i=o&&!!o[e.prop],s=n&&n[0],c=n&&n[1],u=n&&n[2];if(!i){if(u)try{(0,l.V9)(t)}catch(t){d((e.hdlr||{})[a.Uw],r,"Blocking",t)}try{h(e,t,r,t[r]),o=p(t,r)}catch(t){d((e.hdlr||{})[a.Uw],r,"State",t)}}s&&(o[e.rf]=s),c&&(o[e.ro]=c),u&&(o[e.blkVal]=!0)}return t}function g(e,t,r,n){try{(0,o.zav)(t,function(r,n){h(e,t,r,n)}),t[l.nM]||((0,o.UxO)(t,l.nM,{get:function(){return e[a.K0]}}),function(e,t,r){(0,o.cyL)(t)&&(0,o.Iuo)(u,function(n){var o=t[n];t[n]=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var s=o[a.y9](this,n);return g(e,t,r,"Patching"),s}})}(e,t,r))}catch(t){d((e.hdlr||{})[a.Uw],r,n,t)}return t}var m="[[ai_",v="]]";function y(e,t,r){var s,u=(0,l.QA)(t);if(u)return u;var p,y=(0,i.Z)("dyncfg",!0),S=t&&!1!==r?t:(0,l.Dy)(t),w=((s={uid:null,cfg:S})[a.Uw]=e,s[a.zs]=function(){p[a.zs]()},s.set=function(t,r,n){try{t=h(p,t,r,n)}catch(t){d(e,r,"Setting value",t)}return t[r]},s[a.h0]=function(e,t){return t&&(0,o.zav)(t,function(t,r){(0,c.q)(w,e,t,r)}),e},s[a.x6]=function(e){return function(e,t){var r={fn:t,rm:function(){r.fn=null,e=null,t=null}};return(0,o.vF1)(r,"toJSON",{v:function(){return"WatcherHandler"+(r.fn?"":"[X]")}}),e.use(r,t),r}(p,e)},s.ref=function(e,t){var r;return f(p,e,t,(r={},r[0]=!0,r))[t]},s[a.XW]=function(e,t){var r;return f(p,e,t,(r={},r[1]=!0,r))[t]},s[a.JQ]=function(e,t){var r;return f(p,e,t,(r={},r[2]=!0,r))[t]},s._block=function(e,t){p.use(null,function(r){var n=p.upd;try{(0,o.b07)(t)||(p.upd=t),e(r)}finally{p.upd=n}})},s);return(0,o.vF1)(w,"uid",{c:!1,e:!1,w:!1,v:y}),g(p=function(e){var t,r,i=(0,o.jjc)(m+"get"+e.uid+v),s=(0,o.jjc)(m+"ro"+e.uid+v),c=(0,o.jjc)(m+"rf"+e.uid+v),l=(0,o.jjc)(m+"blkVal"+e.uid+v),u=(0,o.jjc)(m+"dtl"+e.uid+v),d=null,p=null;function h(t,n){var i=r.act;try{r.act=t,t&&t[u]&&((0,o.Iuo)(t[u],function(e){e.clr(t)}),t[u]=[]),n({cfg:e.cfg,set:e.set.bind(e),setDf:e[a.h0].bind(e),ref:e.ref.bind(e),rdOnly:e[a.XW].bind(e)})}catch(t){var s=e[a.Uw];throw s&&s[a.ih](1,107,(0,o.mmD)(t)),t}finally{r.act=i||null}}function f(){if(d){var e=d;d=null,p&&p[a._w](),p=null;var t=[];if((0,o.Iuo)(e,function(e){if(e&&(e[u]&&((0,o.Iuo)(e[u],function(t){t.clr(e)}),e[u]=null),e.fn))try{h(e,e.fn)}catch(e){t[a.y5](e)}}),d)try{f()}catch(e){t[a.y5](e)}t[a.oI]>0&&function(e,t){n||(n=(0,o.aqQ)("AggregationError",function(e,t){t[a.oI]>1&&(e.errors=t[1])}));var r="Watcher error(s): ";throw(0,o.Iuo)(t,function(e,t){r+="\n".concat(t," > ").concat((0,o.mmD)(e))}),new n(r,t||[])}(0,t)}}return(t={prop:i,ro:s,rf:c})[a.JQ]=l,t[a.K0]=e,t.add=function(e){if(e&&e.h[a.oI]>0){d||(d=[]),p||(p=(0,o.dRz)(function(){p=null,f()},0));for(var t=0;t<e.h[a.oI];t++){var r=e.h[t];r&&-1===(0,o.rDm)(d,r)&&d[a.y5](r)}}},t[a.zs]=f,t.use=h,t.trk=function(e,t){if(e){var r=e[u]=e[u]||[];-1===(0,o.rDm)(r,t)&&r[a.y5](t)}},r=t}(w),S,"config","Creating"),w}function S(e,t,r,n){var o=y(r,e||{},n);return t&&o[a.h0](o.cfg,t),o}function w(e,t,r){var n=e[l.nM]||e;return!n.cfg||n.cfg!==e&&n.cfg[l.nM]!==n?(function(e,t){e?(e[a.on](t),e[a.ih](2,108,t)):(0,l.If)(t)}(r,s.xW+(0,o.mmD)(e)),S(e,null,r)[a.x6](t)):n[a.x6](t)}},9147(e,t,r){"use strict";r.d(t,{Dy:()=>c,Hf:()=>d,If:()=>h,QA:()=>l,V9:()=>u,hF:()=>p,nM:()=>i});var n=r(269),o=r(6182),i=(0,n.eCG)("[[ai_dynCfg_1]]"),s=(0,n.eCG)("[[ai_blkDynCfg_1]]"),a=(0,n.eCG)("[[ai_frcDynCfg_1]]");function c(e){var t;return e&&((0,n.cyL)(e)?(t=[])[o.oI]=e[o.oI]:(0,n.QdQ)(e)&&(t={}),t)?((0,n.zav)(e,function(e,r){t[e]=c(r)}),t):e}function l(e){if(e){var t=e[i]||e;if(t.cfg&&(t.cfg===e||t.cfg[i]===t))return t}return null}function u(e){if(e&&((0,n.QdQ)(e)||(0,n.cyL)(e)))try{e[s]=!0}catch(e){}return e}function d(e){if(e)try{e[a]=!0}catch(e){}return e}function p(e,t,r){var o=!1;return r&&!e[t.blkVal]&&((o=r[a])||r[s]||(o=(0,n.QdQ)(r)||(0,n.cyL)(r))),o}function h(e){(0,n.zkd)("InvalidAccess:"+e)}},4282(e,t,r){"use strict";r.d(t,{H:()=>o,o:()=>i});var n=r(269),o=n.WSA,i=n.fn0},3662(e,t,r){"use strict";r.d(t,{x:()=>o});var n=r(4282),o=(0,n.H)({Unknown:0,NonRetryableStatus:1,InvalidEvent:2,SizeLimitExceeded:3,KillSwitch:4,QueueFull:5});(0,n.H)({Unknown:0,NonRetryableStatus:1,CleanStorage:2,MaxInStorageTimeExceeded:3})},4875(e,t,r){"use strict";r.d(t,{f:()=>n});var n=(0,r(4282).H)({NONE:0,PENDING:3,INACTIVE:1,ACTIVE:2})},2774(e,t,r){"use strict";r.d(t,{_:()=>x});var n,o=r(4688),i=r(8279),s=r(8205),a=r(269),c=r(9749),l=r(4875),u=r(6182),d=r(4013),p=r(7847),h=r(5034),f=r(4276),g=r(7867),m=r(3775),v=r(6054),y=r(4111),S=r(1356),w=r(8156),E=r(2317),_=r(380),b=function(e){function t(){var r,n,o=e.call(this)||this;function s(){r=0,n=[]}return o.identifier="TelemetryInitializerPlugin",o.priority=199,s(),(0,i.A)(t,o,function(e,t){e.addTelemetryInitializer=function(e){return function(e,t,r){var n={id:t,fn:r};return(0,a.Yny)(e,n),{remove:function(){(0,a.Iuo)(e,function(t,r){if(t.id===n.id)return e[u.Ic](r,1),-1})}}}(n,r++,e)},e[y.qT]=function(t,r){(function(e,t,r){for(var n=!1,o=e[u.oI],i=0;i<o;++i){var s=e[i];if(s)try{if(!1===s.fn[u.y9](null,[t])){n=!0;break}}catch(e){(0,m.ZP)(r,2,64,"Telemetry initializer failed: "+(0,v.lL)(e),{exception:(0,a.mmD)(e)},!0)}}return!n})(n,t,r?r[u.e4]():e[u.e4]())&&e[u.$5](t,r)},e[u.tn]=function(){s()}}),o}return(0,o.qU)(t,e),t.__ieDyn=1,t}(r(638).s),P=r(836),T=r(8969),C="Plugins must provide initialize method",I="SDK is still unloading...",O=(0,a.ZHX)(((n={cookieCfg:{}})[y.jy]={rdOnly:!0,ref:!0,v:[]},n[y.LZ]={rdOnly:!0,ref:!0,v:[]},n[y.Bw]={ref:!0,v:{}},n[y.Yd]=y.HP,n.loggingLevelConsole=0,n.diagnosticLogInterval=y.HP,n));function N(e,t){return new w.NS(t)}function R(e,t){var r=!1;return(0,a.Iuo)(t,function(t){if(t===e)return r=!0,-1}),r}function A(e,t,r,n){r&&(0,a.zav)(r,function(r,o){n&&(0,a.QdQ)(o)&&(0,a.QdQ)(t[r])&&A(e,t[r],o,n),n&&(0,a.QdQ)(o)&&(0,a.QdQ)(t[r])?A(e,t[r],o,n):e.set(t,r,o)})}function D(e,t){var r=null,n=-1;return(0,a.Iuo)(e,function(e,o){if(e.w===t)return r=e,n=o,-1}),{i:n,l:r}}var x=function(){function e(){var t,r,n,x,k,j,M,L,F,U,$,B,V,H,q,z,W,G,K,X,J,Q,Y,Z,ee,te,re,ne,oe,ie,se,ae;(0,i.A)(e,this,function(e){function i(){oe=!0,(0,a.hXl)(J)?(te=l.f[u.Yq],(0,m.ZP)(n,1,112,"ikey can't be resolved from promises")):te=l.f.ACTIVE,ce()}function ce(){r&&(e.releaseQueue(),e[u.h4]())}function le(e){return ie&&ie[u.XM]||ae||(e||n&&n.queue[u.oI]>0)&&(se||(se=!0,_e(t[u.x6](function(e){var t=e.cfg.diagnosticLogInterval;t&&t>0||(t=1e4);var r=!1;ie&&(r=ie[u.XM],ie[u._w]()),(ie=(0,a.AHH)(ve,t)).unref(),ie[u.XM]=r}))),ie[u.XM]=!0),ie}function ue(){var e={};Z=[];var t=function(t){t&&(0,a.Iuo)(t,function(t){if(t[u.Ju]&&t[u.s]&&!e[t.identifier]){var r=t[u.Ju]+"="+t[u.s];Z[u.y5](r),e[t.identifier]=t}})};t(B),$&&(0,a.Iuo)($,function(e){t(e)}),t(U)}function de(){r=!1,(t=(0,c.e)({},O,e[u.Uw])).cfg[u.Bl]=1,(0,a.vF1)(e,"config",{g:function(){return t.cfg},s:function(t){e.updateCfg(t,!1)}}),(0,a.vF1)(e,"pluginVersionStringArr",{g:function(){return Z||ue(),Z}}),(0,a.vF1)(e,"pluginVersionString",{g:function(){return ee||(Z||ue(),ee=Z.join(";")),ee||y.m5}}),(0,a.vF1)(e,"logger",{g:function(){return n||(n=new m.wq(t.cfg),t[u.Uw]=n),n},s:function(e){t[u.Uw]=e,n!==e&&((0,d.K)(n,!1),n=e)}}),e[u.Uw]=new m.wq(t.cfg),Y=[];var o=e.config[y.jy]||[];o.splice(0,o[u.oI]),(0,a.Yny)(o,Y),H=new b,x=[],(0,d.K)(k,!1),k=null,j=null,M=null,(0,d.K)(L,!1),L=null,F=null,U=[],$=null,B=null,V=!1,q=null,z=(0,f.Z)("AIBaseCore",!0),W=(0,P.P)(),X=null,J=null,G=(0,T.w)(),Q=[],ee=null,Z=null,ae=!1,ie=null,se=!1,te=0,re=null,ne=null,oe=!1}function pe(){var r=(0,E.i8)(ge(),t.cfg,e);return r[u.by](le),r}function he(t){var r=function(e,t,r){var n,o=[],i=[],s={};return(0,a.Iuo)(r,function(r){((0,a.hXl)(r)||(0,a.hXl)(r[u.mE]))&&(0,a.$8)(C);var n=r[y.Vo],c=r[u.Ju];r&&n&&((0,a.hXl)(s[n])?s[n]=c:(0,m.OG)(e,"Two extensions have same priority #"+n+" - "+s[n]+", "+c)),!n||n<t?o[u.y5](r):i[u.y5](r)}),(n={})[y.eT]=o,n[y.LZ]=i,n}(e[u.Uw],p.i,U);F=null,ee=null,Z=null,B=($||[])[0]||[],B=(0,_.Xc)((0,a.Yny)(B,r[y.LZ]));var n=(0,a.Yny)((0,_.Xc)(r[y.eT]),B);Y=(0,a.N6t)(n);var o=e.config[y.jy]||[];o.splice(0,o[u.oI]),(0,a.Yny)(o,Y);var i=pe();B&&B[u.oI]>0&&(0,_.pI)(i[u.$o](B),n),(0,_.pI)(i,n),t&&Se(t)}function fe(e){var t=null,r=null,n=[];return(0,a.Iuo)(Y,function(t){if(t[u.Ju]===e&&t!==H)return r=t,-1;t.getChannel&&n[u.y5](t)}),!r&&n[u.oI]>0&&(0,a.Iuo)(n,function(t){if(!(r=t.getChannel(e)))return-1}),r&&(t={plugin:r,setEnabled:function(e){(0,_.Cr)(r)[y.Hr]=!e},isEnabled:function(){var e=(0,_.Cr)(r);return!e[u.Ik]&&!e[y.Hr]},remove:function(e,t){var n;void 0===e&&(e=!0);var o=[r],i=((n={reason:1})[u.tI]=e,n);me(o,i,function(e){e&&he({reason:32,removed:o}),t&&t(e)})}}),t}function ge(){if(!F){var r=(Y||[]).slice();-1===(0,a.rDm)(r,H)&&r[u.y5](H),F=(0,E.PV)((0,_.Xc)(r),t.cfg,e)}return F}function me(r,n,o){if(r&&r[u.oI]>0){var i=(0,E.PV)(r,t.cfg,e),s=(0,E.tS)(i,e);s[u.by](function(){var e=!1,t=[];(0,a.Iuo)(U,function(n,o){R(n,r)?e=!0:t[u.y5](n)}),U=t,ee=null,Z=null;var n=[];$&&((0,a.Iuo)($,function(t,o){var i=[];(0,a.Iuo)(t,function(t){R(t,r)?e=!0:i[u.y5](t)}),n[u.y5](i)}),$=n),o&&o(e),le()}),s[u.$5](n)}else o(!1)}function ve(){if(n&&n.queue){var t=n.queue.slice(0);n.queue[u.oI]=0,(0,a.Iuo)(t,function(t){var r,n=((r={})[u.RS]=q||"InternalMessageId: "+t[u.JR],r[u.FI]=J,r[u.fA]=(0,v._u)(new Date),r.baseType=m.WD.dataType,r.baseData={message:t[u.pM]},r);e.track(n)})}}function ye(e,t,r,n){var o=1,i=!1,s=null;function c(){o--,i&&0===o&&(s&&s[u._w](),s=null,t&&t(i),t=null)}return n=n||5e3,B&&B[u.oI]>0&&pe()[u.$o](B).iterate(function(t){if(t.flush){o++;var i=!1;t.flush(e,function(){i=!0,c()},r)||i||(e&&null==s?s=(0,a.dRz)(function(){s=null,c()},n):c())}}),i=!0,c(),!0}function Se(t){var r=(0,E.nU)(ge(),e);r[u.by](le),e._updateHook&&!0===e._updateHook(r,t)||r[u.$5](t)}function we(t){var r=e[u.Uw];r?((0,m.ZP)(r,2,73,t),le()):(0,a.$8)(t)}function Ee(t){var r=e[u.RF]();r&&r[y.Yp]([t],2)}function _e(e){G.add(e)}de(),e._getDbgPlgTargets=function(){return[Y,x]},e[u.tZ]=function(){return r},e.activeStatus=function(){return te},e._setPendingStatus=function(){te=3},e[u.mE]=function(d,p,h,f){var S;V&&(0,a.$8)(I),e[u.tZ]()&&(0,a.$8)("Core cannot be initialized more than once"),t=(0,c.e)(d,O,h||e[u.Uw],!1),d=t.cfg,_e(t[u.x6](function(e){var t=e.cfg;if(3!==te){ne=t.initInMemoMaxSize||100;var o=t[u.sl],c=t.endpointUrl;if((0,a.hXl)(o)){J=null,te=l.f[u.Yq];var p="Please provide instrumentation key";r?((0,m.ZP)(n,1,100,p),ce()):(0,a.$8)(p)}else{var h=[];if((0,a.$XS)(o)?(h[u.y5](o),J=null):J=o,(0,a.$XS)(c)?(h[u.y5](c),re=null):re=c,h[u.oI]){oe=!1,te=3;var f=(0,v.Gh)(t.initTimeOut)?t.initTimeOut:5e4,g=(0,s.Ov)(h);(0,a.dRz)(function(){oe||i()},f),(0,s.Dv)(g,function(e){try{if(oe)return;if(!e.rejected){var t=e[u.pF];if(t&&t[u.oI]){var r=t[0];if(J=r&&r[u.pF],t[u.oI]>1){var n=t[1];re=n&&n[u.pF]}}J&&(d[u.sl]=J,d.endpointUrl=re)}i()}catch(e){oe||i()}})}else i();var S=e.ref(e.cfg,y.Bw);(0,a.zav)(S,function(t){e.ref(S,t)})}}})),K=function(e,t,r,n){return t.add(e[u.x6](function(e){var t=e.cfg.disableDbgExt;!0===t&&n&&(r[u.h3](n),n=null),r&&!n&&!0!==t&&(n=(0,g.M)(e.cfg),r[u.vR](n))})),n}(t,G,(k=f)&&e[u.RF](),K),_e(t[u.x6](function(t){if(t.cfg.enablePerfMgr){var r=t.cfg[y.Yd];S!==r&&(r||(r=N),(0,v.c2)(t.cfg,y.Yd,r),S=r,M=null),j||M||!(0,a.Tnt)(r)||(M=r(e,e[u.RF]()))}else M=null,S=null})),e[u.Uw]=h;var w=d[y.jy];if((U=[])[u.y5].apply(U,(0,o.vz)((0,o.vz)([],p,!1),w,!1)),$=d[y.LZ],he(null),B&&0!==B[u.oI]||(0,a.$8)("No "+y.LZ+" available"),$&&$[u.oI]>1){var E=e[u.AP]("TeeChannelController");E&&E.plugin||(0,m.ZP)(n,1,28,"TeeChannel required")}!function(e,t,r){(0,a.Iuo)(t,function(t){var n=(0,c.a)(e,t.w,r);delete t.w,t.rm=function(){n.rm()}})}(d,Q,n),Q=null,r=!0,te===l.f.ACTIVE&&ce()},e.getChannels=function(){var e=[];return B&&(0,a.Iuo)(B,function(t){e[u.y5](t)}),(0,a.N6t)(e)},e.track=function(t){(0,w.r2)(e[y.kI](),function(){return"AppInsightsCore:track"},function(){null===t&&(Ee(t),(0,a.$8)("Invalid telemetry item")),!t[u.RS]&&(0,a.hXl)(t[u.RS])&&(Ee(t),(0,a.$8)("telemetry name required")),t[u.FI]=t[u.FI]||J,t[u.fA]=t[u.fA]||(0,v._u)(new Date),t.ver=t.ver||"4.0",!V&&e[u.tZ]()&&te===l.f.ACTIVE?pe()[u.$5](t):te!==l.f[u.Yq]&&x[u.oI]<=ne&&x[u.y5](t)},function(){return{item:t}},!t.sync)},e[u.DI]=pe,e[u.RF]=function(){return k||(k=new S.h(t.cfg),e._notificationManager=k),k},e[u.vR]=function(t){e.getNotifyMgr()[u.vR](t)},e[u.h3]=function(e){k&&k[u.h3](e)},e.getCookieMgr=function(){return L||(L=(0,h.xN)(t.cfg,e[u.Uw])),L},e.setCookieMgr=function(e){L!==e&&((0,d.K)(L,!1),L=e)},e[y.kI]=function(){return j||M||(0,w.Z4)()},e.setPerfMgr=function(e){j=e},e.eventCnt=function(){return x[u.oI]},e.releaseQueue=function(){if(r&&x[u.oI]>0){var e=x;x=[],2===te?(0,a.Iuo)(e,function(e){e[u.FI]=e[u.FI]||J,pe()[u.$5](e)}):(0,m.ZP)(n,2,20,"core init status is not active")}},e[u.h4]=function(e){return q=e||null,ae=!1,ie&&ie[u._w](),le(!0)},e[u.Di]=function(){ae=!0,ie&&ie[u._w](),ve()},(0,v.o$)(e,function(){return H},["addTelemetryInitializer"]),e[u.M5]=function(t,o,i){var c;void 0===t&&(t=!0),r||(0,a.$8)("SDK is not initialized"),V&&(0,a.$8)(I);var l,p=((c={reason:50})[u.tI]=t,c.flushComplete=!1,c);t&&!o&&(l=(0,s.Qo)(function(e){o=e}));var h=(0,E.tS)(ge(),e);function f(t){p.flushComplete=t,V=!0,W.run(h,p),e[u.Di](),h[u.$5](p)}return h[u.by](function(){G.run(e[u.Uw]),(0,d.k)([L,k,n],t,function(){de(),o&&o(p)})},e),ve(),ye(t,f,6,i)||f(!1),l},e[u.AP]=fe,e.addPlugin=function(e,t,r,n){if(!e)return n&&n(!1),void we(C);var o=fe(e[u.Ju]);if(o&&!t)return n&&n(!1),void we("Plugin ["+e[u.Ju]+"] is already loaded!");var i={reason:16};function s(t){U[u.y5](e),i.added=[e],he(i),n&&n(!0)}if(o){var a=[o.plugin];me(a,{reason:2,isAsync:!!r},function(e){e?(i.removed=a,i.reason|=32,s()):n&&n(!1)})}else s()},e.updateCfg=function(r,n){var o;if(void 0===n&&(n=!0),e[u.tZ]()){o={reason:1,cfg:t.cfg,oldCfg:(0,a.zwS)({},t.cfg),newConfig:(0,a.zwS)({},r),merge:n},r=o.newConfig;var i=t.cfg;r[y.jy]=i[y.jy],r[y.LZ]=i[y.LZ]}t._block(function(e){var t=e.cfg;A(e,t,r,n),n||(0,a.zav)(t,function(n){(0,a.KhI)(r,n)||e.set(t,n,y.HP)}),e[u.h0](t,O)},!0),t[u.zs](),o&&Se(o)},e.evtNamespace=function(){return z},e.flush=ye,e.getTraceCtx=function(e){return X||(X=(0,_.u7)()),X},e.setTraceCtx=function(e){X=e||null},e.addUnloadHook=_e,(0,v.RF)(e,"addUnloadCb",function(){return W},"add"),e.onCfgChange=function(n){var o,i,s,l;return r?o=(0,c.a)(t.cfg,n,e[u.Uw]):((l=D(i=Q,s=n).l)||(l={w:s,rm:function(){var e=D(i,s);-1!==e.i&&i[u.Ic](e.i,1)}},i[u.y5](l)),o=l),function(e){return(0,a.vF1)({rm:function(){e.rm()}},"toJSON",{v:function(){return"aicore::onCfgChange<"+JSON.stringify(e)+">"}})}(o)},e.getWParam=function(){return(0,a.Wtk)()||t.cfg.enableWParam?0:-1}})}return e.__ieDyn=1,e}()},4013(e,t,r){"use strict";r.d(t,{K:()=>s,k:()=>a});var n=r(8205),o=r(269),i=r(6182);function s(e,t){if(e&&e[i.M5])return e[i.M5](t)}function a(e,t,r){var i;return r||(i=(0,n.Qo)(function(e){r=e})),e&&(0,o.R3R)(e)>0?(0,n.Dv)(s(e[0],t),function(){a((0,o.KVm)(e,1),t,r)}):r(),i}},638(e,t,r){"use strict";r.d(t,{s:()=>m});var n,o=r(8279),i=r(269),s=r(9749),a=r(6182),c=r(3775),l=r(6054),u=r(4111),d=r(2317),p=r(836),h=r(8969),f="getPlugin",g=((n={})[u.Bw]={isVal:l.Gh,v:{}},n),m=function(){function e(){var t,r,n,m,v,y=this;function S(e){void 0===e&&(e=null);var t=e;if(!t){var o=r||(0,d.i8)(null,{},y[u.eT]);t=n&&n[f]?o[a.$o](null,n[f]):o[a.$o](null,n)}return t}function w(e,t,o){(0,s.e)(e,g,(0,c.y0)(t)),!o&&t&&(o=t[a.DI]()[a.uR]());var i=n;n&&n[f]&&(i=n[f]()),y[u.eT]=t,r=(0,d.i8)(o,e,t,i)}function E(){t=!1,y[u.eT]=null,r=null,n=null,v=(0,h.w)(),m=(0,p.P)()}E(),(0,o.A)(e,y,function(e){e[a.mE]=function(e,r,n,o){w(e,r,o),t=!0},e[a.Ik]=function(t,r){var o,i=e[u.eT];if(i&&(!t||i===t[u.eT]())){var s,c=!1,l=t||(0,d.tS)(null,i,n&&n[f]?n[f]():n),p=r||((o={reason:0})[a.tI]=!1,o);return e[a.tn]&&!0===e[a.tn](l,p,h)?s=!0:h(),s}function h(){c||(c=!0,m.run(l,r),v.run(l[a.e4]()),!0===s&&l[a.$5](p),E())}},e[a.HC]=function(t,r){var o=e[u.eT];if(o&&(!t||o===t[u.eT]())){var i,s=!1,c=t||(0,d.nU)(null,o,n&&n[f]?n[f]():n),l=r||{reason:0};return e._doUpdate&&!0===e._doUpdate(c,l,p)?i=!0:p(),i}function p(){s||(s=!0,w(c.getCfg(),c.core(),c[a.uR]()))}},(0,l.RF)(e,"_addUnloadCb",function(){return m},"add"),(0,l.RF)(e,"_addHook",function(){return v},"add"),(0,i.vF1)(e,"_unloadHooks",{g:function(){return v}})}),y[a.e4]=function(e){return S(e)[a.e4]()},y[a.tZ]=function(){return t},y.setInitialized=function(e){t=e},y[a.YH]=function(e){n=e},y[a.$5]=function(e,t){t?t[a.$5](e):n&&(0,i.Tnt)(n[u.qT])&&n[u.qT](e,null)},y._getTelCtx=S}return e.__ieDyn=1,e}()},7847(e,t,r){"use strict";r.d(t,{i:()=>n,x:()=>o});var n=500,o="Microsoft_ApplicationInsights_BypassAjaxInstrumentation"},5034(e,t,r){"use strict";r.d(t,{It:()=>U,gi:()=>x,um:()=>A,xN:()=>D});var n,o,i,s=r(269),a=r(2475),c=r(9749),l=r(6182),u=r(3775),d=r(7292),p=r(6054),h=r(4111),f="toGMTString",g="toUTCString",m="cookie",v="expires",y="isCookieUseDisabled",S="disableCookiesUsage",w="_ckMgr",E=null,_=null,b=null,P={},T={},C=((n={cookieCfg:(0,a.NU)((o={},o[h.Fk]={fb:"cookieDomain",dfVal:p.Gh},o.path={fb:"cookiePath",dfVal:p.Gh},o.enabled=h.HP,o.ignoreCookies=h.HP,o.blockedCookies=h.HP,o)),cookieDomain:h.HP,cookiePath:h.HP})[S]=h.HP,n);function I(){!i&&(i=(0,s.nRs)(function(){return(0,s.YEm)()}))}function O(e){return!e||e.isEnabled()}function N(e,t){return!!(t&&e&&(0,s.cyL)(e.ignoreCookies))&&-1!==(0,s.rDm)(e.ignoreCookies,t)}function R(e,t){var r=t[l.XM];if((0,s.hXl)(r)){var n=void 0;(0,s.b07)(e[y])||(n=!e[y]),(0,s.b07)(e[S])||(n=!e[S]),r=n}return r}function A(e,t){var r;if(e)r=e.getCookieMgr();else if(t){var n=t.cookieCfg;r=n&&n[w]?n[w]:D(t)}return r||(r=function(e,t){var r=D[w]||T[w];return r||(r=D[w]=D(e,t),T[w]=r),r}(t,(e||{})[l.Uw])),r}function D(e,t){var r,n,o,i,a,u,m,y,S;e=(0,c.e)(e||T,null,t).cfg,a=(0,c.a)(e,function(t){t[l.h0](t.cfg,C),n=t.ref(t.cfg,"cookieCfg"),o=n[h.QW]||"/",i=n[h.Fk],u=!1!==R(e,n),m=n.getCookie||L,y=n.setCookie||F,S=n.delCookie||F},t);var E=((r={isEnabled:function(){var r=!1!==R(e,n)&&u&&x(t),o=T[w];return r&&o&&E!==o&&(r=O(o)),r},setEnabled:function(e){u=!1!==e,n[l.XM]=e},set:function(e,t,r,a,c){var u=!1;if(O(E)&&!function(e,t){return!!(t&&e&&(0,s.cyL)(e.blockedCookies)&&-1!==(0,s.rDm)(e.blockedCookies,t))||N(e,t)}(n,e)){var m={},S=(0,s.EHq)(t||h.m5),w=(0,s.HzD)(S,";");if(-1!==w&&(S=(0,s.EHq)((0,s.ZWZ)(t,w)),m=k((0,s.P0f)(t,w+1))),(0,p.KY)(m,h.Fk,a||i,s.zzB,s.b07),!(0,s.hXl)(r)){var b=(0,d.lT)();if((0,s.b07)(m[v])){var P=(0,s.f0d)()+1e3*r;if(P>0){var T=new Date;T.setTime(P),(0,p.KY)(m,v,j(T,b?f:g)||j(T,b?f:g)||h.m5,s.zzB)}}b||(0,p.KY)(m,"max-age",h.m5+r,null,s.b07)}var C=(0,d.g$)();C&&"https:"===C[l.Qg]&&((0,p.KY)(m,"secure",null,null,s.b07),null===_&&(_=!U(((0,s.w3n)()||{})[l.tX])),_&&(0,p.KY)(m,"SameSite","None",null,s.b07)),(0,p.KY)(m,h.QW,c||o,null,s.b07),y(e,M(S,m)),u=!0}return u},get:function(e){var t=h.m5;return O(E)&&!N(n,e)&&(t=m(e)),t},del:function(e,t){var r=!1;return O(E)&&(r=E.purge(e,t)),r},purge:function(e,r){var n,o=!1;if(x(t)){var i=((n={})[h.QW]=r||"/",n[v]="Thu, 01 Jan 1970 00:00:01 GMT",n);(0,d.lT)()||(i["max-age"]="0"),S(e,M(h.m5,i)),o=!0}return o}})[l.M5]=function(e){a&&a.rm(),a=null},r);return E[w]=E,E}function x(e){if(null===E){E=!1,!i&&I();try{var t=i.v||{};E=void 0!==t[m]}catch(t){(0,u.ZP)(e,2,68,"Cannot access document.cookie - "+(0,p.lL)(t),{exception:(0,s.mmD)(t)})}}return E}function k(e){var t={};if(e&&e[l.oI]){var r=(0,s.EHq)(e)[l.sY](";");(0,s.Iuo)(r,function(e){if(e=(0,s.EHq)(e||h.m5)){var r=(0,s.HzD)(e,"=");-1===r?t[e]=null:t[(0,s.EHq)((0,s.ZWZ)(e,r))]=(0,s.EHq)((0,s.P0f)(e,r+1))}})}return t}function j(e,t){return(0,s.Tnt)(e[t])?e[t]():null}function M(e,t){var r=e||h.m5;return(0,s.zav)(t,function(e,t){r+="; "+e+((0,s.hXl)(t)?h.m5:"="+t)}),r}function L(e){var t=h.m5;if(!i&&I(),i.v){var r=i.v[m]||h.m5;b!==r&&(P=k(r),b=r),t=(0,s.EHq)(P[e]||h.m5)}return t}function F(e,t){!i&&I(),i.v&&(i.v[m]=e+"="+t)}function U(e){return!(!(0,s.KgX)(e)||!(0,p.Ju)(e,"CPU iPhone OS 12")&&!(0,p.Ju)(e,"iPad; CPU OS 12")&&!((0,p.Ju)(e,"Macintosh; Intel Mac OS X 10_14")&&(0,p.Ju)(e,"Version/")&&(0,p.Ju)(e,"Safari"))&&(!(0,p.Ju)(e,"Macintosh; Intel Mac OS X 10_14")||!(0,s.Cv9)(e,"AppleWebKit/605.1.15 (KHTML, like Gecko)"))&&!(0,p.Ju)(e,"Chrome/5")&&!(0,p.Ju)(e,"Chrome/6")&&(!(0,p.Ju)(e,"UnrealEngine")||(0,p.Ju)(e,"Chrome"))&&!(0,p.Ju)(e,"UCBrowser/12")&&!(0,p.Ju)(e,"UCBrowser/11"))}},9882(e,t,r){"use strict";r.d(t,{aq:()=>s,cL:()=>a});var n=r(269),o=r(4111),i=r(6535);function s(){var e=a();return(0,n.P0f)(e,0,8)+"-"+(0,n.P0f)(e,8,12)+"-"+(0,n.P0f)(e,12,16)+"-"+(0,n.P0f)(e,16,20)+"-"+(0,n.P0f)(e,20)}function a(){for(var e,t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],r=o.m5,s=0;s<4;s++)r+=t[15&(e=(0,i.VN)())]+t[e>>4&15]+t[e>>8&15]+t[e>>12&15]+t[e>>16&15]+t[e>>20&15]+t[e>>24&15]+t[e>>28&15];var a=t[8+(3&(0,i.VN)())|0];return(0,n.hKY)(r,0,8)+(0,n.hKY)(r,9,4)+"4"+(0,n.hKY)(r,13,3)+a+(0,n.hKY)(r,16,3)+(0,n.hKY)(r,19,12)}},4276(e,t,r){"use strict";r.d(t,{T:()=>h,Z:()=>p});var n=r(269),o=r(6182),i=r(6054),s=r(4111),a=r(6535),c="3.3.0",l="."+(0,a.Si)(6),u=0;function d(e){return 1===e[o.re]||9===e[o.re]||!+e[o.re]}function p(e,t){return void 0===t&&(t=!1),(0,i.cH)(e+u+++(t?"."+c:s.m5)+l)}function h(e){var t={id:p("_aiData-"+(e||s.m5)+"."+c),accept:function(e){return d(e)},get:function(e,r,o,s){var a=e[t.id];return a?a[(0,i.cH)(r)]:(s&&(a=function(e,t){var r=t[e.id];if(!r){r={};try{d(t)&&(0,n.vF1)(t,e.id,{e:!1,v:r})}catch(e){}}return r}(t,e),a[(0,i.cH)(r)]=o),o)},kill:function(e,t){if(e&&e[t])try{delete e[t]}catch(e){}}};return t}},7867(e,t,r){"use strict";r.d(t,{$:()=>u,M:()=>d});var n,o=r(269),i=r(6182),s=r(4111),a=[s.fc,s.Yp,s.dI,s.l0],c=null;function l(e,t){return function(){var r=arguments,n=u(t);if(n){var o=n.listener;o&&o[e]&&o[e][i.y9](o,r)}}}function u(e){var t,r=c;return r||!0===e.disableDbgExt||(r=c||((t=(0,o.zS2)("Microsoft"))&&(c=t.ApplicationInsights),c)),r?r.ChromeDbgExt:null}function d(e){if(!n){n={};for(var t=0;t<a[i.oI];t++)n[a[t]]=l(a[t],e)}return n}},3775(e,t,r){"use strict";r.d(t,{OG:()=>E,Oc:()=>_,WD:()=>m,ZP:()=>w,wq:()=>y,y0:()=>v});var n,o=r(8279),i=r(269),s=r(9749),a=r(6182),c=r(7867),l=r(7292),u=r(4111),d="warnToConsole",p={loggingLevelConsole:0,loggingLevelTelemetry:1,maxMessageLimit:25,enableDebug:!1},h=((n={})[0]=null,n[1]="errorToConsole",n[2]=d,n[3]="debugToConsole",n);function f(e){return e?'"'+e[a.W7](/\"/g,u.m5)+'"':u.m5}function g(e,t){var r=(0,l.U5)();if(r){var n="log";r[e]&&(n=e),(0,i.Tnt)(r[n])&&r[n](t)}}var m=function(){function e(e,t,r,n){void 0===r&&(r=!1);var o=this;o[a.JR]=e,o[a.pM]=(r?"AI: ":"AI (Internal): ")+e;var i=u.m5;(0,l.Z)()&&(i=(0,l.hm)().stringify(n));var s=(t?" message:"+f(t):u.m5)+(n?" props:"+f(i):u.m5);o[a.pM]+=s}return e.dataType="MessageData",e}();function v(e,t){return(e||{})[a.Uw]||new y(t)}var y=function(){function e(t){this.identifier="DiagnosticLogger",this.queue=[];var r,n,l,u,f,v=0,y={};(0,o.A)(e,this,function(e){function o(t,r){if(!(v>=l)){var o=!0,i="AITR_"+r[a.JR];if(y[i]?o=!1:y[i]=!0,o&&(t<=n&&(e.queue[a.y5](r),v++,S(1===t?"error":"warn",r)),v===l)){var s="Internal events throttle limit per PageView reached for this app.",c=new m(23,s,!1);e.queue[a.y5](c),1===t?e.errorToConsole(s):e[a.on](s)}}}function S(e,r){var n=(0,c.$)(t||{});n&&n[a.e4]&&n[a.e4](e,r)}f=function(t){return(0,s.a)((0,s.e)(t,p,e).cfg,function(e){var t=e.cfg;r=t[a.Bl],n=t.loggingLevelTelemetry,l=t.maxMessageLimit,u=t.enableDebug})}(t||{}),e.consoleLoggingLevel=function(){return r},e[a.ih]=function(t,n,s,c,l){void 0===l&&(l=!1);var p=new m(n,s,l,c);if(u)throw(0,i.mmD)(p);var f=h[t]||d;if((0,i.b07)(p[a.pM]))S("throw"+(1===t?"Critical":"Warning"),p);else{if(l){var g=+p[a.JR];!y[g]&&r>=t&&(e[f](p[a.pM]),y[g]=!0)}else r>=t&&e[f](p[a.pM]);o(t,p)}},e.debugToConsole=function(e){g("debug",e),S("warning",e)},e[a.on]=function(e){g("warn",e),S("warning",e)},e.errorToConsole=function(e){g("error",e),S("error",e)},e.resetInternalMessageCount=function(){v=0,y={}},e[a.sx]=o,e[a.M5]=function(e){f&&f.rm(),f=null}})}return e.__ieDyn=1,e}();function S(e){return e||new y}function w(e,t,r,n,o,i){void 0===i&&(i=!1),S(e)[a.ih](t,r,n,o,i)}function E(e,t){S(e)[a.on](t)}function _(e,t,r){S(e)[a.sx](t,r)}},7292(e,t,r){"use strict";r.d(t,{$Z:()=>x,Iu:()=>k,L0:()=>I,MY:()=>b,PV:()=>R,R7:()=>N,U5:()=>w,Uf:()=>O,Z:()=>E,cU:()=>y,g$:()=>S,hm:()=>_,iN:()=>P,lT:()=>C,lV:()=>T,xk:()=>A});var n=r(5664),o=r(269),i=r(6182),s=r(6054),a=r(4111),c="JSON",l="msie",u="trident/",d="XMLHttpRequest",p=null,h=null,f=!1,g=null,m=null;function v(e,t){var r=!1;if(e){try{if(!(r=t in e)){var i=e[n.vR];i&&(r=t in i)}}catch(e){}if(!r)try{var s=new e;r=!(0,o.b07)(s[t])}catch(e){}}return r}function y(e){f=e}function S(e){if(e&&f){var t=(0,o.zS2)("__mockLocation");if(t)return t}return typeof location===n._1&&location?location:(0,o.zS2)("location")}function w(){return typeof console!==n.bA?console:(0,o.zS2)("console")}function E(){return Boolean(typeof JSON===n._1&&JSON||null!==(0,o.zS2)(c))}function _(){return E()?JSON||(0,o.zS2)(c):null}function b(){return(0,o.zS2)("crypto")}function P(){return(0,o.zS2)("msCrypto")}function T(){var e=(0,o.w3n)();return!(!e||!e.product)&&"ReactNative"===e.product}function C(){var e=(0,o.w3n)();if(e&&(e[i.tX]!==h||null===p)){var t=((h=e[i.tX])||a.m5)[i.OL]();p=(0,s.Ju)(t,l)||(0,s.Ju)(t,u)}return p}function I(e){if(void 0===e&&(e=null),!e){var t=(0,o.w3n)()||{};e=t?(t.userAgent||a.m5)[i.OL]():a.m5}var r=(e||a.m5)[i.OL]();if((0,s.Ju)(r,l)){var n=(0,o.YEm)()||{};return Math.max(parseInt(r[i.sY](l)[1]),n.documentMode||0)}if((0,s.Ju)(r,u)){var c=parseInt(r[i.sY](u)[1]);if(c)return c+4}return null}function O(e){return null!==m&&!1!==e||(m=(0,o.w9M)()&&Boolean((0,o.w3n)().sendBeacon)),m}function N(e){var t=!1;try{t=!!(0,o.zS2)("fetch");var r=(0,o.zS2)("Request");t&&e&&r&&(t=v(r,"keepalive"))}catch(e){}return t}function R(){return null===g&&(g=typeof XDomainRequest!==n.bA)&&A()&&(g=g&&!v((0,o.zS2)(d),"withCredentials")),g}function A(){var e=!1;try{e=!!(0,o.zS2)(d)}catch(e){}return e}function D(e,t){if(e)for(var r=0;r<e[i.oI];r++){var n=e[r];if(n[i.RS]&&n[i.RS]===t)return n}return{}}function x(e){var t=(0,o.YEm)();return t&&e?D(t.querySelectorAll("meta"),e).content:null}function k(e){var t,r=(0,o.FJj)();if(r){var n=r.getEntriesByType("navigation")||[];t=D((n[i.oI]>0?n[0]:{}).serverTiming,e).description}return t}},6149(e,t,r){"use strict";r.d(t,{Ds:()=>B,El:()=>C,Fc:()=>V,Hm:()=>R,ML:()=>D,Q3:()=>x,So:()=>j,Wg:()=>U,Ym:()=>k,ee:()=>$,lQ:()=>F,mB:()=>A,oS:()=>q,sq:()=>H,vF:()=>z,zh:()=>M});var n=r(269),o=r(6182),i=r(4276),s=r(4111),a="attachEvent",c="addEventListener",l="detachEvent",u="removeEventListener",d="events",p="visibilitychange",h="pagehide",f="pageshow",g="unload",m="beforeunload",v=(0,i.Z)("aiEvtPageHide"),y=(0,i.Z)("aiEvtPageShow"),S=/\.[\.]+/g,w=/[\.]+$/,E=1,_=(0,i.T)("events"),b=/^([^.]*)(?:\.(.+)|)/;function P(e){return e&&e[o.W7]?e[o.W7](/^[\s\.]+|(?=[\s\.])[\.\s]+$/g,s.m5):e}function T(e,t){var r;if(t){var i=s.m5;(0,n.cyL)(t)?(i=s.m5,(0,n.Iuo)(t,function(e){(e=P(e))&&("."!==e[0]&&(e="."+e),i+=e)})):i=P(t),i&&("."!==i[0]&&(i="."+i),e=(e||s.m5)+i)}var a=b.exec(e||s.m5)||[];return(r={})[o.QM]=a[1],r.ns=(a[2]||s.m5).replace(S,".").replace(w,s.m5)[o.sY](".").sort().join("."),r}function C(e,t,r){var i=[],a=_.get(e,d,{},!1),c=T(t,r);return(0,n.zav)(a,function(e,t){(0,n.Iuo)(t,function(e){var t;c[o.QM]&&c[o.QM]!==e.evtName[o.QM]||c.ns&&c.ns!=c.ns||i[o.y5](((t={})[o.RS]=e.evtName[o.QM]+(e.evtName.ns?"."+e.evtName.ns:s.m5),t.handler=e[o.Yo],t))})}),i}function I(e,t,r){void 0===r&&(r=!0);var n=_.get(e,d,{},r),o=n[t];return o||(o=n[t]=[]),o}function O(e,t,r,n){e&&t&&t[o.QM]&&(e[u]?e[u](t[o.QM],r,n):e[l]&&e[l]("on"+t[o.QM],r))}function N(e,t,r,n){for(var i=t[o.oI];i--;){var s=t[i];s&&(r.ns&&r.ns!==s.evtName.ns||n&&!n(s)||(O(e,s.evtName,s[o.Yo],s.capture),t[o.Ic](i,1)))}}function R(e,t){return t?T("xx",(0,n.cyL)(t)?[e].concat(t):[e,t]).ns[o.sY]("."):e}function A(e,t,r,n,i){var s;void 0===i&&(i=!1);var l=!1;if(e)try{var u=T(t,n);if(l=function(e,t,r,n){var i=!1;return e&&t&&t[o.QM]&&r&&(e[c]?(e[c](t[o.QM],r,n),i=!0):e[a]&&(e[a]("on"+t[o.QM],r),i=!0)),i}(e,u,r,i),l&&_.accept(e)){var d=((s={guid:E++,evtName:u})[o.Yo]=r,s.capture=i,s);I(e,u.type)[o.y5](d)}}catch(e){}return l}function D(e,t,r,i,s){if(void 0===s&&(s=!1),e)try{var a=T(t,i),c=!1;!function(e,t,r){if(t[o.QM])N(e,I(e,t[o.QM]),t,r);else{var i=_.get(e,d,{});(0,n.zav)(i,function(n,o){N(e,o,t,r)}),0===(0,n.cGk)(i)[o.oI]&&_.kill(e,d)}}(e,a,function(e){return!((!a.ns||r)&&e[o.Yo]!==r||(c=!0,0))}),c||O(e,a,r,s)}catch(e){}}function x(e,t,r,n){return void 0===n&&(n=!1),A(e,t,r,null,n)}function k(e,t,r,n){void 0===n&&(n=!1),D(e,t,r,null,n)}function j(e,t,r){var o=!1,i=(0,n.zkX)();i&&(o=A(i,e,t,r),o=A(i.body,e,t,r)||o);var s=(0,n.YEm)();return s&&(o=A(s,e,t,r)||o),o}function M(e,t,r){var o=(0,n.zkX)();o&&(D(o,e,t,r),D(o.body,e,t,r));var i=(0,n.YEm)();i&&D(i,e,t,r)}function L(e,t,r,i){var s=!1;return t&&e&&e[o.oI]>0&&(0,n.Iuo)(e,function(e){e&&(r&&-1!==(0,n.rDm)(r,e)||(s=j(e,t,i)||s))}),s}function F(e,t,r,i){var s=!1;return t&&e&&(0,n.cyL)(e)&&!(s=L(e,t,r,i))&&r&&r[o.oI]>0&&(s=L(e,t,null,i)),s}function U(e,t,r){e&&(0,n.cyL)(e)&&(0,n.Iuo)(e,function(e){e&&M(e,t,r)})}function $(e,t,r){return F([m,g,h],e,t,r)}function B(e,t){U([m,g,h],e,t)}function V(e,t,r){var o=R(v,r),i=L([h],e,t,o);return t&&-1!==(0,n.rDm)(t,p)||(i=L([p],function(t){var r=(0,n.YEm)();e&&r&&"hidden"===r.visibilityState&&e(t)},t,o)||i),!i&&t&&(i=V(e,null,r)),i}function H(e,t){var r=R(v,t);U([h],e,r),U([p],null,r)}function q(e,t,r){var o=R(y,r),i=L([f],e,t,o);return!(i=L([p],function(t){var r=(0,n.YEm)();e&&r&&"visible"===r.visibilityState&&e(t)},t,o)||i)&&t&&(i=q(e,null,r)),i}function z(e,t){var r=R(y,t);U([f],e,r),U([p],null,r)}},6054(e,t,r){"use strict";r.d(t,{CP:()=>P,Gh:()=>d,H$:()=>R,HU:()=>C,IL:()=>A,Ju:()=>h,KY:()=>m,LU:()=>D,Lo:()=>T,RF:()=>w,SZ:()=>_,_u:()=>f,c2:()=>v,cH:()=>p,hW:()=>b,jL:()=>O,lL:()=>g,o$:()=>E,qz:()=>S,r4:()=>I,w3:()=>x});var n=r(5664),o=r(9350),i=r(269),s=r(6182),a=r(4111),c=/-([a-z])/g,l=/([^\w\d_$])/g,u=/^(\d+[\w\d_$])/;function d(e){return!(0,i.hXl)(e)}function p(e){var t=e;return t&&(0,i.KgX)(t)&&(t=(t=(t=t[s.W7](c,function(e,t){return t.toUpperCase()}))[s.W7](l,"_"))[s.W7](u,function(e,t){return"_"+t})),t}function h(e,t){return!(!e||!t)&&-1!==(0,i.HzD)(e,t)}function f(e){return e&&e.toISOString()||""}function g(e){return(0,i.bJ7)(e)?e[s.RS]:a.m5}function m(e,t,r,n,o){var i=r;return e&&((i=e[t])===r||o&&!o(i)||n&&!n(r)||(i=r,e[t]=i)),i}function v(e,t,r){var n;return e?!(n=e[t])&&(0,i.hXl)(n)&&(n=(0,i.b07)(r)?{}:r,e[t]=n):n=(0,i.b07)(r)?{}:r,n}function y(e,t){var r=null,n=null;return(0,i.Tnt)(e)?r=e:n=e,function(){var e=arguments;if(r&&(n=r()),n)return n[t][s.y9](n,e)}}function S(e,t,r){if(e&&t&&(0,i.Gvm)(e)&&(0,i.Gvm)(t)){var n=function(n){if((0,i.KgX)(n)){var o=t[n];(0,i.Tnt)(o)?r&&!r(n,!0,t,e)||(e[n]=y(t,n)):r&&!r(n,!1,t,e)||((0,i.KhI)(e,n)&&delete e[n],(0,i.vF1)(e,n,{g:function(){return t[n]},s:function(e){t[n]=e}}))}};for(var o in t)n(o)}return e}function w(e,t,r,n,o){e&&t&&r&&(!1!==o||(0,i.b07)(e[t]))&&(e[t]=y(r,n))}function E(e,t,r,n){return e&&t&&(0,i.Gvm)(e)&&(0,i.cyL)(r)&&(0,i.Iuo)(r,function(r){(0,i.KgX)(r)&&w(e,r,t,r,n)}),e}function _(e){return function(){var t=this;e&&(0,i.zav)(e,function(e,r){t[e]=r})}}function b(e){return e&&o.vE&&(e=(0,n.s6)((0,o.vE)({},e))),e}function P(e,t,r,n,o,a){var c=arguments,l=c[0]||{},u=c[s.oI],d=!1,p=1;for(u>0&&(0,i.Lmq)(l)&&(d=l,l=c[p]||{},p++),(0,i.Gvm)(l)||(l={});p<u;p++){var h=c[p],f=(0,i.cyL)(h),g=(0,i.Gvm)(h);for(var m in h)if(f&&m in h||g&&(0,i.KhI)(h,m)){var v=h[m],y=void 0;if(d&&v&&((y=(0,i.cyL)(v))||(0,i.QdQ)(v))){var S=l[m];y?(0,i.cyL)(S)||(S=[]):(0,i.QdQ)(S)||(S={}),v=P(d,S,v)}void 0!==v&&(l[m]=v)}}return l}function T(e){try{return e.responseText}catch(e){}return null}function C(e,t){return e?"XDomainRequest,Response:"+T(e)||0:t}function I(e,t){return e?"XMLHttpRequest,Status:"+e[s.cV]+",Response:"+T(e)||0:t}function O(e,t){return t&&((0,i.EtT)(t)?e=[t].concat(e):(0,i.cyL)(t)&&(e=t.concat(e))),e}Object.getPrototypeOf;var N="withCredentials";function R(e,t,r,n,o,i){function s(e,t,r){try{e[t]=r}catch(e){}}void 0===n&&(n=!1),void 0===o&&(o=!1);var a=new XMLHttpRequest;return n&&s(a,"Microsoft_ApplicationInsights_BypassAjaxInstrumentation",n),r&&s(a,N,r),a.open(e,t,!o),r&&s(a,N,r),!o&&i&&s(a,"timeout",i),a}function A(e){var t={};if((0,i.KgX)(e)){var r=(0,i.EHq)(e)[s.sY](/[\r\n]+/);(0,i.Iuo)(r,function(e){if(e){var r=e.indexOf(": ");if(-1!==r){var n=(0,i.EHq)(e.substring(0,r))[s.OL](),o=(0,i.EHq)(e.substring(r+1));t[n]=o}else t[(0,i.EHq)(e)]=1}})}return t}function D(e,t,r){if(!e[r]&&t&&t[s.Az]){var n=t[s.Az](r);n&&(e[r]=(0,i.EHq)(n))}return e}function x(e,t){var r={};return e[s.wJ]?r=A(e[s.wJ]()):t&&(r=D(r,e,"time-delta-millis"),r=D(r,e,"kill-duration"),r=D(r,e,"kill-duration-seconds")),r}},4111(e,t,r){"use strict";r.d(t,{Bw:()=>l,Ev:()=>S,Fk:()=>E,HP:()=>n,Hr:()=>c,LZ:()=>i,QW:()=>_,Vj:()=>y,Vo:()=>p,Yd:()=>a,Yp:()=>f,dI:()=>g,eT:()=>s,fc:()=>h,jy:()=>u,kI:()=>w,l0:()=>m,m5:()=>o,qT:()=>d,s4:()=>v,xW:()=>b});var n=void 0,o="",i="channels",s="core",a="createPerfMgr",c="disabled",l="extensionConfig",u="extensions",d="processTelemetry",p="priority",h="eventsSent",f="eventsDiscarded",g="eventsSendRequest",m="perfEvent",v="offlineEventsStored",y="offlineBatchSent",S="offlineBatchDrop",w="getPerfMgr",E="domain",_="path",b="Not dynamic - "},1356(e,t,r){"use strict";r.d(t,{h:()=>p});var n=r(8279),o=r(8205),i=r(269),s=r(9749),a=r(6182),c=r(4111),l={perfEvtsSendAll:!1};function u(e){e.h=null;var t=e.cb;e.cb=[],(0,i.Iuo)(t,function(e){(0,i.gBW)(e.fn,[e.arg])})}function d(e,t,r,n){(0,i.Iuo)(e,function(e){e&&e[t]&&(r?(r.cb[a.y5]({fn:n,arg:e}),r.h=r.h||(0,i.dRz)(u,0,r)):(0,i.gBW)(n,[e]))})}var p=function(){function e(t){var r,u;this.listeners=[];var p=[],h={h:null,cb:[]},f=(0,s.e)(t,l);u=f[a.x6](function(e){r=!!e.cfg.perfEvtsSendAll}),(0,n.A)(e,this,function(e){(0,i.vF1)(e,"listeners",{g:function(){return p}}),e[a.vR]=function(e){p[a.y5](e)},e[a.h3]=function(e){for(var t=(0,i.rDm)(p,e);t>-1;)p[a.Ic](t,1),t=(0,i.rDm)(p,e)},e[c.fc]=function(e){d(p,c.fc,h,function(t){t[c.fc](e)})},e[c.Yp]=function(e,t){d(p,c.Yp,h,function(r){r[c.Yp](e,t)})},e[c.dI]=function(e,t){d(p,c.dI,t?h:null,function(r){r[c.dI](e,t)})},e[c.l0]=function(e){e&&(!r&&e[a.Zu]()||d(p,c.l0,null,function(t){e[a.tI]?(0,i.dRz)(function(){return t[c.l0](e)},0):t[c.l0](e)}))},e[c.s4]=function(e){e&&e[a.oI]&&d(p,c.s4,h,function(t){t[c.s4](e)})},e[c.Vj]=function(e){e&&e[a.Cd]&&d(p,c.Vj,h,function(t){t[c.Vj](e)})},e[c.Ev]=function(e,t){if(e>0){var r=t||0;d(p,c.Ev,h,function(t){t[c.Ev](e,r)})}},e[a.M5]=function(e){var t,r=function(){u&&u.rm(),u=null,p=[],h.h&&h.h[a._w](),h.h=null,h.cb=[]};if(d(p,"unload",null,function(r){var n=r[a.M5](e);n&&(t||(t=[]),t[a.y5](n))}),t)return(0,o.Qo)(function(e){return(0,o.Dv)((0,o.Xf)(t),function(){r(),e()})});r()}})}return e.__ieDyn=1,e}()},8156(e,t,r){"use strict";r.d(t,{NS:()=>d,Q6:()=>u,Z4:()=>f,r2:()=>h});var n=r(8279),o=r(269),i=r(6182),s=r(4111),a="ctx",c="ParentContextKey",l="ChildrenContextKey",u=function(){function e(t,r,n){var s,u=this;u.start=(0,o.f0d)(),u[i.RS]=t,u[i.tI]=n,u[i.Zu]=function(){return!1},(0,o.Tnt)(r)&&(0,o.vF1)(u,"payload",{g:function(){return!s&&(0,o.Tnt)(r)&&(s=r(),r=null),s}}),u[i.O_]=function(t){return t?t===e[c]||t===e[l]?u[t]:(u[a]||{})[t]:null},u[i.e_]=function(t,r){t&&(t===e[c]?(u[t]||(u[i.Zu]=function(){return!0}),u[t]=r):t===e[l]?u[t]=r:(u[a]=u[a]||{})[t]=r)},u[i.Ru]=function(){var t=0,r=u[i.O_](e[l]);if((0,o.cyL)(r))for(var n=0;n<r[i.oI];n++){var s=r[n];s&&(t+=s[i.fA])}u[i.fA]=(0,o.f0d)()-u.start,u.exTime=u[i.fA]-t,u[i.Ru]=function(){}}}return e.ParentContextKey="parent",e.ChildrenContextKey="childEvts",e}(),d=function(){function e(t){this.ctx={},(0,n.A)(e,this,function(e){e.create=function(e,t,r){return new u(e,t,r)},e.fire=function(e){e&&(e[i.Ru](),t&&(0,o.Tnt)(t[s.l0])&&t[s.l0](e))},e[i.e_]=function(t,r){t&&((e[a]=e[a]||{})[t]=r)},e[i.O_]=function(t){return(e[a]||{})[t]}})}return e.__ieDyn=1,e}(),p="CoreUtils.doPerf";function h(e,t,r,n,o){if(e){var a=e;if(a[s.kI]&&(a=a[s.kI]()),a){var d=void 0,h=a[i.O_](p);try{if(d=a.create(t(),n,o)){if(h&&d[i.e_]&&(d[i.e_](u[c],h),h[i.O_]&&h[i.e_])){var f=h[i.O_](u[l]);f||(f=[],h[i.e_](u[l],f)),f[i.y5](d)}return a[i.e_](p,d),r(d)}}catch(e){d&&d[i.e_]&&d[i.e_]("exception",e)}finally{d&&a.fire(d),a[i.e_](p,h)}}}return r()}function f(){return null}},2317(e,t,r){"use strict";r.d(t,{PV:()=>S,W0:()=>w,i8:()=>m,nU:()=>y,tS:()=>v});var n=r(269),o=r(991),i=r(9749),s=r(6182),a=r(3775),c=r(6054),l=r(4111),u=r(8156),d=r(380),p="_hasRun",h="_getTelCtx",f=0;function g(e,t,r,c){var u=null,d=[];t||(t=(0,i.e)({},null,r[s.Uw])),null!==c&&(u=c?function(e,t,r){for(;e;){if(e[s.AP]()===r)return e;e=e[s.uR]()}return S([r],t.config||{},t)}(e,r,c):e);var p={_next:function(){var e=u;if(u=e?e[s.uR]():null,!e){var t=d;t&&t[s.oI]>0&&((0,n.Iuo)(t,function(e){try{e.func.call(e.self,e.args)}catch(e){(0,a.ZP)(r[s.Uw],2,73,"Unexpected Exception during onComplete - "+(0,n.mmD)(e))}}),d=[])}return e},ctx:{core:function(){return r},diagLog:function(){return(0,a.y0)(r,t.cfg)},getCfg:function(){return t.cfg},getExtCfg:function(e,r){var i=h(e,!0);return r&&(0,n.zav)(r,function(e,r){if((0,n.hXl)(i[e])){var s=t.cfg[e];!s&&(0,n.hXl)(s)||(i[e]=s)}(0,o.q)(t,i,e,r)}),t[s.h0](i,r)},getConfig:function(e,r,o){void 0===o&&(o=!1);var i,s=h(e,!1),a=t.cfg;return!s||!s[r]&&(0,n.hXl)(s[r])?!a[r]&&(0,n.hXl)(a[r])||(i=a[r]):i=s[r],i||!(0,n.hXl)(i)?i:o},hasNext:function(){return!!u},getNext:function(){return u},setNext:function(e){u=e},iterate:function(e){for(var t;t=p._next();){var r=t[s.AP]();r&&e(r)}},onComplete:function(e,t){for(var r=[],o=2;o<arguments.length;o++)r[o-2]=arguments[o];e&&d[s.y5]({func:e,self:(0,n.b07)(t)?p.ctx:t,args:r})}}};function h(e,r){var n=null,o=t.cfg;if(o&&e){var i=o[l.Bw];!i&&r&&(i={}),o[l.Bw]=i,(i=t.ref(o,l.Bw))&&(!(n=i[e])&&r&&(n={}),i[e]=n,n=t.ref(i,e))}return n}return p}function m(e,t,r,o){var a=(0,i.e)(t),c=g(e,a,r,o),u=c.ctx;return u[s.$5]=function(e){var t=c._next();return t&&t[l.qT](e,u),!t},u[s.$o]=function(e,t){return void 0===e&&(e=null),(0,n.cyL)(e)&&(e=S(e,a.cfg,r,t)),m(e||u[s.uR](),a.cfg,r,t)},u}function v(e,t,r){var o=(0,i.e)(t.config),a=g(e,o,t,r),c=a.ctx;return c[s.$5]=function(e){var t=a._next();return t&&t[s.M5](c,e),!t},c[s.$o]=function(e,r){return void 0===e&&(e=null),(0,n.cyL)(e)&&(e=S(e,o.cfg,t,r)),v(e||c[s.uR](),t,r)},c}function y(e,t,r){var o=(0,i.e)(t.config),a=g(e,o,t,r).ctx;return a[s.$5]=function(e){return a.iterate(function(t){(0,n.Tnt)(t[s.HC])&&t[s.HC](a,e)})},a[s.$o]=function(e,r){return void 0===e&&(e=null),(0,n.cyL)(e)&&(e=S(e,o.cfg,t,r)),y(e||a[s.uR](),t,r)},a}function S(e,t,r,o){var i=null,c=!o;if((0,n.cyL)(e)&&e[s.oI]>0){var g=null;(0,n.Iuo)(e,function(e){if(c||o!==e||(c=!0),c&&e&&(0,n.Tnt)(e[l.qT])){var v=function(e,t,r){var o,i=null,c=(0,n.Tnt)(e[l.qT]),g=(0,n.Tnt)(e[s.YH]),v={getPlugin:function(){return e},getNext:function(){return i},processTelemetry:function(o,a){y(a=a||function(){var o;return e&&(0,n.Tnt)(e[h])&&(o=e[h]()),o||(o=m(v,t,r)),o}(),function(t){if(!e||!c)return!1;var r=(0,d.Cr)(e);return!r[s.Ik]&&!r[l.Hr]&&(g&&e[s.YH](i),e[l.qT](o,t),!0)},"processTelemetry",function(){return{item:o}},!o.sync)||a[s.$5](o)},unload:function(t,r){y(t,function(){var n=!1;if(e){var o=(0,d.Cr)(e),i=e[l.eT]||o[l.eT];!e||i&&i!==t.core()||o[s.Ik]||(o[l.eT]=null,o[s.Ik]=!0,o[s.tZ]=!1,e[s.Ik]&&!0===e[s.Ik](t,r)&&(n=!0))}return n},"unload",function(){},r[s.tI])||t[s.$5](r)},update:function(t,r){y(t,function(){var n=!1;if(e){var o=(0,d.Cr)(e),i=e[l.eT]||o[l.eT];!e||i&&i!==t.core()||o[s.Ik]||e[s.HC]&&!0===e[s.HC](t,r)&&(n=!0)}return n},"update",function(){},!1)||t[s.$5](r)},_id:o=e?e[s.Ju]+"-"+e[l.Vo]+"-"+f++:"Unknown-0-"+f++,_setNext:function(e){i=e}};function y(t,r,c,d,h){var f=!1,g=e?e[s.Ju]:"TelemetryPluginChain",m=t[p];return m||(m=t[p]={}),t.setNext(i),e&&(0,u.r2)(t[l.eT](),function(){return g+":"+c},function(){m[o]=!0;try{var e=i?i._id:l.m5;e&&(m[e]=!1),f=r(t)}catch(e){var u=!i||m[i._id];u&&(f=!0),i&&u||(0,a.ZP)(t[s.e4](),1,73,"Plugin ["+g+"] failed during "+c+" - "+(0,n.mmD)(e)+", run flags: "+(0,n.mmD)(m))}},d,h),f}return(0,n.N6t)(v)}(e,t,r);i||(i=v),g&&g._setNext(v),g=v}})}return o&&!i?S([o],t,r):i}var w=function(e,t,r,o){var i=m(e,t,r,o);(0,c.o$)(this,i,(0,n.cGk)(i))}},6535(e,t,r){"use strict";r.d(t,{Si:()=>v,VN:()=>m,Z1:()=>g});var n=r(269),o=r(6182),i=r(7292),s=r(4111),a=4294967296,c=4294967295,l=123456789,u=987654321,d=!1,p=l,h=u;function f(){try{var e=2147483647&(0,n.f0d)();(t=(Math.random()*a^e)+e)<0&&(t>>>=0),p=l+t&c,h=u-t&c,d=!0}catch(e){}var t}function g(e){return e>0?Math.floor(m()/c*(e+1))>>>0:0}function m(e){var t=0,r=(0,i.MY)()||(0,i.iN)();return r&&r.getRandomValues&&(t=r.getRandomValues(new Uint32Array(1))[0]&c),0===t&&(0,i.lT)()&&(d||f(),t=function(){var e=((h=36969*(65535&h)+(h>>16)&c)<<16)+(65535&(p=18e3*(65535&p)+(p>>16)&c))>>>0&c;return e>>>=0}()&c),0===t&&(t=Math.floor(a*Math.random()|0)),e||(t>>>=0),t}function v(e){void 0===e&&(e=22);for(var t=m()>>>0,r=0,n=s.m5;n[o.oI]<e;)r++,n+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(63&t),t>>>=6,5===r&&(t=(m()<<2&4294967295|3&t)>>>0,r=0);return n}},1190(e,t,r){"use strict";r.d(t,{x:()=>a});var n=r(269),o=r(6182),i=r(3775),s=r(7292);function a(e,t){try{if(e&&""!==e){var r=(0,s.hm)().parse(e);if(r&&r[o.cp]&&r[o.cp]>=r.itemsAccepted&&r.itemsReceived-r.itemsAccepted===r.errors[o.oI])return r}}catch(r){(0,i.ZP)(t,1,43,"Cannot parse the response. "+(r[o.RS]||(0,n.mmD)(r)),{response:e})}return null}},856(e,t,r){"use strict";r.d(t,{v:()=>f});var n=r(8279),o=r(8205),i=r(269),s=r(6182),a=r(7847),c=r(3775),l=r(7292),u=r(6054),d="",p="&NoResponseBody=true",h="POST",f=function(){function e(){var t,r,f,g,m,v,y,S,w,E,_,b,P,T=0;(0,n.A)(e,this,function(e,n){var C=!0;function I(e,t){(0,c.ZP)(f,2,26,"Failed to send telemetry.",{message:e}),N(t,400,{})}function O(e){I("No endpoint url is provided for the batch",e)}function N(e,t,r,n){try{e&&e(t,r,n)}catch(e){}}function R(e,t){var r=(0,i.w3n)(),n=e[s.Vq];if(!n)return O(t),!0;n=e[s.Vq]+(b?p:d);var o=e[s.Cd],a=g?o:new Blob([o],{type:"text/plain;charset=UTF-8"});return r.sendBeacon(n,a)}function A(e,t,r){var n=e[s.Cd];try{if(n)if(R(e,t))N(t,200,{},d);else{var o=m&&m.beaconOnRetry;o&&(0,i.Tnt)(o)?o(e,t,R):(y&&y[s.L](e,t,!0),(0,c.ZP)(f,2,40,". Failed to send telemetry with Beacon API, retried with normal sender."))}}catch(e){g&&(0,c.OG)(f,"Failed to send telemetry using sendBeacon API. Ex:"+(0,i.mmD)(e)),N(t,g?0:400,{},d)}}function D(e,r,n){var a,c,l,p=e[s.c1]||{};!n&&t&&(a=(0,o.Qo)(function(e,t){c=e,l=t})),g&&n&&e.disableXhrSync&&(n=!1);var f=e[s.Vq];if(!f)return O(r),void(c&&c(!1));var v=(0,u.H$)(h,f,C,!0,n,e[s.do]);function y(t){var n=m&&m.xhrOnComplete;if(n&&(0,i.Tnt)(n))n(t,r,e);else{var o=(0,u.Lo)(t);N(r,t[s.cV],(0,u.w3)(t,g),o)}}return g||v[s.yy]("Content-type","application/json"),(0,i.Iuo)((0,i.cGk)(p),function(e){v[s.yy](e,p[e])}),v.onreadystatechange=function(){g||(y(v),4===v.readyState&&c&&c(!0))},v.onload=function(){g&&y(v)},v.onerror=function(e){N(r,g?v[s.cV]:400,(0,u.w3)(v,g),g?d:(0,u.r4)(v)),l&&l(e)},v.ontimeout=function(){N(r,g?v[s.cV]:500,(0,u.w3)(v,g),g?d:(0,u.r4)(v)),c&&c(!1)},v.send(e[s.Cd]),a}function x(e,r,n){var c,l,u,f,v=e[s.Vq],y=e[s.Cd],S=g?y:new Blob([y],{type:"application/json"}),w=new Headers,E=y[s.oI],_=!1,I=!1,R=e[s.c1]||{},A=((c={method:h,body:S})[a.x]=!0,c);e.headers&&(0,i.cGk)(e.headers)[s.oI]>0&&((0,i.Iuo)((0,i.cGk)(R),function(e){w.append(e,R[e])}),A[s.c1]=w),C&&g&&(A.credentials="include"),n&&(A.keepalive=!0,T+=E,g?2===e._sendReason&&(_=!0,b&&(v+=p)):_=!0);var D=new Request(v,A);try{D[a.x]=!0}catch(e){}if(!n&&t&&(l=(0,o.Qo)(function(e,t){u=e,f=t})),!v)return O(r),void(u&&u(!1));function x(e){N(r,g?0:400,{},g?d:e)}function k(e,t,n){var o=e[s.cV],a=m.fetchOnComplete;a&&(0,i.Tnt)(a)?a(e,r,n||d,t):N(r,o,{},n||d)}try{(0,o.Dv)(fetch(g?v:D,g?A:null),function(t){if(n&&(T-=E,E=0),!I)if(I=!0,t.rejected)x(t.reason&&t.reason[s.pM]),f&&f(t.reason);else{var r=t[s.pF];try{g||r.ok?g&&!r.body?(k(r,null,d),u&&u(!0)):(0,o.Dv)(r.text(),function(t){k(r,e,t[s.pF]),u&&u(!0)}):(x(r.statusText),u&&u(!1))}catch(e){x((0,i.mmD)(e)),f&&f(e)}}})}catch(e){I||(x((0,i.mmD)(e)),f&&f(e))}return _&&!I&&(I=!0,N(r,200,{}),u&&u(!0)),g&&!I&&e[s.do]>0&&P&&P.set(function(){I||(I=!0,N(r,500,{}),u&&u(!0))},e[s.do]),l}function k(e,t,r){var n=(0,i.zkX)(),o=new XDomainRequest,a=e[s.Cd];o.onload=function(){var r=(0,u.Lo)(o),n=m&&m.xdrOnComplete;n&&(0,i.Tnt)(n)?n(o,t,e):N(t,200,{},r)},o.onerror=function(){N(t,400,{},g?d:(0,u.HU)(o))},o.ontimeout=function(){N(t,500,{})},o.onprogress=function(){};var l=n&&n.location&&n.location[s.Qg]||"",p=e[s.Vq];if(p){if(!g&&0!==p.lastIndexOf(l,0)){var v="Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol.";return(0,c.ZP)(f,2,40,". "+v),void I(v,t)}var y=g?p:p[s.W7](/^(https?:)/,"");o.open(h,y),e[s.do]&&(o[s.do]=e[s.do]),o.send(a),g&&r?P&&P.set(function(){o.send(a)},0):o.send(a)}else O(t)}function j(){T=0,r=!1,t=!1,f=null,g=null,m=null,v=null,y=null,S=!1,w=!1,E=!1,_=!1,b=!1,P=null}j(),e[s.mE]=function(t,n){f=n,r&&(0,c.ZP)(f,1,28,"Sender is already initialized"),e.SetConfig(t),r=!0},e._getDbgPlgTargets=function(){return[r,g,v,t]},e.SetConfig=function(e){try{if(m=e.senderOnCompleteCallBack||{},v=!!e.disableCredentials,g=!!e.isOneDs,t=!!e.enableSendPromise,S=!!e.disableXhr,w=!!e.disableBeacon,E=!!e.disableBeaconSync,P=e.timeWrapper,b=!!e.addNoResponse,_=!!e.disableFetchKeepAlive,y={sendPOST:D},g||(C=!1),v){var r=(0,l.g$)();r&&r.protocol&&"file:"===r.protocol[s.OL]()&&(C=!1)}return!0}catch(e){}return!1},e.getSyncFetchPayload=function(){return T},e.getSenderInst=function(e,t){return e&&e[s.oI]?function(e,t){for(var r,n=0,o=null,i=0;null==o&&i<e[s.oI];)n=e[i],S||1!==n?2!==n||!(0,l.R7)(t)||t&&_?3!==n||!(0,l.Uf)()||(t?E:w)||(o=A):o=x:(0,l.PV)()?o=k:(0,l.xk)()&&(o=D),i++;return o?((r={_transport:n,_isSync:t})[s.L]=o,r):null}(e,t):null},e.getFallbackInst=function(){return y},e[s.tn]=function(e,t){j()}})}return e.__ieDyn=1,e}()},380(e,t,r){"use strict";r.d(t,{Cr:()=>l,Xc:()=>d,pI:()=>u,u7:()=>p});var n=r(269),o=r(6182),i=r(4276),s=r(4111),a=r(1864),c=(0,i.T)("plugin");function l(e){return c.get(e,"state",{},!0)}function u(e,t){for(var r,i=[],a=null,c=e[o.uR]();c;){var u=c[o.AP]();if(u){a&&a[o.YH]&&u[s.qT]&&a[o.YH](u);var d=!!(r=l(u))[o.tZ];u[o.tZ]&&(d=u[o.tZ]()),d||i[o.y5](u),a=u,c=c[o.uR]()}}(0,n.Iuo)(i,function(n){var i=e[s.eT]();n[o.mE](e.getCfg(),i,t,e[o.uR]()),r=l(n),n[s.eT]||r[s.eT]||(r[s.eT]=i),r[o.tZ]=!0,delete r[o.Ik]})}function d(e){return e.sort(function(e,t){var r=0;if(t){var n=t[s.qT];e[s.qT]?r=n?e[s.Vo]-t[s.Vo]:1:n&&(r=-1)}else r=e?1:-1;return r})}function p(e){var t={};return{getName:function(){return t[o.RS]},setName:function(r){e&&e.setName(r),t[o.RS]=r},getTraceId:function(){return t[o.P5]},setTraceId:function(r){e&&e.setTraceId(r),(0,a.hX)(r)&&(t[o.P5]=r)},getSpanId:function(){return t[o.wi]},setSpanId:function(r){e&&e.setSpanId(r),(0,a.wN)(r)&&(t[o.wi]=r)},getTraceFlags:function(){return t[o.Rr]},setTraceFlags:function(r){e&&e.setTraceFlags(r),t[o.Rr]=r}}}},836(e,t,r){"use strict";r.d(t,{P:()=>s});var n=r(269),o=r(6182),i=r(3775);function s(){var e=[];return{add:function(t){t&&e[o.y5](t)},run:function(t,r){(0,n.Iuo)(e,function(e){try{e(t,r)}catch(e){(0,i.ZP)(t[o.e4](),2,73,"Unexpected error calling unload handler - "+(0,n.mmD)(e))}}),e=[]}}}},8969(e,t,r){"use strict";r.d(t,{d:()=>c,w:()=>l});var n,o,i=r(269),s=r(6182),a=r(3775);function c(e,t){n=e,o=t}function l(){var e=[];return{run:function(t){var r=e;e=[],(0,i.Iuo)(r,function(e){try{(e.rm||e.remove).call(e)}catch(e){(0,a.ZP)(t,2,73,"Unloading:"+(0,i.mmD)(e))}}),n&&r[s.oI]>n&&(o?o("doUnload",r):(0,a.ZP)(null,1,48,"Max unload hooks exceeded. An excessive number of unload hooks has been detected."))},add:function(t){t&&((0,i.Yny)(e,t),n&&e[s.oI]>n&&(o?o("Add",e):(0,a.ZP)(null,1,48,"Max unload hooks exceeded. An excessive number of unload hooks has been detected.")))}}}},1864(e,t,r){"use strict";r.d(t,{L0:()=>_,N7:()=>E,ZI:()=>v,ef:()=>b,hX:()=>y,mJ:()=>w,wN:()=>S,wk:()=>m});var n=r(269),o=r(6182),i=r(9882),s=r(7292),a=r(4111),c=/^([\da-f]{2})-([\da-f]{32})-([\da-f]{16})-([\da-f]{2})(-[^\s]{1,64})?$/i,l="00",u="ff",d="00000000000000000000000000000000",p="0000000000000000";function h(e,t,r){return!(!e||e[o.oI]!==t||e===r||!e.match(/^[\da-f]*$/i))}function f(e,t,r){return h(e,t)?e:r}function g(e){(isNaN(e)||e<0||e>255)&&(e=1);for(var t=e.toString(16);t[o.oI]<2;)t="0"+t;return t}function m(e,t,r,s){var a;return(a={})[o.s]=h(s,2,u)?s:l,a[o.P5]=y(e)?e:(0,i.cL)(),a[o.wi]=S(t)?t:(0,n.ZWZ)((0,i.cL)(),16),a.traceFlags=r>=0&&r<=255?r:1,a}function v(e,t){var r;if(!e)return null;if((0,n.cyL)(e)&&(e=e[0]||""),!e||!(0,n.KgX)(e)||e[o.oI]>8192)return null;if(-1!==e.indexOf(",")){var i=e[o.sY](",");e=i[t>0&&i[o.oI]>t?t:0]}var s=c.exec((0,n.EHq)(e));return s&&s[1]!==u&&s[2]!==d&&s[3]!==p?((r={version:(s[1]||a.m5)[o.OL](),traceId:(s[2]||a.m5)[o.OL](),spanId:(s[3]||a.m5)[o.OL]()})[o.Rr]=parseInt(s[4],16),r):null}function y(e){return h(e,32,d)}function S(e){return h(e,16,p)}function w(e){return!!(e&&h(e[o.s],2,u)&&h(e[o.P5],32,d)&&h(e[o.wi],16,p)&&h(g(e[o.Rr]),2))}function E(e){return!(!w(e)||1&~e[o.Rr])}function _(e){if(e){var t=g(e[o.Rr]);h(t,2)||(t="01");var r=e[o.s]||l;return"00"!==r&&"ff"!==r&&(r=l),"".concat(r.toLowerCase(),"-").concat(f(e.traceId,32,d).toLowerCase(),"-").concat(f(e.spanId,16,p).toLowerCase(),"-").concat(t.toLowerCase())}return""}function b(e){var t="traceparent",r=v((0,s.$Z)(t),e);return r||(r=v((0,s.Iu)(t),e)),r}},6182(e,t,r){"use strict";r.d(t,{$5:()=>A,$o:()=>$,AP:()=>I,Az:()=>ie,Bl:()=>U,Cd:()=>ce,DI:()=>D,Di:()=>j,FI:()=>N,HC:()=>G,Ic:()=>g,Ik:()=>B,JQ:()=>o,JR:()=>V,Ju:()=>S,K0:()=>m,L:()=>fe,M5:()=>M,OL:()=>n,O_:()=>le,P5:()=>ye,QM:()=>re,Qg:()=>J,RF:()=>C,RS:()=>O,Rr:()=>we,Ru:()=>de,Uw:()=>p,Vq:()=>he,W7:()=>ee,XM:()=>k,XW:()=>s,YH:()=>X,Yo:()=>ne,Yq:()=>P,Zu:()=>ae,_w:()=>v,by:()=>L,c1:()=>ge,cV:()=>oe,cp:()=>pe,do:()=>me,e4:()=>z,e_:()=>ue,fA:()=>R,h0:()=>u,h3:()=>w,h4:()=>x,ih:()=>l,mE:()=>y,oI:()=>i,on:()=>c,pF:()=>T,pM:()=>H,re:()=>Z,s:()=>F,sY:()=>Y,sl:()=>b,sx:()=>te,tI:()=>q,tX:()=>Q,tZ:()=>_,tn:()=>W,uR:()=>K,vR:()=>E,wJ:()=>se,wi:()=>Se,x6:()=>d,y5:()=>f,y9:()=>h,yy:()=>ve,zs:()=>a});var n="toLowerCase",o="blkVal",i="length",s="rdOnly",a="notify",c="warnToConsole",l="throwInternal",u="setDf",d="watch",p="logger",h="apply",f="push",g="splice",m="hdlr",v="cancel",y="initialize",S="identifier",w="removeNotificationListener",E="addNotificationListener",_="isInitialized",b="instrumentationKey",P="INACTIVE",T="value",C="getNotifyMgr",I="getPlugin",O="name",N="iKey",R="time",A="processNext",D="getProcessTelContext",x="pollInternalLogs",k="enabled",j="stopPollingInternalLogs",M="unload",L="onComplete",F="version",U="loggingLevelConsole",$="createNew",B="teardown",V="messageId",H="message",q="isAsync",z="diagLog",W="_doTeardown",G="update",K="getNext",X="setNextPlugin",J="protocol",Q="userAgent",Y="split",Z="nodeType",ee="replace",te="logInternalMessage",re="type",ne="handler",oe="status",ie="getResponseHeader",se="getAllResponseHeaders",ae="isChildEvt",ce="data",le="getCtx",ue="setCtx",de="complete",pe="itemsReceived",he="urlString",fe="sendPOST",ge="headers",me="timeout",ve="setRequestHeader",ye="traceId",Se="spanId",we="traceFlags"},5664(e,t,r){"use strict";r.d(t,{Wy:()=>c,_1:()=>o,bA:()=>i,hW:()=>n,s6:()=>a,vR:()=>s});var n="function",o="object",i="undefined",s="prototype",a=Object,c=a[s]},4688(e,t,r){"use strict";r.d(t,{Im:()=>d,qU:()=>h,vz:()=>f});var n=r(1396),o=r(9350),i=r(9345),s=r(3673);function a(e,t){var r=i.wg;if((0,s.bJ)(e))r="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'";else try{r=JSON.stringify(e,i.M_,t?(0,s.Et)(t)?t:4:i.DQ)}catch(e){r=" - "+a(e,t)}return(0,s.SZ)(e)+": "+r}var c=i.s6.create||function(e){if(!e)return{};var t=typeof e;if(t!==i.qv&&t!==i.H3)throw new TypeError("Prototype must be an Object or function: "+a(e));function r(){}return r[i.Fs]=e,new r},l=r(5664),u=(((0,n.mS)()||{}).Symbol,((0,n.mS)()||{}).Reflect,"hasOwnProperty"),d=o.vE||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])l.Wy[u].call(t,o)&&(e[o]=t[o]);return e},p=function(e,t){return p=l.s6.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t[u](r)&&(e[r]=t[r])},p(e,t)};function h(e,t){function r(){this.constructor=e}typeof t!==l.hW&&null!==t&&function(e){throw new TypeError(e)}("Class extends value "+String(t)+" is not a constructor or null"),p(e,t),e[l.vR]=null===t?c(t):(r[l.vR]=t[l.vR],new r)}function f(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e}},3673(e,t,r){"use strict";r.d(t,{Et:()=>c,Gv:()=>a,SZ:()=>s,bJ:()=>l});var n=r(9345);function o(e){return function(t){return typeof t===e}}function i(e){var t="[object "+e+"]";return function(e){return!(!e||s(e)!==t)}}function s(e){return n.Wy.toString.call(e)}function a(e){return!(!e&&function(e){return e===n.M_||function(e){return typeof e===n.ZH||e===n.ZH}(e)}(e)||!e||typeof e!==n.qv)}n.An,n.uk,n.Jx,n.ZH,o(n.An),o(n.H3),n.kV.isArray,i("Date");var c=o(n.uk),l=(o(n.Jx),i("RegExp"),i("File"),i("FormData"),i("Blob"),i("ArrayBuffer"),i("Error"))},1396(e,t,r){"use strict";r.d(t,{mS:()=>d});var n,o=r(9345),i="__tsUtils$gblCfg";function s(){var e;return typeof globalThis!==o.ZH&&(e=globalThis),e||typeof self===o.ZH||(e=self),e||typeof window===o.ZH||(e=window),e||typeof global===o.ZH||(e=global),e}o.Qg;var a,c=o.s6.defineProperty;o.s6.defineProperties;var l=function(){a=function(){if(!n){var e=s()||{};n=e[i]=e[i]||{}}return n}(),l=o.M_};var u,d=function(e){return(!u||!1===e||a&&a.lzy&&!u.b)&&(t=s,r=o.M_,u=function(e){var t={};return l&&l(),t.b=a.lzy,c(t,"v",{configurable:!0,get:function(){var r=e();return a.lzy||(c(t,"v",{value:r}),t.b&&delete t.b),a.lzy&&t.b!==a.lzy&&(t.b=a.lzy),r}}),t}(function(){return function(e,t){var r=t;try{r=e()}catch(e){}return r}(t,r)})),u.v;var t,r}},9345(e,t,r){"use strict";r.d(t,{An:()=>p,DQ:()=>n,Fs:()=>u,H3:()=>a,Jx:()=>s,M_:()=>o,Qg:()=>f,Wy:()=>m,ZH:()=>h,kV:()=>v,qv:()=>l,r5:()=>d,s6:()=>g,uk:()=>c,wg:()=>i});var n=void 0,o=null,i="",s="boolean",a="function",c="number",l="object",u="prototype",d="__proto__",p="string",h="undefined",f="value",g=Object,m=g[u],v=(String[u],Array);v[u]},9350(e,t,r){"use strict";r.d(t,{vE:()=>i});var n=r(9345),o=(r(3673),n.s6.getOwnPropertyDescriptor);n.s6.hasOwn;n.s6.freeze;var i=n.s6.assign;n.s6.seal,n.s6.getPrototypeOf,n.s6.entries,n.s6.values},5927(e,t,r){"use strict";r.r(t),r.d(t,{AppInsightsCore:()=>gt._,ApplicationInsights:()=>Tt,Sender:()=>ht,SeverityLevel:()=>bt.O,arrForEach:()=>E.Iuo,isNullOrUndefined:()=>E.hXl,proxyFunctions:()=>w.o$,throwError:()=>E.$8});var n=r(8279),o=r(4688),i=r(5025),s=r(3072),a=r(2445),c=r(1448),l=r(4164),u=r(5397),d=r(5014),p=r(1365),h=r(740),f=r(7952),g=r(4658),m=r(2318),v=r(2910),y=r(2475),S=r(3775),w=r(6054),E=r(269),_=r(6149),b=r(4276),P=r(9749),T=r(2317),C=r(4875),I=r(7292),O=r(856),N=r(4013),R=r(1190),A=r(638),D=r(1575),x=r(7975),k=r(1062),j=r(7358),M="duration",L="tags",F="deviceType",U="data",$="name",B="traceID",V="length",H="stringify",q="measurements",z="dataType",W="envelopeType",G="toString",K="_get",X="enqueue",J="count",Q="eventsLimitInMem",Y="push",Z="item",ee="emitLineDelimitedJson",te="clear",re="createNew",ne="markAsSent",oe="clearSent",ie="bufferOverride",se="BUFFER_KEY",ae="SENT_BUFFER_KEY",ce="concat",le="MAX_BUFFER_SIZE",ue="triggerSend",de="diagLog",pe="initialize",he="_sender",fe="customHeaders",ge="maxBatchSizeInBytes",me="onunloadDisableBeacon",ve="isBeaconApiDisabled",ye="alwaysUseXhrOverride",Se="disableXhr",we="enableSessionStorageBuffer",Ee="_buffer",_e="onunloadDisableFetch",be="disableSendBeaconSplit",Pe="instrumentationKey",Te="enableSendPromise",Ce="getSenderInst",Ie="unloadTransports",Oe="convertUndefined",Ne="maxBatchInterval",Re="serialize",Ae="_onError",De="_onPartialSuccess",xe="_onSuccess",ke="itemsReceived",je="itemsAccepted",Me="oriPayload",Le="baseType",Fe="sampleRate",Ue="eventsSendRequest",$e="getSamplingScore",Be="baseType",Ve="baseData",He="properties",qe="true";function ze(e,t,r){return(0,w.KY)(e,t,r,E.zzB)}function We(e,t,r){(0,E.hXl)(e)||(0,E.zav)(e,function(e,n){(0,E.EtT)(n)?r[e]=n:(0,E.KgX)(n)?t[e]=n:(0,I.Z)()&&(t[e]=(0,I.hm)()[H](n))})}function Ge(e,t){(0,E.hXl)(e)||(0,E.zav)(e,function(r,n){e[r]=n||t})}function Ke(e,t,r,n){var s=new k.L(e,n,t);ze(s,"sampleRate",r[i.tU]),(r[Ve]||{}).startTime&&(s.time=(0,w._u)(r[Ve].startTime)),s.iKey=r.iKey;var a=r.iKey.replace(/-/g,"");return s[$]=s[$].replace("{0}",a),function(e,t,r){var n=r[L]=r[L]||{},i=t.ext=t.ext||{},s=t[L]=t[L]||[],a=i.user;a&&(ze(n,D.O.userAuthUserId,a.authId),ze(n,D.O.userId,a.id||a.localId));var c=i.app;c&&ze(n,D.O.sessionId,c.sesId);var l=i.device;l&&(ze(n,D.O.deviceId,l.id||l.localId),ze(n,D.O[F],l.deviceClass),ze(n,D.O.deviceIp,l.ip),ze(n,D.O.deviceModel,l.model),ze(n,D.O[F],l[F]));var u=t.ext.web;if(u){ze(n,D.O.deviceLanguage,u.browserLang),ze(n,D.O.deviceBrowserVersion,u.browserVer),ze(n,D.O.deviceBrowser,u.browser);var d=r[U]=r[U]||{},p=d[Ve]=d[Ve]||{},h=p[He]=p[He]||{};ze(h,"domain",u.domain),ze(h,"isManual",u.isManual?qe:null),ze(h,"screenRes",u.screenRes),ze(h,"userConsent",u.userConsent?qe:null)}var f=i.os;f&&(ze(n,D.O.deviceOS,f[$]),ze(n,D.O.deviceOSVersion,f.osVer));var g=i.trace;g&&(ze(n,D.O.operationParentId,g.parentID),ze(n,D.O.operationName,(0,x.Rr)(e,g[$])),ze(n,D.O.operationId,g[B]));for(var m={},v=s[V]-1;v>=0;v--){var y=s[v];(0,E.zav)(y,function(e,t){m[e]=t}),s.splice(v,1)}(0,E.zav)(s,function(e,t){m[e]=t});var S=(0,o.Im)((0,o.Im)({},n),m);S[D.O.internalSdkVersion]||(S[D.O.internalSdkVersion]=(0,x.Rr)(e,"javascript:".concat(Je.Version),64)),r[L]=(0,w.hW)(S)}(e,r,s),r[L]=r[L]||[],(0,w.hW)(s)}function Xe(e,t){(0,E.hXl)(t[Ve])&&(0,S.ZP)(e,1,46,"telemetryItem.baseData cannot be null.")}var Je={Version:"3.3.0"};function Qe(e,t,r){Xe(e,t);var n={},o={};t[Be]!==s.J[z]&&(n.baseTypeSource=t[Be]),t[Be]===s.J[z]?(n=t[Ve][He]||{},o=t[Ve][q]||{}):t[Ve]&&We(t[Ve],n,o),We(t[U],n,o),(0,E.hXl)(r)||Ge(n,r);var i=t[Ve][$],a=new s.J(e,i,n,o),c=new j.B(s.J[z],a);return Ke(e,s.J[W],t,c)}var Ye,Ze,et=function(){function e(t,r){var o=[],i=!1,s=r.maxRetryCnt;this[K]=function(){return o},this._set=function(e){return o=e},(0,n.A)(e,this,function(e){e[X]=function(n){e[J]()>=r[Q]?i||((0,S.ZP)(t,2,105,"Maximum in-memory buffer size reached: "+e[J](),!0),i=!0):(n.cnt=n.cnt||0,!(0,E.hXl)(s)&&n.cnt>s||o[Y](n))},e[J]=function(){return o[V]},e.size=function(){for(var e=o[V],t=0;t<o[V];t++)e+=o[t].item[V];return r[ee]||(e+=2),e},e[te]=function(){o=[],i=!1},e.getItems=function(){return o.slice(0)},e.batchPayloads=function(e){if(e&&e[V]>0){var t=[];return(0,E.Iuo)(e,function(e){t[Y](e[Z])}),r[ee]?t.join("\n"):"["+t.join(",")+"]"}return null},e[re]=function(e,r,n){var i=o.slice(0);e=e||t,r=r||{};var s=n?new nt(e,r):new tt(e,r);return(0,E.Iuo)(i,function(e){s[X](e)}),s}})}return e.__ieDyn=1,e}(),tt=function(e){function t(r,o){var i=e.call(this,r,o)||this;return(0,n.A)(t,i,function(e,t){e[ne]=function(e){t[te]()},e[oe]=function(e){}}),i}return(0,o.qU)(t,e),t.__ieDyn=1,t}(et),rt=["AI_buffer","AI_sentBuffer"],nt=function(e){function t(r,o){var i=e.call(this,r,o)||this,s=!1,a=null==o?void 0:o.namePrefix,c=o[ie]||{getItem:g.vH,setItem:g.Dt},l=c.getItem,u=c.setItem,d=o.maxRetryCnt;return(0,n.A)(t,i,function(e,n){var o=m(t[se]),i=m(t[ae]),c=function(){var e=[];try{return(0,E.Iuo)(rt,function(t){var r=_(t);if(e=e[ce](r),a){var n=_(a+"_"+t);e=e[ce](n)}}),e}catch(e){(0,S.ZP)(r,2,41,"Transfer events from previous buffers: "+(0,w.lL)(e)+". previous Buffer items can not be removed",{exception:(0,E.mmD)(e)})}return[]}(),p=i[ce](c),h=e._set(o[ce](p));function f(e,t){var r=[],n=[];return(0,E.Iuo)(e,function(e){n[Y](e[Z])}),(0,E.Iuo)(t,function(e){(0,E.Tnt)(e)||-1!==(0,E.rDm)(n,e[Z])||r[Y](e)}),r}function m(e){return v(a?a+"_"+e:e)}function v(e){try{var t=l(r,e);if(t){var n=(0,I.hm)().parse(t);if((0,E.KgX)(n)&&(n=(0,I.hm)().parse(n)),n&&(0,E.cyL)(n))return n}}catch(t){(0,S.ZP)(r,1,42," storage key: "+e+", "+(0,w.lL)(t),{exception:(0,E.mmD)(t)})}return[]}function y(e,t){var n=e;try{n=a?a+"_"+n:n;var o=JSON[H](t);u(r,n,o)}catch(e){u(r,n,JSON[H]([])),(0,S.ZP)(r,2,41," storage key: "+n+", "+(0,w.lL)(e)+". Buffer cleared",{exception:(0,E.mmD)(e)})}}function _(e){try{var t=v(e),n=[];return(0,E.Iuo)(t,function(e){var t={item:e,cnt:0};n[Y](t)}),(0,g.v7)(r,e),n}catch(e){}return[]}h[V]>t[le]&&(h[V]=t[le]),y(t[ae],[]),y(t[se],h),e[X]=function(o){e[J]()>=t[le]?s||((0,S.ZP)(r,2,67,"Maximum buffer size reached: "+e[J](),!0),s=!0):(o.cnt=o.cnt||0,!(0,E.hXl)(d)&&o.cnt>d||(n[X](o),y(t.BUFFER_KEY,e[K]())))},e[te]=function(){n[te](),y(t.BUFFER_KEY,e[K]()),y(t[ae],[]),s=!1},e[ne]=function(n){y(t[se],e._set(f(n,e[K]())));var o=m(t[ae]);o instanceof Array&&n instanceof Array&&((o=o[ce](n))[V]>t[le]&&((0,S.ZP)(r,1,67,"Sent buffer reached its maximum size: "+o[V],!0),o[V]=t[le]),y(t[ae],o))},e[oe]=function(e){var r=m(t[ae]);r=f(e,r),y(t[ae],r)},e[re]=function(n,o,i){i=!!i;var s=e[K]().slice(0),a=m(t[ae]).slice(0);n=n||r,o=o||{},e[te]();var c=i?new t(n,o):new tt(n,o);return(0,E.Iuo)(s,function(e){c[X](e)}),i&&c[ne](a),c}}),i}var r;return(0,o.qU)(t,e),r=t,t.VERSION="_1",t.BUFFER_KEY="AI_buffer"+r.VERSION,t.SENT_BUFFER_KEY="AI_sentBuffer"+r.VERSION,t.MAX_BUFFER_SIZE=2e3,t}(et),ot=function(){function e(t){(0,n.A)(e,this,function(e){function r(e,i){var s="__aiCircularRefCheck",a={};if(!e)return(0,S.ZP)(t,1,48,"cannot serialize object because it is null or undefined",{name:i},!0),a;if(e[s])return(0,S.ZP)(t,2,50,"Circular reference detected while serializing object",{name:i},!0),a;if(!e.aiDataContract){if("measurements"===i)a=o(e,"number",i);else if("properties"===i)a=o(e,"string",i);else if("tags"===i)a=o(e,"string",i);else if((0,E.cyL)(e))a=n(e,i);else{(0,S.ZP)(t,2,49,"Attempting to serialize an object which does not implement ISerializable",{name:i},!0);try{(0,I.hm)()[H](e),a=e}catch(e){(0,S.ZP)(t,1,48,e&&(0,E.Tnt)(e[G])?e[G]():"Error serializing object",null,!0)}}return a}return e[s]=!0,(0,E.zav)(e.aiDataContract,function(o,s){var c=(0,E.Tnt)(s)?1&s():1&s,l=(0,E.Tnt)(s)?4&s():4&s,u=2&s,d=void 0!==e[o],p=(0,E.Gvm)(e[o])&&null!==e[o];if(!c||d||u){if(!l){var h;void 0!==(h=p?u?n(e[o],o):r(e[o],o):e[o])&&(a[o]=h)}}else(0,S.ZP)(t,1,24,"Missing required field specification. The field is required but not present on source",{field:o,name:i})}),delete e[s],a}function n(e,n){var o;if(e)if((0,E.cyL)(e)){o=[];for(var i=0;i<e[V];i++){var s=r(e[i],n+"["+i+"]");o[Y](s)}}else(0,S.ZP)(t,1,54,"This field was specified as an array in the contract but the item is not an array.\r\n",{name:n},!0);return o}function o(e,r,n){var o;return e&&(o={},(0,E.zav)(e,function(e,i){if("string"===r)void 0===i?o[e]="undefined":null===i?o[e]="null":i[G]?o[e]=i[G]():o[e]="invalid field: toString() is not defined.";else if("number"===r)if(void 0===i)o[e]="undefined";else if(null===i)o[e]="null";else{var s=parseFloat(i);o[e]=s}else o[e]="invalid field: "+n+" is of unknown type.",(0,S.ZP)(t,1,o[e],null,!0)})),o}e[Re]=function(e){var n=r(e,"root");try{return(0,I.hm)()[H](n)}catch(e){(0,S.ZP)(t,1,48,e&&(0,E.Tnt)(e[G])?e[G]():"Error serializing object",null,!0)}}})}return e.__ieDyn=1,e}(),it=r(8596),st=function(){function e(){}return e.prototype.getHashCodeScore=function(t){return this.getHashCode(t)/e.INT_MAX_VALUE*100},e.prototype.getHashCode=function(e){if(""===e)return 0;for(;e[V]<8;)e=e[ce](e);for(var t=5381,r=0;r<e[V];++r)t=(t<<5)+t+e.charCodeAt(r),t&=t;return Math.abs(t)},e.INT_MAX_VALUE=2147483647,e}(),at=function(){var e=new st,t=new it.o;this[$e]=function(r){return r[L]&&r[L][t.userId]?e.getHashCodeScore(r[L][t.userId]):r.ext&&r.ext.user&&r.ext.user.id?e.getHashCodeScore(r.ext.user.id):r[L]&&r[L][t.operationId]?e.getHashCodeScore(r[L][t.operationId]):r.ext&&r.ext.telemetryTrace&&r.ext.telemetryTrace[B]?e.getHashCodeScore(r.ext.telemetryTrace[B]):100*Math.random()}},ct=function(){function e(e,t){this.INT_MAX_VALUE=2147483647;var r=t||(0,S.y0)(null);(e>100||e<0)&&(r.throwInternal(2,58,"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[Fe]=e,this.samplingScoreGenerator=new at}return e.prototype.isSampledIn=function(e){var t=this[Fe];return null==t||t>=100||e.baseType===d.J[z]||this.samplingScoreGenerator[$e](e)<t},e}(),lt=void 0;function ut(e){try{return e.responseText}catch(e){}return null}var dt=(0,E.ZHX)(((Ye={endpointUrl:(0,y.Lx)(E.zzB,i._G+i.wc)})[ee]=(0,y.DD)(),Ye[Ne]=15e3,Ye[ge]=102400,Ye.disableTelemetry=(0,y.DD)(),Ye[we]=(0,y.DD)(!0),Ye.isRetryDisabled=(0,y.DD)(),Ye[ve]=(0,y.DD)(!0),Ye[be]=(0,y.DD)(!0),Ye[Se]=(0,y.DD)(),Ye[_e]=(0,y.DD)(),Ye[me]=(0,y.DD)(),Ye[Pe]=lt,Ye.namePrefix=lt,Ye.samplingPercentage=(0,y.Lx)(function(e){return!isNaN(e)&&e>0&&e<=100},100),Ye[fe]=lt,Ye[Oe]=lt,Ye[Q]=1e4,Ye[ie]=!1,Ye.httpXHROverride={isVal:function(e){return e&&e.sendPOST},v:lt},Ye[ye]=(0,y.DD)(),Ye.transports=lt,Ye.retryCodes=lt,Ye.maxRetryCnt={isVal:E.EtT,v:10},Ye)),pt=((Ze={})[s.J.dataType]=Qe,Ze[a.C.dataType]=function(e,t,r){Xe(e,t);var n=t[Ve].message,o=t[Ve].severityLevel,i=t[Ve][He]||{},s=t[Ve][q]||{};We(t[U],i,s),(0,E.hXl)(r)||Ge(i,r);var c=new a.C(e,n,o,i,s),l=new j.B(a.C[z],c);return Ke(e,a.C[W],t,l)},Ze[c.h.dataType]=function(e,t,r){var n;Xe(e,t);var o=t[Ve];(0,E.hXl)(o)||(0,E.hXl)(o[He])||(0,E.hXl)(o[He][M])?(0,E.hXl)(t[U])||(0,E.hXl)(t[U][M])||(n=t[U][M],delete t[U][M]):(n=o[He][M],delete o[He][M]);var i,s=t[Ve];((t.ext||{}).trace||{})[B]&&(i=t.ext.trace[B]);var a=s.id||i,l=s[$],u=s.uri,d=s[He]||{},p=s[q]||{};if((0,E.hXl)(s.refUri)||(d.refUri=s.refUri),(0,E.hXl)(s.pageType)||(d.pageType=s.pageType),(0,E.hXl)(s.isLoggedIn)||(d.isLoggedIn=s.isLoggedIn[G]()),!(0,E.hXl)(s[He])){var h=s[He];(0,E.zav)(h,function(e,t){d[e]=t})}We(t[U],d,p),(0,E.hXl)(r)||Ge(d,r);var f=new c.h(e,l,u,n,d,p,a),g=new j.B(c.h[z],f);return Ke(e,c.h[W],t,g)},Ze[l.H.dataType]=function(e,t,r){Xe(e,t);var n=t[Ve],o=n[$],i=n.uri||n.url,s=n[He]||{},a=n[q]||{};We(t[U],s,a),(0,E.hXl)(r)||Ge(s,r);var c=new l.H(e,o,i,void 0,s,a,n),u=new j.B(l.H[z],c);return Ke(e,l.H[W],t,u)},Ze[u.WJ.dataType]=function(e,t,r){Xe(e,t);var n=t[Ve][q]||{},o=t[Ve][He]||{};We(t[U],o,n),(0,E.hXl)(r)||Ge(o,r);var i=t[Ve],s=u.WJ.CreateFromInterface(e,i,o,n),a=new j.B(u.WJ[z],s);return Ke(e,u.WJ[W],t,a)},Ze[d.J.dataType]=function(e,t,r){Xe(e,t);var n=t[Ve],o=n[He]||{},i=n[q]||{};We(t[U],o,i),(0,E.hXl)(r)||Ge(o,r);var s=new d.J(e,n[$],n.average,n.sampleCount,n.min,n.max,n.stdDev,o,i),a=new j.B(d.J[z],s);return Ke(e,d.J[W],t,a)},Ze[p.A.dataType]=function(e,t,r){Xe(e,t);var n=t[Ve][q]||{},o=t[Ve][He]||{};We(t[U],o,n),(0,E.hXl)(r)||Ge(o,r);var s=t[Ve];if((0,E.hXl)(s))return(0,S.OG)(e,"Invalid input for dependency data"),null;var a=s[He]&&s[He][i.ym]?s[He][i.ym]:"GET",c=new p.A(e,s.id,s.target,s[$],s[M],s.success,s.responseCode,a,s.type,s.correlationContext,o,n),l=new j.B(p.A[z],c);return Ke(e,p.A[W],t,l)},Ze),ht=function(e){function t(){var r,o,s,a,c,l,u,d=e.call(this)||this;d.priority=1001,d.identifier=h.BreezeChannelIdentifier;var p,y,A,D,x,k,j,M,F,$,B,H,q,z,W,G,K,Q,ee,se,ae,ce,le,$e,Be,Ve,He,qe=0;return(0,n.A)(t,d,function(e,n){function h(t,n){var o=ut(t);if(!t||o+""!="200"&&""!==o){var i=(0,R.x)(o);i&&i[ke]&&i[ke]>i[je]&&!z?e[De](n,i):e[Ae](n,(0,w.HU)(t))}else r=0,e[xe](n,0)}function ze(e,t,r){4===e.readyState&&it(e.status,t,e.responseURL,r,(0,w.r4)(e),ut(e)||e.response)}function We(e){try{if(e){var t=e[Me];return t&&t[V]?t:null}}catch(e){}return null}function Ge(t,r){return!(B||(t?t.baseData&&!t[Le]?(r&&(0,S.ZP)(r,1,70,"Cannot send telemetry without baseData and baseType"),1):(t[Le]||(t[Le]="EventData"),e[he]?(n=t,e._sample.isSampledIn(n)?(t[i.tU]=e._sample[Fe],0):(r&&(0,S.ZP)(r,2,33,"Telemetry item was sampled out and not sent",{SampleRate:e._sample[Fe]}),1)):(r&&(0,S.ZP)(r,1,28,"Sender was not initialized"),1)):(r&&(0,S.ZP)(r,1,7,"Cannot send empty telemetry"),1)));var n}function Ke(e,r){var n=e.iKey||H,o=t.constructEnvelope(e,n,r,q);if(o){var s=!1;if(e[L]&&e[L][i.jp]&&((0,E.Iuo)(e[L][i.jp],function(e){try{e&&!1===e(o)&&(s=!0,(0,S.OG)(r,"Telemetry processor check returns false"))}catch(e){(0,S.ZP)(r,1,64,"One of telemetry initializers failed, telemetry item will not be sent: "+(0,w.lL)(e),{exception:(0,E.mmD)(e)},!0)}}),delete e[L][i.jp]),!s)return o}else(0,S.ZP)(r,1,47,"Unable to create an AppInsights envelope")}function Xe(t){var r="",n=e[de]();try{var o=Ge(t,n),i=null;o&&(i=Ke(t,n)),i&&(r=c[Re](i))}catch(e){}return r}function Je(e){var t="";return e&&e[V]&&(t="["+e.join(",")+"]"),t}function Qe(e){var t,r=et();return(t={urlString:D})[U]=e,t.headers=r,t}function Ye(t,r,n,o){void 0===o&&(o=!0);var i=Ze(r),s=t&&t.sendPOST;return s&&i?(o&&e._buffer[ne](r),s(i,function(t,n,o){return function(t,r,n,o){200===r&&t?e._onSuccess(t,t[V]):o&&e[Ae](t,o)}(r,t,0,o)},!n)):null}function Ze(t){var r;if((0,E.cyL)(t)&&t[V]>0){var n=e[Ee].batchPayloads(t),o=et();return(r={})[U]=n,r.urlString=D,r.headers=o,r.disableXhrSync=ae,r.disableFetchKeepAlive=!ce,r[Me]=t,r}return null}function et(){try{var e=u||{};return(0,m.Qu)(D)&&(e[v.a[6]]=v.a[7]),e}catch(e){}return null}function rt(t){var r=t?t[V]:0;return e[Ee].size()+r>k&&(y&&!y.isOnline()||e[ue](!0,null,10),!0)}function it(t,n,o,i,s,a){var c=null;if(e._appId||(c=(0,R.x)(a))&&c.appId&&(e._appId=c.appId),(t<200||t>=300)&&0!==t){if((301===t||307===t||308===t)&&!st(o))return void e[Ae](n,s);!z&&vt(t)?(ft(n),(0,S.ZP)(e[de](),2,40,". Response code "+t+". Will retry to send "+n[V]+" items.")):e[Ae](n,s)}else y&&!y.isOnline()?z||(ft(n,10),(0,S.ZP)(e[de](),2,40,". Offline - Response Code: ".concat(t,". Offline status: ").concat(!y.isOnline(),". Will retry to send ").concat(n.length," items."))):(st(o),206===t?(c||(c=(0,R.x)(a)),c&&!z?e[De](n,c):e[Ae](n,s)):(r=0,e[xe](n,i)))}function st(e){return!(l>=10||(0,E.hXl)(e)||""===e||e===D||(D=e,++l,0))}function at(e,t){if(!p)return Ye(Ve&&Ve[Ce]([3],!0),e,t);p(e,!1)}function pt(e){try{if(e&&e[V])return(0,E.KgX)(e[0])}catch(e){}return null}function ht(t,r){var n=null;if((0,E.cyL)(t)){for(var o=t[V],i=0;i<t[V];i++)o+=t[i].item[V];return Ve.getSyncFetchPayload()+o<=65e3?n=2:(0,I.Uf)()?n=3:(n=1,(0,S.ZP)(e[de](),2,40,". Failed to send telemetry with Beacon API, retried with xhrSender.")),Ye(Ve&&Ve[Ce]([n],!0),t,r)}return null}function ft(t,n){if(void 0===n&&(n=1),t&&0!==t[V]){var i=e[Ee];i[oe](t),r++;for(var s=0,a=t;s<a.length;s++){var c=a[s];c.cnt=c.cnt||0,c.cnt++,i[X](c)}!function(e){var t;if(r<=1)t=10;else{var n=(Math.pow(2,r)-1)/2,i=Math.floor(Math.random()*n*10)+1;i*=e,t=Math.max(Math.min(i,3600),10)}var s=(0,E.f0d)()+1e3*t;o=s}(n),gt()}}function gt(){if(!a&&!s){var t=o?Math.max(0,o-(0,E.f0d)()):0,r=Math.max(W,t);a=(0,E.dRz)(function(){a=null,e[ue](!0,null,1)},r)}}function mt(){a&&a.cancel(),a=null,o=null}function vt(e){return(0,E.hXl)(He)?401===e||408===e||429===e||500===e||502===e||503===e||504===e:He[V]&&He.indexOf(e)>-1}function yt(){e[he]=null,e[Ee]=null,e._appId=null,e._sample=null,u={},y=null,r=0,o=null,s=!1,a=null,c=null,l=0,qe=0,p=null,A=null,D=null,x=null,k=0,j=!1,$=null,B=!1,H=null,q=lt,z=!1,G=null,Q=lt,ae=!1,ce=!1,Be=!1,le=null,$e=null,Ve=null,(0,E.vF1)(e,"_senderConfig",{g:function(){return(0,w.CP)({},dt)}})}yt(),e.pause=function(){mt(),s=!0},e.resume=function(){s&&(s=!1,o=null,rt(),gt())},e.flush=function(t,r,n){if(void 0===t&&(t=!0),!s){mt();try{return e[ue](t,null,n||1)}catch(t){(0,S.ZP)(e[de](),1,22,"flush failed, telemetry will not be collected: "+(0,w.lL)(t),{exception:(0,E.mmD)(t)})}}},e.onunloadFlush=function(){if(!s)if(j||se)try{return e[ue](!0,at,2)}catch(t){(0,S.ZP)(e[de](),1,20,"failed to flush with beacon sender on page unload, telemetry will not be collected: "+(0,w.lL)(t),{exception:(0,E.mmD)(t)})}else e.flush(!1)},e.addHeader=function(e,t){u[e]=t},e[pe]=function(t,i,s,a){e.isInitialized()&&(0,S.ZP)(e[de](),1,28,"Sender is already initialized"),n[pe](t,i,s,a);var v=e.identifier;c=new ot(i.logger),r=0,o=null,e[he]=null,l=0;var N=e[de]();A=(0,_.Hm)((0,b.Z)("Sender"),i.evtNamespace&&i.evtNamespace()),y=(0,f.G)(A),e._addHook((0,P.a)(t,function(t){var r=t.cfg;r.storagePrefix&&(0,g.vh)(r.storagePrefix);var n=(0,T.i8)(null,r,i).getExtCfg(v,dt);(0,E.vF1)(e,"_senderConfig",{g:function(){return n}}),i.activeStatus()===C.f.PENDING?e.pause():i.activeStatus()===C.f.ACTIVE&&e.resume(),x!==n.endpointUrl&&(D=x=n.endpointUrl),$&&$!==n[fe]&&(0,E.Iuo)($,function(e){delete u[e.header]}),k=n[ge],j=(!1===n[me]||!1===n[ve])&&(0,I.Uf)(),M=!1===n[me]&&(0,I.Uf)(),F=!1===n[ve]&&(0,I.Uf)(),se=n[ye],ae=!!n[Se],He=n.retryCodes;var o=n[ie],s=!!n[we]&&(!!o||(0,g.AN)()),a=n.namePrefix,c=s!==G||s&&Q!==a||s&&K!==o;if(e[Ee]){if(c)try{e._buffer=e._buffer[re](N,n,s)}catch(t){(0,S.ZP)(e[de](),1,12,"failed to transfer telemetry to different buffer storage, telemetry will be lost: "+(0,w.lL)(t),{exception:(0,E.mmD)(t)})}rt()}else e[Ee]=s?new nt(N,n):new tt(N,n);Q=a,G=s,K=o,ce=!n[_e]&&(0,I.R7)(!0),Be=!!n[be],e._sample=new ct(n.samplingPercentage,N),function(e,t){var r=t.disableInstrumentationKeyValidation;return!((0,E.hXl)(r)||!r)||new RegExp("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$").test(e)}(H=n[Pe],r)||(0,S.ZP)(N,1,100,"Invalid Instrumentation key "+H),$=n[fe],(0,E.KgX)(D)&&!(0,m.Qu)(D)&&$&&$[V]>0?(0,E.Iuo)($,function(e){d.addHeader(e.header,e.value)}):$=null,ee=n[Te];var l=function(){var t;try{var r={xdrOnComplete:function(e,t,r){var n=We(r);if(n)return h(e,n)},fetchOnComplete:function(e,t,r,n){var o=We(n);if(o)return it(e.status,o,e.url,o[V],e.statusText,r||"")},xhrOnComplete:function(e,t,r){var n=We(r);if(n)return ze(e,n,n[V])},beaconOnRetry:function(t,r,n){return function(t,r,n){var o=t&&t[Me];if(Be)$e&&$e(o,!0),(0,S.ZP)(e[de](),2,40,". Failed to send telemetry with Beacon API, retried with normal sender.");else{for(var i=[],s=0;s<o[V];s++){var a=o[s],c=[a];n(Ze(c),r)?e._onSuccess(c,c[V]):i[Y](a)}i[V]>0&&($e&&$e(i,!0),(0,S.ZP)(e[de](),2,40,". Failed to send telemetry with Beacon API, retried with normal sender."))}}(t,r,n)}};return(t={})[Te]=ee,t.isOneDs=!1,t.disableCredentials=!1,t[Se]=ae,t.disableBeacon=!F,t.disableBeaconSync=!M,t.senderOnCompleteCallBack=r,t}catch(e){}return null}();Ve?Ve.SetConfig(l):(Ve=new O.v)[pe](l,N);var f=n.httpXHROverride,y=null,_=null,b=(0,w.jL)([3,1,2],n.transports);y=Ve&&Ve[Ce](b,!1);var P=Ve&&Ve.getFallbackInst();le=function(e,t){return Ye(P,e,t)},$e=function(e,t){return Ye(P,e,t,!1)},y=se?f:y||f||P,e[he]=function(e,t){return Ye(y,e,t)},ce&&(p=ht);var R=(0,w.jL)([3,1],n[Ie]);ce||(R=R.filter(function(e){return 2!==e})),_=Ve&&Ve[Ce](R,!0),_=se?f:_||f,(se||n[Ie]||!p)&&_&&(p=function(e,t){return Ye(_,e,t)}),p||(p=le),B=n.disableTelemetry,q=n[Oe]||lt,z=n.isRetryDisabled,W=n[Ne]}))},e.processTelemetry=function(t,r){var n,o=(r=e._getTelCtx(r))[de]();try{if(!Ge(t,o))return;var i=Ke(t,o);if(!i)return;var s=c[Re](i),a=e[Ee];rt(s);var l=((n={})[Z]=s,n.cnt=0,n);a[X](l),gt()}catch(e){(0,S.ZP)(o,2,12,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+(0,w.lL)(e),{exception:(0,E.mmD)(e)})}e.processNext(t,r)},e.isCompletelyIdle=function(){return!s&&0===qe&&0===e._buffer[J]()},e._xhrReadyStateChange=function(e,t,r){if(!pt(t))return ze(e,t,r)},e[ue]=function(t,r,n){var o;if(void 0===t&&(t=!0),!s)try{var i=e[Ee];if(B)i[te]();else{if(i[J]()>0){var a=i.getItems();!function(t,r){var n,o=(n="getNotifyMgr",e.core[n]?e.core[n]():e.core._notificationManager);if(o&&o[Ue])try{o[Ue](t,r)}catch(t){(0,S.ZP)(e[de](),1,74,"send request notification failed: "+(0,w.lL)(t),{exception:(0,E.mmD)(t)})}}(n||0,t),o=r?r.call(e,a,t):e[he](a,t)}new Date}mt()}catch(t){var c=(0,I.L0)();(!c||c>9)&&(0,S.ZP)(e[de](),1,40,"Telemetry transmission failed, some telemetry will be lost: "+(0,w.lL)(t),{exception:(0,E.mmD)(t)})}return o},e.getOfflineSupport=function(){var e;return(e={getUrl:function(){return D},createPayload:Qe})[Re]=Xe,e.batch=Je,e.shouldProcess=function(e){return!!Ge(e)},e},e._doTeardown=function(t,r){e.onunloadFlush(),(0,N.K)(y,!1),yt()},e[Ae]=function(t,r,n){if(!pt(t))return function(t,r){(0,S.ZP)(e[de](),2,26,"Failed to send telemetry.",{message:r}),e._buffer&&e._buffer[oe](t)}(t,r)},e[De]=function(t,r){if(!pt(t))return function(t,r){for(var n=[],o=[],i=0,s=r.errors.reverse();i<s.length;i++){var a=s[i],c=t.splice(a.index,1)[0];vt(a.statusCode)?o[Y](c):n[Y](c)}t[V]>0&&e[xe](t,r[je]),n[V]>0&&e[Ae](n,(0,w.r4)(null,["partial success",r[je],"of",r.itemsReceived].join(" "))),o[V]>0&&(ft(o),(0,S.ZP)(e[de](),2,40,"Partial success. Delivered: "+t[V]+", Failed: "+n[V]+". Will retry to send "+o[V]+" our of "+r[ke]+" items"))}(t,r)},e[xe]=function(t,r){if(!pt(t))return function(t){e._buffer&&e._buffer[oe](t)}(t)},e._xdrOnLoad=function(e,t){if(!pt(t))return h(e,t)}}),d}return(0,o.qU)(t,e),t.constructEnvelope=function(e,t,r,n){var i;return i=t===e.iKey||(0,E.hXl)(t)?e:(0,o.Im)((0,o.Im)({},e),{iKey:t}),(pt[i.baseType]||Qe)(r,i,n)},t}(A.s),ft=r(4484),gt=r(2774),mt=r(8205),vt="instrumentationKey",yt="connectionString",St="instrumentationkey",wt="endpointUrl",Et="ingestionendpoint",_t="userOverrideEndpointUrl",bt=r(9762),Pt={diagnosticLogInterval:(0,y.Lx)(function(e){return e&&e>0},1e4)},Tt=function(){function e(t){var r,o=new gt._;function s(e){e&&(e.baseData=e.baseData||{},e.baseType=e.baseType||"EventData"),o.track(e)}((0,E.hXl)(t)||(0,E.hXl)(t[vt])&&(0,E.hXl)(t[yt]))&&(0,E.$8)("Invalid input configuration"),(0,n.A)(e,this,function(e){function n(){var e=(0,P.e)(t||{},Pt);r=e.cfg,o.addUnloadHook((0,P.a)(e,function(){var e=r[yt];if((0,E.$XS)(e)){var t=(0,mt.c$)(function(t,n){(0,mt.Dv)(e,function(e){var n=e.value,o=r[vt];!e.rejected&&n&&(r[yt]=n,o=(0,ft.H)(n)[St]||o),t(o)})}),n=(0,mt.c$)(function(t,n){(0,mt.Dv)(e,function(e){var n=e.value,o=r[wt];if(!e.rejected&&n){var s=(0,ft.H)(n)[Et];o=s?s+i.wc:o}t(o)})});r[vt]=t,r[wt]=r[_t]||n}if((0,E.KgX)(e)){var o=(0,ft.H)(e),s=o[Et];r[wt]=r[_t]?r[_t]:s+i.wc,r[vt]=o[St]||r[vt]}r[wt]=r[_t]?r[_t]:r[wt]})),o.initialize(r,[new ht])}(0,E.vF1)(e,"config",{g:function(){return r}}),n(),e.initialize=n,e.track=s,(0,w.o$)(e,o,["flush","pollInternalLogs","stopPollingInternalLogs","unload","getPlugin","addPlugin","evtNamespace","addUnloadCb","onCfgChange"])})}return e.__ieDyn=1,e}()},8279(e,t,r){"use strict";r.d(t,{A:()=>j});var n,o=r(269),i="constructor",s="prototype",a="function",c="_dynInstFuncs",l="_isDynProxy",u="_dynClass",d="_dynInstChk",p=d,h="_dfOpts",f="_unknown_",g="__proto__",m="_dyn"+g,v="__dynProto$Gbl",y="_dynInstProto",S="useBaseInst",w="setInstFuncs",E=Object,_=E.getPrototypeOf,b=E.getOwnPropertyNames,P=(0,o.mS$)(),T=P[v]||(P[v]={o:(n={},n[w]=!0,n[S]=!0,n),n:1e3});function C(e){return e&&(e===E[s]||e===Array[s])}function I(e){return C(e)||e===Function[s]}function O(e){var t;if(e){if(_)return _(e);var r=e[g]||e[s]||(e[i]?e[i][s]:null);t=e[m]||r,(0,o.v0u)(e,m)||(delete e[y],t=e[m]=e[y]||e[m],e[y]=r)}return t}function N(e,t){var r=[];if(b)r=b(e);else for(var n in e)"string"==typeof n&&(0,o.v0u)(e,n)&&r.push(n);if(r&&r.length>0)for(var i=0;i<r.length;i++)t(r[i])}function R(e,t,r){return t!==i&&typeof e[t]===a&&(r||(0,o.v0u)(e,t))&&t!==g&&t!==s}function A(e){(0,o.zkd)("DynamicProto: "+e)}function D(e,t){for(var r=e.length-1;r>=0;r--)if(e[r]===t)return!0;return!1}function x(e,t,r,n,i){if(!C(e)){var s=r[c]=r[c]||(0,o.sSX)(null);if(!C(s)){var h=s[t]=s[t]||(0,o.sSX)(null);!1!==s[p]&&(s[p]=!!i),C(h)||N(r,function(t){R(r,t,!1)&&r[t]!==n[t]&&(h[t]=r[t],delete r[t],(!(0,o.v0u)(e,t)||e[t]&&!e[t][l])&&(e[t]=function(e,t){var r=function(){var n=function(e,t,r,n){var i=null;if(e&&(0,o.v0u)(r,u)){var s=e[c]||(0,o.sSX)(null);if((i=(s[r[u]]||(0,o.sSX)(null))[t])||A("Missing ["+t+"] "+a),!i[d]&&!1!==s[p]){for(var l=!(0,o.v0u)(e,t),h=O(e),f=[];l&&h&&!I(h)&&!D(f,h);){var g=h[t];if(g){l=g===n;break}f.push(h),h=O(h)}try{l&&(e[t]=i),i[d]=1}catch(e){s[p]=!1}}}return i}(this,t,e,r)||function(e,t,r){var n=t[e];return n===r&&(n=O(t)[e]),typeof n!==a&&A("["+e+"] is not a "+a),n}(t,e,r);return n.apply(this,arguments)};return r[l]=1,r}(e,t)))})}}}function k(e,t){return(0,o.v0u)(e,s)?e.name||t||f:((e||{})[i]||{}).name||t||f}function j(e,t,r,n){(0,o.v0u)(e,s)||A("theClass is an invalid class definition.");var i=e[s];(function(e,t){if(_){for(var r=[],n=O(t);n&&!I(n)&&!D(r,n);){if(n===e)return!0;r.push(n),n=O(n)}return!1}return!0})(i,t)||A("["+k(e)+"] not in hierarchy of ["+k(t)+"]");var a=null;(0,o.v0u)(i,u)?a=i[u]:(a="_dynCls$"+k(e,"_")+"$"+T.n,T.n++,i[u]=a);var d=j[h],f=!!d[S];f&&n&&void 0!==n[S]&&(f=!!n[S]);var g=function(e){var t=(0,o.sSX)(null);return N(e,function(r){!t[r]&&R(e,r,!1)&&(t[r]=e[r])}),t}(t),m=function(e,t,r,n){function i(e,t,r){var o=t[r];if(o[l]&&n){var i=e[c]||{};!1!==i[p]&&(o=(i[t[u]]||{})[r]||o)}return function(){return o.apply(e,arguments)}}var s=(0,o.sSX)(null);N(r,function(e){s[e]=i(t,r,e)});for(var a=O(e),d=[];a&&!I(a)&&!D(d,a);)N(a,function(e){!s[e]&&R(a,e,!_)&&(s[e]=i(t,a,e))}),d.push(a),a=O(a);return s}(i,t,g,f);r(t,m);var v=!!_&&!!d[w];v&&n&&(v=!!n[w]),x(i,a,t,g,!1!==v)}j[h]=T.o},6781(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.AuthorizationServiceClient=void 0;const o=n(r(2613)),i=n(r(4820));t.AuthorizationServiceClient=class{authService;ownsAuthService;isDisposed=!1;constructor(e,t=!0){this.authService=e,this.ownsAuthService=t,(0,o.default)(e),this.authService=e}async getCredentials(e=i.default.CONTINUE){if(this.isDisposed)throw new Error("Object is disposed");return await this.authService.getCredentials(e)}async checkAuthorization(e,t=i.default.CONTINUE){if((0,o.default)(e),this.isDisposed)throw new Error("Object is disposed");return await this.authService.checkAuthorization(e,t)}dispose(){this.isDisposed=!0,this.ownsAuthService&&this.authService.dispose()}}},1821(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.BE32MessageWriter=t.BE32MessageReader=void 0;const o=r(7123),i=n(r(4820)),s=r(2203),a=r(4622),c=r(5426);class l extends o.AbstractMessageReader{readable;decoder;constructor(e,t){super(),this.readable=e,this.decoder=t}listen(e){this.readable.on("error",e=>this.fireError(e));const t=i.default.create();return(async()=>{try{for(;;){const r=await(0,c.getBufferFrom)(this.readable,4,!0,t.token);if(!r)return void this.fireClose();const n=r.readInt32BE(0),o=await(0,c.getBufferFrom)(this.readable,n,!1,t.token),i=await this.decoder(o);e(i)}}catch(e){this.fireError(e)}})(),o.Disposable.create(()=>t.cancel())}}t.BE32MessageReader=l;class u extends o.AbstractMessageWriter{writable;encoder;semaphore=new a.Semaphore(1);headerBuffer=Buffer.alloc(4);errorCount=0;constructor(e,t){super(),this.writable=e,this.encoder=t,e.on("error",e=>this.fireError([e,void 0,void 0])),e.once("close",()=>this.fireClose())}async write(e){await this.semaphore.use(async()=>{try{const t=await this.encoder(e);this.headerBuffer.writeInt32BE(t.byteLength,0),this.writable instanceof s.Writable&&this.writable.cork();const r=Promise.all([(0,c.writeAsync)(this.writable,this.headerBuffer),(0,c.writeAsync)(this.writable,t)]);this.writable instanceof s.Writable&&this.writable.uncork(),await r}catch(e){this.errorCount++,this.fireError([d(e),void 0,this.errorCount])}})}end(){this.writable.end()}}function d(e){return e instanceof Error?e:new Error(`Writer received error. Reason: ${"string"==typeof e.message?e.message:"unknown"}`)}t.BE32MessageWriter=u},4777(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenAdapters=void 0;const o=n(r(4820)),i=r(7123);t.CancellationTokenAdapters=class{static isVSCode(e){return i.CancellationToken.is(e)}static isCancellationToken(e){return e&&!function(e){return e&&void 0!==e.ImAProxy}(e)&&"function"==typeof e.throwIfCancelled&&"function"==typeof e.onCancelled&&void 0!==e.isCancelled&&void 0!==e.canBeCancelled}static vscodeToCancellationToken(e){if(e.isCancellationRequested)return o.default.CANCELLED;if(e===i.CancellationToken.None)return o.default.CONTINUE;{const t=o.default.create();return e.onCancellationRequested(e=>t.cancel()),t.token}}static cancellationTokenToVSCode(e){if(e.isCancelled)return i.CancellationToken.Cancelled;if(e.canBeCancelled){const t=new i.CancellationTokenSource;return e.onCancelled(e=>t.cancel()),t.token}return i.CancellationToken.None}}},7208(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FrameworkServices=void 0;const n=r(5417),o=r(5539),i=r(9066);class s{static remoteServiceBroker=Object.freeze(new o.ServiceJsonRpcDescriptor(i.ServiceMoniker.create("RemoteServiceBroker"),n.Formatters.Utf8,n.MessageDelimiters.HttpLikeHeaders));static authorization=Object.freeze(new o.ServiceJsonRpcDescriptor(i.ServiceMoniker.create("Microsoft.ServiceHub.Framework.AuthorizationService"),n.Formatters.Utf8,n.MessageDelimiters.HttpLikeHeaders))}t.FrameworkServices=s},8533(e,t){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.IDisposable=void 0,function(e){e.is=function(e){return"function"==typeof e.dispose}}(r||(t.IDisposable=r={}))},691(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IpcRelayServiceBroker=void 0;const n=r(5417),o=r(4434),i=r(7700),s=r(9278),a=r(6928);class c extends o{serviceBroker;static _rpcEventNames=Object.freeze(["availabilityChanged"]);rpcEventNames=c._rpcEventNames;completion;channelsOfferedToClient={};disposed;constructor(e){super(),this.serviceBroker=e,e.on("availabilityChanged",this.onAvailabilityChanged.bind(this)),this.completion=new Promise(e=>this.disposed=e)}handshake(e,t){if(!n.RemoteServiceConnections.contains(e.supportedConnections,n.RemoteServiceConnections.IpcPipe))throw new Error("The client must support IpcPipe to use this service broker.");return Promise.resolve()}async requestServiceChannel(e,t,r){const o=await this.serviceBroker.getPipe(e,t,r);if(!o)return{};const c=(0,i.v4)(),l=a.join(n.PIPE_NAME_PREFIX,(0,i.v4)()),u=(0,s.createServer)(e=>{delete this.channelsOfferedToClient[c],e.pipe(o),o.pipe(e)});return u.listen(l),this.channelsOfferedToClient[c]=u,{requestId:c,pipeName:l}}cancelServiceRequest(e,t){const r=this.channelsOfferedToClient[e];return r?(delete this.channelsOfferedToClient[e],r.close(),Promise.resolve()):Promise.reject("Request to cancel a channel that is not awaiting acceptance.")}dispose(){this.serviceBroker.off("availabilityChanged",this.onAvailabilityChanged.bind(this));for(const e in this.channelsOfferedToClient)this.channelsOfferedToClient[e].close(),delete this.channelsOfferedToClient[e];this.disposed&&this.disposed()}onAvailabilityChanged(e){this.emit("availabilityChanged",e)}}t.IpcRelayServiceBroker=c},5331(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MultiplexingRelayServiceBroker=void 0;const o=r(5417),i=r(4434),s=r(5518),a=r(7208),c=n(r(4901)),l=r(7700);class u extends i{serviceBroker;multiplexingStreamWithClient;multiplexingStreamWithRemoteClientOwned;static _rpcEventNames=Object.freeze(["availabilityChanged"]);channelsOfferedToClient={};completion;rpcEventNames=u._rpcEventNames;disposed;constructor(e,t,r){super(),this.serviceBroker=e,this.multiplexingStreamWithClient=t,this.multiplexingStreamWithRemoteClientOwned=r,e.on("availabilityChanged",this.onAvailabilityChanged.bind(this)),this.completion=new Promise(e=>this.disposed=e)}static async connectToServer(e,t,r){try{const n=await s.MultiplexingStream.CreateAsync(t,void 0,r),o=await n.offerChannelAsync("",void 0,r),i=new u(e,n,!0);return a.FrameworkServices.remoteServiceBroker.constructRpc(i,o),i}catch(e){throw t.end(),e}}handshake(e,t){if(!o.RemoteServiceConnections.contains(e.supportedConnections,o.RemoteServiceConnections.Multiplexing))throw new Error("The client must support multiplexing to use this service broker.");return Promise.resolve()}async requestServiceChannel(e,t,r){const n=(0,l.v4)();(t=t?{...t}:{}).multiplexingStream=this.multiplexingStreamWithClient;const o=await this.serviceBroker.getPipe(e,t,r);if(!o)return{};const i=this.multiplexingStreamWithClient.createChannel();return i.stream.pipe(o),o.pipe(i.stream),this.channelsOfferedToClient[n]=i,(0,c.default)(i.acceptance.finally(()=>delete this.channelsOfferedToClient[n])),{requestId:n,multiplexingChannelId:i.qualifiedId.id}}async cancelServiceRequest(e,t){const r=this.channelsOfferedToClient[e];return r?(r.dispose(),Promise.resolve()):Promise.reject("Request to cancel a channel that is not awaiting acceptance.")}dispose(){this.serviceBroker.off("availabilityChanged",this.onAvailabilityChanged.bind(this)),this.multiplexingStreamWithRemoteClientOwned&&this.multiplexingStreamWithClient.dispose(),this.disposed&&this.disposed()}onAvailabilityChanged(e){this.emit("availabilityChanged",e)}}t.MultiplexingRelayServiceBroker=u},895(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NodeStreamMessageWriter=t.NodeStreamMessageReader=void 0;const n=r(7123);class o extends n.ReadableStreamMessageReader{constructor(e,t){super(new s(e),t)}}t.NodeStreamMessageReader=o;class i extends n.WriteableStreamMessageWriter{constructor(e,t){super(new a(e),t)}}t.NodeStreamMessageWriter=i;class s{stream;constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),n.Disposable.create(()=>this.stream.off("close",e))}onError(e){return this.stream.on("error",e),n.Disposable.create(()=>this.stream.off("error",e))}onEnd(e){return this.stream.on("end",e),n.Disposable.create(()=>this.stream.off("end",e))}onData(e){return this.stream.on("data",e),n.Disposable.create(()=>this.stream.off("data",e))}}class a{stream;constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),n.Disposable.create(()=>this.stream.off("close",e))}onError(e){return this.stream.on("error",e),n.Disposable.create(()=>this.stream.off("error",e))}onEnd(e){return this.stream.on("end",e),n.Disposable.create(()=>this.stream.off("end",e))}write(e,t){return new Promise((r,n)=>{const o=e=>{null==e?r():n(e)};"string"==typeof e?this.stream.write(e,t,o):this.stream.write(e,o)})}end(){this.stream.end()}}},7805(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ProtectedOperation=void 0;const o=n(r(2613));var i;!function(e){e.create=function(e,t){return Object.freeze({operationMoniker:e,requiredTrustLevel:t})},e.isSupersetOf=function(e,t){return(0,o.default)(e),(0,o.default)(t),e.operationMoniker===t.operationMoniker&&(e.requiredTrustLevel===t.requiredTrustLevel||!!e.requiredTrustLevel&&!!t.requiredTrustLevel&&e.requiredTrustLevel>t.requiredTrustLevel)},e.equals=function(e,t){return e===t||!(!e||!t)&&e.operationMoniker===t.operationMoniker&&e.requiredTrustLevel===t.requiredTrustLevel}}(i||(t.ProtectedOperation=i={}))},2052(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RemoteServiceBroker=void 0;const o=n(r(2613)),i=n(r(4820)),s=r(4434),a=r(5518),c=r(6781),l=r(5417),u=r(2945),d=r(4536),p=r(9278),h=r(7208);class f extends s.EventEmitter{serviceBroker;multiplexingStream;static fullConnectionSupport=l.RemoteServiceConnections.Multiplexing|l.RemoteServiceConnections.IpcPipe;static async connectToDuplex(e,t=i.default.CONTINUE){(0,o.default)(e);const r=h.FrameworkServices.remoteServiceBroker.constructRpc(e);return await f.initializeBrokerConnection(r,t)}static async connectToRemoteServiceBroker(e,t=i.default.CONTINUE){return(0,o.default)(e),await f.initializeBrokerConnection(e,t)}static async connectToMultiplexingDuplex(e,t,r=i.default.CONTINUE){(0,o.default)(e);const n=await a.MultiplexingStream.CreateAsync(e,t,r),s=await n.acceptChannelAsync("",void 0,r),c=h.FrameworkServices.remoteServiceBroker.constructRpc(s.stream),l=await this.connectToMultiplexingRemoteServiceBroker(c,n,r);return l.ownsMxStream=!0,l}static async connectToMultiplexingRemoteServiceBroker(e,t,r=i.default.CONTINUE){(0,o.default)(e),(0,o.default)(t);const n={supportedConnections:f.fullConnectionSupport},s=await f.initializeBrokerConnection(e,r,n,t);return s.ownsMxStream=!1,s}static async initializeBrokerConnection(e,t=i.default.CONTINUE,r,n){if(!r){let e=this.fullConnectionSupport;n||(e&=~l.RemoteServiceConnections.Multiplexing),r={supportedConnections:e}}try{await e.handshake(r,t)}catch(t){const r=e;throw"function"==typeof r.dispose&&r.dispose(),t}return new f(e,r,n)}isDisposed=!1;ownsMxStream=!1;defaultClientCulture="en-US";defaultClientUICulture="en-US";authorizationClient;constructor(e,t,r){super(),this.serviceBroker=e,this.multiplexingStream=r,(0,o.default)(e),(0,o.default)(t),l.RemoteServiceConnections.contains(t.supportedConnections,l.RemoteServiceConnections.Multiplexing)&&(0,o.default)(r),this.serviceBroker.on("availabilityChanged",e=>{this.emit("availabilityChanged",e)})}setAuthorizationService(e){(0,o.default)(e),this.authorizationClient?.dispose(),this.authorizationClient=new c.AuthorizationServiceClient(e)}async getProxy(e,t,r=i.default.CONTINUE){let n;(0,o.default)(e),t=t?{...t}:{clientCulture:this.defaultClientCulture,clientUICulture:this.defaultClientUICulture},await this.applyAuthorization(t,r),delete t.multiplexingStream;let s={};try{if(s=await this.serviceBroker.requestServiceChannel(e.moniker,t,r),!s||u.RemoteServiceConnectionInfo.isEmpty(s))return null;if(s.multiplexingChannelId&&this.multiplexingStream)n=await this.multiplexingStream.acceptChannel(s.multiplexingChannelId);else{if(!s.pipeName)throw new Error("Unsupported connection type");{const e="win32"!==process.platform||s.pipeName.startsWith(l.PIPE_NAME_PREFIX)?s.pipeName:l.PIPE_NAME_PREFIX+s.pipeName;n=(0,p.createConnection)(e)}}}catch(e){throw(0,d.isReadWriteStream)(n)?n.end():(0,d.isChannel)(n)&&n.dispose(),s?.requestId&&await this.serviceBroker.cancelServiceRequest(s.requestId,r),e}return e.constructRpc(t?.clientRpcTarget,n)}async getPipe(e,t,r=i.default.CONTINUE){if((0,o.default)(e),t=t?{...t}:{clientCulture:this.defaultClientCulture,clientUICulture:this.defaultClientUICulture},await this.applyAuthorization(t,r),delete t.multiplexingStream,t.clientRpcTarget)throw new Error("Cannot connect pipe to service with client RPC target");let n={},s=null,a=null;try{if(n=await this.serviceBroker.requestServiceChannel(e,t,r),!n||u.RemoteServiceConnectionInfo.isEmpty(n))return null;if(!n.multiplexingChannelId||!this.multiplexingStream)throw n.pipeName?new Error("Cannot connect to named pipe"):new Error("Unsupported connection type");return a=await this.multiplexingStream.acceptChannel(n.multiplexingChannelId),s=a.stream,s}catch(e){throw a?.dispose(),s?.end(),!s&&n?.requestId&&await this.serviceBroker.cancelServiceRequest(n.requestId,r),e}}dispose(){this.isDisposed=!0,this.serviceBroker.removeAllListeners(l.availabilityChangedEvent);const e=this.serviceBroker;"function"==typeof e.dispose&&e.dispose(),this.authorizationClient?.dispose(),this.multiplexingStream&&this.ownsMxStream&&this.multiplexingStream.dispose()}async applyAuthorization(e,t){this.authorizationClient&&!e.clientCredentials&&(e.clientCredentials=await this.authorizationClient.getCredentials(t))}}t.RemoteServiceBroker=f},2945(e,t){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.RemoteServiceConnectionInfo=void 0,function(e){e.isEmpty=function(e){return!e.multiplexingChannelId&&!e.requestId&&!e.pipeName},e.isOneOf=function(e,t){return!!e.multiplexingChannelId&&t.indexOf("multiplexing")>-1}}(r||(t.RemoteServiceConnectionInfo=r={}))},5539(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.JsonRpcConnection=t.ServiceJsonRpcDescriptor=void 0;const s=r(2067),a=r(5417),c=r(9066),l=r(4525),u=r(4536),d=r(1821),p=i(r(8018)),h=r(5518),f=r(2203),g=r(895),m=r(2097);class v extends l.ServiceRpcDescriptor{formatter;messageDelimiter;protocol="json-rpc";multiplexingStreamOptions;connectionFactory;constructor(e,t,r,n){let o,i;switch(super(e),this.formatter=t,this.messageDelimiter=r,t){case a.Formatters.Utf8:o=e=>Promise.resolve(Buffer.from(JSON.stringify(e))),i=e=>JSON.parse(e.toString());break;case a.Formatters.MessagePack:o=e=>Promise.resolve(p.encode(e)),i=e=>p.decode(e);break;default:throw new Error(`Unsupported formatter: ${t}.`)}if(this.multiplexingStreamOptions=void 0===n?void 0:Object.freeze(n),r===a.MessageDelimiters.HttpLikeHeaders){if(t!==a.Formatters.Utf8)throw new Error("Utf8 is the only formatter supported while using HttpLikeHeaders.");this.connectionFactory=e=>(0,s.createMessageConnection)(new g.NodeStreamMessageReader(e),new g.NodeStreamMessageWriter(e))}else{if(r!==a.MessageDelimiters.BigEndianInt32LengthHeader)throw new Error(`Unsupported message delimiter: ${r}.`);this.connectionFactory=e=>(0,s.createMessageConnection)(new d.BE32MessageReader(e,i),new d.BE32MessageWriter(e,o))}}constructRpcConnection(e){if(this.multiplexingStreamOptions){const t=this.createSeedChannels();let r=(0,u.isChannel)(e)?e.stream:e;const n=h.MultiplexingStream.Create(r,t),o=n.acceptChannel(0);return o.completion.finally(()=>n.dispose()),new S((0,u.constructMessageConnection)(o,this.connectionFactory))}return new S((0,u.constructMessageConnection)(e,this.connectionFactory))}equals(e){return!!(e&&e instanceof v)&&!!c.ServiceMoniker.equals(e.moniker,this.moniker)&&this.formatter===e.formatter&&this.messageDelimiter===e.messageDelimiter}createSeedChannels(){if(void 0===this.multiplexingStreamOptions)throw new Error("multiplexingStreamOptions unset.");if(void 0===this.multiplexingStreamOptions.seededChannels||0===this.multiplexingStreamOptions.seededChannels.length){const e=(0,u.clone)(this.multiplexingStreamOptions);return e.seededChannels=[{}],e.protocolMajorVersion=3,e}return this.multiplexingStreamOptions}}t.ServiceJsonRpcDescriptor=v;const y={get:(e,t)=>{switch(t.toString()){case"dispose":return function(){e.messageConnection.dispose()};case"_jsonRpc":return e.messageConnection;case"then":return;case"on":return function(t,r){return e.eventEmitter.on(t,r),e};case"once":return function(t,r){return e.eventEmitter.once(t,r),e};case"prependListener":return function(t,r){return e.eventEmitter.prependListener(t,r),e};case"prependOnceListener":return function(t,r){return e.eventEmitter.prependOnceListener(t,r),e};case"addListener":return function(t,r){return e.eventEmitter.addListener(t,r),e};case"rawListeners":return e.eventEmitter.rawListeners;case"removeAllListeners":return function(t){return e.eventEmitter.removeAllListeners(t),e};case"removeListener":return function(t,r){return e.eventEmitter.removeListener(t,r),e};case"off":return function(t,r){return e.eventEmitter.off(t,r),e};case"listenerCount":return e.eventEmitter.listenerCount;case"getMaxListeners":return e.eventEmitter.getMaxListeners;case"setMaxListeners":return function(t){return e.eventEmitter.setMaxListeners(t),e};case"eventNames":return function(){return e.eventEmitter.eventNames(),e};case"emit":return function(t,r){return e.eventEmitter.emit(t,r),e};default:return function(){const r=t.toString();return(0,m.invokeRpc)(r,arguments,e.messageConnection)}}}};class S extends l.RpcConnection{messageConnection;constructor(e){super(),this.messageConnection=e}addLocalRpcTarget(e){if((0,m.registerInstanceMethodsAsRpcTargets)(e,this.messageConnection),l.RpcConnection.IsRpcEventServer(e))for(let t of e.rpcEventNames)e.on(t,(...e)=>{this.messageConnection.sendNotification(t,s.ParameterStructures.byPosition,...e)});"function"==typeof e.dispose&&this.messageConnection.onDispose(()=>e.dispose())}constructRpcClient(){const e={messageConnection:this.messageConnection,eventEmitter:new f.EventEmitter};return this.messageConnection.onNotification((t,r)=>Array.isArray(r)?e.eventEmitter.emit(t,...r):e.eventEmitter.emit(t,r)),new Proxy(e,y)}startListening(){this.messageConnection?.listen()}dispose(){}}t.JsonRpcConnection=S},9066(e,t){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.ServiceMoniker=void 0,function(e){function t(e){return e.version?`${e.name} (${e.version})`:e.name}function r(){return t(this)}e.create=function(e,t){if(!e||""===e)throw new Error("name cannot be empty.");return Object.freeze({name:e,version:t,toString:r})},e.equals=function(e,t){return e===t||!(!e||!t)&&e.name===t.name&&e.version===t.version},e.toString=t}(r||(t.ServiceMoniker=r={}))},4525(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.RpcConnection=t.ServiceRpcDescriptor=void 0;const o=n(r(2613));t.ServiceRpcDescriptor=class{moniker;constructor(e){this.moniker=e,(0,o.default)(e)}constructRpc(e,t){let r;if(t?r=e:t=e,void 0===t)throw new Error("No pipe supplied.");const n=this.constructRpcConnection(t);void 0!==r&&n.addLocalRpcTarget(r);const o=n.constructRpcClient();return n.startListening(),o}},t.RpcConnection=class{static IsRpcEventServer(e){return e.rpcEventNames&&e.on}}},5417(e,t){"use strict";var r,n,o;Object.defineProperty(t,"__esModule",{value:!0}),t.PIPE_NAME_PREFIX=t.availabilityChangedEvent=t.RemoteServiceConnections=t.MessageDelimiters=t.Formatters=void 0,function(e){e[e.Utf8=0]="Utf8",e[e.MessagePack=1]="MessagePack"}(r||(t.Formatters=r={})),function(e){e[e.HttpLikeHeaders=0]="HttpLikeHeaders",e[e.BigEndianInt32LengthHeader=1]="BigEndianInt32LengthHeader"}(n||(t.MessageDelimiters=n={})),function(e){e[e.None=0]="None",e[e.Multiplexing=1]="Multiplexing",e[e.IpcPipe=2]="IpcPipe",e[e.ClrActivation=8]="ClrActivation"}(o||(t.RemoteServiceConnections=o={})),function(e){function t(t){let r=e.None;for(const n of t.split(","))switch(n.trim()){case"None":break;case"Multiplexing":r|=e.Multiplexing;break;case"IpcPipe":r|=e.IpcPipe;break;case"ClrActivation":r|=e.ClrActivation;break;default:throw new Error(`unrecognized element '${n.trim()}'.`)}return r}e.contains=function(e,r){return"string"==typeof e&&(e=t(e)),(e&r)===r},e.parse=t}(o||(t.RemoteServiceConnections=o={})),t.availabilityChangedEvent="availabilityChanged",t.PIPE_NAME_PREFIX="win32"===process.platform?"\\\\.\\pipe\\":"/tmp/"},8809(e,t){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.ClientCredentialsPolicy=void 0,function(e){e[e.requestOverridesDefault=0]="requestOverridesDefault",e[e.filterOverridesRequest=1]="filterOverridesRequest"}(r||(t.ClientCredentialsPolicy=r={}))},3255(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalBrokeredServiceContainer=void 0;const s=i(r(9568)),a=r(1758),c=r(7883),l=r(30),u=r(6433),d=r(2522),p=r(8809),h=r(6645),f=r(3003),g=r(7569),m=r(9066);class v{static preferredSourceOrderForRemoteServices=[a.ServiceSource.trustedServer,a.ServiceSource.untrustedServer];static preferredSourceOrderForLocalServices=[a.ServiceSource.sameProcess,a.ServiceSource.otherProcessOnSameMachine];remoteSources=s.Map();profferedServiceIndex=s.Map();registeredServices=s.Map();localUserCredentials=s.Map();constructor(){}register(e){let t=this.registeredServices;const r=e.map(e=>({moniker:g.ServiceMonikerValue.from(e.moniker),registration:e.registration}));r.forEach(e=>{if(this.registeredServices.has(e.moniker))throw new Error(`${m.ServiceMoniker.toString(e.moniker)} is already registered.`);t=t.set(e.moniker,e.registration)}),this.registeredServices=t;let n=!1;return{dispose:()=>{n||(r.forEach(e=>this.registeredServices=this.registeredServices.delete(e.moniker)),n=!0)}}}profferServiceFactory(e,t){return this.profferInternal(new l.ProfferedServiceFactory(this,e,t))}profferServiceBroker(e,t){return this.profferInternal(new f.ProfferedServiceBroker(this,e,a.ServiceSource.sameProcess,t))}profferRemoteServiceBroker(e,t,r,n){if(r===a.ServiceSource.sameProcess)throw new Error("Use the proffer method for local services when they are in the same process.");return this.profferInternal(new h.ProfferedRemoteServiceBroker(this,e,t,r,this.getAllowedMonikers(r,n?.map(g.ServiceMonikerValue.from)??null)))}getFullAccessServiceBroker(){return new c.View(this,u.ServiceAudience.process,this.localUserCredentials,p.ClientCredentialsPolicy.requestOverridesDefault)}getLimitedAccessServiceBroker(e,t,r){return new c.View(this,e,t,r)}static isLocalConsumer(e){return(e&~u.ServiceAudience.local)===u.ServiceAudience.none}getSecureServiceBroker(e){return new c.View(this,u.ServiceAudience.process,e?.clientCredentials?s.Map(e.clientCredentials):s.Map(),p.ClientCredentialsPolicy.requestOverridesDefault)}getServiceRegistration(e){let t=this.registeredServices.get(e);if(t)return{registration:t,matchingMoniker:e};if(e.version){const t=new g.ServiceMonikerValue(e.name);return this.getServiceRegistration(t)}return null}async getProfferingSource(e,t){const r=g.ServiceMonikerValue.from(e),{registration:n,matchingMoniker:o}=this.getServiceRegistration(r)||{};if(!n||!o)return{errorCode:d.MissingBrokeredServiceErrorCode.notLocallyRegistered};if(v.isLocalConsumer(t),!n.isExposedTo(t))return{errorCode:d.MissingBrokeredServiceErrorCode.serviceAudienceMismatch};if(n.profferCallback){if("function"==typeof n.profferCallback){const t=n.profferCallback(this,e);n.profferCallback=t||void 0}await n.profferCallback}for(const e of v.preferredSourceOrderForLocalServices){const t=this.profferedServiceIndex.get(e);if(t){const e=t.get(o);if(e)return{proffered:e,errorCode:d.MissingBrokeredServiceErrorCode.noExplanation}}}return{errorCode:d.MissingBrokeredServiceErrorCode.serviceFactoryNotProffered}}removeRegistrations(e){const t=this.profferedServiceIndex;switch(e.source){case a.ServiceSource.sameProcess:case a.ServiceSource.otherProcessOnSameMachine:let t=this.profferedServiceIndex.get(e.source);t&&(t=t.removeAll(e.monikers),this.profferedServiceIndex=this.profferedServiceIndex.set(e.source,t));break;default:this.profferedServiceIndex=this.profferedServiceIndex.remove(e.source),this.remoteSources=this.remoteSources.remove(e.source)}this.onAvailabilityChanged(t,e)}onAvailabilityChanged(e,t,r){}getAllowedMonikers(e,t){const r=v.convertRemoteSourceToLocalAudience(e),n=[];if(null===t)for(let[t,o]of this.registeredServices)(o.audience&r)!==r&&e!==a.ServiceSource.otherProcessOnSameMachine||n.push(t);else for(let o of t){const t=this.registeredServices.get(o);!t||(t.audience&r)!==r&&e!==a.ServiceSource.otherProcessOnSameMachine||n.push(o)}return n}static convertRemoteSourceToLocalAudience(e){switch(e){case a.ServiceSource.otherProcessOnSameMachine:return u.ServiceAudience.local;case a.ServiceSource.trustedServer:case a.ServiceSource.untrustedServer:return u.ServiceAudience.liveShareGuest;default:throw new Error(`Source not recognized: ${e}`)}}profferInternal(e){const t=this.profferedServiceIndex;e.source>a.ServiceSource.otherProcessOnSameMachine&&this.remoteSources.set(e.source,e);let r=this.profferedServiceIndex.get(e.source)??s.Map();const n=[];if(e.monikers.forEach(t=>{if(this.registeredServices.has(t)||n.push(t),r.has(t))throw new Error(`${m.ServiceMoniker.toString(t)} is already proffered.`);r=r.set(t,e)}),n.length>0)throw new Error(`Cannot proffer unregistered service(s): ${n.map(e=>m.ServiceMoniker.toString(e)).join(", ")}`);return this.profferedServiceIndex=this.profferedServiceIndex.set(e.source,r),this.onAvailabilityChanged(t,e),e}}t.GlobalBrokeredServiceContainer=v},2522(e,t){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.MissingBrokeredServiceErrorCode=void 0,function(e){e[e.noExplanation=0]="noExplanation",e[e.notLocallyRegistered=1]="notLocallyRegistered",e[e.chaosConfigurationDeniedRequest=2]="chaosConfigurationDeniedRequest",e[e.serviceAudienceMismatch=3]="serviceAudienceMismatch",e[e.serviceFactoryNotProffered=4]="serviceFactoryNotProffered",e[e.serviceFactoryReturnedNull=5]="serviceFactoryReturnedNull",e[e.serviceFactoryFault=6]="serviceFactoryFault",e[e.localServiceHiddenOnRemoteClient=7]="localServiceHiddenOnRemoteClient"}(r||(t.MissingBrokeredServiceErrorCode=r={}))},6645(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProfferedRemoteServiceBroker=void 0;const n=r(4434),o=r(2052),i=r(7569);class s extends n.EventEmitter{container;remoteServiceBroker;multiplexingStream;source;serviceBroker;monikers;constructor(e,t,r,n,s){super(),this.container=e,this.remoteServiceBroker=t,this.multiplexingStream=r,this.source=n,this.monikers=s.map(i.ServiceMonikerValue.from),this.serviceBroker=new Promise(async(e,n)=>{try{e(r?await o.RemoteServiceBroker.connectToMultiplexingRemoteServiceBroker(t,r):await o.RemoteServiceBroker.connectToRemoteServiceBroker(t))}catch(e){n(e)}}),this.remoteServiceBroker.on("availabilityChanged",this.onAvailabilityChanged)}async getProxy(e,t,r){const n=await this.serviceBroker;return await n.getProxy(e,t,r)}async getPipe(e,t,r){const n=await this.serviceBroker;return await n.getPipe(e,t,r)}handshake(e,t){return this.remoteServiceBroker.handshake(e,t)}requestServiceChannel(e,t,r){return this.remoteServiceBroker.requestServiceChannel(e,t,r)}cancelServiceRequest(e,t){return this.remoteServiceBroker.cancelServiceRequest(e,t)}dispose(){this.remoteServiceBroker.off("availabilityChanged",this.onAvailabilityChanged),this.container.removeRegistrations(this)}onAvailabilityChanged(e){this.container.onAvailabilityChanged(null,this,e.impactedServices),this.emit("availabilityChanged",e)}}t.ProfferedRemoteServiceBroker=s},3003(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProfferedServiceBroker=void 0;const n=r(4434),o=r(8257),i=r(7569);class s extends n.EventEmitter{container;serviceBroker;source;monikers;remoteServiceBrokerWrapper;constructor(e,t,r,n){super(),this.container=e,this.serviceBroker=t,this.source=r,this.monikers=n.map(i.ServiceMonikerValue.from),this.serviceBroker.on("availabilityChanged",this.onAvailabilityChanged),this.remoteServiceBrokerWrapper=new o.RemoteServiceBrokerWrapper(this)}getProxy(e,t,r){return this.serviceBroker.getProxy(e,t,r)}getPipe(e,t,r){return this.serviceBroker.getPipe(e,t,r)}handshake(e,t){return this.remoteServiceBrokerWrapper.handshake(e,t)}requestServiceChannel(e,t,r){return this.remoteServiceBrokerWrapper.requestServiceChannel(e,t,r)}cancelServiceRequest(e,t){return this.remoteServiceBrokerWrapper.cancelServiceRequest(e,t)}dispose(){this.serviceBroker.off("availabilityChanged",this.onAvailabilityChanged),this.container.removeRegistrations(this)}onAvailabilityChanged(e){this.container.onAvailabilityChanged(null,this,e.impactedServices),this.emit("availabilityChanged",e)}}t.ProfferedServiceBroker=s},30(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ProfferedServiceFactory=void 0;const o=n(r(4820)),i=r(4434),s=r(5518),a=r(8257),c=r(7569),l=r(1758);class u extends i.EventEmitter{container;descriptor;factory;source=l.ServiceSource.sameProcess;monikers;remoteServiceBrokerWrapper;constructor(e,t,r){super(),this.container=e,this.descriptor=t,this.factory=r,this.monikers=Object.freeze([new c.ServiceMonikerValue(t.moniker)]),this.remoteServiceBrokerWrapper=new a.RemoteServiceBrokerWrapper(this)}async getProxy(e,t,r){r?.throwIfCancelled();const n=this.container.getSecureServiceBroker(t),i=await this.invokeFactory(n,e.moniker,t??{},r??o.default.CONTINUE);if(!i)return null;switch(typeof i.dispose){case"undefined":i.dispose=function(){};break;case"function":break;default:throw new Error(`Service has a dispose property of type ${typeof i.dispose} instead of a function.`)}return i}async getPipe(e,t,r){r?.throwIfCancelled();const n=s.FullDuplexStream.CreatePair(),i=this.container.getSecureServiceBroker(t),a=this.descriptor.constructRpcConnection(n.first),c=await this.invokeFactory(i,e,t??{},r??o.default.CONTINUE);try{return c?(a.addLocalRpcTarget(c),a.startListening(),n.second):(a.dispose(),null)}catch(e){throw"function"==typeof c?.dispose&&c.dispose(),e}}handshake(e,t){return this.remoteServiceBrokerWrapper.handshake(e,t)}requestServiceChannel(e,t,r){return this.remoteServiceBrokerWrapper.requestServiceChannel(e,t,r)}cancelServiceRequest(e,t){return this.remoteServiceBrokerWrapper.cancelServiceRequest(e,t)}dispose(){this.container.removeRegistrations(this)}invokeFactory(e,t,r,n){return this.container.getServiceRegistration(c.ServiceMonikerValue.from(t))?.registration.allowGuestClients,this.factory(t,r,e,n)}}t.ProfferedServiceFactory=u},8257(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RemoteServiceBrokerWrapper=void 0;const n=r(691);class o extends n.IpcRelayServiceBroker{}t.RemoteServiceBrokerWrapper=o},6433(e,t){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.ServiceAudience=void 0,function(e){e[e.none=0]="none",e[e.process=1]="process",e[e.local=3]="local",e[e.liveShareGuest=1024]="liveShareGuest",e[e.allClientsIncludingGuests=1027]="allClientsIncludingGuests"}(r||(t.ServiceAudience=r={}))},7569(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ServiceMonikerValue=void 0;const o=n(r(5459));class i{name;version;hash;constructor(e,t){"string"==typeof e?(this.name=e,this.version=t):(this.name=e.name,this.version=e.version)}equals(e){return e&&e.name===this.name&&e.version===this.version}hashCode(){return this.hash??=(0,o.default)(this.name)+(0,o.default)(this.version??""),this.hash}static from(e){return e instanceof i?e:new i(e)}}t.ServiceMonikerValue=i},4954(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ServiceRegistration=void 0;const n=r(6433);t.ServiceRegistration=class{audience;allowGuestClients;profferCallback;constructor(e,t,r){this.audience=e,this.allowGuestClients=t,this.profferCallback=r}get isExposedLocally(){return(this.audience&n.ServiceAudience.local)!==n.ServiceAudience.none}get isExposedRemotely(){return(this.audience&n.ServiceAudience.liveShareGuest)!==n.ServiceAudience.none}isExposedTo(e){return(e&this.audience)===e}}},1758(e,t){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.ServiceSource=void 0,function(e){e[e.sameProcess=0]="sameProcess",e[e.otherProcessOnSameMachine=1]="otherProcessOnSameMachine",e[e.trustedServer=2]="trustedServer",e[e.untrustedServer=3]="untrustedServer"}(r||(t.ServiceSource=r={}))},7883(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.View=void 0;const n=r(4434),o=r(5417),i=r(8809);class s extends n.EventEmitter{container;audience;clientCredentials;clientCredentialsPolicy;clientCulture;clientUICulture;constructor(e,t,r,n,o,i){super(),this.container=e,this.audience=t,this.clientCredentials=r,this.clientCredentialsPolicy=n,this.clientCulture=o,this.clientUICulture=i}async getProxy(e,t,r){r?.throwIfCancelled(),t=this.applyOptionsFilter(t);const n=await this.container.getProfferingSource(e.moniker,this.audience);return n?.proffered?await n.proffered.getProxy(e,t,r):null}async getPipe(e,t,r){r?.throwIfCancelled(),t=this.applyOptionsFilter(t);const n=await this.container.getProfferingSource(e,this.audience);return n?.proffered?await n.proffered.getPipe(e,t,r):null}handshake(e,t){if(!o.RemoteServiceConnections.contains(e.supportedConnections,o.RemoteServiceConnections.IpcPipe))throw new Error("We only support pipes.");return Promise.resolve()}async requestServiceChannel(e,t,r){r?.throwIfCancelled(),t=this.applyOptionsFilter(t);const n=await this.container.getProfferingSource(e,this.audience);return n?.proffered?n.proffered.requestServiceChannel(e,t,r):Promise.resolve({})}cancelServiceRequest(e,t){throw new Error("Not yet implemented.")}applyOptionsFilter(e){const{...t}=e??{};return this.clientCredentialsPolicy!==i.ClientCredentialsPolicy.filterOverridesRequest&&0!==(t.clientCredentials?.length??0)||(t.clientCredentials=this.clientCredentials.toObject()),t.clientCulture=this.clientCulture,t.clientUICulture=this.clientUICulture,t}}t.View=s},996(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClientCredentialsPolicy=t.ServiceSource=t.ServiceRegistration=t.ServiceAudience=t.GlobalBrokeredServiceContainer=void 0;var n=r(3255);Object.defineProperty(t,"GlobalBrokeredServiceContainer",{enumerable:!0,get:function(){return n.GlobalBrokeredServiceContainer}});var o=r(6433);Object.defineProperty(t,"ServiceAudience",{enumerable:!0,get:function(){return o.ServiceAudience}});var i=r(4954);Object.defineProperty(t,"ServiceRegistration",{enumerable:!0,get:function(){return i.ServiceRegistration}});var s=r(1758);Object.defineProperty(t,"ServiceSource",{enumerable:!0,get:function(){return s.ServiceSource}});var a=r(8809);Object.defineProperty(t,"ClientCredentialsPolicy",{enumerable:!0,get:function(){return a.ClientCredentialsPolicy}})},4084(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.Observer=t.ServiceRpcDescriptor=t.ServiceMoniker=t.JsonRpcConnection=t.ServiceJsonRpcDescriptor=t.RemoteServiceConnectionInfo=t.RemoteServiceBroker=t.ProtectedOperation=t.MultiplexingRelayServiceBroker=t.RpcMarshalable=t.IpcRelayServiceBroker=t.IDisposable=t.AuthorizationServiceClient=t.RemoteServiceConnections=t.MessageDelimiters=t.Formatters=void 0;var i=r(5417);Object.defineProperty(t,"Formatters",{enumerable:!0,get:function(){return i.Formatters}}),Object.defineProperty(t,"MessageDelimiters",{enumerable:!0,get:function(){return i.MessageDelimiters}}),Object.defineProperty(t,"RemoteServiceConnections",{enumerable:!0,get:function(){return i.RemoteServiceConnections}}),o(r(7208),t);var s=r(6781);Object.defineProperty(t,"AuthorizationServiceClient",{enumerable:!0,get:function(){return s.AuthorizationServiceClient}});var a=r(8533);Object.defineProperty(t,"IDisposable",{enumerable:!0,get:function(){return a.IDisposable}});var c=r(691);Object.defineProperty(t,"IpcRelayServiceBroker",{enumerable:!0,get:function(){return c.IpcRelayServiceBroker}});var l=r(339);Object.defineProperty(t,"RpcMarshalable",{enumerable:!0,get:function(){return l.RpcMarshalable}});var u=r(5331);Object.defineProperty(t,"MultiplexingRelayServiceBroker",{enumerable:!0,get:function(){return u.MultiplexingRelayServiceBroker}});var d=r(7805);Object.defineProperty(t,"ProtectedOperation",{enumerable:!0,get:function(){return d.ProtectedOperation}});var p=r(2052);Object.defineProperty(t,"RemoteServiceBroker",{enumerable:!0,get:function(){return p.RemoteServiceBroker}});var h=r(2945);Object.defineProperty(t,"RemoteServiceConnectionInfo",{enumerable:!0,get:function(){return h.RemoteServiceConnectionInfo}});var f=r(5539);Object.defineProperty(t,"ServiceJsonRpcDescriptor",{enumerable:!0,get:function(){return f.ServiceJsonRpcDescriptor}}),Object.defineProperty(t,"JsonRpcConnection",{enumerable:!0,get:function(){return f.JsonRpcConnection}});var g=r(9066);Object.defineProperty(t,"ServiceMoniker",{enumerable:!0,get:function(){return g.ServiceMoniker}});var m=r(4525);Object.defineProperty(t,"ServiceRpcDescriptor",{enumerable:!0,get:function(){return m.ServiceRpcDescriptor}});var v=r(4074);Object.defineProperty(t,"Observer",{enumerable:!0,get:function(){return v.Observer}}),o(r(996),t)},339(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IJsonRpcMarshaledObject=t.MarshaledObjectProxy=t.RpcMarshalable=t.registerReleaseMarshaledObjectCallback=void 0;const n=r(7123),o=r(2097),i="$/releaseMarshaledObject";function s(e,t,r){return void 0===r?`$/invokeProxy/${e}/${t}`:`$/invokeProxy/${e}/${r}.${t}`}var a,c;t.registerReleaseMarshaledObjectCallback=function(e){e.onNotification(i,t=>{const r=Array.isArray(t)?{handle:t[0],ownedBySender:t[1]}:t,n=e;if(n._marshaledObjectTracker){const e=r.ownedBySender?n._marshaledObjectTracker.theirsByHandle:n._marshaledObjectTracker.ownByHandle;e[r.handle]?.dispose()}})},function(e){e.is=function(e){const t=e;return"string"==typeof t?._jsonRpcMarshalableLifetime}}(a||(t.RpcMarshalable=a={})),function(e){e.is=function(e){const t=e;return"number"==typeof t?._jsonrpcMarshaledHandle}}(c||(t.MarshaledObjectProxy=c={}));const l={get:(e,t)=>{switch(t.toString()){case"dispose":return e.dispose;case"_jsonrpcMarshaledHandle":return e._jsonrpcMarshaledHandle;case"then":case"toJSON":return;default:return function(){const r=s(e._jsonrpcMarshaledHandle,t.toString());return(0,o.invokeRpc)(r,arguments,e.messageConnection)}}}};function u(e){const t=e;return t._marshaledObjectTracker??={counter:0,ownByHandle:{},theirsByHandle:{},ownTrackedObjectHandles:new WeakMap},t._marshaledObjectTracker}var d;!function(e){e.is=function(e){const t=e;return"number"==typeof t?.__jsonrpc_marshaled&&"number"==typeof t.handle},e.wrap=function(e,t){const r=u(t);if(c.is(e))return{__jsonrpc_marshaled:0,handle:e._jsonrpcMarshaledHandle};{if("call"===e._jsonRpcMarshalableLifetime)throw new Error("Receiving marshaled objects scoped to the lifetime of a single RPC request is not yet supported.");const n=r.ownTrackedObjectHandles.has(e),i=n?r.ownTrackedObjectHandles.get(e):++r.counter;if(!n){r.ownTrackedObjectHandles.set(e,i);const n=(0,o.registerInstanceMethodsAsRpcTargets)(e,t,e=>s(i,e));r.ownByHandle[i]={target:e,dispose:()=>{n.dispose(),delete r.ownByHandle[i],r.ownTrackedObjectHandles.delete(e),"dispose"in e&&"function"==typeof e.dispose&&e.dispose()}}}return{__jsonrpc_marshaled:1,handle:i,lifetime:e._jsonRpcMarshalableLifetime,optionalInterfaces:e._jsonRpcOptionalInterfaces}}},e.cancelWrap=function(e,t){const r=u(t).ownByHandle[e.handle];r?.dispose()},e.unwrap=function(e,t){if("call"===e.lifetime)throw new Error("Receiving marshaled objects scoped to the lifetime of a single RPC request is not yet supported.");const r=u(t);switch(e.__jsonrpc_marshaled){case 1:let o=r.theirsByHandle[e.handle]?.proxy;if(!o){const s={messageConnection:t,_jsonrpcMarshaledHandle:e.handle,dispose:()=>{if(r.theirsByHandle[e.handle]){delete r.theirsByHandle[e.handle];const o={handle:e.handle,ownedBySender:!1};t.sendNotification(i,n.ParameterStructures.byName,o)}}};o=new Proxy(s,l),r.theirsByHandle[e.handle]={proxy:o,dispose:()=>{delete r.theirsByHandle[e.handle]}}}return o;case 0:const s=r.ownByHandle[e.handle];if(!s)throw new Error(`Unrecognized handle ${e.handle}`);return s.target;default:throw new Error(`Unsupported value for __jsonrpc_marshaled: ${e.__jsonrpc_marshaled}.`)}}}(d||(t.IJsonRpcMarshaledObject=d={}))},4074(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Observer=void 0,t.Observer=class{next;completion;_jsonRpcMarshalableLifetime="explicit";error;get completed(){return void 0!==this.error}constructor(e,t){this.next=e,this.completion=t}onNext(e){this.next(e)}onCompleted(){this.error=null,this.completion&&this.completion(null)}onError(e){this.error=e,this.completion&&this.completion(e)}}},2097(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerInstanceMethodsAsRpcTargets=t.invokeRpc=void 0;const n=r(7123),o=r(4777),i=r(339);function s(e,t){return function(e){for(let t=0;t<e.length;t++)if(void 0===e[t])throw new Error(`Argument at 0-based index ${t} is set as undefined, which is not a valid JSON value.`);return e}(t).map(t=>a(e,t))}function a(e,t){return i.RpcMarshalable.is(t)||i.MarshaledObjectProxy.is(t)?i.IJsonRpcMarshaledObject.wrap(t,e):t}function c(e,t){const r=Object.getOwnPropertyDescriptor(e,t);return!!r&&"function"==typeof r.value}function l(e,t){return function(e,t){return i.IJsonRpcMarshaledObject.is(t)?i.IJsonRpcMarshaledObject.unwrap(t,e):t}(e,t)}function u(e,t){return function(e){if(e.length>0&&o.CancellationTokenAdapters.isVSCode(e[e.length-1])){const t=o.CancellationTokenAdapters.vscodeToCancellationToken(e[e.length-1]);e[e.length-1]=t}return e}(t).map(t=>l(e,t))}t.invokeRpc=async function(e,t,r){if(t.length>0){if(n.CancellationToken.is(t[t.length-1])){const o=t[t.length-1],i=s(r,Array.prototype.slice.call(t,0,t.length-1));return r.sendRequest(e,n.ParameterStructures.byPosition,...i,o)}if(o.CancellationTokenAdapters.isCancellationToken(t[t.length-1])){const i=o.CancellationTokenAdapters.cancellationTokenToVSCode(t[t.length-1]),a=s(r,Array.prototype.slice.call(t,0,t.length-1));return r.sendRequest(e,n.ParameterStructures.byPosition,...a,i)}if(void 0===t[t.length-1]){const o=s(r,Array.prototype.slice.call(t,0,t.length-1));return r.sendRequest(e,n.ParameterStructures.byPosition,...o)}}const a=s(r,Array.prototype.slice.call(t));try{const t=await r.sendRequest(e,n.ParameterStructures.byPosition,...a);return l(r,t)}catch(e){for(const e of a)i.IJsonRpcMarshaledObject.is(e)&&i.IJsonRpcMarshaledObject.cancelWrap(e,r);throw e}},t.registerInstanceMethodsAsRpcTargets=function(e,t,r){const o=[];function i(n,i){const s=r?r(n):n;o.push(t.onRequest(s,(...r)=>async function(e,t){return a(e,await t)}(t,i.apply(e,u(t,r))))),o.push(t.onNotification(s,(...r)=>i.apply(e,u(t,r))))}return function(e,t){const r=[];let n=Object.getPrototypeOf(e);for(;n&&n!==t;)Object.getOwnPropertyNames(n).forEach(e=>{"constructor"!==e&&c(n,e)&&r.push(e)}),n=Object.getPrototypeOf(n);return r}(e,Object.prototype).forEach(t=>{if("dispose"!==t){const r=e[t];i(t,r);const n="Async";i(t.endsWith(n)?t.substring(0,t.length-n.length):`${t}${n}`,r)}}),n.Disposable.create(()=>o.forEach(e=>e.dispose()))}},4536(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.isChannel=t.clone=t.isReadWriteStream=t.constructMessageConnection=void 0;const o=n(r(2613)),i=r(339);function s(e){return e&&"unshift"in e}t.constructMessageConnection=function(e,t){let r;return(0,o.default)(e),s(e)?(r=t(e),e.on("close",()=>{r?.dispose()}),r.onDispose(()=>e.end()),r.onClose(()=>e.end())):(r=t(e.stream),e.completion.then(()=>{r?.dispose()}),r.onDispose(()=>e.dispose()),r.onClose(()=>e.dispose())),(0,i.registerReleaseMarshaledObjectCallback)(r),r},t.isReadWriteStream=s,t.clone=function(e){var t=e.constructor();for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return t},t.isChannel=function(e){return e&&"stream"in e&&"acceptance"in e&&"completion"in e&&"dispose"in e}},8205(e,t,r){"use strict";r.d(t,{Dv:()=>s,Ov:()=>I,Qo:()=>T,Xf:()=>C,c$:()=>b});var n=r(269),o="Promise",i="rejected";function s(e,t){return a(e,function(e){return t?t({status:"fulfilled",rejected:!1,value:e}):e},function(e){return t?t({status:i,rejected:!0,reason:e}):e})}function a(e,t,r,o){var i=e;try{if((0,n.$XS)(e))(t||r)&&(i=e.then(t,r));else try{t&&(i=t(e))}catch(e){if(!r)throw e;i=r(e)}}finally{o&&function(e,t){var r=e;t&&((0,n.$XS)(e)?r=e.finally?e.finally(t):e.then(function(e){return t(),e},function(e){throw t(),e}):t())}(i,o)}return i}var c,l=["pending","resolving","resolved",i],u="dispatchEvent";function d(e){var t;return e&&e.createEvent&&(t=e.createEvent("Event")),!!t&&t.initEvent}var p,h,f,g,m="unhandledRejection",v=m.toLowerCase(),y=[],S=0;function w(e){return(0,n.Tnt)(e)?e.toString():(0,n.mmD)(e)}function E(e,t,r){var i,s,a=(0,n.KVm)(arguments,3),h=0,f=!1,g=[],E=S++,_=(y.length>0&&y[y.length-1],!1),b=null;function P(t,r){try{return y.push(E),_=!0,b&&b.cancel(),b=null,e(function(e,o){g.push(function(){try{var s=2===h?t:r,a=(0,n.b07)(s)?i:(0,n.Tnt)(s)?s(i):s;(0,n.$XS)(a)?a.then(e,o):s?e(a):3===h?o(a):e(a)}catch(e){o(e)}}),f&&C()},a)}finally{y.pop()}}function T(){return l[h]}function C(){if(g.length>0){var e=g.slice();g=[],_=!0,b&&b.cancel(),b=null,t(e)}}function I(e,t){return function(r){if(h===t){if(2===e&&(0,n.$XS)(r))return h=1,void r.then(I(2,1),I(3,1));h=e,f=!0,i=r,C(),_||3!==e||b||(b=(0,n.dRz)(O,10))}}}function O(){if(!_)if(_=!0,(0,n.Lln)())process.emit(m,i,s);else{var e=(0,n.zkX)()||(0,n.mS$)();!p&&(p=(0,n.GuU)((0,n.gBW)(n.zS2,[o+"RejectionEvent"]).v)),function(e,t,r,o){var i=(0,n.YEm)();!c&&(c=(0,n.GuU)(!!(0,n.gBW)(d,[i]).v));var s=c.v?i.createEvent("Event"):o?new Event(t):{};if(r&&r(s),c.v&&s.initEvent(t,!1,!0),s&&e[u])e[u](s);else{var a=e["on"+t];if(a)a(s);else{var l=(0,n.zS2)("console");l&&(l.error||l.log)(t,(0,n.mmD)(s))}}}(e,v,function(e){return(0,n.vF1)(e,"promise",{g:function(){return s}}),e.reason=i,e},!!p.v)}}return s={then:P,catch:function(e){return P(void 0,e)},finally:function(e){var t=e,r=e;return(0,n.Tnt)(e)&&(t=function(t){return e&&e(),t},r=function(t){throw e&&e(),t}),P(t,r)}},(0,n.UxO)(s,"state",{get:T}),(0,n.Lok)()&&(s[(0,n.Y0g)(11)]="IPromise"),s.toString=function(){return"IPromise "+T()+(f?" - "+w(i):"")},function(){(0,n.Tnt)(r)||(0,n.zkd)(o+": executor is not a function - "+w(r));var e=I(3,0);try{r.call(s,I(2,0),e)}catch(t){e(t)}}(),s}function _(e){return function(t){var r=(0,n.KVm)(arguments,1);return e(function(e,r){try{var o=[],i=1;(0,n.DA8)(t,function(t,n){t&&(i++,a(t,function(t){o[n]=t,0===--i&&e(o)},r))}),0===--i&&e(o)}catch(e){r(e)}},r)}}function b(e,t){return E(b,function(e){var t=(0,n.EtT)(e)?e:0;return function(e){(0,n.dRz)(function(){!function(e){(0,n.Iuo)(e,function(e){try{e()}catch(e){}})}(e)},t)}}(t),e,t)}function P(e,t){!h&&(h=(0,n.GuU)((0,n.gBW)(n.zS2,[o]).v||null));var r=h.v;if(!r)return b(e);(0,n.Tnt)(e)||(0,n.zkd)(o+": executor is not a function - "+(0,n.mmD)(e));var i=0,s=new r(function(t,r){e(function(e){i=2,t(e)},function(e){i=3,r(e)})});return(0,n.UxO)(s,"state",{get:function(){return l[i]}}),s}function T(e,t){return!f&&(f=(0,n.GuU)(P)),f.v.call(this,e,t)}var C=_(T);function I(e,t){return!g&&(r=T,g=(0,n.GuU)(function(e){var t=(0,n.KVm)(arguments,1);return r(function(t,r){var o=[],a=1;function c(e,r){a++,s(e,function(e){e.rejected?o[r]={status:i,reason:e.reason}:o[r]={status:"fulfilled",value:e.value},0===--a&&t(o)})}try{(0,n.cyL)(e)?(0,n.Iuo)(e,c):(0,n.xZI)(e)?(0,n.DA8)(e,c):(0,n.zkd)("Input is not an iterable"),0===--a&&t(o)}catch(e){r(e)}},t)})),g.v(e,t);var r}(0,n.Y0g)(11)},269(e,t,r){"use strict";function n(e,t){return e||t}function o(e,t){return e[t]}r.d(t,{$8:()=>ae,$PY:()=>U,$XS:()=>H,AHH:()=>sr,Cv9:()=>Xt,DA8:()=>gt,EHq:()=>Lt,Edw:()=>A,EtT:()=>$,FJj:()=>Gt,GuU:()=>Ve,Gvm:()=>L,HzD:()=>Qt,Iuo:()=>yt,JKf:()=>ot,KTd:()=>Tt,KVm:()=>Et,KgX:()=>j,KhI:()=>K,Lln:()=>it,Lmq:()=>B,Lok:()=>ct,N6t:()=>fe,Nq2:()=>Pt,O9V:()=>k,P0f:()=>Re,QdQ:()=>Ft,R3R:()=>Wt,SZ2:()=>R,Tnt:()=>M,UUD:()=>Kt,UxO:()=>Z,Vdv:()=>Je,W$7:()=>wt,WSA:()=>ve,Wtk:()=>Ke,Y0g:()=>ut,YEm:()=>Xe,Yny:()=>vt,ZHX:()=>he,ZWZ:()=>xe,aqQ:()=>Rt,b07:()=>D,bJ7:()=>V,cGk:()=>pe,cyL:()=>F,dRz:()=>or,eCG:()=>pt,f0d:()=>At,fn0:()=>Se,gBW:()=>I,hKY:()=>Ae,hXl:()=>x,isD:()=>ee,jjc:()=>dt,jsL:()=>ge,kgX:()=>W,mS$:()=>We,mmD:()=>se,nRs:()=>Be,oJg:()=>ie,rDm:()=>St,raO:()=>te,sSX:()=>Ct,tGl:()=>Yt,twz:()=>et,v0u:()=>G,vF1:()=>re,vKV:()=>ir,w3n:()=>Ze,w9M:()=>Ye,woc:()=>q,xZI:()=>ft,zS2:()=>Ge,zav:()=>J,zkX:()=>Qe,zkd:()=>ce,zwS:()=>qt,zzB:()=>z});var i,s=void 0,a=null,c="function",l="object",u="prototype",d="__proto__",p="undefined",h="constructor",f="Symbol",g="length",m="name",v="call",y="toString",S=n(Object),w=o(S,u),E=n(String),_=o(E,u),b=n(Math),P=n(Array),T=o(P,u),C=o(T,"slice");function I(e,t){try{return{v:e.apply(this,t)}}catch(e){return{e}}}function O(e){return function(t){return typeof t===e}}function N(e){var t="[object "+e+"]";return function(e){return!(!e||R(e)!==t)}}function R(e){return w[y].call(e)}function A(e,t){return typeof e===t}function D(e){return typeof e===p||e===p}function x(e){return e===a||D(e)}function k(e){return!!e||e!==s}var j=O("string"),M=O(c);function L(e){return!(!e&&x(e)||!e||typeof e!==l)}var F=o(P,"isArray"),U=N("Date"),$=O("number"),B=O("boolean"),V=N("Error");function H(e){return!!(e&&e.then&&M(e.then))}function q(e){return!e||!z(e)}function z(e){return!(!e||(t=function(){return!(e&&0+e)},r=!e,n=I(t),n.e?r:n.v));var t,r,n}var W=o(S,"getOwnPropertyDescriptor");function G(e,t){return!!e&&w.hasOwnProperty[v](e,t)}var K=n(o(S,"hasOwn"),X);function X(e,t){return G(e,t)||!!W(e,t)}function J(e,t,r){if(e&&L(e))for(var n in e)if(K(e,n)&&-1===t[v](r||e,n,e[n]))break}var Q={e:"enumerable",c:"configurable",v:"value",w:"writable",g:"get",s:"set"};function Y(e){var t={};if(t[Q.c]=!0,t[Q.e]=!0,e.l){t.get=function(){return e.l.v};var r=W(e.l,"v");r&&r.set&&(t.set=function(t){e.l.v=t})}return J(e,function(e,r){t[Q[e]]=D(r)?t[Q[e]]:r}),t}var Z=o(S,"defineProperty"),ee=o(S,"defineProperties");function te(e,t,r,n,o,i){var s={e:i,c:o};return r&&(s.g=r),n&&(s.s=n),Z(e,t,Y(s))}function re(e,t,r){return Z(e,t,Y(r))}function ne(e,t,r,n,o){var i={};return J(e,function(e,n){oe(i,e,t?n:e,o),oe(i,n,r?n:e,o)}),n?n(i):i}function oe(e,t,r,n){Z(e,t,{value:r,enumerable:!0,writable:!!n})}var ie=n(E);function se(e,t){var r="",n=w[y][v](e);"[object Error]"===n&&(e={stack:ie(e.stack),message:ie(e.message),name:ie(e.name)});try{r=(r=JSON.stringify(e,a,t?"number"==typeof t?t:4:s))&&r.replace(/"(\w+)"\s*:\s{0,1}/g,"$1: ")||ie(e)}catch(e){r=" - "+se(e,t)}return n+": "+r}function ae(e){throw new Error(e)}function ce(e){throw new TypeError(e)}var le=o(S,"freeze");function ue(e){return e}function de(e){return e[d]||a}var pe=o(S,"keys");function he(e){return le&&J(e,function(e,t){(F(t)||L(t))&&he(t)}),fe(e)}var fe=n(le,ue),ge=n(o(S,"seal"),ue),me=n(o(S,"getPrototypeOf"),de);function ve(e){return ne(e,1,0,fe)}function ye(e){return ne(e,0,0,fe)}function Se(e){return function(e){var t={};return J(e,function(e,r){oe(t,e,r[1]),oe(t,r[0],r[1])}),fe(t)}(e)}var we,Ee=ye({asyncIterator:0,hasInstance:1,isConcatSpreadable:2,iterator:3,match:4,matchAll:5,replace:6,search:7,species:8,split:9,toPrimitive:10,toStringTag:11,unscopables:12}),_e="__tsUtils$gblCfg";function be(){var e;return typeof globalThis!==p&&(e=globalThis),e||typeof self===p||(e=self),e||typeof window===p||(e=window),e||typeof global===p||(e=global),e}function Pe(){if(!we){var e=I(be).v||{};we=e[_e]=e[_e]||{}}return we}var Te=Ce;function Ce(e,t,r){var n=t&&t[e];return function(t){var o=t&&t[e]||n;if(o||r){var i=arguments;return(o||r).apply(t,o?C[v](i,1):i)}ce('"'+ie(e)+'" not defined for '+se(t))}}function Ie(e){return function(t){return t[e]}}var Oe=o(b,"max"),Ne=Te("slice",_),Re=Te("substring",_),Ae=Ce("substr",_,De);function De(e,t,r){return x(e)&&ce("Invalid "+se(e)),r<0?"":((t=t||0)<0&&(t=Oe(t+e[g],0)),D(r)?Ne(e,t):Ne(e,t,t+r))}function xe(e,t){return Re(e,0,t)}var ke,je,Me,Le="_urid";function Fe(e){var t={description:ie(e),toString:function(){return f+"("+e+")"},_polyfill:!0};return t}function Ue(e){var t=function(){if(!ke){var e=Pe();ke=e.gblSym=e.gblSym||{k:{},s:{}}}return ke}();if(!K(t.k,e)){var r=Fe(e),n=pe(t.s).length;r[Le]=function(){return n+"_"+r[y]()},t.k[e]=r,t.s[r[Le]()]=ie(e)}return t.k[e]}function $e(){Me=Pe()}function Be(e){var t={};return!Me&&$e(),t.b=Me.lzy,Z(t,"v",{configurable:!0,get:function(){var r=e();return Me.lzy||Z(t,"v",{value:r}),t.b=Me.lzy,r}}),t}function Ve(e){return Z({toJSON:function(){return e}},"v",{value:e})}var He,qe="window";function ze(e,t){var r;return function(){return!Me&&$e(),(!r||Me.lzy)&&(r=Ve(I(e,t).v)),r.v}}function We(e){return!Me&&$e(),(!He||!1===e||Me.lzy)&&(He=Ve(I(be).v||a)),He.v}function Ge(e,t){var r=He&&!1!==t?He.v:We(t);return r&&r[e]?r[e]:e===qe?Qe():a}function Ke(){return!!Xe()}var Xe=ze(Ge,["document"]);function Je(){return!!Qe()}var Qe=ze(Ge,[qe]);function Ye(){return!!Ze()}var Ze=ze(Ge,["navigator"]);function et(){return!!ot()}var tt,rt,nt,ot=ze(Ge,["history"]),it=ze(function(){return!!I(function(){return process&&(process.versions||{}).node}).v});function st(){return tt=Ve(I(Ge,[f]).v)}function at(e){var t=(Me.lzy?0:tt)||st();return t.v?t.v[e]:s}function ct(){return!!lt()}function lt(){return!Me&&$e(),((Me.lzy?0:tt)||st()).v}function ut(e,t){var r=Ee[e];!Me&&$e();var n=(Me.lzy?0:tt)||st();return n.v?n.v[r||e]:t?s:function(e){var t;!je&&(je={});var r=Ee[e];return r&&(t=je[r]=je[r]||Fe(f+"."+r)),t}(e)}function dt(e,t){!Me&&$e();var r=(Me.lzy?0:tt)||st();return r.v?r.v(e):t?a:Fe(e)}function pt(e){return!Me&&$e(),((rt=(Me.lzy?0:rt)||Ve(I(at,["for"]).v)).v||Ue)(e)}function ht(e){return!!e&&M(e.next)}function ft(e){return!function(e){return e===a||!k(e)}(e)&&M(e[ut(3)])}function gt(e,t,r){if(e&&(ht(e)||(!nt&&(nt=Ve(ut(3))),e=e[nt.v]?e[nt.v]():null),ht(e))){var n=s,o=s;try{for(var i=0;!(o=e.next()).done&&-1!==t[v](r||e,o.value,i,e);)i++}catch(t){n={e:t},e.throw&&(o=a,e.throw(n))}finally{try{o&&!o.done&&e.return&&e.return(o)}finally{if(n)throw n.e}}}}function mt(e,t,r){return e.apply(t,r)}function vt(e,t){return!D(t)&&e&&(F(t)?mt(e.push,e,t):ht(t)||ft(t)?gt(t,function(t){e.push(t)}):e.push(t)),e}function yt(e,t,r){if(e)for(var n=e[g]>>>0,o=0;o<n&&(!(o in e)||-1!==t[v](r||e,e[o],o,e));o++);}var St=Te("indexOf",T),wt=Te("map",T);function Et(e,t,r){return(e&&e.slice||C).apply(e,C[v](arguments,1))}function _t(e,t,r){return-1!==St(e,t,r)}var bt,Pt=Ce("includes",T,_t),Tt=Te("reduce",T),Ct=n(o(S,"create"),It);function It(e){if(!e)return{};var t=typeof e;function r(){}return t!==l&&t!==c&&ce("Prototype must be an Object or function: "+se(e)),r[u]=e,new r}function Ot(e,t){return(S.setPrototypeOf||function(e,t){var r;!bt&&(bt=Ve(((r={})[d]=[],r instanceof Array))),bt.v?e[d]=t:J(t,function(t,r){return e[t]=r})})(e,t)}function Nt(e,t){t&&(e[m]=t)}function Rt(e,t,r){var n=r||Error,o=n[u][m],i=Error.captureStackTrace;return function(e,t,r){function n(){this[h]=t,I(re,[this,m,{v:e,c:!0,e:!1}])}return I(re,[t,m,{v:e,c:!0,e:!1}]),(t=Ot(t,r))[u]=r===a?Ct(r):(n[u]=r[u],new n),t}(e,function(){var r=this,s=arguments;try{I(Nt,[n,e]);var a=mt(n,r,C[v](s))||r;if(a!==r){var c=me(r);c!==me(a)&&Ot(a,c)}return i&&i(a,r[h]),t&&t(a,s),a}finally{I(Nt,[n,o])}},n)}function At(){return(Date.now||Dt)()}function Dt(){return(new Date).getTime()}function xt(e){return function(t){return x(t)&&ce("strTrim called ["+se(t)+"]"),t&&t.replace&&(t=t.replace(e,"")),t}}var kt,jt,Mt,Lt=Ce("trim",_,xt(/^\s+|(?=\s)\s+$/g));function Ft(e){if(!e||typeof e!==l)return!1;Mt||(Mt=!Je()||Qe());var t=!1;if(e!==Mt){jt||(kt=Function[u][y],jt=kt[v](S));try{var r=me(e);(t=!r)||(G(r,h)&&(r=r[h]),t=r&&typeof r===c&&kt[v](r)===jt)}catch(e){}}return t}function Ut(e){return e.value&&Ht(e),!0}var $t=[function(e){var t=e.value;if(F(t)){var r=e.result=[];return r.length=t.length,e.copyTo(r,t),!0}return!1},Ht,function(e){return e.type===c},function(e){var t=e.value;return!!U(t)&&(e.result=new Date(t.getTime()),!0)}];function Bt(e,t,r,n){var o=r.handler,s=r.path?n?r.path.concat(n):r.path:[],c={handler:r.handler,src:r.src,path:s},u=typeof t,d=!1,h=!1;t&&u===l?d=Ft(t):h=t===a||function(e){return!i&&(i=["string","number","boolean",p,"symbol","bigint"]),e!==l&&-1!==i.indexOf(e)}(u);var f={type:u,isPrim:h,isPlain:d,value:t,result:t,path:s,origin:r.src,copy:function(t,n){return Bt(e,t,n?c:r,n)},copyTo:function(t,r){return Vt(e,t,r,c)}};return f.isPrim?o&&o[v](r,f)?f.result:t:function(e,t){var n;return yt(e,function(e){if(e.k===t)return n=e,-1}),n||(n={k:t,v:t},e.push(n),function(e){re(f,"result",{g:function(){return e.v},s:function(t){e.v=t}});for(var t=0,n=o;!(n||(t<$t.length?$t[t++]:Ut))[v](r,f);)n=a}(n)),n.v}(e,t)}function Vt(e,t,r,n){if(!x(r))for(var o in r)t[o]=Bt(e,r[o],n,o);return t}function Ht(e){var t=e.value;if(t&&e.isPlain){var r=e.result={};return e.copyTo(r,t),!0}return!1}function qt(e,t,r,n,o,i,s){return function(e,t){return yt(t,function(t){!function(e,t){Vt([],e,t,{handler:void 0,src:t,path:[]})}(e,t)}),e}(Bt([],a=e,{handler:void 0,src:a})||{},C[v](arguments));var a}var zt,Wt=Ie(g);function Gt(){return!Me&&$e(),(!zt||Me.lzy)&&(zt=Ve(I(Ge,["performance"]).v)),zt.v}function Kt(){var e=Gt();return e&&e.now?e.now():At()}ct();var Xt=Ce("endsWith",_,Jt);function Jt(e,t,r){j(e)||ce("'"+se(e)+"' is not a string");var n=j(t)?t:ie(t),o=!D(r)&&r<e[g]?r:e[g];return Re(e,o-n[g],o)===n}var Qt=Te("indexOf",_),Yt=Ce("startsWith",_,Zt);function Zt(e,t,r){j(e)||ce("'"+se(e)+"' is not a string");var n=j(t)?t:ie(t),o=r>0?r:0;return Re(e,o,o+n[g])===n}var er="ref",tr="unref",rr="hasRef";function nr(e,t,r){var n=F(t),o=n?t.length:0,i=(o>0?t[0]:n?s:t)||setTimeout,c=(o>1?t[1]:s)||clearTimeout,l=r[0];r[0]=function(){u.dn(),mt(l,s,C[v](arguments))};var u=function(e,t,r){var n,o=!0,i=e?t(a):a;function s(){return o=!1,i&&i[tr]&&i[tr](),n}function c(){i&&r(i),i=a}function l(){return i=t(i),o||s(),n}return(n={cancel:c,refresh:l})[rr]=function(){return i&&i[rr]?i[rr]():o},n[er]=function(){return o=!0,i&&i[er]&&i[er](),n},n[tr]=s,{h:n=Z(n,"enabled",{get:function(){return!!i},set:function(e){!e&&i&&c(),e&&!i&&l()}}),dn:function(){i=a}}}(e,function(e){if(e){if(e.refresh)return e.refresh(),e;mt(c,s,[e])}return mt(i,s,r)},function(e){mt(c,s,[e])});return u.h}function or(e,t){return nr(!0,s,C[v](arguments))}function ir(e,t,r){return nr(!0,e,C[v](arguments,1))}function sr(e,t){return nr(!1,s,C[v](arguments))}},5396(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.oneDataSystemClientFactory=void 0,t.oneDataSystemClientFactory=async(e,t,n)=>{let o=await(async(e,t,n)=>{const o=await Promise.resolve().then(()=>i(r(5384))),s=await Promise.resolve().then(()=>i(r(9393))),a=new o.AppInsightsCore,c=new s.PostChannel,l={instrumentationKey:e,endpointUrl:"https://mobile.events.data.microsoft.com/OneCollector/1.0",loggingLevelTelemetry:0,loggingLevelConsole:0,disableCookiesUsage:!0,disableDbgExt:!0,disableInstrumentationKeyValidation:!0,channels:[[c]]};if(n){l.extensionConfig={};const e={alwaysUseXhrOverride:!0,httpXHROverride:n};l.extensionConfig[c.identifier]=e}const u=t.workspace.getConfiguration("telemetry").get("internalTesting");return a.initialize(l,[]),a.addTelemetryInitializer(e=>{e.ext=e.ext??{},e.ext.web=e.ext.web??{},e.ext.web.consentDetails='{"GPC_DataSharingOptIn":false}',u&&(e.ext.utc=e.ext.utc??{},e.ext.utc.flags=8462029)}),a})(e,t,n);return{logEvent:(e,t)=>{try{o?.track({name:e,baseData:{name:e,properties:t?.properties,measurements:t?.measurements}})}catch(e){throw new Error("Failed to log event to app insights!\n"+e.message)}},flush:async()=>{try{return new Promise((e,t)=>{o?o.flush(!0,e=>{e||t("Failed to flush app 1DS!")}):e()})}catch(e){throw new Error("Failed to flush 1DS!\n"+e.message)}},dispose:async()=>new Promise(e=>{o?o.unload(!1,()=>{e(),o=void 0},1e3):e()})}}},2468(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.appInsightsClientFactory=void 0;const s=r(740),a=r(8393);t.appInsightsClientFactory=async(e,t,n)=>{let o;try{const n=await Promise.resolve().then(()=>i(r(5927))),a={};if(t){const e={alwaysUseXhrOverride:!0,httpXHROverride:t};a[s.BreezeChannelIdentifier]=e}o=new n.ApplicationInsights({instrumentationKey:e,disableAjaxTracking:!0,disableExceptionTracking:!0,disableFetchTracking:!0,disableCorrelationHeaders:!0,disableCookiesUsage:!0,autoTrackPageVisitTime:!1,emitLineDelimitedJson:!1,disableInstrumentationKeyValidation:!0,extensionConfig:a})}catch(e){return Promise.reject(e)}return{logEvent:(e,t)=>{const r={...t?.properties,...t?.measurements};n?.length&&a.TelemetryUtil.applyReplacements(r,n),o?.track({name:e,data:r,baseType:"EventData",baseData:{name:e,properties:t?.properties,measurements:t?.measurements}})},flush:async()=>{o?.flush(!1)},dispose:async()=>new Promise(e=>{o?.unload(!0,()=>{e(),o=void 0},1e3)})}}},6548(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseTelemetryReporter=void 0,t.BaseTelemetryReporter=class{constructor(e,t,r){this.telemetrySender=e,this.vscodeAPI=t,this.userOptIn=!1,this.errorOptIn=!1,this.disposables=[],this._onDidChangeTelemetryLevel=new this.vscodeAPI.EventEmitter,this.onDidChangeTelemetryLevel=this._onDidChangeTelemetryLevel.event,this.telemetryLogger=this.vscodeAPI.env.createTelemetryLogger(this.telemetrySender,r),this.updateUserOptIn(),this.telemetryLogger.onDidChangeEnableStates(()=>{this.updateUserOptIn()})}updateUserOptIn(){this.errorOptIn=this.telemetryLogger.isErrorsEnabled,this.userOptIn=this.telemetryLogger.isUsageEnabled,(this.telemetryLogger.isErrorsEnabled||this.telemetryLogger.isUsageEnabled)&&this.telemetrySender.instantiateSender(),this._onDidChangeTelemetryLevel.fire(this.telemetryLevel)}get telemetryLevel(){return this.errorOptIn&&this.userOptIn?"all":this.errorOptIn?"error":"off"}internalSendTelemetryEvent(e,t,r,n){n?this.telemetrySender.sendEventData(e,{properties:t,measurements:r}):this.telemetryLogger.logUsage(e,{properties:t,measurements:r})}sendTelemetryEvent(e,t,r){this.internalSendTelemetryEvent(e,t,r,!1)}sendRawTelemetryEvent(e,t,r){const n={...t};for(const e of Object.keys(n??{})){const t=n[e];"string"==typeof e&&void 0!==t&&(n[e]=new this.vscodeAPI.TelemetryTrustedValue("string"==typeof t?t:t.value))}this.sendTelemetryEvent(e,n,r)}sendDangerousTelemetryEvent(e,t,r){this.telemetrySender.instantiateSender(),this.internalSendTelemetryEvent(e,t,r,!0)}internalSendTelemetryErrorEvent(e,t,r,n){n?this.telemetrySender.sendEventData(e,{properties:t,measurements:r}):this.telemetryLogger.logError(e,{properties:t,measurements:r})}sendTelemetryErrorEvent(e,t,r){this.internalSendTelemetryErrorEvent(e,t,r,!1)}sendDangerousTelemetryErrorEvent(e,t,r){this.telemetrySender.instantiateSender(),this.internalSendTelemetryErrorEvent(e,t,r,!0)}async dispose(){return await this.telemetrySender.dispose(),this.telemetryLogger.dispose(),Promise.all(this.disposables.map(e=>e.dispose()))}}},2396(e,t){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.BaseTelemetrySender=void 0,function(e){e[e.NOT_INSTANTIATED=0]="NOT_INSTANTIATED",e[e.INSTANTIATING=1]="INSTANTIATING",e[e.INSTANTIATED=2]="INSTANTIATED"}(r||(r={})),t.BaseTelemetrySender=class{constructor(e,t){this._instantiationStatus=r.NOT_INSTANTIATED,this._eventQueue=[],this._exceptionQueue=[],this._clientFactory=t,this._key=e}sendEventData(e,t){this._telemetryClient?this._telemetryClient.logEvent(e,t):this._instantiationStatus!==r.INSTANTIATED&&this._eventQueue.push({eventName:e,data:t})}sendErrorData(e,t){if(!this._telemetryClient)return void(this._instantiationStatus!==r.INSTANTIATED&&this._exceptionQueue.push({exception:e,data:t}));const n={stack:e.stack,message:e.message,name:e.name};if(t){const e=t.properties||t;t.properties={...e,...n}}else t={properties:n};this._telemetryClient.logEvent("unhandlederror",t)}async flush(){return this._telemetryClient?.flush()}async dispose(){this._telemetryClient&&(await this._telemetryClient.dispose(),this._telemetryClient=void 0)}_flushQueues(){this._eventQueue.forEach(({eventName:e,data:t})=>this.sendEventData(e,t)),this._eventQueue=[],this._exceptionQueue.forEach(({exception:e,data:t})=>this.sendErrorData(e,t)),this._exceptionQueue=[]}instantiateSender(){this._instantiationStatus===r.NOT_INSTANTIATED&&(this._instantiationStatus=r.INSTANTIATING,this._clientFactory(this._key).then(e=>{this._telemetryClient=e,this._instantiationStatus=r.INSTANTIATED,this._flushQueues()}).catch(e=>{console.error(e),this._instantiationStatus=r.INSTANTIATED}))}}},8393(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TelemetryUtil=void 0;class r{static applyReplacements(e,t){for(const r of Object.keys(e))for(const n of t)n.lookup.test(r)&&(void 0!==n.replacementString?e[r]=n.replacementString:delete e[r])}static shouldUseOneDataSystemSDK(e){return 74===e.length&&"-"===e[32]&&"-"===e[41]&&"-"===e[46]&&"-"===e[51]&&"-"===e[56]&&"-"===e[69]}static getAdditionalCommonProperties(e){return{"common.os":e.platform,"common.nodeArch":e.architecture,"common.platformversion":(e.release||"").replace(/^(\d+)(\.\d+)?(\.\d+)?(.*)/,"$1$2$3"),"common.telemetryclientversion":"0.9.6"}}static getInstance(){return r._instance||(r._instance=new r),r._instance}}t.TelemetryUtil=r},1170(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});const s=i(r(857)),a=i(r(1398)),c=i(r(5692)),l=r(6548),u=r(2396),d=r(8393),p=r(5396),h=r(2468);function f(){return{sendPOST:(e,t)=>{const r={method:"POST",headers:{...e.headers,"Content-Type":"application/json","Content-Length":Buffer.byteLength(e.data)}};try{const n=c.request(e.urlString,r,e=>{e.on("data",function(r){t(e.statusCode??200,e.headers,r.toString())}),e.on("error",function(){t(0,{})})});n.write(e.data,e=>{e&&t(0,{})}),n.end()}catch{t(0,{})}}}}class g extends l.BaseTelemetryReporter{constructor(e,t){let r=e=>(0,h.appInsightsClientFactory)(e,f(),t);d.TelemetryUtil.shouldUseOneDataSystemSDK(e)&&(r=e=>(0,p.oneDataSystemClientFactory)(e,a,f()));const n={release:s.release(),platform:s.platform(),architecture:s.arch()},o=new u.BaseTelemetrySender(e,r);if(e&&0===e.indexOf("AIF-"))throw new Error("AIF keys are no longer supported. Please switch to 1DS keys for 1st party extensions");super(o,a,{additionalCommonProperties:d.TelemetryUtil.getAdditionalCommonProperties(n)})}}t.default=g},5384(e,t,r){"use strict";r.r(t),r.d(t,{AppInsightsCore:()=>re,BaseTelemetryPlugin:()=>he.s,DiagnosticLogger:()=>l.wq,EventLatency:()=>ie,EventPersistence:()=>ae,EventPropertyType:()=>se,EventsDiscardedReason:()=>ge.x,FullVersionString:()=>A,InternalAppInsightsCore:()=>u._,LoggingSeverity:()=>de,MinChannelPriorty:()=>ue,NotificationManager:()=>pe.h,PerfEvent:()=>a.Q6,PerfManager:()=>a.NS,ProcessTelemetryContext:()=>fe.W0,SenderPostManager:()=>Te.v,TraceLevel:()=>ce,Undefined:()=>m.bA,ValueKind:()=>oe,ValueSanitizer:()=>le,Version:()=>R,_InternalLogMessage:()=>l.WD,__getRegisteredEvents:()=>me.El,_appendHeader:()=>ve.LU,_getAllResponseHeaders:()=>ve.w3,_logInternalMessage:()=>l.Oc,_testHookMaxUnloadHooksCb:()=>Ie.d,_throwInternal:()=>l.ZP,_warnToConsole:()=>l.OG,addEventHandler:()=>me.So,addEventListeners:()=>me.lQ,addPageHideEventListener:()=>me.Fc,addPageShowEventListener:()=>me.oS,addPageUnloadEventListener:()=>me.ee,areCookiesSupported:()=>we.gi,arrForEach:()=>s.Iuo,arrIndexOf:()=>s.rDm,arrMap:()=>s.W$7,arrReduce:()=>s.KTd,attachEvent:()=>me.Q3,blockDynamicConversion:()=>Pe.V9,convertAllHeadersToMap:()=>ve.IL,cookieAvailable:()=>we.gi,createCookieMgr:()=>we.xN,createDynamicConfig:()=>c.e,createEnumStyle:()=>ne.H,createGuid:()=>z,createProcessTelemetryContext:()=>fe.i8,createTraceParent:()=>be.wk,createUniqueNamespace:()=>Ee.Z,createUnloadHandlerContainer:()=>_e.P,dateNow:()=>s.f0d,detachEvent:()=>me.Ym,disallowsSameSiteNone:()=>we.It,doPerf:()=>a.r2,dumpObj:()=>s.mmD,eventOff:()=>me.ML,eventOn:()=>me.mB,extend:()=>W,findW3cTraceParent:()=>be.ef,forceDynamicConversion:()=>Pe.Hf,formatErrorMessageXdr:()=>ve.HU,formatErrorMessageXhr:()=>ve.r4,formatTraceParent:()=>be.L0,generateW3CId:()=>g.cL,getCommonSchemaMetaData:()=>H,getConsole:()=>f.U5,getCookieValue:()=>q,getCrypto:()=>f.MY,getDocument:()=>s.YEm,getDynamicConfigHandler:()=>Pe.QA,getExceptionName:()=>ve.lL,getFieldValueType:()=>Q,getGlobal:()=>Se.mS,getGlobalInst:()=>s.zS2,getHistory:()=>s.JKf,getIEVersion:()=>f.L0,getISOString:()=>ve._u,getJSON:()=>f.hm,getLocation:()=>f.g$,getMsCrypto:()=>f.iN,getNavigator:()=>s.w3n,getPerformance:()=>s.FJj,getResponseText:()=>ve.Lo,getSetValue:()=>ve.c2,getTenantId:()=>U,getTime:()=>G,getWindow:()=>s.zkX,hasDocument:()=>s.Wtk,hasHistory:()=>s.twz,hasJSON:()=>f.Z,hasNavigator:()=>s.w9M,hasOwnProperty:()=>s.v0u,hasWindow:()=>s.Vdv,isArray:()=>s.cyL,isArrayValid:()=>X,isBeaconsSupported:()=>f.Uf,isBoolean:()=>s.Lmq,isChromium:()=>Y,isDate:()=>s.$PY,isDocumentObjectAvailable:()=>M,isError:()=>s.bJ7,isFetchSupported:()=>f.R7,isFunction:()=>s.Tnt,isGreaterThanZero:()=>ee,isIE:()=>f.lT,isLatency:()=>B,isNotTruthy:()=>s.woc,isNullOrUndefined:()=>s.hXl,isNumber:()=>s.EtT,isObject:()=>s.Gvm,isReactNative:()=>f.lV,isSampledFlag:()=>be.N7,isString:()=>s.KgX,isTruthy:()=>s.zzB,isTypeof:()=>s.Edw,isUint8ArrayAvailable:()=>$,isUndefined:()=>s.b07,isValidSpanId:()=>be.wN,isValidTraceId:()=>be.hX,isValidTraceParent:()=>be.mJ,isValueAssigned:()=>F,isValueKind:()=>K,isWindowObjectAvailable:()=>L,isXhrSupported:()=>f.xk,mergeEvtNamespace:()=>me.Hm,newGuid:()=>g.aq,newId:()=>ye.Si,normalizeJsName:()=>ve.cH,objDefineAccessors:()=>s.raO,objForEachKey:()=>s.zav,objFreeze:()=>s.N6t,objKeys:()=>s.cGk,objSeal:()=>s.jsL,onConfigChange:()=>c.a,openXhr:()=>Z,optimizeObject:()=>ve.hW,parseResponse:()=>Ce.x,parseTraceParent:()=>be.ZI,perfNow:()=>s.UUD,prependTransports:()=>ve.jL,proxyAssign:()=>ve.qz,proxyFunctionAs:()=>ve.RF,proxyFunctions:()=>ve.o$,random32:()=>ye.VN,randomValue:()=>ye.Z1,removeEventHandler:()=>me.zh,removeEventListeners:()=>me.Wg,removePageHideEventListener:()=>me.sq,removePageShowEventListener:()=>me.vF,removePageUnloadEventListener:()=>me.Ds,safeGetCookieMgr:()=>we.um,safeGetLogger:()=>l.y0,sanitizeProperty:()=>V,setEnableEnvMocks:()=>f.cU,setProcessTelemetryTimings:()=>J,setValue:()=>ve.KY,strContains:()=>ve.Ju,strEndsWith:()=>s.Cv9,strFunction:()=>m.hW,strObject:()=>m._1,strPrototype:()=>m.vR,strStartsWith:()=>s.tGl,strTrim:()=>s.EHq,strUndefined:()=>m.bA,throwError:()=>s.$8,toISOString:()=>ve._u,useXDomainRequest:()=>f.PV});var n,o=r(4688),i=r(8279),s=r(269),a=r(8156),c=r(9749),l=r(3775),u=r(2774),d="",p="version",h="properties",f=r(7292),g=r(9882),m=r(5664),v="initialize",y="logger",S="indexOf",w="timings",E="pollInternalLogs",_="value",b="kind",P="length",T="processTelemetryStart",C="handleField",I="rmSanitizer",O="rmFieldSanitizer",N="canHandle",R="4.3.0",A="1DS-Web-JS-"+R,D=m.Wy.hasOwnProperty,x="withCredentials",k=((n={})[0]=0,n[2]=6,n[1]=1,n[3]=7,n[4098]=6,n[4097]=1,n[4099]=7,n),j=null,M=(0,s.Wtk)(),L=(0,s.Vdv)();function F(e){return!(e===d||(0,s.hXl)(e))}function U(e){if(e){var t=(0,s.HzD)(e,"-");if(t>-1)return(0,s.ZWZ)(e,t)}return d}function $(){return null===j&&(j=!(0,s.b07)(Uint8Array)&&!function(){var e=(0,s.w3n)();if(!(0,s.b07)(e)&&e.userAgent){var t=e.userAgent.toLowerCase();if((t[S]("safari")>=0||t[S]("firefox")>=0)&&t[S]("chrome")<0)return!0}return!1}()&&!(0,f.lV)()),j}function B(e){return!!(e&&(0,s.EtT)(e)&&e>=1&&e<=4)}function V(e,t,r){if(!t&&!F(t)||"string"!=typeof e)return null;var n=typeof t;if("string"===n||"number"===n||"boolean"===n||(0,s.cyL)(t))t={value:t};else if("object"!==n||D.call(t,"value")){if((0,s.hXl)(t[_])||t[_]===d||!(0,s.KgX)(t[_])&&!(0,s.EtT)(t[_])&&!(0,s.Lmq)(t[_])&&!(0,s.cyL)(t[_]))return null}else t={value:r?JSON.stringify(t):t};if((0,s.cyL)(t[_])&&!X(t[_]))return null;if(!(0,s.hXl)(t[b])){if((0,s.cyL)(t[_])||!K(t[b]))return null;t[_]=t[_].toString()}return t}function H(e,t,r){var n=-1;if(!(0,s.b07)(e))if(t>0&&(32===t?n=8192:t<=13&&(n=t<<5)),function(e){return e>=0&&e<=9}(r))-1===n&&(n=0),n|=r;else{var o=k[Q(e)]||-1;-1!==n&&-1!==o?n|=o:6===o&&(n=o)}return n}function q(e,t,r){var n;return void 0===r&&(r=!0),e&&(n=e.get(t),r&&n&&decodeURIComponent&&(n=decodeURIComponent(n))),n||d}function z(e){void 0===e&&(e="D");var t=(0,g.aq)();return"B"===e?t="{"+t+"}":"P"===e?t="("+t+")":"N"===e&&(t=t.replace(/-/g,d)),t}function W(e,t,r,n,o){var i={},a=!1,c=0,l=arguments[P],u=arguments;for((0,s.Lmq)(u[0])&&(a=u[0],c++);c<l;c++)e=u[c],(0,s.zav)(e,function(e,t){a&&t&&(0,s.Gvm)(t)?(0,s.cyL)(t)?(i[e]=i[e]||[],(0,s.Iuo)(t,function(t,r){t&&(0,s.Gvm)(t)?i[e][r]=W(!0,i[e][r],t):i[e][r]=t})):i[e]=W(!0,i[e],t):i[e]=t});return i}var G=s.UUD;function K(e){return 0===e||e>0&&e<=13||32===e}function X(e){return e[P]>0}function J(e,t){var r=e;r[w]=r[w]||{},r[w][T]=r[w][T]||{},r[w][T][t]=G()}function Q(e){var t=0;if(null!=e){var r=typeof e;"string"===r?t=1:"number"===r?t=2:"boolean"===r?t=3:r===m._1&&(t=4,(0,s.cyL)(e)?(t=4096,e[P]>0&&(t|=Q(e[0]))):D.call(e,"value")&&(t=8192|Q(e[_])))}return t}function Y(){return!!(0,s.zS2)("chrome")}function Z(e,t,r,n,o,i){function s(e,t,r){try{e[t]=r}catch(e){}}void 0===n&&(n=!1),void 0===o&&(o=!1);var a=new XMLHttpRequest;return n&&s(a,"Microsoft_ApplicationInsights_BypassAjaxInstrumentation",n),r&&s(a,x,r),a.open(e,t,!o),r&&s(a,x,r),!o&&i&&s(a,"timeout",i),a}function ee(e){return e>0}var te=(0,s.ZHX)({endpointUrl:"https://browser.events.data.microsoft.com/OneCollector/1.0/",propertyStorageOverride:{isVal:function(e){return!e||e.getProperty&&e.setProperty||(0,s.$8)("Invalid property storage override passed."),!0}}}),re=function(e){function t(){var r=e.call(this)||this;return(0,i.A)(t,r,function(e,t){e[v]=function(r,n,o,i){(0,a.r2)(e,function(){return"AppInsightsCore.initialize"},function(){try{t[v]((0,c.e)(r,te,o||e[y],!1).cfg,n,o,i)}catch(t){var a=e[y],u=(0,s.mmD)(t);-1!==u[S]("channels")&&(u+="\n - Channels must be provided through config.channels only!"),(0,l.ZP)(a,1,514,"SDK Initialization Failed - no telemetry will be sent: "+u)}},function(){return{config:r,extensions:n,logger:o,notificationManager:i}})},e.track=function(r){(0,a.r2)(e,function(){return"AppInsightsCore.track"},function(){var n=r;if(n){n[w]=n[w]||{},n[w].trackStart=G(),B(n.latency)||(n.latency=1);var o=n.ext=n.ext||{};o.sdk=o.sdk||{},o.sdk.ver=A;var i=n.baseData=n.baseData||{};i[h]=i[h]||{};var s=i[h];s[p]=s[p]||e.pluginVersionString||d}t.track(n)},function(){return{item:r}},!r.sync)},e[E]=function(e){return t[E](e||"InternalLog")}}),r}return(0,o.qU)(t,e),t.__ieDyn=1,t}(u._),ne=r(4282),oe=(0,ne.H)({NotSet:0,Pii_DistinguishedName:1,Pii_GenericData:2,Pii_IPV4Address:3,Pii_IPv6Address:4,Pii_MailSubject:5,Pii_PhoneNumber:6,Pii_QueryString:7,Pii_SipAddress:8,Pii_SmtpAddress:9,Pii_Identity:10,Pii_Uri:11,Pii_Fqdn:12,Pii_IPV4AddressLegacy:13,Pii_IPv6ScrubLastHextets:14,Pii_DropValue:15,CustomerContent_GenericContent:32}),ie=(0,ne.H)({Normal:1,CostDeferred:2,RealTime:3,Immediate:4}),se=(0,ne.H)({Unspecified:0,String:1,Int32:2,UInt32:3,Int64:4,UInt64:5,Double:6,Bool:7,Guid:8,DateTime:9}),ae=(0,ne.H)({Normal:1,Critical:2}),ce=(0,ne.H)({NONE:0,ERROR:1,WARNING:2,INFORMATION:3}),le=function(){function e(e){var t=this,r={},n=[],o=[];function i(e,t){var i,a=r[e];if(a&&(i=a[t]),!i&&null!==i){if((0,s.KgX)(e)&&(0,s.KgX)(t))if(o[P]>0){for(var c=0;c<o[P];c++)if(o[c][C](e,t)){i={canHandle:!0,fieldHandler:o[c]};break}}else 0===n[P]&&(i={canHandle:!0});if(!i&&null!==i)for(i=null,c=0;c<n[P];c++)if(n[c][C](e,t)){i={canHandle:!0,handler:n[c],fieldHandler:null};break}a||(a=r[e]={}),a[t]=i}return i}function a(e,t,r,n,o,i){if(e.handler)return e.handler.property(t,r,o,i);if(!(0,s.hXl)(o[b])){if(!(4096&~n&&K(o[b])))return null;o[_]=o[_].toString()}return l(e.fieldHandler,t,r,n,o)}function c(e,t,r){return F(r)?{value:r}:null}function l(e,r,n,o,i){if(i&&e){var a=e.getSanitizer(r,n,o,i[b],i.propertyType);if(a)if(4===o){var u={},d=i[_];(0,s.zav)(d,function(t,o){var i=r+"."+n;if(F(o)){var s=c(0,0,o);(s=l(e,i,t,Q(o),s))&&(u[t]=s[_])}}),i[_]=u}else{var p={path:r,name:n,type:o,prop:i,sanitizer:t};i=a.call(t,p)}}return i}e&&o.push(e),t.clearCache=function(){r={}},t.addSanitizer=function(e){e&&((0,s.Nq2)(n,e)||n.push(e),r={})},t.addFieldSanitizer=function(e){e&&((0,s.Nq2)(o,e)||o.push(e),r={})},t[I]=function(e){if(e){var t=(0,s.rDm)(n,e);-1!==t&&(n.splice(t,1),r={}),(0,s.Iuo)(n,function(t){t&&t[I]&&t[I](e)})}},t[O]=function(e){if(e){var t=(0,s.rDm)(o,e);-1!==t&&(o.splice(t,1),r={}),(0,s.Iuo)(n,function(t){t&&t[O]&&t[O](e)})}},t.isEmpty=function(){return(0,s.R3R)(n)+(0,s.R3R)(o)===0},t[C]=function(e,t){var r=i(e,t);return!!r&&r[N]},t[_]=function(e,t,r,n){var o=i(e,t);if(o&&o[N]){if(!o||!o[N])return null;if(o.handler)return o.handler[_](e,t,r,n);if(!(0,s.KgX)(t)||(0,s.hXl)(r)||r===d)return null;var l=null,u=Q(r);if(8192&~u)1!==u&&2!==u&&3!==u&&4096&~u?4===u&&(l=c(0,0,n?JSON.stringify(r):r)):l=c(0,0,r);else{var p=-8193&u;if(!F((l=r)[_])||1!==p&&2!==p&&3!==p&&4096&~p)return null}if(l)return a(o,e,t,u,l,n)}return null},t.property=function(e,t,r,n){var o=i(e,t);if(!o||!o[N])return null;if(!(0,s.KgX)(t)||(0,s.hXl)(r)||!F(r[_]))return null;var c=Q(r[_]);return 0===c?null:a(o,e,t,c,r,n)}}return e.getFieldType=Q,e}(),ue=100,de=(0,ne.H)({DISABLED:0,CRITICAL:1,WARNING:2,DEBUG:3}),pe=r(1356),he=r(638),fe=r(2317),ge=r(3662),me=r(6149),ve=r(6054),ye=r(6535),Se=r(1396),we=r(5034),Ee=r(4276),_e=r(836),be=r(1864),Pe=r(9147),Te=r(856),Ce=r(1190),Ie=r(8969)},983(e,t,r){"use strict";var n=r(7342),o=[];function i(){this.task=null,this.domain=null}e.exports=function(e){var t;(t=o.length?o.pop():new i).task=e,t.domain=process.domain,n(t)},i.prototype.call=function(){this.domain&&this.domain.enter();var e=!0;try{this.task.call(),e=!1,this.domain&&this.domain.exit()}finally{e&&n.requestFlush(),this.task=null,this.domain=null,o.push(this)}}},7342(e,t,r){"use strict";var n,o="function"==typeof setImmediate;function i(e){s.length||(u(),a=!0),s[s.length]=e}e.exports=i;var s=[],a=!1,c=0;function l(){for(;c<s.length;){var e=c;if(c+=1,s[e].call(),c>1024){for(var t=0,r=s.length-c;t<r;t++)s[t]=s[t+c];s.length-=c,c=0}}s.length=0,c=0,a=!1}function u(){var e=process.domain;e&&(n||(n=r(3167)),n.active=process.domain=null),a&&o?setImmediate(l):process.nextTick(l),e&&(n.active=process.domain=e)}i.requestFlush=u},4622(e,t){"use strict";class r{constructor(e){this.tasks=[],this.count=e}sched(){if(this.count>0&&this.tasks.length>0){this.count--;let e=this.tasks.shift();if(void 0===e)throw"Unexpected undefined value in tasks list";e()}}acquire(){return new Promise((e,t)=>{this.tasks.push(()=>{var t=!1;e(()=>{t||(t=!0,this.count++,this.sched())})}),process&&process.nextTick?process.nextTick(this.sched.bind(this)):setImmediate(this.sched.bind(this))})}use(e){return this.acquire().then(t=>e().then(e=>(t(),e)).catch(e=>{throw t(),e}))}}t.Semaphore=r,t.Mutex=class extends r{constructor(){super(1)}}},2356(e,t){"use strict";var r,n=this&&this.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var o=function(){},i=function(){function e(e,t){this._isCancelled=e,this.canBeCancelled=t,this._callbacks=new Set}return Object.defineProperty(e.prototype,"isCancelled",{get:function(){return this._isCancelled},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"reason",{get:function(){if(this.isCancelled)return this._reason;throw new Error("This token is not cancelled.")},enumerable:!1,configurable:!0}),e.prototype.racePromise=function(t){var r=this;return this.canBeCancelled?new Promise(function(n,o){var i=r.onCancelled(function(t){return o(new e.CancellationError(t))});t.then(function(e){n(e),i()},function(e){o(e),i()})}):t},e.prototype.throwIfCancelled=function(){if(this._isCancelled)throw new e.CancellationError(this._reason)},e.prototype.onCancelled=function(e){var t,r=this;return this.canBeCancelled?this.isCancelled?(e(this.reason),o):(null===(t=this._callbacks)||void 0===t||t.add(e),function(){var t;return null===(t=r._callbacks)||void 0===t?void 0:t.delete(e)}):o},e.create=function(){var t=new e(!1,!0);return{token:t,cancel:function(e){var r;t._isCancelled||(t._isCancelled=!0,t._reason=e,null===(r=t._callbacks)||void 0===r||r.forEach(function(t){return t(e)}),delete t._callbacks)}}},e.timeout=function(t){var r=e.create(),n=r.token,o=r.cancel,i=setTimeout(function(){return o(e.timeout)},t);return{token:n,cancel:function(e){n._isCancelled||(clearTimeout(i),o(e))}}},e.all=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];if(t.some(function(e){return!e.canBeCancelled}))return e.CONTINUE;var n=e.create(),o=t.length,i=function(){if(0===--o){var e=t.map(function(e){return e._reason});n.cancel(e)}};return t.forEach(function(e){return e.onCancelled(i)}),n.token},e.race=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var n=0,o=t;n<o.length;n++){var i=o[n];if(i._isCancelled)return i}var s,a=e.create(),c=function(e){s.forEach(function(e){return e()}),a.cancel(e)};return s=t.map(function(e){return e.onCancelled(c)}),a.token},e.CANCELLED=new e(!0,!0),e.CONTINUE=new e(!1,!1),e}();!function(e){var t=function(e){function t(r){var n=e.call(this,"Operation cancelled")||this;return n.reason=r,Object.setPrototypeOf(n,t.prototype),n}return n(t,e),t}(Error);e.CancellationError=t}(i||(i={})),t.default=i},4820(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(2356);t.default=n.default},4901(e){"use strict";var t;e.exports=(t=()=>{},e=>(e.catch(t),e))},1611(e){!function(t){e.exports=t;var r="listeners",n={on:function(e,t){return s(this,e).push(t),this},once:function(e,t){var r=this;return n.originalListener=t,s(r,e).push(n),r;function n(){i.call(r,e,n),t.apply(this,arguments)}},off:i,emit:function(e,t){var r=this,n=s(r,e,!0);if(!n)return!1;var o=arguments.length;if(1===o)n.forEach(function(e){e.call(r)});else if(2===o)n.forEach(function(e){e.call(r,t)});else{var i=Array.prototype.slice.call(arguments,1);n.forEach(function(e){e.apply(r,i)})}return!!n.length}};function o(e){for(var t in n)e[t]=n[t];return e}function i(e,t){var n,o=this;if(arguments.length){if(t){if(n=s(o,e,!0)){if(!(n=n.filter(function(e){return e!==t&&e.originalListener!==t})).length)return i.call(o,e);o[r][e]=n}}else if((n=o[r])&&(delete n[e],!Object.keys(n).length))return i.call(o)}else delete o[r];return o}function s(e,t,n){if(!n||e[r]){var o=e[r]||(e[r]={});return o[t]||(o[t]=[])}}o(t.prototype),t.mixin=o}(function e(){if(!(this instanceof e))return new e})},251(e,t){t.read=function(e,t,r,n,o){var i,s,a=8*o-n-1,c=(1<<a)-1,l=c>>1,u=-7,d=r?o-1:0,p=r?-1:1,h=e[t+d];for(d+=p,i=h&(1<<-u)-1,h>>=-u,u+=a;u>0;i=256*i+e[t+d],d+=p,u-=8);for(s=i&(1<<-u)-1,i>>=-u,u+=n;u>0;s=256*s+e[t+d],d+=p,u-=8);if(0===i)i=1-l;else{if(i===c)return s?NaN:1/0*(h?-1:1);s+=Math.pow(2,n),i-=l}return(h?-1:1)*s*Math.pow(2,i-n)},t.write=function(e,t,r,n,o,i){var s,a,c,l=8*i-o-1,u=(1<<l)-1,d=u>>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:i-1,f=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+d>=1?p/c:p*Math.pow(2,1-d))*c>=2&&(s++,c/=2),s+d>=u?(a=0,s=u):s+d>=1?(a=(t*c-1)*Math.pow(2,o),s+=d):(a=t*Math.pow(2,d-1)*Math.pow(2,o),s=0));o>=8;e[r+h]=255&a,h+=f,a/=256,o-=8);for(s=s<<o|a,l+=o;l>0;e[r+h]=255&s,h+=f,s/=256,l-=8);e[r+h-f]|=128*g}},9568(e,t,r){"use strict";r.r(t),r.d(t,{Collection:()=>P,Iterable:()=>Tn,List:()=>ir,Map:()=>jt,OrderedMap:()=>Sr,OrderedSet:()=>an,PairSorting:()=>pn,Range:()=>Hr,Record:()=>hn,Repeat:()=>wn,Seq:()=>G,Set:()=>Mr,Stack:()=>Tr,default:()=>Cn,fromJS:()=>En,get:()=>ot,getIn:()=>qr,has:()=>nt,hasIn:()=>Wr,hash:()=>he,is:()=>le,isAssociative:()=>b,isCollection:()=>y,isImmutable:()=>D,isIndexed:()=>_,isKeyed:()=>w,isList:()=>or,isMap:()=>se,isOrdered:()=>k,isOrderedMap:()=>ae,isOrderedSet:()=>Dr,isPlainObject:()=>et,isRecord:()=>A,isSeq:()=>N,isSet:()=>Ar,isStack:()=>Pr,isValueObject:()=>ce,merge:()=>Et,mergeDeep:()=>bt,mergeDeepWith:()=>Pt,mergeWith:()=>_t,remove:()=>at,removeIn:()=>ht,set:()=>ct,setIn:()=>dt,update:()=>gt,updateIn:()=>lt,version:()=>Pn});var n="delete",o=32,i=31,s={};function a(e){e&&(e.value=!0)}function c(){}function l(e){return void 0===e.size&&(e.size=e.__iterate(d)),e.size}function u(e,t){if("number"!=typeof t){var r=t>>>0;if(""+r!==t||4294967295===r)return NaN;t=r}return t<0?l(e)+t:t}function d(){return!0}function p(e,t,r){return(0===e&&!m(e)||void 0!==r&&e<=-r)&&(void 0===t||void 0!==r&&t>=r)}function h(e,t){return g(e,t,0)}function f(e,t){return g(e,t,t)}function g(e,t,r){return void 0===e?r:m(e)?t===1/0?t:0|Math.max(0,t+e):void 0===t||t===e?e:0|Math.min(t,e)}function m(e){return e<0||0===e&&1/e==-1/0}var v="@@__IMMUTABLE_ITERABLE__@@";function y(e){return Boolean(e&&e[v])}var S="@@__IMMUTABLE_KEYED__@@";function w(e){return Boolean(e&&e[S])}var E="@@__IMMUTABLE_INDEXED__@@";function _(e){return Boolean(e&&e[E])}function b(e){return w(e)||_(e)}var P=function(e){return y(e)?e:G(e)},T=function(e){function t(e){return w(e)?e:K(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(P),C=function(e){function t(e){return _(e)?e:X(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(P),I=function(e){function t(e){return y(e)&&!b(e)?e:J(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(P);P.Keyed=T,P.Indexed=C,P.Set=I;var O="@@__IMMUTABLE_SEQ__@@";function N(e){return Boolean(e&&e[O])}var R="@@__IMMUTABLE_RECORD__@@";function A(e){return Boolean(e&&e[R])}function D(e){return y(e)||A(e)}var x="@@__IMMUTABLE_ORDERED__@@";function k(e){return Boolean(e&&e[x])}var j="function"==typeof Symbol&&Symbol.iterator,M="@@iterator",L=j||M,F=function(e){this.next=e};function U(e,t,r,n){var o=0===e?t:1===e?r:[t,r];return n?n.value=o:n={value:o,done:!1},n}function $(){return{value:void 0,done:!0}}function B(e){return!!Array.isArray(e)||!!q(e)}function V(e){return e&&"function"==typeof e.next}function H(e){var t=q(e);return t&&t.call(e)}function q(e){var t=e&&(j&&e[j]||e[M]);if("function"==typeof t)return t}F.prototype.toString=function(){return"[Iterator]"},F.KEYS=0,F.VALUES=1,F.ENTRIES=2,F.prototype.inspect=F.prototype.toSource=function(){return this.toString()},F.prototype[L]=function(){return this};var z=Object.prototype.hasOwnProperty;function W(e){return!(!Array.isArray(e)&&"string"!=typeof e)||e&&"object"==typeof e&&Number.isInteger(e.length)&&e.length>=0&&(0===e.length?1===Object.keys(e).length:e.hasOwnProperty(e.length-1))}var G=function(e){function t(e){return null==e?te():D(e)?e.toSeq():function(e){var t,r,n=oe(e);if(n)return(r=q(t=e))&&r===t.entries?n.fromEntrySeq():function(e){var t=q(e);return t&&t===e.keys}(e)?n.toSetSeq():n;if("object"==typeof e)return new Y(e);throw new TypeError("Expected Array or collection object of values, or keyed object: "+e)}(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq {","}")},t.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},t.prototype.__iterate=function(e,t){var r=this._cache;if(r){for(var n=r.length,o=0;o!==n;){var i=r[t?n-++o:o++];if(!1===e(i[1],i[0],this))break}return o}return this.__iterateUncached(e,t)},t.prototype.__iterator=function(e,t){var r=this._cache;if(r){var n=r.length,o=0;return new F(function(){if(o===n)return{value:void 0,done:!0};var i=r[t?n-++o:o++];return U(e,i[0],i[1])})}return this.__iteratorUncached(e,t)},t}(P),K=function(e){function t(e){return null==e?te().toKeyedSeq():y(e)?w(e)?e.toSeq():e.fromEntrySeq():A(e)?e.toSeq():re(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toKeyedSeq=function(){return this},t}(G),X=function(e){function t(e){return null==e?te():y(e)?w(e)?e.entrySeq():e.toIndexedSeq():A(e)?e.toSeq().entrySeq():ne(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toIndexedSeq=function(){return this},t.prototype.toString=function(){return this.__toString("Seq [","]")},t}(G),J=function(e){function t(e){return(y(e)&&!b(e)?e:X(e)).toSetSeq()}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return t(arguments)},t.prototype.toSetSeq=function(){return this},t}(G);G.isSeq=N,G.Keyed=K,G.Set=J,G.Indexed=X,G.prototype[O]=!0;var Q=function(e){function t(e){this._array=e,this.size=e.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return this.has(e)?this._array[u(this,e)]:t},t.prototype.__iterate=function(e,t){for(var r=this._array,n=r.length,o=0;o!==n;){var i=t?n-++o:o++;if(!1===e(r[i],i,this))break}return o},t.prototype.__iterator=function(e,t){var r=this._array,n=r.length,o=0;return new F(function(){if(o===n)return{value:void 0,done:!0};var i=t?n-++o:o++;return U(e,i,r[i])})},t}(X),Y=function(e){function t(e){var t=Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[]);this._object=e,this._keys=t,this.size=t.length}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return void 0===t||this.has(e)?this._object[e]:t},t.prototype.has=function(e){return z.call(this._object,e)},t.prototype.__iterate=function(e,t){for(var r=this._object,n=this._keys,o=n.length,i=0;i!==o;){var s=n[t?o-++i:i++];if(!1===e(r[s],s,this))break}return i},t.prototype.__iterator=function(e,t){var r=this._object,n=this._keys,o=n.length,i=0;return new F(function(){if(i===o)return{value:void 0,done:!0};var s=n[t?o-++i:i++];return U(e,s,r[s])})},t}(K);Y.prototype[x]=!0;var Z,ee=function(e){function t(e){this._collection=e,this.size=e.length||e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.__iterateUncached=function(e,t){if(t)return this.cacheResult().__iterate(e,t);var r=H(this._collection),n=0;if(V(r))for(var o;!(o=r.next()).done&&!1!==e(o.value,n++,this););return n},t.prototype.__iteratorUncached=function(e,t){if(t)return this.cacheResult().__iterator(e,t);var r=H(this._collection);if(!V(r))return new F($);var n=0;return new F(function(){var t=r.next();return t.done?t:U(e,n++,t.value)})},t}(X);function te(){return Z||(Z=new Q([]))}function re(e){var t=oe(e);if(t)return t.fromEntrySeq();if("object"==typeof e)return new Y(e);throw new TypeError("Expected Array or collection object of [k, v] entries, or keyed object: "+e)}function ne(e){var t=oe(e);if(t)return t;throw new TypeError("Expected Array or collection object of values: "+e)}function oe(e){return W(e)?new Q(e):B(e)?new ee(e):void 0}var ie="@@__IMMUTABLE_MAP__@@";function se(e){return Boolean(e&&e[ie])}function ae(e){return se(e)&&k(e)}function ce(e){return Boolean(e&&"function"==typeof e.equals&&"function"==typeof e.hashCode)}function le(e,t){if(e===t||e!=e&&t!=t)return!0;if(!e||!t)return!1;if("function"==typeof e.valueOf&&"function"==typeof t.valueOf){if((e=e.valueOf())===(t=t.valueOf())||e!=e&&t!=t)return!0;if(!e||!t)return!1}return!!(ce(e)&&ce(t)&&e.equals(t))}var ue="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function(e,t){var r=65535&(e|=0),n=65535&(t|=0);return r*n+((e>>>16)*n+r*(t>>>16)<<16>>>0)|0};function de(e){return e>>>1&1073741824|3221225471&e}var pe=Object.prototype.valueOf;function he(e){if(null==e)return fe(e);if("function"==typeof e.hashCode)return de(e.hashCode(e));var t,r,n,o=(t=e).valueOf!==pe&&"function"==typeof t.valueOf?t.valueOf(t):t;if(null==o)return fe(o);switch(typeof o){case"boolean":return o?1108378657:1108378656;case"number":return function(e){if(e!=e||e===1/0)return 0;var t=0|e;for(t!==e&&(t^=4294967295*e);e>4294967295;)t^=e/=4294967295;return de(t)}(o);case"string":return o.length>Pe?(void 0===(n=Ie[r=o])&&(n=ge(r),Ce===Te&&(Ce=0,Ie={}),Ce++,Ie[r]=n),n):ge(o);case"object":case"function":return function(e){var t;if(we&&void 0!==(t=Se.get(e)))return t;if(void 0!==(t=e[be]))return t;if(!ve){if(void 0!==(t=e.propertyIsEnumerable&&e.propertyIsEnumerable[be]))return t;if(void 0!==(t=function(e){if(e&&e.nodeType>0)switch(e.nodeType){case 1:return e.uniqueID;case 9:return e.documentElement&&e.documentElement.uniqueID}}(e)))return t}if(t=ye(),we)Se.set(e,t);else{if(void 0!==me&&!1===me(e))throw new Error("Non-extensible objects are not allowed as keys.");if(ve)Object.defineProperty(e,be,{enumerable:!1,configurable:!1,writable:!1,value:t});else if(void 0!==e.propertyIsEnumerable&&e.propertyIsEnumerable===e.constructor.prototype.propertyIsEnumerable)e.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},e.propertyIsEnumerable[be]=t;else{if(void 0===e.nodeType)throw new Error("Unable to set a non-enumerable property on object.");e[be]=t}}return t}(o);case"symbol":return function(e){var t=Ee[e];return void 0!==t||(t=ye(),Ee[e]=t),t}(o);default:if("function"==typeof o.toString)return ge(o.toString());throw new Error("Value type "+typeof o+" cannot be hashed.")}}function fe(e){return null===e?1108378658:1108378659}function ge(e){for(var t=0,r=0;r<e.length;r++)t=31*t+e.charCodeAt(r)|0;return de(t)}var me=Object.isExtensible,ve=function(){try{return Object.defineProperty({},"@",{}),!0}catch(e){return!1}}();function ye(){var e=++_e;return 1073741824&_e&&(_e=0),e}var Se,we="function"==typeof WeakMap;we&&(Se=new WeakMap);var Ee=Object.create(null),_e=0,be="__immutablehash__";"function"==typeof Symbol&&(be=Symbol(be));var Pe=16,Te=255,Ce=0,Ie={},Oe=function(e){function t(e,t){this._iter=e,this._useKeys=t,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.get=function(e,t){return this._iter.get(e,t)},t.prototype.has=function(e){return this._iter.has(e)},t.prototype.valueSeq=function(){return this._iter.valueSeq()},t.prototype.reverse=function(){var e=this,t=ke(this,!0);return this._useKeys||(t.valueSeq=function(){return e._iter.toSeq().reverse()}),t},t.prototype.map=function(e,t){var r=this,n=xe(this,e,t);return this._useKeys||(n.valueSeq=function(){return r._iter.toSeq().map(e,t)}),n},t.prototype.__iterate=function(e,t){var r=this;return this._iter.__iterate(function(t,n){return e(t,n,r)},t)},t.prototype.__iterator=function(e,t){return this._iter.__iterator(e,t)},t}(K);Oe.prototype[x]=!0;var Ne=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.includes=function(e){return this._iter.includes(e)},t.prototype.__iterate=function(e,t){var r=this,n=0;return t&&l(this),this._iter.__iterate(function(o){return e(o,t?r.size-++n:n++,r)},t)},t.prototype.__iterator=function(e,t){var r=this,n=this._iter.__iterator(1,t),o=0;return t&&l(this),new F(function(){var i=n.next();return i.done?i:U(e,t?r.size-++o:o++,i.value,i)})},t}(X),Re=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.has=function(e){return this._iter.includes(e)},t.prototype.__iterate=function(e,t){var r=this;return this._iter.__iterate(function(t){return e(t,t,r)},t)},t.prototype.__iterator=function(e,t){var r=this._iter.__iterator(1,t);return new F(function(){var t=r.next();return t.done?t:U(e,t.value,t.value,t)})},t}(J),Ae=function(e){function t(e){this._iter=e,this.size=e.size}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.entrySeq=function(){return this._iter.toSeq()},t.prototype.__iterate=function(e,t){var r=this;return this._iter.__iterate(function(t){if(t){qe(t);var n=y(t);return e(n?t.get(1):t[1],n?t.get(0):t[0],r)}},t)},t.prototype.__iterator=function(e,t){var r=this._iter.__iterator(1,t);return new F(function(){for(;;){var t=r.next();if(t.done)return t;var n=t.value;if(n){qe(n);var o=y(n);return U(e,o?n.get(0):n[0],o?n.get(1):n[1],t)}}})},t}(K);function De(e){var t=We(e);return t._iter=e,t.size=e.size,t.flip=function(){return e},t.reverse=function(){var t=e.reverse.apply(this);return t.flip=function(){return e.reverse()},t},t.has=function(t){return e.includes(t)},t.includes=function(t){return e.has(t)},t.cacheResult=Ge,t.__iterateUncached=function(t,r){var n=this;return e.__iterate(function(e,r){return!1!==t(r,e,n)},r)},t.__iteratorUncached=function(t,r){if(2===t){var n=e.__iterator(t,r);return new F(function(){var e=n.next();if(!e.done){var t=e.value[0];e.value[0]=e.value[1],e.value[1]=t}return e})}return e.__iterator(1===t?0:1,r)},t}function xe(e,t,r){var n=We(e);return n.size=e.size,n.has=function(t){return e.has(t)},n.get=function(n,o){var i=e.get(n,s);return i===s?o:t.call(r,i,n,e)},n.__iterateUncached=function(n,o){var i=this;return e.__iterate(function(e,o,s){return!1!==n(t.call(r,e,o,s),o,i)},o)},n.__iteratorUncached=function(n,o){var i=e.__iterator(2,o);return new F(function(){var o=i.next();if(o.done)return o;var s=o.value,a=s[0];return U(n,a,t.call(r,s[1],a,e),o)})},n}function ke(e,t){var r=this,n=We(e);return n._iter=e,n.size=e.size,n.reverse=function(){return e},e.flip&&(n.flip=function(){var t=De(e);return t.reverse=function(){return e.flip()},t}),n.get=function(r,n){return e.get(t?r:-1-r,n)},n.has=function(r){return e.has(t?r:-1-r)},n.includes=function(t){return e.includes(t)},n.cacheResult=Ge,n.__iterate=function(r,n){var o=this,i=0;return n&&l(e),e.__iterate(function(e,s){return r(e,t?s:n?o.size-++i:i++,o)},!n)},n.__iterator=function(n,o){var i=0;o&&l(e);var s=e.__iterator(2,!o);return new F(function(){var e=s.next();if(e.done)return e;var a=e.value;return U(n,t?a[0]:o?r.size-++i:i++,a[1],e)})},n}function je(e,t,r,n){var o=We(e);return n&&(o.has=function(n){var o=e.get(n,s);return o!==s&&!!t.call(r,o,n,e)},o.get=function(n,o){var i=e.get(n,s);return i!==s&&t.call(r,i,n,e)?i:o}),o.__iterateUncached=function(o,i){var s=this,a=0;return e.__iterate(function(e,i,c){if(t.call(r,e,i,c))return a++,o(e,n?i:a-1,s)},i),a},o.__iteratorUncached=function(o,i){var s=e.__iterator(2,i),a=0;return new F(function(){for(;;){var i=s.next();if(i.done)return i;var c=i.value,l=c[0],u=c[1];if(t.call(r,u,l,e))return U(o,n?l:a++,u,i)}})},o}function Me(e,t,r,n){var o=e.size;if(p(t,r,o))return e;if(void 0===o&&(t<0||r<0))return Me(e.toSeq().cacheResult(),t,r,n);var i,s=h(t,o),a=f(r,o)-s;a==a&&(i=a<0?0:a);var c=We(e);return c.size=0===i?i:e.size&&i||void 0,!n&&N(e)&&i>=0&&(c.get=function(t,r){return(t=u(this,t))>=0&&t<i?e.get(t+s,r):r}),c.__iterateUncached=function(t,r){var o=this;if(0===i)return 0;if(r)return this.cacheResult().__iterate(t,r);var a=0,c=!0,l=0;return e.__iterate(function(e,r){if(!c||!(c=a++<s))return l++,!1!==t(e,n?r:l-1,o)&&l!==i}),l},c.__iteratorUncached=function(t,r){if(0!==i&&r)return this.cacheResult().__iterator(t,r);if(0===i)return new F($);var o=e.__iterator(t,r),a=0,c=0;return new F(function(){for(;a++<s;)o.next();if(++c>i)return{value:void 0,done:!0};var e=o.next();return n||1===t||e.done?e:U(t,c-1,0===t?void 0:e.value[1],e)})},c}function Le(e,t,r,n){var o=We(e);return o.__iterateUncached=function(o,i){var s=this;if(i)return this.cacheResult().__iterate(o,i);var a=!0,c=0;return e.__iterate(function(e,i,l){if(!a||!(a=t.call(r,e,i,l)))return c++,o(e,n?i:c-1,s)}),c},o.__iteratorUncached=function(o,i){var s=this;if(i)return this.cacheResult().__iterator(o,i);var a=e.__iterator(2,i),c=!0,l=0;return new F(function(){var e,i,u;do{if((e=a.next()).done)return n||1===o?e:U(o,l++,0===o?void 0:e.value[1],e);var d=e.value;i=d[0],u=d[1],c&&(c=t.call(r,u,i,s))}while(c);return 2===o?e:U(o,i,u,e)})},o}function Fe(e,t,r){var n=We(e);return n.__iterateUncached=function(o,i){if(i)return this.cacheResult().__iterate(o,i);var s=0,a=!1;return function e(c,l){c.__iterate(function(i,c){return(!t||l<t)&&y(i)?e(i,l+1):(s++,!1===o(i,r?c:s-1,n)&&(a=!0)),!a},i)}(e,0),s},n.__iteratorUncached=function(n,o){if(o)return this.cacheResult().__iterator(n,o);var i=e.__iterator(n,o),s=[],a=0;return new F(function(){for(;i;){var e=i.next();if(!1===e.done){var c=e.value;if(2===n&&(c=c[1]),t&&!(s.length<t)||!y(c))return r?e:U(n,a++,c,e);s.push(i),i=c.__iterator(n,o)}else i=s.pop()}return{value:void 0,done:!0}})},n}function Ue(e,t,r){t||(t=Ke);var n=w(e),o=0,i=e.toSeq().map(function(t,n){return[n,t,o++,r?r(t,n,e):t]}).valueSeq().toArray();return i.sort(function(e,r){return t(e[3],r[3])||e[2]-r[2]}).forEach(n?function(e,t){i[t].length=2}:function(e,t){i[t]=e[1]}),n?K(i):_(e)?X(i):J(i)}function $e(e,t,r){if(t||(t=Ke),r){var n=e.toSeq().map(function(t,n){return[t,r(t,n,e)]}).reduce(function(e,r){return Be(t,e[1],r[1])?r:e});return n&&n[0]}return e.reduce(function(e,r){return Be(t,e,r)?r:e})}function Be(e,t,r){var n=e(r,t);return 0===n&&r!==t&&(null==r||r!=r)||n>0}function Ve(e,t,r,n){var o=We(e),i=new Q(r).map(function(e){return e.size});return o.size=n?i.max():i.min(),o.__iterate=function(e,t){for(var r,n=this.__iterator(1,t),o=0;!(r=n.next()).done&&!1!==e(r.value,o++,this););return o},o.__iteratorUncached=function(e,o){var i=r.map(function(e){return e=P(e),H(o?e.reverse():e)}),s=0,a=!1;return new F(function(){var r;return a||(r=i.map(function(e){return e.next()}),a=n?r.every(function(e){return e.done}):r.some(function(e){return e.done})),a?{value:void 0,done:!0}:U(e,s++,t.apply(null,r.map(function(e){return e.value})))})},o}function He(e,t){return e===t?e:N(e)?t:e.constructor(t)}function qe(e){if(e!==Object(e))throw new TypeError("Expected [K, V] tuple: "+e)}function ze(e){return w(e)?T:_(e)?C:I}function We(e){return Object.create((w(e)?K:_(e)?X:J).prototype)}function Ge(){return this._iter.cacheResult?(this._iter.cacheResult(),this.size=this._iter.size,this):G.prototype.cacheResult.call(this)}function Ke(e,t){return void 0===e&&void 0===t?0:void 0===e?1:void 0===t?-1:e>t?1:e<t?-1:0}function Xe(e,t){t=t||0;for(var r=Math.max(0,e.length-t),n=new Array(r),o=0;o<r;o++)n[o]=e[o+t];return n}function Je(e,t){if(!e)throw new Error(t)}function Qe(e){Je(e!==1/0,"Cannot perform this action with an infinite size.")}function Ye(e){if(W(e)&&"string"!=typeof e)return e;if(k(e))return e.toArray();throw new TypeError("Invalid keyPath: expected Ordered Collection or Array: "+e)}Ne.prototype.cacheResult=Oe.prototype.cacheResult=Re.prototype.cacheResult=Ae.prototype.cacheResult=Ge;var Ze=Object.prototype.toString;function et(e){if(!e||"object"!=typeof e||"[object Object]"!==Ze.call(e))return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;for(var r=t,n=Object.getPrototypeOf(t);null!==n;)r=n,n=Object.getPrototypeOf(r);return r===t}function tt(e){return"object"==typeof e&&(D(e)||Array.isArray(e)||et(e))}function rt(e){try{return"string"==typeof e?JSON.stringify(e):String(e)}catch(t){return JSON.stringify(e)}}function nt(e,t){return D(e)?e.has(t):tt(e)&&z.call(e,t)}function ot(e,t,r){return D(e)?e.get(t,r):nt(e,t)?"function"==typeof e.get?e.get(t):e[t]:r}function it(e){return"string"==typeof e&&("__proto__"===e||"constructor"===e)}function st(e){if(Array.isArray(e))return Xe(e);var t={};for(var r in e)it(r)||z.call(e,r)&&(t[r]=e[r]);return t}function at(e,t){if(!tt(e))throw new TypeError("Cannot update non-data-structure value: "+e);if(D(e)){if(!e.remove)throw new TypeError("Cannot update immutable value without .remove() method: "+e);return e.remove(t)}if(!z.call(e,t))return e;var r=st(e);return Array.isArray(r)?r.splice(t,1):delete r[t],r}function ct(e,t,r){if(it(t))return e;if(!tt(e))throw new TypeError("Cannot update non-data-structure value: "+e);if(D(e)){if(!e.set)throw new TypeError("Cannot update immutable value without .set() method: "+e);return e.set(t,r)}if(z.call(e,t)&&r===e[t])return e;var n=st(e);return n[t]=r,n}function lt(e,t,r,n){n||(n=r,r=void 0);var o=ut(D(e),e,Ye(t),0,r,n);return o===s?r:o}function ut(e,t,r,n,o,i){var a=t===s;if(n===r.length){var c=a?o:t,l=i(c);return l===c?t:l}if(!a&&!tt(t))throw new TypeError("Cannot update within non-data-structure value in path ["+r.slice(0,n).map(rt)+"]: "+t);var u=r[n],d=a?s:ot(t,u,s),p=ut(d===s?e:D(d),d,r,n+1,o,i);return p===d?t:p===s?at(t,u):ct(a?e?Gt():{}:t,u,p)}function dt(e,t,r){return lt(e,t,s,function(){return r})}function pt(e,t){return dt(this,e,t)}function ht(e,t){return lt(e,t,function(){return s})}function ft(e){return ht(this,e)}function gt(e,t,r,n){return lt(e,[t],r,n)}function mt(e,t,r){return 1===arguments.length?e(this):gt(this,e,t,r)}function vt(e,t,r){return lt(this,e,t,r)}function yt(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return wt(this,e)}function St(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];if("function"!=typeof e)throw new TypeError("Invalid merger function: "+e);return wt(this,t,e)}function wt(e,t,r){for(var n=[],o=0;o<t.length;o++){var i=T(t[o]);0!==i.size&&n.push(i)}return 0===n.length?e:0!==e.toSeq().size||e.__ownerID||1!==n.length?e.withMutations(function(e){for(var t=r?function(t,n){gt(e,n,s,function(e){return e===s?t:r(e,t,n)})}:function(t,r){e.set(r,t)},o=0;o<n.length;o++)n[o].forEach(t)}):e.constructor(n[0])}function Et(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];return Ct(e,t)}function _t(e,t){for(var r=[],n=arguments.length-2;n-- >0;)r[n]=arguments[n+2];return Ct(t,r,e)}function bt(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];return Tt(e,t)}function Pt(e,t){for(var r=[],n=arguments.length-2;n-- >0;)r[n]=arguments[n+2];return Tt(t,r,e)}function Tt(e,t,r){return Ct(e,t,function(e){return function t(r,n,o){return tt(r)&&tt(n)&&(i=n,s=G(r),a=G(i),_(s)===_(a)&&w(s)===w(a))?Ct(r,[n],t):e?e(r,n,o):n;var i,s,a}}(r))}function Ct(e,t,r){if(!tt(e))throw new TypeError("Cannot merge into non-data-structure value: "+e);if(D(e))return"function"==typeof r&&e.mergeWith?e.mergeWith.apply(e,[r].concat(t)):e.merge?e.merge.apply(e,t):e.concat.apply(e,t);for(var n=Array.isArray(e),o=e,i=n?C:T,s=n?function(t){o===e&&(o=st(o)),o.push(t)}:function(t,n){if(!it(n)){var i=z.call(o,n),s=i&&r?r(o[n],t,n):t;i&&s===o[n]||(o===e&&(o=st(o)),o[n]=s)}},a=0;a<t.length;a++)i(t[a]).forEach(s);return o}function It(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return Tt(this,e)}function Ot(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];return Tt(this,t,e)}function Nt(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];return lt(this,e,Gt(),function(e){return Ct(e,t)})}function Rt(e){for(var t=[],r=arguments.length-1;r-- >0;)t[r]=arguments[r+1];return lt(this,e,Gt(),function(e){return Tt(e,t)})}function At(e){var t=this.asMutable();return e(t),t.wasAltered()?t.__ensureOwner(this.__ownerID):this}function Dt(){return this.__ownerID?this:this.__ensureOwner(new c)}function xt(){return this.__ensureOwner()}function kt(){return this.__altered}var jt=function(e){function t(t){return null==t?Gt():se(t)&&!k(t)?t:Gt().withMutations(function(r){var n=e(t);Qe(n.size),n.forEach(function(e,t){return r.set(t,e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return Gt().withMutations(function(t){for(var r=0;r<e.length;r+=2){if(r+1>=e.length)throw new Error("Missing value for key: "+e[r]);t.set(e[r],e[r+1])}})},t.prototype.toString=function(){return this.__toString("Map {","}")},t.prototype.get=function(e,t){return this._root?this._root.get(0,void 0,e,t):t},t.prototype.set=function(e,t){return Kt(this,e,t)},t.prototype.remove=function(e){return Kt(this,e,s)},t.prototype.deleteAll=function(e){var t=P(e);return 0===t.size?this:this.withMutations(function(e){t.forEach(function(t){return e.remove(t)})})},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):Gt()},t.prototype.sort=function(e){return Sr(Ue(this,e))},t.prototype.sortBy=function(e,t){return Sr(Ue(this,t,e))},t.prototype.map=function(e,t){var r=this;return this.withMutations(function(n){n.forEach(function(o,i){n.set(i,e.call(t,o,i,r))})})},t.prototype.__iterator=function(e,t){return new Ht(this,e,t)},t.prototype.__iterate=function(e,t){var r=this,n=0;return this._root&&this._root.iterate(function(t){return n++,e(t[1],t[0],r)},t),n},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Wt(this.size,this._root,e,this.__hash):0===this.size?Gt():(this.__ownerID=e,this.__altered=!1,this)},t}(T);jt.isMap=se;var Mt=jt.prototype;Mt[ie]=!0,Mt[n]=Mt.remove,Mt.removeAll=Mt.deleteAll,Mt.setIn=pt,Mt.removeIn=Mt.deleteIn=ft,Mt.update=mt,Mt.updateIn=vt,Mt.merge=Mt.concat=yt,Mt.mergeWith=St,Mt.mergeDeep=It,Mt.mergeDeepWith=Ot,Mt.mergeIn=Nt,Mt.mergeDeepIn=Rt,Mt.withMutations=At,Mt.wasAltered=kt,Mt.asImmutable=xt,Mt["@@transducer/init"]=Mt.asMutable=Dt,Mt["@@transducer/step"]=function(e,t){return e.set(t[0],t[1])},Mt["@@transducer/result"]=function(e){return e.asImmutable()};var Lt=function(e,t){this.ownerID=e,this.entries=t};Lt.prototype.get=function(e,t,r,n){for(var o=this.entries,i=0,s=o.length;i<s;i++)if(le(r,o[i][0]))return o[i][1];return n},Lt.prototype.update=function(e,t,r,n,o,i,l){for(var u=o===s,d=this.entries,p=0,h=d.length;p<h&&!le(n,d[p][0]);p++);var f=p<h;if(f?d[p][1]===o:u)return this;if(a(l),(u||!f)&&a(i),!u||1!==d.length){if(!f&&!u&&d.length>=er)return function(e,t,r,n){e||(e=new c);for(var o=new Bt(e,he(r),[r,n]),i=0;i<t.length;i++){var s=t[i];o=o.update(e,0,void 0,s[0],s[1])}return o}(e,d,n,o);var g=e&&e===this.ownerID,m=g?d:Xe(d);return f?u?p===h-1?m.pop():m[p]=m.pop():m[p]=[n,o]:m.push([n,o]),g?(this.entries=m,this):new Lt(e,m)}};var Ft=function(e,t,r){this.ownerID=e,this.bitmap=t,this.nodes=r};Ft.prototype.get=function(e,t,r,n){void 0===t&&(t=he(r));var o=1<<((0===e?t:t>>>e)&i),s=this.bitmap;return 0===(s&o)?n:this.nodes[Yt(s&o-1)].get(e+5,t,r,n)},Ft.prototype.update=function(e,t,r,n,a,c,l){void 0===r&&(r=he(n));var u=(0===t?r:r>>>t)&i,d=1<<u,p=this.bitmap,h=0!==(p&d);if(!h&&a===s)return this;var f=Yt(p&d-1),g=this.nodes,m=h?g[f]:void 0,v=Xt(m,e,t+5,r,n,a,c,l);if(v===m)return this;if(!h&&v&&g.length>=tr)return function(e,t,r,n,i){for(var s=0,a=new Array(o),c=0;0!==r;c++,r>>>=1)a[c]=1&r?t[s++]:void 0;return a[n]=i,new Ut(e,s+1,a)}(e,g,p,u,v);if(h&&!v&&2===g.length&&Jt(g[1^f]))return g[1^f];if(h&&v&&1===g.length&&Jt(v))return v;var y=e&&e===this.ownerID,S=h?v?p:p^d:p|d,w=h?v?Zt(g,f,v,y):function(e,t,r){var n=e.length-1;if(r&&t===n)return e.pop(),e;for(var o=new Array(n),i=0,s=0;s<n;s++)s===t&&(i=1),o[s]=e[s+i];return o}(g,f,y):function(e,t,r,n){var o=e.length+1;if(n&&t+1===o)return e[t]=r,e;for(var i=new Array(o),s=0,a=0;a<o;a++)a===t?(i[a]=r,s=-1):i[a]=e[a+s];return i}(g,f,v,y);return y?(this.bitmap=S,this.nodes=w,this):new Ft(e,S,w)};var Ut=function(e,t,r){this.ownerID=e,this.count=t,this.nodes=r};Ut.prototype.get=function(e,t,r,n){void 0===t&&(t=he(r));var o=(0===e?t:t>>>e)&i,s=this.nodes[o];return s?s.get(e+5,t,r,n):n},Ut.prototype.update=function(e,t,r,n,o,a,c){void 0===r&&(r=he(n));var l=(0===t?r:r>>>t)&i,u=o===s,d=this.nodes,p=d[l];if(u&&!p)return this;var h=Xt(p,e,t+5,r,n,o,a,c);if(h===p)return this;var f=this.count;if(p){if(!h&&--f<rr)return function(e,t,r,n){for(var o=0,i=0,s=new Array(r),a=0,c=1,l=t.length;a<l;a++,c<<=1){var u=t[a];void 0!==u&&a!==n&&(o|=c,s[i++]=u)}return new Ft(e,o,s)}(e,d,f,l)}else f++;var g=e&&e===this.ownerID,m=Zt(d,l,h,g);return g?(this.count=f,this.nodes=m,this):new Ut(e,f,m)};var $t=function(e,t,r){this.ownerID=e,this.keyHash=t,this.entries=r};$t.prototype.get=function(e,t,r,n){for(var o=this.entries,i=0,s=o.length;i<s;i++)if(le(r,o[i][0]))return o[i][1];return n},$t.prototype.update=function(e,t,r,n,o,i,c){void 0===r&&(r=he(n));var l=o===s;if(r!==this.keyHash)return l?this:(a(c),a(i),Qt(this,e,t,r,[n,o]));for(var u=this.entries,d=0,p=u.length;d<p&&!le(n,u[d][0]);d++);var h=d<p;if(h?u[d][1]===o:l)return this;if(a(c),(l||!h)&&a(i),l&&2===p)return new Bt(e,this.keyHash,u[1^d]);var f=e&&e===this.ownerID,g=f?u:Xe(u);return h?l?d===p-1?g.pop():g[d]=g.pop():g[d]=[n,o]:g.push([n,o]),f?(this.entries=g,this):new $t(e,this.keyHash,g)};var Bt=function(e,t,r){this.ownerID=e,this.keyHash=t,this.entry=r};Bt.prototype.get=function(e,t,r,n){return le(r,this.entry[0])?this.entry[1]:n},Bt.prototype.update=function(e,t,r,n,o,i,c){var l=o===s,u=le(n,this.entry[0]);return(u?o===this.entry[1]:l)?this:(a(c),l?void a(i):u?e&&e===this.ownerID?(this.entry[1]=o,this):new Bt(e,this.keyHash,[n,o]):(a(i),Qt(this,e,t,he(n),[n,o])))},Lt.prototype.iterate=$t.prototype.iterate=function(e,t){for(var r=this.entries,n=0,o=r.length-1;n<=o;n++)if(!1===e(r[t?o-n:n]))return!1},Ft.prototype.iterate=Ut.prototype.iterate=function(e,t){for(var r=this.nodes,n=0,o=r.length-1;n<=o;n++){var i=r[t?o-n:n];if(i&&!1===i.iterate(e,t))return!1}},Bt.prototype.iterate=function(e,t){return e(this.entry)};var Vt,Ht=function(e){function t(e,t,r){this._type=t,this._reverse=r,this._stack=e._root&&zt(e._root)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.next=function(){for(var e=this._type,t=this._stack;t;){var r=t.node,n=t.index++,o=void 0;if(r.entry){if(0===n)return qt(e,r.entry)}else if(r.entries){if(n<=(o=r.entries.length-1))return qt(e,r.entries[this._reverse?o-n:n])}else if(n<=(o=r.nodes.length-1)){var i=r.nodes[this._reverse?o-n:n];if(i){if(i.entry)return qt(e,i.entry);t=this._stack=zt(i,t)}continue}t=this._stack=this._stack.__prev}return{value:void 0,done:!0}},t}(F);function qt(e,t){return U(e,t[0],t[1])}function zt(e,t){return{node:e,index:0,__prev:t}}function Wt(e,t,r,n){var o=Object.create(Mt);return o.size=e,o._root=t,o.__ownerID=r,o.__hash=n,o.__altered=!1,o}function Gt(){return Vt||(Vt=Wt(0))}function Kt(e,t,r){var n,o;if(e._root){var i={value:!1},a={value:!1};if(n=Xt(e._root,e.__ownerID,0,void 0,t,r,i,a),!a.value)return e;o=e.size+(i.value?r===s?-1:1:0)}else{if(r===s)return e;o=1,n=new Lt(e.__ownerID,[[t,r]])}return e.__ownerID?(e.size=o,e._root=n,e.__hash=void 0,e.__altered=!0,e):n?Wt(o,n):Gt()}function Xt(e,t,r,n,o,i,c,l){return e?e.update(t,r,n,o,i,c,l):i===s?e:(a(l),a(c),new Bt(t,n,[o,i]))}function Jt(e){return e.constructor===Bt||e.constructor===$t}function Qt(e,t,r,n,o){if(e.keyHash===n)return new $t(t,n,[e.entry,o]);var s,a=(0===r?e.keyHash:e.keyHash>>>r)&i,c=(0===r?n:n>>>r)&i,l=a===c?[Qt(e,t,r+5,n,o)]:(s=new Bt(t,n,o),a<c?[e,s]:[s,e]);return new Ft(t,1<<a|1<<c,l)}function Yt(e){return e=(e=(858993459&(e-=e>>1&1431655765))+(e>>2&858993459))+(e>>4)&252645135,127&(e+=e>>8)+(e>>16)}function Zt(e,t,r,n){var o=n?e:Xe(e);return o[t]=r,o}var er=8,tr=16,rr=8,nr="@@__IMMUTABLE_LIST__@@";function or(e){return Boolean(e&&e[nr])}var ir=function(e){function t(t){var r=pr();if(null==t)return r;if(or(t))return t;var n=e(t),i=n.size;return 0===i?r:(Qe(i),i>0&&i<o?dr(0,i,5,null,new ar(n.toArray())):r.withMutations(function(e){e.setSize(i),n.forEach(function(t,r){return e.set(r,t)})}))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("List [","]")},t.prototype.get=function(e,t){if((e=u(this,e))>=0&&e<this.size){var r=gr(this,e+=this._origin);return r&&r.array[e&i]}return t},t.prototype.set=function(e,t){return function(e,t,r){if((t=u(e,t))!=t)return e;if(t>=e.size||t<0)return e.withMutations(function(e){t<0?mr(e,t).set(0,r):mr(e,0,t+1).set(t,r)});t+=e._origin;var n=e._tail,o=e._root,i={value:!1};return t>=vr(e._capacity)?n=hr(n,e.__ownerID,0,t,r,i):o=hr(o,e.__ownerID,e._level,t,r,i),i.value?e.__ownerID?(e._root=o,e._tail=n,e.__hash=void 0,e.__altered=!0,e):dr(e._origin,e._capacity,e._level,o,n):e}(this,e,t)},t.prototype.remove=function(e){return this.has(e)?0===e?this.shift():e===this.size-1?this.pop():this.splice(e,1):this},t.prototype.insert=function(e,t){return this.splice(e,0,t)},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=this._origin=this._capacity=0,this._level=5,this._root=this._tail=this.__hash=void 0,this.__altered=!0,this):pr()},t.prototype.push=function(){var e=arguments,t=this.size;return this.withMutations(function(r){mr(r,0,t+e.length);for(var n=0;n<e.length;n++)r.set(t+n,e[n])})},t.prototype.pop=function(){return mr(this,0,-1)},t.prototype.unshift=function(){var e=arguments;return this.withMutations(function(t){mr(t,-e.length);for(var r=0;r<e.length;r++)t.set(r,e[r])})},t.prototype.shift=function(){return mr(this,1)},t.prototype.concat=function(){for(var t=arguments,r=[],n=0;n<arguments.length;n++){var o=t[n],i=e("string"!=typeof o&&B(o)?o:[o]);0!==i.size&&r.push(i)}return 0===r.length?this:0!==this.size||this.__ownerID||1!==r.length?this.withMutations(function(e){r.forEach(function(t){return t.forEach(function(t){return e.push(t)})})}):this.constructor(r[0])},t.prototype.setSize=function(e){return mr(this,0,e)},t.prototype.map=function(e,t){var r=this;return this.withMutations(function(n){for(var o=0;o<r.size;o++)n.set(o,e.call(t,n.get(o),o,r))})},t.prototype.slice=function(e,t){var r=this.size;return p(e,t,r)?this:mr(this,h(e,r),f(t,r))},t.prototype.__iterator=function(e,t){var r=t?this.size:0,n=ur(this,t);return new F(function(){var o=n();return o===lr?{value:void 0,done:!0}:U(e,t?--r:r++,o)})},t.prototype.__iterate=function(e,t){for(var r,n=t?this.size:0,o=ur(this,t);(r=o())!==lr&&!1!==e(r,t?--n:n++,this););return n},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?dr(this._origin,this._capacity,this._level,this._root,this._tail,e,this.__hash):0===this.size?pr():(this.__ownerID=e,this.__altered=!1,this)},t}(C);ir.isList=or;var sr=ir.prototype;sr[nr]=!0,sr[n]=sr.remove,sr.merge=sr.concat,sr.setIn=pt,sr.deleteIn=sr.removeIn=ft,sr.update=mt,sr.updateIn=vt,sr.mergeIn=Nt,sr.mergeDeepIn=Rt,sr.withMutations=At,sr.wasAltered=kt,sr.asImmutable=xt,sr["@@transducer/init"]=sr.asMutable=Dt,sr["@@transducer/step"]=function(e,t){return e.push(t)},sr["@@transducer/result"]=function(e){return e.asImmutable()};var ar=function(e,t){this.array=e,this.ownerID=t};ar.prototype.removeBefore=function(e,t,r){if(r===t?1<<t:0===this.array.length)return this;var n=r>>>t&i;if(n>=this.array.length)return new ar([],e);var o,s=0===n;if(t>0){var a=this.array[n];if((o=a&&a.removeBefore(e,t-5,r))===a&&s)return this}if(s&&!o)return this;var c=fr(this,e);if(!s)for(var l=0;l<n;l++)c.array[l]=void 0;return o&&(c.array[n]=o),c},ar.prototype.removeAfter=function(e,t,r){if(r===(t?1<<t:0)||0===this.array.length)return this;var n,o=r-1>>>t&i;if(o>=this.array.length)return this;if(t>0){var s=this.array[o];if((n=s&&s.removeAfter(e,t-5,r))===s&&o===this.array.length-1)return this}var a=fr(this,e);return a.array.splice(o+1),n&&(a.array[o]=n),a};var cr,lr={};function ur(e,t){var r=e._origin,n=e._capacity,i=vr(n),s=e._tail;return function e(a,c,l){return 0===c?function(e,a){var c=a===i?s&&s.array:e&&e.array,l=a>r?0:r-a,u=n-a;return u>o&&(u=o),function(){if(l===u)return lr;var e=t?--u:l++;return c&&c[e]}}(a,l):function(i,s,a){var c,l=i&&i.array,u=a>r?0:r-a>>s,d=1+(n-a>>s);return d>o&&(d=o),function(){for(;;){if(c){var r=c();if(r!==lr)return r;c=null}if(u===d)return lr;var n=t?--d:u++;c=e(l&&l[n],s-5,a+(n<<s))}}}(a,c,l)}(e._root,e._level,0)}function dr(e,t,r,n,o,i,s){var a=Object.create(sr);return a.size=t-e,a._origin=e,a._capacity=t,a._level=r,a._root=n,a._tail=o,a.__ownerID=i,a.__hash=s,a.__altered=!1,a}function pr(){return cr||(cr=dr(0,0,5))}function hr(e,t,r,n,o,s){var c,l=n>>>r&i,u=e&&l<e.array.length;if(!u&&void 0===o)return e;if(r>0){var d=e&&e.array[l],p=hr(d,t,r-5,n,o,s);return p===d?e:((c=fr(e,t)).array[l]=p,c)}return u&&e.array[l]===o?e:(s&&a(s),c=fr(e,t),void 0===o&&l===c.array.length-1?c.array.pop():c.array[l]=o,c)}function fr(e,t){return t&&e&&t===e.ownerID?e:new ar(e?e.array.slice():[],t)}function gr(e,t){if(t>=vr(e._capacity))return e._tail;if(t<1<<e._level+5){for(var r=e._root,n=e._level;r&&n>0;)r=r.array[t>>>n&i],n-=5;return r}}function mr(e,t,r){void 0!==t&&(t|=0),void 0!==r&&(r|=0);var n=e.__ownerID||new c,o=e._origin,s=e._capacity,a=o+t,l=void 0===r?s:r<0?s+r:o+r;if(a===o&&l===s)return e;if(a>=l)return e.clear();for(var u=e._level,d=e._root,p=0;a+p<0;)d=new ar(d&&d.array.length?[void 0,d]:[],n),p+=1<<(u+=5);p&&(a+=p,o+=p,l+=p,s+=p);for(var h=vr(s),f=vr(l);f>=1<<u+5;)d=new ar(d&&d.array.length?[d]:[],n),u+=5;var g=e._tail,m=f<h?gr(e,l-1):f>h?new ar([],n):g;if(g&&f>h&&a<s&&g.array.length){for(var v=d=fr(d,n),y=u;y>5;y-=5){var S=h>>>y&i;v=v.array[S]=fr(v.array[S],n)}v.array[h>>>5&i]=g}if(l<s&&(m=m&&m.removeAfter(n,0,l)),a>=f)a-=f,l-=f,u=5,d=null,m=m&&m.removeBefore(n,0,a);else if(a>o||f<h){for(p=0;d;){var w=a>>>u&i;if(w!==f>>>u&i)break;w&&(p+=(1<<u)*w),u-=5,d=d.array[w]}d&&a>o&&(d=d.removeBefore(n,u,a-p)),d&&f<h&&(d=d.removeAfter(n,u,f-p)),p&&(a-=p,l-=p)}return e.__ownerID?(e.size=l-a,e._origin=a,e._capacity=l,e._level=u,e._root=d,e._tail=m,e.__hash=void 0,e.__altered=!0,e):dr(a,l,u,d,m)}function vr(e){return e<o?0:e-1>>>5<<5}var yr,Sr=function(e){function t(e){return null==e?Er():ae(e)?e:Er().withMutations(function(t){var r=T(e);Qe(r.size),r.forEach(function(e,r){return t.set(r,e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("OrderedMap {","}")},t.prototype.get=function(e,t){var r=this._map.get(e);return void 0!==r?this._list.get(r)[1]:t},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._map.clear(),this._list.clear(),this.__altered=!0,this):Er()},t.prototype.set=function(e,t){return _r(this,e,t)},t.prototype.remove=function(e){return _r(this,e,s)},t.prototype.__iterate=function(e,t){var r=this;return this._list.__iterate(function(t){return t&&e(t[1],t[0],r)},t)},t.prototype.__iterator=function(e,t){return this._list.fromEntrySeq().__iterator(e,t)},t.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e),r=this._list.__ensureOwner(e);return e?wr(t,r,e,this.__hash):0===this.size?Er():(this.__ownerID=e,this.__altered=!1,this._map=t,this._list=r,this)},t}(jt);function wr(e,t,r,n){var o=Object.create(Sr.prototype);return o.size=e?e.size:0,o._map=e,o._list=t,o.__ownerID=r,o.__hash=n,o.__altered=!1,o}function Er(){return yr||(yr=wr(Gt(),pr()))}function _r(e,t,r){var n,i,a=e._map,c=e._list,l=a.get(t),u=void 0!==l;if(r===s){if(!u)return e;c.size>=o&&c.size>=2*a.size?(n=(i=c.filter(function(e,t){return void 0!==e&&l!==t})).toKeyedSeq().map(function(e){return e[0]}).flip().toMap(),e.__ownerID&&(n.__ownerID=i.__ownerID=e.__ownerID)):(n=a.remove(t),i=l===c.size-1?c.pop():c.set(l,void 0))}else if(u){if(r===c.get(l)[1])return e;n=a,i=c.set(l,[t,r])}else n=a.set(t,c.size),i=c.set(c.size,[t,r]);return e.__ownerID?(e.size=n.size,e._map=n,e._list=i,e.__hash=void 0,e.__altered=!0,e):wr(n,i)}Sr.isOrderedMap=ae,Sr.prototype[x]=!0,Sr.prototype[n]=Sr.prototype.remove;var br="@@__IMMUTABLE_STACK__@@";function Pr(e){return Boolean(e&&e[br])}var Tr=function(e){function t(e){return null==e?Nr():Pr(e)?e:Nr().pushAll(e)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.prototype.toString=function(){return this.__toString("Stack [","]")},t.prototype.get=function(e,t){var r=this._head;for(e=u(this,e);r&&e--;)r=r.next;return r?r.value:t},t.prototype.peek=function(){return this._head&&this._head.value},t.prototype.push=function(){var e=arguments;if(0===arguments.length)return this;for(var t=this.size+arguments.length,r=this._head,n=arguments.length-1;n>=0;n--)r={value:e[n],next:r};return this.__ownerID?(this.size=t,this._head=r,this.__hash=void 0,this.__altered=!0,this):Or(t,r)},t.prototype.pushAll=function(t){if(0===(t=e(t)).size)return this;if(0===this.size&&Pr(t))return t;Qe(t.size);var r=this.size,n=this._head;return t.__iterate(function(e){r++,n={value:e,next:n}},!0),this.__ownerID?(this.size=r,this._head=n,this.__hash=void 0,this.__altered=!0,this):Or(r,n)},t.prototype.pop=function(){return this.slice(1)},t.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._head=void 0,this.__hash=void 0,this.__altered=!0,this):Nr()},t.prototype.slice=function(t,r){if(p(t,r,this.size))return this;var n=h(t,this.size);if(f(r,this.size)!==this.size)return e.prototype.slice.call(this,t,r);for(var o=this.size-n,i=this._head;n--;)i=i.next;return this.__ownerID?(this.size=o,this._head=i,this.__hash=void 0,this.__altered=!0,this):Or(o,i)},t.prototype.__ensureOwner=function(e){return e===this.__ownerID?this:e?Or(this.size,this._head,e,this.__hash):0===this.size?Nr():(this.__ownerID=e,this.__altered=!1,this)},t.prototype.__iterate=function(e,t){var r=this;if(t)return new Q(this.toArray()).__iterate(function(t,n){return e(t,n,r)},t);for(var n=0,o=this._head;o&&!1!==e(o.value,n++,this);)o=o.next;return n},t.prototype.__iterator=function(e,t){if(t)return new Q(this.toArray()).__iterator(e,t);var r=0,n=this._head;return new F(function(){if(n){var t=n.value;return n=n.next,U(e,r++,t)}return{value:void 0,done:!0}})},t}(C);Tr.isStack=Pr;var Cr,Ir=Tr.prototype;function Or(e,t,r,n){var o=Object.create(Ir);return o.size=e,o._head=t,o.__ownerID=r,o.__hash=n,o.__altered=!1,o}function Nr(){return Cr||(Cr=Or(0))}Ir[br]=!0,Ir.shift=Ir.pop,Ir.unshift=Ir.push,Ir.unshiftAll=Ir.pushAll,Ir.withMutations=At,Ir.wasAltered=kt,Ir.asImmutable=xt,Ir["@@transducer/init"]=Ir.asMutable=Dt,Ir["@@transducer/step"]=function(e,t){return e.unshift(t)},Ir["@@transducer/result"]=function(e){return e.asImmutable()};var Rr="@@__IMMUTABLE_SET__@@";function Ar(e){return Boolean(e&&e[Rr])}function Dr(e){return Ar(e)&&k(e)}function xr(e,t){if(e===t)return!0;if(!y(t)||void 0!==e.size&&void 0!==t.size&&e.size!==t.size||void 0!==e.__hash&&void 0!==t.__hash&&e.__hash!==t.__hash||w(e)!==w(t)||_(e)!==_(t)||k(e)!==k(t))return!1;if(0===e.size&&0===t.size)return!0;var r=!b(e);if(k(e)){var n=e.entries();return t.every(function(e,t){var o=n.next().value;return o&&le(o[1],e)&&(r||le(o[0],t))})&&n.next().done}var o=!1;if(void 0===e.size)if(void 0===t.size)"function"==typeof e.cacheResult&&e.cacheResult();else{o=!0;var i=e;e=t,t=i}var a=!0,c=t.__iterate(function(t,n){if(r?!e.has(t):o?!le(t,e.get(n,s)):!le(e.get(n,s),t))return a=!1,!1});return a&&e.size===c}function kr(e,t){var r=function(r){e.prototype[r]=t[r]};return Object.keys(t).forEach(r),Object.getOwnPropertySymbols&&Object.getOwnPropertySymbols(t).forEach(r),e}function jr(e){if(!e||"object"!=typeof e)return e;if(!y(e)){if(!tt(e))return e;e=G(e)}if(w(e)){var t={};return e.__iterate(function(e,r){it(r)||(t[r]=jr(e))}),t}var r=[];return e.__iterate(function(e){r.push(jr(e))}),r}var Mr=function(e){function t(t){return null==t?Br():Ar(t)&&!k(t)?t:Br().withMutations(function(r){var n=e(t);Qe(n.size),n.forEach(function(e){return r.add(e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(e){return this(T(e).keySeq())},t.intersect=function(e){return(e=P(e).toArray()).length?Fr.intersect.apply(t(e.pop()),e):Br()},t.union=function(e){return(e=P(e).toArray()).length?Fr.union.apply(t(e.pop()),e):Br()},t.prototype.toString=function(){return this.__toString("Set {","}")},t.prototype.has=function(e){return this._map.has(e)},t.prototype.add=function(e){return Ur(this,this._map.set(e,e))},t.prototype.remove=function(e){return Ur(this,this._map.remove(e))},t.prototype.clear=function(){return Ur(this,this._map.clear())},t.prototype.map=function(e,t){var r=this,n=!1,o=Ur(this,this._map.mapEntries(function(o){var i=o[1],s=e.call(t,i,i,r);return s!==i&&(n=!0),[s,s]},t));return n?o:this},t.prototype.union=function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];return 0===(t=t.filter(function(e){return 0!==e.size})).length?this:0!==this.size||this.__ownerID||1!==t.length?this.withMutations(function(r){for(var n=0;n<t.length;n++)"string"==typeof t[n]?r.add(t[n]):e(t[n]).forEach(function(e){return r.add(e)})}):this.constructor(t[0])},t.prototype.intersect=function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];if(0===t.length)return this;t=t.map(function(t){return e(t)});var n=[];return this.forEach(function(e){t.every(function(t){return t.includes(e)})||n.push(e)}),this.withMutations(function(e){n.forEach(function(t){e.remove(t)})})},t.prototype.subtract=function(){for(var t=[],r=arguments.length;r--;)t[r]=arguments[r];if(0===t.length)return this;t=t.map(function(t){return e(t)});var n=[];return this.forEach(function(e){t.some(function(t){return t.includes(e)})&&n.push(e)}),this.withMutations(function(e){n.forEach(function(t){e.remove(t)})})},t.prototype.sort=function(e){return an(Ue(this,e))},t.prototype.sortBy=function(e,t){return an(Ue(this,t,e))},t.prototype.wasAltered=function(){return this._map.wasAltered()},t.prototype.__iterate=function(e,t){var r=this;return this._map.__iterate(function(t){return e(t,t,r)},t)},t.prototype.__iterator=function(e,t){return this._map.__iterator(e,t)},t.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._map.__ensureOwner(e);return e?this.__make(t,e):0===this.size?this.__empty():(this.__ownerID=e,this._map=t,this)},t}(I);Mr.isSet=Ar;var Lr,Fr=Mr.prototype;function Ur(e,t){return e.__ownerID?(e.size=t.size,e._map=t,e):t===e._map?e:0===t.size?e.__empty():e.__make(t)}function $r(e,t){var r=Object.create(Fr);return r.size=e?e.size:0,r._map=e,r.__ownerID=t,r}function Br(){return Lr||(Lr=$r(Gt()))}Fr[Rr]=!0,Fr[n]=Fr.remove,Fr.merge=Fr.concat=Fr.union,Fr.withMutations=At,Fr.asImmutable=xt,Fr["@@transducer/init"]=Fr.asMutable=Dt,Fr["@@transducer/step"]=function(e,t){return e.add(t)},Fr["@@transducer/result"]=function(e){return e.asImmutable()},Fr.__empty=Br,Fr.__make=$r;var Vr,Hr=function(e){function t(e,r,n){if(!(this instanceof t))return new t(e,r,n);if(Je(0!==n,"Cannot step a Range by 0"),e=e||0,void 0===r&&(r=1/0),n=void 0===n?1:Math.abs(n),r<e&&(n=-n),this._start=e,this._end=r,this._step=n,this.size=Math.max(0,Math.ceil((r-e)/n-1)+1),0===this.size){if(Vr)return Vr;Vr=this}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},t.prototype.get=function(e,t){return this.has(e)?this._start+u(this,e)*this._step:t},t.prototype.includes=function(e){var t=(e-this._start)/this._step;return t>=0&&t<this.size&&t===Math.floor(t)},t.prototype.slice=function(e,r){return p(e,r,this.size)?this:(e=h(e,this.size),(r=f(r,this.size))<=e?new t(0,0):new t(this.get(e,this._end),this.get(r,this._end),this._step))},t.prototype.indexOf=function(e){var t=e-this._start;if(t%this._step===0){var r=t/this._step;if(r>=0&&r<this.size)return r}return-1},t.prototype.lastIndexOf=function(e){return this.indexOf(e)},t.prototype.__iterate=function(e,t){for(var r=this.size,n=this._step,o=t?this._start+(r-1)*n:this._start,i=0;i!==r&&!1!==e(o,t?r-++i:i++,this);)o+=t?-n:n;return i},t.prototype.__iterator=function(e,t){var r=this.size,n=this._step,o=t?this._start+(r-1)*n:this._start,i=0;return new F(function(){if(i===r)return{value:void 0,done:!0};var s=o;return o+=t?-n:n,U(e,t?r-++i:i++,s)})},t.prototype.equals=function(e){return e instanceof t?this._start===e._start&&this._end===e._end&&this._step===e._step:xr(this,e)},t}(X);function qr(e,t,r){for(var n=Ye(t),o=0;o!==n.length;)if((e=ot(e,n[o++],s))===s)return r;return e}function zr(e,t){return qr(this,e,t)}function Wr(e,t){return qr(e,t,s)!==s}function Gr(){Qe(this.size);var e={};return this.__iterate(function(t,r){it(r)||(e[r]=t)}),e}P.isIterable=y,P.isKeyed=w,P.isIndexed=_,P.isAssociative=b,P.isOrdered=k,P.Iterator=F,kr(P,{toArray:function(){Qe(this.size);var e=new Array(this.size||0),t=w(this),r=0;return this.__iterate(function(n,o){e[r++]=t?[o,n]:n}),e},toIndexedSeq:function(){return new Ne(this)},toJS:function(){return jr(this)},toKeyedSeq:function(){return new Oe(this,!0)},toMap:function(){return jt(this.toKeyedSeq())},toObject:Gr,toOrderedMap:function(){return Sr(this.toKeyedSeq())},toOrderedSet:function(){return an(w(this)?this.valueSeq():this)},toSet:function(){return Mr(w(this)?this.valueSeq():this)},toSetSeq:function(){return new Re(this)},toSeq:function(){return _(this)?this.toIndexedSeq():w(this)?this.toKeyedSeq():this.toSetSeq()},toStack:function(){return Tr(w(this)?this.valueSeq():this)},toList:function(){return ir(w(this)?this.valueSeq():this)},toString:function(){return"[Collection]"},__toString:function(e,t){return 0===this.size?e+t:e+" "+this.toSeq().map(this.__toStringMapper).join(", ")+" "+t},concat:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return He(this,function(e,t){var r=w(e),n=[e].concat(t).map(function(e){return y(e)?r&&(e=T(e)):e=r?re(e):ne(Array.isArray(e)?e:[e]),e}).filter(function(e){return 0!==e.size});if(0===n.length)return e;if(1===n.length){var o=n[0];if(o===e||r&&w(o)||_(e)&&_(o))return o}var i=new Q(n);return r?i=i.toKeyedSeq():_(e)||(i=i.toSetSeq()),(i=i.flatten(!0)).size=n.reduce(function(e,t){if(void 0!==e){var r=t.size;if(void 0!==r)return e+r}},0),i}(this,e))},includes:function(e){return this.some(function(t){return le(t,e)})},entries:function(){return this.__iterator(2)},every:function(e,t){Qe(this.size);var r=!0;return this.__iterate(function(n,o,i){if(!e.call(t,n,o,i))return r=!1,!1}),r},filter:function(e,t){return He(this,je(this,e,t,!0))},partition:function(e,t){return function(e,t,r){var n=w(e),o=[[],[]];e.__iterate(function(i,s){o[t.call(r,i,s,e)?1:0].push(n?[s,i]:i)});var i=ze(e);return o.map(function(t){return He(e,i(t))})}(this,e,t)},find:function(e,t,r){var n=this.findEntry(e,t);return n?n[1]:r},forEach:function(e,t){return Qe(this.size),this.__iterate(t?e.bind(t):e)},join:function(e){Qe(this.size),e=void 0!==e?""+e:",";var t="",r=!0;return this.__iterate(function(n){r?r=!1:t+=e,t+=null!=n?n.toString():""}),t},keys:function(){return this.__iterator(0)},map:function(e,t){return He(this,xe(this,e,t))},reduce:function(e,t,r){return Yr(this,e,t,r,arguments.length<2,!1)},reduceRight:function(e,t,r){return Yr(this,e,t,r,arguments.length<2,!0)},reverse:function(){return He(this,ke(this,!0))},slice:function(e,t){return He(this,Me(this,e,t,!0))},some:function(e,t){Qe(this.size);var r=!1;return this.__iterate(function(n,o,i){if(e.call(t,n,o,i))return r=!0,!1}),r},sort:function(e){return He(this,Ue(this,e))},values:function(){return this.__iterator(1)},butLast:function(){return this.slice(0,-1)},isEmpty:function(){return void 0!==this.size?0===this.size:!this.some(function(){return!0})},count:function(e,t){return l(e?this.toSeq().filter(e,t):this)},countBy:function(e,t){return function(e,t,r){var n=jt().asMutable();return e.__iterate(function(o,i){n.update(t.call(r,o,i,e),0,function(e){return e+1})}),n.asImmutable()}(this,e,t)},equals:function(e){return xr(this,e)},entrySeq:function(){var e=this;if(e._cache)return new Q(e._cache);var t=e.toSeq().map(en).toIndexedSeq();return t.fromEntrySeq=function(){return e.toSeq()},t},filterNot:function(e,t){return this.filter(tn(e),t)},findEntry:function(e,t,r){var n=r;return this.__iterate(function(r,o,i){if(e.call(t,r,o,i))return n=[o,r],!1}),n},findKey:function(e,t){var r=this.findEntry(e,t);return r&&r[0]},findLast:function(e,t,r){return this.toKeyedSeq().reverse().find(e,t,r)},findLastEntry:function(e,t,r){return this.toKeyedSeq().reverse().findEntry(e,t,r)},findLastKey:function(e,t){return this.toKeyedSeq().reverse().findKey(e,t)},first:function(e){return this.find(d,null,e)},flatMap:function(e,t){return He(this,function(e,t,r){var n=ze(e);return e.toSeq().map(function(o,i){return n(t.call(r,o,i,e))}).flatten(!0)}(this,e,t))},flatten:function(e){return He(this,Fe(this,e,!0))},fromEntrySeq:function(){return new Ae(this)},get:function(e,t){return this.find(function(t,r){return le(r,e)},void 0,t)},getIn:zr,groupBy:function(e,t){return function(e,t,r){var n=w(e),o=(k(e)?Sr():jt()).asMutable();e.__iterate(function(i,s){o.update(t.call(r,i,s,e),function(e){return(e=e||[]).push(n?[s,i]:i),e})});var i=ze(e);return o.map(function(t){return He(e,i(t))}).asImmutable()}(this,e,t)},has:function(e){return this.get(e,s)!==s},hasIn:function(e){return Wr(this,e)},isSubset:function(e){return e="function"==typeof e.includes?e:P(e),this.every(function(t){return e.includes(t)})},isSuperset:function(e){return(e="function"==typeof e.isSubset?e:P(e)).isSubset(this)},keyOf:function(e){return this.findKey(function(t){return le(t,e)})},keySeq:function(){return this.toSeq().map(Zr).toIndexedSeq()},last:function(e){return this.toSeq().reverse().first(e)},lastKeyOf:function(e){return this.toKeyedSeq().reverse().keyOf(e)},max:function(e){return $e(this,e)},maxBy:function(e,t){return $e(this,t,e)},min:function(e){return $e(this,e?rn(e):on)},minBy:function(e,t){return $e(this,t?rn(t):on,e)},rest:function(){return this.slice(1)},skip:function(e){return 0===e?this:this.slice(Math.max(0,e))},skipLast:function(e){return 0===e?this:this.slice(0,-Math.max(0,e))},skipWhile:function(e,t){return He(this,Le(this,e,t,!0))},skipUntil:function(e,t){return this.skipWhile(tn(e),t)},sortBy:function(e,t){return He(this,Ue(this,t,e))},take:function(e){return this.slice(0,Math.max(0,e))},takeLast:function(e){return this.slice(-Math.max(0,e))},takeWhile:function(e,t){return He(this,function(e,t,r){var n=We(e);return n.__iterateUncached=function(n,o){var i=this;if(o)return this.cacheResult().__iterate(n,o);var s=0;return e.__iterate(function(e,o,a){return t.call(r,e,o,a)&&++s&&n(e,o,i)}),s},n.__iteratorUncached=function(n,o){var i=this;if(o)return this.cacheResult().__iterator(n,o);var s=e.__iterator(2,o),a=!0;return new F(function(){if(!a)return{value:void 0,done:!0};var e=s.next();if(e.done)return e;var o=e.value,c=o[0],l=o[1];return t.call(r,l,c,i)?2===n?e:U(n,c,l,e):(a=!1,{value:void 0,done:!0})})},n}(this,e,t))},takeUntil:function(e,t){return this.takeWhile(tn(e),t)},update:function(e){return e(this)},valueSeq:function(){return this.toIndexedSeq()},hashCode:function(){return this.__hash||(this.__hash=function(e){if(e.size===1/0)return 0;var t=k(e),r=w(e),n=t?1:0;return function(e,t){return t=ue(t,3432918353),t=ue(t<<15|t>>>-15,461845907),t=ue(t<<13|t>>>-13,5),t=ue((t=(t+3864292196|0)^e)^t>>>16,2246822507),t=de((t=ue(t^t>>>13,3266489909))^t>>>16)}(e.__iterate(r?t?function(e,t){n=31*n+sn(he(e),he(t))|0}:function(e,t){n=n+sn(he(e),he(t))|0}:t?function(e){n=31*n+he(e)|0}:function(e){n=n+he(e)|0}),n)}(this))}});var Kr=P.prototype;Kr[v]=!0,Kr[L]=Kr.values,Kr.toJSON=Kr.toArray,Kr.__toStringMapper=rt,Kr.inspect=Kr.toSource=function(){return this.toString()},Kr.chain=Kr.flatMap,Kr.contains=Kr.includes,kr(T,{flip:function(){return He(this,De(this))},mapEntries:function(e,t){var r=this,n=0;return He(this,this.toSeq().map(function(o,i){return e.call(t,[i,o],n++,r)}).fromEntrySeq())},mapKeys:function(e,t){var r=this;return He(this,this.toSeq().flip().map(function(n,o){return e.call(t,n,o,r)}).flip())}});var Xr=T.prototype;Xr[S]=!0,Xr[L]=Kr.entries,Xr.toJSON=Gr,Xr.__toStringMapper=function(e,t){return rt(t)+": "+rt(e)},kr(C,{toKeyedSeq:function(){return new Oe(this,!1)},filter:function(e,t){return He(this,je(this,e,t,!1))},findIndex:function(e,t){var r=this.findEntry(e,t);return r?r[0]:-1},indexOf:function(e){var t=this.keyOf(e);return void 0===t?-1:t},lastIndexOf:function(e){var t=this.lastKeyOf(e);return void 0===t?-1:t},reverse:function(){return He(this,ke(this,!1))},slice:function(e,t){return He(this,Me(this,e,t,!1))},splice:function(e,t){var r=arguments.length;if(t=Math.max(t||0,0),0===r||2===r&&!t)return this;e=h(e,e<0?this.count():this.size);var n=this.slice(0,e);return He(this,1===r?n:n.concat(Xe(arguments,2),this.slice(e+t)))},findLastIndex:function(e,t){var r=this.findLastEntry(e,t);return r?r[0]:-1},first:function(e){return this.get(0,e)},flatten:function(e){return He(this,Fe(this,e,!1))},get:function(e,t){return(e=u(this,e))<0||this.size===1/0||void 0!==this.size&&e>this.size?t:this.find(function(t,r){return r===e},void 0,t)},has:function(e){return(e=u(this,e))>=0&&(void 0!==this.size?this.size===1/0||e<this.size:-1!==this.indexOf(e))},interpose:function(e){return He(this,function(e,t){var r=We(e);return r.size=e.size&&2*e.size-1,r.__iterateUncached=function(r,n){var o=this,i=0;return e.__iterate(function(e){return(!i||!1!==r(t,i++,o))&&!1!==r(e,i++,o)},n),i},r.__iteratorUncached=function(r,n){var o,i=e.__iterator(1,n),s=0;return new F(function(){return(!o||s%2)&&(o=i.next()).done?o:s%2?U(r,s++,t):U(r,s++,o.value,o)})},r}(this,e))},interleave:function(){var e=[this].concat(Xe(arguments)),t=Ve(this.toSeq(),X.of,e),r=t.flatten(!0);return t.size&&(r.size=t.size*e.length),He(this,r)},keySeq:function(){return Hr(0,this.size)},last:function(e){return this.get(-1,e)},skipWhile:function(e,t){return He(this,Le(this,e,t,!1))},zip:function(){return He(this,Ve(this,nn,[this].concat(Xe(arguments))))},zipAll:function(){return He(this,Ve(this,nn,[this].concat(Xe(arguments)),!0))},zipWith:function(e){var t=Xe(arguments);return t[0]=this,He(this,Ve(this,e,t))}});var Jr=C.prototype;Jr[E]=!0,Jr[x]=!0,kr(I,{get:function(e,t){return this.has(e)?e:t},includes:function(e){return this.has(e)},keySeq:function(){return this.valueSeq()}});var Qr=I.prototype;function Yr(e,t,r,n,o,i){return Qe(e.size),e.__iterate(function(e,i,s){o?(o=!1,r=e):r=t.call(n,r,e,i,s)},i),r}function Zr(e,t){return t}function en(e,t){return[t,e]}function tn(e){return function(){return!e.apply(this,arguments)}}function rn(e){return function(){return-e.apply(this,arguments)}}function nn(){return Xe(arguments)}function on(e,t){return e<t?1:e>t?-1:0}function sn(e,t){return e^t+2654435769+(e<<6)+(e>>2)|0}Qr.has=Kr.includes,Qr.contains=Qr.includes,Qr.keys=Qr.values,kr(K,Xr),kr(X,Jr),kr(J,Qr);var an=function(e){function t(e){return null==e?dn():Dr(e)?e:dn().withMutations(function(t){var r=I(e);Qe(r.size),r.forEach(function(e){return t.add(e)})})}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.of=function(){return this(arguments)},t.fromKeys=function(e){return this(T(e).keySeq())},t.prototype.toString=function(){return this.__toString("OrderedSet {","}")},t}(Mr);an.isOrderedSet=Dr;var cn,ln=an.prototype;function un(e,t){var r=Object.create(ln);return r.size=e?e.size:0,r._map=e,r.__ownerID=t,r}function dn(){return cn||(cn=un(Er()))}ln[x]=!0,ln.zip=Jr.zip,ln.zipWith=Jr.zipWith,ln.zipAll=Jr.zipAll,ln.__empty=dn,ln.__make=un;var pn={LeftThenRight:-1,RightThenLeft:1},hn=function(e,t){var r;!function(e){if(A(e))throw new Error("Can not call `Record` with an immutable Record as default values. Use a plain javascript object instead.");if(D(e))throw new Error("Can not call `Record` with an immutable Collection as default values. Use a plain javascript object instead.");if(null===e||"object"!=typeof e)throw new Error("Can not call `Record` with a non-object as default values. Use a plain javascript object instead.")}(e);var n=function(i){var s=this;if(i instanceof n)return i;if(!(this instanceof n))return new n(i);if(!r){r=!0;var a=Object.keys(e),c=o._indices={};o._name=t,o._keys=a,o._defaultValues=e;for(var l=0;l<a.length;l++){var u=a[l];c[u]=l,o[u]?"object"==typeof console&&console.warn&&console.warn("Cannot define "+mn(this)+' with property "'+u+'" since that property name is part of the Record API.'):yn(o,u)}}return this.__ownerID=void 0,this._values=ir().withMutations(function(e){e.setSize(s._keys.length),T(i).forEach(function(t,r){e.set(s._indices[r],t===s._defaultValues[r]?void 0:t)})}),this},o=n.prototype=Object.create(fn);return o.constructor=n,t&&(n.displayName=t),n};hn.prototype.toString=function(){for(var e,t=mn(this)+" { ",r=this._keys,n=0,o=r.length;n!==o;n++)t+=(n?", ":"")+(e=r[n])+": "+rt(this.get(e));return t+" }"},hn.prototype.equals=function(e){return this===e||A(e)&&vn(this).equals(vn(e))},hn.prototype.hashCode=function(){return vn(this).hashCode()},hn.prototype.has=function(e){return this._indices.hasOwnProperty(e)},hn.prototype.get=function(e,t){if(!this.has(e))return t;var r=this._indices[e],n=this._values.get(r);return void 0===n?this._defaultValues[e]:n},hn.prototype.set=function(e,t){if(this.has(e)){var r=this._values.set(this._indices[e],t===this._defaultValues[e]?void 0:t);if(r!==this._values&&!this.__ownerID)return gn(this,r)}return this},hn.prototype.remove=function(e){return this.set(e)},hn.prototype.clear=function(){var e=this._values.clear().setSize(this._keys.length);return this.__ownerID?this:gn(this,e)},hn.prototype.wasAltered=function(){return this._values.wasAltered()},hn.prototype.toSeq=function(){return vn(this)},hn.prototype.toJS=function(){return jr(this)},hn.prototype.entries=function(){return this.__iterator(2)},hn.prototype.__iterator=function(e,t){return vn(this).__iterator(e,t)},hn.prototype.__iterate=function(e,t){return vn(this).__iterate(e,t)},hn.prototype.__ensureOwner=function(e){if(e===this.__ownerID)return this;var t=this._values.__ensureOwner(e);return e?gn(this,t,e):(this.__ownerID=e,this._values=t,this)},hn.isRecord=A,hn.getDescriptiveName=mn;var fn=hn.prototype;function gn(e,t,r){var n=Object.create(Object.getPrototypeOf(e));return n._values=t,n.__ownerID=r,n}function mn(e){return e.constructor.displayName||e.constructor.name||"Record"}function vn(e){return re(e._keys.map(function(t){return[t,e.get(t)]}))}function yn(e,t){try{Object.defineProperty(e,t,{get:function(){return this.get(t)},set:function(e){Je(this.__ownerID,"Cannot set on an immutable record."),this.set(t,e)}})}catch(e){}}fn[R]=!0,fn[n]=fn.remove,fn.deleteIn=fn.removeIn=ft,fn.getIn=zr,fn.hasIn=Kr.hasIn,fn.merge=yt,fn.mergeWith=St,fn.mergeIn=Nt,fn.mergeDeep=It,fn.mergeDeepWith=Ot,fn.mergeDeepIn=Rt,fn.setIn=pt,fn.update=mt,fn.updateIn=vt,fn.withMutations=At,fn.asMutable=Dt,fn.asImmutable=xt,fn[L]=fn.entries,fn.toJSON=fn.toObject=Kr.toObject,fn.inspect=fn.toSource=function(){return this.toString()};var Sn,wn=function(e){function t(e,r){if(!(this instanceof t))return new t(e,r);if(this._value=e,this.size=void 0===r?1/0:Math.max(0,r),0===this.size){if(Sn)return Sn;Sn=this}}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},t.prototype.get=function(e,t){return this.has(e)?this._value:t},t.prototype.includes=function(e){return le(this._value,e)},t.prototype.slice=function(e,r){var n=this.size;return p(e,r,n)?this:new t(this._value,f(r,n)-h(e,n))},t.prototype.reverse=function(){return this},t.prototype.indexOf=function(e){return le(this._value,e)?0:-1},t.prototype.lastIndexOf=function(e){return le(this._value,e)?this.size:-1},t.prototype.__iterate=function(e,t){for(var r=this.size,n=0;n!==r&&!1!==e(this._value,t?r-++n:n++,this););return n},t.prototype.__iterator=function(e,t){var r=this,n=this.size,o=0;return new F(function(){return o===n?{value:void 0,done:!0}:U(e,t?n-++o:o++,r._value)})},t.prototype.equals=function(e){return e instanceof t?le(this._value,e._value):xr(this,e)},t}(X);function En(e,t){return _n([],t||bn,e,"",t&&t.length>2?[]:void 0,{"":e})}function _n(e,t,r,n,o,i){if("string"!=typeof r&&!D(r)&&(W(r)||B(r)||et(r))){if(~e.indexOf(r))throw new TypeError("Cannot convert circular structure to Immutable");e.push(r),o&&""!==n&&o.push(n);var s=t.call(i,n,G(r).map(function(n,i){return _n(e,t,n,i,o,r)}),o&&o.slice());return e.pop(),o&&o.pop(),s}return r}function bn(e,t){return _(t)?t.toList():w(t)?t.toMap():t.toSet()}var Pn="4.3.8",Tn=P;const Cn={version:Pn,Collection:P,Iterable:P,Seq:G,Map:jt,OrderedMap:Sr,List:ir,Stack:Tr,Set:Mr,OrderedSet:an,PairSorting:pn,Record:hn,Range:Hr,Repeat:wn,is:le,fromJS:En,hash:he,isImmutable:D,isCollection:y,isKeyed:w,isIndexed:_,isAssociative:b,isOrdered:k,isValueObject:ce,isPlainObject:et,isSeq:N,isList:or,isMap:se,isOrderedMap:ae,isStack:Pr,isSet:Ar,isOrderedSet:Dr,isRecord:A,get:ot,getIn:qr,has:nt,hasIn:Wr,merge:Et,mergeDeep:bt,mergeWith:_t,mergeDeepWith:Pt,remove:at,removeIn:ht,set:ct,setIn:dt,update:gt,updateIn:lt}},8305(e,t){!function(e){var t,r="undefined",n=r!==typeof Buffer&&Buffer,o=r!==typeof Uint8Array&&Uint8Array,i=r!==typeof ArrayBuffer&&ArrayBuffer,s=[0,0,0,0,0,0,0,0],a=Array.isArray||function(e){return!!e&&"[object Array]"==Object.prototype.toString.call(e)},c=4294967296;function l(a,l,w){var E=l?0:4,_=l?4:0,b=l?0:3,P=l?1:2,T=l?2:1,C=l?3:0,I=l?m:y,O=l?v:S,N=D.prototype,R="is"+a,A="_"+R;return N.buffer=void 0,N.offset=0,N[A]=!0,N.toNumber=x,N.toString=function(e){var t=this.buffer,r=this.offset,n=j(t,r+E),o=j(t,r+_),i="",s=!w&&2147483648&n;for(s&&(n=~n,o=c-o),e=e||10;;){var a=n%e*c+o;if(n=Math.floor(n/e),o=Math.floor(a/e),i=(a%e).toString(e)+i,!n&&!o)break}return s&&(i="-"+i),i},N.toJSON=x,N.toArray=u,n&&(N.toBuffer=d),o&&(N.toArrayBuffer=p),D[R]=function(e){return!(!e||!e[A])},e[a]=D,D;function D(e,n,a,l){return this instanceof D?function(e,n,a,l,u){o&&i&&(n instanceof i&&(n=new o(n)),l instanceof i&&(l=new o(l))),n||a||l||t?(h(n,a)||(u=a,l=n,a=0,n=new(t||Array)(8)),e.buffer=n,e.offset=a|=0,r!==typeof l&&("string"==typeof l?function(e,t,r,n){var o=0,i=r.length,s=0,a=0;"-"===r[0]&&o++;for(var l=o;o<i;){var u=parseInt(r[o++],n);if(!(u>=0))break;a=a*n+u,s=s*n+Math.floor(a/c),a%=c}l&&(s=~s,a?a=c-a:s++),k(e,t+E,s),k(e,t+_,a)}(n,a,l,u||10):h(l,u)?f(n,a,l,u):"number"==typeof u?(k(n,a+E,l),k(n,a+_,u)):l>0?I(n,a,l):l<0?O(n,a,l):f(n,a,s,0))):e.buffer=g(s,0)}(this,e,n,a,l):new D(e,n,a,l)}function x(){var e=this.buffer,t=this.offset,r=j(e,t+E),n=j(e,t+_);return w||(r|=0),r?r*c+n:n}function k(e,t,r){e[t+C]=255&r,r>>=8,e[t+T]=255&r,r>>=8,e[t+P]=255&r,r>>=8,e[t+b]=255&r}function j(e,t){return 16777216*e[t+b]+(e[t+P]<<16)+(e[t+T]<<8)+e[t+C]}}function u(e){var r=this.buffer,n=this.offset;return t=null,!1!==e&&0===n&&8===r.length&&a(r)?r:g(r,n)}function d(e){var r=this.buffer,o=this.offset;if(t=n,!1!==e&&0===o&&8===r.length&&Buffer.isBuffer(r))return r;var i=new n(8);return f(i,0,r,o),i}function p(e){var r=this.buffer,n=this.offset,s=r.buffer;if(t=o,!1!==e&&0===n&&s instanceof i&&8===s.byteLength)return s;var a=new o(8);return f(a,0,r,n),a.buffer}function h(e,t){var r=e&&e.length;return t|=0,r&&t+8<=r&&"string"!=typeof e[t]}function f(e,t,r,n){t|=0,n|=0;for(var o=0;o<8;o++)e[t++]=255&r[n++]}function g(e,t){return Array.prototype.slice.call(e,t,t+8)}function m(e,t,r){for(var n=t+8;n>t;)e[--n]=255&r,r/=256}function v(e,t,r){var n=t+8;for(r++;n>t;)e[--n]=255&-r^255,r/=256}function y(e,t,r){for(var n=t+8;t<n;)e[t++]=255&r,r/=256}function S(e,t,r){var n=t+8;for(r++;t<n;)e[t++]=255&-r^255,r/=256}l("Uint64BE",!0,!0),l("Int64BE",!0,!1),l("Uint64LE",!1,!0),l("Int64LE",!1,!1)}("string"!=typeof t.nodeName?t:this||{})},4634(e){var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},8299(e,t,r){"use strict";var n=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}();Object.defineProperty(t,"__esModule",{value:!0});var o=r(983),i=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._executor=t}return n(e,[{key:"then",value:function(e,t){var r=this;return this._result||(this._result=new Promise(function(e,t){o(function(){try{r._executor(e,t)}catch(e){t(e)}})})),this._result.then(e,t)}},{key:"catch",value:function(e){return this.then(void 0,e)}}]),e}();t.default=i,Object.setPrototypeOf?(Object.setPrototypeOf(i.prototype,Promise.prototype),Object.setPrototypeOf(i,Promise)):(i.prototype.__proto__=Promise.prototype,i.__proto__=Promise),e.exports=i,e.exports.default=i},8018(e,t,r){t.encode=r(7870).encode,t.decode=r(7402).decode,t.Encoder=r(7158).Encoder,t.Decoder=r(8762).Decoder,t.createEncodeStream=r(6663).createEncodeStream,t.createDecodeStream=r(5947).createDecodeStream,t.createCodec=r(1325).createCodec,t.codec=r(8884).codec},924(e){function t(e){return e&&e.isBuffer&&e}e.exports=t("undefined"!=typeof Buffer&&Buffer)||t(this.Buffer)||t("undefined"!=typeof window&&window.Buffer)||this.Buffer},7179(e,t){t.copy=function(e,t,r,n){var o;r||(r=0),n||0===n||(n=this.length),t||(t=0);var i=n-r;if(e===this&&r<t&&t<n)for(o=i-1;o>=0;o--)e[o+t]=this[o+r];else for(o=0;o<i;o++)e[o+t]=this[o+r];return i},t.toString=function(e,t,r){var n=this,o=0|t;r||(r=n.length);for(var i="",s=0;o<r;)(s=n[o++])<128?i+=String.fromCharCode(s):(192==(224&s)?s=(31&s)<<6|63&n[o++]:224==(240&s)?s=(15&s)<<12|(63&n[o++])<<6|63&n[o++]:240==(248&s)&&(s=(7&s)<<18|(63&n[o++])<<12|(63&n[o++])<<6|63&n[o++]),s>=65536?(s-=65536,i+=String.fromCharCode((s>>>10)+55296,56320+(1023&s))):i+=String.fromCharCode(s));return i},t.write=function(e,t){for(var r=this,n=t||(t|=0),o=e.length,i=0,s=0;s<o;)(i=e.charCodeAt(s++))<128?r[n++]=i:i<2048?(r[n++]=192|i>>>6,r[n++]=128|63&i):i<55296||i>57343?(r[n++]=224|i>>>12,r[n++]=128|i>>>6&63,r[n++]=128|63&i):(i=65536+(i-55296<<10|e.charCodeAt(s++)-56320),r[n++]=240|i>>>18,r[n++]=128|i>>>12&63,r[n++]=128|i>>>6&63,r[n++]=128|63&i);return n-t}},8964(e,t,r){var n=r(8204),o=e.exports=i(0);function i(e){return new Array(e)}o.alloc=i,o.concat=n.concat,o.from=function(e){if(!n.isBuffer(e)&&n.isView(e))e=n.Uint8Array.from(e);else if(n.isArrayBuffer(e))e=new Uint8Array(e);else{if("string"==typeof e)return n.from.call(o,e);if("number"==typeof e)throw new TypeError('"value" argument must not be a number')}return Array.prototype.slice.call(e)}},2847(e,t,r){var n=r(8204),o=n.global,i=e.exports=n.hasBuffer?s(0):[];function s(e){return new o(e)}i.alloc=n.hasBuffer&&o.alloc||s,i.concat=n.concat,i.from=function(e){if(!n.isBuffer(e)&&n.isView(e))e=n.Uint8Array.from(e);else if(n.isArrayBuffer(e))e=new Uint8Array(e);else{if("string"==typeof e)return n.from.call(i,e);if("number"==typeof e)throw new TypeError('"value" argument must not be a number')}return o.from&&1!==o.from.length?o.from(e):new o(e)}},3043(e,t,r){var n,o=r(7179);t.copy=l,t.slice=u,t.toString=function(e,t,r){return(!a&&i.isBuffer(this)?this.toString:o.toString).apply(this,arguments)},t.write=(n="write",function(){return(this[n]||o[n]).apply(this,arguments)});var i=r(8204),s=i.global,a=i.hasBuffer&&"TYPED_ARRAY_SUPPORT"in s,c=a&&!s.TYPED_ARRAY_SUPPORT;function l(e,t,r,n){var s=i.isBuffer(this),a=i.isBuffer(e);if(s&&a)return this.copy(e,t,r,n);if(c||s||a||!i.isView(this)||!i.isView(e))return o.copy.call(this,e,t,r,n);var l=r||null!=n?u.call(this,r,n):this;return e.set(l,t),l.length}function u(e,t){var r=this.slice||!c&&this.subarray;if(r)return r.call(this,e,t);var n=i.alloc.call(this,t-e);return l.call(this,n,0,e,t),n}},5188(e,t,r){var n=r(8204),o=e.exports=n.hasArrayBuffer?i(0):[];function i(e){return new Uint8Array(e)}o.alloc=i,o.concat=n.concat,o.from=function(e){if(n.isView(e)){var t=e.byteOffset,r=e.byteLength;(e=e.buffer).byteLength!==r&&(e.slice?e=e.slice(t,t+r):(e=new Uint8Array(e)).byteLength!==r&&(e=Array.prototype.slice.call(e,t,t+r)))}else{if("string"==typeof e)return n.from.call(o,e);if("number"==typeof e)throw new TypeError('"value" argument must not be a number')}return new Uint8Array(e)}},8204(e,t,r){var n=t.global=r(924),o=t.hasBuffer=n&&!!n.isBuffer,i=t.hasArrayBuffer="undefined"!=typeof ArrayBuffer,s=t.isArray=r(4634);t.isArrayBuffer=i?function(e){return e instanceof ArrayBuffer||f(e)}:v;var a=t.isBuffer=o?n.isBuffer:v,c=t.isView=i?ArrayBuffer.isView||y("ArrayBuffer","buffer"):v;t.alloc=h,t.concat=function(e,r){r||(r=0,Array.prototype.forEach.call(e,function(e){r+=e.length}));var n=this!==t&&this||e[0],o=h.call(n,r),i=0;return Array.prototype.forEach.call(e,function(e){i+=p.copy.call(e,o,i)}),o},t.from=function(e){return"string"==typeof e?g.call(this,e):m(this).from(e)};var l=t.Array=r(8964),u=t.Buffer=r(2847),d=t.Uint8Array=r(5188),p=t.prototype=r(3043);function h(e){return m(this).alloc(e)}var f=y("ArrayBuffer");function g(e){var t=3*e.length,r=h.call(this,t),n=p.write.call(r,e);return t!==n&&(r=p.slice.call(r,0,n)),r}function m(e){return a(e)?u:c(e)?d:s(e)?l:o?u:i?d:l}function v(){return!1}function y(e,t){return e="[object "+e+"]",function(r){return null!=r&&{}.toString.call(t?r[t]:r)===e}}},8704(e,t,r){var n=r(4634);t.createCodec=a,t.install=function(e){for(var t in e)i.prototype[t]=s(i.prototype[t],e[t])},t.filter=function(e){return n(e)?function(e){return e=e.slice(),function(r){return e.reduce(t,r)};function t(e,t){return t(e)}}(e):e};var o=r(8204);function i(e){if(!(this instanceof i))return new i(e);this.options=e,this.init()}function s(e,t){return e&&t?function(){return e.apply(this,arguments),t.apply(this,arguments)}:e||t}function a(e){return new i(e)}i.prototype.init=function(){var e=this.options;return e&&e.uint8array&&(this.bufferish=o.Uint8Array),this},t.preset=a({preset:!0})},8884(e,t,r){r(3294),r(897),t.codec={preset:r(8704).preset}},3785(e,t,r){t.n=o;var n=r(3294).preset;function o(e){if(!(this instanceof o))return new o(e);if(e&&(this.options=e,e.codec)){var t=this.codec=e.codec;t.bufferish&&(this.bufferish=t.bufferish)}}r(3614).I.mixin(o.prototype),o.prototype.codec=n,o.prototype.fetch=function(){return this.codec.decode(this)}},5947(e,t,r){t.createDecodeStream=a;var n=r(9023),o=r(2203).Transform,i=r(3785).n;n.inherits(a,o);var s={objectMode:!0};function a(e){if(!(this instanceof a))return new a(e);e?e.objectMode=!0:e=s,o.call(this,e);var t=this;(this.decoder=new i(e)).push=function(e){t.push(e)}}a.prototype._transform=function(e,t,r){this.decoder.write(e),this.decoder.flush(),r&&r()}},7402(e,t,r){t.decode=function(e,t){var r=new n(t);return r.write(e),r.read()};var n=r(3785).n},8762(e,t,r){t.Decoder=i;var n=r(1611),o=r(3785).n;function i(e){if(!(this instanceof i))return new i(e);o.call(this,e)}i.prototype=new o,n.mixin(i.prototype),i.prototype.decode=function(e){arguments.length&&this.write(e),this.flush()},i.prototype.push=function(e){this.emit("data",e)},i.prototype.end=function(e){this.decode(e),this.emit("end")}},3357(e,t,r){t.D=o;var n=r(897).preset;function o(e){if(!(this instanceof o))return new o(e);if(e&&(this.options=e,e.codec)){var t=this.codec=e.codec;t.bufferish&&(this.bufferish=t.bufferish)}}r(3614).w.mixin(o.prototype),o.prototype.codec=n,o.prototype.write=function(e){this.codec.encode(this,e)}},6663(e,t,r){t.createEncodeStream=a;var n=r(9023),o=r(2203).Transform,i=r(3357).D;n.inherits(a,o);var s={objectMode:!0};function a(e){if(!(this instanceof a))return new a(e);e?e.objectMode=!0:e=s,o.call(this,e);var t=this;(this.encoder=new i(e)).push=function(e){t.push(e)}}a.prototype._transform=function(e,t,r){this.encoder.write(e),r&&r()},a.prototype._flush=function(e){this.encoder.flush(),e&&e()}},7870(e,t,r){t.encode=function(e,t){var r=new n(t);return r.write(e),r.read()};var n=r(3357).D},7158(e,t,r){t.Encoder=i;var n=r(1611),o=r(3357).D;function i(e){if(!(this instanceof i))return new i(e);o.call(this,e)}i.prototype=new o,n.mixin(i.prototype),i.prototype.encode=function(e){this.write(e),this.emit("data",this.read())},i.prototype.end=function(e){arguments.length&&this.encode(e),this.flush(),this.emit("end")}},816(e,t,r){t.u=function e(t,r){if(!(this instanceof e))return new e(t,r);this.buffer=n.from(t),this.type=r};var n=r(8204)},8236(e,t,r){t.setExtPackers=function(e){e.addExtPacker(14,Error,[d,c]),e.addExtPacker(1,EvalError,[d,c]),e.addExtPacker(2,RangeError,[d,c]),e.addExtPacker(3,ReferenceError,[d,c]),e.addExtPacker(4,SyntaxError,[d,c]),e.addExtPacker(5,TypeError,[d,c]),e.addExtPacker(6,URIError,[d,c]),e.addExtPacker(10,RegExp,[u,c]),e.addExtPacker(11,Boolean,[l,c]),e.addExtPacker(12,String,[l,c]),e.addExtPacker(13,Date,[Number,c]),e.addExtPacker(15,Number,[l,c]),"undefined"!=typeof Uint8Array&&(e.addExtPacker(17,Int8Array,s),e.addExtPacker(18,Uint8Array,s),e.addExtPacker(19,Int16Array,s),e.addExtPacker(20,Uint16Array,s),e.addExtPacker(21,Int32Array,s),e.addExtPacker(22,Uint32Array,s),e.addExtPacker(23,Float32Array,s),"undefined"!=typeof Float64Array&&e.addExtPacker(24,Float64Array,s),"undefined"!=typeof Uint8ClampedArray&&e.addExtPacker(25,Uint8ClampedArray,s),e.addExtPacker(26,ArrayBuffer,s),e.addExtPacker(29,DataView,s)),o.hasBuffer&&e.addExtPacker(27,i,o.from)};var n,o=r(8204),i=o.global,s=o.Uint8Array.from,a={name:1,message:1,stack:1,columnNumber:1,fileName:1,lineNumber:1};function c(e){return n||(n=r(7870).encode),n(e)}function l(e){return e.valueOf()}function u(e){(e=RegExp.prototype.toString.call(e).split("/")).shift();var t=[e.pop()];return t.unshift(e.join("/")),t}function d(e){var t={};for(var r in a)t[r]=e[r];return t}},5623(e,t,r){t.setExtUnpackers=function(e){e.addExtUnpacker(14,[a,l(Error)]),e.addExtUnpacker(1,[a,l(EvalError)]),e.addExtUnpacker(2,[a,l(RangeError)]),e.addExtUnpacker(3,[a,l(ReferenceError)]),e.addExtUnpacker(4,[a,l(SyntaxError)]),e.addExtUnpacker(5,[a,l(TypeError)]),e.addExtUnpacker(6,[a,l(URIError)]),e.addExtUnpacker(10,[a,c]),e.addExtUnpacker(11,[a,u(Boolean)]),e.addExtUnpacker(12,[a,u(String)]),e.addExtUnpacker(13,[a,u(Date)]),e.addExtUnpacker(15,[a,u(Number)]),"undefined"!=typeof Uint8Array&&(e.addExtUnpacker(17,u(Int8Array)),e.addExtUnpacker(18,u(Uint8Array)),e.addExtUnpacker(19,[d,u(Int16Array)]),e.addExtUnpacker(20,[d,u(Uint16Array)]),e.addExtUnpacker(21,[d,u(Int32Array)]),e.addExtUnpacker(22,[d,u(Uint32Array)]),e.addExtUnpacker(23,[d,u(Float32Array)]),"undefined"!=typeof Float64Array&&e.addExtUnpacker(24,[d,u(Float64Array)]),"undefined"!=typeof Uint8ClampedArray&&e.addExtUnpacker(25,u(Uint8ClampedArray)),e.addExtUnpacker(26,d),e.addExtUnpacker(29,[d,u(DataView)])),o.hasBuffer&&e.addExtUnpacker(27,u(i))};var n,o=r(8204),i=o.global,s={name:1,message:1,stack:1,columnNumber:1,fileName:1,lineNumber:1};function a(e){return n||(n=r(7402).decode),n(e)}function c(e){return RegExp.apply(null,e)}function l(e){return function(t){var r=new e;for(var n in s)r[n]=t[n];return r}}function u(e){return function(t){return new e(t)}}function d(e){return new Uint8Array(e).buffer}},1325(e,t,r){r(3294),r(897),t.createCodec=r(8704).createCodec},3614(e,t,r){t.I=i,t.w=s;var n=r(8204),o="BUFFER_SHORTAGE";function i(){if(!(this instanceof i))return new i}function s(){if(!(this instanceof s))return new s}function a(){return this.buffers&&this.buffers.length?(this.flush(),this.pull()):this.fetch()}function c(e){(this.buffers||(this.buffers=[])).push(e)}function l(e){return function(t){for(var r in e)t[r]=e[r];return t}}i.mixin=l({bufferish:n,write:function(e){var t=this.offset?n.prototype.slice.call(this.buffer,this.offset):this.buffer;this.buffer=t?e?this.bufferish.concat([t,e]):t:e,this.offset=0},fetch:function(){throw new Error("method not implemented: fetch()")},flush:function(){for(;this.offset<this.buffer.length;){var e,t=this.offset;try{e=this.fetch()}catch(e){if(e&&e.message!=o)throw e;this.offset=t;break}this.push(e)}},push:c,pull:function(){return(this.buffers||(this.buffers=[])).shift()},read:a,reserve:function(e){var t=this.offset,r=t+e;if(r>this.buffer.length)throw new Error(o);return this.offset=r,t},offset:0}),i.mixin(i.prototype),s.mixin=l({bufferish:n,write:function(){throw new Error("method not implemented: write()")},fetch:function(){var e=this.start;if(e<this.offset){var t=this.start=this.offset;return n.prototype.slice.call(this.buffer,e,t)}},flush:function(){for(;this.start<this.offset;){var e=this.fetch();e&&this.push(e)}},push:c,pull:function(){var e=this.buffers||(this.buffers=[]),t=e.length>1?this.bufferish.concat(e):e[0];return e.length=0,t},read:a,reserve:function(e){var t=0|e;if(this.buffer){var r=this.buffer.length,n=0|this.offset,o=n+t;if(o<r)return this.offset=o,n;this.flush(),e=Math.max(e,Math.min(2*r,this.maxBufferSize))}return e=Math.max(e,this.minBufferSize),this.buffer=this.bufferish.alloc(e),this.start=0,this.offset=t,0},send:function(e){var t=e.length;if(t>this.minBufferSize)this.flush(),this.push(e);else{var r=this.reserve(t);n.prototype.copy.call(e,this.buffer,r)}},maxBufferSize:65536,minBufferSize:2048,offset:0,start:0}),s.mixin(s.prototype)},3294(e,t,r){var n=r(816).u,o=r(5623),i=r(7970).readUint8,s=r(2004),a=r(8704);function c(){var e=this.options;return this.decode=function(e){var t=s.getReadToken(e);return function(e){var r=i(e),n=t[r];if(!n)throw new Error("Invalid type: "+(r?"0x"+r.toString(16):r));return n(e)}}(e),e&&e.preset&&o.setExtUnpackers(this),this}a.install({addExtUnpacker:function(e,t){(this.extUnpackers||(this.extUnpackers=[]))[e]=a.filter(t)},getExtUnpacker:function(e){return(this.extUnpackers||(this.extUnpackers=[]))[e]||function(t){return new n(t,e)}},init:c}),t.preset=c.call(a.preset)},7970(e,t,r){var n=r(251),o=r(8305),i=o.Uint64BE,s=o.Int64BE;t.getReadFormat=function(e){var t=a.hasArrayBuffer&&e&&e.binarraybuffer,r=e&&e.int64;return{map:l&&e&&e.usemap?d:u,array:p,str:h,bin:t?g:f,ext:m,uint8:v,uint16:S,uint32:E,uint64:b(8,r?C:P),int8:y,int16:w,int32:_,int64:b(8,r?I:T),float32:b(4,O),float64:b(8,N)}},t.readUint8=v;var a=r(8204),c=r(3043),l="undefined"!=typeof Map;function u(e,t){var r,n={},o=new Array(t),i=new Array(t),s=e.codec.decode;for(r=0;r<t;r++)o[r]=s(e),i[r]=s(e);for(r=0;r<t;r++)n[o[r]]=i[r];return n}function d(e,t){var r,n=new Map,o=new Array(t),i=new Array(t),s=e.codec.decode;for(r=0;r<t;r++)o[r]=s(e),i[r]=s(e);for(r=0;r<t;r++)n.set(o[r],i[r]);return n}function p(e,t){for(var r=new Array(t),n=e.codec.decode,o=0;o<t;o++)r[o]=n(e);return r}function h(e,t){var r=e.reserve(t),n=r+t;return c.toString.call(e.buffer,"utf-8",r,n)}function f(e,t){var r=e.reserve(t),n=r+t,o=c.slice.call(e.buffer,r,n);return a.from(o)}function g(e,t){var r=e.reserve(t),n=r+t,o=c.slice.call(e.buffer,r,n);return a.Uint8Array.from(o).buffer}function m(e,t){var r=e.reserve(t+1),n=e.buffer[r++],o=r+t,i=e.codec.getExtUnpacker(n);if(!i)throw new Error("Invalid ext type: "+(n?"0x"+n.toString(16):n));return i(c.slice.call(e.buffer,r,o))}function v(e){var t=e.reserve(1);return e.buffer[t]}function y(e){var t=e.reserve(1),r=e.buffer[t];return 128&r?r-256:r}function S(e){var t=e.reserve(2),r=e.buffer;return r[t++]<<8|r[t]}function w(e){var t=e.reserve(2),r=e.buffer,n=r[t++]<<8|r[t];return 32768&n?n-65536:n}function E(e){var t=e.reserve(4),r=e.buffer;return 16777216*r[t++]+(r[t++]<<16)+(r[t++]<<8)+r[t]}function _(e){var t=e.reserve(4),r=e.buffer;return r[t++]<<24|r[t++]<<16|r[t++]<<8|r[t]}function b(e,t){return function(r){var n=r.reserve(e);return t.call(r.buffer,n,!0)}}function P(e){return new i(this,e).toNumber()}function T(e){return new s(this,e).toNumber()}function C(e){return new i(this,e)}function I(e){return new s(this,e)}function O(e){return n.read(this,e,!1,23,4)}function N(e){return n.read(this,e,!1,52,8)}},2004(e,t,r){var n=r(7970);function o(e){var t,r=new Array(256);for(t=0;t<=127;t++)r[t]=i(t);for(t=128;t<=143;t++)r[t]=a(t-128,e.map);for(t=144;t<=159;t++)r[t]=a(t-144,e.array);for(t=160;t<=191;t++)r[t]=a(t-160,e.str);for(r[192]=i(null),r[193]=null,r[194]=i(!1),r[195]=i(!0),r[196]=s(e.uint8,e.bin),r[197]=s(e.uint16,e.bin),r[198]=s(e.uint32,e.bin),r[199]=s(e.uint8,e.ext),r[200]=s(e.uint16,e.ext),r[201]=s(e.uint32,e.ext),r[202]=e.float32,r[203]=e.float64,r[204]=e.uint8,r[205]=e.uint16,r[206]=e.uint32,r[207]=e.uint64,r[208]=e.int8,r[209]=e.int16,r[210]=e.int32,r[211]=e.int64,r[212]=a(1,e.ext),r[213]=a(2,e.ext),r[214]=a(4,e.ext),r[215]=a(8,e.ext),r[216]=a(16,e.ext),r[217]=s(e.uint8,e.str),r[218]=s(e.uint16,e.str),r[219]=s(e.uint32,e.str),r[220]=s(e.uint16,e.array),r[221]=s(e.uint32,e.array),r[222]=s(e.uint16,e.map),r[223]=s(e.uint32,e.map),t=224;t<=255;t++)r[t]=i(t-256);return r}function i(e){return function(){return e}}function s(e,t){return function(r){var n=e(r);return t(r,n)}}function a(e,t){return function(r){return t(r,e)}}t.getReadToken=function(e){var t=n.getReadFormat(e);return e&&e.useraw?function(e){var t,r=o(e).slice();for(r[217]=r[196],r[218]=r[197],r[219]=r[198],t=160;t<=191;t++)r[t]=a(t-160,e.bin);return r}(t):o(t)}},897(e,t,r){var n=r(816).u,o=r(8236),i=r(3398),s=r(8704);function a(){var e=this.options;return this.encode=function(e){var t=i.getWriteType(e);return function(e,r){var n=t[typeof r];if(!n)throw new Error('Unsupported type "'+typeof r+'": '+r);n(e,r)}}(e),e&&e.preset&&o.setExtPackers(this),this}s.install({addExtPacker:function(e,t,r){r=s.filter(r);var o=t.name;function i(t){return r&&(t=r(t)),new n(t,e)}o&&"Object"!==o?(this.extPackers||(this.extPackers={}))[o]=i:(this.extEncoderList||(this.extEncoderList=[])).unshift([t,i])},getExtPacker:function(e){var t=this.extPackers||(this.extPackers={}),r=e.constructor,n=r&&r.name&&t[r.name];if(n)return n;for(var o=this.extEncoderList||(this.extEncoderList=[]),i=o.length,s=0;s<i;s++){var a=o[s];if(r===a[0])return a[1]}},init:a}),t.preset=a.call(s.preset)},1685(e,t,r){var n=r(251),o=r(8305),i=o.Uint64BE,s=o.Int64BE,a=r(4040).h,c=r(8204),l=c.global,u=c.hasBuffer&&"TYPED_ARRAY_SUPPORT"in l&&!l.TYPED_ARRAY_SUPPORT,d=c.hasBuffer&&l.prototype||{};function p(){var e=a.slice();return e[196]=h(196),e[197]=f(197),e[198]=g(198),e[199]=h(199),e[200]=f(200),e[201]=g(201),e[202]=m(202,4,d.writeFloatBE||S,!0),e[203]=m(203,8,d.writeDoubleBE||w,!0),e[204]=h(204),e[205]=f(205),e[206]=g(206),e[207]=m(207,8,v),e[208]=h(208),e[209]=f(209),e[210]=g(210),e[211]=m(211,8,y),e[217]=h(217),e[218]=f(218),e[219]=g(219),e[220]=f(220),e[221]=g(221),e[222]=f(222),e[223]=g(223),e}function h(e){return function(t,r){var n=t.reserve(2),o=t.buffer;o[n++]=e,o[n]=r}}function f(e){return function(t,r){var n=t.reserve(3),o=t.buffer;o[n++]=e,o[n++]=r>>>8,o[n]=r}}function g(e){return function(t,r){var n=t.reserve(5),o=t.buffer;o[n++]=e,o[n++]=r>>>24,o[n++]=r>>>16,o[n++]=r>>>8,o[n]=r}}function m(e,t,r,n){return function(o,i){var s=o.reserve(t+1);o.buffer[s++]=e,r.call(o.buffer,i,s,n)}}function v(e,t){new i(this,t,e)}function y(e,t){new s(this,t,e)}function S(e,t){n.write(this,e,t,!1,23,4)}function w(e,t){n.write(this,e,t,!1,52,8)}t.getWriteToken=function(e){return e&&e.uint8array?((t=p())[202]=m(202,4,S),t[203]=m(203,8,w),t):u||c.hasBuffer&&e&&e.safe?function(){var e=a.slice();return e[196]=m(196,1,l.prototype.writeUInt8),e[197]=m(197,2,l.prototype.writeUInt16BE),e[198]=m(198,4,l.prototype.writeUInt32BE),e[199]=m(199,1,l.prototype.writeUInt8),e[200]=m(200,2,l.prototype.writeUInt16BE),e[201]=m(201,4,l.prototype.writeUInt32BE),e[202]=m(202,4,l.prototype.writeFloatBE),e[203]=m(203,8,l.prototype.writeDoubleBE),e[204]=m(204,1,l.prototype.writeUInt8),e[205]=m(205,2,l.prototype.writeUInt16BE),e[206]=m(206,4,l.prototype.writeUInt32BE),e[207]=m(207,8,v),e[208]=m(208,1,l.prototype.writeInt8),e[209]=m(209,2,l.prototype.writeInt16BE),e[210]=m(210,4,l.prototype.writeInt32BE),e[211]=m(211,8,y),e[217]=m(217,1,l.prototype.writeUInt8),e[218]=m(218,2,l.prototype.writeUInt16BE),e[219]=m(219,4,l.prototype.writeUInt32BE),e[220]=m(220,2,l.prototype.writeUInt16BE),e[221]=m(221,4,l.prototype.writeUInt32BE),e[222]=m(222,2,l.prototype.writeUInt16BE),e[223]=m(223,4,l.prototype.writeUInt32BE),e}():p();var t}},3398(e,t,r){var n=r(4634),o=r(8305),i=o.Uint64BE,s=o.Int64BE,a=r(8204),c=r(3043),l=r(1685),u=r(4040).h,d=r(816).u,p="undefined"!=typeof Uint8Array,h="undefined"!=typeof Map,f=[];f[1]=212,f[2]=213,f[4]=214,f[8]=215,f[16]=216,t.getWriteType=function(e){var t,r=l.getWriteToken(e),o=e&&e.useraw,g=p&&e&&e.binarraybuffer,m=g?a.isArrayBuffer:a.isBuffer,v=g?function(e,t){E(e,new Uint8Array(t))}:E,y=h&&e&&e.usemap?function(e,t){if(!(t instanceof Map))return _(e,t);var n=t.size;r[n<16?128+n:n<=65535?222:223](e,n);var o=e.codec.encode;t.forEach(function(t,r,n){o(e,r),o(e,t)})}:_;return{boolean:function(e,t){r[t?195:194](e,t)},function:w,number:function(e,t){var n=0|t;t===n?r[-32<=n&&n<=127?255&n:0<=n?n<=255?204:n<=65535?205:206:-128<=n?208:-32768<=n?209:210](e,n):r[203](e,t)},object:o?function(e,t){if(m(t))return function(e,t){var n=t.length;r[n<32?160+n:n<=65535?218:219](e,n),e.send(t)}(e,t);S(e,t)}:S,string:(t=o?function(e){return e<32?1:e<=65535?3:5}:function(e){return e<32?1:e<=255?2:e<=65535?3:5},function(e,n){var o=n.length,i=5+3*o;e.offset=e.reserve(i);var s=e.buffer,a=t(o),l=e.offset+a;o=c.write.call(s,n,l);var u=t(o);if(a!==u){var d=l+u-a,p=l+o;c.copy.call(s,s,d,l,p)}r[1===u?160+o:u<=3?215+u:219](e,o),e.offset+=o}),symbol:w,undefined:w};function S(e,t){if(null===t)return w(e,t);if(m(t))return v(e,t);if(n(t))return function(e,t){var n=t.length;r[n<16?144+n:n<=65535?220:221](e,n);for(var o=e.codec.encode,i=0;i<n;i++)o(e,t[i])}(e,t);if(i.isUint64BE(t))return function(e,t){r[207](e,t.toArray())}(e,t);if(s.isInt64BE(t))return function(e,t){r[211](e,t.toArray())}(e,t);var o=e.codec.getExtPacker(t);if(o&&(t=o(t)),t instanceof d)return function(e,t){var n=t.buffer,o=n.length,i=f[o]||(o<255?199:o<=65535?200:201);r[i](e,o),u[t.type](e),e.send(n)}(e,t);y(e,t)}function w(e,t){r[192](e,t)}function E(e,t){var n=t.length;r[n<255?196:n<=65535?197:198](e,n),e.send(t)}function _(e,t){var n=Object.keys(t),o=n.length;r[o<16?128+o:o<=65535?222:223](e,o);var i=e.codec.encode;n.forEach(function(r){i(e,r),i(e,t[r])})}}},4040(e,t){for(var r=t.h=new Array(256),n=0;n<=255;n++)r[n]=o(n);function o(e){return function(t){var r=t.reserve(1);t.buffer[r]=e}}},4409(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChannelClass=t.Channel=void 0;const n=r(4820),o=r(2203),i=r(9990),s=r(3007),a=r(2762),c=r(6164),l=r(7900),u=r(4901);class d{get id(){return this.qualifiedId.id}constructor(e){this._isDisposed=!1,this.qualifiedId=e}get isDisposed(){return this._isDisposed}dispose(e){this._isDisposed=!0}}t.Channel=d,t.ChannelClass=class extends d{constructor(e,t,r){super(t),this._acceptance=new s.Deferred,this._completion=new s.Deferred,this.remoteWindowFilled=0;const n=this;switch(this.name=r.name,t.source){case l.ChannelSource.Local:this.localWindowSize=r.remoteWindowSize;break;case l.ChannelSource.Remote:this.remoteWindowSize=r.remoteWindowSize;break;case l.ChannelSource.Seeded:this.remoteWindowSize=r.remoteWindowSize,this.localWindowSize=r.remoteWindowSize;break;default:throw new Error("Channel source not recognized.")}this._multiplexingStream=e,this.remoteWindowHasCapacity=new s.Deferred,this._multiplexingStream.backpressureSupportEnabled&&!this.remoteWindowSize||this.remoteWindowHasCapacity.resolve(),this._duplex=new o.Duplex({async write(r,o,s){let l;try{let o=Buffer.from(r);for(;o.length>0;){let r=Math.min(o.length,c.MultiplexingStream.framePayloadMaxLength);if(n._multiplexingStream.backpressureSupportEnabled){if(await n.remoteWindowHasCapacity.promise,!n.remoteWindowSize)throw new Error("Remote window size unknown.");r=Math.min(n.remoteWindowSize-n.remoteWindowFilled,r)}n.onTransmittingBytes(r);const s=new a.FrameHeader(i.ControlCode.content,t);await e.sendFrameAsync(s,o.slice(0,r)),o=o.slice(r)}}catch(e){l=e}s&&s(l)},async final(t){let r;try{await e.onChannelWritingCompleted(n)}catch(e){r=e}t&&t(r)},read(){}})}get stream(){return this._duplex}get acceptance(){return this._acceptance.promise}get isAccepted(){return this._acceptance.isResolved}get isRejectedOrCanceled(){return this._acceptance.isRejected}get completion(){return this._completion.promise}tryAcceptOffer(e){return!!this._acceptance.resolve()&&(this.localWindowSize=void 0!==(null==e?void 0:e.channelReceivingWindowSize)?Math.max(this._multiplexingStream.defaultChannelReceivingWindowSize,null==e?void 0:e.channelReceivingWindowSize):this._multiplexingStream.defaultChannelReceivingWindowSize,!0)}tryCancelOffer(e){const t=new n.default.CancellationError(e);this._acceptance.reject(t),this._completion.reject(t),u(this._completion.promise),this.dispose()}onAccepted(e){return this._multiplexingStream.backpressureSupportEnabled&&(this.remoteWindowSize=e.remoteWindowSize,this.remoteWindowHasCapacity.resolve()),this._acceptance.resolve()}onContent(e){const t=this._duplex.readableFlowing;this._duplex.push(e),t&&!1===this._duplex.readableFlowing&&this._duplex.resume(),this._multiplexingStream.backpressureSupportEnabled&&e&&this._multiplexingStream.localContentExamined(this,e.length)}onContentProcessed(e){if(e<0)throw new Error("A non-negative number is required.");if(e>this.remoteWindowFilled)throw new Error("More bytes processed than we thought were in the window.");if(void 0===this.remoteWindowSize)throw new Error("Unexpected content processed message given we don't know the remote window size.");this.remoteWindowFilled-=e,this.remoteWindowFilled<this.remoteWindowSize&&this.remoteWindowHasCapacity.resolve()}dispose(e){this.isDisposed||(super.dispose(),this._acceptance.reject(new n.default.CancellationError("disposed"))&&u(this.acceptance),this._duplex.end(),this._duplex.push(null),e?this._completion.reject(e):this._completion.resolve(),u(this._multiplexingStream.onChannelDisposed(this,null!=e?e:null)))}onTransmittingBytes(e){if(this._multiplexingStream.backpressureSupportEnabled){if(e<0)throw new Error("Negative byte count transmitted.");this.remoteWindowFilled+=e,this.remoteWindowFilled===this.remoteWindowSize&&(this.remoteWindowHasCapacity=new s.Deferred)}}}},9990(e,t){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.ControlCode=void 0,function(e){e[e.offer=0]="offer",e[e.offerAccepted=1]="offerAccepted",e[e.content=2]="content",e[e.contentWritingCompleted=3]="contentWritingCompleted",e[e.channelTerminated=4]="channelTerminated",e[e.contentProcessed=5]="contentProcessed"}(r||(t.ControlCode=r={}))},3007(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Deferred=void 0,t.Deferred=class{constructor(e){this.state=e,this._isResolved=!1,this._isRejected=!1,this.promise=new Promise((e,t)=>{this.resolvePromise=e,this.rejectPromise=t})}get isCompleted(){return this._isResolved||this._isRejected}get isResolved(){return this._isResolved}get isRejected(){return this._isRejected}get error(){return this._error}resolve(e){return!this.isCompleted&&(this.resolvePromise(e),this._isResolved=!0,!0)}reject(e){return!this.isCompleted&&(this.rejectPromise(e),this._error=e,this._isRejected=!0,!0)}}},2762(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FrameHeader=void 0;const n=r(5426);t.FrameHeader=class{constructor(e,t){this.code=e,t&&(0,n.requireInteger)("channelId",t.id,4,"signed"),this.code=e,this._channel=t}get channel(){return this._channel}get requiredChannel(){if(this.channel)return this.channel;throw new Error("Expected channel not present in frame header.")}flipChannelPerspective(){this._channel&&(this._channel={id:this._channel.id,source:-1*this._channel.source})}}},443(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FullDuplexStream=void 0;const n=r(2203);class o{static CreatePair(){const e=new n.PassThrough,t=new n.PassThrough;return{first:o.Splice(e,t),second:o.Splice(t,e)}}static Splice(e,t){const r=new n.Duplex({write(e,r,n){t.write(e,r,n)},final(e){t.end(e)}});return r.read=e.read.bind(e),r.on=e.on.bind(e),r}}t.FullDuplexStream=o},6164(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MultiplexingStreamClass=t.MultiplexingStream=void 0;const n=r(4622),o=r(4820),i=r(4434),s=r(4409),a=r(9990),c=r(3007),l=r(2762),u=r(839);r(8192);const d=r(7900),p=r(5426),h=r(4901);class f{get disposalToken(){return this.disposalTokenSource.token}get completion(){return this._completionSource.promise}get isDisposed(){return this.disposalTokenSource.token.isCancelled}static async CreateAsync(e,t,r=o.default.CONTINUE){var n;if(!e)throw new Error("stream must be specified.");if(null!==(n=(t=t||{}).protocolMajorVersion)&&void 0!==n||(t.protocolMajorVersion=1),t.defaultChannelReceivingWindowSize=t.defaultChannelReceivingWindowSize||f.recommendedDefaultChannelReceivingWindowSize,t.protocolMajorVersion<3&&t.seededChannels&&t.seededChannels.length>0)throw new Error("Seeded channels require v3 of the protocol at least.");const i=1===t.protocolMajorVersion?new u.MultiplexingStreamV1Formatter(e):2===t.protocolMajorVersion?new u.MultiplexingStreamV2Formatter(e):3===t.protocolMajorVersion?new u.MultiplexingStreamV3Formatter(e):void 0;if(!i)throw new Error(`Protocol major version ${t.protocolMajorVersion} is not supported.`);const s=await i.writeHandshakeAsync(),a=await i.readHandshakeAsync(s,r);return i.isOdd=a.isOdd,new g(i,a.isOdd,t)}static Create(e,t){var r;null!=t||(t={protocolMajorVersion:3}),null!==(r=t.protocolMajorVersion)&&void 0!==r||(t.protocolMajorVersion=3);const n=3===t.protocolMajorVersion?new u.MultiplexingStreamV3Formatter(e):void 0;if(!n)throw new Error(`Protocol major version ${t.protocolMajorVersion} is not supported. Try CreateAsync instead.`);return new g(n,void 0,t)}constructor(e,t,r){var n,a,l;if(this.formatter=e,this.isOdd=t,this._completionSource=new c.Deferred,this.seededOpenChannels={},this.locallyOfferedOpenChannels={},this.remotelyOfferedOpenChannels={},this.channelsOfferedByThemByName={},this.acceptingChannels={},this.eventEmitter=new i.EventEmitter,this.disposalTokenSource=o.default.create(),this.defaultChannelReceivingWindowSize=null!==(n=r.defaultChannelReceivingWindowSize)&&void 0!==n?n:f.recommendedDefaultChannelReceivingWindowSize,this.protocolMajorVersion=null!==(a=r.protocolMajorVersion)&&void 0!==a?a:1,r.seededChannels)for(let e=0;e<r.seededChannels.length;e++){const t=r.seededChannels[e],n={id:e,source:d.ChannelSource.Seeded};this.setOpenChannel(new s.ChannelClass(this,n,{name:"",remoteWindowSize:null!==(l=t.channelReceivingWindowSize)&&void 0!==l?l:this.defaultChannelReceivingWindowSize}))}}createChannel(e){var t;const r={name:"",remoteWindowSize:null!==(t=null==e?void 0:e.channelReceivingWindowSize)&&void 0!==t?t:this.defaultChannelReceivingWindowSize},n=this.formatter.serializeOfferParameters(r),o=new s.ChannelClass(this,{id:this.getUnusedChannelId(),source:d.ChannelSource.Local},r);return this.setOpenChannel(o),this.rejectOnFailure(this.sendFrameAsync(new l.FrameHeader(a.ControlCode.offer,o.qualifiedId),n,this.disposalToken)),o}acceptChannel(e,t){const r=this.remotelyOfferedOpenChannels[e]||this.seededOpenChannels[e];if(!r)throw new Error("No channel with ID "+e);return this.removeChannelFromOfferedQueue(r),this.acceptChannelOrThrow(r,t),r}rejectChannel(e){const t=this.remotelyOfferedOpenChannels[e];if(!t)throw new Error("No channel with that ID found.");(0,p.removeFromQueue)(t,this.channelsOfferedByThemByName[t.name]),h(t.acceptance),h(t.completion),t.dispose()}async offerChannelAsync(e,t,r=o.default.CONTINUE){var n;if(null==e)throw new Error("Name must be specified (but may be empty).");r.throwIfCancelled(),(0,p.throwIfDisposed)(this);const i={name:e,remoteWindowSize:null!==(n=null==t?void 0:t.channelReceivingWindowSize)&&void 0!==n?n:this.defaultChannelReceivingWindowSize},c=this.formatter.serializeOfferParameters(i),u=new s.ChannelClass(this,{id:this.getUnusedChannelId(),source:d.ChannelSource.Local},i);this.setOpenChannel(u);const f=new l.FrameHeader(a.ControlCode.offer,u.qualifiedId),g=r.onCancelled(e=>this.offerChannelCanceled(u,e));try{return h(u.acceptance),await this.sendFrameAsync(f,c,r),await u.acceptance,u}finally{g()}}async acceptChannelAsync(e,t,r=o.default.CONTINUE){if(null==e)throw new Error("Name must be specified (but may be empty).");let n,i;r.throwIfCancelled(),(0,p.throwIfDisposed)(this);const s=this.channelsOfferedByThemByName[e];if(s)for(;void 0===n&&s.length>0;)n=s.shift(),(n.isAccepted||n.isRejectedOrCanceled)&&(n=void 0);if(void 0===n){let r=this.acceptingChannels[e];r||(this.acceptingChannels[e]=r=[]),i=new c.Deferred(t),r.push(i)}if(void 0!==n)return this.acceptChannelOrThrow(n,t),n;{const t=r.onCancelled(t=>this.acceptChannelCanceled(i,e,t));try{return await i.promise}finally{t()}}}dispose(){this.disposeCore(!1)}disposeCore(e){this.disposalTokenSource.cancel(),this._completionSource.resolve(),this.formatter.end(),[this.locallyOfferedOpenChannels,this.remotelyOfferedOpenChannels].forEach(e=>{for(const t in e)if(e.hasOwnProperty(t)){const r=e[t];h(r.acceptance),r.dispose()}});const t=e?"The remote party has disconnected.":"The stream is being disposed locally.";for(const e in this.acceptingChannels)if(this.acceptingChannels.hasOwnProperty(e)){const r=this.acceptingChannels[e];for(const e of r)e.reject(new Error(t));delete this.acceptingChannels[e]}}on(e,t){this.eventEmitter.on(e,t)}off(e,t){this.eventEmitter.off(e,t)}once(e,t){this.eventEmitter.once(e,t)}raiseChannelOffered(e,t,r){const n={id:e,isAccepted:r,name:t};try{this.eventEmitter.emit("channelOffered",n)}catch(e){this._completionSource.reject(e)}}acceptChannelOrThrow(e,t){var r,n;if(!e.tryAcceptOffer(t))throw e.isAccepted?new Error("Channel is already accepted."):e.isRejectedOrCanceled?new Error("Channel is no longer available for acceptance."):new Error("Channel could not be accepted.");{const o={remoteWindowSize:null!==(n=null!==(r=null==t?void 0:t.channelReceivingWindowSize)&&void 0!==r?r:e.localWindowSize)&&void 0!==n?n:this.defaultChannelReceivingWindowSize};if(o.remoteWindowSize<this.defaultChannelReceivingWindowSize&&(o.remoteWindowSize=this.defaultChannelReceivingWindowSize),e.qualifiedId.source!==d.ChannelSource.Seeded){const t=this.formatter.serializeAcceptanceParameters(o);this.rejectOnFailure(this.sendFrameAsync(new l.FrameHeader(a.ControlCode.offerAccepted,e.qualifiedId),t,this.disposalToken))}}}async rejectOnFailure(e){try{await e}catch(e){this._completionSource.reject(e)}}removeChannelFromOfferedQueue(e){e.name&&(0,p.removeFromQueue)(e,this.channelsOfferedByThemByName[e.name])}getOpenChannel(e){return this.getChannelCollection(e.source)[e.id]}setOpenChannel(e){this.getChannelCollection(e.qualifiedId.source)[e.qualifiedId.id]=e}deleteOpenChannel(e){delete this.getChannelCollection(e.source)[e.id]}getChannelCollection(e){switch(e){case d.ChannelSource.Local:return this.locallyOfferedOpenChannels;case d.ChannelSource.Remote:return this.remotelyOfferedOpenChannels;case d.ChannelSource.Seeded:return this.seededOpenChannels}}acceptChannelCanceled(e,t,r){e.reject(new o.default.CancellationError(r))&&(0,p.removeFromQueue)(e,this.acceptingChannels[t])}offerChannelCanceled(e,t){e.tryCancelOffer(t)}getUnusedChannelId(){return this.lastOfferedChannelId+=void 0!==this.isOdd?2:1}}t.MultiplexingStream=f,f.framePayloadMaxLength=20480,f.recommendedDefaultChannelReceivingWindowSize=5*f.framePayloadMaxLength,f.defaultChannelOptions={},f.ControlFrameEncoding="utf-8";class g extends f{constructor(e,t,r){var o,i;super(e,t,r),this.sendingSemaphore=new n.Semaphore(1),this.lastOfferedChannelId=t?-1:0,this.lastOfferedChannelId+=null!==(i=null===(o=r.seededChannels)||void 0===o?void 0:o.length)&&void 0!==i?i:0,this.readFromStream(this.disposalToken).catch(e=>this._completionSource.reject(e))}get backpressureSupportEnabled(){return this.protocolMajorVersion>1}async sendFrameAsync(e,t,r=o.default.CONTINUE){if(!e)throw new Error("Header is required.");await this.sendingSemaphore.use(async()=>{r.throwIfCancelled(),(0,p.throwIfDisposed)(this),await this.formatter.writeFrameAsync(e,t)})}async sendFrame(e,t){try{if(this._completionSource.isCompleted)return;const r=new l.FrameHeader(e,t);await this.sendFrameAsync(r)}catch(e){this._completionSource.reject(e)}}onChannelWritingCompleted(e){!e.isDisposed&&this.getOpenChannel(e.qualifiedId)&&this.sendFrame(a.ControlCode.contentWritingCompleted,e.qualifiedId)}async onChannelDisposed(e,t){if(!this._completionSource.isCompleted)try{const r=this.protocolMajorVersion>1&&t?this.formatter.serializeException(t):Buffer.alloc(0),n=new l.FrameHeader(a.ControlCode.channelTerminated,e.qualifiedId);await this.sendFrameAsync(n,r)}catch(e){if(this.isDisposed)return;throw e}}localContentExamined(e,t){const r=this.formatter.serializeContentProcessed(t);this.rejectOnFailure(this.sendFrameAsync(new l.FrameHeader(a.ControlCode.contentProcessed,e.qualifiedId),r))}async readFromStream(e){for(;!this.isDisposed;){const t=await this.formatter.readFrameAsync(e);if(null===t)break;switch(t.header.flipChannelPerspective(),t.header.code){case a.ControlCode.offer:this.onOffer(t.header.requiredChannel,t.payload);break;case a.ControlCode.offerAccepted:this.onOfferAccepted(t.header.requiredChannel,t.payload);break;case a.ControlCode.content:this.onContent(t.header.requiredChannel,t.payload);break;case a.ControlCode.contentProcessed:this.onContentProcessed(t.header.requiredChannel,t.payload);break;case a.ControlCode.contentWritingCompleted:this.onContentWritingCompleted(t.header.requiredChannel);break;case a.ControlCode.channelTerminated:this.onChannelTerminated(t.header.requiredChannel,t.payload)}}this.disposeCore(!0)}onOffer(e,t){const r=this.formatter.deserializeOfferParameters(t),n=new s.ChannelClass(this,e,r);let o,i,a=!1;if(void 0!==(i=this.acceptingChannels[r.name]))for(;i.length>0;){const e=i.shift();if(e.resolve(n)){a=!0,o=e.state;break}}if(!a){let e;(e=this.channelsOfferedByThemByName[r.name])||(this.channelsOfferedByThemByName[r.name]=e=[]),e.push(n)}this.setOpenChannel(n),a&&this.acceptChannelOrThrow(n,o),this.raiseChannelOffered(n.id,n.name,a)}onOfferAccepted(e,t){if(e.source!==d.ChannelSource.Local)throw new Error("Remote party tried to accept a channel that they offered.");const r=this.formatter.deserializeAcceptanceParameters(t),n=this.getOpenChannel(e);if(!n)throw new Error(`Unexpected channel created with ID ${d.QualifiedChannelId.toString(e)}`);n.onAccepted(r)}onContent(e,t){const r=this.getOpenChannel(e);if(!r)throw new Error(`No channel with id ${e} found.`);r.onContent(t)}onContentProcessed(e,t){const r=this.getOpenChannel(e);if(!r)throw new Error(`No channel with id ${e} found.`);const n=this.formatter.deserializeContentProcessed(t);r.onContentProcessed(n)}onContentWritingCompleted(e){const t=this.getOpenChannel(e);if(!t)throw new Error(`No channel with id ${e} found.`);t.onContent(null)}onChannelTerminated(e,t){const r=this.getOpenChannel(e);if(r){this.deleteOpenChannel(e),this.removeChannelFromOfferedQueue(r);const n=this.protocolMajorVersion>1?this.formatter.deserializeException(t):null;r.dispose(n)}}}t.MultiplexingStreamClass=g},839(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MultiplexingStreamV3Formatter=t.MultiplexingStreamV2Formatter=t.MultiplexingStreamV1Formatter=t.MultiplexingStreamFormatter=void 0;const n=r(6164),o=r(5426),i=r(8018),s=r(3007),a=r(2762),c=r(7900);class l{static getIsOddRandomData(){const e=Buffer.alloc(16);for(let t=0;t<16;t++)e[t]=Math.floor(256*Math.random());return e}static isOdd(e,t){let r;for(let n=0;n<e.length;n++){const o=e[n],i=t[n];if(o>i){r=!0;break}if(o<i){r=!1;break}}if(void 0===r)throw new Error("Unable to determine even/odd party.");return r}createFrameHeader(e,t){if(!t)return new a.FrameHeader(e);const r=t%2==1===this.isOdd?c.ChannelSource.Remote:c.ChannelSource.Local;return new a.FrameHeader(e,{id:t,source:r})}}t.MultiplexingStreamFormatter=l;class u extends l{constructor(e){super(),this.stream=e}end(){this.stream.end()}async writeHandshakeAsync(){const e=l.getIsOddRandomData(),t=Buffer.concat([u.protocolMagicNumber,e]);return await(0,o.writeAsync)(this.stream,t),e}async readHandshakeAsync(e,t){const r=e,n=await(0,o.getBufferFrom)(this.stream,u.protocolMagicNumber.length+16,!1,t);for(let e=0;e<u.protocolMagicNumber.length;e++){const t=u.protocolMagicNumber[e],r=n.readUInt8(e);if(t!==r)throw new Error(`Protocol magic number mismatch. Expected ${t} but was ${r}.`)}return{isOdd:l.isOdd(r,n.slice(u.protocolMagicNumber.length)),protocolVersion:{major:1,minor:0}}}async writeFrameAsync(e,t){var r;const n=Buffer.alloc(7);n.writeInt8(e.code,0),n.writeUInt32BE((null===(r=e.channel)||void 0===r?void 0:r.id)||0,1),n.writeUInt16BE((null==t?void 0:t.length)||0,5),await(0,o.writeAsync)(this.stream,n),t&&t.length>0&&await(0,o.writeAsync)(this.stream,t)}async readFrameAsync(e){if(void 0===this.isOdd)throw new Error("isOdd must be set first.");const t=await(0,o.getBufferFrom)(this.stream,7,!0,e);if(null===t)return null;const r=this.createFrameHeader(t.readInt8(0),t.readUInt32BE(1)),n=t.readUInt16BE(5);return{header:r,payload:await(0,o.getBufferFrom)(this.stream,n)}}serializeOfferParameters(e){const t=Buffer.from(e.name,n.MultiplexingStream.ControlFrameEncoding);if(t.length>n.MultiplexingStream.framePayloadMaxLength)throw new Error("Name is too long.");return t}deserializeOfferParameters(e){return{name:e.toString(n.MultiplexingStream.ControlFrameEncoding)}}serializeAcceptanceParameters(e){return Buffer.from([])}deserializeAcceptanceParameters(e){return{}}serializeContentProcessed(e){throw new Error("Not supported in the V1 protocol.")}deserializeContentProcessed(e){throw new Error("Not supported in the V1 protocol.")}}t.MultiplexingStreamV1Formatter=u,u.protocolMagicNumber=Buffer.from([47,223,29,80]);class d extends l{constructor(e){super(),this.reader=i.createDecodeStream(),e.pipe(this.reader),this.writer=e}end(){this.writer.end()}async writeHandshakeAsync(){const e=l.getIsOddRandomData(),t=[[d.protocolVersion.major,d.protocolVersion.minor],e];return await(0,o.writeAsync)(this.writer,i.encode(t)),e}async readHandshakeAsync(e,t){if(!e)throw new Error("Provide the result of writeHandshakeAsync as a first argument.");const r=await this.readMessagePackAsync(t);if(null===r)throw new Error("No data received during handshake.");return{isOdd:l.isOdd(e,r[1]),protocolVersion:{major:r[0][0],minor:r[0][1]}}}async writeFrameAsync(e,t){var r;const n=[e.code];if(null===(r=e.channel)||void 0===r?void 0:r.id)n.push(e.channel.id),t&&t.length>0&&n.push(t);else if(t&&t.length>0)throw new Error("A frame may not contain payload without a channel ID.");await(0,o.writeAsync)(this.writer,i.encode(n))}async readFrameAsync(e){if(void 0===this.isOdd)throw new Error("isOdd must be set first.");const t=await this.readMessagePackAsync(e);return null===t?null:{header:this.createFrameHeader(t[0],t[1]),payload:t[2]||Buffer.from([])}}serializeOfferParameters(e){const t=[e.name];return e.remoteWindowSize&&t.push(e.remoteWindowSize),i.encode(t)}deserializeOfferParameters(e){const t=i.decode(e);return{name:t[0],remoteWindowSize:t[1]}}serializeAcceptanceParameters(e){const t=[];return e.remoteWindowSize&&t.push(e.remoteWindowSize),i.encode(t)}deserializeAcceptanceParameters(e){return{remoteWindowSize:i.decode(e)[0]}}serializeContentProcessed(e){return i.encode([e])}deserializeContentProcessed(e){return i.decode(e)[0]}serializeException(e){if(!e)return Buffer.alloc(0);const t=[`${e.name}: ${e.message}`];return i.encode(t)}deserializeException(e){if(0===e.length)return null;const t=i.decode(e);if(!t||0===t.length)return null;let r=i.decode(e)[0];return r=`Received error from remote side: ${r}`,new Error(r)}async readMessagePackAsync(e){const t=new s.Deferred;for(;;){const r=this.reader.read();if(null===r){const r=new s.Deferred,n=r.resolve.bind(r),o=t.resolve.bind(t);this.reader.once("readable",n),this.reader.once("end",o);const i=Promise.race([r.promise,t.promise]);if(await(e?e.racePromise(i):i),this.reader.removeListener("readable",n),this.reader.removeListener("end",o),r.isCompleted)continue;return null}return r}}}t.MultiplexingStreamV2Formatter=d,d.protocolVersion={major:2,minor:0};class p extends d{writeHandshakeAsync(){return Promise.resolve(null)}readHandshakeAsync(){return Promise.resolve({protocolVersion:p.protocolV3Version})}async writeFrameAsync(e,t){const r=[e.code];if(e.channel)r.push(e.channel.id),r.push(e.channel.source),t&&t.length>0&&r.push(t);else if(t&&t.length>0)throw new Error("A frame may not contain payload without a channel ID.");await(0,o.writeAsync)(this.writer,i.encode(r))}async readFrameAsync(e){const t=await this.readMessagePackAsync(e);return null===t?null:{header:new a.FrameHeader(t[0],t.length>1?{id:t[1],source:t[2]}:void 0),payload:t[3]||Buffer.from([])}}}t.MultiplexingStreamV3Formatter=p,p.protocolV3Version={major:2,minor:0}},8192(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0})},7900(e,t){"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.QualifiedChannelId=t.ChannelSource=void 0,function(e){e[e.Local=1]="Local",e[e.Remote=-1]="Remote",e[e.Seeded=0]="Seeded"}(r||(t.ChannelSource=r={})),function(e){e.toString=function(e){const t=e.source===r.Local?"local":e.source===r.Remote?"remote":e.source===r.Seeded?"seeded":"unknown";return`${e.id} (${t})`}}(n||(t.QualifiedChannelId=n={}))},5426(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removeFromQueue=t.requireInteger=t.throwIfDisposed=t.getBufferFrom=t.readSubstream=t.writeSubstream=t.writeAsync=void 0;const n=r(2203),o=r(3007);async function i(e,t){return new Promise((r,n)=>{e.write(t,e=>{e?n(e):r()})})}async function s(e,t,r=!1,n){const i=new o.Deferred;if(0===t)return Buffer.from([]);let s=null,a=0;for(;t>0;){null==n||n.throwIfCancelled();let c=e.readableLength;if(c)c>t&&(c=t);else{if(e.readableEnded||i.isCompleted){if(!r)throw new Error("Stream terminated before required bytes were read.");return null===s?null:s.subarray(0,a)}c=t}const l=e.read(c);if(l){if(l.length<c&&!r)throw new Error("Stream terminated before required bytes were read.");if(null===s){if(c===t||l.length<c)return l;s=Buffer.alloc(t)}l.copy(s,a),t-=l.length,a+=l.length}if(t>0){const t=new o.Deferred,r=t.resolve.bind(t),s=i.resolve.bind(i);e.once("readable",r),e.once("end",s);try{const e=Promise.race([t.promise,i.promise]);await(n?n.racePromise(e):e)}finally{e.removeListener("readable",r),e.removeListener("end",s)}}}return s}t.writeAsync=i,t.writeSubstream=function(e){return new n.Writable({async write(t,r,n){try{const r=new DataView(new ArrayBuffer(4));r.setUint32(0,t.length,!1),await i(e,Buffer.from(r.buffer)),await i(e,t),n()}catch(e){n(e)}},final(t){e.write(new Uint8Array(4),t)}})},t.readSubstream=function(e){return new n.Readable({async read(t){const r=await s(e,4),n=new DataView(r.buffer,r.byteOffset,r.length).getUint32(0,!1);if(0===n)return void this.push(null);const o=await s(e,n);this.push(o)}})},t.getBufferFrom=s,t.throwIfDisposed=function(e){if(e.isDisposed)throw new Error("disposed")},t.requireInteger=function(e,t,r,n="signed"){if(!Number.isInteger(t))throw new Error(`${e} must be an integer.`);let o=8*r;"signed"===n&&o--;const i=Math.pow(2,o)-1,s="signed"===n?-Math.pow(2,o):0;if(t>i||t<s)throw new Error(`${e} must be in the range ${s}-${i}.`)},t.removeFromQueue=function(e,t){if(t){const r=t.indexOf(e);r>=0&&t.splice(r,1)}}},5518(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChannelSource=t.QualifiedChannelId=t.readSubstream=t.writeSubstream=t.MultiplexingStream=t.FullDuplexStream=t.Channel=void 0;var n=r(4409);Object.defineProperty(t,"Channel",{enumerable:!0,get:function(){return n.Channel}});var o=r(443);Object.defineProperty(t,"FullDuplexStream",{enumerable:!0,get:function(){return o.FullDuplexStream}});var i=r(6164);Object.defineProperty(t,"MultiplexingStream",{enumerable:!0,get:function(){return i.MultiplexingStream}});var s=r(5426);Object.defineProperty(t,"writeSubstream",{enumerable:!0,get:function(){return s.writeSubstream}}),Object.defineProperty(t,"readSubstream",{enumerable:!0,get:function(){return s.readSubstream}});var a=r(7900);Object.defineProperty(t,"QualifiedChannelId",{enumerable:!0,get:function(){return a.QualifiedChannelId}}),Object.defineProperty(t,"ChannelSource",{enumerable:!0,get:function(){return a.ChannelSource}})},3904(e,t,r){const n=Symbol("SemVer ANY");class o{static get ANY(){return n}constructor(e,t){if(t=i(t),e instanceof o){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),l("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===n?this.value="":this.value=this.operator+this.semver.version,l("comp",this)}parse(e){const t=this.options.loose?s[a.COMPARATORLOOSE]:s[a.COMPARATOR],r=e.match(t);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new u(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(l("Comparator.test",e,this.options.loose),this.semver===n||e===n)return!0;if("string"==typeof e)try{e=new u(e,this.options)}catch(e){return!1}return c(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof o))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new d(e.value,t).test(this.value):""===e.operator?""===e.value||new d(this.value,t).test(e.semver):!((t=i(t)).includePrerelease&&("<0.0.0-0"===this.value||"<0.0.0-0"===e.value)||!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))||(!this.operator.startsWith(">")||!e.operator.startsWith(">"))&&(!this.operator.startsWith("<")||!e.operator.startsWith("<"))&&(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))&&!(c(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))&&!(c(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}}e.exports=o;const i=r(8587),{safeRe:s,t:a}=r(9718),c=r(2111),l=r(7272),u=r(3908),d=r(8311)},8311(e,t,r){class n{constructor(e,t){if(t=i(t),e instanceof n)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new n(e.raw,t);if(e instanceof s)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter(e=>!m(e[0])),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&v(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&f)|(this.options.loose&&g))+":"+e,r=o.get(t);if(r)return r;const n=this.options.loose,i=n?l[u.HYPHENRANGELOOSE]:l[u.HYPHENRANGE];e=e.replace(i,N(this.options.includePrerelease)),a("hyphen replace",e),e=e.replace(l[u.COMPARATORTRIM],d),a("comparator trim",e),e=e.replace(l[u.TILDETRIM],p),a("tilde trim",e),e=e.replace(l[u.CARETTRIM],h),a("caret trim",e);let c=e.split(" ").map(e=>S(e,this.options)).join(" ").split(/\s+/).map(e=>O(e,this.options));n&&(c=c.filter(e=>(a("loose invalid filter",e,this.options),!!e.match(l[u.COMPARATORLOOSE])))),a("range list",c);const v=new Map,y=c.map(e=>new s(e,this.options));for(const e of y){if(m(e))return[e];v.set(e.value,e)}v.size>1&&v.has("")&&v.delete("");const w=[...v.values()];return o.set(t,w),w}intersects(e,t){if(!(e instanceof n))throw new TypeError("a Range is required");return this.set.some(r=>y(r,t)&&e.set.some(e=>y(e,t)&&r.every(r=>e.every(e=>r.intersects(e,t)))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(R(this.set[t],e,this.options))return!0;return!1}}e.exports=n;const o=new(r(8357))({max:1e3}),i=r(8587),s=r(3904),a=r(7272),c=r(3908),{safeRe:l,t:u,comparatorTrimReplace:d,tildeTrimReplace:p,caretTrimReplace:h}=r(9718),{FLAG_INCLUDE_PRERELEASE:f,FLAG_LOOSE:g}=r(6874),m=e=>"<0.0.0-0"===e.value,v=e=>""===e.value,y=(e,t)=>{let r=!0;const n=e.slice();let o=n.pop();for(;r&&n.length;)r=n.every(e=>o.intersects(e,t)),o=n.pop();return r},S=(e,t)=>(a("comp",e,t),e=b(e,t),a("caret",e),e=E(e,t),a("tildes",e),e=T(e,t),a("xrange",e),e=I(e,t),a("stars",e),e),w=e=>!e||"x"===e.toLowerCase()||"*"===e,E=(e,t)=>e.trim().split(/\s+/).map(e=>_(e,t)).join(" "),_=(e,t)=>{const r=t.loose?l[u.TILDELOOSE]:l[u.TILDE];return e.replace(r,(t,r,n,o,i)=>{let s;return a("tilde",e,t,r,n,o,i),w(r)?s="":w(n)?s=`>=${r}.0.0 <${+r+1}.0.0-0`:w(o)?s=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:i?(a("replaceTilde pr",i),s=`>=${r}.${n}.${o}-${i} <${r}.${+n+1}.0-0`):s=`>=${r}.${n}.${o} <${r}.${+n+1}.0-0`,a("tilde return",s),s})},b=(e,t)=>e.trim().split(/\s+/).map(e=>P(e,t)).join(" "),P=(e,t)=>{a("caret",e,t);const r=t.loose?l[u.CARETLOOSE]:l[u.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,(t,r,o,i,s)=>{let c;return a("caret",e,t,r,o,i,s),w(r)?c="":w(o)?c=`>=${r}.0.0${n} <${+r+1}.0.0-0`:w(i)?c="0"===r?`>=${r}.${o}.0${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.0${n} <${+r+1}.0.0-0`:s?(a("replaceCaret pr",s),c="0"===r?"0"===o?`>=${r}.${o}.${i}-${s} <${r}.${o}.${+i+1}-0`:`>=${r}.${o}.${i}-${s} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${i}-${s} <${+r+1}.0.0-0`):(a("no pr"),c="0"===r?"0"===o?`>=${r}.${o}.${i}${n} <${r}.${o}.${+i+1}-0`:`>=${r}.${o}.${i}${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${i} <${+r+1}.0.0-0`),a("caret return",c),c})},T=(e,t)=>(a("replaceXRanges",e,t),e.split(/\s+/).map(e=>C(e,t)).join(" ")),C=(e,t)=>{e=e.trim();const r=t.loose?l[u.XRANGELOOSE]:l[u.XRANGE];return e.replace(r,(r,n,o,i,s,c)=>{a("xRange",e,r,n,o,i,s,c);const l=w(o),u=l||w(i),d=u||w(s),p=d;return"="===n&&p&&(n=""),c=t.includePrerelease?"-0":"",l?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&p?(u&&(i=0),s=0,">"===n?(n=">=",u?(o=+o+1,i=0,s=0):(i=+i+1,s=0)):"<="===n&&(n="<",u?o=+o+1:i=+i+1),"<"===n&&(c="-0"),r=`${n+o}.${i}.${s}${c}`):u?r=`>=${o}.0.0${c} <${+o+1}.0.0-0`:d&&(r=`>=${o}.${i}.0${c} <${o}.${+i+1}.0-0`),a("xRange return",r),r})},I=(e,t)=>(a("replaceStars",e,t),e.trim().replace(l[u.STAR],"")),O=(e,t)=>(a("replaceGTE0",e,t),e.trim().replace(l[t.includePrerelease?u.GTE0PRE:u.GTE0],"")),N=e=>(t,r,n,o,i,s,a,c,l,u,d,p,h)=>`${r=w(n)?"":w(o)?`>=${n}.0.0${e?"-0":""}`:w(i)?`>=${n}.${o}.0${e?"-0":""}`:s?`>=${r}`:`>=${r}${e?"-0":""}`} ${c=w(l)?"":w(u)?`<${+l+1}.0.0-0`:w(d)?`<${l}.${+u+1}.0-0`:p?`<=${l}.${u}.${d}-${p}`:e?`<${l}.${u}.${+d+1}-0`:`<=${c}`}`.trim(),R=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(a(e[r].semver),e[r].semver!==s.ANY&&e[r].semver.prerelease.length>0){const n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}},3908(e,t,r){const n=r(7272),{MAX_LENGTH:o,MAX_SAFE_INTEGER:i}=r(6874),{safeRe:s,t:a}=r(9718),c=r(8587),{compareIdentifiers:l}=r(1123);class u{constructor(e,t){if(t=c(t),e instanceof u){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>o)throw new TypeError(`version is longer than ${o} characters`);n("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?s[a.LOOSE]:s[a.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>i||this.major<0)throw new TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map(e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<i)return t}return e}):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(n("SemVer.compare",this.version,this.options,e),!(e instanceof u)){if("string"==typeof e&&e===this.version)return 0;e=new u(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof u||(e=new u(e,this.options)),l(this.major,e.major)||l(this.minor,e.minor)||l(this.patch,e.patch)}comparePre(e){if(e instanceof u||(e=new u(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const r=this.prerelease[t],o=e.prerelease[t];if(n("prerelease compare",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return-1;if(r!==o)return l(r,o)}while(++t)}compareBuild(e){e instanceof u||(e=new u(e,this.options));let t=0;do{const r=this.build[t],o=e.build[t];if(n("prerelease compare",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return-1;if(r!==o)return l(r,o)}while(++t)}inc(e,t,r){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(r)?1:0;if(!t&&!1===r)throw new Error("invalid increment argument: identifier is empty");if(0===this.prerelease.length)this.prerelease=[e];else{let n=this.prerelease.length;for(;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);if(-1===n){if(t===this.prerelease.join(".")&&!1===r)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let n=[t,e];!1===r&&(n=[t]),0===l(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}e.exports=u},7414(e,t,r){const n=r(144);e.exports=(e,t)=>{const r=n(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}},2111(e,t,r){const n=r(4641),o=r(3999),i=r(5580),s=r(4089),a=r(9440),c=r(5200);e.exports=(e,t,r,l)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return n(e,r,l);case"!=":return o(e,r,l);case">":return i(e,r,l);case">=":return s(e,r,l);case"<":return a(e,r,l);case"<=":return c(e,r,l);default:throw new TypeError(`Invalid operator: ${t}`)}}},6170(e,t,r){const n=r(3908),o=r(144),{safeRe:i,t:s}=r(9718);e.exports=(e,t)=>{if(e instanceof n)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){let t;for(;(t=i[s.COERCERTL].exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&t.index+t[0].length===r.index+r[0].length||(r=t),i[s.COERCERTL].lastIndex=t.index+t[1].length+t[2].length;i[s.COERCERTL].lastIndex=-1}else r=e.match(i[s.COERCE]);return null===r?null:o(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,t)}},909(e,t,r){const n=r(3908);e.exports=(e,t,r)=>{const o=new n(e,r),i=new n(t,r);return o.compare(i)||o.compareBuild(i)}},1763(e,t,r){const n=r(560);e.exports=(e,t)=>n(e,t,!0)},560(e,t,r){const n=r(3908);e.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))},1832(e,t,r){const n=r(144);e.exports=(e,t)=>{const r=n(e,null,!0),o=n(t,null,!0),i=r.compare(o);if(0===i)return null;const s=i>0,a=s?r:o,c=s?o:r,l=!!a.prerelease.length;if(c.prerelease.length&&!l)return c.patch||c.minor?a.patch?"patch":a.minor?"minor":"major":"major";const u=l?"pre":"";return r.major!==o.major?u+"major":r.minor!==o.minor?u+"minor":r.patch!==o.patch?u+"patch":"prerelease"}},4641(e,t,r){const n=r(560);e.exports=(e,t,r)=>0===n(e,t,r)},5580(e,t,r){const n=r(560);e.exports=(e,t,r)=>n(e,t,r)>0},4089(e,t,r){const n=r(560);e.exports=(e,t,r)=>n(e,t,r)>=0},5388(e,t,r){const n=r(3908);e.exports=(e,t,r,o,i)=>{"string"==typeof r&&(i=o,o=r,r=void 0);try{return new n(e instanceof n?e.version:e,r).inc(t,o,i).version}catch(e){return null}}},9440(e,t,r){const n=r(560);e.exports=(e,t,r)=>n(e,t,r)<0},5200(e,t,r){const n=r(560);e.exports=(e,t,r)=>n(e,t,r)<=0},2938(e,t,r){const n=r(3908);e.exports=(e,t)=>new n(e,t).major},6254(e,t,r){const n=r(3908);e.exports=(e,t)=>new n(e,t).minor},3999(e,t,r){const n=r(560);e.exports=(e,t,r)=>0!==n(e,t,r)},144(e,t,r){const n=r(3908);e.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}},4493(e,t,r){const n=r(3908);e.exports=(e,t)=>new n(e,t).patch},1729(e,t,r){const n=r(144);e.exports=(e,t)=>{const r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}},9970(e,t,r){const n=r(560);e.exports=(e,t,r)=>n(t,e,r)},4277(e,t,r){const n=r(909);e.exports=(e,t)=>e.sort((e,r)=>n(r,e,t))},7638(e,t,r){const n=r(8311);e.exports=(e,t,r)=>{try{t=new n(t,r)}catch(e){return!1}return t.test(e)}},3927(e,t,r){const n=r(909);e.exports=(e,t)=>e.sort((e,r)=>n(e,r,t))},6953(e,t,r){const n=r(144);e.exports=(e,t)=>{const r=n(e,t);return r?r.version:null}},9589(e,t,r){const n=r(9718),o=r(6874),i=r(3908),s=r(1123),a=r(144),c=r(6953),l=r(7414),u=r(5388),d=r(1832),p=r(2938),h=r(6254),f=r(4493),g=r(1729),m=r(560),v=r(9970),y=r(1763),S=r(909),w=r(3927),E=r(4277),_=r(5580),b=r(9440),P=r(4641),T=r(3999),C=r(4089),I=r(5200),O=r(2111),N=r(6170),R=r(3904),A=r(8311),D=r(7638),x=r(7631),k=r(9628),j=r(270),M=r(1261),L=r(3874),F=r(7075),U=r(5571),$=r(5342),B=r(6780),V=r(2525),H=r(5032);e.exports={parse:a,valid:c,clean:l,inc:u,diff:d,major:p,minor:h,patch:f,prerelease:g,compare:m,rcompare:v,compareLoose:y,compareBuild:S,sort:w,rsort:E,gt:_,lt:b,eq:P,neq:T,gte:C,lte:I,cmp:O,coerce:N,Comparator:R,Range:A,satisfies:D,toComparators:x,maxSatisfying:k,minSatisfying:j,minVersion:M,validRange:L,outside:F,gtr:U,ltr:$,intersects:B,simplifyRange:V,subset:H,SemVer:i,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:o.SEMVER_SPEC_VERSION,RELEASE_TYPES:o.RELEASE_TYPES,compareIdentifiers:s.compareIdentifiers,rcompareIdentifiers:s.rcompareIdentifiers}},6874(e){const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:t,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},7272(e){const t="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},1123(e){const t=/^[0-9]+$/,r=(e,r)=>{const n=t.test(e),o=t.test(r);return n&&o&&(e=+e,r=+r),e===r?0:n&&!o?-1:o&&!n?1:e<r?-1:1};e.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}},8587(e){const t=Object.freeze({loose:!0}),r=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:r},9718(e,t,r){const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:o,MAX_LENGTH:i}=r(6874),s=r(7272),a=(t=e.exports={}).re=[],c=t.safeRe=[],l=t.src=[],u=t.t={};let d=0;const p="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",i],[p,o]],f=(e,t,r)=>{const n=(e=>{for(const[t,r]of h)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),o=d++;s(e,o,t),u[e]=o,l[o]=t,a[o]=new RegExp(t,r?"g":void 0),c[o]=new RegExp(n,r?"g":void 0)};f("NUMERICIDENTIFIER","0|[1-9]\\d*"),f("NUMERICIDENTIFIERLOOSE","\\d+"),f("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),f("MAINVERSION",`(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})`),f("MAINVERSIONLOOSE",`(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})`),f("PRERELEASEIDENTIFIER",`(?:${l[u.NUMERICIDENTIFIER]}|${l[u.NONNUMERICIDENTIFIER]})`),f("PRERELEASEIDENTIFIERLOOSE",`(?:${l[u.NUMERICIDENTIFIERLOOSE]}|${l[u.NONNUMERICIDENTIFIER]})`),f("PRERELEASE",`(?:-(${l[u.PRERELEASEIDENTIFIER]}(?:\\.${l[u.PRERELEASEIDENTIFIER]})*))`),f("PRERELEASELOOSE",`(?:-?(${l[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[u.PRERELEASEIDENTIFIERLOOSE]})*))`),f("BUILDIDENTIFIER",`${p}+`),f("BUILD",`(?:\\+(${l[u.BUILDIDENTIFIER]}(?:\\.${l[u.BUILDIDENTIFIER]})*))`),f("FULLPLAIN",`v?${l[u.MAINVERSION]}${l[u.PRERELEASE]}?${l[u.BUILD]}?`),f("FULL",`^${l[u.FULLPLAIN]}$`),f("LOOSEPLAIN",`[v=\\s]*${l[u.MAINVERSIONLOOSE]}${l[u.PRERELEASELOOSE]}?${l[u.BUILD]}?`),f("LOOSE",`^${l[u.LOOSEPLAIN]}$`),f("GTLT","((?:<|>)?=?)"),f("XRANGEIDENTIFIERLOOSE",`${l[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),f("XRANGEIDENTIFIER",`${l[u.NUMERICIDENTIFIER]}|x|X|\\*`),f("XRANGEPLAIN",`[v=\\s]*(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:${l[u.PRERELEASE]})?${l[u.BUILD]}?)?)?`),f("XRANGEPLAINLOOSE",`[v=\\s]*(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:${l[u.PRERELEASELOOSE]})?${l[u.BUILD]}?)?)?`),f("XRANGE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAIN]}$`),f("XRANGELOOSE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAINLOOSE]}$`),f("COERCE",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?(?:$|[^\\d])`),f("COERCERTL",l[u.COERCE],!0),f("LONETILDE","(?:~>?)"),f("TILDETRIM",`(\\s*)${l[u.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",f("TILDE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAIN]}$`),f("TILDELOOSE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAINLOOSE]}$`),f("LONECARET","(?:\\^)"),f("CARETTRIM",`(\\s*)${l[u.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",f("CARET",`^${l[u.LONECARET]}${l[u.XRANGEPLAIN]}$`),f("CARETLOOSE",`^${l[u.LONECARET]}${l[u.XRANGEPLAINLOOSE]}$`),f("COMPARATORLOOSE",`^${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]})$|^$`),f("COMPARATOR",`^${l[u.GTLT]}\\s*(${l[u.FULLPLAIN]})$|^$`),f("COMPARATORTRIM",`(\\s*)${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]}|${l[u.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",f("HYPHENRANGE",`^\\s*(${l[u.XRANGEPLAIN]})\\s+-\\s+(${l[u.XRANGEPLAIN]})\\s*$`),f("HYPHENRANGELOOSE",`^\\s*(${l[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[u.XRANGEPLAINLOOSE]})\\s*$`),f("STAR","(<|>)?=?\\s*\\*"),f("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),f("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},8357(e,t,r){"use strict";const n=r(8799),o=Symbol("max"),i=Symbol("length"),s=Symbol("lengthCalculator"),a=Symbol("allowStale"),c=Symbol("maxAge"),l=Symbol("dispose"),u=Symbol("noDisposeOnSet"),d=Symbol("lruList"),p=Symbol("cache"),h=Symbol("updateAgeOnGet"),f=()=>1,g=(e,t,r)=>{const n=e[p].get(t);if(n){const t=n.value;if(m(e,t)){if(y(e,n),!e[a])return}else r&&(e[h]&&(n.value.now=Date.now()),e[d].unshiftNode(n));return t.value}},m=(e,t)=>{if(!t||!t.maxAge&&!e[c])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[c]&&r>e[c]},v=e=>{if(e[i]>e[o])for(let t=e[d].tail;e[i]>e[o]&&null!==t;){const r=t.prev;y(e,t),t=r}},y=(e,t)=>{if(t){const r=t.value;e[l]&&e[l](r.key,r.value),e[i]-=r.length,e[p].delete(r.key),e[d].removeNode(t)}};class S{constructor(e,t,r,n,o){this.key=e,this.value=t,this.length=r,this.now=n,this.maxAge=o||0}}const w=(e,t,r,n)=>{let o=r.value;m(e,o)&&(y(e,r),e[a]||(o=void 0)),o&&t.call(n,o.value,o.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[o]=e.max||1/0;const t=e.length||f;if(this[s]="function"!=typeof t?f:t,this[a]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[c]=e.maxAge||0,this[l]=e.dispose,this[u]=e.noDisposeOnSet||!1,this[h]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[o]=e||1/0,v(this)}get max(){return this[o]}set allowStale(e){this[a]=!!e}get allowStale(){return this[a]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[c]=e,v(this)}get maxAge(){return this[c]}set lengthCalculator(e){"function"!=typeof e&&(e=f),e!==this[s]&&(this[s]=e,this[i]=0,this[d].forEach(e=>{e.length=this[s](e.value,e.key),this[i]+=e.length})),v(this)}get lengthCalculator(){return this[s]}get length(){return this[i]}get itemCount(){return this[d].length}rforEach(e,t){t=t||this;for(let r=this[d].tail;null!==r;){const n=r.prev;w(this,e,r,t),r=n}}forEach(e,t){t=t||this;for(let r=this[d].head;null!==r;){const n=r.next;w(this,e,r,t),r=n}}keys(){return this[d].toArray().map(e=>e.key)}values(){return this[d].toArray().map(e=>e.value)}reset(){this[l]&&this[d]&&this[d].length&&this[d].forEach(e=>this[l](e.key,e.value)),this[p]=new Map,this[d]=new n,this[i]=0}dump(){return this[d].map(e=>!m(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[d]}set(e,t,r){if((r=r||this[c])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");const n=r?Date.now():0,a=this[s](t,e);if(this[p].has(e)){if(a>this[o])return y(this,this[p].get(e)),!1;const s=this[p].get(e).value;return this[l]&&(this[u]||this[l](e,s.value)),s.now=n,s.maxAge=r,s.value=t,this[i]+=a-s.length,s.length=a,this.get(e),v(this),!0}const h=new S(e,t,a,n,r);return h.length>this[o]?(this[l]&&this[l](e,t),!1):(this[i]+=h.length,this[d].unshift(h),this[p].set(e,this[d].head),v(this),!0)}has(e){if(!this[p].has(e))return!1;const t=this[p].get(e).value;return!m(this,t)}get(e){return g(this,e,!0)}peek(e){return g(this,e,!1)}pop(){const e=this[d].tail;return e?(y(this,e),e.value):null}del(e){y(this,this[p].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const n=e[r],o=n.e||0;if(0===o)this.set(n.k,n.v);else{const e=o-t;e>0&&this.set(n.k,n.v,e)}}}prune(){this[p].forEach((e,t)=>g(this,t,!1))}}},5571(e,t,r){const n=r(7075);e.exports=(e,t,r)=>n(e,t,">",r)},6780(e,t,r){const n=r(8311);e.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r))},5342(e,t,r){const n=r(7075);e.exports=(e,t,r)=>n(e,t,"<",r)},9628(e,t,r){const n=r(3908),o=r(8311);e.exports=(e,t,r)=>{let i=null,s=null,a=null;try{a=new o(t,r)}catch(e){return null}return e.forEach(e=>{a.test(e)&&(i&&-1!==s.compare(e)||(i=e,s=new n(i,r)))}),i}},270(e,t,r){const n=r(3908),o=r(8311);e.exports=(e,t,r)=>{let i=null,s=null,a=null;try{a=new o(t,r)}catch(e){return null}return e.forEach(e=>{a.test(e)&&(i&&1!==s.compare(e)||(i=e,s=new n(i,r)))}),i}},1261(e,t,r){const n=r(3908),o=r(8311),i=r(5580);e.exports=(e,t)=>{e=new o(e,t);let r=new n("0.0.0");if(e.test(r))return r;if(r=new n("0.0.0-0"),e.test(r))return r;r=null;for(let t=0;t<e.set.length;++t){const o=e.set[t];let s=null;o.forEach(e=>{const t=new n(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":s&&!i(t,s)||(s=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}}),!s||r&&!i(r,s)||(r=s)}return r&&e.test(r)?r:null}},7075(e,t,r){const n=r(3908),o=r(3904),{ANY:i}=o,s=r(8311),a=r(7638),c=r(5580),l=r(9440),u=r(5200),d=r(4089);e.exports=(e,t,r,p)=>{let h,f,g,m,v;switch(e=new n(e,p),t=new s(t,p),r){case">":h=c,f=u,g=l,m=">",v=">=";break;case"<":h=l,f=d,g=c,m="<",v="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(e,t,p))return!1;for(let r=0;r<t.set.length;++r){const n=t.set[r];let s=null,a=null;if(n.forEach(e=>{e.semver===i&&(e=new o(">=0.0.0")),s=s||e,a=a||e,h(e.semver,s.semver,p)?s=e:g(e.semver,a.semver,p)&&(a=e)}),s.operator===m||s.operator===v)return!1;if((!a.operator||a.operator===m)&&f(e,a.semver))return!1;if(a.operator===v&&g(e,a.semver))return!1}return!0}},2525(e,t,r){const n=r(7638),o=r(560);e.exports=(e,t,r)=>{const i=[];let s=null,a=null;const c=e.sort((e,t)=>o(e,t,r));for(const e of c)n(e,t,r)?(a=e,s||(s=e)):(a&&i.push([s,a]),a=null,s=null);s&&i.push([s,null]);const l=[];for(const[e,t]of i)e===t?l.push(e):t||e!==c[0]?t?e===c[0]?l.push(`<=${t}`):l.push(`${e} - ${t}`):l.push(`>=${e}`):l.push("*");const u=l.join(" || "),d="string"==typeof t.raw?t.raw:String(t);return u.length<d.length?u:t}},5032(e,t,r){const n=r(8311),o=r(3904),{ANY:i}=o,s=r(7638),a=r(560),c=[new o(">=0.0.0-0")],l=[new o(">=0.0.0")],u=(e,t,r)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===i){if(1===t.length&&t[0].semver===i)return!0;e=r.includePrerelease?c:l}if(1===t.length&&t[0].semver===i){if(r.includePrerelease)return!0;t=l}const n=new Set;let o,u,h,f,g,m,v;for(const t of e)">"===t.operator||">="===t.operator?o=d(o,t,r):"<"===t.operator||"<="===t.operator?u=p(u,t,r):n.add(t.semver);if(n.size>1)return null;if(o&&u){if(h=a(o.semver,u.semver,r),h>0)return null;if(0===h&&(">="!==o.operator||"<="!==u.operator))return null}for(const e of n){if(o&&!s(e,String(o),r))return null;if(u&&!s(e,String(u),r))return null;for(const n of t)if(!s(e,String(n),r))return!1;return!0}let y=!(!u||r.includePrerelease||!u.semver.prerelease.length)&&u.semver,S=!(!o||r.includePrerelease||!o.semver.prerelease.length)&&o.semver;y&&1===y.prerelease.length&&"<"===u.operator&&0===y.prerelease[0]&&(y=!1);for(const e of t){if(v=v||">"===e.operator||">="===e.operator,m=m||"<"===e.operator||"<="===e.operator,o)if(S&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===S.major&&e.semver.minor===S.minor&&e.semver.patch===S.patch&&(S=!1),">"===e.operator||">="===e.operator){if(f=d(o,e,r),f===e&&f!==o)return!1}else if(">="===o.operator&&!s(o.semver,String(e),r))return!1;if(u)if(y&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===y.major&&e.semver.minor===y.minor&&e.semver.patch===y.patch&&(y=!1),"<"===e.operator||"<="===e.operator){if(g=p(u,e,r),g===e&&g!==u)return!1}else if("<="===u.operator&&!s(u.semver,String(e),r))return!1;if(!e.operator&&(u||o)&&0!==h)return!1}return!(o&&m&&!u&&0!==h||u&&v&&!o&&0!==h||S||y)},d=(e,t,r)=>{if(!e)return t;const n=a(e.semver,t.semver,r);return n>0?e:n<0||">"===t.operator&&">="===e.operator?t:e},p=(e,t,r)=>{if(!e)return t;const n=a(e.semver,t.semver,r);return n<0?e:n>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let o=!1;e:for(const n of e.set){for(const e of t.set){const t=u(n,e,r);if(o=o||null!==t,t)continue e}if(o)return!1}return!0}},7631(e,t,r){const n=r(8311);e.exports=(e,t)=>new n(e,t).set.map(e=>e.map(e=>e.value).join(" ").trim().split(" "))},3874(e,t,r){const n=r(8311);e.exports=(e,t)=>{try{return new n(e,t).range||"*"}catch(e){return null}}},5459(e){"use strict";e.exports=function(e){for(var t=5381,r=e.length;r;)t=33*t^e.charCodeAt(--r);return t>>>0}},2909(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExperimentationService=void 0;var n=r(7291);Object.defineProperty(t,"ExperimentationService",{enumerable:!0,get:function(){return n.ExperimentationService}})},7291(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExperimentationService=void 0;const n=r(2845),o=r(1924),i=r(5761);class s extends i.ExperimentationServiceAutoPolling{constructor(e){super(e.telemetry,e.filterProviders||[],null!=e.refetchInterval?e.refetchInterval:0,e.assignmentContextTelemetryPropertyName,e.telemetryEventName,e.storageKey,e.keyValueStorage),this.options=e,this.invokeInit()}init(){this.featureProviders=[],this.addFeatureProvider(new n.TasApiFeatureProvider(new o.HttpClient(this.options.endpoint),this.telemetry,this.filterProviders)),super.init()}}t.ExperimentationService=s,s.REFRESH_RATE_IN_MINUTES=30},5761(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExperimentationServiceAutoPolling=void 0;const n=r(1714),o=r(3257);class i extends n.ExperimentationServiceBase{constructor(e,t,r,n,i,s,a){if(super(e,n,i,s,a),this.telemetry=e,this.filterProviders=t,this.refreshRateMs=r,this.assignmentContextTelemetryPropertyName=n,this.telemetryEventName=i,this.storageKey=s,this.storage=a,r<1e3&&0!==r)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.");r>0&&(this.pollingService=new o.PollingService(r),this.pollingService.OnPollTick(async()=>{await super.getFeaturesAsync()}))}init(){this.pollingService?this.pollingService.StartPolling(!0):super.getFeaturesAsync()}async getFeaturesAsync(e=!1){if(this.pollingService){this.pollingService.StopPolling();let t=await super.getFeaturesAsync(e);return this.pollingService.StartPolling(),t}return await super.getFeaturesAsync(e)}}t.ExperimentationServiceAutoPolling=i},1714(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExperimentationServiceBase=void 0;const n=r(8823);t.ExperimentationServiceBase=class{get features(){return this._features}set features(e){this._features=e,this.telemetry&&this.telemetry.setSharedProperty(this.assignmentContextTelemetryPropertyName,this.features.assignmentContext)}constructor(e,t,r,o,i){this.telemetry=e,this.assignmentContextTelemetryPropertyName=t,this.telemetryEventName=r,this.storageKey=o,this.storage=i,this.featuresConsumed=!1,this.cachedTelemetryEvents=[],this._features={features:[],assignmentContext:"",configs:[]},this.storageKey||(this.storageKey="ABExp.Features"),this.storage||(i=new n.MemoryKeyValueStorage),this.loadCachePromise=this.loadCachedFeatureData(),this.initializePromise=this.loadCachePromise,this.initialFetch=new Promise((e,t)=>{this.resolveInitialFetchPromise=e})}async getFeaturesAsync(e=!1){if(null!=this.fetchPromise){try{await this.fetchPromise}catch(e){}return this.features}if(!this.featureProviders||0===this.featureProviders.length)return Promise.resolve({features:[],assignmentContext:"",configs:[]});try{this.fetchPromise=Promise.all(this.featureProviders.map(async e=>await e.getFeatures()));const t=await this.fetchPromise;this.updateFeatures(t,e)}catch(e){}return this.fetchPromise=void 0,this.resolveInitialFetchPromise&&(this.resolveInitialFetchPromise(),this.resolveInitialFetchPromise=void 0),this.features}updateFeatures(e,t=!1){let r={features:[],assignmentContext:"",configs:[]};for(let t of e){for(let e of t.features)r.features.includes(e)||r.features.push(e);for(let e of t.configs){const t=r.configs.find(t=>t.Id===e.Id);t?t.Parameters=Object.assign(Object.assign({},t.Parameters),e.Parameters):r.configs.push(e)}r.assignmentContext+=t.assignmentContext}!t&&this.featuresConsumed||(this.features=r),this.storage&&this.storage.setValue(this.storageKey,r)}async loadCachedFeatureData(){let e;this.storage&&(e=await this.storage.getValue(this.storageKey),void 0!==e&&void 0===e.configs&&(e.configs=[])),0===this.features.features.length&&(this.features=e||{features:[],assignmentContext:"",configs:[]})}isFlightEnabled(e){return this.featuresConsumed=!0,this.PostEventToTelemetry(e),this.features.features.includes(e)}async isCachedFlightEnabled(e){return await this.loadCachePromise,this.featuresConsumed=!0,this.PostEventToTelemetry(e),this.features.features.includes(e)}async isFlightEnabledAsync(e){const t=await this.getFeaturesAsync(!0);return this.featuresConsumed=!0,this.PostEventToTelemetry(e),t.features.includes(e)}getTreatmentVariable(e,t){this.featuresConsumed=!0,this.PostEventToTelemetry(`${e}.${t}`);const r=this.features.configs.find(t=>t.Id===e);return null==r?void 0:r.Parameters[t]}async getTreatmentVariableAsync(e,t,r){if(r){const r=this.featuresConsumed,n=this.getTreatmentVariable(e,t);if(void 0!==n)return n;this.featuresConsumed=r}return await this.getFeaturesAsync(!0),this.getTreatmentVariable(e,t)}PostEventToTelemetry(e){this.cachedTelemetryEvents.includes(e)||(this.telemetry.postEvent(this.telemetryEventName,new Map([["ABExp.queriedFeature",e]])),this.cachedTelemetryEvents.push(e))}invokeInit(){this.init()}addFeatureProvider(...e){if(null!=e&&null!=this.featureProviders)for(let t of e)this.featureProviders.push(t)}}},6790(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseFeatureProvider=void 0,t.BaseFeatureProvider=class{constructor(e){this.telemetry=e,this.isFetching=!1}async getFeatures(){if(this.isFetching&&this.fetchPromise)return this.fetchPromise;this.fetchPromise=this.fetch();let e=await this.fetchPromise;return this.isFetching=!1,this.fetchPromise=void 0,e}}},6492(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FilteredFeatureProvider=void 0;const n=r(6790);class o extends n.BaseFeatureProvider{constructor(e,t){super(e),this.telemetry=e,this.filterProviders=t,this.cachedTelemetryEvents=[]}getFilters(){let e=new Map;for(let t of this.filterProviders){let r=t.getFilters();for(let t of r.keys()){let n=r.get(t);e.set(t,n)}}return e}PostEventToTelemetry(e){if(this.cachedTelemetryEvents.includes(e))return;const t=JSON.stringify(e);this.telemetry.postEvent("report-headers",new Map([["ABExp.headers",t]])),this.cachedTelemetryEvents.push(e)}}t.FilteredFeatureProvider=o},2845(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TasApiFeatureProvider=t.TASAPI_FETCHERROR_EVENTNAME=void 0;const n=r(6492);t.TASAPI_FETCHERROR_EVENTNAME="call-tas-error";const o="ErrorType";class i extends n.FilteredFeatureProvider{constructor(e,t,r){super(t,r),this.httpClient=e,this.telemetry=t,this.filterProviders=r}async fetch(){let e,r=this.getFilters(),n={};for(let e of r.keys()){const t=r.get(e);n[e]=t}try{e=await this.httpClient.get({headers:n})}catch(e){const r=e,n=new Map;r.responseReceived&&!r.responseOk?n.set(o,"ServerError"):!1===r.responseReceived?n.set(o,"NoResponse"):n.set(o,"GenericError"),this.telemetry.postEvent(t.TASAPI_FETCHERROR_EVENTNAME,n)}if(!e)throw Error(t.TASAPI_FETCHERROR_EVENTNAME);r.keys.length>0&&this.PostEventToTelemetry(n);const i=e.data;let s=i.Configs,a=[];for(let e of s)if(e.Parameters)for(let t of Object.keys(e.Parameters)){const r=t+(e.Parameters[t]?"":"cf");a.includes(r)||a.push(r)}return{features:a,assignmentContext:i.AssignmentContext,configs:s}}}t.TasApiFeatureProvider=i},1924(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HttpClient=t.FetchError=void 0;class r extends Error{constructor(e,t,r){super(e),this.responseReceived=t,this.responseOk=r}}t.FetchError=r,t.HttpClient=class{constructor(e){this.endpoint=e}async get(e){const t=await fetch(this.endpoint,{method:"GET",headers:null==e?void 0:e.headers});if(!t)throw new r("No response received",!1);if(!t.ok)throw new r("Response not ok",!0,!1);const n=await t.json();if(!n)throw new r("No data received",!1);return{data:n}}}},8823(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MemoryKeyValueStorage=void 0,t.MemoryKeyValueStorage=class{constructor(){this.storage=new Map}async getValue(e,t){return this.storage.has(e)?await Promise.resolve(this.storage.get(e)):await Promise.resolve(t||void 0)}setValue(e,t){this.storage.set(e,t)}}},3257(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PollingService=void 0,t.PollingService=class{constructor(e){this.fetchInterval=e}StopPolling(){clearInterval(this.intervalHandle),this.intervalHandle=void 0}OnPollTick(e){this.onTick=e}StartPolling(e=!1){this.intervalHandle&&this.StopPolling(),null!=this.onTick&&(e&&this.onTick().then(()=>{}).catch(()=>{}),this.intervalHandle=setInterval(async()=>{await this.onTick()},this.fetchInterval),this.intervalHandle.unref&&this.intervalHandle.unref())}}},7700(e,t,r){"use strict";r.r(t),r.d(t,{NIL:()=>P,parse:()=>y,stringify:()=>p,v1:()=>v,v3:()=>w,v4:()=>_,v5:()=>b,validate:()=>l,version:()=>T});var n=r(6982),o=r.n(n);const i=new Uint8Array(256);let s=i.length;function a(){return s>i.length-16&&(o().randomFillSync(i),s=0),i.slice(s,s+=16)}const c=/^(?:[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,l=function(e){return"string"==typeof e&&c.test(e)},u=[];for(let e=0;e<256;++e)u.push((e+256).toString(16).slice(1));function d(e,t=0){return u[e[t+0]]+u[e[t+1]]+u[e[t+2]]+u[e[t+3]]+"-"+u[e[t+4]]+u[e[t+5]]+"-"+u[e[t+6]]+u[e[t+7]]+"-"+u[e[t+8]]+u[e[t+9]]+"-"+u[e[t+10]]+u[e[t+11]]+u[e[t+12]]+u[e[t+13]]+u[e[t+14]]+u[e[t+15]]}const p=function(e,t=0){const r=d(e,t);if(!l(r))throw TypeError("Stringified UUID is invalid");return r};let h,f,g=0,m=0;const v=function(e,t,r){let n=t&&r||0;const o=t||new Array(16);let i=(e=e||{}).node||h,s=void 0!==e.clockseq?e.clockseq:f;if(null==i||null==s){const t=e.random||(e.rng||a)();null==i&&(i=h=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==s&&(s=f=16383&(t[6]<<8|t[7]))}let c=void 0!==e.msecs?e.msecs:Date.now(),l=void 0!==e.nsecs?e.nsecs:m+1;const u=c-g+(l-m)/1e4;if(u<0&&void 0===e.clockseq&&(s=s+1&16383),(u<0||c>g)&&void 0===e.nsecs&&(l=0),l>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");g=c,m=l,f=s,c+=122192928e5;const p=(1e4*(268435455&c)+l)%4294967296;o[n++]=p>>>24&255,o[n++]=p>>>16&255,o[n++]=p>>>8&255,o[n++]=255&p;const v=c/4294967296*1e4&268435455;o[n++]=v>>>8&255,o[n++]=255&v,o[n++]=v>>>24&15|16,o[n++]=v>>>16&255,o[n++]=s>>>8|128,o[n++]=255&s;for(let e=0;e<6;++e)o[n+e]=i[e];return t||d(o)},y=function(e){if(!l(e))throw TypeError("Invalid UUID");let t;const r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r};function S(e,t,r){function n(e,n,o,i){var s;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}(e)),"string"==typeof n&&(n=y(n)),16!==(null===(s=n)||void 0===s?void 0:s.length))throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let a=new Uint8Array(16+e.length);if(a.set(n),a.set(e,n.length),a=r(a),a[6]=15&a[6]|t,a[8]=63&a[8]|128,o){i=i||0;for(let e=0;e<16;++e)o[i+e]=a[e];return o}return d(a)}try{n.name=e}catch(e){}return n.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",n.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",n}const w=S("v3",48,function(e){return Array.isArray(e)?e=Buffer.from(e):"string"==typeof e&&(e=Buffer.from(e,"utf8")),o().createHash("md5").update(e).digest()}),E={randomUUID:o().randomUUID},_=function(e,t,r){if(E.randomUUID&&!t&&!e)return E.randomUUID();const n=(e=e||{}).random||(e.rng||a)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=n[e];return t}return d(n)},b=S("v5",80,function(e){return Array.isArray(e)?e=Buffer.from(e):"string"==typeof e&&(e=Buffer.from(e,"utf8")),o().createHash("sha1").update(e).digest()}),P="00000000-0000-0000-0000-000000000000",T=function(e){if(!l(e))throw TypeError("Invalid UUID");return parseInt(e.slice(14,15),16)}},3058(e,t){"use strict";var r,n,o;Object.defineProperty(t,"__esModule",{value:!0}),t.MeasurementEntries=t.DimensionEntries=t.ErrorType=t.ErrorCodes=t.EventName=void 0,(o=t.EventName||(t.EventName={})).ERROR="error",o.INFO="info",o.OPERATION_START="opStart",o.OPERATION_END="opEnd",o.OPERATION_STEP="opStep",(n=t.ErrorCodes||(t.ErrorCodes={})).NO_ERROR=0,n.GENERAL_ERROR=1,(r=t.ErrorType||(t.ErrorType={})).USER_ERROR="userError",r.SYSTEM_ERROR="systemError",t.DimensionEntries=["operationId","operationName","errorCode","errorType","message","stack","stepName"],t.MeasurementEntries=["duration"]},3130(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(s,a)}c((n=n.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0}),t.addReplacementRule=t.addContextProperty=t.dispose=t.createUuid=t.instrumentOperationStep=t.sendInfo=t.sendOperationError=t.sendError=t.sendOperationEnd=t.sendOperationStart=t.instrumentOperationAsVsCodeCommand=t.instrumentSimpleOperation=t.instrumentOperation=t.setErrorCode=t.setUserError=t.initialize=t.initializeFromJsonFile=void 0;const o=r(9896),i=r(8377),s=r(1398),a=r(8281),c=r(3058),l=r(6233);let u,d=!1;const p={},h=[],f=[c.EventName.ERROR,c.EventName.OPERATION_END,c.EventName.OPERATION_STEP];function g(e,t,r,n){if(u)throw new Error("TelemetryReporter already initialized.");if(r){const o=n&&n.firstParty;u=r instanceof Array?r.map(r=>new a.default(e,t,r,o)):[new a.default(e,t,r,o)]}l.Output.setExtensionId(e),d=!(!n||!n.debug)||"true"===process.env.DEBUG_TELEMETRY}function m(e,t,r){return(...o)=>n(this,void 0,void 0,function*(){let n;const i=E(),s=Date.now();try{return y(i,e),yield t.apply(r,[i,...o])}catch(t){n=t,w(i,e,n)}finally{const t=Date.now()-s;S(i,e,t,n)}})}function v(e,t,r){return m(e,(e,...o)=>n(this,void 0,void 0,function*(){return yield t.apply(r,o)}),r)}function y(e,t){b({eventName:c.EventName.OPERATION_START,operationId:e,operationName:t})}function S(e,t,r,n){b(Object.assign({eventName:c.EventName.OPERATION_END,operationId:e,operationName:t,duration:r},_(n)))}function w(e,t,r){b(Object.assign({eventName:c.EventName.ERROR,operationId:e,operationName:t},_(r)))}function E(){return i.v4()}function _(e){if(!e)return{errorCode:c.ErrorCodes.NO_ERROR};const t=e;return{errorCode:t.errorCode||c.ErrorCodes.GENERAL_ERROR,errorType:t.isUserError?c.ErrorType.USER_ERROR:c.ErrorType.SYSTEM_ERROR,message:e.message,stack:e.stack}}function b(e){if(!u)return void console.warn("TelemetryReporter not initialized.");const t={};for(const r of c.DimensionEntries){const n=e[r];void 0!==n&&(t[r]=String(n))}const r={};for(const t of c.MeasurementEntries){const n=e[t];void 0!==n&&(r[t]=n)}P(e.eventName,t,r)}function P(e,t,r){if(u){t=null!=t?t:{};for(const e of Object.keys(t))t[e]=T(h,t[e]);t=Object.assign(Object.assign({},p),t),e in f?u.forEach(n=>{n.sendTelemetryErrorEvent(e,t,r)}):u.forEach(n=>{n.sendTelemetryEvent(e,t,r)}),d&&(l.Output.getInstance().appendLine(`>> ${(new Date).toISOString()}`),l.Output.getInstance().appendLine(JSON.stringify({eventName:e,dimensions:t,measurements:r},null,2)))}else console.warn("TelemetryReporter not initialized.")}function T(e,t){for(const r of e)t=t.replace(r.pattern,r.replace);return t}t.initializeFromJsonFile=function(e,t){return n(this,void 0,void 0,function*(){try{yield o.promises.access(e);const{publisher:r,name:n,version:i,aiKey:s}=JSON.parse(o.readFileSync(e,"utf-8"));g(`${r}.${n}`,i,s,t)}catch(t){throw new Error(`The JSON file '${e}' does not exist.`)}})},t.initialize=g,t.setUserError=function(e){e.isUserError=!0},t.setErrorCode=function(e,t){e.errorCode=t},t.instrumentOperation=m,t.instrumentSimpleOperation=v,t.instrumentOperationAsVsCodeCommand=function(e,t,r){return s.commands.registerCommand(e,v(e,t,r))},t.sendOperationStart=y,t.sendOperationEnd=S,t.sendError=function(e){b(Object.assign({eventName:c.EventName.ERROR},_(e)))},t.sendOperationError=w,t.sendInfo=function(e,t,r){if(!u)return void console.warn("TelemetryReporter not initialized.");let n,o;if(r)n=t,o=r;else{n={},o={};for(const e in t)"string"==typeof t[e]?n[e]=t[e]:"number"==typeof t[e]&&(o[e]=t[e])}P(c.EventName.INFO,Object.assign(Object.assign({},n),{operationId:e}),o)},t.instrumentOperationStep=function(e,t,r){return(...o)=>n(this,void 0,void 0,function*(){let n;const i=Date.now();try{return yield r(...o)}catch(e){throw n=e,e}finally{b(Object.assign({eventName:c.EventName.OPERATION_STEP,operationId:e,stepName:t,duration:Date.now()-i},_(n)))}})},t.createUuid=E,t.dispose=function(){return n(this,void 0,void 0,function*(){if(u)return yield Promise.all(u.map(e=>e.dispose()))})},t.addContextProperty=function(e,t){p[e]=t},t.addReplacementRule=function(e,t){h.push({pattern:e,replace:null!=t?t:""})}},6233(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Output=void 0;const n=r(1398);class o{constructor(){}static getInstance(){return this.INSTANCE||(this.INSTANCE=n.window.createOutputChannel(`Telemetry Wrapper (${o.extensionId})`)),this.INSTANCE}static setExtensionId(e){o.extensionId=e}}t.Output=o},8281(e,t,r){var n,o=Object.create,i=Object.defineProperty,s=Object.defineProperties,a=Object.getOwnPropertyDescriptor,c=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertyNames,u=Object.getOwnPropertySymbols,d=Object.getPrototypeOf,p=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable,f=(e,t,r)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,g=(e,t)=>{for(var r in t||(t={}))p.call(t,r)&&f(e,r,t[r]);if(u)for(var r of u(t))h.call(t,r)&&f(e,r,t[r]);return e},m=(e,t)=>s(e,c(t)),v=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),y=(e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of l(t))!p.call(e,o)&&o!==r&&i(e,o,{get:()=>t[o],enumerable:!(n=a(t,o))||n.enumerable});return e},S=(e,t,r)=>(r=null!=e?o(d(e)):{},y(!t&&e&&e.__esModule?r:i(r,"default",{value:e,enumerable:!0}),e)),w=v((e,t)=>{"use strict";var r=function(){function e(){}return e.info=function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];e.enableDebug&&console.info(e.TAG+t,r)},e.warn=function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];e.disableWarnings||console.warn(e.TAG+t,r)},e.enableDebug=!1,e.disableWarnings=!1,e.disableErrors=!1,e.TAG="ApplicationInsights:",e}();t.exports=r}),E=v(e=>{"use strict";var t=e&&e.__assign||function(){return t=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},t.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.AsyncScopeManager=e.OpenTelemetryScopeManagerWrapper=void 0;var n=vn(),o=r(4434),i=function(){function e(){}return e.prototype.active=function(){var e=this,r=n.CorrelationContextManager.getCurrentContext();return t(t({},r),{getValue:function(t){return e._activeSymbol?t===e._activeSymbol&&r:(e._activeSymbol=t,r)},setValue:function(){}})},e.prototype.with=function(t,r){var o=t.parentSpanId,i=t.name,s=e._spanToContext(t,o,i);return n.CorrelationContextManager.runWithContext(s,r)()},e.prototype.bind=function(e){return"function"==typeof e?n.CorrelationContextManager.wrapCallback(e):(e instanceof o.EventEmitter&&n.CorrelationContextManager.wrapEmitter(e),e)},e.prototype.enable=function(){return n.CorrelationContextManager.enable(),this},e.prototype.disable=function(){return n.CorrelationContextManager.disable(),this},e._spanToContext=function(e,r,o){var i=r?"|"+e.spanContext().traceId+"."+r+".":e.spanContext().traceId,s=t(t({},e.spanContext()),{traceFlags:e.spanContext().traceFlags});return n.CorrelationContextManager.spanToContextObject(s,i,o)},e}();e.OpenTelemetryScopeManagerWrapper=i,e.AsyncScopeManager=new i}),_=v((e,t)=>{var r;e=t.exports=G,r="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},e.SEMVER_SPEC_VERSION="2.0.0";var n=256,o=Number.MAX_SAFE_INTEGER||9007199254740991,i=e.re=[],s=e.src=[],a=0,c=a++;s[c]="0|[1-9]\\d*";var l=a++;s[l]="[0-9]+";var u=a++;s[u]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var d=a++;s[d]="("+s[c]+")\\.("+s[c]+")\\.("+s[c]+")";var p=a++;s[p]="("+s[l]+")\\.("+s[l]+")\\.("+s[l]+")";var h=a++;s[h]="(?:"+s[c]+"|"+s[u]+")";var f=a++;s[f]="(?:"+s[l]+"|"+s[u]+")";var g=a++;s[g]="(?:-("+s[h]+"(?:\\."+s[h]+")*))";var m=a++;s[m]="(?:-?("+s[f]+"(?:\\."+s[f]+")*))";var v=a++;s[v]="[0-9A-Za-z-]+";var y=a++;s[y]="(?:\\+("+s[v]+"(?:\\."+s[v]+")*))";var S=a++,w="v?"+s[d]+s[g]+"?"+s[y]+"?";s[S]="^"+w+"$";var E="[v=\\s]*"+s[p]+s[m]+"?"+s[y]+"?",_=a++;s[_]="^"+E+"$";var b=a++;s[b]="((?:<|>)?=?)";var P=a++;s[P]=s[l]+"|x|X|\\*";var T=a++;s[T]=s[c]+"|x|X|\\*";var C=a++;s[C]="[v=\\s]*("+s[T]+")(?:\\.("+s[T]+")(?:\\.("+s[T]+")(?:"+s[g]+")?"+s[y]+"?)?)?";var I=a++;s[I]="[v=\\s]*("+s[P]+")(?:\\.("+s[P]+")(?:\\.("+s[P]+")(?:"+s[m]+")?"+s[y]+"?)?)?";var O=a++;s[O]="^"+s[b]+"\\s*"+s[C]+"$";var N=a++;s[N]="^"+s[b]+"\\s*"+s[I]+"$";var R=a++;s[R]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var A=a++;s[A]="(?:~>?)";var D=a++;s[D]="(\\s*)"+s[A]+"\\s+",i[D]=new RegExp(s[D],"g");var x=a++;s[x]="^"+s[A]+s[C]+"$";var k=a++;s[k]="^"+s[A]+s[I]+"$";var j=a++;s[j]="(?:\\^)";var M=a++;s[M]="(\\s*)"+s[j]+"\\s+",i[M]=new RegExp(s[M],"g");var L=a++;s[L]="^"+s[j]+s[C]+"$";var F=a++;s[F]="^"+s[j]+s[I]+"$";var U=a++;s[U]="^"+s[b]+"\\s*("+E+")$|^$";var $=a++;s[$]="^"+s[b]+"\\s*("+w+")$|^$";var B=a++;s[B]="(\\s*)"+s[b]+"\\s*("+E+"|"+s[C]+")",i[B]=new RegExp(s[B],"g");var V=a++;s[V]="^\\s*("+s[C]+")\\s+-\\s+("+s[C]+")\\s*$";var H=a++;s[H]="^\\s*("+s[I]+")\\s+-\\s+("+s[I]+")\\s*$";var q,z=a++;for(s[z]="(<|>)?=?\\s*\\*",q=0;q<35;q++)r(q,s[q]),i[q]||(i[q]=new RegExp(s[q]));function W(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof G)return e;if("string"!=typeof e||e.length>n)return null;if(!(t.loose?i[_]:i[S]).test(e))return null;try{return new G(e,t)}catch{return null}}function G(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof G){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>n)throw new TypeError("version is longer than "+n+" characters");if(!(this instanceof G))return new G(e,t);r("SemVer",e,t),this.options=t,this.loose=!!t.loose;var s=e.trim().match(t.loose?i[_]:i[S]);if(!s)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>o||this.major<0)throw new TypeError("Invalid major version");if(this.minor>o||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>o||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t<o)return t}return e}):this.prerelease=[],this.build=s[5]?s[5].split("."):[],this.format()}e.parse=W,e.valid=function(e,t){var r=W(e,t);return r?r.version:null},e.clean=function(e,t){var r=W(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null},e.SemVer=G,G.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},G.prototype.toString=function(){return this.version},G.prototype.compare=function(e){return r("SemVer.compare",this.version,this.options,e),e instanceof G||(e=new G(e,this.options)),this.compareMain(e)||this.comparePre(e)},G.prototype.compareMain=function(e){return e instanceof G||(e=new G(e,this.options)),X(this.major,e.major)||X(this.minor,e.minor)||X(this.patch,e.patch)},G.prototype.comparePre=function(e){if(e instanceof G||(e=new G(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;var t=0;do{var n=this.prerelease[t],o=e.prerelease[t];if(r("prerelease compare",t,n,o),void 0===n&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===n)return-1;if(n!==o)return X(n,o)}while(++t)},G.prototype.inc=function(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":(0!==this.minor||0!==this.patch||0===this.prerelease.length)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(0!==this.patch||0===this.prerelease.length)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var r=this.prerelease.length;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);-1===r&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},e.inc=function(e,t,r,n){"string"==typeof r&&(n=r,r=void 0);try{return new G(e,r).inc(t,n).version}catch{return null}},e.diff=function(e,t){if(Z(e,t))return null;var r=W(e),n=W(t),o="";if(r.prerelease.length||n.prerelease.length){o="pre";var i="prerelease"}for(var s in r)if(("major"===s||"minor"===s||"patch"===s)&&r[s]!==n[s])return o+s;return i},e.compareIdentifiers=X;var K=/^[0-9]+$/;function X(e,t){var r=K.test(e),n=K.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:e<t?-1:1}function J(e,t,r){return new G(e,r).compare(new G(t,r))}function Q(e,t,r){return J(e,t,r)>0}function Y(e,t,r){return J(e,t,r)<0}function Z(e,t,r){return 0===J(e,t,r)}function ee(e,t,r){return 0!==J(e,t,r)}function te(e,t,r){return J(e,t,r)>=0}function re(e,t,r){return J(e,t,r)<=0}function ne(e,t,r,n){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return Z(e,r,n);case"!=":return ee(e,r,n);case">":return Q(e,r,n);case">=":return te(e,r,n);case"<":return Y(e,r,n);case"<=":return re(e,r,n);default:throw new TypeError("Invalid operator: "+t)}}function oe(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof oe){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof oe))return new oe(e,t);r("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===ie?this.value="":this.value=this.operator+this.semver.version,r("comp",this)}e.rcompareIdentifiers=function(e,t){return X(t,e)},e.major=function(e,t){return new G(e,t).major},e.minor=function(e,t){return new G(e,t).minor},e.patch=function(e,t){return new G(e,t).patch},e.compare=J,e.compareLoose=function(e,t){return J(e,t,!0)},e.rcompare=function(e,t,r){return J(t,e,r)},e.sort=function(t,r){return t.sort(function(t,n){return e.compare(t,n,r)})},e.rsort=function(t,r){return t.sort(function(t,n){return e.rcompare(t,n,r)})},e.gt=Q,e.lt=Y,e.eq=Z,e.neq=ee,e.gte=te,e.lte=re,e.cmp=ne,e.Comparator=oe;var ie={};function se(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof se)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new se(e.raw,t);if(e instanceof oe)return new se(e.value,t);if(!(this instanceof se))return new se(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(function(e){return this.parseRange(e.trim())},this).filter(function(e){return e.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function ae(e){return!e||"x"===e.toLowerCase()||"*"===e}function ce(e,t,r,n,o,i,s,a,c,l,u,d,p){return((t=ae(r)?"":ae(n)?">="+r+".0.0":ae(o)?">="+r+"."+n+".0":">="+t)+" "+(a=ae(c)?"":ae(l)?"<"+(+c+1)+".0.0":ae(u)?"<"+c+"."+(+l+1)+".0":d?"<="+c+"."+l+"."+u+"-"+d:"<="+a)).trim()}function le(e,t,n){for(var o=0;o<e.length;o++)if(!e[o].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(o=0;o<e.length;o++)if(r(e[o].semver),e[o].semver!==ie&&e[o].semver.prerelease.length>0){var i=e[o].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}return!1}return!0}function ue(e,t,r){try{t=new se(t,r)}catch{return!1}return t.test(e)}function de(e,t,r,n){var o,i,s,a,c;switch(e=new G(e,n),t=new se(t,n),r){case">":o=Q,i=re,s=Y,a=">",c=">=";break;case"<":o=Y,i=te,s=Q,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(ue(e,t,n))return!1;for(var l=0;l<t.set.length;++l){var u=t.set[l],d=null,p=null;if(u.forEach(function(e){e.semver===ie&&(e=new oe(">=0.0.0")),d=d||e,p=p||e,o(e.semver,d.semver,n)?d=e:s(e.semver,p.semver,n)&&(p=e)}),d.operator===a||d.operator===c||(!p.operator||p.operator===a)&&i(e,p.semver))return!1;if(p.operator===c&&s(e,p.semver))return!1}return!0}oe.prototype.parse=function(e){var t=this.options.loose?i[U]:i[$],r=e.match(t);if(!r)throw new TypeError("Invalid comparator: "+e);this.operator=r[1],"="===this.operator&&(this.operator=""),r[2]?this.semver=new G(r[2],this.options.loose):this.semver=ie},oe.prototype.toString=function(){return this.value},oe.prototype.test=function(e){return r("Comparator.test",e,this.options.loose),this.semver===ie||("string"==typeof e&&(e=new G(e,this.options)),ne(e,this.operator,this.semver,this.options))},oe.prototype.intersects=function(e,t){if(!(e instanceof oe))throw new TypeError("a Comparator is required");var r;if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),""===this.operator)return r=new se(e.value,t),ue(this.value,r,t);if(""===e.operator)return r=new se(this.value,t),ue(e.semver,r,t);var n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),o=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),i=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=ne(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=ne(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||o||i&&s||a||c},e.Range=se,se.prototype.format=function(){return this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim(),this.range},se.prototype.toString=function(){return this.range},se.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var n=t?i[H]:i[V];e=e.replace(n,ce),r("hyphen replace",e),e=e.replace(i[B],"$1$2$3"),r("comparator trim",e,i[B]),e=(e=(e=e.replace(i[D],"$1~")).replace(i[M],"$1^")).split(/\s+/).join(" ");var o=t?i[U]:i[$],s=e.split(" ").map(function(e){return function(e,t){return r("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map(function(e){return function(e,t){r("caret",e,t);var n=t.loose?i[F]:i[L];return e.replace(n,function(t,n,o,i,s){var a;return r("caret",e,t,n,o,i,s),ae(n)?a="":ae(o)?a=">="+n+".0.0 <"+(+n+1)+".0.0":ae(i)?a="0"===n?">="+n+"."+o+".0 <"+n+"."+(+o+1)+".0":">="+n+"."+o+".0 <"+(+n+1)+".0.0":s?(r("replaceCaret pr",s),a="0"===n?"0"===o?">="+n+"."+o+"."+i+"-"+s+" <"+n+"."+o+"."+(+i+1):">="+n+"."+o+"."+i+"-"+s+" <"+n+"."+(+o+1)+".0":">="+n+"."+o+"."+i+"-"+s+" <"+(+n+1)+".0.0"):(r("no pr"),a="0"===n?"0"===o?">="+n+"."+o+"."+i+" <"+n+"."+o+"."+(+i+1):">="+n+"."+o+"."+i+" <"+n+"."+(+o+1)+".0":">="+n+"."+o+"."+i+" <"+(+n+1)+".0.0"),r("caret return",a),a})}(e,t)}).join(" ")}(e,t),r("caret",e),e=function(e,t){return e.trim().split(/\s+/).map(function(e){return function(e,t){var n=t.loose?i[k]:i[x];return e.replace(n,function(t,n,o,i,s){var a;return r("tilde",e,t,n,o,i,s),ae(n)?a="":ae(o)?a=">="+n+".0.0 <"+(+n+1)+".0.0":ae(i)?a=">="+n+"."+o+".0 <"+n+"."+(+o+1)+".0":s?(r("replaceTilde pr",s),a=">="+n+"."+o+"."+i+"-"+s+" <"+n+"."+(+o+1)+".0"):a=">="+n+"."+o+"."+i+" <"+n+"."+(+o+1)+".0",r("tilde return",a),a})}(e,t)}).join(" ")}(e,t),r("tildes",e),e=function(e,t){return r("replaceXRanges",e,t),e.split(/\s+/).map(function(e){return function(e,t){e=e.trim();var n=t.loose?i[N]:i[O];return e.replace(n,function(t,n,o,i,s,a){r("xRange",e,t,n,o,i,s,a);var c=ae(o),l=c||ae(i),u=l||ae(s);return"="===n&&u&&(n=""),c?t=">"===n||"<"===n?"<0.0.0":"*":n&&u?(l&&(i=0),s=0,">"===n?(n=">=",l?(o=+o+1,i=0,s=0):(i=+i+1,s=0)):"<="===n&&(n="<",l?o=+o+1:i=+i+1),t=n+o+"."+i+"."+s):l?t=">="+o+".0.0 <"+(+o+1)+".0.0":u&&(t=">="+o+"."+i+".0 <"+o+"."+(+i+1)+".0"),r("xRange return",t),t})}(e,t)}).join(" ")}(e,t),r("xrange",e),e=function(e,t){return r("replaceStars",e,t),e.trim().replace(i[z],"")}(e,t),r("stars",e),e}(e,this.options)},this).join(" ").split(/\s+/);return this.options.loose&&(s=s.filter(function(e){return!!e.match(o)})),s.map(function(e){return new oe(e,this.options)},this)},se.prototype.intersects=function(e,t){if(!(e instanceof se))throw new TypeError("a Range is required");return this.set.some(function(r){return r.every(function(r){return e.set.some(function(e){return e.every(function(e){return r.intersects(e,t)})})})})},e.toComparators=function(e,t){return new se(e,t).set.map(function(e){return e.map(function(e){return e.value}).join(" ").trim().split(" ")})},se.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new G(e,this.options));for(var t=0;t<this.set.length;t++)if(le(this.set[t],e,this.options))return!0;return!1},e.satisfies=ue,e.maxSatisfying=function(e,t,r){var n=null,o=null;try{var i=new se(t,r)}catch{return null}return e.forEach(function(e){i.test(e)&&(!n||-1===o.compare(e))&&(o=new G(n=e,r))}),n},e.minSatisfying=function(e,t,r){var n=null,o=null;try{var i=new se(t,r)}catch{return null}return e.forEach(function(e){i.test(e)&&(!n||1===o.compare(e))&&(o=new G(n=e,r))}),n},e.minVersion=function(e,t){e=new se(e,t);var r=new G("0.0.0");if(e.test(r)||(r=new G("0.0.0-0"),e.test(r)))return r;r=null;for(var n=0;n<e.set.length;++n)e.set[n].forEach(function(e){var t=new G(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":(!r||Q(r,t))&&(r=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}});return r&&e.test(r)?r:null},e.validRange=function(e,t){try{return new se(e,t).range||"*"}catch{return null}},e.ltr=function(e,t,r){return de(e,t,"<",r)},e.gtr=function(e,t,r){return de(e,t,">",r)},e.outside=de,e.prerelease=function(e,t){var r=W(e,t);return r&&r.prerelease.length?r.prerelease:null},e.intersects=function(e,t,r){return e=new se(e,r),t=new se(t,r),e.intersects(t)},e.coerce=function(e){if(e instanceof G)return e;if("string"!=typeof e)return null;var t=e.match(i[R]);return null==t?null:W(t[1]+"."+(t[2]||"0")+"."+(t[3]||"0"))}}),b=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.makePatchingRequire=void 0;var t=r(6928),n=_(),o=r(3339),i=Object.keys(process.binding("natives")),s=o.prototype.require;e.makePatchingRequire=function(e){var r={};return function(a){var c=s.apply(this,arguments);if(e[a]){var l=o._resolveFilename(a,this);if(r.hasOwnProperty(l))return r[l];var u=void 0;if(i.indexOf(a)<0)try{u=s.call(this,t.join(a,"package.json")).version}catch{return c}else u=process.version.substring(1);var d=u.indexOf("-");d>=0&&(u=u.substring(0,d));for(var p=c,h=0,f=e[a];h<f.length;h++){var g=f[h];n.satisfies(u,g.versionSpecifier)&&(p=g.patch(p,l))}return r[l]=p}return c}}}),P=v((e,t)=>{t.exports={name:"diagnostic-channel",version:"1.0.0",main:"./dist/src/channel.js",types:"./dist/src/channel.d.ts",scripts:{build:"tsc",lint:"tslint -c tslint.json -p tsconfig.json",clean:"rimraf ./dist",test:"mocha ./dist/tests/**/*.js"},homepage:"https://github.com/Microsoft/node-diagnostic-channel",bugs:{url:"https://github.com/Microsoft/node-diagnostic-channel/issues"},repository:{type:"git",url:"https://github.com/Microsoft/node-diagnostic-channel.git"},description:"Provides a context-saving pub/sub channel to connect diagnostic event publishers and subscribers",dependencies:{semver:"^5.3.0"},devDependencies:{"@types/mocha":"^2.2.40","@types/node":"~8.0.0",mocha:"^3.2.0",rimraf:"^2.6.1",tslint:"^5.0.0",typescript:"4.1.2"},files:["dist/src/**/*.d.ts","dist/src/**/*.js","LICENSE","README.md","package.json"],license:"MIT"}}),T=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.channel=e.makePatchingRequire=void 0;var t=b(),n=b();Object.defineProperty(e,"makePatchingRequire",{enumerable:!0,get:function(){return n.makePatchingRequire}});var o=function(e){return!0},i=function(){function e(){this.version=P().version,this.subscribers={},this.contextPreservationFunction=function(e){return e},this.knownPatches={},this.currentlyPublishing=!1}return e.prototype.shouldPublish=function(e){var t=this.subscribers[e];return!!t&&t.some(function(e){var t=e.filter;return!t||t(!1)})},e.prototype.publish=function(e,t){if(!this.currentlyPublishing){var r=this.subscribers[e];if(r){var n={timestamp:Date.now(),data:t};this.currentlyPublishing=!0,r.forEach(function(e){var t=e.listener,r=e.filter;try{r&&r(!0)&&t(n)}catch{}}),this.currentlyPublishing=!1}}},e.prototype.subscribe=function(e,t,r){void 0===r&&(r=o),this.subscribers[e]||(this.subscribers[e]=[]),this.subscribers[e].push({listener:t,filter:r})},e.prototype.unsubscribe=function(e,t,r){void 0===r&&(r=o);var n=this.subscribers[e];if(n)for(var i=0;i<n.length;++i)if(n[i].listener===t&&n[i].filter===r)return n.splice(i,1),!0;return!1},e.prototype.reset=function(){var e=this;this.subscribers={},this.contextPreservationFunction=function(e){return e},Object.getOwnPropertyNames(this.knownPatches).forEach(function(t){return delete e.knownPatches[t]})},e.prototype.bindToContext=function(e){return this.contextPreservationFunction(e)},e.prototype.addContextPreservation=function(e){var t=this.contextPreservationFunction;this.contextPreservationFunction=function(r){return e(t(r))}},e.prototype.registerMonkeyPatch=function(e,t){this.knownPatches[e]||(this.knownPatches[e]=[]),this.knownPatches[e].push(t)},e.prototype.getPatchesObject=function(){return this.knownPatches},e}();global.diagnosticsSource||(global.diagnosticsSource=new i,r(3339).prototype.require=t.makePatchingRequire(global.diagnosticsSource.getPatchesObject())),e.channel=global.diagnosticsSource}),C=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),I=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e._globalThis=void 0,e._globalThis="object"==typeof globalThis?globalThis:global}),O=v(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__exportStar||function(e,r){for(var n in e)"default"!==n&&!Object.prototype.hasOwnProperty.call(r,n)&&t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(I(),e)}),N=v(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__exportStar||function(e,r){for(var n in e)"default"!==n&&!Object.prototype.hasOwnProperty.call(r,n)&&t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(O(),e)}),R=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VERSION=void 0,e.VERSION="1.0.3"}),A=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isCompatible=e._makeCompatibilityCheck=void 0;var t=R(),r=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function n(e){var t=new Set([e]),n=new Set,o=e.match(r);if(!o)return function(){return!1};var i=+o[1],s=+o[2],a=+o[3];if(null!=o[4])return function(t){return t===e};function c(e){return n.add(e),!1}function l(e){return t.add(e),!0}return function(e){if(t.has(e))return!0;if(n.has(e))return!1;var o=e.match(r);if(!o)return c(e);var u=+o[1],d=+o[2],p=+o[3];return null!=o[4]||i!==u?c(e):0===i?s===d&&a<=p?l(e):c(e):s<=d?l(e):c(e)}}e._makeCompatibilityCheck=n,e.isCompatible=n(t.VERSION)}),D=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.unregisterGlobal=e.getGlobal=e.registerGlobal=void 0;var t=N(),r=R(),n=A(),o=r.VERSION.split(".")[0],i=Symbol.for("opentelemetry.js.api."+o),s=t._globalThis;e.registerGlobal=function(e,t,n,o){var a;void 0===o&&(o=!1);var c=s[i]=null!==(a=s[i])&&void 0!==a?a:{version:r.VERSION};if(!o&&c[e]){var l=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+e);return n.error(l.stack||l.message),!1}return c.version!==r.VERSION?(l=new Error("@opentelemetry/api: All API registration versions must match"),n.error(l.stack||l.message),!1):(c[e]=t,n.debug("@opentelemetry/api: Registered a global for "+e+" v"+r.VERSION+"."),!0)},e.getGlobal=function(e){var t,r,o=null===(t=s[i])||void 0===t?void 0:t.version;if(o&&n.isCompatible(o))return null===(r=s[i])||void 0===r?void 0:r[e]},e.unregisterGlobal=function(e,t){t.debug("@opentelemetry/api: Unregistering a global for "+e+" v"+r.VERSION+".");var n=s[i];n&&delete n[e]}}),x=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiagComponentLogger=void 0;var t=D(),r=function(){function e(e){this._namespace=e.namespace||"DiagComponentLogger"}return e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n("debug",this._namespace,e)},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n("error",this._namespace,e)},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n("info",this._namespace,e)},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n("warn",this._namespace,e)},e.prototype.verbose=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n("verbose",this._namespace,e)},e}();function n(e,r,n){var o=t.getGlobal("diag");if(o)return n.unshift(r),o[e].apply(o,n)}e.DiagComponentLogger=r}),k=v(e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.DiagLogLevel=void 0,(t=e.DiagLogLevel||(e.DiagLogLevel={}))[t.NONE=0]="NONE",t[t.ERROR=30]="ERROR",t[t.WARN=50]="WARN",t[t.INFO=60]="INFO",t[t.DEBUG=70]="DEBUG",t[t.VERBOSE=80]="VERBOSE",t[t.ALL=9999]="ALL"}),j=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createLogLevelDiagLogger=void 0;var t=k();e.createLogLevelDiagLogger=function(e,r){function n(t,n){var o=r[t];return"function"==typeof o&&e>=n?o.bind(r):function(){}}return e<t.DiagLogLevel.NONE?e=t.DiagLogLevel.NONE:e>t.DiagLogLevel.ALL&&(e=t.DiagLogLevel.ALL),r=r||{},{error:n("error",t.DiagLogLevel.ERROR),warn:n("warn",t.DiagLogLevel.WARN),info:n("info",t.DiagLogLevel.INFO),debug:n("debug",t.DiagLogLevel.DEBUG),verbose:n("verbose",t.DiagLogLevel.VERBOSE)}}}),M=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiagAPI=void 0;var t=x(),r=j(),n=k(),o=D(),i=function(){function e(){function e(e){return function(){var t=o.getGlobal("diag");if(t)return t[e].apply(t,arguments)}}var i=this;i.setLogger=function(e,t){var s,a;if(void 0===t&&(t=n.DiagLogLevel.INFO),e===i){var c=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return i.error(null!==(s=c.stack)&&void 0!==s?s:c.message),!1}var l=o.getGlobal("diag"),u=r.createLogLevelDiagLogger(t,e);if(l){var d=null!==(a=(new Error).stack)&&void 0!==a?a:"<failed to generate stacktrace>";l.warn("Current logger will be overwritten from "+d),u.warn("Current logger will overwrite one already registered from "+d)}return o.registerGlobal("diag",u,i,!0)},i.disable=function(){o.unregisterGlobal("diag",i)},i.createComponentLogger=function(e){return new t.DiagComponentLogger(e)},i.verbose=e("verbose"),i.debug=e("debug"),i.info=e("info"),i.warn=e("warn"),i.error=e("error")}return e.instance=function(){return this._instance||(this._instance=new e),this._instance},e}();e.DiagAPI=i}),L=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaggageImpl=void 0;var t=function(){function e(e){this._entries=e?new Map(e):new Map}return e.prototype.getEntry=function(e){var t=this._entries.get(e);if(t)return Object.assign({},t)},e.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(e){return[e[0],e[1]]})},e.prototype.setEntry=function(t,r){var n=new e(this._entries);return n._entries.set(t,r),n},e.prototype.removeEntry=function(t){var r=new e(this._entries);return r._entries.delete(t),r},e.prototype.removeEntries=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];for(var n=new e(this._entries),o=0,i=t;o<i.length;o++){var s=i[o];n._entries.delete(s)}return n},e.prototype.clear=function(){return new e},e}();e.BaggageImpl=t}),F=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.baggageEntryMetadataSymbol=void 0,e.baggageEntryMetadataSymbol=Symbol("BaggageEntryMetadata")}),U=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.baggageEntryMetadataFromString=e.createBaggage=void 0;var t=M(),r=L(),n=F(),o=t.DiagAPI.instance();e.createBaggage=function(e){return void 0===e&&(e={}),new r.BaggageImpl(new Map(Object.entries(e)))},e.baggageEntryMetadataFromString=function(e){return"string"!=typeof e&&(o.error("Cannot create baggage metadata from unknown type: "+typeof e),e=""),{__TYPE__:n.baggageEntryMetadataSymbol,toString:function(){return e}}}}),$=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),B=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),V=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiagConsoleLogger=void 0;var t=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}];e.DiagConsoleLogger=function(){function e(e){return function(){var t=arguments;if(console){var r=console[e];if("function"!=typeof r&&(r=console.log),"function"==typeof r)return r.apply(console,t)}}}for(var r=0;r<t.length;r++)this[t[r].n]=e(t[r].c)}}),H=v(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__exportStar||function(e,r){for(var n in e)"default"!==n&&!Object.prototype.hasOwnProperty.call(r,n)&&t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(V(),e),r(k(),e)}),q=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultTextMapSetter=e.defaultTextMapGetter=void 0,e.defaultTextMapGetter={get:function(e,t){if(null!=e)return e[t]},keys:function(e){return null==e?[]:Object.keys(e)}},e.defaultTextMapSetter={set:function(e,t,r){null!=e&&(e[t]=r)}}}),z=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),W=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),G=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ROOT_CONTEXT=e.createContextKey=void 0,e.createContextKey=function(e){return Symbol.for(e)};e.ROOT_CONTEXT=new function e(t){var r=this;r._currentContext=t?new Map(t):new Map,r.getValue=function(e){return r._currentContext.get(e)},r.setValue=function(t,n){var o=new e(r._currentContext);return o._currentContext.set(t,n),o},r.deleteValue=function(t){var n=new e(r._currentContext);return n._currentContext.delete(t),n}}}),K=v(e=>{"use strict";var t=e&&e.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(e,"__esModule",{value:!0}),e.NoopContextManager=void 0;var r=G(),n=function(){function e(){}return e.prototype.active=function(){return r.ROOT_CONTEXT},e.prototype.with=function(e,r,n){for(var o=[],i=3;i<arguments.length;i++)o[i-3]=arguments[i];return r.call.apply(r,t([n],o))},e.prototype.bind=function(e,t){return t},e.prototype.enable=function(){return this},e.prototype.disable=function(){return this},e}();e.NoopContextManager=n}),X=v(e=>{"use strict";var t=e&&e.__spreadArray||function(e,t){for(var r=0,n=t.length,o=e.length;r<n;r++,o++)e[o]=t[r];return e};Object.defineProperty(e,"__esModule",{value:!0}),e.ContextAPI=void 0;var r=K(),n=D(),o=M(),i="context",s=new r.NoopContextManager,a=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalContextManager=function(e){return n.registerGlobal(i,e,o.DiagAPI.instance())},e.prototype.active=function(){return this._getContextManager().active()},e.prototype.with=function(e,r,n){for(var o,i=[],s=3;s<arguments.length;s++)i[s-3]=arguments[s];return(o=this._getContextManager()).with.apply(o,t([e,r,n],i))},e.prototype.bind=function(e,t){return this._getContextManager().bind(e,t)},e.prototype._getContextManager=function(){return n.getGlobal(i)||s},e.prototype.disable=function(){this._getContextManager().disable(),n.unregisterGlobal(i,o.DiagAPI.instance())},e}();e.ContextAPI=a}),J=v(e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.TraceFlags=void 0,(t=e.TraceFlags||(e.TraceFlags={}))[t.NONE=0]="NONE",t[t.SAMPLED=1]="SAMPLED"}),Q=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INVALID_SPAN_CONTEXT=e.INVALID_TRACEID=e.INVALID_SPANID=void 0;var t=J();e.INVALID_SPANID="0000000000000000",e.INVALID_TRACEID="00000000000000000000000000000000",e.INVALID_SPAN_CONTEXT={traceId:e.INVALID_TRACEID,spanId:e.INVALID_SPANID,traceFlags:t.TraceFlags.NONE}}),Y=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NonRecordingSpan=void 0;var t=Q(),r=function(){function e(e){void 0===e&&(e=t.INVALID_SPAN_CONTEXT),this._spanContext=e}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(e,t){return this},e.prototype.setAttributes=function(e){return this},e.prototype.addEvent=function(e,t){return this},e.prototype.setStatus=function(e){return this},e.prototype.updateName=function(e){return this},e.prototype.end=function(e){},e.prototype.isRecording=function(){return!1},e.prototype.recordException=function(e,t){},e}();e.NonRecordingSpan=r}),Z=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSpanContext=e.setSpanContext=e.deleteSpan=e.setSpan=e.getSpan=void 0;var t=G(),r=Y(),n=t.createContextKey("OpenTelemetry Context Key SPAN");function o(e){return e.getValue(n)||void 0}function i(e,t){return e.setValue(n,t)}e.getSpan=o,e.setSpan=i,e.deleteSpan=function(e){return e.deleteValue(n)},e.setSpanContext=function(e,t){return i(e,new r.NonRecordingSpan(t))},e.getSpanContext=function(e){var t;return null===(t=o(e))||void 0===t?void 0:t.spanContext()}}),ee=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.wrapSpanContext=e.isSpanContextValid=e.isValidSpanId=e.isValidTraceId=void 0;var t=Q(),r=Y(),n=/^([0-9a-f]{32})$/i,o=/^[0-9a-f]{16}$/i;function i(e){return n.test(e)&&e!==t.INVALID_TRACEID}function s(e){return o.test(e)&&e!==t.INVALID_SPANID}e.isValidTraceId=i,e.isValidSpanId=s,e.isSpanContextValid=function(e){return i(e.traceId)&&s(e.spanId)},e.wrapSpanContext=function(e){return new r.NonRecordingSpan(e)}}),te=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NoopTracer=void 0;var t=X(),r=Z(),n=Y(),o=ee(),i=t.ContextAPI.getInstance(),s=function(){function e(){}return e.prototype.startSpan=function(e,t,i){if(Boolean(null==t?void 0:t.root))return new n.NonRecordingSpan;var s=i&&r.getSpanContext(i);return function(e){return"object"==typeof e&&"string"==typeof e.spanId&&"string"==typeof e.traceId&&"number"==typeof e.traceFlags}(s)&&o.isSpanContextValid(s)?new n.NonRecordingSpan(s):new n.NonRecordingSpan},e.prototype.startActiveSpan=function(e,t,n,o){var s,a,c;if(!(arguments.length<2)){2===arguments.length?c=t:3===arguments.length?(s=t,c=n):(s=t,a=n,c=o);var l=a??i.active(),u=this.startSpan(e,s,l),d=r.setSpan(l,u);return i.with(d,c,void 0,u)}},e}();e.NoopTracer=s}),re=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProxyTracer=void 0;var t=new(te().NoopTracer),r=function(){function e(e,t,r){this._provider=e,this.name=t,this.version=r}return e.prototype.startSpan=function(e,t,r){return this._getTracer().startSpan(e,t,r)},e.prototype.startActiveSpan=function(e,t,r,n){var o=this._getTracer();return Reflect.apply(o.startActiveSpan,o,arguments)},e.prototype._getTracer=function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateTracer(this.name,this.version);return e?(this._delegate=e,this._delegate):t},e}();e.ProxyTracer=r}),ne=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NoopTracerProvider=void 0;var t=te(),r=function(){function e(){}return e.prototype.getTracer=function(e,r){return new t.NoopTracer},e}();e.NoopTracerProvider=r}),oe=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProxyTracerProvider=void 0;var t=re(),r=new(ne().NoopTracerProvider),n=function(){function e(){}return e.prototype.getTracer=function(e,r){var n;return null!==(n=this.getDelegateTracer(e,r))&&void 0!==n?n:new t.ProxyTracer(this,e,r)},e.prototype.getDelegate=function(){var e;return null!==(e=this._delegate)&&void 0!==e?e:r},e.prototype.setDelegate=function(e){this._delegate=e},e.prototype.getDelegateTracer=function(e,t){var r;return null===(r=this._delegate)||void 0===r?void 0:r.getTracer(e,t)},e}();e.ProxyTracerProvider=n}),ie=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),se=v(e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.SamplingDecision=void 0,(t=e.SamplingDecision||(e.SamplingDecision={}))[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"}),ae=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),ce=v(e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.SpanKind=void 0,(t=e.SpanKind||(e.SpanKind={}))[t.INTERNAL=0]="INTERNAL",t[t.SERVER=1]="SERVER",t[t.CLIENT=2]="CLIENT",t[t.PRODUCER=3]="PRODUCER",t[t.CONSUMER=4]="CONSUMER"}),le=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),ue=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),de=v(e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.SpanStatusCode=void 0,(t=e.SpanStatusCode||(e.SpanStatusCode={}))[t.UNSET=0]="UNSET",t[t.OK=1]="OK",t[t.ERROR=2]="ERROR"}),pe=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),he=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),fe=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),ge=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),me=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TraceAPI=void 0;var t=D(),r=oe(),n=ee(),o=Z(),i=M(),s="trace",a=function(){function e(){this._proxyTracerProvider=new r.ProxyTracerProvider,this.wrapSpanContext=n.wrapSpanContext,this.isSpanContextValid=n.isSpanContextValid,this.deleteSpan=o.deleteSpan,this.getSpan=o.getSpan,this.getSpanContext=o.getSpanContext,this.setSpan=o.setSpan,this.setSpanContext=o.setSpanContext}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalTracerProvider=function(e){var r=t.registerGlobal(s,this._proxyTracerProvider,i.DiagAPI.instance());return r&&this._proxyTracerProvider.setDelegate(e),r},e.prototype.getTracerProvider=function(){return t.getGlobal(s)||this._proxyTracerProvider},e.prototype.getTracer=function(e,t){return this.getTracerProvider().getTracer(e,t)},e.prototype.disable=function(){t.unregisterGlobal(s,i.DiagAPI.instance()),this._proxyTracerProvider=new r.ProxyTracerProvider},e}();e.TraceAPI=a}),ve=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NoopTextMapPropagator=void 0;var t=function(){function e(){}return e.prototype.inject=function(e,t){},e.prototype.extract=function(e,t){return e},e.prototype.fields=function(){return[]},e}();e.NoopTextMapPropagator=t}),ye=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.deleteBaggage=e.setBaggage=e.getBaggage=void 0;var t=G().createContextKey("OpenTelemetry Baggage Key");e.getBaggage=function(e){return e.getValue(t)||void 0},e.setBaggage=function(e,r){return e.setValue(t,r)},e.deleteBaggage=function(e){return e.deleteValue(t)}}),Se=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PropagationAPI=void 0;var t=D(),r=ve(),n=q(),o=ye(),i=U(),s=M(),a="propagation",c=new r.NoopTextMapPropagator,l=function(){function e(){this.createBaggage=i.createBaggage,this.getBaggage=o.getBaggage,this.setBaggage=o.setBaggage,this.deleteBaggage=o.deleteBaggage}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalPropagator=function(e){return t.registerGlobal(a,e,s.DiagAPI.instance())},e.prototype.inject=function(e,t,r){return void 0===r&&(r=n.defaultTextMapSetter),this._getGlobalPropagator().inject(e,t,r)},e.prototype.extract=function(e,t,r){return void 0===r&&(r=n.defaultTextMapGetter),this._getGlobalPropagator().extract(e,t,r)},e.prototype.fields=function(){return this._getGlobalPropagator().fields()},e.prototype.disable=function(){t.unregisterGlobal(a,s.DiagAPI.instance())},e.prototype._getGlobalPropagator=function(){return t.getGlobal(a)||c},e}();e.PropagationAPI=l}),we=v(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__exportStar||function(e,r){for(var n in e)"default"!==n&&!Object.prototype.hasOwnProperty.call(r,n)&&t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.diag=e.propagation=e.trace=e.context=e.INVALID_SPAN_CONTEXT=e.INVALID_TRACEID=e.INVALID_SPANID=e.isValidSpanId=e.isValidTraceId=e.isSpanContextValid=e.baggageEntryMetadataFromString=void 0,r(C(),e);var n=U();Object.defineProperty(e,"baggageEntryMetadataFromString",{enumerable:!0,get:function(){return n.baggageEntryMetadataFromString}}),r($(),e),r(B(),e),r(H(),e),r(q(),e),r(z(),e),r(W(),e),r(re(),e),r(oe(),e),r(ie(),e),r(se(),e),r(ae(),e),r(ce(),e),r(le(),e),r(ue(),e),r(de(),e),r(J(),e),r(pe(),e),r(he(),e),r(fe(),e);var o=ee();Object.defineProperty(e,"isSpanContextValid",{enumerable:!0,get:function(){return o.isSpanContextValid}}),Object.defineProperty(e,"isValidTraceId",{enumerable:!0,get:function(){return o.isValidTraceId}}),Object.defineProperty(e,"isValidSpanId",{enumerable:!0,get:function(){return o.isValidSpanId}});var i=Q();Object.defineProperty(e,"INVALID_SPANID",{enumerable:!0,get:function(){return i.INVALID_SPANID}}),Object.defineProperty(e,"INVALID_TRACEID",{enumerable:!0,get:function(){return i.INVALID_TRACEID}}),Object.defineProperty(e,"INVALID_SPAN_CONTEXT",{enumerable:!0,get:function(){return i.INVALID_SPAN_CONTEXT}}),r(G(),e),r(ge(),e);var s=X();e.context=s.ContextAPI.getInstance();var a=me();e.trace=a.TraceAPI.getInstance();var c=Se();e.propagation=c.PropagationAPI.getInstance();var l=M();e.diag=l.DiagAPI.instance(),e.default={trace:e.trace,context:e.context,propagation:e.propagation,diag:e.diag}}),Ee=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isTracingSuppressed=e.unsuppressTracing=e.suppressTracing=void 0;var t=we().createContextKey("OpenTelemetry SDK Context Key SUPPRESS_TRACING");e.suppressTracing=function(e){return e.setValue(t,!0)},e.unsuppressTracing=function(e){return e.deleteValue(t)},e.isTracingSuppressed=function(e){return!0===e.getValue(t)}}),_e=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BAGGAGE_MAX_TOTAL_LENGTH=e.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=e.BAGGAGE_MAX_NAME_VALUE_PAIRS=e.BAGGAGE_HEADER=e.BAGGAGE_ITEMS_SEPARATOR=e.BAGGAGE_PROPERTIES_SEPARATOR=e.BAGGAGE_KEY_PAIR_SEPARATOR=void 0,e.BAGGAGE_KEY_PAIR_SEPARATOR="=",e.BAGGAGE_PROPERTIES_SEPARATOR=";",e.BAGGAGE_ITEMS_SEPARATOR=",",e.BAGGAGE_HEADER="baggage",e.BAGGAGE_MAX_NAME_VALUE_PAIRS=180,e.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096,e.BAGGAGE_MAX_TOTAL_LENGTH=8192}),be=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseKeyPairsIntoRecord=e.parsePairKeyValue=e.getKeyPairs=e.serializeKeyPairs=void 0;var t=we(),r=_e();e.serializeKeyPairs=e=>e.reduce((e,t)=>{let n=`${e}${""!==e?r.BAGGAGE_ITEMS_SEPARATOR:""}${t}`;return n.length>r.BAGGAGE_MAX_TOTAL_LENGTH?e:n},""),e.getKeyPairs=e=>e.getAllEntries().map(([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(t.value)}`),e.parsePairKeyValue=e=>{let n=e.split(r.BAGGAGE_PROPERTIES_SEPARATOR);if(n.length<=0)return;let o=n.shift();if(!o)return;let i=o.split(r.BAGGAGE_KEY_PAIR_SEPARATOR);if(2!==i.length)return;let s,a=decodeURIComponent(i[0].trim()),c=decodeURIComponent(i[1].trim());return n.length>0&&(s=t.baggageEntryMetadataFromString(n.join(r.BAGGAGE_PROPERTIES_SEPARATOR))),{key:a,value:c,metadata:s}},e.parseKeyPairsIntoRecord=t=>"string"!=typeof t||0===t.length?{}:t.split(r.BAGGAGE_ITEMS_SEPARATOR).map(t=>e.parsePairKeyValue(t)).filter(e=>void 0!==e&&e.value.length>0).reduce((e,t)=>(e[t.key]=t.value,e),{})}),Pe=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HttpBaggagePropagator=void 0;var t=we(),r=Ee(),n=_e(),o=be();e.HttpBaggagePropagator=class{inject(e,i,s){let a=t.propagation.getBaggage(e);if(!a||r.isTracingSuppressed(e))return;let c=o.getKeyPairs(a).filter(e=>e.length<=n.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS).slice(0,n.BAGGAGE_MAX_NAME_VALUE_PAIRS),l=o.serializeKeyPairs(c);l.length>0&&s.set(i,n.BAGGAGE_HEADER,l)}extract(e,r,i){let s=i.get(r,n.BAGGAGE_HEADER);if(!s)return e;let a={};return 0===s.length||(s.split(n.BAGGAGE_ITEMS_SEPARATOR).forEach(e=>{let t=o.parsePairKeyValue(e);if(t){let e={value:t.value};t.metadata&&(e.metadata=t.metadata),a[t.key]=e}}),0===Object.entries(a).length)?e:t.propagation.setBaggage(e,t.propagation.createBaggage(a))}fields(){return[n.BAGGAGE_HEADER]}}}),Te=v(e=>{"use strict";function t(e){return null==e||(Array.isArray(e)?function(e){let t;for(let n of e)if(null!=n){if(!t){if(r(n)){t=typeof n;continue}return!1}if(typeof n!==t)return!1}return!0}(e):r(e))}function r(e){switch(typeof e){case"number":case"boolean":case"string":return!0}return!1}Object.defineProperty(e,"__esModule",{value:!0}),e.isAttributeValue=e.sanitizeAttributes=void 0,e.sanitizeAttributes=function(e){let r={};if(null==e||"object"!=typeof e)return r;for(let[n,o]of Object.entries(e))t(o)&&(Array.isArray(o)?r[n]=o.slice():r[n]=o);return r},e.isAttributeValue=t}),Ce=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.loggingErrorHandler=void 0;var t=we();e.loggingErrorHandler=function(){return e=>{t.diag.error(function(e){return"string"==typeof e?e:JSON.stringify(function(e){let t={},r=e;for(;null!==r;)Object.getOwnPropertyNames(r).forEach(e=>{if(t[e])return;let n=r[e];n&&(t[e]=String(n))}),r=Object.getPrototypeOf(r);return t}(e))}(e))}}}),Ie=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.globalErrorHandler=e.setGlobalErrorHandler=void 0;var t=Ce().loggingErrorHandler();e.setGlobalErrorHandler=function(e){t=e},e.globalErrorHandler=e=>{try{t(e)}catch{}}}),Oe=v(e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.TracesSamplerValues=void 0,(t=e.TracesSamplerValues||(e.TracesSamplerValues={})).AlwaysOff="always_off",t.AlwaysOn="always_on",t.ParentBasedAlwaysOff="parentbased_always_off",t.ParentBasedAlwaysOn="parentbased_always_on",t.ParentBasedTraceIdRatio="parentbased_traceidratio",t.TraceIdRatio="traceidratio"}),Ne=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseEnvironment=e.DEFAULT_ENVIRONMENT=void 0;var t=we(),r=Oe(),n=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT"];function o(e){return n.indexOf(e)>-1}var i=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function s(e){return i.indexOf(e)>-1}function a(e,t,r,n=-1/0,o=1/0){if(typeof r[e]<"u"){let i=Number(r[e]);isNaN(i)||(t[e]=i<n?n:i>o?o:i)}}function c(e,t,r,n=","){let o=r[e];"string"==typeof o&&(t[e]=o.split(n).map(e=>e.trim()))}e.DEFAULT_ENVIRONMENT={CONTAINER_NAME:"",ECS_CONTAINER_METADATA_URI_V4:"",ECS_CONTAINER_METADATA_URI:"",HOSTNAME:"",KUBERNETES_SERVICE_HOST:"",NAMESPACE:"",OTEL_BSP_EXPORT_TIMEOUT:3e4,OTEL_BSP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BSP_MAX_QUEUE_SIZE:2048,OTEL_BSP_SCHEDULE_DELAY:5e3,OTEL_EXPORTER_JAEGER_AGENT_HOST:"",OTEL_EXPORTER_JAEGER_ENDPOINT:"",OTEL_EXPORTER_JAEGER_PASSWORD:"",OTEL_EXPORTER_JAEGER_USER:"",OTEL_EXPORTER_OTLP_ENDPOINT:"",OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:"",OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:"",OTEL_EXPORTER_OTLP_HEADERS:"",OTEL_EXPORTER_OTLP_TRACES_HEADERS:"",OTEL_EXPORTER_OTLP_METRICS_HEADERS:"",OTEL_EXPORTER_ZIPKIN_ENDPOINT:"http://localhost:9411/api/v2/spans",OTEL_LOG_LEVEL:t.DiagLogLevel.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:128,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_TRACES_EXPORTER:"none",OTEL_TRACES_SAMPLER:r.TracesSamplerValues.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:""};var l={ALL:t.DiagLogLevel.ALL,VERBOSE:t.DiagLogLevel.VERBOSE,DEBUG:t.DiagLogLevel.DEBUG,INFO:t.DiagLogLevel.INFO,WARN:t.DiagLogLevel.WARN,ERROR:t.DiagLogLevel.ERROR,NONE:t.DiagLogLevel.NONE};function u(e,t,r){let n=r[e];if("string"==typeof n){let r=l[n.toUpperCase()];null!=r&&(t[e]=r)}}e.parseEnvironment=function(t){let r={};for(let n in e.DEFAULT_ENVIRONMENT){let e=n;if("OTEL_LOG_LEVEL"===e)u(e,r,t);else if(o(e))a(e,r,t);else if(s(e))c(e,r,t);else{let n=t[e];typeof n<"u"&&null!==n&&(r[e]=String(n))}}return r}}),Re=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getEnv=void 0;var t=r(857),n=Ne();e.getEnv=function(){let e=n.parseEnvironment(process.env);return Object.assign({HOSTNAME:t.hostname()},n.DEFAULT_ENVIRONMENT,e)}}),Ae=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hexToBase64=void 0,e.hexToBase64=function(e){let t=e.length,r="";for(let n=0;n<t;n+=2){let t=e.substring(n,n+2),o=parseInt(t,16);r+=String.fromCharCode(o)}return Buffer.from(r,"ascii").toString("base64")}}),De=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RandomIdGenerator=void 0,e.RandomIdGenerator=class{constructor(){this.generateTraceId=r(16),this.generateSpanId=r(8)}};var t=Buffer.allocUnsafe(16);function r(e){return function(){for(let r=0;r<e/4;r++)t.writeUInt32BE(Math.random()*2**32>>>0,4*r);for(let r=0;r<e&&!(t[r]>0);r++)r===e-1&&(t[e-1]=1);return t.toString("hex",0,e)}}}),xe=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.otperformance=void 0;var t=r(2987);e.otperformance=t.performance}),ke=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VERSION=void 0,e.VERSION="0.23.0"}),je=v(e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.RpcGrpcStatusCodeValues=e.MessagingOperationValues=e.MessagingDestinationKindValues=e.HttpFlavorValues=e.NetTransportValues=e.FaasInvokedProviderValues=e.FaasDocumentOperationValues=e.FaasTriggerValues=e.DbCassandraConsistencyLevelValues=e.DbSystemValues=e.SemanticAttributes=void 0,e.SemanticAttributes={DB_SYSTEM:"db.system",DB_CONNECTION_STRING:"db.connection_string",DB_USER:"db.user",DB_JDBC_DRIVER_CLASSNAME:"db.jdbc.driver_classname",DB_NAME:"db.name",DB_STATEMENT:"db.statement",DB_OPERATION:"db.operation",DB_MSSQL_INSTANCE_NAME:"db.mssql.instance_name",DB_CASSANDRA_KEYSPACE:"db.cassandra.keyspace",DB_CASSANDRA_PAGE_SIZE:"db.cassandra.page_size",DB_CASSANDRA_CONSISTENCY_LEVEL:"db.cassandra.consistency_level",DB_CASSANDRA_TABLE:"db.cassandra.table",DB_CASSANDRA_IDEMPOTENCE:"db.cassandra.idempotence",DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:"db.cassandra.speculative_execution_count",DB_CASSANDRA_COORDINATOR_ID:"db.cassandra.coordinator.id",DB_CASSANDRA_COORDINATOR_DC:"db.cassandra.coordinator.dc",DB_HBASE_NAMESPACE:"db.hbase.namespace",DB_REDIS_DATABASE_INDEX:"db.redis.database_index",DB_MONGODB_COLLECTION:"db.mongodb.collection",DB_SQL_TABLE:"db.sql.table",EXCEPTION_TYPE:"exception.type",EXCEPTION_MESSAGE:"exception.message",EXCEPTION_STACKTRACE:"exception.stacktrace",EXCEPTION_ESCAPED:"exception.escaped",FAAS_TRIGGER:"faas.trigger",FAAS_EXECUTION:"faas.execution",FAAS_DOCUMENT_COLLECTION:"faas.document.collection",FAAS_DOCUMENT_OPERATION:"faas.document.operation",FAAS_DOCUMENT_TIME:"faas.document.time",FAAS_DOCUMENT_NAME:"faas.document.name",FAAS_TIME:"faas.time",FAAS_CRON:"faas.cron",FAAS_COLDSTART:"faas.coldstart",FAAS_INVOKED_NAME:"faas.invoked_name",FAAS_INVOKED_PROVIDER:"faas.invoked_provider",FAAS_INVOKED_REGION:"faas.invoked_region",NET_TRANSPORT:"net.transport",NET_PEER_IP:"net.peer.ip",NET_PEER_PORT:"net.peer.port",NET_PEER_NAME:"net.peer.name",NET_HOST_IP:"net.host.ip",NET_HOST_PORT:"net.host.port",NET_HOST_NAME:"net.host.name",PEER_SERVICE:"peer.service",ENDUSER_ID:"enduser.id",ENDUSER_ROLE:"enduser.role",ENDUSER_SCOPE:"enduser.scope",THREAD_ID:"thread.id",THREAD_NAME:"thread.name",CODE_FUNCTION:"code.function",CODE_NAMESPACE:"code.namespace",CODE_FILEPATH:"code.filepath",CODE_LINENO:"code.lineno",HTTP_METHOD:"http.method",HTTP_URL:"http.url",HTTP_TARGET:"http.target",HTTP_HOST:"http.host",HTTP_SCHEME:"http.scheme",HTTP_STATUS_CODE:"http.status_code",HTTP_FLAVOR:"http.flavor",HTTP_USER_AGENT:"http.user_agent",HTTP_REQUEST_CONTENT_LENGTH:"http.request_content_length",HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:"http.request_content_length_uncompressed",HTTP_RESPONSE_CONTENT_LENGTH:"http.response_content_length",HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:"http.response_content_length_uncompressed",HTTP_SERVER_NAME:"http.server_name",HTTP_ROUTE:"http.route",HTTP_CLIENT_IP:"http.client_ip",AWS_DYNAMODB_TABLE_NAMES:"aws.dynamodb.table_names",AWS_DYNAMODB_CONSUMED_CAPACITY:"aws.dynamodb.consumed_capacity",AWS_DYNAMODB_ITEM_COLLECTION_METRICS:"aws.dynamodb.item_collection_metrics",AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:"aws.dynamodb.provisioned_read_capacity",AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:"aws.dynamodb.provisioned_write_capacity",AWS_DYNAMODB_CONSISTENT_READ:"aws.dynamodb.consistent_read",AWS_DYNAMODB_PROJECTION:"aws.dynamodb.projection",AWS_DYNAMODB_LIMIT:"aws.dynamodb.limit",AWS_DYNAMODB_ATTRIBUTES_TO_GET:"aws.dynamodb.attributes_to_get",AWS_DYNAMODB_INDEX_NAME:"aws.dynamodb.index_name",AWS_DYNAMODB_SELECT:"aws.dynamodb.select",AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:"aws.dynamodb.global_secondary_indexes",AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:"aws.dynamodb.local_secondary_indexes",AWS_DYNAMODB_EXCLUSIVE_START_TABLE:"aws.dynamodb.exclusive_start_table",AWS_DYNAMODB_TABLE_COUNT:"aws.dynamodb.table_count",AWS_DYNAMODB_SCAN_FORWARD:"aws.dynamodb.scan_forward",AWS_DYNAMODB_SEGMENT:"aws.dynamodb.segment",AWS_DYNAMODB_TOTAL_SEGMENTS:"aws.dynamodb.total_segments",AWS_DYNAMODB_COUNT:"aws.dynamodb.count",AWS_DYNAMODB_SCANNED_COUNT:"aws.dynamodb.scanned_count",AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:"aws.dynamodb.attribute_definitions",AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:"aws.dynamodb.global_secondary_index_updates",MESSAGING_SYSTEM:"messaging.system",MESSAGING_DESTINATION:"messaging.destination",MESSAGING_DESTINATION_KIND:"messaging.destination_kind",MESSAGING_TEMP_DESTINATION:"messaging.temp_destination",MESSAGING_PROTOCOL:"messaging.protocol",MESSAGING_PROTOCOL_VERSION:"messaging.protocol_version",MESSAGING_URL:"messaging.url",MESSAGING_MESSAGE_ID:"messaging.message_id",MESSAGING_CONVERSATION_ID:"messaging.conversation_id",MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:"messaging.message_payload_size_bytes",MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:"messaging.message_payload_compressed_size_bytes",MESSAGING_OPERATION:"messaging.operation",MESSAGING_RABBITMQ_ROUTING_KEY:"messaging.rabbitmq.routing_key",MESSAGING_KAFKA_MESSAGE_KEY:"messaging.kafka.message_key",MESSAGING_KAFKA_CONSUMER_GROUP:"messaging.kafka.consumer_group",MESSAGING_KAFKA_CLIENT_ID:"messaging.kafka.client_id",MESSAGING_KAFKA_PARTITION:"messaging.kafka.partition",MESSAGING_KAFKA_TOMBSTONE:"messaging.kafka.tombstone",RPC_SYSTEM:"rpc.system",RPC_SERVICE:"rpc.service",RPC_METHOD:"rpc.method",RPC_GRPC_STATUS_CODE:"rpc.grpc.status_code",RPC_JSONRPC_VERSION:"rpc.jsonrpc.version",RPC_JSONRPC_METHOD:"rpc.jsonrpc.method",RPC_JSONRPC_REQUEST_ID:"rpc.jsonrpc.request_id",RPC_JSONRPC_ERROR_CODE:"rpc.jsonrpc.error_code",RPC_JSONRPC_ERROR_MESSAGE:"rpc.jsonrpc.error_message"},(t=e.DbSystemValues||(e.DbSystemValues={})).OTHER_SQL="other_sql",t.MSSQL="mssql",t.MYSQL="mysql",t.ORACLE="oracle",t.DB2="db2",t.POSTGRESQL="postgresql",t.REDSHIFT="redshift",t.HIVE="hive",t.CLOUDSCAPE="cloudscape",t.HSQLDB="hsqldb",t.PROGRESS="progress",t.MAXDB="maxdb",t.HANADB="hanadb",t.INGRES="ingres",t.FIRSTSQL="firstsql",t.EDB="edb",t.CACHE="cache",t.ADABAS="adabas",t.FIREBIRD="firebird",t.DERBY="derby",t.FILEMAKER="filemaker",t.INFORMIX="informix",t.INSTANTDB="instantdb",t.INTERBASE="interbase",t.MARIADB="mariadb",t.NETEZZA="netezza",t.PERVASIVE="pervasive",t.POINTBASE="pointbase",t.SQLITE="sqlite",t.SYBASE="sybase",t.TERADATA="teradata",t.VERTICA="vertica",t.H2="h2",t.COLDFUSION="coldfusion",t.CASSANDRA="cassandra",t.HBASE="hbase",t.MONGODB="mongodb",t.REDIS="redis",t.COUCHBASE="couchbase",t.COUCHDB="couchdb",t.COSMOSDB="cosmosdb",t.DYNAMODB="dynamodb",t.NEO4J="neo4j",t.GEODE="geode",t.ELASTICSEARCH="elasticsearch",t.MEMCACHED="memcached",t.COCKROACHDB="cockroachdb",function(e){e.ALL="all",e.EACH_QUORUM="each_quorum",e.QUORUM="quorum",e.LOCAL_QUORUM="local_quorum",e.ONE="one",e.TWO="two",e.THREE="three",e.LOCAL_ONE="local_one",e.ANY="any",e.SERIAL="serial",e.LOCAL_SERIAL="local_serial"}(e.DbCassandraConsistencyLevelValues||(e.DbCassandraConsistencyLevelValues={})),function(e){e.DATASOURCE="datasource",e.HTTP="http",e.PUBSUB="pubsub",e.TIMER="timer",e.OTHER="other"}(e.FaasTriggerValues||(e.FaasTriggerValues={})),function(e){e.INSERT="insert",e.EDIT="edit",e.DELETE="delete"}(e.FaasDocumentOperationValues||(e.FaasDocumentOperationValues={})),function(e){e.AWS="aws",e.AZURE="azure",e.GCP="gcp"}(e.FaasInvokedProviderValues||(e.FaasInvokedProviderValues={})),function(e){e.IP_TCP="ip_tcp",e.IP_UDP="ip_udp",e.IP="ip",e.UNIX="unix",e.PIPE="pipe",e.INPROC="inproc",e.OTHER="other"}(e.NetTransportValues||(e.NetTransportValues={})),function(e){e.HTTP_1_0="1.0",e.HTTP_1_1="1.1",e.HTTP_2_0="2.0",e.SPDY="SPDY",e.QUIC="QUIC"}(e.HttpFlavorValues||(e.HttpFlavorValues={})),function(e){e.QUEUE="queue",e.TOPIC="topic"}(e.MessagingDestinationKindValues||(e.MessagingDestinationKindValues={})),function(e){e.RECEIVE="receive",e.PROCESS="process"}(e.MessagingOperationValues||(e.MessagingOperationValues={})),function(e){e[e.OK=0]="OK",e[e.CANCELLED=1]="CANCELLED",e[e.UNKNOWN=2]="UNKNOWN",e[e.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",e[e.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",e[e.NOT_FOUND=5]="NOT_FOUND",e[e.ALREADY_EXISTS=6]="ALREADY_EXISTS",e[e.PERMISSION_DENIED=7]="PERMISSION_DENIED",e[e.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",e[e.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",e[e.ABORTED=10]="ABORTED",e[e.OUT_OF_RANGE=11]="OUT_OF_RANGE",e[e.UNIMPLEMENTED=12]="UNIMPLEMENTED",e[e.INTERNAL=13]="INTERNAL",e[e.UNAVAILABLE=14]="UNAVAILABLE",e[e.DATA_LOSS=15]="DATA_LOSS",e[e.UNAUTHENTICATED=16]="UNAUTHENTICATED"}(e.RpcGrpcStatusCodeValues||(e.RpcGrpcStatusCodeValues={}))}),Me=v(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__exportStar||function(e,r){for(var n in e)"default"!==n&&!Object.prototype.hasOwnProperty.call(r,n)&&t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(je(),e)}),Le=v(e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.TelemetrySdkLanguageValues=e.OsTypeValues=e.HostArchValues=e.AwsEcsLaunchtypeValues=e.CloudPlatformValues=e.CloudProviderValues=e.ResourceAttributes=void 0,e.ResourceAttributes={CLOUD_PROVIDER:"cloud.provider",CLOUD_ACCOUNT_ID:"cloud.account.id",CLOUD_REGION:"cloud.region",CLOUD_AVAILABILITY_ZONE:"cloud.availability_zone",CLOUD_PLATFORM:"cloud.platform",AWS_ECS_CONTAINER_ARN:"aws.ecs.container.arn",AWS_ECS_CLUSTER_ARN:"aws.ecs.cluster.arn",AWS_ECS_LAUNCHTYPE:"aws.ecs.launchtype",AWS_ECS_TASK_ARN:"aws.ecs.task.arn",AWS_ECS_TASK_FAMILY:"aws.ecs.task.family",AWS_ECS_TASK_REVISION:"aws.ecs.task.revision",AWS_EKS_CLUSTER_ARN:"aws.eks.cluster.arn",AWS_LOG_GROUP_NAMES:"aws.log.group.names",AWS_LOG_GROUP_ARNS:"aws.log.group.arns",AWS_LOG_STREAM_NAMES:"aws.log.stream.names",AWS_LOG_STREAM_ARNS:"aws.log.stream.arns",CONTAINER_NAME:"container.name",CONTAINER_ID:"container.id",CONTAINER_RUNTIME:"container.runtime",CONTAINER_IMAGE_NAME:"container.image.name",CONTAINER_IMAGE_TAG:"container.image.tag",DEPLOYMENT_ENVIRONMENT:"deployment.environment",DEVICE_ID:"device.id",DEVICE_MODEL_IDENTIFIER:"device.model.identifier",DEVICE_MODEL_NAME:"device.model.name",FAAS_NAME:"faas.name",FAAS_ID:"faas.id",FAAS_VERSION:"faas.version",FAAS_INSTANCE:"faas.instance",FAAS_MAX_MEMORY:"faas.max_memory",HOST_ID:"host.id",HOST_NAME:"host.name",HOST_TYPE:"host.type",HOST_ARCH:"host.arch",HOST_IMAGE_NAME:"host.image.name",HOST_IMAGE_ID:"host.image.id",HOST_IMAGE_VERSION:"host.image.version",K8S_CLUSTER_NAME:"k8s.cluster.name",K8S_NODE_NAME:"k8s.node.name",K8S_NODE_UID:"k8s.node.uid",K8S_NAMESPACE_NAME:"k8s.namespace.name",K8S_POD_UID:"k8s.pod.uid",K8S_POD_NAME:"k8s.pod.name",K8S_CONTAINER_NAME:"k8s.container.name",K8S_REPLICASET_UID:"k8s.replicaset.uid",K8S_REPLICASET_NAME:"k8s.replicaset.name",K8S_DEPLOYMENT_UID:"k8s.deployment.uid",K8S_DEPLOYMENT_NAME:"k8s.deployment.name",K8S_STATEFULSET_UID:"k8s.statefulset.uid",K8S_STATEFULSET_NAME:"k8s.statefulset.name",K8S_DAEMONSET_UID:"k8s.daemonset.uid",K8S_DAEMONSET_NAME:"k8s.daemonset.name",K8S_JOB_UID:"k8s.job.uid",K8S_JOB_NAME:"k8s.job.name",K8S_CRONJOB_UID:"k8s.cronjob.uid",K8S_CRONJOB_NAME:"k8s.cronjob.name",OS_TYPE:"os.type",OS_DESCRIPTION:"os.description",OS_NAME:"os.name",OS_VERSION:"os.version",PROCESS_PID:"process.pid",PROCESS_EXECUTABLE_NAME:"process.executable.name",PROCESS_EXECUTABLE_PATH:"process.executable.path",PROCESS_COMMAND:"process.command",PROCESS_COMMAND_LINE:"process.command_line",PROCESS_COMMAND_ARGS:"process.command_args",PROCESS_OWNER:"process.owner",PROCESS_RUNTIME_NAME:"process.runtime.name",PROCESS_RUNTIME_VERSION:"process.runtime.version",PROCESS_RUNTIME_DESCRIPTION:"process.runtime.description",SERVICE_NAME:"service.name",SERVICE_NAMESPACE:"service.namespace",SERVICE_INSTANCE_ID:"service.instance.id",SERVICE_VERSION:"service.version",TELEMETRY_SDK_NAME:"telemetry.sdk.name",TELEMETRY_SDK_LANGUAGE:"telemetry.sdk.language",TELEMETRY_SDK_VERSION:"telemetry.sdk.version",TELEMETRY_AUTO_VERSION:"telemetry.auto.version",WEBENGINE_NAME:"webengine.name",WEBENGINE_VERSION:"webengine.version",WEBENGINE_DESCRIPTION:"webengine.description"},(t=e.CloudProviderValues||(e.CloudProviderValues={})).AWS="aws",t.AZURE="azure",t.GCP="gcp",function(e){e.AWS_EC2="aws_ec2",e.AWS_ECS="aws_ecs",e.AWS_EKS="aws_eks",e.AWS_LAMBDA="aws_lambda",e.AWS_ELASTIC_BEANSTALK="aws_elastic_beanstalk",e.AZURE_VM="azure_vm",e.AZURE_CONTAINER_INSTANCES="azure_container_instances",e.AZURE_AKS="azure_aks",e.AZURE_FUNCTIONS="azure_functions",e.AZURE_APP_SERVICE="azure_app_service",e.GCP_COMPUTE_ENGINE="gcp_compute_engine",e.GCP_CLOUD_RUN="gcp_cloud_run",e.GCP_KUBERNETES_ENGINE="gcp_kubernetes_engine",e.GCP_CLOUD_FUNCTIONS="gcp_cloud_functions",e.GCP_APP_ENGINE="gcp_app_engine"}(e.CloudPlatformValues||(e.CloudPlatformValues={})),function(e){e.EC2="ec2",e.FARGATE="fargate"}(e.AwsEcsLaunchtypeValues||(e.AwsEcsLaunchtypeValues={})),function(e){e.AMD64="amd64",e.ARM32="arm32",e.ARM64="arm64",e.IA64="ia64",e.PPC32="ppc32",e.PPC64="ppc64",e.X86="x86"}(e.HostArchValues||(e.HostArchValues={})),function(e){e.WINDOWS="windows",e.LINUX="linux",e.DARWIN="darwin",e.FREEBSD="freebsd",e.NETBSD="netbsd",e.OPENBSD="openbsd",e.DRAGONFLYBSD="dragonflybsd",e.HPUX="hpux",e.AIX="aix",e.SOLARIS="solaris",e.Z_OS="z_os"}(e.OsTypeValues||(e.OsTypeValues={})),function(e){e.CPP="cpp",e.DOTNET="dotnet",e.ERLANG="erlang",e.GO="go",e.JAVA="java",e.NODEJS="nodejs",e.PHP="php",e.PYTHON="python",e.RUBY="ruby",e.WEBJS="webjs"}(e.TelemetrySdkLanguageValues||(e.TelemetrySdkLanguageValues={}))}),Fe=v(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__exportStar||function(e,r){for(var n in e)"default"!==n&&!Object.prototype.hasOwnProperty.call(r,n)&&t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(Le(),e)}),Ue=v(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__exportStar||function(e,r){for(var n in e)"default"!==n&&!Object.prototype.hasOwnProperty.call(r,n)&&t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(Me(),e),r(Fe(),e)}),$e=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SDK_INFO=void 0;var t=ke(),r=Ue();e.SDK_INFO={[r.ResourceAttributes.TELEMETRY_SDK_NAME]:"opentelemetry",[r.ResourceAttributes.PROCESS_RUNTIME_NAME]:"node",[r.ResourceAttributes.TELEMETRY_SDK_LANGUAGE]:r.TelemetrySdkLanguageValues.NODEJS,[r.ResourceAttributes.TELEMETRY_SDK_VERSION]:t.VERSION}}),Be=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.unrefTimer=void 0,e.unrefTimer=function(e){e.unref()}}),Ve=v(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__exportStar||function(e,r){for(var n in e)"default"!==n&&!Object.prototype.hasOwnProperty.call(r,n)&&t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(Re(),e),r(Ae(),e),r(De(),e),r(xe(),e),r($e(),e),r(Be(),e)}),He=v(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__exportStar||function(e,r){for(var n in e)"default"!==n&&!Object.prototype.hasOwnProperty.call(r,n)&&t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(Ve(),e)}),qe=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isTimeInput=e.isTimeInputHrTime=e.hrTimeToMicroseconds=e.hrTimeToMilliseconds=e.hrTimeToNanoseconds=e.hrTimeToTimeStamp=e.hrTimeDuration=e.timeInputToHrTime=e.hrTime=void 0;var t=He(),r=Math.pow(10,9);function n(e){let t=e/1e3,n=Math.trunc(t);return[n,Number((t-n).toFixed(9))*r]}function o(){let e=t.otperformance.timeOrigin;if("number"!=typeof e){let r=t.otperformance;e=r.timing&&r.timing.fetchStart}return e}function i(e){let i=n(o()),s=n("number"==typeof e?e:t.otperformance.now()),a=i[0]+s[0],c=i[1]+s[1];return c>r&&(c-=r,a+=1),[a,c]}function s(e){return Array.isArray(e)&&2===e.length&&"number"==typeof e[0]&&"number"==typeof e[1]}e.hrTime=i,e.timeInputToHrTime=function(e){if(s(e))return e;if("number"==typeof e)return e<o()?i(e):n(e);if(e instanceof Date)return n(e.getTime());throw TypeError("Invalid input type")},e.hrTimeDuration=function(e,t){let n=t[0]-e[0],o=t[1]-e[1];return o<0&&(n-=1,o+=r),[n,o]},e.hrTimeToTimeStamp=function(e){let t=`${"0".repeat(9)}${e[1]}Z`,r=t.substr(t.length-9-1);return new Date(1e3*e[0]).toISOString().replace("000Z",r)},e.hrTimeToNanoseconds=function(e){return e[0]*r+e[1]},e.hrTimeToMilliseconds=function(e){return Math.round(1e3*e[0]+e[1]/1e6)},e.hrTimeToMicroseconds=function(e){return Math.round(1e6*e[0]+e[1]/1e3)},e.isTimeInputHrTime=s,e.isTimeInput=function(e){return s(e)||"number"==typeof e||e instanceof Date}}),ze=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),We=v(e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.ExportResultCode=void 0,(t=e.ExportResultCode||(e.ExportResultCode={}))[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"}),Ge=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompositePropagator=void 0;var t=we();e.CompositePropagator=class{constructor(e={}){var t;this._propagators=null!==(t=e.propagators)&&void 0!==t?t:[],this._fields=Array.from(new Set(this._propagators.map(e=>"function"==typeof e.fields?e.fields():[]).reduce((e,t)=>e.concat(t),[])))}inject(e,r,n){for(let o of this._propagators)try{o.inject(e,r,n)}catch(e){t.diag.warn(`Failed to inject with ${o.constructor.name}. Err: ${e.message}`)}}extract(e,r,n){return this._propagators.reduce((e,o)=>{try{return o.extract(e,r,n)}catch(e){t.diag.warn(`Failed to inject with ${o.constructor.name}. Err: ${e.message}`)}return e},e)}fields(){return this._fields.slice()}}}),Ke=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validateValue=e.validateKey=void 0;var t="[_0-9a-z-*/]",r=new RegExp(`^(?:[a-z]${t}{0,255}|[a-z0-9]${t}{0,240}@[a-z]${t}{0,13})$`),n=/^[ -~]{0,255}[!-~]$/,o=/,|=/;e.validateKey=function(e){return r.test(e)},e.validateValue=function(e){return n.test(e)&&!o.test(e)}}),Xe=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TraceState=void 0;var t=Ke(),r=class{constructor(e){this._internalState=new Map,e&&this._parse(e)}set(e,t){let r=this._clone();return r._internalState.has(e)&&r._internalState.delete(e),r._internalState.set(e,t),r}unset(e){let t=this._clone();return t._internalState.delete(e),t}get(e){return this._internalState.get(e)}serialize(){return this._keys().reduce((e,t)=>(e.push(t+"="+this.get(t)),e),[]).join(",")}_parse(e){e.length>512||(this._internalState=e.split(",").reverse().reduce((e,r)=>{let n=r.trim(),o=n.indexOf("=");if(-1!==o){let i=n.slice(0,o),s=n.slice(o+1,r.length);t.validateKey(i)&&t.validateValue(s)&&e.set(i,s)}return e},new Map),this._internalState.size>32&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,32))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let e=new r;return e._internalState=new Map(this._internalState),e}};e.TraceState=r}),Je=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HttpTraceContextPropagator=e.parseTraceParent=e.TRACE_STATE_HEADER=e.TRACE_PARENT_HEADER=void 0;var t=we(),r=Ee(),n=Xe();e.TRACE_PARENT_HEADER="traceparent",e.TRACE_STATE_HEADER="tracestate";var o=new RegExp("^\\s?((?!ff)[\\da-f]{2})-((?![0]{32})[\\da-f]{32})-((?![0]{16})[\\da-f]{16})-([\\da-f]{2})(-.*)?\\s?$");function i(e){let t=o.exec(e);return!t||"00"===t[1]&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}e.parseTraceParent=i,e.HttpTraceContextPropagator=class{inject(n,o,i){let s=t.trace.getSpanContext(n);if(!s||r.isTracingSuppressed(n)||!t.isSpanContextValid(s))return;let a=`00-${s.traceId}-${s.spanId}-0${Number(s.traceFlags||t.TraceFlags.NONE).toString(16)}`;i.set(o,e.TRACE_PARENT_HEADER,a),s.traceState&&i.set(o,e.TRACE_STATE_HEADER,s.traceState.serialize())}extract(r,o,s){let a=s.get(o,e.TRACE_PARENT_HEADER);if(!a)return r;let c=Array.isArray(a)?a[0]:a;if("string"!=typeof c)return r;let l=i(c);if(!l)return r;l.isRemote=!0;let u=s.get(o,e.TRACE_STATE_HEADER);if(u){let e=Array.isArray(u)?u.join(","):u;l.traceState=new n.TraceState("string"==typeof e?e:void 0)}return t.trace.setSpanContext(r,l)}fields(){return[e.TRACE_PARENT_HEADER,e.TRACE_STATE_HEADER]}}}),Qe=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),Ye=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getRPCMetadata=e.deleteRPCMetadata=e.setRPCMetadata=e.RPCType=void 0;var t=we().createContextKey("OpenTelemetry SDK Context Key RPC_METADATA");(e.RPCType||(e.RPCType={})).HTTP="http",e.setRPCMetadata=function(e,r){return e.setValue(t,r)},e.deleteRPCMetadata=function(e){return e.deleteValue(t)},e.getRPCMetadata=function(e){return e.getValue(t)}}),Ze=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AlwaysOffSampler=void 0;var t=we();e.AlwaysOffSampler=class{shouldSample(){return{decision:t.SamplingDecision.NOT_RECORD}}toString(){return"AlwaysOffSampler"}}}),et=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AlwaysOnSampler=void 0;var t=we();e.AlwaysOnSampler=class{shouldSample(){return{decision:t.SamplingDecision.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}}}),tt=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ParentBasedSampler=void 0;var t=we(),r=Ie(),n=Ze(),o=et();e.ParentBasedSampler=class{constructor(e){var t,i,s,a;this._root=e.root,this._root||(r.globalErrorHandler(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new o.AlwaysOnSampler),this._remoteParentSampled=null!==(t=e.remoteParentSampled)&&void 0!==t?t:new o.AlwaysOnSampler,this._remoteParentNotSampled=null!==(i=e.remoteParentNotSampled)&&void 0!==i?i:new n.AlwaysOffSampler,this._localParentSampled=null!==(s=e.localParentSampled)&&void 0!==s?s:new o.AlwaysOnSampler,this._localParentNotSampled=null!==(a=e.localParentNotSampled)&&void 0!==a?a:new n.AlwaysOffSampler}shouldSample(e,r,n,o,i,s){let a=t.trace.getSpanContext(e);return a&&t.isSpanContextValid(a)?a.isRemote?a.traceFlags&t.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(e,r,n,o,i,s):this._remoteParentNotSampled.shouldSample(e,r,n,o,i,s):a.traceFlags&t.TraceFlags.SAMPLED?this._localParentSampled.shouldSample(e,r,n,o,i,s):this._localParentNotSampled.shouldSample(e,r,n,o,i,s):this._root.shouldSample(e,r,n,o,i,s)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}}}),rt=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TraceIdRatioBasedSampler=void 0;var t=we();e.TraceIdRatioBasedSampler=class{constructor(e=0){this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(4294967295*this._ratio)}shouldSample(e,r){return{decision:t.isValidTraceId(r)&&this._accumulate(r)<this._upperBound?t.SamplingDecision.RECORD_AND_SAMPLED:t.SamplingDecision.NOT_RECORD}}toString(){return`TraceIdRatioBased{${this._ratio}}`}_normalize(e){return"number"!=typeof e||isNaN(e)?0:e>=1?1:e<=0?0:e}_accumulate(e){let t=0;for(let r=0;r<e.length/8;r++){let n=8*r;t=(t^parseInt(e.slice(n,n+8),16))>>>0}return t}}}),nt=v(e=>{"use strict";function t(e,t){return"string"==typeof t?e===t:t.test(e)}Object.defineProperty(e,"__esModule",{value:!0}),e.isUrlIgnored=e.urlMatches=void 0,e.urlMatches=t,e.isUrlIgnored=function(e,r){if(!r)return!1;for(let n of r)if(t(e,n))return!0;return!1}}),ot=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isWrapped=void 0,e.isWrapped=function(e){return"function"==typeof e&&"function"==typeof e.__original&&"function"==typeof e.__unwrap&&!0===e.__wrapped}}),it=v(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__exportStar||function(e,r){for(var n in e)"default"!==n&&!Object.prototype.hasOwnProperty.call(r,n)&&t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.baggageUtils=void 0,r(Pe(),e),r(Te(),e),r(Ie(),e),r(Ce(),e),r(qe(),e),r(ze(),e),r(We(),e),r(ke(),e),e.baggageUtils=be(),r(He(),e),r(Ge(),e),r(Je(),e),r(Qe(),e),r(Ye(),e),r(Ze(),e),r(et(),e),r(tt(),e),r(rt(),e),r(Ee(),e),r(Xe(),e),r(Ne(),e),r(Oe(),e),r(nt(),e),r(ot(),e),r(ke(),e)}),st=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExceptionEventName=void 0,e.ExceptionEventName="exception"}),at=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Span=void 0;var t=we(),r=it(),n=Ue(),o=st();e.Span=class{constructor(e,n,o,i,s,a,c=[],l=r.hrTime()){this.attributes={},this.links=[],this.events=[],this.status={code:t.SpanStatusCode.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=o,this._spanContext=i,this.parentSpanId=a,this.kind=s,this.links=c,this.startTime=r.timeInputToHrTime(l),this.resource=e.resource,this.instrumentationLibrary=e.instrumentationLibrary,this._spanLimits=e.getSpanLimits(),this._spanProcessor=e.getActiveSpanProcessor(),this._spanProcessor.onStart(this,n)}spanContext(){return this._spanContext}setAttribute(e,n){return null==n||this._isSpanEnded()?this:0===e.length?(t.diag.warn(`Invalid attribute key: ${e}`),this):r.isAttributeValue(n)?(Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)||(this.attributes[e]=n),this):(t.diag.warn(`Invalid attribute value set for key: ${e}`),this)}setAttributes(e){for(let[t,r]of Object.entries(e))this.setAttribute(t,r);return this}addEvent(e,n,o){return this._isSpanEnded()||(this.events.length>=this._spanLimits.eventCountLimit&&(t.diag.warn("Dropping extra events."),this.events.shift()),r.isTimeInput(n)&&(typeof o>"u"&&(o=n),n=void 0),typeof o>"u"&&(o=r.hrTime()),this.events.push({name:e,attributes:n,time:r.timeInputToHrTime(o)})),this}setStatus(e){return this._isSpanEnded()||(this.status=e),this}updateName(e){return this._isSpanEnded()||(this.name=e),this}end(e=r.hrTime()){this._isSpanEnded()?t.diag.error("You can only call end() on a span once."):(this._ended=!0,this.endTime=r.timeInputToHrTime(e),this._duration=r.hrTimeDuration(this.startTime,this.endTime),this._duration[0]<0&&t.diag.warn("Inconsistent start and end time, startTime > endTime",this.startTime,this.endTime),this._spanProcessor.onEnd(this))}isRecording(){return!1===this._ended}recordException(e,i=r.hrTime()){let s={};"string"==typeof e?s[n.SemanticAttributes.EXCEPTION_MESSAGE]=e:e&&(e.code?s[n.SemanticAttributes.EXCEPTION_TYPE]=e.code.toString():e.name&&(s[n.SemanticAttributes.EXCEPTION_TYPE]=e.name),e.message&&(s[n.SemanticAttributes.EXCEPTION_MESSAGE]=e.message),e.stack&&(s[n.SemanticAttributes.EXCEPTION_STACKTRACE]=e.stack)),s[n.SemanticAttributes.EXCEPTION_TYPE]||s[n.SemanticAttributes.EXCEPTION_MESSAGE]?this.addEvent(o.ExceptionEventName,s,i):t.diag.warn(`Failed to record an exception ${e}`)}get duration(){return this._duration}get ended(){return this._ended}_isSpanEnded(){return this._ended&&t.diag.warn("Can not execute the operation on ended Span {traceId: %s, spanId: %s}",this._spanContext.traceId,this._spanContext.spanId),this._ended}}}),ct=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.buildSamplerFromEnv=e.DEFAULT_CONFIG=void 0;var t=we(),r=it(),n=r.getEnv(),o=r.TracesSamplerValues.AlwaysOn;function i(e=r.getEnv()){switch(e.OTEL_TRACES_SAMPLER){case r.TracesSamplerValues.AlwaysOn:return new r.AlwaysOnSampler;case r.TracesSamplerValues.AlwaysOff:return new r.AlwaysOffSampler;case r.TracesSamplerValues.ParentBasedAlwaysOn:return new r.ParentBasedSampler({root:new r.AlwaysOnSampler});case r.TracesSamplerValues.ParentBasedAlwaysOff:return new r.ParentBasedSampler({root:new r.AlwaysOffSampler});case r.TracesSamplerValues.TraceIdRatio:return new r.TraceIdRatioBasedSampler(a(e));case r.TracesSamplerValues.ParentBasedTraceIdRatio:return new r.ParentBasedSampler({root:new r.TraceIdRatioBasedSampler(a(e))});default:return t.diag.error(`OTEL_TRACES_SAMPLER value "${e.OTEL_TRACES_SAMPLER} invalid, defaulting to ${o}".`),new r.AlwaysOnSampler}}e.DEFAULT_CONFIG={sampler:i(n),forceFlushTimeoutMillis:3e4,spanLimits:{attributeCountLimit:r.getEnv().OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:r.getEnv().OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:r.getEnv().OTEL_SPAN_EVENT_COUNT_LIMIT}},e.buildSamplerFromEnv=i;var s=1;function a(e){if(void 0===e.OTEL_TRACES_SAMPLER_ARG||""===e.OTEL_TRACES_SAMPLER_ARG)return t.diag.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${s}.`),s;let r=Number(e.OTEL_TRACES_SAMPLER_ARG);return isNaN(r)?(t.diag.error(`OTEL_TRACES_SAMPLER_ARG=${e.OTEL_TRACES_SAMPLER_ARG} was given, but it is invalid, defaulting to ${s}.`),s):r<0||r>1?(t.diag.error(`OTEL_TRACES_SAMPLER_ARG=${e.OTEL_TRACES_SAMPLER_ARG} was given, but it is out of range ([0..1]), defaulting to ${s}.`),s):r}}),lt=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.mergeConfig=void 0;var t=ct();e.mergeConfig=function(e){let r={sampler:t.buildSamplerFromEnv()},n=Object.assign({},t.DEFAULT_CONFIG,r,e);return n.spanLimits=Object.assign({},t.DEFAULT_CONFIG.spanLimits,e.spanLimits||{}),n}}),ut=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Tracer=void 0;var t=we(),r=it(),n=at(),o=lt();e.Tracer=class{constructor(e,t,n){this._tracerProvider=n;let i=o.mergeConfig(t);this._sampler=i.sampler,this._spanLimits=i.spanLimits,this._idGenerator=t.idGenerator||new r.RandomIdGenerator,this.resource=n.resource,this.instrumentationLibrary=e}startSpan(e,o={},i=t.context.active()){var s,a;if(r.isTracingSuppressed(i))return t.diag.debug("Instrumentation suppressed, returning Noop Span"),t.trace.wrapSpanContext(t.INVALID_SPAN_CONTEXT);let c,l,u,d=function(e,r){if(!e.root)return t.trace.getSpanContext(r)}(o,i),p=this._idGenerator.generateSpanId();d&&t.trace.isSpanContextValid(d)?(c=d.traceId,l=d.traceState,u=d.spanId):c=this._idGenerator.generateTraceId();let h=null!==(s=o.kind)&&void 0!==s?s:t.SpanKind.INTERNAL,f=null!==(a=o.links)&&void 0!==a?a:[],g=r.sanitizeAttributes(o.attributes),m=this._sampler.shouldSample(o.root?t.trace.setSpanContext(i,t.INVALID_SPAN_CONTEXT):i,c,e,h,g,f),v={traceId:c,spanId:p,traceFlags:m.decision===t.SamplingDecision.RECORD_AND_SAMPLED?t.TraceFlags.SAMPLED:t.TraceFlags.NONE,traceState:l};if(m.decision===t.SamplingDecision.NOT_RECORD)return t.diag.debug("Recording is off, propagating context in a non-recording span"),t.trace.wrapSpanContext(v);let y=new n.Span(this,i,e,v,h,u,f,o.startTime);return y.setAttributes(Object.assign(g,m.attributes)),y}startActiveSpan(e,r,n,o){let i,s,a;if(arguments.length<2)return;2===arguments.length?a=r:3===arguments.length?(i=r,a=n):(i=r,s=n,a=o);let c=s??t.context.active(),l=this.startSpan(e,i,c),u=t.trace.setSpan(c,l);return t.context.with(u,a,void 0,l)}getSpanLimits(){return this._spanLimits}getActiveSpanProcessor(){return this._tracerProvider.getActiveSpanProcessor()}}}),dt=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultServiceName=void 0,e.defaultServiceName=function(){return`unknown_service:${process.argv0}`}}),pt=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.detectResources=void 0;var t=yt(),n=we(),o=r(9023);e.detectResources=async(e={})=>{let r=Object.assign(e),o=await Promise.all((r.detectors||[]).map(async e=>{try{let t=await e.detect(r);return n.diag.debug(`${e.constructor.name} found resource.`,t),t}catch(r){return n.diag.debug(`${e.constructor.name} failed: ${r.message}`),t.Resource.empty()}}));return i(o),o.reduce((e,t)=>e.merge(t),t.Resource.empty())};var i=e=>{e.forEach(e=>{if(Object.keys(e.attributes).length>0){let t=o.inspect(e.attributes,{depth:2,breakLength:1/0,sorted:!0,compact:!1});n.diag.verbose(t)}})}}),ht=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.envDetector=void 0;var t=we(),r=it(),n=Ue(),o=Et();e.envDetector=new class{constructor(){this._MAX_LENGTH=255,this._COMMA_SEPARATOR=",",this._LABEL_KEY_VALUE_SPLITTER="=",this._ERROR_MESSAGE_INVALID_CHARS="should be a ASCII string with a length greater than 0 and not exceed "+this._MAX_LENGTH+" characters.",this._ERROR_MESSAGE_INVALID_VALUE="should be a ASCII string with a length not exceed "+this._MAX_LENGTH+" characters."}async detect(e){let i={},s=r.getEnv(),a=s.OTEL_RESOURCE_ATTRIBUTES,c=s.OTEL_SERVICE_NAME;if(a)try{let e=this._parseResourceAttributes(a);Object.assign(i,e)}catch(e){t.diag.debug(`EnvDetector failed: ${e.message}`)}return c&&(i[n.ResourceAttributes.SERVICE_NAME]=c),new o.Resource(i)}_parseResourceAttributes(e){if(!e)return{};let t={},r=e.split(this._COMMA_SEPARATOR,-1);for(let e of r){let r=e.split(this._LABEL_KEY_VALUE_SPLITTER,-1);if(2!==r.length)continue;let[n,o]=r;if(n=n.trim(),o=o.trim().split('^"|"$').join(""),!this._isValidAndNotEmpty(n))throw new Error(`Attribute key ${this._ERROR_MESSAGE_INVALID_CHARS}`);if(!this._isValid(o))throw new Error(`Attribute value ${this._ERROR_MESSAGE_INVALID_VALUE}`);t[n]=o}return t}_isValid(e){return e.length<=this._MAX_LENGTH&&this._isPrintableString(e)}_isPrintableString(e){for(let t=0;t<e.length;t++){let r=e.charAt(t);if(r<=" "||r>="~")return!1}return!0}_isValidAndNotEmpty(e){return e.length>0&&this._isValid(e)}}}),ft=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.processDetector=void 0;var t=we(),r=Ue(),n=Et();e.processDetector=new class{async detect(e){let t={[r.ResourceAttributes.PROCESS_PID]:process.pid,[r.ResourceAttributes.PROCESS_EXECUTABLE_NAME]:process.title||"",[r.ResourceAttributes.PROCESS_COMMAND]:process.argv[1]||"",[r.ResourceAttributes.PROCESS_COMMAND_LINE]:process.argv.join(" ")||""};return this._getResourceAttributes(t,e)}_getResourceAttributes(e,o){return""===e[r.ResourceAttributes.PROCESS_EXECUTABLE_NAME]||""===e[r.ResourceAttributes.PROCESS_EXECUTABLE_PATH]||""===e[r.ResourceAttributes.PROCESS_COMMAND]||""===e[r.ResourceAttributes.PROCESS_COMMAND_LINE]?(t.diag.debug("ProcessDetector failed: Unable to find required process resources. "),n.Resource.empty()):new n.Resource(Object.assign({},e))}}}),gt=v(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__exportStar||function(e,r){for(var n in e)"default"!==n&&!Object.prototype.hasOwnProperty.call(r,n)&&t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(ht(),e),r(ft(),e)}),mt=v(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__exportStar||function(e,r){for(var n in e)"default"!==n&&!Object.prototype.hasOwnProperty.call(r,n)&&t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(dt(),e),r(pt(),e),r(gt(),e)}),vt=v(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__exportStar||function(e,r){for(var n in e)"default"!==n&&!Object.prototype.hasOwnProperty.call(r,n)&&t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(mt(),e)}),yt=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Resource=void 0;var t=Ue(),r=it(),n=vt(),o=class{constructor(e){this.attributes=e}static empty(){return o.EMPTY}static default(){return new o({[t.ResourceAttributes.SERVICE_NAME]:n.defaultServiceName(),[t.ResourceAttributes.TELEMETRY_SDK_LANGUAGE]:r.SDK_INFO[t.ResourceAttributes.TELEMETRY_SDK_LANGUAGE],[t.ResourceAttributes.TELEMETRY_SDK_NAME]:r.SDK_INFO[t.ResourceAttributes.TELEMETRY_SDK_NAME],[t.ResourceAttributes.TELEMETRY_SDK_VERSION]:r.SDK_INFO[t.ResourceAttributes.TELEMETRY_SDK_VERSION]})}merge(e){if(!e||!Object.keys(e.attributes).length)return this;let t=Object.assign({},this.attributes,e.attributes);return new o(t)}};e.Resource=o,o.EMPTY=new o({})}),St=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),wt=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),Et=v(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__exportStar||function(e,r){for(var n in e)"default"!==n&&!Object.prototype.hasOwnProperty.call(r,n)&&t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(yt(),e),r(vt(),e),r(St(),e),r(wt(),e)}),_t=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MultiSpanProcessor=void 0;var t=it();e.MultiSpanProcessor=class{constructor(e){this._spanProcessors=e}forceFlush(){let e=[];for(let t of this._spanProcessors)e.push(t.forceFlush());return new Promise(r=>{Promise.all(e).then(()=>{r()}).catch(e=>{t.globalErrorHandler(e||new Error("MultiSpanProcessor: forceFlush failed")),r()})})}onStart(e,t){for(let r of this._spanProcessors)r.onStart(e,t)}onEnd(e){for(let t of this._spanProcessors)t.onEnd(e)}shutdown(){let e=[];for(let t of this._spanProcessors)e.push(t.shutdown());return new Promise((t,r)=>{Promise.all(e).then(()=>{t()},r)})}}}),bt=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NoopSpanProcessor=void 0,e.NoopSpanProcessor=class{onStart(e,t){}onEnd(e){}shutdown(){return Promise.resolve()}forceFlush(){return Promise.resolve()}}}),Pt=v((e,t)=>{var r="__lodash_hash_undefined__",n=9007199254740991,o="[object Arguments]",i="[object Function]",s="[object Object]",a=/^\[object .+?Constructor\]$/,c=/^(?:0|[1-9]\d*)$/,l={};l["[object Float32Array]"]=l["[object Float64Array]"]=l["[object Int8Array]"]=l["[object Int16Array]"]=l["[object Int32Array]"]=l["[object Uint8Array]"]=l["[object Uint8ClampedArray]"]=l["[object Uint16Array]"]=l["[object Uint32Array]"]=!0,l[o]=l["[object Array]"]=l["[object ArrayBuffer]"]=l["[object Boolean]"]=l["[object DataView]"]=l["[object Date]"]=l["[object Error]"]=l[i]=l["[object Map]"]=l["[object Number]"]=l[s]=l["[object RegExp]"]=l["[object Set]"]=l["[object String]"]=l["[object WeakMap]"]=!1;var u,d="object"==typeof global&&global&&global.Object===Object&&global,p="object"==typeof self&&self&&self.Object===Object&&self,h=d||p||Function("return this")(),f="object"==typeof e&&e&&!e.nodeType&&e,g=f&&"object"==typeof t&&t&&!t.nodeType&&t,m=g&&g.exports===f,v=m&&d.process,y=function(){try{return g&&g.require&&g.require("util").types||v&&v.binding&&v.binding("util")}catch{}}(),S=y&&y.isTypedArray,w=Array.prototype,E=Function.prototype,_=Object.prototype,b=h["__core-js_shared__"],P=E.toString,T=_.hasOwnProperty,C=(u=/[^.]+$/.exec(b&&b.keys&&b.keys.IE_PROTO||""))?"Symbol(src)_1."+u:"",I=_.toString,O=P.call(Object),N=RegExp("^"+P.call(T).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),R=m?h.Buffer:void 0,A=h.Symbol,D=h.Uint8Array,x=(R&&R.allocUnsafe,function(e,t){return function(r){return e(t(r))}}(Object.getPrototypeOf,Object)),k=Object.create,j=_.propertyIsEnumerable,M=w.splice,L=A?A.toStringTag:void 0,F=function(){try{var e=ie(Object,"defineProperty");return e({},"",{}),e}catch{}}(),U=R?R.isBuffer:void 0,$=Math.max,B=Date.now,V=ie(h,"Map"),H=ie(Object,"create"),q=function(){function e(){}return function(t){if(!ve(t))return{};if(k)return k(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function z(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function W(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function G(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function K(e){var t=this.__data__=new W(e);this.size=t.size}function X(e,t,r){(void 0!==r&&!ue(e[t],r)||void 0===r&&!(t in e))&&Y(e,t,r)}function J(e,t,r){var n=e[t];(!T.call(e,t)||!ue(n,r)||void 0===r&&!(t in e))&&Y(e,t,r)}function Q(e,t){for(var r=e.length;r--;)if(ue(e[r][0],t))return r;return-1}function Y(e,t,r){"__proto__"==t&&F?F(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}z.prototype.clear=function(){this.__data__=H?H(null):{},this.size=0},z.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},z.prototype.get=function(e){var t=this.__data__;if(H){var n=t[e];return n===r?void 0:n}return T.call(t,e)?t[e]:void 0},z.prototype.has=function(e){var t=this.__data__;return H?void 0!==t[e]:T.call(t,e)},z.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=H&&void 0===t?r:t,this},W.prototype.clear=function(){this.__data__=[],this.size=0},W.prototype.delete=function(e){var t=this.__data__,r=Q(t,e);return!(r<0||(r==t.length-1?t.pop():M.call(t,r,1),--this.size,0))},W.prototype.get=function(e){var t=this.__data__,r=Q(t,e);return r<0?void 0:t[r][1]},W.prototype.has=function(e){return Q(this.__data__,e)>-1},W.prototype.set=function(e,t){var r=this.__data__,n=Q(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this},G.prototype.clear=function(){this.size=0,this.__data__={hash:new z,map:new(V||W),string:new z}},G.prototype.delete=function(e){var t=oe(this,e).delete(e);return this.size-=t?1:0,t},G.prototype.get=function(e){return oe(this,e).get(e)},G.prototype.has=function(e){return oe(this,e).has(e)},G.prototype.set=function(e,t){var r=oe(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},K.prototype.clear=function(){this.__data__=new W,this.size=0},K.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},K.prototype.get=function(e){return this.__data__.get(e)},K.prototype.has=function(e){return this.__data__.has(e)},K.prototype.set=function(e,t){var r=this.__data__;if(r instanceof W){var n=r.__data__;if(!V||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new G(n)}return r.set(e,t),this.size=r.size,this};var Z=function(e,t,r){for(var n=-1,o=Object(e),i=r(e),s=i.length;s--;){var a=i[++n];if(!1===t(o[a],a,o))break}return e};function ee(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":L&&L in Object(e)?function(e){var t=T.call(e,L),r=e[L];try{e[L]=void 0;var n=!0}catch{}var o=I.call(e);return n&&(t?e[L]=r:delete e[L]),o}(e):function(e){return I.call(e)}(e)}function te(e){return ye(e)&&ee(e)==o}function re(e,t,r,n,o){e!==t&&Z(t,function(i,a){if(o||(o=new K),ve(i))!function(e,t,r,n,o,i,a){var c=ce(e,r),l=ce(t,r),u=a.get(l);if(u)X(e,r,u);else{var d=i?i(c,l,r+"",e,t,a):void 0,p=void 0===d;if(p){var h=pe(l),f=!h&&fe(l),g=!h&&!f&&Se(l);d=l,h||f||g?pe(c)?d=c:function(e){return ye(e)&&he(e)}(c)?d=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}(c):f?(p=!1,d=function(e){return e.slice()}(l)):g?(p=!1,d=function(e){var t=function(e){var t=new e.constructor(e.byteLength);return new D(t).set(new D(e)),t}(e.buffer);return new e.constructor(t,e.byteOffset,e.length)}(l)):d=[]:function(e){if(!ye(e)||ee(e)!=s)return!1;var t=x(e);if(null===t)return!0;var r=T.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&P.call(r)==O}(l)||de(l)?(d=c,de(c)?d=function(e){return function(e,t,r){var n=!r;r||(r={});for(var o=-1,i=t.length;++o<i;){var s=t[o],a=void 0;void 0===a&&(a=e[s]),n?Y(r,s,a):J(r,s,a)}return r}(e,we(e))}(c):(!ve(c)||ge(c))&&(d=function(e){return"function"!=typeof e.constructor||ae(e)?{}:q(x(e))}(l))):p=!1}p&&(a.set(l,d),o(d,l,n,i,a),a.delete(l)),X(e,r,d)}}(e,t,a,r,re,n,o);else{var c=n?n(ce(e,a),i,a+"",e,t,o):void 0;void 0===c&&(c=i),X(e,a,c)}},we)}var ne=F?function(e,t){return F(e,"toString",{configurable:!0,enumerable:!1,value:_e(t),writable:!0})}:be;function oe(e,t){var r=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?r["string"==typeof t?"string":"hash"]:r.map}function ie(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!ve(e)||function(e){return!!C&&C in e}(e))&&(ge(e)?N:a).test(function(e){if(null!=e){try{return P.call(e)}catch{}try{return e+""}catch{}}return""}(e))}(r)?r:void 0}function se(e,t){var r=typeof e;return!!(t=t??n)&&("number"==r||"symbol"!=r&&c.test(e))&&e>-1&&e%1==0&&e<t}function ae(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||_)}function ce(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var le=function(e){var t=0,r=0;return function(){var n=B(),o=16-(n-r);if(r=n,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(ne);function ue(e,t){return e===t||e!=e&&t!=t}var de=te(function(){return arguments}())?te:function(e){return ye(e)&&T.call(e,"callee")&&!j.call(e,"callee")},pe=Array.isArray;function he(e){return null!=e&&me(e.length)&&!ge(e)}var fe=U||function(){return!1};function ge(e){if(!ve(e))return!1;var t=ee(e);return t==i||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function me(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=n}function ve(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ye(e){return null!=e&&"object"==typeof e}var Se=S?function(e){return function(t){return e(t)}}(S):function(e){return ye(e)&&me(e.length)&&!!l[ee(e)]};function we(e){return he(e)?function(e,t){var r=pe(e),n=!r&&de(e),o=!r&&!n&&fe(e),i=!r&&!n&&!o&&Se(e),s=r||n||o||i,a=s?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],c=a.length;for(var l in e)(t||T.call(e,l))&&(!s||!("length"==l||o&&("offset"==l||"parent"==l)||i&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||se(l,c)))&&a.push(l);return a}(e,!0):function(e){if(!ve(e))return function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}(e);var t=ae(e),r=[];for(var n in e)"constructor"==n&&(t||!T.call(e,n))||r.push(n);return r}(e)}var Ee=function(e){return function(e,t){return le(function(e,t,r){return t=$(void 0===t?e.length-1:t,0),function(){for(var n=arguments,o=-1,i=$(n.length-t,0),s=Array(i);++o<i;)s[o]=n[t+o];o=-1;for(var a=Array(t+1);++o<t;)a[o]=n[o];return a[t]=r(s),function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}(e,this,a)}}(e,t,be),e+"")}(function(t,r){var n=-1,o=r.length,i=o>1?r[o-1]:void 0,s=o>2?r[2]:void 0;for(i=e.length>3&&"function"==typeof i?(o--,i):void 0,s&&function(e,t,r){if(!ve(r))return!1;var n=typeof t;return!!("number"==n?he(r)&&se(t,r.length):"string"==n&&t in r)&&ue(r[t],e)}(r[0],r[1],s)&&(i=o<3?void 0:i,o=1),t=Object(t);++n<o;){var a=r[n];a&&e(t,a,n)}return t})}(function(e,t,r){re(e,t,r)});function _e(e){return function(){return e}}function be(e){return e}t.exports=Ee}),Tt=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BatchSpanProcessorBase=void 0;var t=we(),r=it();e.BatchSpanProcessorBase=class{constructor(e,t){this._exporter=e,this._finishedSpans=[],this._isShutdown=!1,this._shuttingDownPromise=Promise.resolve();let n=r.getEnv();this._maxExportBatchSize="number"==typeof(null==t?void 0:t.maxExportBatchSize)?t.maxExportBatchSize:n.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize="number"==typeof(null==t?void 0:t.maxQueueSize)?t.maxQueueSize:n.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis="number"==typeof(null==t?void 0:t.scheduledDelayMillis)?t.scheduledDelayMillis:n.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis="number"==typeof(null==t?void 0:t.exportTimeoutMillis)?t.exportTimeoutMillis:n.OTEL_BSP_EXPORT_TIMEOUT}forceFlush(){return this._isShutdown?this._shuttingDownPromise:this._flushAll()}onStart(e){}onEnd(e){this._isShutdown||this._addToBuffer(e)}shutdown(){return this._isShutdown||(this._isShutdown=!0,this._shuttingDownPromise=new Promise((e,t)=>{Promise.resolve().then(()=>this.onShutdown()).then(()=>this._flushAll()).then(()=>this._exporter.shutdown()).then(e).catch(e=>{t(e)})})),this._shuttingDownPromise}_addToBuffer(e){this._finishedSpans.length>=this._maxQueueSize||(this._finishedSpans.push(e),this._maybeStartTimer())}_flushAll(){return new Promise((e,t)=>{let r=[];for(let e=0,t=Math.ceil(this._finishedSpans.length/this._maxExportBatchSize);e<t;e++)r.push(this._flushOneBatch());Promise.all(r).then(()=>{e()}).catch(t)})}_flushOneBatch(){return this._clearTimer(),0===this._finishedSpans.length?Promise.resolve():new Promise((e,n)=>{let o=setTimeout(()=>{n(new Error("Timeout"))},this._exportTimeoutMillis);t.context.with(r.suppressTracing(t.context.active()),()=>{this._exporter.export(this._finishedSpans.splice(0,this._maxExportBatchSize),t=>{var i;clearTimeout(o),t.code===r.ExportResultCode.SUCCESS?e():n(null!==(i=t.error)&&void 0!==i?i:new Error("BatchSpanProcessor: span export failed"))})})})}_maybeStartTimer(){void 0===this._timer&&(this._timer=setTimeout(()=>{this._flushOneBatch().then(()=>{this._finishedSpans.length>0&&(this._clearTimer(),this._maybeStartTimer())}).catch(e=>{r.globalErrorHandler(e)})},this._scheduledDelayMillis),r.unrefTimer(this._timer))}_clearTimer(){void 0!==this._timer&&(clearTimeout(this._timer),this._timer=void 0)}}}),Ct=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BatchSpanProcessor=void 0;var t=Tt(),r=class extends t.BatchSpanProcessorBase{onShutdown(){}};e.BatchSpanProcessor=r}),It=v(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__exportStar||function(e,r){for(var n in e)"default"!==n&&!Object.prototype.hasOwnProperty.call(r,n)&&t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(Ct(),e)}),Ot=v(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__exportStar||function(e,r){for(var n in e)"default"!==n&&!Object.prototype.hasOwnProperty.call(r,n)&&t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(It(),e)}),Nt=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BasicTracerProvider=e.ForceFlushState=void 0;var t,r,n=we(),o=it(),i=Et(),s=Ft(),a=ct(),c=_t(),l=bt(),u=Pt(),d=Ot();(r=t=e.ForceFlushState||(e.ForceFlushState={}))[r.resolved=0]="resolved",r[r.timeout=1]="timeout",r[r.error=2]="error",r[r.unresolved=3]="unresolved";var p=class{constructor(e={}){var t;this._registeredSpanProcessors=[],this._tracers=new Map;let r=u({},a.DEFAULT_CONFIG,e);this.resource=null!==(t=r.resource)&&void 0!==t?t:i.Resource.empty(),this.resource=i.Resource.default().merge(this.resource),this._config=Object.assign({},r,{resource:this.resource});let n=this._buildExporterFromEnv();if(void 0!==n){let e=new d.BatchSpanProcessor(n);this.activeSpanProcessor=e}else this.activeSpanProcessor=new l.NoopSpanProcessor}getTracer(e,t){let r=`${e}@${t||""}`;return this._tracers.has(r)||this._tracers.set(r,new s.Tracer({name:e,version:t},this._config,this)),this._tracers.get(r)}addSpanProcessor(e){0===this._registeredSpanProcessors.length&&this.activeSpanProcessor.shutdown().catch(e=>n.diag.error("Error while trying to shutdown current span processor",e)),this._registeredSpanProcessors.push(e),this.activeSpanProcessor=new c.MultiSpanProcessor(this._registeredSpanProcessors)}getActiveSpanProcessor(){return this.activeSpanProcessor}register(e={}){n.trace.setGlobalTracerProvider(this),void 0===e.propagator&&(e.propagator=this._buildPropagatorFromEnv()),e.contextManager&&n.context.setGlobalContextManager(e.contextManager),e.propagator&&n.propagation.setGlobalPropagator(e.propagator)}forceFlush(){let e=this._config.forceFlushTimeoutMillis,r=this._registeredSpanProcessors.map(r=>new Promise(n=>{let o,i=setTimeout(()=>{n(new Error(`Span processor did not completed within timeout period of ${e} ms`)),o=t.timeout},e);r.forceFlush().then(()=>{clearTimeout(i),o!==t.timeout&&(o=t.resolved,n(o))}).catch(e=>{clearTimeout(i),o=t.error,n(e)})}));return new Promise((e,n)=>{Promise.all(r).then(r=>{let o=r.filter(e=>e!==t.resolved);o.length>0?n(o):e()}).catch(e=>n([e]))})}shutdown(){return this.activeSpanProcessor.shutdown()}_getPropagator(e){var t;return null===(t=p._registeredPropagators.get(e))||void 0===t?void 0:t()}_getSpanExporter(e){var t;return null===(t=p._registeredExporters.get(e))||void 0===t?void 0:t()}_buildPropagatorFromEnv(){let e=Array.from(new Set(o.getEnv().OTEL_PROPAGATORS)),t=e.map(e=>{let t=this._getPropagator(e);return t||n.diag.warn(`Propagator "${e}" requested through environment variable is unavailable.`),t}).reduce((e,t)=>(t&&e.push(t),e),[]);if(0!==t.length)return 1===e.length?t[0]:new o.CompositePropagator({propagators:t})}_buildExporterFromEnv(){let e=o.getEnv().OTEL_TRACES_EXPORTER;if("none"===e)return;let t=this._getSpanExporter(e);return t||n.diag.error(`Exporter "${e}" requested through environment variable is unavailable.`),t}};e.BasicTracerProvider=p,p._registeredPropagators=new Map([["tracecontext",()=>new o.HttpTraceContextPropagator],["baggage",()=>new o.HttpBaggagePropagator]]),p._registeredExporters=new Map}),Rt=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConsoleSpanExporter=void 0;var t=it();e.ConsoleSpanExporter=class{export(e,t){return this._sendSpans(e,t)}shutdown(){return this._sendSpans([]),Promise.resolve()}_exportInfo(e){return{traceId:e.spanContext().traceId,parentId:e.parentSpanId,name:e.name,id:e.spanContext().spanId,kind:e.kind,timestamp:t.hrTimeToMicroseconds(e.startTime),duration:t.hrTimeToMicroseconds(e.duration),attributes:e.attributes,status:e.status,events:e.events}}_sendSpans(e,r){for(let t of e)console.log(this._exportInfo(t));if(r)return r({code:t.ExportResultCode.SUCCESS})}}}),At=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemorySpanExporter=void 0;var t=it();e.InMemorySpanExporter=class{constructor(){this._finishedSpans=[],this._stopped=!1}export(e,r){if(this._stopped)return r({code:t.ExportResultCode.FAILED,error:new Error("Exporter has been stopped")});this._finishedSpans.push(...e),setTimeout(()=>r({code:t.ExportResultCode.SUCCESS}),0)}shutdown(){return this._stopped=!0,this._finishedSpans=[],Promise.resolve()}reset(){this._finishedSpans=[]}getFinishedSpans(){return this._finishedSpans}}}),Dt=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),xt=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SimpleSpanProcessor=void 0;var t=we(),r=it();e.SimpleSpanProcessor=class{constructor(e){this._exporter=e,this._isShutdown=!1,this._shuttingDownPromise=Promise.resolve()}forceFlush(){return Promise.resolve()}onStart(e){}onEnd(e){this._isShutdown||t.context.with(r.suppressTracing(t.context.active()),()=>{this._exporter.export([e],e=>{var t;e.code!==r.ExportResultCode.SUCCESS&&r.globalErrorHandler(null!==(t=e.error)&&void 0!==t?t:new Error(`SimpleSpanProcessor: span export failed (status ${e})`))})})}shutdown(){return this._isShutdown||(this._isShutdown=!0,this._shuttingDownPromise=new Promise((e,t)=>{Promise.resolve().then(()=>this._exporter.shutdown()).then(e).catch(e=>{t(e)})})),this._shuttingDownPromise}}}),kt=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),jt=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),Mt=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),Lt=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),Ft=v(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__exportStar||function(e,r){for(var n in e)"default"!==n&&!Object.prototype.hasOwnProperty.call(r,n)&&t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(ut(),e),r(Nt(),e),r(Ot(),e),r(Rt(),e),r(At(),e),r(Dt(),e),r(xt(),e),r(kt(),e),r(bt(),e),r(at(),e),r(jt(),e),r(Mt(),e),r(Lt(),e)}),Ut=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.azureCoreTracing=e.AzureMonitorSymbol=void 0;var t=T();e.AzureMonitorSymbol="Azure_Monitor_Tracer";var r=!1;e.azureCoreTracing={versionSpecifier:">= 1.0.0 < 2.0.0",patch:function(n){if(r)return n;try{var o=Ft(),i=we(),s=(new o.BasicTracerProvider).getTracer("applicationinsights tracer"),a=n.setTracer;n.setTracer=function(r){var n=r.startSpan;r.startSpan=function(e,r,o){var i=n.call(this,e,r,o),s=i.end;return i.end=function(){var e=s.apply(this,arguments);return t.channel.publish("azure-coretracing",i),e},i},r[e.AzureMonitorSymbol]=!0,a.call(this,r)},i.trace.getSpan(i.context.active()),n.setTracer(s),r=!0}catch{}return n}},e.enable=function(){t.channel.registerMonkeyPatch("@azure/core-tracing",e.azureCoreTracing)}}),$t=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.bunyan=void 0;var t=T();e.bunyan={versionSpecifier:">= 1.0.0 < 2.0.0",patch:function(e){var r=e.prototype._emit;return e.prototype._emit=function(e,n){var o=r.apply(this,arguments);if(!n){var i=o;i||(i=r.call(this,e,!0)),t.channel.publish("bunyan",{level:e.level,result:i})}return o},e}},e.enable=function(){t.channel.registerMonkeyPatch("bunyan",e.bunyan)}}),Bt=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.console=void 0;var t=T(),n=r(2203);e.console={versionSpecifier:">= 4.0.0",patch:function(e){var r=new n.Writable,o=new n.Writable;r.write=function(e){if(!e)return!0;var r=e.toString();return t.channel.publish("console",{message:r}),!0},o.write=function(e){if(!e)return!0;var r=e.toString();return t.channel.publish("console",{message:r,stderr:!0}),!0};for(var i=new e.Console(r,o),s=function(t){var r=e[t];r&&(e[t]=function(){if(i[t])try{i[t].apply(i,arguments)}catch{}return r.apply(e,arguments)})},a=0,c=["log","info","warn","error","dir","time","timeEnd","trace","assert"];a<c.length;a++)s(c[a]);return e}},e.enable=function(){t.channel.registerMonkeyPatch("console",e.console),r(4236)}}),Vt=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.mongoCore=void 0;var t=T();e.mongoCore={versionSpecifier:">= 2.0.0 < 4.0.0",patch:function(e){var r=e.Server.prototype.connect;return e.Server.prototype.connect=function(){var e=r.apply(this,arguments),n=this.s.pool.write;this.s.pool.write=function(){var e="function"==typeof arguments[1]?1:2;return"function"==typeof arguments[e]&&(arguments[e]=t.channel.bindToContext(arguments[e])),n.apply(this,arguments)};var o=this.s.pool.logout;return this.s.pool.logout=function(){return"function"==typeof arguments[1]&&(arguments[1]=t.channel.bindToContext(arguments[1])),o.apply(this,arguments)},e},e}},e.enable=function(){t.channel.registerMonkeyPatch("mongodb-core",e.mongoCore)}}),Ht=v(e=>{"use strict";var t=e&&e.__assign||function(){return t=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},t.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.mongo330=e.mongo3=e.mongo2=void 0;var r=T();e.mongo2={versionSpecifier:">= 2.0.0 <= 3.0.5",patch:function(e){var n=e.instrument({operationIdGenerator:{next:function(){return r.channel.bindToContext(function(e){return e()})}}}),o={};return n.on("started",function(e){o[e.requestId]||(o[e.requestId]=t(t({},e),{time:new Date}))}),n.on("succeeded",function(e){var t=o[e.requestId];t&&delete o[e.requestId],"function"==typeof e.operationId?e.operationId(function(){return r.channel.publish("mongodb",{startedData:t,event:e,succeeded:!0})}):r.channel.publish("mongodb",{startedData:t,event:e,succeeded:!0})}),n.on("failed",function(e){var t=o[e.requestId];t&&delete o[e.requestId],"function"==typeof e.operationId?e.operationId(function(){return r.channel.publish("mongodb",{startedData:t,event:e,succeeded:!1})}):r.channel.publish("mongodb",{startedData:t,event:e,succeeded:!1})}),e}},e.mongo3={versionSpecifier:"> 3.0.5 < 3.3.0",patch:function(e){var n=e.instrument(),o={},i={};return n.on("started",function(e){o[e.requestId]||(i[e.requestId]=r.channel.bindToContext(function(e){return e()}),o[e.requestId]=t(t({},e),{time:new Date}))}),n.on("succeeded",function(e){var t=o[e.requestId];t&&delete o[e.requestId],"object"==typeof e&&"function"==typeof i[e.requestId]&&(i[e.requestId](function(){return r.channel.publish("mongodb",{startedData:t,event:e,succeeded:!0})}),delete i[e.requestId])}),n.on("failed",function(e){var t=o[e.requestId];t&&delete o[e.requestId],"object"==typeof e&&"function"==typeof i[e.requestId]&&(i[e.requestId](function(){return r.channel.publish("mongodb",{startedData:t,event:e,succeeded:!1})}),delete i[e.requestId])}),e}},e.mongo330={versionSpecifier:">= 3.3.0 < 4.0.0",patch:function(e){!function(e){var t=e.Server.prototype.connect;e.Server.prototype.connect=function(){var e=t.apply(this,arguments),n=this.s.coreTopology.s.pool.write;this.s.coreTopology.s.pool.write=function(){var e="function"==typeof arguments[1]?1:2;return"function"==typeof arguments[e]&&(arguments[e]=r.channel.bindToContext(arguments[e])),n.apply(this,arguments)};var o=this.s.coreTopology.s.pool.logout;return this.s.coreTopology.s.pool.logout=function(){return"function"==typeof arguments[1]&&(arguments[1]=r.channel.bindToContext(arguments[1])),o.apply(this,arguments)},e}}(e);var t=e.instrument(),n={},o={};return t.on("started",function(e){n[e.requestId]||(o[e.requestId]=r.channel.bindToContext(function(e){return e()}),n[e.requestId]=e)}),t.on("succeeded",function(e){var t=n[e.requestId];t&&delete n[e.requestId],"object"==typeof e&&"function"==typeof o[e.requestId]&&(o[e.requestId](function(){return r.channel.publish("mongodb",{startedData:t,event:e,succeeded:!0})}),delete o[e.requestId])}),t.on("failed",function(e){var t=n[e.requestId];t&&delete n[e.requestId],"object"==typeof e&&"function"==typeof o[e.requestId]&&(o[e.requestId](function(){return r.channel.publish("mongodb",{startedData:t,event:e,succeeded:!1})}),delete o[e.requestId])}),e}},e.enable=function(){r.channel.registerMonkeyPatch("mongodb",e.mongo2),r.channel.registerMonkeyPatch("mongodb",e.mongo3),r.channel.registerMonkeyPatch("mongodb",e.mongo330)}}),qt=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.mysql=void 0;var t=T(),n=r(6928);e.mysql={versionSpecifier:">= 2.0.0 < 3.0.0",patch:function(e,o){var i=function(e,r){return function(r,n){var o=e[r];o&&(e[r]=function(){for(var e=arguments.length-1,r=arguments.length-1;r>=0;--r){if("function"==typeof arguments[r]){e=r;break}if(typeof arguments[r]<"u")break}var i=arguments[e],s={result:null,startTime:null,startDate:null};"function"==typeof i&&(n?(s.startTime=process.hrtime(),s.startDate=new Date,arguments[e]=t.channel.bindToContext(n(s,i))):arguments[e]=t.channel.bindToContext(i));var a=o.apply(this,arguments);return s.result=a,a})}},s=function(e,t){return i(e.prototype)},a=r(6011)(n.dirname(o)+"/lib/Connection");["connect","changeUser","ping","statistics","end"].forEach(function(e){return s(a)(e)}),i(a)("createQuery",function(e,r){return function(n){var o=process.hrtime(e.startTime),i=1e3*o[0]+o[1]/1e6|0;t.channel.publish("mysql",{query:e.result,callbackArgs:arguments,err:n,duration:i,time:e.startDate}),r.apply(this,arguments)}});var c=r(4545)(n.dirname(o)+"/lib/Pool");return["_enqueueCallback"].forEach(function(e){return s(c)(e)}),e}},e.enable=function(){t.channel.registerMonkeyPatch("mysql",e.mysql)}}),zt=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.postgresPool1=void 0;var t=T();e.postgresPool1={versionSpecifier:">= 1.0.0 < 3.0.0",patch:function(e){var r=e.prototype.connect;return e.prototype.connect=function(e){return e&&(arguments[0]=t.channel.bindToContext(e)),r.apply(this,arguments)},e}},e.enable=function(){t.channel.registerMonkeyPatch("pg-pool",e.postgresPool1)}}),Wt=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.postgres7=e.postgres6=void 0;var t=T(),n=r(4434);e.postgres6={versionSpecifier:"6.*",patch:function(e,r){var o=e.Client.prototype.query,i="__diagnosticOriginalFunc";return e.Client.prototype.query=function(e,r,s){var a,c={query:{},database:{host:this.connectionParameters.host,port:this.connectionParameters.port},result:null,error:null,duration:0,time:new Date},l=process.hrtime();function u(e){e&&e[i]&&(e=e[i]);var r=t.channel.bindToContext(function(r,o){var i=process.hrtime(l);if(c.result=o&&{rowCount:o.rowCount,command:o.command},c.error=r,c.duration=Math.ceil(1e3*i[0]+i[1]/1e6),t.channel.publish("postgres",c),r){if(e)return e.apply(this,arguments);a&&a instanceof n.EventEmitter&&a.emit("error",r)}else e&&e.apply(this,arguments)});try{return Object.defineProperty(r,i,{value:e}),r}catch{return e}}try{"string"==typeof e?r instanceof Array?(c.query.preparable={text:e,args:r},s=u(s)):(c.query.text=e,s?s=u(s):r=u(r)):("string"==typeof e.name?c.query.plan=e.name:e.values instanceof Array?c.query.preparable={text:e.text,args:e.values}:c.query.text=e.text,s?s=u(s):r?r=u(r):e.callback=u(e.callback))}catch{return o.apply(this,arguments)}return arguments[0]=e,arguments[1]=r,arguments[2]=s,arguments.length=arguments.length>3?arguments.length:3,a=o.apply(this,arguments)},e}},e.postgres7={versionSpecifier:">=7.* <=8.*",patch:function(e,r){var o=e.Client.prototype.query,i="__diagnosticOriginalFunc";return e.Client.prototype.query=function(e,r,s){var a,c=this,l=!!s,u={query:{},database:{host:this.connectionParameters.host,port:this.connectionParameters.port},result:null,error:null,duration:0,time:new Date},d=process.hrtime();function p(e){e&&e[i]&&(e=e[i]);var r=t.channel.bindToContext(function(r,o){var i=process.hrtime(d);if(u.result=o&&{rowCount:o.rowCount,command:o.command},u.error=r,u.duration=Math.ceil(1e3*i[0]+i[1]/1e6),t.channel.publish("postgres",u),r){if(e)return e.apply(this,arguments);a&&a instanceof n.EventEmitter&&a.emit("error",r)}else e&&e.apply(this,arguments)});try{return Object.defineProperty(r,i,{value:e}),r}catch{return e}}try{"string"==typeof e?r instanceof Array?(u.query.preparable={text:e,args:r},s=(l="function"==typeof s)?p(s):s):(u.query.text=e,s?s=(l="function"==typeof s)?p(s):s:r=(l="function"==typeof r)?p(r):r):("string"==typeof e.name?u.query.plan=e.name:e.values instanceof Array?u.query.preparable={text:e.text,args:e.values}:u.query.text=e.text,s?(l="function"==typeof s,s=p(s)):r?r=(l="function"==typeof r)?p(r):r:(l="function"==typeof e.callback,e.callback=l?p(e.callback):e.callback))}catch{return o.apply(this,arguments)}return arguments[0]=e,arguments[1]=r,arguments[2]=s,arguments.length=arguments.length>3?arguments.length:3,a=o.apply(this,arguments),l?a:a.then(function(e){return p()(void 0,e),new c._Promise(function(t,r){t(e)})}).catch(function(e){return p()(e,void 0),new c._Promise(function(t,r){r(e)})})},e}},e.enable=function(){t.channel.registerMonkeyPatch("pg",e.postgres6),t.channel.registerMonkeyPatch("pg",e.postgres7)}}),Gt=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.redis=void 0;var t=T();e.redis={versionSpecifier:">= 2.0.0 < 4.0.0",patch:function(e){var r=e.RedisClient.prototype.internal_send_command;return e.RedisClient.prototype.internal_send_command=function(e){if(e){var n=e.callback;if(!n||!n.pubsubBound){var o=this.address,i=process.hrtime(),s=new Date;e.callback=t.channel.bindToContext(function(r,a){var c=process.hrtime(i),l=1e3*c[0]+c[1]/1e6|0;t.channel.publish("redis",{duration:l,address:o,commandObj:e,err:r,result:a,time:s}),"function"==typeof n&&n.apply(this,arguments)}),e.callback.pubsubBound=!0}}return r.call(this,e)},e}},e.enable=function(){t.channel.registerMonkeyPatch("redis",e.redis)}}),Kt=v(e=>{"use strict";var t=e&&e.__assign||function(){return t=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},t.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.tedious=void 0;var r=T();e.tedious={versionSpecifier:">= 6.0.0 < 9.0.0",patch:function(e){var n=e.Connection.prototype.makeRequest;return e.Connection.prototype.makeRequest=function(){var e,o,i,s=arguments[0];arguments[0].callback=(e=s.callback,o=process.hrtime(),i={query:{},database:{host:null,port:null},result:null,error:null,duration:0},r.channel.bindToContext(function(n,s,a){var c=process.hrtime(o);i=t(t({},i),{database:{host:this.connection.config.server,port:this.connection.config.options.port},result:!n&&{rowCount:s,rows:a},query:{text:this.parametersByName.statement.value},error:n,duration:Math.ceil(1e3*c[0]+c[1]/1e6)}),r.channel.publish("tedious",i),e.call(this,n,s,a)})),n.apply(this,arguments)},e}},e.enable=function(){r.channel.registerMonkeyPatch("tedious",e.tedious)}}),Xt=v(e=>{"use strict";var t,r=e&&e.__extends||(t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,r)},function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}),n=e&&e.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]])}return r};Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.winston2=e.winston3=void 0;var o=T();e.winston3={versionSpecifier:"3.x",patch:function(e){var t=function(e){function t(t,r){var n=e.call(this,r)||this;return n.winston=t,n}return r(t,e),t.prototype.log=function(e,t){var r=e.message,i=e.level,s=e.meta,a=n(e,["message","level","meta"]);i="function"==typeof Symbol.for?e[Symbol.for("level")]:i,r=e instanceof Error?e:r;var c=function(e,t){return null!=e.config.npm.levels[t]?"npm":null!=e.config.syslog.levels[t]?"syslog":"unknown"}(this.winston,i);for(var l in s=s||{},a)a.hasOwnProperty(l)&&(s[l]=a[l]);o.channel.publish("winston",{message:r,level:i,levelKind:c,meta:s}),t()},t}(e.Transport);function i(){var r,n=arguments[0].levels||e.config.npm.levels;for(var o in n)n.hasOwnProperty(o)&&(r=void 0===r||n[o]>n[r]?o:r);this.add(new t(e,{level:r}))}var s=e.createLogger;e.createLogger=function(){var r,n=arguments[0].levels||e.config.npm.levels;for(var o in n)n.hasOwnProperty(o)&&(r=void 0===r||n[o]>n[r]?o:r);var a=s.apply(this,arguments);a.add(new t(e,{level:r}));var c=a.configure;return a.configure=function(){c.apply(this,arguments),i.apply(this,arguments)},a};var a=e.configure;return e.configure=function(){a.apply(this,arguments),i.apply(this,arguments)},e.add(new t(e)),e}},e.winston2={versionSpecifier:"2.x",patch:function(e){var t,r=e.Logger.prototype.log,n=function(r,n,i){var s;return s=t===e.config.npm.levels?"npm":t===e.config.syslog.levels?"syslog":"unknown",o.channel.publish("winston",{level:r,message:n,meta:i,levelKind:s}),n};return e.Logger.prototype.log=function(){return t=this.levels,this.filters&&0!==this.filters.length?this.filters[this.filters.length-1]!==n&&(this.filters=this.filters.filter(function(e){return e!==n}),this.filters.push(n)):this.filters=[n],r.apply(this,arguments)},e}},e.enable=function(){o.channel.registerMonkeyPatch("winston",e.winston2),o.channel.registerMonkeyPatch("winston",e.winston3)}}),Jt=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.tedious=e.pgPool=e.pg=e.winston=e.redis=e.mysql=e.mongodb=e.mongodbCore=e.console=e.bunyan=e.azuresdk=void 0;var t=Ut();e.azuresdk=t;var r=$t();e.bunyan=r;var n=Bt();e.console=n;var o=Vt();e.mongodbCore=o;var i=Ht();e.mongodb=i;var s=qt();e.mysql=s;var a=zt();e.pgPool=a;var c=Wt();e.pg=c;var l=Gt();e.redis=l;var u=Kt();e.tedious=u;var d=Xt();e.winston=d,e.enable=function(){r.enable(),n.enable(),o.enable(),i.enable(),s.enable(),c.enable(),a.enable(),l.enable(),d.enable(),t.enable(),u.enable()}}),Qt=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerContextPreservation=e.IsInitialized=void 0;var t=E(),r=w();e.IsInitialized=!process.env.APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL;var n,o,i,s,a="DiagnosticChannel";if(e.IsInitialized){for(s in n=Jt(),o=(process.env.APPLICATION_INSIGHTS_NO_PATCH_MODULES||"").split(","),i={bunyan:n.bunyan,console:n.console,mongodb:n.mongodb,mongodbCore:n.mongodbCore,mysql:n.mysql,redis:n.redis,pg:n.pg,pgPool:n.pgPool,winston:n.winston,azuresdk:n.azuresdk})-1===o.indexOf(s)&&(i[s].enable(),r.info(a,"Subscribed to "+s+" events"));o.length>0&&r.info(a,"Some modules will not be patched",o)}else r.info(a,"Not subscribing to dependency autocollection because APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL was set");e.registerContextPreservation=function(r){if(e.IsInitialized){var n=T();n.channel.addContextPreservation(r),n.channel.spanContextPropagator=t.AsyncScopeManager}}}),Yt=v((e,t)=>{"use strict";t.exports={requestContextHeader:"request-context",requestContextSourceKey:"appId",requestContextTargetKey:"appId",requestIdHeader:"request-id",parentIdHeader:"x-ms-request-id",rootIdHeader:"x-ms-request-root-id",correlationContextHeader:"correlation-context",traceparentHeader:"traceparent",traceStateHeader:"tracestate"}}),Zt=v((e,t)=>{"use strict";var n=e&&e.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=r(8611),i=r(5692),s=r(7016),a=r(9140),c=w(),l=Yt(),u=function(){function e(){}return e.getCookie=function(t,r){var n="";if(t&&t.length&&"string"==typeof r)for(var o=t+"=",i=r.split(";"),s=0;s<i.length;s++)if(r=i[s],(r=e.trim(r))&&0===r.indexOf(o)){n=r.substring(o.length,i[s].length);break}return n},e.trim=function(e){return"string"==typeof e?e.replace(/^\s+|\s+$/g,""):""},e.int32ArrayToBase64=function(e){var t=function(e,t){return String.fromCharCode(e>>t&255)},r=e.map(function(e){return t(e,24)+t(e,16)+t(e,8)+t(e,0)}).join(""),n=(Buffer.from?Buffer.from(r,"binary"):new Buffer(r,"binary")).toString("base64");return n.substr(0,n.indexOf("="))},e.random32=function(){return 4294967296*Math.random()|0},e.randomu32=function(){return e.random32()+2147483648},e.w3cTraceId=function(){for(var t,r=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],n="",o=0;o<4;o++)n+=r[15&(t=e.random32())]+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 i=r[8+4*Math.random()|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+i+n.substr(16,3)+n.substr(19,12)},e.w3cSpanId=function(){return e.w3cTraceId().substring(16)},e.isValidW3CId=function(e){return 32===e.length&&"00000000000000000000000000000000"!==e},e.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},e.isError=function(e){return e instanceof Error},e.isPrimitive=function(e){var t=typeof e;return"string"===t||"number"===t||"boolean"===t},e.isDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)},e.msToTimeSpan=function(e){(isNaN(e)||e<0)&&(e=0);var t=(e/1e3%60).toFixed(7).replace(/0{0,4}$/,""),r=""+Math.floor(e/6e4)%60,n=""+Math.floor(e/36e5)%24,o=Math.floor(e/864e5);return t=t.indexOf(".")<2?"0"+t:t,r=r.length<2?"0"+r:r,(o>0?o+".":"")+(n=n.length<2?"0"+n:n)+":"+r+":"+t},e.extractError=function(e){var t=e;return{message:e.message,code:t.code||t.id||""}},e.extractObject=function(t){return t instanceof Error?e.extractError(t):"function"==typeof t.toJSON?t.toJSON():t},e.validateStringMap=function(t){if("object"==typeof t){var r={};for(var n in t){var o="",i=t[n],s=typeof i;if(e.isPrimitive(i))o=i.toString();else if(null===i||"undefined"===s)o="";else{if("function"===s){c.info("key: "+n+" was function; will not serialize");continue}var a=e.isArray(i)?i:e.extractObject(i);try{o=e.isPrimitive(a)?a:JSON.stringify(a)}catch(e){o=i.constructor.name.toString()+" (Error: "+e.message+")",c.info("key: "+n+", could not be serialized")}}r[n]=o.substring(0,e.MAX_PROPERTY_LENGTH)}return r}c.info("Invalid properties dropped from payload")},e.canIncludeCorrelationHeader=function(e,t){var r=e&&e.config&&e.config.correlationHeaderExcludedDomains;if(!r||0==r.length||!t)return!0;for(var n=0;n<r.length;n++)if(new RegExp(r[n].replace(/\./g,".").replace(/\*/g,".*")).test(s.parse(t).hostname))return!1;return!0},e.getCorrelationContextTarget=function(e,t){var r=e.headers&&e.headers[l.requestContextHeader];if(r)for(var n=r.split(","),o=0;o<n.length;++o){var i=n[o].split("=");if(2==i.length&&i[0]==t)return i[1]}},e.makeRequest=function(t,r,a,l){r&&0===r.indexOf("//")&&(r="https:"+r);var u=s.parse(r),d=n(n({},a),{host:u.hostname,port:u.port,path:u.pathname}),p=void 0;if("https:"===u.protocol&&(p=t.proxyHttpsUrl||void 0),"http:"===u.protocol&&(p=t.proxyHttpUrl||void 0),p){0===p.indexOf("//")&&(p="http:"+p);var h=s.parse(p);"https:"===h.protocol?(c.info("Proxies that use HTTPS are not supported"),p=void 0):d=n(n({},d),{host:h.hostname,port:h.port||"80",path:r,headers:n(n({},d.headers),{Host:u.hostname})})}var f="https:"===u.protocol&&!p;return f&&void 0!==t.httpsAgent?d.agent=t.httpsAgent:f||void 0===t.httpAgent?f&&(d.agent=e.tlsRestrictedAgent):d.agent=t.httpAgent,f?i.request(d,l):o.request(d,l)},e.safeIncludeCorrelationHeader=function(t,r,n){var o;if("string"==typeof n)o=n;else if(n instanceof Array)o=n.join(",");else if(n&&"function"==typeof n.toString)try{o=n.toString()}catch(e){c.warn("Outgoing request-context header could not be read. Correlation of requests may be lost.",e,n)}o?e.addCorrelationIdHeaderFromString(t,r,o):r.setHeader(l.requestContextHeader,l.requestContextSourceKey+"="+t.config.correlationId)},e.dumpObj=function(e){var t=Object.prototype.toString.call(e);return t+("[object Error]"===t?"{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":JSON.stringify(e))},e.addCorrelationIdHeaderFromString=function(e,t,r){var n=r.split(","),o=l.requestContextSourceKey+"=";n.some(function(e){return e.substring(0,o.length)===o})||t.setHeader(l.requestContextHeader,r+","+l.requestContextSourceKey+"="+e.config.correlationId)},e.MAX_PROPERTY_LENGTH=8192,e.tlsRestrictedAgent=new i.Agent({keepAlive:!0,maxSockets:25,secureOptions:a.SSL_OP_NO_SSLv2|a.SSL_OP_NO_SSLv3|a.SSL_OP_NO_TLSv1|a.SSL_OP_NO_TLSv1_1}),e}();t.exports=u}),er=v((e,t)=>{"use strict";var r=Zt(),n=w(),o=function(){function e(){}return e.queryCorrelationId=function(t,o){var i=t.profileQueryEndpoint+"/api/profiles/"+t.instrumentationKey+"/appId";if(e.completedLookups.hasOwnProperty(i))o(e.completedLookups[i]);else if(e.pendingLookups[i])e.pendingLookups[i].push(o);else{e.pendingLookups[i]=[o];var s=function(){if(e.pendingLookups[i]){var o={method:"GET",disableAppInsightsAutoCollection:!0};n.info(e.TAG,o);var a=r.makeRequest(t,i,o,function(r){if(200===r.statusCode){var o="";r.setEncoding("utf-8"),r.on("data",function(e){o+=e}),r.on("end",function(){n.info(e.TAG,o);var t=e.correlationIdPrefix+o;e.completedLookups[i]=t,e.pendingLookups[i]&&e.pendingLookups[i].forEach(function(e){return e(t)}),delete e.pendingLookups[i]})}else r.statusCode>=400&&r.statusCode<500?(e.completedLookups[i]=void 0,delete e.pendingLookups[i]):setTimeout(s,t.correlationIdRetryIntervalMs)});a&&(a.on("error",function(t){n.warn(e.TAG,t)}),a.end())}};setTimeout(s,0)}},e.cancelCorrelationIdQuery=function(t,r){var n=t.profileQueryEndpoint+"/api/profiles/"+t.instrumentationKey+"/appId",o=e.pendingLookups[n];o&&(e.pendingLookups[n]=o.filter(function(e){return e!=r}),0==e.pendingLookups[n].length&&delete e.pendingLookups[n])},e.generateRequestId=function(t){if(t){"."!==(t="|"==t[0]?t:"|"+t)[t.length-1]&&(t+=".");var r=(e.currentRootId++).toString(16);return e.appendSuffix(t,r,"_")}return e.generateRootId()},e.getRootId=function(e){var t=e.indexOf(".");t<0&&(t=e.length);var r="|"===e[0]?1:0;return e.substring(r,t)},e.generateRootId=function(){return"|"+r.w3cTraceId()+"."},e.appendSuffix=function(t,n,o){if(t.length+n.length<e.requestIdMaxLength)return t+n+o;var i=e.requestIdMaxLength-9;if(t.length>i)for(;i>1;--i){var s=t[i-1];if("."===s||"_"===s)break}if(i<=1)return e.generateRootId();for(n=r.randomu32().toString(16);n.length<8;)n="0"+n;return t.substring(0,i)+n+"#"},e.TAG="CorrelationIdManager",e.correlationIdPrefix="cid-v1:",e.w3cEnabled=!0,e.pendingLookups={},e.completedLookups={},e.requestIdMaxLength=1024,e.currentRootId=r.randomu32(),e}();t.exports=o}),tr=v((e,t)=>{"use strict";var r=Zt(),n=er(),o=function(){function e(t,o){if(this.traceFlag=e.DEFAULT_TRACE_FLAG,this.version=e.DEFAULT_VERSION,t&&"string"==typeof t)if(t.split(",").length>1)this.traceId=r.w3cTraceId(),this.spanId=r.w3cTraceId().substr(0,16);else{var i=t.trim().split("-"),s=i.length;s>=4?(this.version=i[0],this.traceId=i[1],this.spanId=i[2],this.traceFlag=i[3]):(this.traceId=r.w3cTraceId(),this.spanId=r.w3cTraceId().substr(0,16)),this.version.match(/^[0-9a-f]{2}$/g)||(this.version=e.DEFAULT_VERSION,this.traceId=r.w3cTraceId()),"00"===this.version&&4!==s&&(this.traceId=r.w3cTraceId(),this.spanId=r.w3cTraceId().substr(0,16)),"ff"===this.version&&(this.version=e.DEFAULT_VERSION,this.traceId=r.w3cTraceId(),this.spanId=r.w3cTraceId().substr(0,16)),this.version.match(/^0[0-9a-f]$/g)||(this.version=e.DEFAULT_VERSION),this.traceFlag.match(/^[0-9a-f]{2}$/g)||(this.traceFlag=e.DEFAULT_TRACE_FLAG,this.traceId=r.w3cTraceId()),e.isValidTraceId(this.traceId)||(this.traceId=r.w3cTraceId()),e.isValidSpanId(this.spanId)||(this.spanId=r.w3cTraceId().substr(0,16),this.traceId=r.w3cTraceId()),this.parentId=this.getBackCompatRequestId()}else if(o){this.parentId=o.slice();var a=n.getRootId(o);e.isValidTraceId(a)||(this.legacyRootId=a,a=r.w3cTraceId()),-1!==o.indexOf("|")&&(o=o.substring(1+o.substring(0,o.length-1).lastIndexOf("."),o.length-1)),this.traceId=a,this.spanId=o}else this.traceId=r.w3cTraceId(),this.spanId=r.w3cTraceId().substr(0,16)}return e.isValidTraceId=function(e){return e.match(/^[0-9a-f]{32}$/)&&"00000000000000000000000000000000"!==e},e.isValidSpanId=function(e){return e.match(/^[0-9a-f]{16}$/)&&"0000000000000000"!==e},e.formatOpenTelemetryTraceFlags=function(e){var t="0"+e.toString(16);return t.substring(t.length-2)},e.prototype.getBackCompatRequestId=function(){return"|"+this.traceId+"."+this.spanId+"."},e.prototype.toString=function(){return this.version+"-"+this.traceId+"-"+this.spanId+"-"+this.traceFlag},e.prototype.updateSpanId=function(){this.spanId=r.w3cTraceId().substr(0,16)},e.DEFAULT_TRACE_FLAG="01",e.DEFAULT_VERSION="00",e}();t.exports=o}),rr=v((e,t)=>{"use strict";var r=function(){function e(e){this.fieldmap=[],e&&(this.fieldmap=this.parseHeader(e))}return e.prototype.toString=function(){var e=this.fieldmap;return e&&0!=e.length?e.join(", "):null},e.validateKeyChars=function(e){var t=e.split("@");if(2==t.length){var r=t[0].trim(),n=t[1].trim(),o=Boolean(r.match(/^[\ ]?[a-z0-9\*\-\_/]{1,241}$/)),i=Boolean(n.match(/^[\ ]?[a-z0-9\*\-\_/]{1,14}$/));return o&&i}return 1==t.length&&Boolean(e.match(/^[\ ]?[a-z0-9\*\-\_/]{1,256}$/))},e.prototype.parseHeader=function(t){var r=[],n={},o=t.split(",");if(o.length>32)return null;for(var i=0,s=o;i<s.length;i++){var a=s[i].trim();if(0!==a.length){var c=a.split("=");if(2!==c.length||!e.validateKeyChars(c[0])||n[c[0]])return null;n[c[0]]=!0,r.push(a)}}return r},e.strict=!0,e}();t.exports=r}),nr=v((e,t)=>{"use strict";t.exports=function(){}}),or=v((e,t)=>{"use strict";var r,n=e&&e.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return n(t,e),t}(nr());t.exports=o}),ir=v((e,t)=>{"use strict";t.exports=function(){}}),sr=v((e,t)=>{"use strict";t.exports=function(){this.applicationVersion="ai.application.ver",this.deviceId="ai.device.id",this.deviceLocale="ai.device.locale",this.deviceModel="ai.device.model",this.deviceOEMName="ai.device.oemName",this.deviceOSVersion="ai.device.osVersion",this.deviceType="ai.device.type",this.locationIp="ai.location.ip",this.operationId="ai.operation.id",this.operationName="ai.operation.name",this.operationParentId="ai.operation.parentId",this.operationSyntheticSource="ai.operation.syntheticSource",this.operationCorrelationVector="ai.operation.correlationVector",this.sessionId="ai.session.id",this.sessionIsFirst="ai.session.isFirst",this.userAccountId="ai.user.accountId",this.userId="ai.user.id",this.userAuthUserId="ai.user.authUserId",this.cloudRole="ai.cloud.role",this.cloudRoleInstance="ai.cloud.roleInstance",this.internalSdkVersion="ai.internal.sdkVersion",this.internalAgentVersion="ai.internal.agentVersion",this.internalNodeName="ai.internal.nodeName"}}),ar=v((e,t)=>{"use strict";var r,n=e&&e.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=function(e){function t(){return e.call(this)||this}return n(t,e),t}(ir());t.exports=o}),cr=v((e,t)=>{"use strict";var r,n;(n=r||(r={}))[n.Measurement=0]="Measurement",n[n.Aggregation=1]="Aggregation",t.exports=r}),lr=v((e,t)=>{"use strict";var r=cr();t.exports=function(){this.kind=r.Measurement}}),ur=v((e,t)=>{"use strict";t.exports=function(){this.ver=1,this.sampleRate=100,this.tags={}}}),dr=v((e,t)=>{"use strict";var r,n=e&&e.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return n(t,e),t}(nr());t.exports=o}),pr=v((e,t)=>{"use strict";var r,n=e&&e.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.exceptions=[],t.properties={},t.measurements={},t}return n(t,e),t}(nr());t.exports=o}),hr=v((e,t)=>{"use strict";t.exports=function(){this.hasFullStack=!0,this.parsedStack=[]}}),fr=v((e,t)=>{"use strict";var r,n=e&&e.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t}return n(t,e),t}(nr());t.exports=o}),gr=v((e,t)=>{"use strict";var r,n=e&&e.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.metrics=[],t.properties={},t}return n(t,e),t}(nr());t.exports=o}),mr=v((e,t)=>{"use strict";var r,n=e&&e.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return n(t,e),t}(dr());t.exports=o}),vr=v((e,t)=>{"use strict";var r,n=e&&e.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.success=!0,t.properties={},t.measurements={},t}return n(t,e),t}(nr());t.exports=o}),yr=v((e,t)=>{"use strict";var r,n=e&&e.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return n(t,e),t}(nr());t.exports=o}),Sr=v((e,t)=>{"use strict";var r,n;(n=r||(r={}))[n.Verbose=0]="Verbose",n[n.Information=1]="Information",n[n.Warning=2]="Warning",n[n.Error=3]="Error",n[n.Critical=4]="Critical",t.exports=r}),wr=v((e,t)=>{"use strict";t.exports=function(){}}),Er=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AvailabilityData=or(),e.Base=ir(),e.ContextTagKeys=sr(),e.Data=ar(),e.DataPoint=lr(),e.DataPointType=cr(),e.Domain=nr(),e.Envelope=ur(),e.EventData=dr(),e.ExceptionData=pr(),e.ExceptionDetails=hr(),e.MessageData=fr(),e.MetricData=gr(),e.PageViewData=mr(),e.RemoteDependencyData=vr(),e.RequestData=yr(),e.SeverityLevel=Sr(),e.StackFrame=wr()}),_r=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.domainSupportsProperties=e.RemoteDependencyDataConstants=void 0;var t=Er(),r=function(){function e(){}return e.TYPE_HTTP="Http",e.TYPE_AI="Http (tracked component)",e}();e.RemoteDependencyDataConstants=r,e.domainSupportsProperties=function(e){return"properties"in e||e instanceof t.EventData||e instanceof t.ExceptionData||e instanceof t.MessageData||e instanceof t.MetricData||e instanceof t.PageViewData||e instanceof t.RemoteDependencyData||e instanceof t.RequestData}}),br=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),Pr=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),Tr=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),Cr=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),Ir=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),Or=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),Nr=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),Rr=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),Ar=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),Dr=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),xr=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),kr=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),jr=v(e=>{"use strict";var t,r;Object.defineProperty(e,"__esModule",{value:!0}),e.TelemetryType=e.TelemetryTypeString=e.baseTypeToTelemetryType=e.telemetryTypeToBaseType=void 0,e.telemetryTypeToBaseType=function(e){switch(e){case t.Event:return"EventData";case t.Exception:return"ExceptionData";case t.Trace:return"MessageData";case t.Metric:return"MetricData";case t.Request:return"RequestData";case t.Dependency:return"RemoteDependencyData";case t.Availability:return"AvailabilityData";case t.PageView:return"PageViewData"}},e.baseTypeToTelemetryType=function(e){switch(e){case"EventData":return t.Event;case"ExceptionData":return t.Exception;case"MessageData":return t.Trace;case"MetricData":return t.Metric;case"RequestData":return t.Request;case"RemoteDependencyData":return t.Dependency;case"AvailabilityData":return t.Availability;case"PageViewData":return t.PageView}},e.TelemetryTypeString={Event:"EventData",Exception:"ExceptionData",Trace:"MessageData",Metric:"MetricData",Request:"RequestData",Dependency:"RemoteDependencyData",Availability:"AvailabilityData",PageView:"PageViewData"},(r=t=e.TelemetryType||(e.TelemetryType={}))[r.Event=0]="Event",r[r.Exception=1]="Exception",r[r.Trace=2]="Trace",r[r.Metric=3]="Metric",r[r.Request=4]="Request",r[r.Dependency=5]="Dependency",r[r.Availability=6]="Availability",r[r.PageView=7]="PageView"}),Mr=v(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__exportStar||function(e,r){for(var n in e)"default"!==n&&!Object.prototype.hasOwnProperty.call(r,n)&&t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(br(),e),r(Pr(),e),r(Tr(),e),r(Cr(),e),r(Ir(),e),r(Or(),e),r(Nr(),e),r(Rr(),e),r(Ar(),e),r(Dr(),e),r(xr(),e),r(kr(),e),r(jr(),e)}),Lr=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),Fr=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),Ur=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),$r=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),Br=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),Vr=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),Hr=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),qr=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),zr=v(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__exportStar||function(e,r){for(var n in e)"default"!==n&&!Object.prototype.hasOwnProperty.call(r,n)&&t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(Lr(),e),r(Fr(),e),r(Ur(),e),r($r(),e),r(Br(),e),r(Vr(),e),r(Hr(),e),r(qr(),e)}),Wr=v(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__exportStar||function(e,r){for(var n in e)"default"!==n&&!Object.prototype.hasOwnProperty.call(r,n)&&t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(_r(),e),r(Er(),e),r(Mr(),e),r(zr(),e)}),Gr=v((e,t)=>{"use strict";var r=function(){function e(){}return e.prototype.getUrl=function(){return this.url},e.prototype.RequestParser=function(){this.startTime=+new Date},e.prototype._setStatus=function(e,t){var r=+new Date;this.duration=r-this.startTime,this.statusCode=e;var n=this.properties||{};if(t)if("string"==typeof t)n.error=t;else if(t instanceof Error)n.error=t.message;else if("object"==typeof t)for(var o in t)n[o]=t[o]&&t[o].toString&&t[o].toString();this.properties=n},e.prototype._isSuccess=function(){return 0<this.statusCode&&this.statusCode<400},e}();t.exports=r}),Kr=v((e,t)=>{"use strict";var n,o=e&&e.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=r(7016),s=Wr(),a=Zt(),c=Yt(),l=Gr(),u=er(),d=rr(),p=tr(),h=function(e){function t(t,r){var n=e.call(this)||this;return t&&(n.method=t.method,n.url=n._getAbsoluteUrl(t),n.startTime=+new Date,n.socketRemoteAddress=t.socket&&t.socket.remoteAddress,n.parseHeaders(t,r),t.connection&&(n.connectionRemoteAddress=t.connection.remoteAddress,n.legacySocketRemoteAddress=t.connection.socket&&t.connection.socket.remoteAddress)),n}return o(t,e),t.prototype.onError=function(e,t){this._setStatus(void 0,e),t&&(this.duration=t)},t.prototype.onResponse=function(e,t){this._setStatus(e.statusCode,void 0),t&&(this.duration=t)},t.prototype.getRequestTelemetry=function(e){var t={id:this.requestId,name:this.method+" "+i.parse(this.url).pathname,url:this.url,source:this.sourceCorrelationId,duration:this.duration,resultCode:this.statusCode?this.statusCode.toString():null,success:this._isSuccess(),properties:this.properties};if(e&&e.time?t.time=e.time:this.startTime&&(t.time=new Date(this.startTime)),e){for(var r in e)t[r]||(t[r]=e[r]);if(e.properties)for(var r in e.properties)t.properties[r]=e.properties[r]}return t},t.prototype.getRequestTags=function(e){var r={};for(var n in e)r[n]=e[n];return r[t.keys.locationIp]=e[t.keys.locationIp]||this._getIp(),r[t.keys.sessionId]=e[t.keys.sessionId]||this._getId("ai_session"),r[t.keys.userId]=e[t.keys.userId]||this._getId("ai_user"),r[t.keys.userAuthUserId]=e[t.keys.userAuthUserId]||this._getId("ai_authUser"),r[t.keys.operationName]=this.getOperationName(e),r[t.keys.operationParentId]=this.getOperationParentId(e),r[t.keys.operationId]=this.getOperationId(e),r},t.prototype.getOperationId=function(e){return e[t.keys.operationId]||this.operationId},t.prototype.getOperationParentId=function(e){return e[t.keys.operationParentId]||this.parentId||this.getOperationId(e)},t.prototype.getOperationName=function(e){return e[t.keys.operationName]||this.method+" "+i.parse(this.url).pathname},t.prototype.getRequestId=function(){return this.requestId},t.prototype.getCorrelationContextHeader=function(){return this.correlationContextHeader},t.prototype.getTraceparent=function(){return this.traceparent},t.prototype.getTracestate=function(){return this.tracestate},t.prototype.getLegacyRootId=function(){return this.legacyRootId},t.prototype._getAbsoluteUrl=function(e){if(!e.headers)return e.url;var t=e.connection?e.connection.encrypted:null,r=i.parse(e.url),n=r.pathname,o=r.search,s=t||"https"==e.headers["x-forwarded-proto"]?"https":"http";return i.format({protocol:s,host:e.headers.host,pathname:n,search:o})},t.prototype._getIp=function(){var e=/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/,t=function(t){var r=e.exec(t);if(r)return r[0]},r=t(this.rawHeaders["x-forwarded-for"])||t(this.rawHeaders["x-client-ip"])||t(this.rawHeaders["x-real-ip"])||t(this.connectionRemoteAddress)||t(this.socketRemoteAddress)||t(this.legacySocketRemoteAddress);return!r&&this.connectionRemoteAddress&&this.connectionRemoteAddress.substr&&"::"===this.connectionRemoteAddress.substr(0,2)&&(r="127.0.0.1"),r},t.prototype._getId=function(e){var r=this.rawHeaders&&this.rawHeaders.cookie&&"string"==typeof this.rawHeaders.cookie&&this.rawHeaders.cookie||"";return t.parseId(a.getCookie(e,r))},t.prototype.setBackCompatFromThisTraceContext=function(){this.operationId=this.traceparent.traceId,this.traceparent.legacyRootId&&(this.legacyRootId=this.traceparent.legacyRootId),this.parentId=this.traceparent.parentId,this.traceparent.updateSpanId(),this.requestId=this.traceparent.getBackCompatRequestId()},t.prototype.parseHeaders=function(e,t){if(this.rawHeaders=e.headers||e.rawHeaders,this.userAgent=e.headers&&e.headers["user-agent"],this.sourceCorrelationId=a.getCorrelationContextTarget(e,c.requestContextSourceKey),e.headers){var r=e.headers[c.traceStateHeader]?e.headers[c.traceStateHeader].toString():null,n=e.headers[c.traceparentHeader]?e.headers[c.traceparentHeader].toString():null,o=e.headers[c.requestIdHeader]?e.headers[c.requestIdHeader].toString():null,i=e.headers[c.parentIdHeader]?e.headers[c.parentIdHeader].toString():null,s=e.headers[c.rootIdHeader]?e.headers[c.rootIdHeader].toString():null;this.correlationContextHeader=e.headers[c.correlationContextHeader]?e.headers[c.correlationContextHeader].toString():null,u.w3cEnabled&&(n||r)?(this.traceparent=new p(n?n.toString():null),this.tracestate=n&&r&&new d(r?r.toString():null),this.setBackCompatFromThisTraceContext()):o?u.w3cEnabled?(this.traceparent=new p(null,o),this.setBackCompatFromThisTraceContext()):(this.parentId=o,this.requestId=u.generateRequestId(this.parentId),this.operationId=u.getRootId(this.requestId)):u.w3cEnabled?(this.traceparent=new p,this.traceparent.parentId=i,this.traceparent.legacyRootId=s||i,this.setBackCompatFromThisTraceContext()):(this.parentId=i,this.requestId=u.generateRequestId(s||this.parentId),this.correlationContextHeader=null,this.operationId=u.getRootId(this.requestId)),t&&(this.requestId=t,this.operationId=u.getRootId(this.requestId))}},t.parseId=function(e){var t=e.split("|");return t.length>0?t[0]:""},t.keys=new s.ContextTagKeys,t}(l);t.exports=h}),Xr=v((e,t)=>{var r;e=t.exports=G,r="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},e.SEMVER_SPEC_VERSION="2.0.0";var n=256,o=Number.MAX_SAFE_INTEGER||9007199254740991,i=e.re=[],s=e.src=[],a=0,c=a++;s[c]="0|[1-9]\\d*";var l=a++;s[l]="[0-9]+";var u=a++;s[u]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var d=a++;s[d]="("+s[c]+")\\.("+s[c]+")\\.("+s[c]+")";var p=a++;s[p]="("+s[l]+")\\.("+s[l]+")\\.("+s[l]+")";var h=a++;s[h]="(?:"+s[c]+"|"+s[u]+")";var f=a++;s[f]="(?:"+s[l]+"|"+s[u]+")";var g=a++;s[g]="(?:-("+s[h]+"(?:\\."+s[h]+")*))";var m=a++;s[m]="(?:-?("+s[f]+"(?:\\."+s[f]+")*))";var v=a++;s[v]="[0-9A-Za-z-]+";var y=a++;s[y]="(?:\\+("+s[v]+"(?:\\."+s[v]+")*))";var S=a++,w="v?"+s[d]+s[g]+"?"+s[y]+"?";s[S]="^"+w+"$";var E="[v=\\s]*"+s[p]+s[m]+"?"+s[y]+"?",_=a++;s[_]="^"+E+"$";var b=a++;s[b]="((?:<|>)?=?)";var P=a++;s[P]=s[l]+"|x|X|\\*";var T=a++;s[T]=s[c]+"|x|X|\\*";var C=a++;s[C]="[v=\\s]*("+s[T]+")(?:\\.("+s[T]+")(?:\\.("+s[T]+")(?:"+s[g]+")?"+s[y]+"?)?)?";var I=a++;s[I]="[v=\\s]*("+s[P]+")(?:\\.("+s[P]+")(?:\\.("+s[P]+")(?:"+s[m]+")?"+s[y]+"?)?)?";var O=a++;s[O]="^"+s[b]+"\\s*"+s[C]+"$";var N=a++;s[N]="^"+s[b]+"\\s*"+s[I]+"$";var R=a++;s[R]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var A=a++;s[A]="(?:~>?)";var D=a++;s[D]="(\\s*)"+s[A]+"\\s+",i[D]=new RegExp(s[D],"g");var x=a++;s[x]="^"+s[A]+s[C]+"$";var k=a++;s[k]="^"+s[A]+s[I]+"$";var j=a++;s[j]="(?:\\^)";var M=a++;s[M]="(\\s*)"+s[j]+"\\s+",i[M]=new RegExp(s[M],"g");var L=a++;s[L]="^"+s[j]+s[C]+"$";var F=a++;s[F]="^"+s[j]+s[I]+"$";var U=a++;s[U]="^"+s[b]+"\\s*("+E+")$|^$";var $=a++;s[$]="^"+s[b]+"\\s*("+w+")$|^$";var B=a++;s[B]="(\\s*)"+s[b]+"\\s*("+E+"|"+s[C]+")",i[B]=new RegExp(s[B],"g");var V=a++;s[V]="^\\s*("+s[C]+")\\s+-\\s+("+s[C]+")\\s*$";var H=a++;s[H]="^\\s*("+s[I]+")\\s+-\\s+("+s[I]+")\\s*$";var q,z=a++;for(s[z]="(<|>)?=?\\s*\\*",q=0;q<35;q++)r(q,s[q]),i[q]||(i[q]=new RegExp(s[q]));function W(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof G)return e;if("string"!=typeof e||e.length>n)return null;if(!(t.loose?i[_]:i[S]).test(e))return null;try{return new G(e,t)}catch{return null}}function G(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof G){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>n)throw new TypeError("version is longer than "+n+" characters");if(!(this instanceof G))return new G(e,t);r("SemVer",e,t),this.options=t,this.loose=!!t.loose;var s=e.trim().match(t.loose?i[_]:i[S]);if(!s)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>o||this.major<0)throw new TypeError("Invalid major version");if(this.minor>o||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>o||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t<o)return t}return e}):this.prerelease=[],this.build=s[5]?s[5].split("."):[],this.format()}e.parse=W,e.valid=function(e,t){var r=W(e,t);return r?r.version:null},e.clean=function(e,t){var r=W(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null},e.SemVer=G,G.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},G.prototype.toString=function(){return this.version},G.prototype.compare=function(e){return r("SemVer.compare",this.version,this.options,e),e instanceof G||(e=new G(e,this.options)),this.compareMain(e)||this.comparePre(e)},G.prototype.compareMain=function(e){return e instanceof G||(e=new G(e,this.options)),X(this.major,e.major)||X(this.minor,e.minor)||X(this.patch,e.patch)},G.prototype.comparePre=function(e){if(e instanceof G||(e=new G(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;var t=0;do{var n=this.prerelease[t],o=e.prerelease[t];if(r("prerelease compare",t,n,o),void 0===n&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===n)return-1;if(n!==o)return X(n,o)}while(++t)},G.prototype.inc=function(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":(0!==this.minor||0!==this.patch||0===this.prerelease.length)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(0!==this.patch||0===this.prerelease.length)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var r=this.prerelease.length;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);-1===r&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},e.inc=function(e,t,r,n){"string"==typeof r&&(n=r,r=void 0);try{return new G(e,r).inc(t,n).version}catch{return null}},e.diff=function(e,t){if(Z(e,t))return null;var r=W(e),n=W(t),o="";if(r.prerelease.length||n.prerelease.length){o="pre";var i="prerelease"}for(var s in r)if(("major"===s||"minor"===s||"patch"===s)&&r[s]!==n[s])return o+s;return i},e.compareIdentifiers=X;var K=/^[0-9]+$/;function X(e,t){var r=K.test(e),n=K.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:e<t?-1:1}function J(e,t,r){return new G(e,r).compare(new G(t,r))}function Q(e,t,r){return J(e,t,r)>0}function Y(e,t,r){return J(e,t,r)<0}function Z(e,t,r){return 0===J(e,t,r)}function ee(e,t,r){return 0!==J(e,t,r)}function te(e,t,r){return J(e,t,r)>=0}function re(e,t,r){return J(e,t,r)<=0}function ne(e,t,r,n){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return Z(e,r,n);case"!=":return ee(e,r,n);case">":return Q(e,r,n);case">=":return te(e,r,n);case"<":return Y(e,r,n);case"<=":return re(e,r,n);default:throw new TypeError("Invalid operator: "+t)}}function oe(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof oe){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof oe))return new oe(e,t);r("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===ie?this.value="":this.value=this.operator+this.semver.version,r("comp",this)}e.rcompareIdentifiers=function(e,t){return X(t,e)},e.major=function(e,t){return new G(e,t).major},e.minor=function(e,t){return new G(e,t).minor},e.patch=function(e,t){return new G(e,t).patch},e.compare=J,e.compareLoose=function(e,t){return J(e,t,!0)},e.rcompare=function(e,t,r){return J(t,e,r)},e.sort=function(t,r){return t.sort(function(t,n){return e.compare(t,n,r)})},e.rsort=function(t,r){return t.sort(function(t,n){return e.rcompare(t,n,r)})},e.gt=Q,e.lt=Y,e.eq=Z,e.neq=ee,e.gte=te,e.lte=re,e.cmp=ne,e.Comparator=oe;var ie={};function se(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof se)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new se(e.raw,t);if(e instanceof oe)return new se(e.value,t);if(!(this instanceof se))return new se(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(function(e){return this.parseRange(e.trim())},this).filter(function(e){return e.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function ae(e){return!e||"x"===e.toLowerCase()||"*"===e}function ce(e,t,r,n,o,i,s,a,c,l,u,d,p){return((t=ae(r)?"":ae(n)?">="+r+".0.0":ae(o)?">="+r+"."+n+".0":">="+t)+" "+(a=ae(c)?"":ae(l)?"<"+(+c+1)+".0.0":ae(u)?"<"+c+"."+(+l+1)+".0":d?"<="+c+"."+l+"."+u+"-"+d:"<="+a)).trim()}function le(e,t,n){for(var o=0;o<e.length;o++)if(!e[o].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(o=0;o<e.length;o++)if(r(e[o].semver),e[o].semver!==ie&&e[o].semver.prerelease.length>0){var i=e[o].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}return!1}return!0}function ue(e,t,r){try{t=new se(t,r)}catch{return!1}return t.test(e)}function de(e,t,r,n){var o,i,s,a,c;switch(e=new G(e,n),t=new se(t,n),r){case">":o=Q,i=re,s=Y,a=">",c=">=";break;case"<":o=Y,i=te,s=Q,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(ue(e,t,n))return!1;for(var l=0;l<t.set.length;++l){var u=t.set[l],d=null,p=null;if(u.forEach(function(e){e.semver===ie&&(e=new oe(">=0.0.0")),d=d||e,p=p||e,o(e.semver,d.semver,n)?d=e:s(e.semver,p.semver,n)&&(p=e)}),d.operator===a||d.operator===c||(!p.operator||p.operator===a)&&i(e,p.semver))return!1;if(p.operator===c&&s(e,p.semver))return!1}return!0}oe.prototype.parse=function(e){var t=this.options.loose?i[U]:i[$],r=e.match(t);if(!r)throw new TypeError("Invalid comparator: "+e);this.operator=r[1],"="===this.operator&&(this.operator=""),r[2]?this.semver=new G(r[2],this.options.loose):this.semver=ie},oe.prototype.toString=function(){return this.value},oe.prototype.test=function(e){return r("Comparator.test",e,this.options.loose),this.semver===ie||("string"==typeof e&&(e=new G(e,this.options)),ne(e,this.operator,this.semver,this.options))},oe.prototype.intersects=function(e,t){if(!(e instanceof oe))throw new TypeError("a Comparator is required");var r;if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),""===this.operator)return r=new se(e.value,t),ue(this.value,r,t);if(""===e.operator)return r=new se(this.value,t),ue(e.semver,r,t);var n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),o=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),i=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=ne(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=ne(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||o||i&&s||a||c},e.Range=se,se.prototype.format=function(){return this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim(),this.range},se.prototype.toString=function(){return this.range},se.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var n=t?i[H]:i[V];e=e.replace(n,ce),r("hyphen replace",e),e=e.replace(i[B],"$1$2$3"),r("comparator trim",e,i[B]),e=(e=(e=e.replace(i[D],"$1~")).replace(i[M],"$1^")).split(/\s+/).join(" ");var o=t?i[U]:i[$],s=e.split(" ").map(function(e){return function(e,t){return r("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map(function(e){return function(e,t){r("caret",e,t);var n=t.loose?i[F]:i[L];return e.replace(n,function(t,n,o,i,s){var a;return r("caret",e,t,n,o,i,s),ae(n)?a="":ae(o)?a=">="+n+".0.0 <"+(+n+1)+".0.0":ae(i)?a="0"===n?">="+n+"."+o+".0 <"+n+"."+(+o+1)+".0":">="+n+"."+o+".0 <"+(+n+1)+".0.0":s?(r("replaceCaret pr",s),a="0"===n?"0"===o?">="+n+"."+o+"."+i+"-"+s+" <"+n+"."+o+"."+(+i+1):">="+n+"."+o+"."+i+"-"+s+" <"+n+"."+(+o+1)+".0":">="+n+"."+o+"."+i+"-"+s+" <"+(+n+1)+".0.0"):(r("no pr"),a="0"===n?"0"===o?">="+n+"."+o+"."+i+" <"+n+"."+o+"."+(+i+1):">="+n+"."+o+"."+i+" <"+n+"."+(+o+1)+".0":">="+n+"."+o+"."+i+" <"+(+n+1)+".0.0"),r("caret return",a),a})}(e,t)}).join(" ")}(e,t),r("caret",e),e=function(e,t){return e.trim().split(/\s+/).map(function(e){return function(e,t){var n=t.loose?i[k]:i[x];return e.replace(n,function(t,n,o,i,s){var a;return r("tilde",e,t,n,o,i,s),ae(n)?a="":ae(o)?a=">="+n+".0.0 <"+(+n+1)+".0.0":ae(i)?a=">="+n+"."+o+".0 <"+n+"."+(+o+1)+".0":s?(r("replaceTilde pr",s),a=">="+n+"."+o+"."+i+"-"+s+" <"+n+"."+(+o+1)+".0"):a=">="+n+"."+o+"."+i+" <"+n+"."+(+o+1)+".0",r("tilde return",a),a})}(e,t)}).join(" ")}(e,t),r("tildes",e),e=function(e,t){return r("replaceXRanges",e,t),e.split(/\s+/).map(function(e){return function(e,t){e=e.trim();var n=t.loose?i[N]:i[O];return e.replace(n,function(t,n,o,i,s,a){r("xRange",e,t,n,o,i,s,a);var c=ae(o),l=c||ae(i),u=l||ae(s);return"="===n&&u&&(n=""),c?t=">"===n||"<"===n?"<0.0.0":"*":n&&u?(l&&(i=0),s=0,">"===n?(n=">=",l?(o=+o+1,i=0,s=0):(i=+i+1,s=0)):"<="===n&&(n="<",l?o=+o+1:i=+i+1),t=n+o+"."+i+"."+s):l?t=">="+o+".0.0 <"+(+o+1)+".0.0":u&&(t=">="+o+"."+i+".0 <"+o+"."+(+i+1)+".0"),r("xRange return",t),t})}(e,t)}).join(" ")}(e,t),r("xrange",e),e=function(e,t){return r("replaceStars",e,t),e.trim().replace(i[z],"")}(e,t),r("stars",e),e}(e,this.options)},this).join(" ").split(/\s+/);return this.options.loose&&(s=s.filter(function(e){return!!e.match(o)})),s.map(function(e){return new oe(e,this.options)},this)},se.prototype.intersects=function(e,t){if(!(e instanceof se))throw new TypeError("a Range is required");return this.set.some(function(r){return r.every(function(r){return e.set.some(function(e){return e.every(function(e){return r.intersects(e,t)})})})})},e.toComparators=function(e,t){return new se(e,t).set.map(function(e){return e.map(function(e){return e.value}).join(" ").trim().split(" ")})},se.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new G(e,this.options));for(var t=0;t<this.set.length;t++)if(le(this.set[t],e,this.options))return!0;return!1},e.satisfies=ue,e.maxSatisfying=function(e,t,r){var n=null,o=null;try{var i=new se(t,r)}catch{return null}return e.forEach(function(e){i.test(e)&&(!n||-1===o.compare(e))&&(o=new G(n=e,r))}),n},e.minSatisfying=function(e,t,r){var n=null,o=null;try{var i=new se(t,r)}catch{return null}return e.forEach(function(e){i.test(e)&&(!n||1===o.compare(e))&&(o=new G(n=e,r))}),n},e.minVersion=function(e,t){e=new se(e,t);var r=new G("0.0.0");if(e.test(r)||(r=new G("0.0.0-0"),e.test(r)))return r;r=null;for(var n=0;n<e.set.length;++n)e.set[n].forEach(function(e){var t=new G(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":(!r||Q(r,t))&&(r=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}});return r&&e.test(r)?r:null},e.validRange=function(e,t){try{return new se(e,t).range||"*"}catch{return null}},e.ltr=function(e,t,r){return de(e,t,"<",r)},e.gtr=function(e,t,r){return de(e,t,">",r)},e.outside=de,e.prerelease=function(e,t){var r=W(e,t);return r&&r.prerelease.length?r.prerelease:null},e.intersects=function(e,t,r){return e=new se(e,r),t=new se(t,r),e.intersects(t)},e.coerce=function(e){if(e instanceof G)return e;if("string"!=typeof e)return null;var t=e.match(i[R]);return null==t?null:W(t[1]+"."+(t[2]||"0")+"."+(t[3]||"0"))}}),Jr=v((e,t)=>{"use strict";function r(e){return"function"==typeof e}var n=console.error.bind(console);function o(e,t,r){var n=!!e[t]&&e.propertyIsEnumerable(t);Object.defineProperty(e,t,{configurable:!0,enumerable:n,writable:!0,value:r})}function i(e){e&&e.logger&&(r(e.logger)?n=e.logger:n("new logger isn't a function, not replacing"))}function s(e,t,i){if(e&&e[t]){if(!i)return n("no wrapper function"),void n((new Error).stack);if(r(e[t])&&r(i)){var s=e[t],a=i(s,t);return o(a,"__original",s),o(a,"__unwrap",function(){e[t]===a&&o(e,t,s)}),o(a,"__wrapped",!0),o(e,t,a),a}n("original object and wrapper must be functions")}else n("no original function "+t+" to wrap")}function a(e,t){return e&&e[t]?e[t].__unwrap?e[t].__unwrap():void n("no original to unwrap to -- has "+t+" already been unwrapped?"):(n("no function to unwrap."),void n((new Error).stack))}i.wrap=s,i.massWrap=function(e,t,r){if(!e)return n("must provide one or more modules to patch"),void n((new Error).stack);Array.isArray(e)||(e=[e]),t&&Array.isArray(t)?e.forEach(function(e){t.forEach(function(t){s(e,t,r)})}):n("must provide one or more functions to wrap on modules")},i.unwrap=a,i.massUnwrap=function(e,t){if(!e)return n("must provide one or more modules to patch"),void n((new Error).stack);Array.isArray(e)||(e=[e]),t&&Array.isArray(t)?e.forEach(function(e){t.forEach(function(t){a(e,t)})}):n("must provide one or more functions to unwrap on modules")},t.exports=i}),Qr=v((e,t)=>{"use strict";var r=Jr(),n=r.wrap,o=r.unwrap,i="wrap@before";function s(e,t,r){var n=!!e[t]&&e.propertyIsEnumerable(t);Object.defineProperty(e,t,{configurable:!0,enumerable:n,writable:!0,value:r})}function a(e,t){var r;return r=e._events&&e._events[t],Array.isArray(r)||(r=r?[r]:[]),r}function c(e,t){if(e){var r=e;if("function"==typeof e)r=t(e);else if(Array.isArray(e)){r=[];for(var n=0;n<e.length;n++)r[n]=t(e[n])}return r}}t.exports=function(e,t,r){if(!(e&&e.on&&e.addListener&&e.removeListener&&e.emit))throw new Error("can only wrap real EEs");if(!t)throw new Error("must have function to run on listener addition");if(!r)throw new Error("must have function to wrap listeners when emitting");function l(e){return function(t,r){var o=a(this,t).slice();try{var s=e.call(this,t,r);return function(e,t,r){var n=a(e,t).filter(function(e){return-1===r.indexOf(e)});n.length>0&&function(e,t){for(var r=t.length,n=0;n<r;n++){var o=t[n],s=e[i];if("function"==typeof s)s(o);else if(Array.isArray(s))for(var a=s.length,c=0;c<a;c++)s[c](o)}}(e,n)}(this,t,o),s}finally{this.on.__wrapped||n(this,"on",l),this.addListener.__wrapped||n(this,"addListener",l)}}}e[i]?"function"==typeof e[i]?s(e,i,[e[i],t]):Array.isArray(e[i])&&e[i].push(t):s(e,i,t),e.__wrapped||(n(e,"addListener",l),n(e,"on",l),n(e,"emit",function(e){return function(t){if(!this._events||!this._events[t])return e.apply(this,arguments);var i=this._events[t];n(this,"removeListener",function(e){return function(){this._events[t]=i;try{return e.apply(this,arguments)}finally{i=this._events[t],this._events[t]=c(i,r)}}});try{return this._events[t]=c(i,r),e.apply(this,arguments)}finally{o(this,"removeListener"),this._events[t]=i}}}),s(e,"__unwrap",function(){o(e,"addListener"),o(e,"on"),o(e,"emit"),delete e[i],delete e.__wrapped}),s(e,"__wrapped",!0))}}),Yr=v((e,t)=>{"use strict";var n=r(9023),o=r(2613),i=Qr(),s=r(290),a="cls@contexts",c="error@context",l=process.env.DEBUG_CLS_HOOKED,u=-1;function d(e){this.name=e,this.active=null,this._set=[],this.id=null,this._contexts=new Map,this._indent=0}function p(e){return process.namespaces[e]}function h(e){let t=p(e);o.ok(t,"can't delete nonexistent namespace! \""+e+'"'),o.ok(t.id,"don't assign to process.namespaces directly! "+n.inspect(t)),process.namespaces[e]=null}function f(...e){l&&process._rawDebug(`${n.format(...e)}`)}t.exports={getNamespace:p,createNamespace:function(e){o.ok(e,"namespace must be given a name."),l&&f(`NS-CREATING NAMESPACE (${e})`);let t=new d(e);return t.id=u,s.createHook({init(r,o,i,a){if(u=s.executionAsyncId(),t.active)t._contexts.set(r,t.active),l&&f(`${" ".repeat(t._indent<0?0:t._indent)}INIT [${o}] (${e}) asyncId:${r} currentUid:${u} triggerId:${i} active:${n.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} resource:${a}`);else if(0===u){let i=s.triggerAsyncId(),c=t._contexts.get(i);c?(t._contexts.set(r,c),l&&f(`${" ".repeat(t._indent<0?0:t._indent)}INIT USING CONTEXT FROM TRIGGERID [${o}] (${e}) asyncId:${r} currentUid:${u} triggerId:${i} active:${n.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} resource:${a}`)):l&&f(`${" ".repeat(t._indent<0?0:t._indent)}INIT MISSING CONTEXT [${o}] (${e}) asyncId:${r} currentUid:${u} triggerId:${i} active:${n.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} resource:${a}`)}if(l&&"PROMISE"===o){f(n.inspect(a,{showHidden:!0}));let s=a.parentId;f(`${" ".repeat(t._indent<0?0:t._indent)}INIT RESOURCE-PROMISE [${o}] (${e}) parentId:${s} asyncId:${r} currentUid:${u} triggerId:${i} active:${n.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} resource:${a}`)}},before(r){let o;if(u=s.executionAsyncId(),o=t._contexts.get(r)||t._contexts.get(u),o){if(l){let i=s.triggerAsyncId();f(`${" ".repeat(t._indent<0?0:t._indent)}BEFORE (${e}) asyncId:${r} currentUid:${u} triggerId:${i} active:${n.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} context:${n.inspect(o)}`),t._indent+=2}t.enter(o)}else if(l){let o=s.triggerAsyncId();f(`${" ".repeat(t._indent<0?0:t._indent)}BEFORE MISSING CONTEXT (${e}) asyncId:${r} currentUid:${u} triggerId:${o} active:${n.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} namespace._contexts:${n.inspect(t._contexts,{showHidden:!0,depth:2,colors:!0})}`),t._indent+=2}},after(r){let o;if(u=s.executionAsyncId(),o=t._contexts.get(r)||t._contexts.get(u),o){if(l){let i=s.triggerAsyncId();t._indent-=2,f(`${" ".repeat(t._indent<0?0:t._indent)}AFTER (${e}) asyncId:${r} currentUid:${u} triggerId:${i} active:${n.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} context:${n.inspect(o)}`)}t.exit(o)}else if(l){let i=s.triggerAsyncId();t._indent-=2,f(`${" ".repeat(t._indent<0?0:t._indent)}AFTER MISSING CONTEXT (${e}) asyncId:${r} currentUid:${u} triggerId:${i} active:${n.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} context:${n.inspect(o)}`)}},destroy(r){if(u=s.executionAsyncId(),l){let o=s.triggerAsyncId();f(`${" ".repeat(t._indent<0?0:t._indent)}DESTROY (${e}) currentUid:${u} asyncId:${r} triggerId:${o} active:${n.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} context:${n.inspect(t._contexts.get(u))}`)}t._contexts.delete(r)}}).enable(),process.namespaces[e]=t,t},destroyNamespace:h,reset:function(){process.namespaces&&Object.keys(process.namespaces).forEach(function(e){h(e)}),process.namespaces=Object.create(null)},ERROR_SYMBOL:c},d.prototype.set=function(e,t){if(!this.active)throw new Error("No context available. ns.run() or ns.bind() must be called first.");return this.active[e]=t,l&&f(" ".repeat(this._indent<0?0:this._indent)+"CONTEXT-SET KEY:"+e+"="+t+" in ns:"+this.name+" currentUid:"+u+" active:"+n.inspect(this.active,{showHidden:!0,depth:2,colors:!0})),t},d.prototype.get=function(e){if(this.active){if(l){let t=s.executionAsyncId(),r=s.triggerAsyncId(),o=" ".repeat(this._indent<0?0:this._indent);f(o+"CONTEXT-GETTING KEY:"+e+"="+this.active[e]+" ("+this.name+") currentUid:"+u+" active:"+n.inspect(this.active,{showHidden:!0,depth:2,colors:!0})),f(`${o}CONTEXT-GETTING KEY: (${this.name}) ${e}=${this.active[e]} currentUid:${u} asyncHooksCurrentId:${t} triggerId:${r} len:${this._set.length} active:${n.inspect(this.active)}`)}return this.active[e]}if(l){let t=s.currentId(),r=s.triggerAsyncId();f(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-GETTING KEY NO ACTIVE NS: (${this.name}) ${e}=undefined currentUid:${u} asyncHooksCurrentId:${t} triggerId:${r} len:${this._set.length}`)}},d.prototype.createContext=function(){let e=Object.create(this.active?this.active:Object.prototype);if(e._ns_name=this.name,e.id=u,l){let t=s.executionAsyncId(),r=s.triggerAsyncId();f(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-CREATED Context: (${this.name}) currentUid:${u} asyncHooksCurrentId:${t} triggerId:${r} len:${this._set.length} context:${n.inspect(e,{showHidden:!0,depth:2,colors:!0})}`)}return e},d.prototype.run=function(e){let t=this.createContext();this.enter(t);try{if(l){let e=s.triggerAsyncId(),r=s.executionAsyncId();f(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-RUN BEGIN: (${this.name}) currentUid:${u} triggerId:${e} asyncHooksCurrentId:${r} len:${this._set.length} context:${n.inspect(t)}`)}return e(t),t}catch(e){throw e&&(e[c]=t),e}finally{if(l){let e=s.triggerAsyncId(),r=s.executionAsyncId();f(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-RUN END: (${this.name}) currentUid:${u} triggerId:${e} asyncHooksCurrentId:${r} len:${this._set.length} ${n.inspect(t)}`)}this.exit(t)}},d.prototype.runAndReturn=function(e){let t;return this.run(function(r){t=e(r)}),t},d.prototype.runPromise=function(e){let t=this.createContext();this.enter(t);let r=e(t);if(!r||!r.then||!r.catch)throw new Error("fn must return a promise.");return l&&f("CONTEXT-runPromise BEFORE: ("+this.name+") currentUid:"+u+" len:"+this._set.length+" "+n.inspect(t)),r.then(e=>(l&&f("CONTEXT-runPromise AFTER then: ("+this.name+") currentUid:"+u+" len:"+this._set.length+" "+n.inspect(t)),this.exit(t),e)).catch(e=>{throw e[c]=t,l&&f("CONTEXT-runPromise AFTER catch: ("+this.name+") currentUid:"+u+" len:"+this._set.length+" "+n.inspect(t)),this.exit(t),e})},d.prototype.bind=function(e,t){t||(t=this.active?this.active:this.createContext());let r=this;return function(){r.enter(t);try{return e.apply(this,arguments)}catch(e){throw e&&(e[c]=t),e}finally{r.exit(t)}}},d.prototype.enter=function(e){if(o.ok(e,"context must be provided for entering"),l){let t=s.executionAsyncId(),r=s.triggerAsyncId();f(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-ENTER: (${this.name}) currentUid:${u} triggerId:${r} asyncHooksCurrentId:${t} len:${this._set.length} ${n.inspect(e)}`)}this._set.push(this.active),this.active=e},d.prototype.exit=function(e){if(o.ok(e,"context must be provided for exiting"),l){let t=s.executionAsyncId(),r=s.triggerAsyncId();f(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-EXIT: (${this.name}) currentUid:${u} triggerId:${r} asyncHooksCurrentId:${t} len:${this._set.length} ${n.inspect(e)}`)}if(this.active===e)return o.ok(this._set.length,"can't remove top context"),void(this.active=this._set.pop());let t=this._set.lastIndexOf(e);t<0?(l&&f("??ERROR?? context exiting but not entered - ignoring: "+n.inspect(e)),o.ok(t>=0,"context not currently entered; can't exit. \n"+n.inspect(this)+"\n"+n.inspect(e))):(o.ok(t,"can't remove top context"),this._set.splice(t,1))},d.prototype.bindEmitter=function(e){o.ok(e.on&&e.addListener&&e.emit,"can only bind real EEs");let t=this,r="context@"+this.name;i(e,function(e){!e||(e[a]||(e[a]=Object.create(null)),e[a][r]={namespace:t,context:t.active})},function(e){if(!e||!e[a])return e;let t=e,r=e[a];return Object.keys(r).forEach(function(e){let n=r[e];t=n.namespace.bind(t,n.context)}),t})},d.prototype.fromException=function(e){return e[c]},process.namespaces={}}),Zr=v((e,t)=>{"use strict";function r(){}t.exports=function(){let e=this._hooks,t=this._state,n=process.nextTick;process.nextTick=function(){if(!t.enabled)return n.apply(process,arguments);let o=new Array(arguments.length);for(let e=0;e<arguments.length;e++)o[e]=arguments[e];let i=o[0];if("function"!=typeof i)throw new TypeError("callback is not a function");let s=new r,a=--t.counter;return e.init.call(s,a,0,null,null),o[0]=function(){e.pre.call(s,a);let t=!0;try{i.apply(this,arguments),t=!1}finally{t&&process.listenerCount("uncaughtException")>0&&process.once("uncaughtException",function(){e.post.call(s,a,!0),e.destroy.call(null,a)})}e.post.call(s,a,!1),e.destroy.call(null,a)},n.apply(process,o)}}}),en=v((e,t)=>{"use strict";function r(){}t.exports=function(){let e=this._hooks,t=this._state,n=global.Promise,o=n.prototype.then;function i(t,r,n,o){return"function"!=typeof t?o?function(t){return function(r){return e.destroy.call(null,t),r}}(n):function(t){return function(r){throw e.destroy.call(null,t),r}}(n):function(){e.pre.call(r,n);try{return t.apply(this,arguments)}finally{e.post.call(r,n,!1),e.destroy.call(null,n)}}}n.prototype.then=function(n,s){if(!t.enabled)return o.call(this,n,s);let a=new r,c=--t.counter;return e.init.call(a,c,0,null,null),o.call(this,i(n,a,c,!0),i(s,a,c,!1))}}}),tn=v((e,t)=>{"use strict";var n=r(3557);function o(){}function i(){}function s(){}var a=new Map,c=new Map,l=new Map,u=null,d=!1;function p(e,t,r,o,i,s,a){let c=n[r],l=n[o];n[r]=function(){if(!t.enabled)return c.apply(n,arguments);let r=new Array(arguments.length);for(let e=0;e<arguments.length;e++)r[e]=arguments[e];let o=r[0];if("function"!=typeof o)throw new TypeError('"callback" argument must be a function');let l,p=new i,h=--t.counter;return e.init.call(p,h,0,null,null),r[0]=function(){u=l,e.pre.call(p,h);let t=!0;try{o.apply(this,arguments),t=!1}finally{t&&process.listenerCount("uncaughtException")>0&&process.once("uncaughtException",function(){e.post.call(p,h,!0),s.delete(l),e.destroy.call(null,h)})}e.post.call(p,h,!1),u=null,(a||d)&&(d=!1,s.delete(l),e.destroy.call(null,h))},l=c.apply(n,r),s.set(l,h),l},n[o]=function(t){if(u===t&&null!==t)d=!0;else if(s.has(t)){let r=s.get(t);s.delete(t),e.destroy.call(null,r)}l.apply(n,arguments)}}t.exports=function(){p(this._hooks,this._state,"setTimeout","clearTimeout",o,a,!0),p(this._hooks,this._state,"setInterval","clearInterval",i,c,!1),p(this._hooks,this._state,"setImmediate","clearImmediate",s,l,!0),global.setTimeout=n.setTimeout,global.setInterval=n.setInterval,global.setImmediate=n.setImmediate,global.clearTimeout=n.clearTimeout,global.clearInterval=n.clearInterval,global.clearImmediate=n.clearImmediate}}),rn=v((e,t)=>{t.exports={name:"async-hook-jl",description:"Inspect the life of handle objects in node",version:"1.7.6",author:"Andreas Madsen <amwebdk@gmail.com>",main:"./index.js",scripts:{test:"node ./test/runner.js && eslint ."},repository:{type:"git",url:"git://github.com/jeff-lewis/async-hook-jl.git"},keywords:["async","async hooks","inspect","async wrap"],license:"MIT",dependencies:{"stack-chain":"^1.3.7"},devDependencies:{async:"1.5.x","cli-color":"1.1.x",eslint:"^3.4.0",endpoint:"0.4.x"},engines:{node:"^4.7 || >=6.9 || >=7.3"}}}),nn=v((e,t)=>{"use strict";var r=process.binding("async_wrap"),n=r.Providers.TIMERWRAP,o={nextTick:Zr(),promise:en(),timers:tn()},i=new Set;function s(){this.enabled=!1,this.counter=0}function a(){let e=this.initFns=[],t=this.preFns=[],r=this.postFns=[],o=this.destroyFns=[];this.init=function(t,r,o,s){if(r!==n)for(let n of e)n(t,this,r,o,s);else i.add(t)},this.pre=function(e){if(!i.has(e))for(let r of t)r(e,this)},this.post=function(e,t){if(!i.has(e))for(let n of r)n(e,this,t)},this.destroy=function(e){if(i.has(e))i.delete(e);else for(let t of o)t(e)}}function c(e,t){let r=e.indexOf(t);-1!==r&&e.splice(r,1)}function l(){this._state=new s,this._hooks=new a,this.version=rn().version,this.providers=r.Providers;for(let e of Object.keys(o))o[e].call(this);process.env.hasOwnProperty("NODE_ASYNC_HOOK_WARNING")&&console.warn("warning: you are using async-hook-jl which is unstable."),r.setupHooks({init:this._hooks.init,pre:this._hooks.pre,post:this._hooks.post,destroy:this._hooks.destroy})}a.prototype.add=function(e){e.init&&this.initFns.push(e.init),e.pre&&this.preFns.push(e.pre),e.post&&this.postFns.push(e.post),e.destroy&&this.destroyFns.push(e.destroy)},a.prototype.remove=function(e){e.init&&c(this.initFns,e.init),e.pre&&c(this.preFns,e.pre),e.post&&c(this.postFns,e.post),e.destroy&&c(this.destroyFns,e.destroy)},t.exports=l,l.prototype.addHooks=function(e){this._hooks.add(e)},l.prototype.removeHooks=function(e){this._hooks.remove(e)},l.prototype.enable=function(){this._state.enabled=!0,r.enable()},l.prototype.disable=function(){this._state.enabled=!1,r.disable()}}),on=v((e,t)=>{t.exports={name:"stack-chain",description:"API for combining call site modifiers",version:"1.3.7",author:"Andreas Madsen <amwebdk@gmail.com>",scripts:{test:"tap ./test/simple"},repository:{type:"git",url:"git://github.com/AndreasMadsen/stack-chain.git"},keywords:["stack","chain","trace","call site","concat","format"],devDependencies:{tap:"2.x.x","uglify-js":"2.5.x"},license:"MIT"}}),sn=v((e,t)=>{t.exports=function(e,t){var r=[];r.push(function(e){try{return Error.prototype.toString.call(e)}catch(e){try{return"<error: "+e+">"}catch{return"<error>"}}}(e));for(var n=0;n<t.length;n++){var o,i=t[n];try{o=i.toString()}catch(e){try{o="<error: "+e+">"}catch{o="<error>"}}r.push(" at "+o)}return r.join("\n")}}),an=v((e,t)=>{var r=sn();function n(){this.extend=new s,this.filter=new s,this.format=new a,this.version=on().version}var o=!1;n.prototype.callSite=function e(t){t||(t={}),o=!0;var r={};Error.captureStackTrace(r,e);var n=r.stack;return o=!1,n=n.slice(t.slice||0),t.extend&&(n=this.extend._modify(r,n)),t.filter&&(n=this.filter._modify(r,n)),n};var i=new n;function s(){this._modifiers=[]}function a(){this._formater=r,this._previous=void 0}s.prototype._modify=function(e,t){for(var r=0,n=this._modifiers.length;r<n;r++)t=this._modifiers[r](e,t);return t},s.prototype.attach=function(e){this._modifiers.push(e)},s.prototype.deattach=function(e){var t=this._modifiers.indexOf(e);return-1!==t&&(this._modifiers.splice(t,1),!0)},a.prototype.replace=function(e){e?this._formater=e:this.restore()},a.prototype.restore=function(){this._formater=r,this._previous=void 0},a.prototype._backup=function(){this._previous=this._formater},a.prototype._roolback=function(){this._previous===r?this.replace(void 0):this.replace(this._previous),this._previous=void 0},Error.prepareStackTrace&&i.format.replace(Error.prepareStackTrace);var c=!1;function l(e,t){if(o)return t;if(c)return r(e,t);var n=t.concat();n=i.extend._modify(e,n),n=(n=i.filter._modify(e,n)).slice(0,Error.stackTraceLimit),Object.isExtensible(e)&&void 0===Object.getOwnPropertyDescriptor(e,"callSite")&&(e.callSite={original:t,mutated:n}),c=!0;var s=i.format._formater(e,n);return c=!1,s}Object.defineProperty(Error,"prepareStackTrace",{get:function(){return l},set:function(e){e===l?i.format._roolback():(i.format._backup(),i.format.replace(e))}}),Object.defineProperty(Error.prototype,"callSite",{get:function(){return this.stack,this.callSite},set:function(e){Object.defineProperty(this,"callSite",{value:e,writable:!0,configurable:!0})},configurable:!0}),t.exports=i}),cn=v((e,t)=>{if(global._stackChain){if(global._stackChain.version!==on().version)throw new Error("Conflicting version of stack-chain found");t.exports=global._stackChain}else t.exports=global._stackChain=an()}),ln=v((e,t)=>{"use strict";var r=nn();if(global._asyncHook){if(global._asyncHook.version!==rn().version)throw new Error("Conflicting version of async-hook-jl found");t.exports=global._asyncHook}else cn().filter.attach(function(e,t){return t.filter(function(e){let t=e.getFileName();return!(t&&t.slice(0,__dirname.length)===__dirname)})}),t.exports=global._asyncHook=new r}),un=v((e,t)=>{"use strict";var n=r(9023),o=r(2613),i=Qr(),s=ln(),a="cls@contexts",c="error@context",l=[];for(let e in s.providers)l[s.providers[e]]=e;var u,d,p=process.env.DEBUG_CLS_HOOKED,h=-1;function f(e){this.name=e,this.active=null,this._set=[],this.id=null,this._contexts=new Map}function g(e){return process.namespaces[e]}function m(e){let t=g(e);o.ok(t,"can't delete nonexistent namespace! \""+e+'"'),o.ok(t.id,"don't assign to process.namespaces directly! "+n.inspect(t)),process.namespaces[e]=null}function v(e){process.env.DEBUG&&process._rawDebug(e)}function y(e){return e?"function"==typeof e?e.name?e.name:(e.toString().trim().match(/^function\s*([^\s(]+)/)||[])[1]:e.constructor&&e.constructor.name?e.constructor.name:void 0:e}if(t.exports={getNamespace:g,createNamespace:function(e){o.ok(e,"namespace must be given a name."),p&&v("CREATING NAMESPACE "+e);let t=new f(e);return t.id=h,s.addHooks({init(r,o,i,s,a){h=r,s?(t._contexts.set(r,t._contexts.get(s)),p&&v("PARENTID: "+e+" uid:"+r+" parent:"+s+" provider:"+i)):t._contexts.set(h,t.active),p&&v("INIT "+e+" uid:"+r+" parent:"+s+" provider:"+l[i]+" active:"+n.inspect(t.active,!0))},pre(r,o){h=r;let i=t._contexts.get(r);i?(p&&v(" PRE "+e+" uid:"+r+" handle:"+y(o)+" context:"+n.inspect(i)),t.enter(i)):p&&v(" PRE MISSING CONTEXT "+e+" uid:"+r+" handle:"+y(o))},post(r,o){h=r;let i=t._contexts.get(r);i?(p&&v(" POST "+e+" uid:"+r+" handle:"+y(o)+" context:"+n.inspect(i)),t.exit(i)):p&&v(" POST MISSING CONTEXT "+e+" uid:"+r+" handle:"+y(o))},destroy(r){h=r,p&&v("DESTROY "+e+" uid:"+r+" context:"+n.inspect(t._contexts.get(h))+" active:"+n.inspect(t.active,!0)),t._contexts.delete(r)}}),process.namespaces[e]=t,t},destroyNamespace:m,reset:function(){process.namespaces&&Object.keys(process.namespaces).forEach(function(e){m(e)}),process.namespaces=Object.create(null)},ERROR_SYMBOL:c},f.prototype.set=function(e,t){if(!this.active)throw new Error("No context available. ns.run() or ns.bind() must be called first.");return p&&v(" SETTING KEY:"+e+"="+t+" in ns:"+this.name+" uid:"+h+" active:"+n.inspect(this.active,!0)),this.active[e]=t,t},f.prototype.get=function(e){if(this.active)return p&&v(" GETTING KEY:"+e+"="+this.active[e]+" "+this.name+" uid:"+h+" active:"+n.inspect(this.active,!0)),this.active[e];p&&v(" GETTING KEY:"+e+"=undefined "+this.name+" uid:"+h+" active:"+n.inspect(this.active,!0))},f.prototype.createContext=function(){p&&v(" CREATING Context: "+this.name+" uid:"+h+" len:"+this._set.length+" active:"+n.inspect(this.active,!0,2,!0));let e=Object.create(this.active?this.active:Object.prototype);return e._ns_name=this.name,e.id=h,p&&v(" CREATED Context: "+this.name+" uid:"+h+" len:"+this._set.length+" context:"+n.inspect(e,!0,2,!0)),e},f.prototype.run=function(e){let t=this.createContext();this.enter(t);try{return p&&v(" BEFORE RUN: "+this.name+" uid:"+h+" len:"+this._set.length+" "+n.inspect(t)),e(t),t}catch(e){throw e&&(e[c]=t),e}finally{p&&v(" AFTER RUN: "+this.name+" uid:"+h+" len:"+this._set.length+" "+n.inspect(t)),this.exit(t)}},f.prototype.runAndReturn=function(e){var t;return this.run(function(r){t=e(r)}),t},f.prototype.runPromise=function(e){let t=this.createContext();this.enter(t);let r=e(t);if(!r||!r.then||!r.catch)throw new Error("fn must return a promise.");return p&&v(" BEFORE runPromise: "+this.name+" uid:"+h+" len:"+this._set.length+" "+n.inspect(t)),r.then(e=>(p&&v(" AFTER runPromise: "+this.name+" uid:"+h+" len:"+this._set.length+" "+n.inspect(t)),this.exit(t),e)).catch(e=>{throw e[c]=t,p&&v(" AFTER runPromise: "+this.name+" uid:"+h+" len:"+this._set.length+" "+n.inspect(t)),this.exit(t),e})},f.prototype.bind=function(e,t){t||(t=this.active?this.active:this.createContext());let r=this;return function(){r.enter(t);try{return e.apply(this,arguments)}catch(e){throw e&&(e[c]=t),e}finally{r.exit(t)}}},f.prototype.enter=function(e){o.ok(e,"context must be provided for entering"),p&&v(" ENTER "+this.name+" uid:"+h+" len:"+this._set.length+" context: "+n.inspect(e)),this._set.push(this.active),this.active=e},f.prototype.exit=function(e){if(o.ok(e,"context must be provided for exiting"),p&&v(" EXIT "+this.name+" uid:"+h+" len:"+this._set.length+" context: "+n.inspect(e)),this.active===e)return o.ok(this._set.length,"can't remove top context"),void(this.active=this._set.pop());let t=this._set.lastIndexOf(e);t<0?(p&&v("??ERROR?? context exiting but not entered - ignoring: "+n.inspect(e)),o.ok(t>=0,"context not currently entered; can't exit. \n"+n.inspect(this)+"\n"+n.inspect(e))):(o.ok(t,"can't remove top context"),this._set.splice(t,1))},f.prototype.bindEmitter=function(e){o.ok(e.on&&e.addListener&&e.emit,"can only bind real EEs");let t=this,r="context@"+this.name;i(e,function(e){!e||(e[a]||(e[a]=Object.create(null)),e[a][r]={namespace:t,context:t.active})},function(e){if(!e||!e[a])return e;let t=e,r=e[a];return Object.keys(r).forEach(function(e){let n=r[e];t=n.namespace.bind(t,n.context)}),t})},f.prototype.fromException=function(e){return e[c]},process.namespaces={},s._state&&!s._state.enabled&&s.enable(),p)for(d in(u=cn()).filter._modifiers)u.filter.deattach(d)}),dn=v((e,t)=>{"use strict";var r=Xr();process&&r.gte(process.versions.node,"8.0.0")?t.exports=Yr():t.exports=un()}),pn=v((e,t)=>{var r;e=t.exports=G,r="object"==typeof process&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?function(){var e=Array.prototype.slice.call(arguments,0);e.unshift("SEMVER"),console.log.apply(console,e)}:function(){},e.SEMVER_SPEC_VERSION="2.0.0";var n=256,o=Number.MAX_SAFE_INTEGER||9007199254740991,i=e.re=[],s=e.src=[],a=0,c=a++;s[c]="0|[1-9]\\d*";var l=a++;s[l]="[0-9]+";var u=a++;s[u]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var d=a++;s[d]="("+s[c]+")\\.("+s[c]+")\\.("+s[c]+")";var p=a++;s[p]="("+s[l]+")\\.("+s[l]+")\\.("+s[l]+")";var h=a++;s[h]="(?:"+s[c]+"|"+s[u]+")";var f=a++;s[f]="(?:"+s[l]+"|"+s[u]+")";var g=a++;s[g]="(?:-("+s[h]+"(?:\\."+s[h]+")*))";var m=a++;s[m]="(?:-?("+s[f]+"(?:\\."+s[f]+")*))";var v=a++;s[v]="[0-9A-Za-z-]+";var y=a++;s[y]="(?:\\+("+s[v]+"(?:\\."+s[v]+")*))";var S=a++,w="v?"+s[d]+s[g]+"?"+s[y]+"?";s[S]="^"+w+"$";var E="[v=\\s]*"+s[p]+s[m]+"?"+s[y]+"?",_=a++;s[_]="^"+E+"$";var b=a++;s[b]="((?:<|>)?=?)";var P=a++;s[P]=s[l]+"|x|X|\\*";var T=a++;s[T]=s[c]+"|x|X|\\*";var C=a++;s[C]="[v=\\s]*("+s[T]+")(?:\\.("+s[T]+")(?:\\.("+s[T]+")(?:"+s[g]+")?"+s[y]+"?)?)?";var I=a++;s[I]="[v=\\s]*("+s[P]+")(?:\\.("+s[P]+")(?:\\.("+s[P]+")(?:"+s[m]+")?"+s[y]+"?)?)?";var O=a++;s[O]="^"+s[b]+"\\s*"+s[C]+"$";var N=a++;s[N]="^"+s[b]+"\\s*"+s[I]+"$";var R=a++;s[R]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var A=a++;s[A]="(?:~>?)";var D=a++;s[D]="(\\s*)"+s[A]+"\\s+",i[D]=new RegExp(s[D],"g");var x=a++;s[x]="^"+s[A]+s[C]+"$";var k=a++;s[k]="^"+s[A]+s[I]+"$";var j=a++;s[j]="(?:\\^)";var M=a++;s[M]="(\\s*)"+s[j]+"\\s+",i[M]=new RegExp(s[M],"g");var L=a++;s[L]="^"+s[j]+s[C]+"$";var F=a++;s[F]="^"+s[j]+s[I]+"$";var U=a++;s[U]="^"+s[b]+"\\s*("+E+")$|^$";var $=a++;s[$]="^"+s[b]+"\\s*("+w+")$|^$";var B=a++;s[B]="(\\s*)"+s[b]+"\\s*("+E+"|"+s[C]+")",i[B]=new RegExp(s[B],"g");var V=a++;s[V]="^\\s*("+s[C]+")\\s+-\\s+("+s[C]+")\\s*$";var H=a++;s[H]="^\\s*("+s[I]+")\\s+-\\s+("+s[I]+")\\s*$";var q,z=a++;for(s[z]="(<|>)?=?\\s*\\*",q=0;q<35;q++)r(q,s[q]),i[q]||(i[q]=new RegExp(s[q]));function W(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof G)return e;if("string"!=typeof e||e.length>n)return null;if(!(t.loose?i[_]:i[S]).test(e))return null;try{return new G(e,t)}catch{return null}}function G(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof G){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>n)throw new TypeError("version is longer than "+n+" characters");if(!(this instanceof G))return new G(e,t);r("SemVer",e,t),this.options=t,this.loose=!!t.loose;var s=e.trim().match(t.loose?i[_]:i[S]);if(!s)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>o||this.major<0)throw new TypeError("Invalid major version");if(this.minor>o||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>o||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map(function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t<o)return t}return e}):this.prerelease=[],this.build=s[5]?s[5].split("."):[],this.format()}e.parse=W,e.valid=function(e,t){var r=W(e,t);return r?r.version:null},e.clean=function(e,t){var r=W(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null},e.SemVer=G,G.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},G.prototype.toString=function(){return this.version},G.prototype.compare=function(e){return r("SemVer.compare",this.version,this.options,e),e instanceof G||(e=new G(e,this.options)),this.compareMain(e)||this.comparePre(e)},G.prototype.compareMain=function(e){return e instanceof G||(e=new G(e,this.options)),X(this.major,e.major)||X(this.minor,e.minor)||X(this.patch,e.patch)},G.prototype.comparePre=function(e){if(e instanceof G||(e=new G(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;var t=0;do{var n=this.prerelease[t],o=e.prerelease[t];if(r("prerelease compare",t,n,o),void 0===n&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===n)return-1;if(n!==o)return X(n,o)}while(++t)},G.prototype.inc=function(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":(0!==this.minor||0!==this.patch||0===this.prerelease.length)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(0!==this.patch||0===this.prerelease.length)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var r=this.prerelease.length;--r>=0;)"number"==typeof this.prerelease[r]&&(this.prerelease[r]++,r=-2);-1===r&&this.prerelease.push(0)}t&&(this.prerelease[0]===t?isNaN(this.prerelease[1])&&(this.prerelease=[t,0]):this.prerelease=[t,0]);break;default:throw new Error("invalid increment argument: "+e)}return this.format(),this.raw=this.version,this},e.inc=function(e,t,r,n){"string"==typeof r&&(n=r,r=void 0);try{return new G(e,r).inc(t,n).version}catch{return null}},e.diff=function(e,t){if(Z(e,t))return null;var r=W(e),n=W(t),o="";if(r.prerelease.length||n.prerelease.length){o="pre";var i="prerelease"}for(var s in r)if(("major"===s||"minor"===s||"patch"===s)&&r[s]!==n[s])return o+s;return i},e.compareIdentifiers=X;var K=/^[0-9]+$/;function X(e,t){var r=K.test(e),n=K.test(t);return r&&n&&(e=+e,t=+t),e===t?0:r&&!n?-1:n&&!r?1:e<t?-1:1}function J(e,t,r){return new G(e,r).compare(new G(t,r))}function Q(e,t,r){return J(e,t,r)>0}function Y(e,t,r){return J(e,t,r)<0}function Z(e,t,r){return 0===J(e,t,r)}function ee(e,t,r){return 0!==J(e,t,r)}function te(e,t,r){return J(e,t,r)>=0}function re(e,t,r){return J(e,t,r)<=0}function ne(e,t,r,n){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return Z(e,r,n);case"!=":return ee(e,r,n);case">":return Q(e,r,n);case">=":return te(e,r,n);case"<":return Y(e,r,n);case"<=":return re(e,r,n);default:throw new TypeError("Invalid operator: "+t)}}function oe(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof oe){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof oe))return new oe(e,t);r("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===ie?this.value="":this.value=this.operator+this.semver.version,r("comp",this)}e.rcompareIdentifiers=function(e,t){return X(t,e)},e.major=function(e,t){return new G(e,t).major},e.minor=function(e,t){return new G(e,t).minor},e.patch=function(e,t){return new G(e,t).patch},e.compare=J,e.compareLoose=function(e,t){return J(e,t,!0)},e.rcompare=function(e,t,r){return J(t,e,r)},e.sort=function(t,r){return t.sort(function(t,n){return e.compare(t,n,r)})},e.rsort=function(t,r){return t.sort(function(t,n){return e.rcompare(t,n,r)})},e.gt=Q,e.lt=Y,e.eq=Z,e.neq=ee,e.gte=te,e.lte=re,e.cmp=ne,e.Comparator=oe;var ie={};function se(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof se)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new se(e.raw,t);if(e instanceof oe)return new se(e.value,t);if(!(this instanceof se))return new se(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map(function(e){return this.parseRange(e.trim())},this).filter(function(e){return e.length}),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function ae(e){return!e||"x"===e.toLowerCase()||"*"===e}function ce(e,t,r,n,o,i,s,a,c,l,u,d,p){return((t=ae(r)?"":ae(n)?">="+r+".0.0":ae(o)?">="+r+"."+n+".0":">="+t)+" "+(a=ae(c)?"":ae(l)?"<"+(+c+1)+".0.0":ae(u)?"<"+c+"."+(+l+1)+".0":d?"<="+c+"."+l+"."+u+"-"+d:"<="+a)).trim()}function le(e,t,n){for(var o=0;o<e.length;o++)if(!e[o].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(o=0;o<e.length;o++)if(r(e[o].semver),e[o].semver!==ie&&e[o].semver.prerelease.length>0){var i=e[o].semver;if(i.major===t.major&&i.minor===t.minor&&i.patch===t.patch)return!0}return!1}return!0}function ue(e,t,r){try{t=new se(t,r)}catch{return!1}return t.test(e)}function de(e,t,r,n){var o,i,s,a,c;switch(e=new G(e,n),t=new se(t,n),r){case">":o=Q,i=re,s=Y,a=">",c=">=";break;case"<":o=Y,i=te,s=Q,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(ue(e,t,n))return!1;for(var l=0;l<t.set.length;++l){var u=t.set[l],d=null,p=null;if(u.forEach(function(e){e.semver===ie&&(e=new oe(">=0.0.0")),d=d||e,p=p||e,o(e.semver,d.semver,n)?d=e:s(e.semver,p.semver,n)&&(p=e)}),d.operator===a||d.operator===c||(!p.operator||p.operator===a)&&i(e,p.semver))return!1;if(p.operator===c&&s(e,p.semver))return!1}return!0}oe.prototype.parse=function(e){var t=this.options.loose?i[U]:i[$],r=e.match(t);if(!r)throw new TypeError("Invalid comparator: "+e);this.operator=r[1],"="===this.operator&&(this.operator=""),r[2]?this.semver=new G(r[2],this.options.loose):this.semver=ie},oe.prototype.toString=function(){return this.value},oe.prototype.test=function(e){return r("Comparator.test",e,this.options.loose),this.semver===ie||("string"==typeof e&&(e=new G(e,this.options)),ne(e,this.operator,this.semver,this.options))},oe.prototype.intersects=function(e,t){if(!(e instanceof oe))throw new TypeError("a Comparator is required");var r;if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),""===this.operator)return r=new se(e.value,t),ue(this.value,r,t);if(""===e.operator)return r=new se(this.value,t),ue(e.semver,r,t);var n=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),o=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),i=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=ne(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=ne(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return n||o||i&&s||a||c},e.Range=se,se.prototype.format=function(){return this.range=this.set.map(function(e){return e.join(" ").trim()}).join("||").trim(),this.range},se.prototype.toString=function(){return this.range},se.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var n=t?i[H]:i[V];e=e.replace(n,ce),r("hyphen replace",e),e=e.replace(i[B],"$1$2$3"),r("comparator trim",e,i[B]),e=(e=(e=e.replace(i[D],"$1~")).replace(i[M],"$1^")).split(/\s+/).join(" ");var o=t?i[U]:i[$],s=e.split(" ").map(function(e){return function(e,t){return r("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map(function(e){return function(e,t){r("caret",e,t);var n=t.loose?i[F]:i[L];return e.replace(n,function(t,n,o,i,s){var a;return r("caret",e,t,n,o,i,s),ae(n)?a="":ae(o)?a=">="+n+".0.0 <"+(+n+1)+".0.0":ae(i)?a="0"===n?">="+n+"."+o+".0 <"+n+"."+(+o+1)+".0":">="+n+"."+o+".0 <"+(+n+1)+".0.0":s?(r("replaceCaret pr",s),a="0"===n?"0"===o?">="+n+"."+o+"."+i+"-"+s+" <"+n+"."+o+"."+(+i+1):">="+n+"."+o+"."+i+"-"+s+" <"+n+"."+(+o+1)+".0":">="+n+"."+o+"."+i+"-"+s+" <"+(+n+1)+".0.0"):(r("no pr"),a="0"===n?"0"===o?">="+n+"."+o+"."+i+" <"+n+"."+o+"."+(+i+1):">="+n+"."+o+"."+i+" <"+n+"."+(+o+1)+".0":">="+n+"."+o+"."+i+" <"+(+n+1)+".0.0"),r("caret return",a),a})}(e,t)}).join(" ")}(e,t),r("caret",e),e=function(e,t){return e.trim().split(/\s+/).map(function(e){return function(e,t){var n=t.loose?i[k]:i[x];return e.replace(n,function(t,n,o,i,s){var a;return r("tilde",e,t,n,o,i,s),ae(n)?a="":ae(o)?a=">="+n+".0.0 <"+(+n+1)+".0.0":ae(i)?a=">="+n+"."+o+".0 <"+n+"."+(+o+1)+".0":s?(r("replaceTilde pr",s),a=">="+n+"."+o+"."+i+"-"+s+" <"+n+"."+(+o+1)+".0"):a=">="+n+"."+o+"."+i+" <"+n+"."+(+o+1)+".0",r("tilde return",a),a})}(e,t)}).join(" ")}(e,t),r("tildes",e),e=function(e,t){return r("replaceXRanges",e,t),e.split(/\s+/).map(function(e){return function(e,t){e=e.trim();var n=t.loose?i[N]:i[O];return e.replace(n,function(t,n,o,i,s,a){r("xRange",e,t,n,o,i,s,a);var c=ae(o),l=c||ae(i),u=l||ae(s);return"="===n&&u&&(n=""),c?t=">"===n||"<"===n?"<0.0.0":"*":n&&u?(l&&(i=0),s=0,">"===n?(n=">=",l?(o=+o+1,i=0,s=0):(i=+i+1,s=0)):"<="===n&&(n="<",l?o=+o+1:i=+i+1),t=n+o+"."+i+"."+s):l?t=">="+o+".0.0 <"+(+o+1)+".0.0":u&&(t=">="+o+"."+i+".0 <"+o+"."+(+i+1)+".0"),r("xRange return",t),t})}(e,t)}).join(" ")}(e,t),r("xrange",e),e=function(e,t){return r("replaceStars",e,t),e.trim().replace(i[z],"")}(e,t),r("stars",e),e}(e,this.options)},this).join(" ").split(/\s+/);return this.options.loose&&(s=s.filter(function(e){return!!e.match(o)})),s.map(function(e){return new oe(e,this.options)},this)},se.prototype.intersects=function(e,t){if(!(e instanceof se))throw new TypeError("a Range is required");return this.set.some(function(r){return r.every(function(r){return e.set.some(function(e){return e.every(function(e){return r.intersects(e,t)})})})})},e.toComparators=function(e,t){return new se(e,t).set.map(function(e){return e.map(function(e){return e.value}).join(" ").trim().split(" ")})},se.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new G(e,this.options));for(var t=0;t<this.set.length;t++)if(le(this.set[t],e,this.options))return!0;return!1},e.satisfies=ue,e.maxSatisfying=function(e,t,r){var n=null,o=null;try{var i=new se(t,r)}catch{return null}return e.forEach(function(e){i.test(e)&&(!n||-1===o.compare(e))&&(o=new G(n=e,r))}),n},e.minSatisfying=function(e,t,r){var n=null,o=null;try{var i=new se(t,r)}catch{return null}return e.forEach(function(e){i.test(e)&&(!n||1===o.compare(e))&&(o=new G(n=e,r))}),n},e.minVersion=function(e,t){e=new se(e,t);var r=new G("0.0.0");if(e.test(r)||(r=new G("0.0.0-0"),e.test(r)))return r;r=null;for(var n=0;n<e.set.length;++n)e.set[n].forEach(function(e){var t=new G(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":(!r||Q(r,t))&&(r=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}});return r&&e.test(r)?r:null},e.validRange=function(e,t){try{return new se(e,t).range||"*"}catch{return null}},e.ltr=function(e,t,r){return de(e,t,"<",r)},e.gtr=function(e,t,r){return de(e,t,">",r)},e.outside=de,e.prerelease=function(e,t){var r=W(e,t);return r&&r.prerelease.length?r.prerelease:null},e.intersects=function(e,t,r){return e=new se(e,r),t=new se(t,r),e.intersects(t)},e.coerce=function(e){if(e instanceof G)return e;if("string"!=typeof e)return null;var t=e.match(i[R]);return null==t?null:W(t[1]+"."+(t[2]||"0")+"."+(t[3]||"0"))}}),hn=v((e,t)=>{var r,n,o,i,s,a=Jr().wrap,c=[],l=0,u=!1,d=[];function p(e,t){var r=e.length,n=t.length,o=[];if(0===r&&0===n)return o;for(var i=0;i<r;i++)o[i]=e[i];if(0===n)return o;for(var s=0;s<n;s++){var a=!0;for(i=0;i<r;i++)if(e[i].uid===t[s].uid){a=!1;break}a&&o.push(t[s])}return o}function h(e,t){"function"==typeof e.create&&(this.create=e.create,this.flags|=1),"function"==typeof e.before&&(this.before=e.before,this.flags|=2),"function"==typeof e.after&&(this.after=e.after,this.flags|=4),"function"==typeof e.error&&(this.error=e.error,this.flags|=8),this.uid=++l,this.data=void 0===t?null:t}function f(e,t){if("object"!=typeof e||!e)throw new TypeError("callbacks argument must be an object");return e instanceof h?e:new h(e,t)}process._fatalException?(o=!1,r=function(e){var t=c.length;if(o||0===t)return!1;var r=!1;o=!0;for(var n=0;n<t;++n){var s=c[n];if(8&s.flags){var a=i&&i[s.uid];r=s.error(a,e)||r}}return o=!1,d.length>0&&(c=d.pop()),i=void 0,r&&!u},n=function(e,t,r){var n=[];u=!0;for(var o=0;o<r;++o){var s=t[o];if(n[s.uid]=s.data,1&s.flags){var a=s.create(s.data);void 0!==a&&(n[s.uid]=a)}}return u=!1,function(){i=n,d.push(c),c=p(t,c),u=!0;for(var o=0;o<r;++o)(2&t[o].flags)>0&&t[o].before(this,n[t[o].uid]);u=!1;var s=e.apply(this,arguments);for(u=!0,o=0;o<r;++o)(4&t[o].flags)>0&&t[o].after(this,n[t[o].uid]);return u=!1,c=d.pop(),i=void 0,s}},a(process,"_fatalException",function(e){return function(t){return r(t)||e(t)}})):(s=!1,r=function(e){if(s)throw e;for(var t=!1,r=c.length,n=0;n<r;++n){var o=c[n];8&o.flags&&(t=o.error(null,e)||t)}if(!t&&u)throw e},n=function(e,t,n){var o=[];u=!0;for(var i=0;i<n;++i){var a=t[i];if(o[a.uid]=a.data,1&a.flags){var l=a.create(a.data);void 0!==l&&(o[a.uid]=l)}}return u=!1,function(){var i,a=!1,l=!1;d.push(c),c=p(t,c),u=!0;for(var h=0;h<n;++h)(2&t[h].flags)>0&&t[h].before(this,o[t[h].uid]);u=!1;try{i=e.apply(this,arguments)}catch(e){for(a=!0,h=0;h<n;++h)if(8&c[h].flags)try{l=c[h].error(o[t[h].uid],e)||l}catch(e){throw s=!0,e}if(!l)throw process.removeListener("uncaughtException",r),process._originalNextTick(function(){process.addListener("uncaughtException",r)}),e}finally{if(!a||l){for(u=!0,h=0;h<n;++h)(4&t[h].flags)>0&&t[h].after(this,o[t[h].uid]);u=!1}c=d.pop()}return i}},process.addListener("uncaughtException",r)),h.prototype.create=void 0,h.prototype.before=void 0,h.prototype.after=void 0,h.prototype.error=void 0,h.prototype.data=void 0,h.prototype.uid=0,h.prototype.flags=0,process.createAsyncListener=f,process.addAsyncListener=function(e,t){var r;r=e instanceof h?e:f(e,t);for(var n=!1,o=0;o<c.length;o++)if(r===c[o]){n=!0;break}return n||c.push(r),r},process.removeAsyncListener=function(e){for(var t=0;t<c.length;t++)if(e===c[t]){c.splice(t,1);break}},t.exports=function(e){var t=c.length;if(0===t)return e;for(var r=c.slice(),o=0;o<t;++o)if(r[o].flags>0)return n(e,r,t);return function(e,t,r){u=!0;for(var n=0;n<r;++n){var o=t[n];o.create&&o.create(o.data)}return u=!1,function(){d.push(c),c=p(t,c);var r=e.apply(this,arguments);return c=d.pop(),r}}(e,r,t)}}),fn=v((e,t)=>{"use strict";t.exports=(e,t)=>class extends e{constructor(e){var r,n;super(function(e,i){r=this,n=[function(r){return t(o,!1),e(r)},function(e){return t(o,!1),i(e)}]});var o=this;try{e.apply(r,n)}catch(e){n[1](e)}return o}}}),gn=v(()=>{"use strict";if(process.addAsyncListener)throw new Error("Don't require polyfill unless needed");var e=Jr(),t=pn(),n=e.wrap,o=e.massWrap,i=hn(),s=r(9023),a=t.gte(process.version,"6.0.0"),c=t.gte(process.version,"7.0.0"),l=t.gte(process.version,"8.0.0"),u=t.gte(process.version,"11.0.0"),d=r(9278);function p(e){return function(){this.on("connection",function(e){e._handle&&(e._handle.onread=i(e._handle.onread))});try{return e.apply(this,arguments)}finally{this._handle&&this._handle.onconnection&&(this._handle.onconnection=i(this._handle.onconnection))}}}function h(e){if(e&&e._handle){var t=e._handle;t._originalOnread||(t._originalOnread=t.onread),t.onread=i(t._originalOnread)}}c&&!d._normalizeArgs?d._normalizeArgs=function(e){if(0===e.length)return[{},null];var t=e[0],r={};"object"==typeof t&&null!==t?r=t:function(e){return"string"==typeof e&&!1===function(e){return(e=Number(e))>=0&&e}(e)}(t)?r.path=t:(r.port=t,e.length>1&&"string"==typeof e[1]&&(r.host=e[1]));var n=e[e.length-1];return"function"!=typeof n?[r,null]:[r,n]}:!c&&!d._normalizeConnectArgs&&(d._normalizeConnectArgs=function(e){var t,r={};"object"==typeof e[0]&&null!==e[0]?r=e[0]:"string"==typeof e[0]&&!1===(t=e[0],(t=Number(t))>=0&&t)?r.path=e[0]:(r.port=e[0],"string"==typeof e[1]&&(r.host=e[1]));var n=e[e.length-1];return"function"==typeof n?[r,n]:[r]}),"_setUpListenHandle"in d.Server.prototype?n(d.Server.prototype,"_setUpListenHandle",p):n(d.Server.prototype,"_listen2",p),n(d.Socket.prototype,"connect",function(e){return function(){var t;(t=l&&Array.isArray(arguments[0])&&Object.getOwnPropertySymbols(arguments[0]).length>0?arguments[0]:c?d._normalizeArgs(arguments):d._normalizeConnectArgs(arguments))[1]&&(t[1]=i(t[1]));var r=e.apply(this,t);return h(this),r}});var f=r(8611);n(f.Agent.prototype,"addRequest",function(e){return function(t){var r=t.onSocket;return t.onSocket=i(function(e){return h(e),r.apply(this,arguments)}),e.apply(this,arguments)}});var g=r(5317);function m(e){Array.isArray(e.stdio)&&e.stdio.forEach(function(e){e&&e._handle&&(e._handle.onread=i(e._handle.onread),n(e._handle,"close",R))}),e._handle&&(e._handle.onexit=i(e._handle.onexit))}g.ChildProcess?n(g.ChildProcess.prototype,"spawn",function(e){return function(){var t=e.apply(this,arguments);return m(this),t}}):o(g,["execFile","fork","spawn"],function(e){return function(){var t=e.apply(this,arguments);return m(t),t}}),process._fatalException||(process._originalNextTick=process.nextTick);var v=[];process._nextDomainTick&&v.push("_nextDomainTick"),process._tickDomainCallback&&v.push("_tickDomainCallback"),o(process,v,N),n(process,"nextTick",R);var y=["setTimeout","setInterval"];global.setImmediate&&y.push("setImmediate");var S=r(3557),w=global.setTimeout===S.setTimeout;o(S,y,R),w&&o(global,y,R);var E=r(2250);o(E,["lookup","resolve","resolve4","resolve6","resolveCname","resolveMx","resolveNs","resolveTxt","resolveSrv","reverse"],N),E.resolveNaptr&&n(E,"resolveNaptr",N);var _,b,P,T=r(9896);o(T,["watch","rename","truncate","chown","fchown","chmod","fchmod","stat","lstat","fstat","link","symlink","readlink","realpath","unlink","rmdir","mkdir","readdir","close","open","utimes","futimes","fsync","write","read","readFile","writeFile","appendFile","watchFile","unwatchFile","exists"],N),T.lchown&&n(T,"lchown",N),T.lchmod&&n(T,"lchmod",N),T.ftruncate&&n(T,"ftruncate",N);try{_=r(3106)}catch{}_&&_.Deflate&&_.Deflate.prototype&&((b=Object.getPrototypeOf(_.Deflate.prototype))._transform?n(b,"_transform",N):b.write&&b.flush&&b.end&&o(b,["write","flush","end"],N));try{P=r(6982)}catch{}P&&(C=["pbkdf2","randomBytes"],u||C.push("pseudoRandomBytes"),o(P,C,N));var C,I,O=!!global.Promise&&"function Promise() { [native code] }"===Promise.toString()&&"function toString() { [native code] }"===Promise.toString.toString();function N(e){var t=function(){var t,r=arguments.length-1;if("function"==typeof arguments[r]){t=Array(arguments.length);for(var n=0;n<arguments.length-1;n++)t[n]=arguments[n];t[r]=i(arguments[r])}return e.apply(this,t||arguments)};switch(e.length){case 1:return function(r){return 1!==arguments.length?t.apply(this,arguments):("function"==typeof r&&(r=i(r)),e.call(this,r))};case 2:return function(r,n){return 2!==arguments.length?t.apply(this,arguments):("function"==typeof n&&(n=i(n)),e.call(this,r,n))};case 3:return function(r,n,o){return 3!==arguments.length?t.apply(this,arguments):("function"==typeof o&&(o=i(o)),e.call(this,r,n,o))};case 4:return function(r,n,o,s){return 4!==arguments.length?t.apply(this,arguments):("function"==typeof s&&(s=i(s)),e.call(this,r,n,o,s))};case 5:return function(r,n,o,s,a){return 5!==arguments.length?t.apply(this,arguments):("function"==typeof a&&(a=i(a)),e.call(this,r,n,o,s,a))};case 6:return function(r,n,o,s,a,c){return 6!==arguments.length?t.apply(this,arguments):("function"==typeof c&&(c=i(c)),e.call(this,r,n,o,s,a,c))};default:return t}}function R(e){var t=function(){var t;if("function"==typeof arguments[0]){(t=Array(arguments.length))[0]=i(arguments[0]);for(var r=1;r<arguments.length;r++)t[r]=arguments[r]}return e.apply(this,t||arguments)};switch(e.length){case 1:return function(r){return 1!==arguments.length?t.apply(this,arguments):("function"==typeof r&&(r=i(r)),e.call(this,r))};case 2:return function(r,n){return 2!==arguments.length?t.apply(this,arguments):("function"==typeof r&&(r=i(r)),e.call(this,r,n))};case 3:return function(r,n,o){return 3!==arguments.length?t.apply(this,arguments):("function"==typeof r&&(r=i(r)),e.call(this,r,n,o))};case 4:return function(r,n,o,s){return 4!==arguments.length?t.apply(this,arguments):("function"==typeof r&&(r=i(r)),e.call(this,r,n,o,s))};case 5:return function(r,n,o,s,a){return 5!==arguments.length?t.apply(this,arguments):("function"==typeof r&&(r=i(r)),e.call(this,r,n,o,s,a))};case 6:return function(r,n,o,s,a,c){return 6!==arguments.length?t.apply(this,arguments):("function"==typeof r&&(r=i(r)),e.call(this,r,n,o,s,a,c))};default:return t}}O&&(I=process.addAsyncListener({create:function(){O=!1}}),global.Promise.resolve(!0).then(function(){O=!1}),process.removeAsyncListener(I)),O&&function(){var e=global.Promise;function t(n){if(!(this instanceof t))return e(n);if("function"!=typeof n)return new e(n);var o,i,s=new e(function(e,t){o=this,i=[function(t){return r(s,!1),e(t)},function(e){return r(s,!1),t(e)}]});s.__proto__=t.prototype;try{n.apply(o,i)}catch(e){i[1](e)}return s}function r(e,t){(!e.__asl_wrapper||t)&&(e.__asl_wrapper=i(o))}function o(t,n,i,s){var a;try{return{returnVal:a=n.call(t,i),error:!1}}catch(e){return{errorVal:e,error:!0}}finally{a instanceof e?s.__asl_wrapper=function(){return(a.__asl_wrapper||o).apply(this,arguments)}:r(s,!0)}}function c(e){return function(){var t=this,r=e.apply(t,Array.prototype.map.call(arguments,function(e){return"function"!=typeof e?e:i(function(n){var i=(t.__asl_wrapper||o)(this,e,n,r);if(i.error)throw i.errorVal;return i.returnVal})}));return r.__asl_wrapper=function(e,n,i,s){return t.__asl_wrapper?(t.__asl_wrapper(e,function(){},null,r),r.__asl_wrapper(e,n,i,s)):o(e,n,i,s)},r}}s.inherits(t,e),n(e.prototype,"then",c),e.prototype.chain&&n(e.prototype,"chain",c),a?global.Promise=fn()(e,r):(["all","race","reject","resolve","accept","defer"].forEach(function(r){"function"==typeof e[r]&&(t[r]=e[r])}),global.Promise=t)}()}),mn=v((e,t)=>{"use strict";var n=r(2613),o=Qr(),i="cls@contexts",s="error@context";function a(e){this.name=e,this.active=null,this._set=[],this.id=null}function c(e){return process.namespaces[e]}function l(e){var t=c(e);n.ok(t,"can't delete nonexistent namespace!"),n.ok(t.id,"don't assign to process.namespaces directly!"),process.removeAsyncListener(t.id),process.namespaces[e]=null}function u(){process.namespaces&&Object.keys(process.namespaces).forEach(function(e){l(e)}),process.namespaces=Object.create(null)}process.addAsyncListener||gn(),a.prototype.set=function(e,t){if(!this.active)throw new Error("No context available. ns.run() or ns.bind() must be called first.");return this.active[e]=t,t},a.prototype.get=function(e){if(this.active)return this.active[e]},a.prototype.createContext=function(){return Object.create(this.active)},a.prototype.run=function(e){var t=this.createContext();this.enter(t);try{return e(t),t}catch(e){throw e&&(e[s]=t),e}finally{this.exit(t)}},a.prototype.runAndReturn=function(e){var t;return this.run(function(r){t=e(r)}),t},a.prototype.bind=function(e,t){t||(t=this.active?this.active:this.createContext());var r=this;return function(){r.enter(t);try{return e.apply(this,arguments)}catch(e){throw e&&(e[s]=t),e}finally{r.exit(t)}}},a.prototype.enter=function(e){n.ok(e,"context must be provided for entering"),this._set.push(this.active),this.active=e},a.prototype.exit=function(e){if(n.ok(e,"context must be provided for exiting"),this.active===e)return n.ok(this._set.length,"can't remove top context"),void(this.active=this._set.pop());var t=this._set.lastIndexOf(e);n.ok(t>=0,"context not currently entered; can't exit"),n.ok(t,"can't remove top context"),this._set.splice(t,1)},a.prototype.bindEmitter=function(e){n.ok(e.on&&e.addListener&&e.emit,"can only bind real EEs");var t=this,r="context@"+this.name;o(e,function(e){!e||(e[i]||(e[i]=Object.create(null)),e[i][r]={namespace:t,context:t.active})},function(e){if(!e||!e[i])return e;var t=e,r=e[i];return Object.keys(r).forEach(function(e){var n=r[e];t=n.namespace.bind(t,n.context)}),t})},a.prototype.fromException=function(e){return e[s]},process.namespaces||u(),t.exports={getNamespace:c,createNamespace:function(e){n.ok(e,"namespace must be given a name!");var t=new a(e);return t.id=process.addAsyncListener({create:function(){return t.active},before:function(e,r){r&&t.enter(r)},after:function(e,r){r&&t.exit(r)},error:function(e){e&&t.exit(e)}}),process.namespaces[e]=t,t},destroyNamespace:l,reset:u}}),vn=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CorrelationContextManager=void 0;var t=w(),r=Qt(),n=tr(),o=rr(),i=Kr(),s=function(){function e(){}return e.getCurrentContext=function(){if(!e.enabled)return null;var t=e.session.get(e.CONTEXT_NAME);return void 0===t?null:t},e.generateContextObject=function(e,t,r,n,o,i){return t=t||e,this.enabled?{operation:{name:r,id:e,parentId:t,traceparent:o,tracestate:i},customProperties:new a(n)}:null},e.spanToContextObject=function(t,r,o){var i=new n;return i.traceId=t.traceId,i.spanId=t.spanId,i.traceFlag=n.formatOpenTelemetryTraceFlags(t.traceFlags)||n.DEFAULT_TRACE_FLAG,i.parentId=r,e.generateContextObject(i.traceId,i.parentId,o,null,i)},e.runWithContext=function(t,r){var n;return e.enabled?e.session.bind(r,((n={})[e.CONTEXT_NAME]=t,n))():r()},e.wrapEmitter=function(t){e.enabled&&e.session.bindEmitter(t)},e.wrapCallback=function(t,r){var n;return e.enabled?e.session.bind(t,r?((n={})[e.CONTEXT_NAME]=r,n):void 0):t},e.enable=function(t){if(!this.enabled){if(!this.isNodeVersionCompatible())return void(this.enabled=!1);e.hasEverEnabled||(this.forceClsHooked=t,this.hasEverEnabled=!0,typeof this.cls>"u"&&(!0===e.forceClsHooked||void 0===e.forceClsHooked&&e.shouldUseClsHooked()?this.cls=dn():this.cls=mn()),e.session=this.cls.createNamespace("AI-CLS-Session"),r.registerContextPreservation(function(t){return e.session.bind(t)})),this.enabled=!0}},e.startOperation=function(r,s){var a=r&&r.traceContext||null,c=r&&r.traceId?r:null,l=r&&r.headers;if(c){var u=new n("00-"+c.traceId+"-"+c.spanId+"-01"),d=new o(c.traceState?c.traceState.serialize():null);return e.generateContextObject(c.traceId,"|"+c.traceId+"."+c.spanId+".","string"==typeof s?s:"",void 0,u,d)}if(a){u=new n(a.traceparent),d=new o(a.tracestate);var p="object"==typeof s?new i(s):null;return e.generateContextObject(u.traceId,u.parentId,"string"==typeof s?s:p.getOperationName({}),p&&p.getCorrelationContextHeader()||void 0,u,d)}return l?(u=new n(l.traceparent?l.traceparent.toString():null),d=new o(l.tracestate?l.tracestate.toString():null),p=new i(r),e.generateContextObject(u.traceId,u.parentId,p.getOperationName({}),p.getCorrelationContextHeader(),u,d)):(t.warn("startOperation was called with invalid arguments",arguments),null)},e.disable=function(){this.enabled=!1},e.reset=function(){e.hasEverEnabled&&(e.session=null,e.session=this.cls.createNamespace("AI-CLS-Session"))},e.isNodeVersionCompatible=function(){var e=process.versions.node.split(".");return parseInt(e[0])>3||parseInt(e[0])>2&&parseInt(e[1])>2},e.shouldUseClsHooked=function(){var e=process.versions.node.split(".");return parseInt(e[0])>8||parseInt(e[0])>=8&&parseInt(e[1])>=2},e.canUseClsHooked=function(){var e=process.versions.node.split("."),t=parseInt(e[0])>8||parseInt(e[0])>=8&&parseInt(e[1])>=0,r=parseInt(e[0])<8||parseInt(e[0])<=8&&parseInt(e[1])<2,n=parseInt(e[0])>4||parseInt(e[0])>=4&&parseInt(e[1])>=7;return!(t&&r)&&n},e.enabled=!1,e.hasEverEnabled=!1,e.forceClsHooked=void 0,e.CONTEXT_NAME="ApplicationInsights-Context",e}();e.CorrelationContextManager=s;var a=function(){function e(e){this.props=[],this.addHeaderData(e)}return e.prototype.addHeaderData=function(e){var t=e?e.split(", "):[];this.props=t.map(function(e){var t=e.split("=");return{key:t[0],value:t[1]}}).concat(this.props)},e.prototype.serializeToHeader=function(){return this.props.map(function(e){return e.key+"="+e.value}).join(", ")},e.prototype.getProperty=function(e){for(var t=0;t<this.props.length;++t){var r=this.props[t];if(r.key===e)return r.value}},e.prototype.setProperty=function(r,n){if(e.bannedCharacters.test(r)||e.bannedCharacters.test(n))t.warn("Correlation context property keys and values must not contain ',' or '='. setProperty was called with key: "+r+" and value: "+n);else{for(var o=0;o<this.props.length;++o){var i=this.props[o];if(i.key===r)return void(i.value=n)}this.props.push({key:r,value:n})}},e.bannedCharacters=/[,=]/,e}()}),yn=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.dispose=e.enable=void 0;var t=Wr(),r=T(),n=[],o=function(e){var r=e.data.message;n.forEach(function(n){r instanceof Error?n.trackException({exception:r}):(r.lastIndexOf("\n")==r.length-1&&(r=r.substring(0,r.length-1)),n.trackTrace({message:r,severity:e.data.stderr?t.SeverityLevel.Warning:t.SeverityLevel.Information}))})};e.enable=function(e,t){e?(0===n.length&&r.channel.subscribe("console",o),n.push(t)):0===(n=n.filter(function(e){return e!=t})).length&&r.channel.unsubscribe("console",o)},e.dispose=function(){r.channel.unsubscribe("console",o),n=[]}}),Sn=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.dispose=e.enable=void 0;var t=Wr(),r=T(),n=[],o={10:t.SeverityLevel.Verbose,20:t.SeverityLevel.Verbose,30:t.SeverityLevel.Information,40:t.SeverityLevel.Warning,50:t.SeverityLevel.Error,60:t.SeverityLevel.Critical},i=function(e){var t=e.data.result;n.forEach(function(r){var n=o[e.data.level];t instanceof Error?r.trackException({exception:t}):r.trackTrace({message:t,severity:n})})};e.enable=function(e,t){e?(0===n.length&&r.channel.subscribe("bunyan",i),n.push(t)):0===(n=n.filter(function(e){return e!=t})).length&&r.channel.unsubscribe("bunyan",i)},e.dispose=function(){r.channel.unsubscribe("bunyan",i),n=[]}}),wn=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.dispose=e.enable=void 0;var t=Wr(),r=T(),n=[],o={syslog:function(e){var r={emerg:t.SeverityLevel.Critical,alert:t.SeverityLevel.Critical,crit:t.SeverityLevel.Critical,error:t.SeverityLevel.Error,warning:t.SeverityLevel.Warning,notice:t.SeverityLevel.Information,info:t.SeverityLevel.Information,debug:t.SeverityLevel.Verbose};return void 0===r[e]?t.SeverityLevel.Information:r[e]},npm:function(e){var r={error:t.SeverityLevel.Error,warn:t.SeverityLevel.Warning,info:t.SeverityLevel.Information,verbose:t.SeverityLevel.Verbose,debug:t.SeverityLevel.Verbose,silly:t.SeverityLevel.Verbose};return void 0===r[e]?t.SeverityLevel.Information:r[e]},unknown:function(e){return t.SeverityLevel.Information}},i=function(e){var t=e.data.message;n.forEach(function(r){if(t instanceof Error)r.trackException({exception:t,properties:e.data.meta});else{var n=o[e.data.levelKind](e.data.level);r.trackTrace({message:t,severity:n,properties:e.data.meta})}})};e.enable=function(e,t){e?(0===n.length&&r.channel.subscribe("winston",i),n.push(t)):0===(n=n.filter(function(e){return e!=t})).length&&r.channel.unsubscribe("winston",i)},e.dispose=function(){r.channel.unsubscribe("winston",i),n=[]}}),En=v((e,t)=>{"use strict";var r=Qt(),n=function(){function e(t){if(e.INSTANCE)throw new Error("Console logging adapter tracking should be configured from the applicationInsights object");this._client=t,e.INSTANCE=this}return e.prototype.enable=function(e,t){r.IsInitialized&&(yn().enable(e&&t,this._client),Sn().enable(e,this._client),wn().enable(e,this._client))},e.prototype.isInitialized=function(){return this._isInitialized},e.prototype.dispose=function(){e.INSTANCE=null,this.enable(!1,!1)},e._methodNames=["debug","info","log","warn","error"],e}();t.exports=n}),_n=v((e,t)=>{"use strict";var r=function(){function e(t){if(e.INSTANCE)throw new Error("Exception tracking should be configured from the applicationInsights object");e.INSTANCE=this,this._client=t;var r=process.versions.node.split(".");e._canUseUncaughtExceptionMonitor=parseInt(r[0])>13||13===parseInt(r[0])&&parseInt(r[1])>=7}return e.prototype.isInitialized=function(){return this._isInitialized},e.prototype.enable=function(t){var r=this;if(t){if(this._isInitialized=!0,!this._exceptionListenerHandle){var n=function(t,n,o){void 0===o&&(o=new Error(e._FALLBACK_ERROR_MESSAGE)),r._client.trackException({exception:o}),r._client.flush({isAppCrashing:!0}),t&&n&&1===process.listeners(n).length&&(console.error(o),process.exit(1))};e._canUseUncaughtExceptionMonitor?(this._exceptionListenerHandle=n.bind(this,!1,void 0),process.on(e.UNCAUGHT_EXCEPTION_MONITOR_HANDLER_NAME,this._exceptionListenerHandle)):(this._exceptionListenerHandle=n.bind(this,!0,e.UNCAUGHT_EXCEPTION_HANDLER_NAME),this._rejectionListenerHandle=n.bind(this,!1,void 0),process.on(e.UNCAUGHT_EXCEPTION_HANDLER_NAME,this._exceptionListenerHandle),process.on(e.UNHANDLED_REJECTION_HANDLER_NAME,this._rejectionListenerHandle))}}else this._exceptionListenerHandle&&(e._canUseUncaughtExceptionMonitor?process.removeListener(e.UNCAUGHT_EXCEPTION_MONITOR_HANDLER_NAME,this._exceptionListenerHandle):(process.removeListener(e.UNCAUGHT_EXCEPTION_HANDLER_NAME,this._exceptionListenerHandle),process.removeListener(e.UNHANDLED_REJECTION_HANDLER_NAME,this._rejectionListenerHandle)),this._exceptionListenerHandle=void 0,this._rejectionListenerHandle=void 0,delete this._exceptionListenerHandle,delete this._rejectionListenerHandle)},e.prototype.dispose=function(){e.INSTANCE=null,this.enable(!1),this._isInitialized=!1},e.INSTANCE=null,e.UNCAUGHT_EXCEPTION_MONITOR_HANDLER_NAME="uncaughtExceptionMonitor",e.UNCAUGHT_EXCEPTION_HANDLER_NAME="uncaughtException",e.UNHANDLED_REJECTION_HANDLER_NAME="unhandledRejection",e._RETHROW_EXIT_MESSAGE="Application Insights Rethrow Exception Handler",e._FALLBACK_ERROR_MESSAGE="A promise was rejected without providing an error. Application Insights generated this error stack for you.",e._canUseUncaughtExceptionMonitor=!1,e}();t.exports=r}),bn=v(e=>{"use strict";var t,r,n,o;Object.defineProperty(e,"__esModule",{value:!0}),e.HeartBeatMetricName=e.DependencyTypeName=e.SpanAttribute=e.TelemetryTypeStringToQuickPulseDocumentType=e.TelemetryTypeStringToQuickPulseType=e.QuickPulseType=e.QuickPulseDocumentType=e.PerformanceToQuickPulseCounter=e.MetricId=e.PerformanceCounter=e.QuickPulseCounter=e.DEFAULT_LIVEMETRICS_HOST=e.DEFAULT_LIVEMETRICS_ENDPOINT=e.DEFAULT_BREEZE_ENDPOINT=void 0,e.DEFAULT_BREEZE_ENDPOINT="https://dc.services.visualstudio.com",e.DEFAULT_LIVEMETRICS_ENDPOINT="https://rt.services.visualstudio.com",e.DEFAULT_LIVEMETRICS_HOST="rt.services.visualstudio.com",(n=r=e.QuickPulseCounter||(e.QuickPulseCounter={})).COMMITTED_BYTES="\\Memory\\Committed Bytes",n.PROCESSOR_TIME="\\Processor(_Total)\\% Processor Time",n.REQUEST_RATE="\\ApplicationInsights\\Requests/Sec",n.REQUEST_FAILURE_RATE="\\ApplicationInsights\\Requests Failed/Sec",n.REQUEST_DURATION="\\ApplicationInsights\\Request Duration",n.DEPENDENCY_RATE="\\ApplicationInsights\\Dependency Calls/Sec",n.DEPENDENCY_FAILURE_RATE="\\ApplicationInsights\\Dependency Calls Failed/Sec",n.DEPENDENCY_DURATION="\\ApplicationInsights\\Dependency Call Duration",n.EXCEPTION_RATE="\\ApplicationInsights\\Exceptions/Sec",function(e){e.PRIVATE_BYTES="\\Process(??APP_WIN32_PROC??)\\Private Bytes",e.AVAILABLE_BYTES="\\Memory\\Available Bytes",e.PROCESSOR_TIME="\\Processor(_Total)\\% Processor Time",e.PROCESS_TIME="\\Process(??APP_WIN32_PROC??)\\% Processor Time",e.REQUEST_RATE="\\ASP.NET Applications(??APP_W3SVC_PROC??)\\Requests/Sec",e.REQUEST_DURATION="\\ASP.NET Applications(??APP_W3SVC_PROC??)\\Request Execution Time"}(o=e.PerformanceCounter||(e.PerformanceCounter={})),function(e){e.REQUESTS_DURATION="requests/duration",e.DEPENDENCIES_DURATION="dependencies/duration",e.EXCEPTIONS_COUNT="exceptions/count",e.TRACES_COUNT="traces/count"}(e.MetricId||(e.MetricId={})),e.PerformanceToQuickPulseCounter=((t={})[o.PROCESSOR_TIME]=r.PROCESSOR_TIME,t[o.REQUEST_RATE]=r.REQUEST_RATE,t[o.REQUEST_DURATION]=r.REQUEST_DURATION,t[r.COMMITTED_BYTES]=r.COMMITTED_BYTES,t[r.REQUEST_FAILURE_RATE]=r.REQUEST_FAILURE_RATE,t[r.DEPENDENCY_RATE]=r.DEPENDENCY_RATE,t[r.DEPENDENCY_FAILURE_RATE]=r.DEPENDENCY_FAILURE_RATE,t[r.DEPENDENCY_DURATION]=r.DEPENDENCY_DURATION,t[r.EXCEPTION_RATE]=r.EXCEPTION_RATE,t),e.QuickPulseDocumentType={Event:"Event",Exception:"Exception",Trace:"Trace",Metric:"Metric",Request:"Request",Dependency:"RemoteDependency",Availability:"Availability",PageView:"PageView"},e.QuickPulseType={Event:"EventTelemetryDocument",Exception:"ExceptionTelemetryDocument",Trace:"TraceTelemetryDocument",Metric:"MetricTelemetryDocument",Request:"RequestTelemetryDocument",Dependency:"DependencyTelemetryDocument",Availability:"AvailabilityTelemetryDocument",PageView:"PageViewTelemetryDocument"},e.TelemetryTypeStringToQuickPulseType={EventData:e.QuickPulseType.Event,ExceptionData:e.QuickPulseType.Exception,MessageData:e.QuickPulseType.Trace,MetricData:e.QuickPulseType.Metric,RequestData:e.QuickPulseType.Request,RemoteDependencyData:e.QuickPulseType.Dependency,AvailabilityData:e.QuickPulseType.Availability,PageViewData:e.QuickPulseType.PageView},e.TelemetryTypeStringToQuickPulseDocumentType={EventData:e.QuickPulseDocumentType.Event,ExceptionData:e.QuickPulseDocumentType.Exception,MessageData:e.QuickPulseDocumentType.Trace,MetricData:e.QuickPulseDocumentType.Metric,RequestData:e.QuickPulseDocumentType.Request,RemoteDependencyData:e.QuickPulseDocumentType.Dependency,AvailabilityData:e.QuickPulseDocumentType.Availability,PageViewData:e.QuickPulseDocumentType.PageView},e.SpanAttribute={HttpHost:"http.host",HttpMethod:"http.method",HttpPort:"http.port",HttpStatusCode:"http.status_code",HttpUrl:"http.url",HttpUserAgent:"http.user_agent",GrpcMethod:"grpc.method",GrpcService:"rpc.service"},e.DependencyTypeName={Grpc:"GRPC",Http:"HTTP",InProc:"InProc"},e.HeartBeatMetricName="HeartBeat"}),Pn=v((e,t)=>{"use strict";var n=r(857),o=bn(),i=function(){function e(t,r,n){void 0===r&&(r=6e4),void 0===n&&(n=!1),this._lastIntervalRequestExecutionTime=0,this._lastIntervalDependencyExecutionTime=0,e.INSTANCE||(e.INSTANCE=this),this._isInitialized=!1,this._client=t,this._collectionInterval=r,this._enableLiveMetricsCounters=n}return e.prototype.enable=function(t,r){var o=this;this._isEnabled=t,this._isEnabled&&!this._isInitialized&&(this._isInitialized=!0),t?this._handle||(this._lastCpus=n.cpus(),this._lastRequests={totalRequestCount:e._totalRequestCount,totalFailedRequestCount:e._totalFailedRequestCount,time:+new Date},this._lastDependencies={totalDependencyCount:e._totalDependencyCount,totalFailedDependencyCount:e._totalFailedDependencyCount,time:+new Date},this._lastExceptions={totalExceptionCount:e._totalExceptionCount,time:+new Date},"function"==typeof process.cpuUsage&&(this._lastAppCpuUsage=process.cpuUsage()),this._lastHrtime=process.hrtime(),this._collectionInterval=r||this._collectionInterval,this._handle=setInterval(function(){return o.trackPerformance()},this._collectionInterval),this._handle.unref()):this._handle&&(clearInterval(this._handle),this._handle=void 0)},e.countRequest=function(t,r){var n;if(e.isEnabled()){if("string"==typeof t)n=+new Date("1970-01-01T"+t+"Z");else{if("number"!=typeof t)return;n=t}e._intervalRequestExecutionTime+=n,!1===r&&e._totalFailedRequestCount++,e._totalRequestCount++}},e.countException=function(){e._totalExceptionCount++},e.countDependency=function(t,r){var n;if(e.isEnabled()){if("string"==typeof t)n=+new Date("1970-01-01T"+t+"Z");else{if("number"!=typeof t)return;n=t}e._intervalDependencyExecutionTime+=n,!1===r&&e._totalFailedDependencyCount++,e._totalDependencyCount++}},e.prototype.isInitialized=function(){return this._isInitialized},e.isEnabled=function(){return e.INSTANCE&&e.INSTANCE._isEnabled},e.prototype.trackPerformance=function(){this._trackCpu(),this._trackMemory(),this._trackNetwork(),this._trackDependencyRate(),this._trackExceptionRate()},e.prototype._trackCpu=function(){var e=n.cpus();if(e&&e.length&&this._lastCpus&&e.length===this._lastCpus.length){for(var t=0,r=0,i=0,s=0,a=0,c=0;e&&c<e.length;c++){var l=e[c],u=this._lastCpus[c],d=(l.model,l.speed,l.times),p=u.times;t+=d.user-p.user||0,r+=d.sys-p.sys||0,i+=d.nice-p.nice||0,s+=d.idle-p.idle||0,a+=d.irq-p.irq||0}var h=void 0;if("function"==typeof process.cpuUsage){var f=process.cpuUsage(),g=process.hrtime(),m=f.user-this._lastAppCpuUsage.user+(f.system-this._lastAppCpuUsage.system)||0;typeof this._lastHrtime<"u"&&2===this._lastHrtime.length&&(h=100*m/((1e6*(g[0]-this._lastHrtime[0])+(g[1]-this._lastHrtime[1])/1e3||0)*e.length)),this._lastAppCpuUsage=f,this._lastHrtime=g}var v=t+r+i+s+a||1;this._client.trackMetric({name:o.PerformanceCounter.PROCESSOR_TIME,value:(v-s)/v*100}),this._client.trackMetric({name:o.PerformanceCounter.PROCESS_TIME,value:h||t/v*100})}this._lastCpus=e},e.prototype._trackMemory=function(){var e=n.freemem(),t=process.memoryUsage().rss,r=n.totalmem()-e;this._client.trackMetric({name:o.PerformanceCounter.PRIVATE_BYTES,value:t}),this._client.trackMetric({name:o.PerformanceCounter.AVAILABLE_BYTES,value:e}),this._enableLiveMetricsCounters&&this._client.trackMetric({name:o.QuickPulseCounter.COMMITTED_BYTES,value:r})},e.prototype._trackNetwork=function(){var t=this._lastRequests,r={totalRequestCount:e._totalRequestCount,totalFailedRequestCount:e._totalFailedRequestCount,time:+new Date},n=r.totalRequestCount-t.totalRequestCount||0,i=r.totalFailedRequestCount-t.totalFailedRequestCount||0,s=r.time-t.time,a=s/1e3,c=(e._intervalRequestExecutionTime-this._lastIntervalRequestExecutionTime)/n||0;if(this._lastIntervalRequestExecutionTime=e._intervalRequestExecutionTime,s>0){var l=n/a,u=i/a;this._client.trackMetric({name:o.PerformanceCounter.REQUEST_RATE,value:l}),(!this._enableLiveMetricsCounters||n>0)&&this._client.trackMetric({name:o.PerformanceCounter.REQUEST_DURATION,value:c}),this._enableLiveMetricsCounters&&this._client.trackMetric({name:o.QuickPulseCounter.REQUEST_FAILURE_RATE,value:u})}this._lastRequests=r},e.prototype._trackDependencyRate=function(){if(this._enableLiveMetricsCounters){var t=this._lastDependencies,r={totalDependencyCount:e._totalDependencyCount,totalFailedDependencyCount:e._totalFailedDependencyCount,time:+new Date},n=r.totalDependencyCount-t.totalDependencyCount||0,i=r.totalFailedDependencyCount-t.totalFailedDependencyCount||0,s=r.time-t.time,a=s/1e3,c=(e._intervalDependencyExecutionTime-this._lastIntervalDependencyExecutionTime)/n||0;if(this._lastIntervalDependencyExecutionTime=e._intervalDependencyExecutionTime,s>0){var l=n/a,u=i/a;this._client.trackMetric({name:o.QuickPulseCounter.DEPENDENCY_RATE,value:l}),this._client.trackMetric({name:o.QuickPulseCounter.DEPENDENCY_FAILURE_RATE,value:u}),(!this._enableLiveMetricsCounters||n>0)&&this._client.trackMetric({name:o.QuickPulseCounter.DEPENDENCY_DURATION,value:c})}this._lastDependencies=r}},e.prototype._trackExceptionRate=function(){if(this._enableLiveMetricsCounters){var t=this._lastExceptions,r={totalExceptionCount:e._totalExceptionCount,time:+new Date},n=r.totalExceptionCount-t.totalExceptionCount||0,i=r.time-t.time;if(i>0){var s=n/(i/1e3);this._client.trackMetric({name:o.QuickPulseCounter.EXCEPTION_RATE,value:s})}this._lastExceptions=r}},e.prototype.dispose=function(){e.INSTANCE=null,this.enable(!1),this._isInitialized=!1},e._totalRequestCount=0,e._totalFailedRequestCount=0,e._totalDependencyCount=0,e._totalFailedDependencyCount=0,e._totalExceptionCount=0,e._intervalDependencyExecutionTime=0,e._intervalRequestExecutionTime=0,e}();t.exports=i}),Tn=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AggregatedMetricCounter=void 0;e.AggregatedMetricCounter=function(e){this.dimensions=e,this.totalCount=0,this.lastTotalCount=0,this.intervalExecutionTime=0,this.lastTime=+new Date,this.lastIntervalExecutionTime=0}}),Cn=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PreaggregatedMetricPropertyNames=void 0,e.PreaggregatedMetricPropertyNames={cloudRoleInstance:"cloud/roleInstance",cloudRoleName:"cloud/roleName",operationSynthetic:"operation/synthetic",requestSuccess:"Request.Success",requestResultCode:"request/resultCode",dependencyType:"Dependency.Type",dependencyTarget:"dependency/target",dependencySuccess:"Dependency.Success",dependencyResultCode:"dependency/resultCode",traceSeverityLevel:"trace/severityLevel"}}),In=v((e,t)=>{"use strict";var r=e&&e.__assign||function(){return r=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},r.apply(this,arguments)},n=bn(),o=Tn(),i=Cn(),s=function(){function e(t,r){void 0===r&&(r=6e4),e.INSTANCE||(e.INSTANCE=this),this._isInitialized=!1,e._dependencyCountersCollection=[],e._requestCountersCollection=[],e._exceptionCountersCollection=[],e._traceCountersCollection=[],this._client=t,this._collectionInterval=r}return e.prototype.enable=function(e,t){var r=this;this._isEnabled=e,this._isEnabled&&!this._isInitialized&&(this._isInitialized=!0),e?this._handle||(this._collectionInterval=t||this._collectionInterval,this._handle=setInterval(function(){return r.trackPreAggregatedMetrics()},this._collectionInterval),this._handle.unref()):this._handle&&(clearInterval(this._handle),this._handle=void 0)},e.countException=function(t){e.isEnabled()&&e._getAggregatedCounter(t,this._exceptionCountersCollection).totalCount++},e.countTrace=function(t){e.isEnabled()&&e._getAggregatedCounter(t,this._traceCountersCollection).totalCount++},e.countRequest=function(t,r){if(e.isEnabled()){var n,o=e._getAggregatedCounter(r,this._requestCountersCollection);if("string"==typeof t)n=+new Date("1970-01-01T"+t+"Z");else{if("number"!=typeof t)return;n=t}o.intervalExecutionTime+=n,o.totalCount++}},e.countDependency=function(t,r){if(e.isEnabled()){var n,o=e._getAggregatedCounter(r,this._dependencyCountersCollection);if("string"==typeof t)n=+new Date("1970-01-01T"+t+"Z");else{if("number"!=typeof t)return;n=t}o.intervalExecutionTime+=n,o.totalCount++}},e.prototype.isInitialized=function(){return this._isInitialized},e.isEnabled=function(){return e.INSTANCE&&e.INSTANCE._isEnabled},e.prototype.trackPreAggregatedMetrics=function(){this._trackRequestMetrics(),this._trackDependencyMetrics(),this._trackExceptionMetrics(),this._trackTraceMetrics()},e._getAggregatedCounter=function(e,t){for(var r=!1,n=0;n<t.length;n++){if(e===t[n].dimensions)return t[n];if(Object.keys(e).length===Object.keys(t[n].dimensions).length){for(var i in e)if(e[i]!=t[n].dimensions[i]){r=!0;break}if(!r)return t[n];r=!1}}var s=new o.AggregatedMetricCounter(e);return t.push(s),s},e.prototype._trackRequestMetrics=function(){for(var t=0;t<e._requestCountersCollection.length;t++){var r=e._requestCountersCollection[t];r.time=+new Date;var o=r.totalCount-r.lastTotalCount||0,i=r.time-r.lastTime,s=(r.intervalExecutionTime-r.lastIntervalExecutionTime)/o||0;r.lastIntervalExecutionTime=r.intervalExecutionTime,i>0&&o>0&&this._trackPreAggregatedMetric({name:"Server response time",dimensions:r.dimensions,value:s,count:o,aggregationInterval:i,metricType:n.MetricId.REQUESTS_DURATION}),r.lastTotalCount=r.totalCount,r.lastTime=r.time}},e.prototype._trackDependencyMetrics=function(){for(var t=0;t<e._dependencyCountersCollection.length;t++){var r=e._dependencyCountersCollection[t];r.time=+new Date;var o=r.totalCount-r.lastTotalCount||0,i=r.time-r.lastTime,s=(r.intervalExecutionTime-r.lastIntervalExecutionTime)/o||0;r.lastIntervalExecutionTime=r.intervalExecutionTime,i>0&&o>0&&this._trackPreAggregatedMetric({name:"Dependency duration",dimensions:r.dimensions,value:s,count:o,aggregationInterval:i,metricType:n.MetricId.DEPENDENCIES_DURATION}),r.lastTotalCount=r.totalCount,r.lastTime=r.time}},e.prototype._trackExceptionMetrics=function(){for(var t=0;t<e._exceptionCountersCollection.length;t++){var r=e._exceptionCountersCollection[t],o=r.totalCount-r.lastTotalCount||0,i=r.time-r.lastTime;this._trackPreAggregatedMetric({name:"Exceptions",dimensions:r.dimensions,value:o,count:o,aggregationInterval:i,metricType:n.MetricId.EXCEPTIONS_COUNT}),r.lastTotalCount=r.totalCount,r.lastTime=r.time}},e.prototype._trackTraceMetrics=function(){for(var t=0;t<e._traceCountersCollection.length;t++){var r=e._traceCountersCollection[t],o=r.totalCount-r.lastTotalCount||0,i=r.time-r.lastTime;this._trackPreAggregatedMetric({name:"Traces",dimensions:r.dimensions,value:o,count:o,aggregationInterval:i,metricType:n.MetricId.TRACES_COUNT}),r.lastTotalCount=r.totalCount,r.lastTime=r.time}},e.prototype._trackPreAggregatedMetric=function(e){var t={};for(var n in e.dimensions)t[i.PreaggregatedMetricPropertyNames[n]]=e.dimensions[n];t=r(r({},t),{"_MS.MetricId":e.metricType,"_MS.AggregationIntervalMs":String(e.aggregationInterval),"_MS.IsAutocollected":"True"});var o={name:e.name,value:e.value,count:e.count,properties:t,kind:"Aggregation"};this._client.trackMetric(o)},e.prototype.dispose=function(){e.INSTANCE=null,this.enable(!1),this._isInitialized=!1},e}();t.exports=s}),On=v((e,t)=>{"use strict";var n=r(857),o=r(9896),i=r(6928),s=Wr(),a=w(),c=function(){function e(e){this.keys=new s.ContextTagKeys,this.tags={},this._loadApplicationContext(e),this._loadDeviceContext(),this._loadInternalContext()}return e.prototype._loadApplicationContext=function(t){if(t=t||i.resolve(__dirname,"../../../../package.json"),!e.appVersion[t]){e.appVersion[t]="unknown";try{var r=JSON.parse(o.readFileSync(t,"utf8"));r&&"string"==typeof r.version&&(e.appVersion[t]=r.version)}catch(e){a.info("unable to read app version: ",e)}}this.tags[this.keys.applicationVersion]=e.appVersion[t]},e.prototype._loadDeviceContext=function(){this.tags[this.keys.deviceId]="",this.tags[this.keys.cloudRoleInstance]=n&&n.hostname(),this.tags[this.keys.deviceOSVersion]=n&&n.type()+" "+n.release(),this.tags[this.keys.cloudRole]=e.DefaultRoleName,this.tags["ai.device.osArchitecture"]=n&&n.arch(),this.tags["ai.device.osPlatform"]=n&&n.platform()},e.prototype._loadInternalContext=function(){var t=i.resolve(__dirname,"../../package.json");if(!e.sdkVersion){e.sdkVersion="unknown";try{var r=JSON.parse(o.readFileSync(t,"utf8"));r&&"string"==typeof r.version&&(e.sdkVersion=r.version)}catch(e){a.info("unable to read app version: ",e)}}this.tags[this.keys.internalSdkVersion]="node:"+e.sdkVersion},e.DefaultRoleName="Web",e.appVersion={},e.sdkVersion=null,e}();t.exports=c}),Nn=v((e,t)=>{"use strict";var n,o=e&&e.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=r(7016),s=Wr(),a=Zt(),c=Yt(),l=Gr(),u=er(),d=function(e){function t(r,n){var o=e.call(this)||this;return n&&n.method&&r&&(o.method=n.method,o.url=t._getUrlFromRequestOptions(r,n),o.startTime=+new Date),o}return o(t,e),t.prototype.onError=function(e){this._setStatus(void 0,e)},t.prototype.onResponse=function(e){this._setStatus(e.statusCode,void 0),this.correlationId=a.getCorrelationContextTarget(e,c.requestContextTargetKey)},t.prototype.getDependencyTelemetry=function(e,t){var r=i.parse(this.url);r.search=void 0,r.hash=void 0;var n=this.method.toUpperCase()+" "+r.pathname,o=s.RemoteDependencyDataConstants.TYPE_HTTP,a=r.hostname;r.port&&(a+=":"+r.port),this.correlationId?(o=s.RemoteDependencyDataConstants.TYPE_AI,this.correlationId!==u.correlationIdPrefix&&(a+=" | "+this.correlationId)):o=s.RemoteDependencyDataConstants.TYPE_HTTP;var c={id:t,name:n,data:this.url,duration:this.duration,success:this._isSuccess(),resultCode:this.statusCode?this.statusCode.toString():null,properties:this.properties||{},dependencyTypeName:o,target:a};if(e&&e.time?c.time=e.time:this.startTime&&(c.time=new Date(this.startTime)),e){for(var l in e)c[l]||(c[l]=e[l]);if(e.properties)for(var l in e.properties)c.properties[l]=e.properties[l]}return c},t._getUrlFromRequestOptions=function(e,t){if("string"==typeof e)if(0===e.indexOf("http://")||0===e.indexOf("https://"))e=i.parse(e);else{var r=i.parse(e);e="443"===r.host?i.parse("https://"+e):i.parse("http://"+e)}else{if(e&&"function"==typeof i.URL&&e instanceof i.URL)return i.format(e);var n=e;e={},n&&Object.keys(n).forEach(function(t){e[t]=n[t]})}if(e.path){var o=i.parse(e.path);e.pathname=o.pathname,e.search=o.search}return e.host&&e.port&&!i.parse("http://"+e.host).port&&e.port&&(e.hostname=e.host,delete e.host),e.protocol=e.protocol||t.agent&&t.agent.protocol||t.protocol||void 0,e.hostname=e.hostname||"localhost",i.format(e)},t}(l);t.exports=d}),Rn=v(e=>{"use strict";var t=e&&e.__assign||function(){return t=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},t.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.spanToTelemetryContract=void 0;var r=we(),n=bn();function o(e){var r=t({},e);return Object.keys(n.SpanAttribute).forEach(function(e){delete r[e]}),r}e.spanToTelemetryContract=function(e){var i="|"+e.spanContext().traceId+"."+e.spanContext().spanId+".",s=Math.round(1e3*e._duration[0]+e._duration[1]/1e6),a=e.attributes["peer.address"]?e.attributes["peer.address"].toString():"",c=e.attributes.component?e.attributes.component.toString():"",l=c.toUpperCase()===n.DependencyTypeName.Http||!!e.attributes[n.SpanAttribute.HttpUrl],u=c.toLowerCase()===n.DependencyTypeName.Grpc;if(l){var d=e.attributes[n.SpanAttribute.HttpMethod]||"GET",p=new URL(e.attributes[n.SpanAttribute.HttpUrl].toString()),h=e.attributes[n.SpanAttribute.HttpHost]||p.host,f=e.attributes[n.SpanAttribute.HttpPort]||p.port||null,g=d+" "+(p.pathname||"/"),m=n.DependencyTypeName.Http,v=f?(h+":"+f).toString():h.toString(),y=p.toString(),S=e.attributes[n.SpanAttribute.HttpStatusCode]||e.status.code||0;return{id:i,name:g,dependencyTypeName:m,target:v,data:y,success:S<400,duration:s,url:y,resultCode:String(S),properties:o(e.attributes)}}if(u){d=e.attributes[n.SpanAttribute.GrpcMethod]||"rpc";var w=e.attributes[n.SpanAttribute.GrpcService],E=w?d+" "+w:e.name;return{id:i,duration:s,name:E,target:w.toString(),data:w.toString()||E,url:w.toString()||E,dependencyTypeName:n.DependencyTypeName.Grpc,resultCode:String(e.status.code||0),success:0===e.status.code,properties:o(e.attributes)}}var _=e.name,b=e.links&&e.links.map(function(e){return{operation_Id:e.context.traceId,id:e.context.spanId}});return{id:i,duration:s,name:_,target:a,data:a||_,url:a||_,dependencyTypeName:e.kind===r.SpanKind.INTERNAL?n.DependencyTypeName.InProc:c||e.name,resultCode:String(e.status.code||0),success:0===e.status.code,properties:t(t({},o(e.attributes)),{"_MS.links":b||void 0})}}}),An=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.subscriber=void 0;var t=we(),r=T(),n=tr(),o=Rn(),i=E(),s=[];e.subscriber=function(e){var r=e.data,a=o.spanToTelemetryContract(r),c=r.spanContext(),l=new n;l.traceId=c.traceId,l.spanId=c.spanId,l.traceFlag=n.formatOpenTelemetryTraceFlags(c.traceFlags),l.parentId=r.parentSpanId?"|"+c.traceId+"."+r.parentSpanId+".":null,i.AsyncScopeManager.with(r,function(){s.forEach(function(e){r.kind===t.SpanKind.SERVER?e.trackRequest(a):(r.kind===t.SpanKind.CLIENT||r.kind===t.SpanKind.INTERNAL)&&e.trackDependency(a)})})},e.enable=function(t,n){t?(0===s.length&&r.channel.subscribe("azure-coretracing",e.subscriber),s.push(n)):0===(s=s.filter(function(e){return e!=n})).length&&r.channel.unsubscribe("azure-coretracing",e.subscriber)}}),Dn=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.subscriber=void 0;var t=T(),r=[];e.subscriber=function(e){"ismaster"!==e.data.event.commandName&&r.forEach(function(t){var r=e.data.startedData&&e.data.startedData.databaseName||"Unknown database";t.trackDependency({target:r,data:e.data.event.commandName,name:e.data.event.commandName,duration:e.data.event.duration,success:e.data.succeeded,resultCode:e.data.succeeded?"0":"1",time:e.data.startedData.time,dependencyTypeName:"mongodb"})})},e.enable=function(n,o){n?(0===r.length&&t.channel.subscribe("mongodb",e.subscriber),r.push(o)):0===(r=r.filter(function(e){return e!=o})).length&&t.channel.unsubscribe("mongodb",e.subscriber)}}),xn=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.subscriber=void 0;var t=T(),r=[];e.subscriber=function(e){r.forEach(function(t){var r=e.data.query||{},n=r.sql||"Unknown query",o=!e.data.err,i=(r._connection||{}).config||{},s=i.socketPath?i.socketPath:(i.host||"localhost")+":"+i.port;t.trackDependency({target:s,data:n,name:n,duration:e.data.duration,success:o,resultCode:o?"0":"1",time:e.data.time,dependencyTypeName:"mysql"})})},e.enable=function(n,o){n?(0===r.length&&t.channel.subscribe("mysql",e.subscriber),r.push(o)):0===(r=r.filter(function(e){return e!=o})).length&&t.channel.unsubscribe("mysql",e.subscriber)}}),kn=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.subscriber=void 0;var t=T(),r=[];e.subscriber=function(e){r.forEach(function(t){"info"!==e.data.commandObj.command&&t.trackDependency({target:e.data.address,name:e.data.commandObj.command,data:e.data.commandObj.command,duration:e.data.duration,success:!e.data.err,resultCode:e.data.err?"1":"0",time:e.data.time,dependencyTypeName:"redis"})})},e.enable=function(n,o){n?(0===r.length&&t.channel.subscribe("redis",e.subscriber),r.push(o)):0===(r=r.filter(function(e){return e!=o})).length&&t.channel.unsubscribe("redis",e.subscriber)}}),jn=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.subscriber=void 0;var t=T(),r=[];e.subscriber=function(e){r.forEach(function(t){var r=e.data.query,n=r.preparable&&r.preparable.text||r.plan||r.text||"unknown query",o=!e.data.error,i=e.data.database.host+":"+e.data.database.port;t.trackDependency({target:i,data:n,name:n,duration:e.data.duration,success:o,resultCode:o?"0":"1",time:e.data.time,dependencyTypeName:"postgres"})})},e.enable=function(n,o){n?(0===r.length&&t.channel.subscribe("postgres",e.subscriber),r.push(o)):0===(r=r.filter(function(e){return e!=o})).length&&t.channel.unsubscribe("postgres",e.subscriber)}}),Mn=v((e,t)=>{"use strict";var n=e&&e.__spreadArrays||function(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),o=0;for(t=0;t<r;t++)for(var i=arguments[t],s=0,a=i.length;s<a;s++,o++)n[o]=i[s];return n},o=r(8611),i=r(5692),s=w(),a=Zt(),c=Yt(),l=Nn(),u=vn(),d=er(),p=tr(),h=Qt(),f=function(){function e(t){if(e.INSTANCE)throw new Error("Client request tracking should be configured from the applicationInsights object");e.INSTANCE=this,this._client=t}return e.prototype.enable=function(e){this._isEnabled=e,this._isEnabled&&!this._isInitialized&&this._initialize(),h.IsInitialized&&(An().enable(!0,this._client),Dn().enable(e,this._client),xn().enable(e,this._client),kn().enable(e,this._client),jn().enable(e,this._client))},e.prototype.isInitialized=function(){return this._isInitialized},e.prototype._initialize=function(){var t=this;this._isInitialized=!0;var r=o.request,s=i.request,a=function(r,n){var o=!n[e.disableCollectionRequestOption]&&!r[e.alreadyAutoCollectedFlag];n.headers&&n.headers["user-agent"]&&-1!==n.headers["user-agent"].toString().indexOf("azsdk-js")&&(o=!1),r[e.alreadyAutoCollectedFlag]=!0,r&&n&&o&&(u.CorrelationContextManager.wrapEmitter(r),e.trackRequest(t._client,{options:n,request:r}))};o.request=function(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];var s=r.call.apply(r,n([o,e],t));return a(s,e),s},i.request=function(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var o=s.call.apply(s,n([i,e],t));return a(o,e),o},o.get=function(e){for(var t,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];var s=(t=o.request).call.apply(t,n([o,e],r));return s.end(),s},i.get=function(e){for(var t,r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];var s=(t=i.request).call.apply(t,n([i,e],r));return s.end(),s}},e.trackRequest=function(t,r){if(r.options&&r.request&&t){var n,o,i=new l(r.options,r.request),h=u.CorrelationContextManager.getCurrentContext();if(h&&h.operation&&h.operation.traceparent&&p.isValidTraceId(h.operation.traceparent.traceId)?(h.operation.traceparent.updateSpanId(),n=h.operation.traceparent.getBackCompatRequestId()):d.w3cEnabled?(o=(g=new p).toString(),n=g.getBackCompatRequestId()):n=h&&h.operation&&h.operation.parentId+e.requestNumber+++".",a.canIncludeCorrelationHeader(t,i.getUrl())&&r.request.getHeader&&r.request.setHeader&&t.config&&t.config.correlationId){var f=r.request.getHeader(c.requestContextHeader);try{a.safeIncludeCorrelationHeader(t,r.request,f)}catch(e){s.warn("Request-Context header could not be set. Correlation of requests may be lost",e)}if(h&&h.operation)try{if(r.request.setHeader(c.requestIdHeader,n),t.config.ignoreLegacyHeaders||(r.request.setHeader(c.parentIdHeader,h.operation.id),r.request.setHeader(c.rootIdHeader,n)),o||h.operation.traceparent)r.request.setHeader(c.traceparentHeader,o||h.operation.traceparent.toString());else if(d.w3cEnabled){var g=(new p).toString();r.request.setHeader(c.traceparentHeader,g)}if(h.operation.tracestate){var m=h.operation.tracestate.toString();m&&r.request.setHeader(c.traceStateHeader,m)}var v=h.customProperties.serializeToHeader();v&&r.request.setHeader(c.correlationContextHeader,v)}catch(e){s.warn("Correlation headers could not be set. Correlation of requests may be lost.",e)}}r.request.on&&(r.request.on("response",function(e){i.onResponse(e);var o=i.getDependencyTelemetry(r,n);o.contextObjects=o.contextObjects||{},o.contextObjects["http.RequestOptions"]=r.options,o.contextObjects["http.ClientRequest"]=r.request,o.contextObjects["http.ClientResponse"]=e,t.trackDependency(o)}),r.request.on("error",function(e){i.onError(e);var o=i.getDependencyTelemetry(r,n);o.contextObjects=o.contextObjects||{},o.contextObjects["http.RequestOptions"]=r.options,o.contextObjects["http.ClientRequest"]=r.request,o.contextObjects.Error=e,t.trackDependency(o)}),r.request.on("abort",function(){i.onError(new Error);var e=i.getDependencyTelemetry(r,n);e.contextObjects=e.contextObjects||{},e.contextObjects["http.RequestOptions"]=r.options,e.contextObjects["http.ClientRequest"]=r.request,t.trackDependency(e)}))}else s.info("AutoCollectHttpDependencies.trackRequest was called with invalid parameters: ",!r.options,!r.request,!t)},e.prototype.dispose=function(){e.INSTANCE=null,this.enable(!1),this._isInitialized=!1},e.disableCollectionRequestOption="disableAppInsightsAutoCollection",e.requestNumber=1,e.alreadyAutoCollectedFlag="_appInsightsAutoCollected",e}();t.exports=f}),Ln=v((e,t)=>{"use strict";var n=r(857),o=bn(),i=Zt(),s=On(),a=Mn(),c=function(){function e(t){this._collectionInterval=9e5,this._vmData={},this._azInst_vmId="",this._azInst_subscriptionId="",this._azInst_osType="",e.INSTANCE||(e.INSTANCE=this),this._isInitialized=!1,this._client=t}return e.prototype.enable=function(e,t){var r=this;this._isEnabled=e,this._isEnabled&&!this._isInitialized&&(this._isInitialized=!0),e?this._handle||(this._handle=setInterval(function(){return r.trackHeartBeat(t,function(){})},this._collectionInterval),this._handle.unref()):this._handle&&(clearInterval(this._handle),this._handle=null)},e.prototype.isInitialized=function(){return this._isInitialized},e.isEnabled=function(){return e.INSTANCE&&e.INSTANCE._isEnabled},e.prototype.trackHeartBeat=function(e,t){var r=this,i=!1,a={},c=s.sdkVersion;a.sdk=c,a.osType=n.type(),process.env.WEBSITE_SITE_NAME?(a.appSrv_SiteName=process.env.WEBSITE_SITE_NAME||"",a.appSrv_wsStamp=process.env.WEBSITE_HOME_STAMPNAME||"",a.appSrv_wsHost=process.env.WEBSITE_HOSTNAME||""):process.env.FUNCTIONS_WORKER_RUNTIME?a.azfunction_appId=process.env.WEBSITE_HOSTNAME:e&&(void 0===this._isVM?(i=!0,this._getAzureComputeMetadata(e,function(){r._isVM&&Object.keys(r._vmData).length>0&&(a.azInst_vmId=r._vmData.vmId||"",a.azInst_subscriptionId=r._vmData.subscriptionId||"",a.azInst_osType=r._vmData.osType||"",r._azInst_vmId=r._vmData.vmId||"",r._azInst_subscriptionId=r._vmData.subscriptionId||"",r._azInst_osType=r._vmData.osType||""),r._client.trackMetric({name:o.HeartBeatMetricName,value:0,properties:a}),t()})):this._isVM&&(a.azInst_vmId=this._azInst_vmId,a.azInst_subscriptionId=this._azInst_subscriptionId,a.azInst_osType=this._azInst_osType)),i||(this._client.trackMetric({name:o.HeartBeatMetricName,value:0,properties:a}),t())},e.prototype.dispose=function(){e.INSTANCE=null,this.enable(!1),this._isInitialized=!1},e.prototype._getAzureComputeMetadata=function(e,t){var r,n=this,o=((r={method:"GET"})[a.disableCollectionRequestOption]=!0,r.headers={Metadata:"True"},r),s=i.makeRequest(e,"http://169.254.169.254/metadata/instance/compute?api-version=2017-12-01&format=json",o,function(e){if(200===e.statusCode){n._isVM=!0;var r="";e.on("data",function(e){r+=e}),e.on("end",function(){n._vmData=n._isJSON(r)?JSON.parse(r):{},t()})}else t()});s&&(s.on("error",function(e){e&&e.message&&e.message.indexOf("ENETUNREACH")>-1&&(n._isVM=!1),t()}),s.end())},e.prototype._isJSON=function(e){try{return JSON.parse(e)&&!!e}catch{return!1}},e}();t.exports=c}),Fn=v((e,t)=>{"use strict";var n=r(8611),o=r(5692),i=w(),s=Zt(),a=Yt(),c=Kr(),l=vn(),u=Pn(),d=function(){function e(t){if(e.INSTANCE)throw new Error("Server request tracking should be configured from the applicationInsights object");e.INSTANCE=this,this._client=t}return e.prototype.enable=function(e){this._isEnabled=e,(this._isAutoCorrelating||this._isEnabled||u.isEnabled())&&!this._isInitialized&&(this.useAutoCorrelation(this._isAutoCorrelating),this._initialize())},e.prototype.useAutoCorrelation=function(e,t){e&&!this._isAutoCorrelating?l.CorrelationContextManager.enable(t):!e&&this._isAutoCorrelating&&l.CorrelationContextManager.disable(),this._isAutoCorrelating=e},e.prototype.isInitialized=function(){return this._isInitialized},e.prototype.isAutoCorrelating=function(){return this._isAutoCorrelating},e.prototype._generateCorrelationContext=function(e){if(this._isAutoCorrelating)return l.CorrelationContextManager.generateContextObject(e.getOperationId(this._client.context.tags),e.getRequestId(),e.getOperationName(this._client.context.tags),e.getCorrelationContextHeader(),e.getTraceparent(),e.getTracestate())},e.prototype._initialize=function(){var t=this;this._isInitialized=!0;var r=function(r){if(r){if("function"!=typeof r)throw new Error("onRequest handler must be a function");return function(n,o){l.CorrelationContextManager.wrapEmitter(n),l.CorrelationContextManager.wrapEmitter(o);var i=n&&!n[e.alreadyAutoCollectedFlag];if(n&&i){var s=new c(n),a=t._generateCorrelationContext(s);l.CorrelationContextManager.runWithContext(a,function(){t._isEnabled&&(n[e.alreadyAutoCollectedFlag]=!0,e.trackRequest(t._client,{request:n,response:o},s)),"function"==typeof r&&r(n,o)})}else"function"==typeof r&&r(n,o)}}},i=function(e){var t=e.addListener.bind(e);e.addListener=function(e,n){switch(e){case"request":case"checkContinue":return t(e,r(n));default:return t(e,n)}},e.on=e.addListener},s=n.createServer;n.createServer=function(e,t){if(t&&"function"==typeof t){var n=s(e,r(t));return i(n),n}return n=s(r(e)),i(n),n};var a=o.createServer;o.createServer=function(e,t){var n=a(e,r(t));return i(n),n}},e.trackRequestSync=function(t,r){if(r.request&&r.response&&t){e.addResponseCorrelationIdHeader(t,r.response);var n=l.CorrelationContextManager.getCurrentContext(),o=new c(r.request,n&&n.operation.parentId);n&&(n.operation.id=o.getOperationId(t.context.tags)||n.operation.id,n.operation.name=o.getOperationName(t.context.tags)||n.operation.name,n.operation.parentId=o.getRequestId()||n.operation.parentId,n.customProperties.addHeaderData(o.getCorrelationContextHeader())),e.endRequest(t,o,r,r.duration,r.error)}else i.info("AutoCollectHttpRequests.trackRequestSync was called with invalid parameters: ",!r.request,!r.response,!t)},e.trackRequest=function(t,r,n){if(r.request&&r.response&&t){var o=l.CorrelationContextManager.getCurrentContext(),a=n||new c(r.request,o&&o.operation.parentId);s.canIncludeCorrelationHeader(t,a.getUrl())&&e.addResponseCorrelationIdHeader(t,r.response),o&&!n&&(o.operation.id=a.getOperationId(t.context.tags)||o.operation.id,o.operation.name=a.getOperationName(t.context.tags)||o.operation.name,o.operation.parentId=a.getOperationParentId(t.context.tags)||o.operation.parentId,o.customProperties.addHeaderData(a.getCorrelationContextHeader())),r.response.once&&r.response.once("finish",function(){e.endRequest(t,a,r,null,null)}),r.request.on&&r.request.on("error",function(n){e.endRequest(t,a,r,null,n)}),r.request.on&&r.request.on("aborted",function(){e.endRequest(t,a,r,null,"The request has been aborted and the network socket has closed.")})}else i.info("AutoCollectHttpRequests.trackRequest was called with invalid parameters: ",!r.request,!r.response,!t)},e.addResponseCorrelationIdHeader=function(e,t){if(e.config&&e.config.correlationId&&t.getHeader&&t.setHeader&&!t.headersSent){var r=t.getHeader(a.requestContextHeader);s.safeIncludeCorrelationHeader(e,t,r)}},e.endRequest=function(e,t,r,n,o){o?t.onError(o,n):t.onResponse(r.response,n);var i=t.getRequestTelemetry(r);if(i.tagOverrides=t.getRequestTags(e.context.tags),r.tagOverrides)for(var s in r.tagOverrides)i.tagOverrides[s]=r.tagOverrides[s];var a=t.getLegacyRootId();a&&(i.properties.ai_legacyRootId=a),i.contextObjects=i.contextObjects||{},i.contextObjects["http.ServerRequest"]=r.request,i.contextObjects["http.ServerResponse"]=r.response,e.trackRequest(i)},e.prototype.dispose=function(){e.INSTANCE=null,this.enable(!1),this._isInitialized=!1,l.CorrelationContextManager.disable(),this._isAutoCorrelating=!1},e.alreadyAutoCollectedFlag="_appInsightsAutoCollected",e}();t.exports=d}),Un=v((e,t)=>{"use strict";var n=e&&e.__assign||function(){return n=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)},o=r(857),i=Wr(),s=bn(),a=Zt(),c=w(),l=a.w3cTraceId(),u=function(){function e(){}return e.createQuickPulseEnvelope=function(e,t,r,n){var i=o&&"function"==typeof o.hostname&&o.hostname()||"Unknown",s=n.tags&&n.keys&&n.keys.cloudRoleInstance&&n.tags[n.keys.cloudRoleInstance]||i,a=n.tags&&n.keys&&n.keys.cloudRole&&n.tags[n.keys.cloudRole]||null;return{Documents:t.length>0?t:null,InstrumentationKey:r.instrumentationKey||"",Metrics:e.length>0?e:null,InvariantVersion:1,Timestamp:"/Date("+Date.now()+")/",Version:n.tags[n.keys.internalSdkVersion],StreamId:l,MachineName:i,Instance:s,RoleName:a}},e.createQuickPulseMetric=function(e){return{Name:e.name,Value:e.value,Weight:e.count||1}},e.telemetryEnvelopeToQuickPulseDocument=function(t){switch(t.data.baseType){case i.TelemetryTypeString.Event:return e.createQuickPulseEventDocument(t);case i.TelemetryTypeString.Exception:return e.createQuickPulseExceptionDocument(t);case i.TelemetryTypeString.Trace:return e.createQuickPulseTraceDocument(t);case i.TelemetryTypeString.Dependency:return e.createQuickPulseDependencyDocument(t);case i.TelemetryTypeString.Request:return e.createQuickPulseRequestDocument(t)}return null},e.createQuickPulseEventDocument=function(t){var r=e.createQuickPulseDocument(t),o=t.data.baseData.name;return n(n({},r),{Name:o})},e.createQuickPulseTraceDocument=function(t){var r=e.createQuickPulseDocument(t),o=t.data.baseData.severityLevel||0;return n(n({},r),{Message:t.data.baseData.message,SeverityLevel:i.SeverityLevel[o]})},e.createQuickPulseExceptionDocument=function(t){var r=e.createQuickPulseDocument(t),o=t.data.baseData.exceptions,i="",s="",a="";return o&&o.length>0&&(o[0].parsedStack&&o[0].parsedStack.length>0?o[0].parsedStack.forEach(function(e){i+=e.assembly+"\n"}):o[0].stack&&o[0].stack.length>0&&(i=o[0].stack),s=o[0].message,a=o[0].typeName),n(n({},r),{Exception:i,ExceptionMessage:s,ExceptionType:a})},e.createQuickPulseRequestDocument=function(t){var r=e.createQuickPulseDocument(t),o=t.data.baseData;return n(n({},r),{Name:o.name,Success:o.success,Duration:o.duration,ResponseCode:o.responseCode,OperationName:o.name})},e.createQuickPulseDependencyDocument=function(t){var r=e.createQuickPulseDocument(t),o=t.data.baseData;return n(n({},r),{Name:o.name,Target:o.target,Success:o.success,Duration:o.duration,ResultCode:o.resultCode,CommandName:o.data,OperationName:r.OperationId,DependencyTypeName:o.type})},e.createQuickPulseDocument=function(t){var r,n;return t.data.baseType?(n=s.TelemetryTypeStringToQuickPulseType[t.data.baseType],r=s.TelemetryTypeStringToQuickPulseDocumentType[t.data.baseType]):c.warn("Document type invalid; not sending live metric document",t.data.baseType),{DocumentType:r,__type:n,OperationId:t.tags[e.keys.operationId],Version:"1.0",Properties:e.aggregateProperties(t)}},e.aggregateProperties=function(e){var t=[],r=e.data.baseData.measurements||{};for(var n in r)if(r.hasOwnProperty(n)){var o={key:n,value:r[n]};t.push(o)}var i=e.data.baseData.properties||{};for(var n in i)i.hasOwnProperty(n)&&(o={key:n,value:i[n]},t.push(o));return t},e.keys=new i.ContextTagKeys,e}();t.exports=u}),$n=v((e,t)=>{"use strict";t.exports={getTransmissionTime:function(){return 1e4*(Date.now()+621355968e5)}}}),Bn=v((e,t)=>{"use strict";var n=e&&e.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):function(e){return e instanceof r?e:new r(function(t){t(e)})}(e.value).then(s,a)}c((n=n.apply(e,t||[])).next())})},o=e&&e.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},i=r(5692),s=Mn(),a=w(),c=$n(),l=Zt(),u="x-ms-qps-service-polling-interval-hint",d="x-ms-qps-service-endpoint-redirect",p=function(){function e(e){this._config=e,this._consecutiveErrors=0}return e.prototype.ping=function(e,t,r){var n=[{name:"x-ms-qps-stream-id",value:e.StreamId},{name:"x-ms-qps-machine-name",value:e.MachineName},{name:"x-ms-qps-role-name",value:e.RoleName},{name:"x-ms-qps-instance-name",value:e.Instance},{name:"x-ms-qps-invariant-version",value:e.InvariantVersion.toString()}];this._submitData(e,t,r,"ping",n)},e.prototype.post=function(e,t,r){return n(this,void 0,void 0,function(){return o(this,function(n){switch(n.label){case 0:return[4,this._submitData([e],t,r,"post")];case 1:return n.sent(),[2]}})})},e.prototype._submitData=function(e,t,r,a,p){return n(this,void 0,void 0,function(){var n,h,f,g,m,v=this;return o(this,function(o){return n=JSON.stringify(e),(g={})[s.disableCollectionRequestOption]=!0,g.host=t&&t.length>0?t:this._config.quickPulseHost,g.method="POST",g.path="/QuickPulseService.svc/"+a+"?ikey="+this._config.instrumentationKey,g.headers=((m={Expect:"100-continue"})["x-ms-qps-transmission-time"]=c.getTransmissionTime(),m["Content-Type"]="application/json",m["Content-Length"]=Buffer.byteLength(n),m),h=g,p&&p.length>0&&p.forEach(function(e){return h.headers[e.name]=e.value}),this._config.httpsAgent?h.agent=this._config.httpsAgent:h.agent=l.tlsRestrictedAgent,(f=i.request(h,function(e){if(200==e.statusCode){var t="true"===e.headers["x-ms-qps-subscribed"],n=e.headers[d]?e.headers[d].toString():null,o=e.headers[u]?parseInt(e.headers[u].toString()):null;v._consecutiveErrors=0,r(t,e,n,o)}else v._onError("StatusCode:"+e.statusCode+" StatusMessage:"+e.statusMessage),r()})).on("error",function(e){v._onError(e),r()}),f.write(n),f.end(),[2]})})},e.prototype._onError=function(t){this._consecutiveErrors++;var r="Transient error connecting to the Live Metrics endpoint. This packet will not appear in your Live Metrics Stream. Error:";this._consecutiveErrors%e.MAX_QPS_FAILURES_BEFORE_WARN===0?(r="Live Metrics endpoint could not be reached "+this._consecutiveErrors+" consecutive times. Most recent error:",a.warn(e.TAG,r,t)):a.info(e.TAG,r,t)},e.TAG="QuickPulseSender",e.MAX_QPS_FAILURES_BEFORE_WARN=25,e}();t.exports=p}),Vn=v((e,t)=>{"use strict";var r=e&&e.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):function(e){return e instanceof r?e:new r(function(t){t(e)})}(e.value).then(s,a)}c((n=n.apply(e,t||[])).next())})},n=e&&e.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},o=w(),i=Un(),s=Bn(),a=bn(),c=On(),l=function(){function e(e,t){this._isCollectingData=!1,this._lastSuccessTime=Date.now(),this._lastSendSucceeded=!0,this._metrics={},this._documents=[],this._collectors=[],this._redirectedHost=null,this._pollingIntervalHint=-1,this.config=e,this.context=t||new c,this._sender=new s(this.config),this._isEnabled=!1}return e.prototype.addCollector=function(e){this._collectors.push(e)},e.prototype.trackMetric=function(e){this._addMetric(e)},e.prototype.addDocument=function(e){var t=i.telemetryEnvelopeToQuickPulseDocument(e);t&&this._documents.push(t)},e.prototype.enable=function(e){e&&!this._isEnabled?(this._isEnabled=!0,this._goQuickPulse()):!e&&this._isEnabled&&(this._isEnabled=!1,clearTimeout(this._handle),this._handle=void 0)},e.prototype.enableCollectors=function(e){this._collectors.forEach(function(t){t.enable(e)})},e.prototype._addMetric=function(e){var t=e.value,r=e.count||1,n=a.PerformanceToQuickPulseCounter[e.name];n&&(this._metrics[n]?(this._metrics[n].Value=(this._metrics[n].Value*this._metrics[n].Weight+t*r)/(this._metrics[n].Weight+r),this._metrics[n].Weight+=r):(this._metrics[n]=i.createQuickPulseMetric(e),this._metrics[n].Name=n,this._metrics[n].Weight=1))},e.prototype._resetQuickPulseBuffer=function(){delete this._metrics,this._metrics={},this._documents.length=0},e.prototype._goQuickPulse=function(){return r(this,void 0,void 0,function(){var t,r,o,s,a=this;return n(this,function(n){switch(n.label){case 0:return t=Object.keys(this._metrics).map(function(e){return a._metrics[e]}),r=i.createQuickPulseEnvelope(t,this._documents.slice(),this.config,this.context),this._resetQuickPulseBuffer(),this._isCollectingData?[4,this._post(r)]:[3,2];case 1:return n.sent(),[3,3];case 2:this._ping(r),n.label=3;case 3:return o=this._pollingIntervalHint>0?this._pollingIntervalHint:e.PING_INTERVAL,s=this._isCollectingData?e.POST_INTERVAL:o,this._isCollectingData&&Date.now()-this._lastSuccessTime>=e.MAX_POST_WAIT_TIME&&!this._lastSendSucceeded?(this._isCollectingData=!1,s=e.FALLBACK_INTERVAL):!this._isCollectingData&&Date.now()-this._lastSuccessTime>=e.MAX_PING_WAIT_TIME&&!this._lastSendSucceeded&&(s=e.FALLBACK_INTERVAL),this._lastSendSucceeded=null,this._handle=setTimeout(this._goQuickPulse.bind(this),s),this._handle.unref(),[2]}})})},e.prototype._ping=function(e){this._sender.ping(e,this._redirectedHost,this._quickPulseDone.bind(this))},e.prototype._post=function(e){return r(this,void 0,void 0,function(){return n(this,function(t){switch(t.label){case 0:return[4,this._sender.post(e,this._redirectedHost,this._quickPulseDone.bind(this))];case 1:return t.sent(),[2]}})})},e.prototype._quickPulseDone=function(e,t,r,n){null!=e?(this._isCollectingData!==e&&(o.info("Live Metrics sending data",e),this.enableCollectors(e)),this._isCollectingData=e,r&&r.length>0&&(this._redirectedHost=r,o.info("Redirecting endpoint to: ",r)),n&&n>0&&(this._pollingIntervalHint=n),t&&t.statusCode<300&&t.statusCode>=200?(this._lastSuccessTime=Date.now(),this._lastSendSucceeded=!0):this._lastSendSucceeded=!1):this._lastSendSucceeded=!1},e.MAX_POST_WAIT_TIME=2e4,e.MAX_PING_WAIT_TIME=6e4,e.FALLBACK_INTERVAL=6e4,e.PING_INTERVAL=5e3,e.POST_INTERVAL=1e3,e}();t.exports=l}),Hn=v((e,t)=>{"use strict";var r=bn(),n=function(){function e(){}return e.parse=function(t){if(!t)return{};var n=t.split(e._FIELDS_SEPARATOR).reduce(function(t,r){var n=r.split(e._FIELD_KEY_VALUE_SEPARATOR);if(2===n.length){var o=n[0].toLowerCase(),i=n[1];t[o]=i}return t},{});if(Object.keys(n).length>0){if(n.endpointsuffix){var o=n.location?n.location+".":"";n.ingestionendpoint=n.ingestionendpoint||"https://"+o+"dc."+n.endpointsuffix,n.liveendpoint=n.liveendpoint||"https://"+o+"live."+n.endpointsuffix}n.ingestionendpoint=n.ingestionendpoint||r.DEFAULT_BREEZE_ENDPOINT,n.liveendpoint=n.liveendpoint||r.DEFAULT_LIVEMETRICS_ENDPOINT}return n},e._FIELDS_SEPARATOR=";",e._FIELD_KEY_VALUE_SEPARATOR="=",e}();t.exports=n}),qn=v((e,t)=>{"use strict";var n=er(),o=Hn(),i=(w(),bn()),s=r(7016),a=function(){function e(t){var r=this;this.endpointBase=i.DEFAULT_BREEZE_ENDPOINT;var n=process.env[e.ENV_connectionString],a=o.parse(t),c=o.parse(n),l=!a.instrumentationkey&&Object.keys(a).length>0?null:t;this.instrumentationKey=a.instrumentationkey||l||c.instrumentationkey||e._getInstrumentationKey(),e._validateInstrumentationKey(this.instrumentationKey),this.endpointUrl=(a.ingestionendpoint||c.ingestionendpoint||this.endpointBase)+"/v2.1/track",this.maxBatchSize=250,this.maxBatchIntervalMs=15e3,this.disableAppInsights=!1,this.samplingPercentage=100,this.correlationIdRetryIntervalMs=3e4,this.correlationHeaderExcludedDomains=["*.core.windows.net","*.core.chinacloudapi.cn","*.core.cloudapi.de","*.core.usgovcloudapi.net","*.core.microsoft.scloud","*.core.eaglex.ic.gov"],this.setCorrelationId=function(e){return r.correlationId=e},this.proxyHttpUrl=process.env[e.ENV_http_proxy]||void 0,this.proxyHttpsUrl=process.env[e.ENV_https_proxy]||void 0,this.httpAgent=void 0,this.httpsAgent=void 0,this.profileQueryEndpoint=a.ingestionendpoint||c.ingestionendpoint||process.env[e.ENV_profileQueryEndpoint]||this.endpointBase,this._quickPulseHost=a.liveendpoint||c.liveendpoint||process.env[e.ENV_quickPulseHost]||i.DEFAULT_LIVEMETRICS_HOST,this._quickPulseHost.match(/^https?:\/\//)&&(this._quickPulseHost=s.parse(this._quickPulseHost).host)}return Object.defineProperty(e.prototype,"profileQueryEndpoint",{get:function(){return this._profileQueryEndpoint},set:function(e){n.cancelCorrelationIdQuery(this,this.setCorrelationId),this._profileQueryEndpoint=e,this.correlationId=n.correlationIdPrefix,n.queryCorrelationId(this,this.setCorrelationId)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"quickPulseHost",{get:function(){return this._quickPulseHost},set:function(e){this._quickPulseHost=e},enumerable:!1,configurable:!0}),e._getInstrumentationKey=function(){var t=process.env[e.ENV_iKey]||process.env[e.ENV_azurePrefix+e.ENV_iKey]||process.env[e.legacy_ENV_iKey]||process.env[e.ENV_azurePrefix+e.legacy_ENV_iKey];if(!t||""==t)throw new Error("Instrumentation key not found, pass the key in the config to this method or set the key in the environment variable APPINSIGHTS_INSTRUMENTATIONKEY before starting the server");return t},e._validateInstrumentationKey=function(e){return new RegExp("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$").test(e)},e.ENV_azurePrefix="APPSETTING_",e.ENV_iKey="APPINSIGHTS_INSTRUMENTATIONKEY",e.legacy_ENV_iKey="APPINSIGHTS_INSTRUMENTATION_KEY",e.ENV_profileQueryEndpoint="APPINSIGHTS_PROFILE_QUERY_ENDPOINT",e.ENV_quickPulseHost="APPINSIGHTS_QUICKPULSE_HOST",e.ENV_connectionString="APPLICATIONINSIGHTS_CONNECTION_STRING",e.ENV_nativeMetricsDisablers="APPLICATION_INSIGHTS_DISABLE_EXTENDED_METRIC",e.ENV_nativeMetricsDisableAll="APPLICATION_INSIGHTS_DISABLE_ALL_EXTENDED_METRICS",e.ENV_http_proxy="http_proxy",e.ENV_https_proxy="https_proxy",e}();t.exports=a}),zn=v(e=>{"use strict";var t=e&&e.__assign||function(){return t=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},t.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.AutoCollectNativePerformance=void 0;var n=qn(),o=On(),i=w(),s=function(){function e(t){this._disabledMetrics={},e.INSTANCE&&e.INSTANCE.dispose(),e.INSTANCE=this,this._client=t}return e.isNodeVersionCompatible=function(){var e=process.versions.node.split(".");return parseInt(e[0])>=6},e.prototype.enable=function(t,n,o){var s=this;if(void 0===n&&(n={}),void 0===o&&(o=6e4),e.isNodeVersionCompatible()){if(null==e._metricsAvailable&&t&&!this._isInitialized)try{var a=r(4597);e._emitter=new a,e._metricsAvailable=!0,i.info("Native metrics module successfully loaded!")}catch{return void(e._metricsAvailable=!1)}this._isEnabled=t,this._disabledMetrics=n,this._isEnabled&&!this._isInitialized&&(this._isInitialized=!0),this._isEnabled&&e._emitter?(e._emitter.enable(!0,o),this._handle||(this._handle=setInterval(function(){return s._trackNativeMetrics()},o),this._handle.unref())):e._emitter&&(e._emitter.enable(!1),this._handle&&(clearInterval(this._handle),this._handle=void 0))}},e.prototype.dispose=function(){this.enable(!1)},e.parseEnabled=function(e){var r=process.env[n.ENV_nativeMetricsDisableAll],o=process.env[n.ENV_nativeMetricsDisablers];if(r)return{isEnabled:!1,disabledMetrics:{}};if(o){var i=o.split(","),s={};if(i.length>0)for(var a=0,c=i;a<c.length;a++)s[c[a]]=!0;return"object"==typeof e?{isEnabled:!0,disabledMetrics:t(t({},e),s)}:{isEnabled:e,disabledMetrics:s}}return"boolean"==typeof e?{isEnabled:e,disabledMetrics:{}}:{isEnabled:!0,disabledMetrics:e}},e.prototype._trackNativeMetrics=function(){var e=!0;"object"!=typeof this._isEnabled&&(e=this._isEnabled),e&&(this._trackGarbageCollection(),this._trackEventLoop(),this._trackHeapUsage())},e.prototype._trackGarbageCollection=function(){var t;if(!this._disabledMetrics.gc){var r=e._emitter.getGCData();for(var n in r){var i=r[n].metrics,s=n+" Garbage Collection Duration",a=Math.sqrt(i.sumSquares/i.count-Math.pow(i.total/i.count,2))||0;this._client.trackMetric({name:s,value:i.total,count:i.count,max:i.max,min:i.min,stdDev:a,tagOverrides:(t={},t[this._client.context.keys.internalSdkVersion]="node-nativeperf:"+o.sdkVersion,t)})}}},e.prototype._trackEventLoop=function(){var t;if(!this._disabledMetrics.loop){var r=e._emitter.getLoopData().loopUsage;if(0!=r.count){var n=Math.sqrt(r.sumSquares/r.count-Math.pow(r.total/r.count,2))||0;this._client.trackMetric({name:"Event Loop CPU Time",value:r.total,count:r.count,min:r.min,max:r.max,stdDev:n,tagOverrides:(t={},t[this._client.context.keys.internalSdkVersion]="node-nativeperf:"+o.sdkVersion,t)})}}},e.prototype._trackHeapUsage=function(){var e,t,r;if(!this._disabledMetrics.heap){var n=process.memoryUsage(),i=n.heapUsed,s=n.heapTotal,a=n.rss;this._client.trackMetric({name:"Memory Usage (Heap)",value:i,count:1,tagOverrides:(e={},e[this._client.context.keys.internalSdkVersion]="node-nativeperf:"+o.sdkVersion,e)}),this._client.trackMetric({name:"Memory Total (Heap)",value:s,count:1,tagOverrides:(t={},t[this._client.context.keys.internalSdkVersion]="node-nativeperf:"+o.sdkVersion,t)}),this._client.trackMetric({name:"Memory Usage (Non-Heap)",value:a-s,count:1,tagOverrides:(r={},r[this._client.context.keys.internalSdkVersion]="node-nativeperf:"+o.sdkVersion,r)})}},e}();e.AutoCollectNativePerformance=s}),Wn=v((e,t)=>{"use strict";var r=w(),n=function(){function e(e,t,r,n){this._buffer=[],this._lastSend=0,this._isDisabled=e,this._getBatchSize=t,this._getBatchIntervalMs=r,this._sender=n}return e.prototype.setUseDiskRetryCaching=function(e,t,r){this._sender.setDiskRetryMode(e,t,r)},e.prototype.send=function(e){var t=this;if(!this._isDisabled()){if(!e)return void r.warn("Cannot send null/undefined telemetry");if(this._buffer.push(e),this._buffer.length>=this._getBatchSize())return void this.triggerSend(!1);!this._timeoutHandle&&this._buffer.length>0&&(this._timeoutHandle=setTimeout(function(){t._timeoutHandle=null,t.triggerSend(!1)},this._getBatchIntervalMs()))}},e.prototype.triggerSend=function(e,t){var r=this._buffer.length<1;r||(e?(this._sender.saveOnCrash(this._buffer),"function"==typeof t&&t("data saved on crash")):this._sender.send(this._buffer,t)),this._lastSend=+new Date,this._buffer=[],clearTimeout(this._timeoutHandle),this._timeoutHandle=null,r&&"function"==typeof t&&t("no data to send")},e}();t.exports=n}),Gn=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.azureRoleEnvironmentTelemetryProcessor=void 0,e.azureRoleEnvironmentTelemetryProcessor=function(e,t){process.env.WEBSITE_SITE_NAME&&(e.tags[t.keys.cloudRole]=process.env.WEBSITE_SITE_NAME)}}),Kn=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSamplingHashCode=e.samplingTelemetryProcessor=void 0;var t=Wr();function r(e){var t=2147483647,r=5381;if(!e)return 0;for(;e.length<8;)e+=e;for(var n=0;n<e.length;n++)r=((r<<5)+r|0)+e.charCodeAt(n)|0;return(r=r<=-2147483648?t:Math.abs(r))/t*100}e.samplingTelemetryProcessor=function(e,n){var o=e.sampleRate;return!!(null==o||o>=100||e.data&&t.TelemetryType.Metric===t.baseTypeToTelemetryType(e.data.baseType))||(n.correlationContext&&n.correlationContext.operation?r(n.correlationContext.operation.id)<o:100*Math.random()<o)},e.getSamplingHashCode=r}),Xn=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.performanceMetricsTelemetryProcessor=void 0;var t=Pn(),r=Wr();e.performanceMetricsTelemetryProcessor=function(e,n){switch(n&&n.addDocument(e),e.data.baseType){case r.TelemetryTypeString.Exception:t.countException();break;case r.TelemetryTypeString.Request:var o=e.data.baseData;t.countRequest(o.duration,o.success);break;case r.TelemetryTypeString.Dependency:var i=e.data.baseData;t.countDependency(i.duration,i.success)}return!0}}),Jn=v(e=>{"use strict";var t=e&&e.__assign||function(){return t=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},t.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.preAggregatedMetricsTelemetryProcessor=void 0;var r=Wr(),n=In(),o=Wr();e.preAggregatedMetricsTelemetryProcessor=function(e,i){if(n.isEnabled())switch(e.data.baseType){case o.TelemetryTypeString.Exception:var s=e.data.baseData;s.properties=t(t({},s.properties),{"_MS.ProcessedByMetricExtractors":"(Name:'Exceptions', Ver:'1.1')"});var a={cloudRoleInstance:e.tags[i.keys.cloudRoleInstance],cloudRoleName:e.tags[i.keys.cloudRole]};n.countException(a);break;case o.TelemetryTypeString.Trace:var c=e.data.baseData;c.properties=t(t({},c.properties),{"_MS.ProcessedByMetricExtractors":"(Name:'Traces', Ver:'1.1')"});var l={cloudRoleInstance:e.tags[i.keys.cloudRoleInstance],cloudRoleName:e.tags[i.keys.cloudRole],traceSeverityLevel:r.SeverityLevel[c.severity]};n.countTrace(l);break;case o.TelemetryTypeString.Request:var u=e.data.baseData;u.properties=t(t({},u.properties),{"_MS.ProcessedByMetricExtractors":"(Name:'Requests', Ver:'1.1')"});var d={cloudRoleInstance:e.tags[i.keys.cloudRoleInstance],cloudRoleName:e.tags[i.keys.cloudRole],operationSynthetic:e.tags[i.keys.operationSyntheticSource],requestSuccess:u.success,requestResultCode:u.responseCode};n.countRequest(u.duration,d);break;case o.TelemetryTypeString.Dependency:var p=e.data.baseData;p.properties=t(t({},p.properties),{"_MS.ProcessedByMetricExtractors":"(Name:'Dependencies', Ver:'1.1')"});var h={cloudRoleInstance:e.tags[i.keys.cloudRoleInstance],cloudRoleName:e.tags[i.keys.cloudRole],operationSynthetic:e.tags[i.keys.operationSyntheticSource],dependencySuccess:p.success,dependencyType:p.type,dependencyTarget:p.target,dependencyResultCode:p.resultCode};n.countDependency(p.duration,h)}return!0}}),Qn=v(e=>{"use strict";var t=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),r=e&&e.__exportStar||function(e,r){for(var n in e)"default"!==n&&!Object.prototype.hasOwnProperty.call(r,n)&&t(r,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),r(Gn(),e),r(Kn(),e),r(Xn(),e),r(Jn(),e)}),Yn=v((e,t)=>{"use strict";var n=e&&e.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(o,i){function s(e){try{c(n.next(e))}catch(e){i(e)}}function a(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):function(e){return e instanceof r?e:new r(function(t){t(e)})}(e.value).then(s,a)}c((n=n.apply(e,t||[])).next())})},o=e&&e.__generator||function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},i=r(9896),s=r(857),a=r(6928),c=r(3106),l=r(5317),u=w(),d=Mn(),p=Zt(),h=function(){function e(t,r,n){if(this._redirectedHost=null,this._config=t,this._onSuccess=r,this._onError=n,this._enableDiskRetryMode=!1,this._resendInterval=e.WAIT_BETWEEN_RESEND,this._maxBytesOnDisk=e.MAX_BYTES_ON_DISK,this._numConsecutiveFailures=0,this._numConsecutiveRedirects=0,this._resendTimer=null,this._fileCleanupTimer=null,this._tempDir=a.join(s.tmpdir(),e.TEMPDIR_PREFIX+this._config.instrumentationKey),!e.OS_PROVIDES_FILE_PROTECTION)if(e.USE_ICACLS){try{e.OS_PROVIDES_FILE_PROTECTION=i.existsSync(e.ICACLS_PATH)}catch{}e.OS_PROVIDES_FILE_PROTECTION||u.warn(e.TAG,"Could not find ICACLS in expected location! This is necessary to use disk retry mode on Windows.")}else e.OS_PROVIDES_FILE_PROTECTION=!0}return e.prototype.setDiskRetryMode=function(t,r,n){var o=this;this._enableDiskRetryMode=e.OS_PROVIDES_FILE_PROTECTION&&t,"number"==typeof r&&r>=0&&(this._resendInterval=Math.floor(r)),"number"==typeof n&&n>=0&&(this._maxBytesOnDisk=Math.floor(n)),t&&!e.OS_PROVIDES_FILE_PROTECTION&&(this._enableDiskRetryMode=!1,u.warn(e.TAG,"Ignoring request to enable disk retry mode. Sufficient file protection capabilities were not detected.")),this._enableDiskRetryMode?this._fileCleanupTimer||(this._fileCleanupTimer=setTimeout(function(){o._fileCleanupTask()},e.CLEANUP_TIMEOUT),this._fileCleanupTimer.unref()):this._fileCleanupTimer&&clearTimeout(this._fileCleanupTimer)},e.prototype.send=function(t,r){return n(this,void 0,void 0,function(){var n,i,s,a,l=this;return o(this,function(o){return t&&(n=this._redirectedHost||this._config.endpointUrl,i={method:"POST",withCredentials:!1,headers:{"Content-Type":"application/x-json-stream"}},s="",t.forEach(function(e){var t=l._stringify(e);"string"==typeof t&&(s+=t+"\n")}),s.length>0&&(s=s.substring(0,s.length-1)),a=Buffer.from?Buffer.from(s):new Buffer(s),c.gzip(a,function(o,s){var c=s;o?(u.warn(o),c=a,i.headers["Content-Length"]=a.length.toString()):(i.headers["Content-Encoding"]="gzip",i.headers["Content-Length"]=s.length.toString()),u.info(e.TAG,i),i[d.disableCollectionRequestOption]=!0;var h=p.makeRequest(l._config,n,i,function(n){n.setEncoding("utf-8");var o="";n.on("data",function(e){o+=e}),n.on("end",function(){if(l._numConsecutiveFailures=0,l._enableDiskRetryMode)if(200===n.statusCode)l._resendTimer||(l._resendTimer=setTimeout(function(){l._resendTimer=null,l._sendFirstFileOnDisk()},l._resendInterval),l._resendTimer.unref());else if(l._isRetriable(n.statusCode))try{var i=JSON.parse(o),s=[];i.errors.forEach(function(e){l._isRetriable(e.statusCode)&&s.push(t[e.index])}),s.length>0&&l._storeToDisk(s)}catch{l._storeToDisk(t)}if(307===n.statusCode||308===n.statusCode)if(l._numConsecutiveRedirects++,l._numConsecutiveRedirects<10){var a=n.headers.location?n.headers.location.toString():null;a&&(l._redirectedHost=a,l.send(t,r))}else"function"==typeof r&&r("Error sending telemetry because of circular redirects.");else l._numConsecutiveRedirects=0,"function"==typeof r&&r(o),u.info(e.TAG,o),"function"==typeof l._onSuccess&&l._onSuccess(o)})});h.on("error",function(n){if(l._numConsecutiveFailures++,!l._enableDiskRetryMode||l._numConsecutiveFailures>0&&l._numConsecutiveFailures%e.MAX_CONNECTION_FAILURES_BEFORE_WARN===0){var o="Ingestion endpoint could not be reached. This batch of telemetry items has been lost. Use Disk Retry Caching to enable resending of failed telemetry. Error:";l._enableDiskRetryMode&&(o="Ingestion endpoint could not be reached "+l._numConsecutiveFailures+" consecutive times. There may be resulting telemetry loss. Most recent error:"),u.warn(e.TAG,o,p.dumpObj(n))}else o="Transient failure to reach ingestion endpoint. This batch of telemetry items will be retried. Error:",u.info(e.TAG,o,p.dumpObj(n));l._onErrorHelper(n),"function"==typeof r&&(n&&r(p.dumpObj(n)),r("Error sending telemetry")),l._enableDiskRetryMode&&l._storeToDisk(t)}),h.write(c),h.end()})),[2]})})},e.prototype.saveOnCrash=function(e){this._enableDiskRetryMode&&this._storeToDiskSync(this._stringify(e))},e.prototype._isRetriable=function(e){return 206===e||408===e||429===e||439===e||500===e||503===e},e.prototype._runICACLS=function(t,r){var n=l.spawn(e.ICACLS_PATH,t,{windowsHide:!0});n.on("error",function(e){return r(e)}),n.on("close",function(e,t){return r(0===e?null:new Error("Setting ACL restrictions did not succeed (ICACLS returned code "+e+")"))})},e.prototype._runICACLSSync=function(t){if(!l.spawnSync)throw new Error("Could not synchronously call ICACLS under current version of Node.js");var r=l.spawnSync(e.ICACLS_PATH,t,{windowsHide:!0});if(r.error)throw r.error;if(0!==r.status)throw new Error("Setting ACL restrictions did not succeed (ICACLS returned code "+r.status+")")},e.prototype._getACLIdentity=function(t){if(e.ACL_IDENTITY)return t(null,e.ACL_IDENTITY);var r=l.spawn(e.POWERSHELL_PATH,["-Command","[System.Security.Principal.WindowsIdentity]::GetCurrent().Name"],{windowsHide:!0,stdio:["ignore","pipe","pipe"]}),n="";r.stdout.on("data",function(e){return n+=e}),r.on("error",function(e){return t(e,null)}),r.on("close",function(r,o){return e.ACL_IDENTITY=n&&n.trim(),t(0===r?null:new Error("Getting ACL identity did not succeed (PS returned code "+r+")"),e.ACL_IDENTITY)})},e.prototype._getACLIdentitySync=function(){if(e.ACL_IDENTITY)return e.ACL_IDENTITY;if(l.spawnSync){var t=l.spawnSync(e.POWERSHELL_PATH,["-Command","[System.Security.Principal.WindowsIdentity]::GetCurrent().Name"],{windowsHide:!0,stdio:["ignore","pipe","pipe"]});if(t.error)throw t.error;if(0!==t.status)throw new Error("Getting ACL identity did not succeed (PS returned code "+t.status+")");return e.ACL_IDENTITY=t.stdout&&t.stdout.toString().trim(),e.ACL_IDENTITY}throw new Error("Could not synchronously get ACL identity under current version of Node.js")},e.prototype._getACLArguments=function(e,t){return[e,"/grant","*S-1-5-32-544:(OI)(CI)F","/grant",t+":(OI)(CI)F","/inheritance:r"]},e.prototype._applyACLRules=function(t,r){var n=this;return e.USE_ICACLS?void 0!==e.ACLED_DIRECTORIES[t]?r(e.ACLED_DIRECTORIES[t]?null:new Error("Setting ACL restrictions did not succeed (cached result)")):(e.ACLED_DIRECTORIES[t]=!1,void this._getACLIdentity(function(o,i){if(o)return e.ACLED_DIRECTORIES[t]=!1,r(o);n._runICACLS(n._getACLArguments(t,i),function(n){return e.ACLED_DIRECTORIES[t]=!n,r(n)})})):r(null)},e.prototype._applyACLRulesSync=function(t){if(e.USE_ICACLS){if(void 0===e.ACLED_DIRECTORIES[t])return this._runICACLSSync(this._getACLArguments(t,this._getACLIdentitySync())),void(e.ACLED_DIRECTORIES[t]=!0);if(!e.ACLED_DIRECTORIES[t])throw new Error("Setting ACL restrictions did not succeed (cached result)")}},e.prototype._confirmDirExists=function(e,t){var r=this;i.lstat(e,function(n,o){n&&"ENOENT"===n.code?i.mkdir(e,function(n){n&&"EEXIST"!==n.code?t(n):r._applyACLRules(e,t)}):!n&&o.isDirectory()?r._applyACLRules(e,t):t(n||new Error("Path existed but was not a directory"))})},e.prototype._getShallowDirectorySize=function(e,t){i.readdir(e,function(r,n){if(r)return t(r,-1);var o=null,s=0,c=0;if(0!==n.length)for(var l=0;l<n.length;l++)i.stat(a.join(e,n[l]),function(e,r){c++,e?o=e:r.isFile()&&(s+=r.size),c===n.length&&t(o,o?-1:s)});else t(null,0)})},e.prototype._getShallowDirectorySizeSync=function(e){for(var t=i.readdirSync(e),r=0,n=0;n<t.length;n++)r+=i.statSync(a.join(e,t[n])).size;return r},e.prototype._storeToDisk=function(t){var r=this;u.info(e.TAG,"Checking existence of data storage directory: "+this._tempDir),this._confirmDirExists(this._tempDir,function(n){if(n)return u.warn(e.TAG,"Error while checking/creating directory: "+(n&&n.message)),void r._onErrorHelper(n);r._getShallowDirectorySize(r._tempDir,function(n,o){if(n||o<0)return u.warn(e.TAG,"Error while checking directory size: "+(n&&n.message)),void r._onErrorHelper(n);if(o>r._maxBytesOnDisk)u.warn(e.TAG,"Not saving data due to max size limit being met. Directory size in bytes is: "+o);else{var s=(new Date).getTime()+".ai.json",c=a.join(r._tempDir,s);u.info(e.TAG,"saving data to disk at: "+c),i.writeFile(c,r._stringify(t),{mode:384},function(e){return r._onErrorHelper(e)})}})})},e.prototype._storeToDiskSync=function(t){try{u.info(e.TAG,"Checking existence of data storage directory: "+this._tempDir),i.existsSync(this._tempDir)||i.mkdirSync(this._tempDir),this._applyACLRulesSync(this._tempDir);var r=this._getShallowDirectorySizeSync(this._tempDir);if(r>this._maxBytesOnDisk)return void u.info(e.TAG,"Not saving data due to max size limit being met. Directory size in bytes is: "+r);var n=(new Date).getTime()+".ai.json",o=a.join(this._tempDir,n);u.info(e.TAG,"saving data before crash to disk at: "+o),i.writeFileSync(o,t,{mode:384})}catch(t){u.warn(e.TAG,"Error while saving data to disk: "+(t&&t.message)),this._onErrorHelper(t)}},e.prototype._sendFirstFileOnDisk=function(){var e=this;i.exists(this._tempDir,function(t){t&&i.readdir(e._tempDir,function(t,r){if(t)e._onErrorHelper(t);else if((r=r.filter(function(e){return a.basename(e).indexOf(".ai.json")>-1})).length>0){var n=r[0],o=a.join(e._tempDir,n);i.readFile(o,function(t,r){t?e._onErrorHelper(t):i.unlink(o,function(t){if(t)e._onErrorHelper(t);else try{var n=JSON.parse(r.toString());e.send(n)}catch(e){u.warn("Failed to read persisted file",e)}})})}})})},e.prototype._onErrorHelper=function(e){"function"==typeof this._onError&&this._onError(e)},e.prototype._stringify=function(e){try{return JSON.stringify(e)}catch(t){u.warn("Failed to serialize payload",t,e)}},e.prototype._fileCleanupTask=function(){var t=this;i.exists(this._tempDir,function(r){r&&i.readdir(t._tempDir,function(r,n){r?t._onErrorHelper(r):(n=n.filter(function(e){return a.basename(e).indexOf(".ai.json")>-1})).length>0&&n.forEach(function(r){var n=new Date(parseInt(r.split(".ai.json")[0]));if(new Date(+new Date-e.FILE_RETEMPTION_PERIOD)>n){var o=a.join(t._tempDir,r);i.unlink(o,function(e){e&&t._onErrorHelper(e)})}})})})},e.TAG="Sender",e.ICACLS_PATH=process.env.systemdrive+"/windows/system32/icacls.exe",e.POWERSHELL_PATH=process.env.systemdrive+"/windows/system32/windowspowershell/v1.0/powershell.exe",e.ACLED_DIRECTORIES={},e.ACL_IDENTITY=null,e.WAIT_BETWEEN_RESEND=6e4,e.MAX_BYTES_ON_DISK=52428800,e.MAX_CONNECTION_FAILURES_BEFORE_WARN=5,e.CLEANUP_TIMEOUT=36e5,e.FILE_RETEMPTION_PERIOD=6048e5,e.TEMPDIR_PREFIX="appInsights-node",e.OS_PROVIDES_FILE_PROTECTION=!1,e.USE_ICACLS="Windows_NT"===s.type(),e}();t.exports=h}),Zn=v((e,t)=>{"use strict";var r=Wr(),n=Zt(),o=vn(),i=function(){function e(){}return e.createEnvelope=function(t,o,i,s,a){var c=null;switch(o){case r.TelemetryType.Trace:c=e.createTraceData(t);break;case r.TelemetryType.Dependency:c=e.createDependencyData(t);break;case r.TelemetryType.Event:c=e.createEventData(t);break;case r.TelemetryType.Exception:c=e.createExceptionData(t);break;case r.TelemetryType.Request:c=e.createRequestData(t);break;case r.TelemetryType.Metric:c=e.createMetricData(t);break;case r.TelemetryType.Availability:c=e.createAvailabilityData(t);break;case r.TelemetryType.PageView:c=e.createPageViewData(t)}if(i&&r.domainSupportsProperties(c.baseData)){if(c&&c.baseData)if(c.baseData.properties)for(var l in i)c.baseData.properties[l]||(c.baseData.properties[l]=i[l]);else c.baseData.properties=i;c.baseData.properties=n.validateStringMap(c.baseData.properties)}var u=a&&a.instrumentationKey||"",d=new r.Envelope;return d.data=c,d.iKey=u,d.name="Microsoft.ApplicationInsights."+u.replace(/-/g,"")+"."+c.baseType.substr(0,c.baseType.length-4),d.tags=this.getTags(s,t.tagOverrides),d.time=(new Date).toISOString(),d.ver=1,d.sampleRate=a?a.samplingPercentage:100,o===r.TelemetryType.Metric&&(d.sampleRate=100),d},e.createTraceData=function(e){var t=new r.MessageData;t.message=e.message,t.properties=e.properties,isNaN(e.severity)?t.severityLevel=r.SeverityLevel.Information:t.severityLevel=e.severity;var n=new r.Data;return n.baseType=r.telemetryTypeToBaseType(r.TelemetryType.Trace),n.baseData=t,n},e.createDependencyData=function(e){var t=new r.RemoteDependencyData;"string"==typeof e.name&&(t.name=e.name.length>1024?e.name.slice(0,1021)+"...":e.name),t.data=e.data,t.target=e.target,t.duration=n.msToTimeSpan(e.duration),t.success=e.success,t.type=e.dependencyTypeName,t.properties=e.properties,t.resultCode=e.resultCode?e.resultCode+"":"",e.id?t.id=e.id:t.id=n.w3cTraceId();var o=new r.Data;return o.baseType=r.telemetryTypeToBaseType(r.TelemetryType.Dependency),o.baseData=t,o},e.createEventData=function(e){var t=new r.EventData;t.name=e.name,t.properties=e.properties,t.measurements=e.measurements;var n=new r.Data;return n.baseType=r.telemetryTypeToBaseType(r.TelemetryType.Event),n.baseData=t,n},e.createExceptionData=function(e){var t=new r.ExceptionData;t.properties=e.properties,isNaN(e.severity)?t.severityLevel=r.SeverityLevel.Error:t.severityLevel=e.severity,t.measurements=e.measurements,t.exceptions=[];var o=e.exception.stack,i=new r.ExceptionDetails;i.message=e.exception.message,i.typeName=e.exception.name,i.parsedStack=this.parseStack(o),i.hasFullStack=n.isArray(i.parsedStack)&&i.parsedStack.length>0,t.exceptions.push(i);var s=new r.Data;return s.baseType=r.telemetryTypeToBaseType(r.TelemetryType.Exception),s.baseData=t,s},e.createRequestData=function(e){var t=new r.RequestData;e.id?t.id=e.id:t.id=n.w3cTraceId(),t.name=e.name,t.url=e.url,t.source=e.source,t.duration=n.msToTimeSpan(e.duration),t.responseCode=e.resultCode?e.resultCode+"":"",t.success=e.success,t.properties=e.properties;var o=new r.Data;return o.baseType=r.telemetryTypeToBaseType(r.TelemetryType.Request),o.baseData=t,o},e.createMetricData=function(e){var t=new r.MetricData;t.metrics=[];var n=new r.DataPoint;n.count=isNaN(e.count)?1:e.count,n.kind=r.DataPointType.Aggregation,n.max=isNaN(e.max)?e.value:e.max,n.min=isNaN(e.min)?e.value:e.min,n.name=e.name,n.stdDev=isNaN(e.stdDev)?0:e.stdDev,n.value=e.value,t.metrics.push(n),t.properties=e.properties;var o=new r.Data;return o.baseType=r.telemetryTypeToBaseType(r.TelemetryType.Metric),o.baseData=t,o},e.createAvailabilityData=function(e){var t=new r.AvailabilityData;e.id?t.id=e.id:t.id=n.w3cTraceId(),t.name=e.name,t.duration=n.msToTimeSpan(e.duration),t.success=e.success,t.runLocation=e.runLocation,t.message=e.message,t.measurements=e.measurements,t.properties=e.properties;var o=new r.Data;return o.baseType=r.telemetryTypeToBaseType(r.TelemetryType.Availability),o.baseData=t,o},e.createPageViewData=function(e){var t=new r.PageViewData;t.name=e.name,t.duration=n.msToTimeSpan(e.duration),t.url=e.url,t.measurements=e.measurements,t.properties=e.properties;var o=new r.Data;return o.baseType=r.telemetryTypeToBaseType(r.TelemetryType.PageView),o.baseData=t,o},e.getTags=function(e,t){var r=o.CorrelationContextManager.getCurrentContext(),n={};if(e&&e.tags)for(var i in e.tags)n[i]=e.tags[i];if(t)for(var i in t)n[i]=t[i];return r&&(n[e.keys.operationId]=n[e.keys.operationId]||r.operation.id,n[e.keys.operationName]=n[e.keys.operationName]||r.operation.name,n[e.keys.operationParentId]=n[e.keys.operationParentId]||r.operation.parentId),n},e.parseStack=function(e){var t=void 0;if("string"==typeof e){var r=e.split("\n");t=[];for(var n=0,o=0,i=0;i<=r.length;i++){var a=r[i];if(s.regex.test(a)){var c=new s(r[i],n++);o+=c.sizeInBytes,t.push(c)}}if(o>32768)for(var l=0,u=t.length-1,d=0,p=l,h=u;l<u;){if((d+=t[l].sizeInBytes+t[u].sizeInBytes)>32768){var f=h-p+1;t.splice(p,f);break}p=l,h=u,l++,u--}}return t},e}(),s=function(){function e(t,r){this.sizeInBytes=0,this.level=r,this.method="<no_method>",this.assembly=n.trim(t);var o=t.match(e.regex);o&&o.length>=5&&(this.method=n.trim(o[2])||this.method,this.fileName=n.trim(o[4])||"<no_filename>",this.line=parseInt(o[5])||0),this.sizeInBytes+=this.method.length,this.sizeInBytes+=this.fileName.length,this.sizeInBytes+=this.assembly.length,this.sizeInBytes+=e.baseSize,this.sizeInBytes+=this.level.toString().length,this.sizeInBytes+=this.line.toString().length}return e.regex=/^(\s+at)?(.*?)(\@|\s\(|\s)([^\(\n]+):(\d+):(\d+)(\)?)$/,e.baseSize=58,e}();t.exports=i}),eo=v((e,t)=>{"use strict";var n=r(7016),o=qn(),i=On(),s=Wr(),a=Wn(),c=Qn(),l=vn(),u=Yn(),d=Zt(),p=w(),h=Zn(),f=function(){function e(e){this._telemetryProcessors=[],this._enableAzureProperties=!1;var t=new o(e);this.config=t,this.context=new i,this.commonProperties={};var r=new u(this.config);this.channel=new a(function(){return t.disableAppInsights},function(){return t.maxBatchSize},function(){return t.maxBatchIntervalMs},r)}return e.prototype.trackAvailability=function(e){this.track(e,s.TelemetryType.Availability)},e.prototype.trackPageView=function(e){this.track(e,s.TelemetryType.PageView)},e.prototype.trackTrace=function(e){this.track(e,s.TelemetryType.Trace)},e.prototype.trackMetric=function(e){this.track(e,s.TelemetryType.Metric)},e.prototype.trackException=function(e){e&&e.exception&&!d.isError(e.exception)&&(e.exception=new Error(e.exception.toString())),this.track(e,s.TelemetryType.Exception)},e.prototype.trackEvent=function(e){this.track(e,s.TelemetryType.Event)},e.prototype.trackRequest=function(e){this.track(e,s.TelemetryType.Request)},e.prototype.trackDependency=function(e){e&&!e.target&&e.data&&(e.target=n.parse(e.data).host),this.track(e,s.TelemetryType.Dependency)},e.prototype.flush=function(e){this.channel.triggerSend(!!e&&!!e.isAppCrashing,e?e.callback:void 0)},e.prototype.track=function(e,t){if(e&&s.telemetryTypeToBaseType(t)){var r=h.createEnvelope(e,t,this.commonProperties,this.context,this.config);e.time&&(r.time=e.time.toISOString()),this._enableAzureProperties&&c.azureRoleEnvironmentTelemetryProcessor(r,this.context);var n=this.runTelemetryProcessors(r,e.contextObjects);n=n&&c.samplingTelemetryProcessor(r,{correlationContext:l.CorrelationContextManager.getCurrentContext()}),c.preAggregatedMetricsTelemetryProcessor(r,this.context),n&&(c.performanceMetricsTelemetryProcessor(r,this.quickPulseClient),this.channel.send(r))}else p.warn("track() requires telemetry object and telemetryType to be specified.")},e.prototype.setAutoPopulateAzureProperties=function(e){this._enableAzureProperties=e},e.prototype.addTelemetryProcessor=function(e){this._telemetryProcessors.push(e)},e.prototype.clearTelemetryProcessors=function(){this._telemetryProcessors=[]},e.prototype.runTelemetryProcessors=function(e,t){var r=!0,n=this._telemetryProcessors.length;if(0===n)return r;(t=t||{}).correlationContext=l.CorrelationContextManager.getCurrentContext();for(var o=0;o<n;++o)try{var i=this._telemetryProcessors[o];if(i&&!1===i.apply(null,[e,t])){r=!1;break}}catch(t){r=!0,p.warn("One of telemetry processors failed, telemetry item will be sent.",t,e)}return r&&(e&&e.tags&&(e.tags=d.validateStringMap(e.tags)),e&&e.data&&e.data.baseData&&e.data.baseData.properties&&(e.data.baseData.properties=d.validateStringMap(e.data.baseData.properties))),r},e}();t.exports=f}),to=v((e,t)=>{"use strict";var r,n=e&&e.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=eo(),i=Fn(),s=Mn(),a=w(),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.trackNodeHttpRequestSync=function(e){e&&e.request&&e.response&&e.duration?i.trackRequestSync(this,e):a.warn("trackNodeHttpRequestSync requires NodeHttpRequestTelemetry object with request, response and duration specified.")},t.prototype.trackNodeHttpRequest=function(e){(e.duration||e.error)&&a.warn("trackNodeHttpRequest will ignore supplied duration and error parameters. These values are collected from the request and response objects."),e&&e.request&&e.response?i.trackRequest(this,e):a.warn("trackNodeHttpRequest requires NodeHttpRequestTelemetry object with request and response specified.")},t.prototype.trackNodeHttpDependency=function(e){e&&e.request?s.trackRequest(this,e):a.warn("trackNodeHttpDependency requires NodeHttpDependencyTelemetry object with request specified.")},t}(o);t.exports=c}),ro=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})}),no=v(e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.dispose=e.Configuration=e.wrapWithCorrelationContext=e.startOperation=e.getCorrelationContext=e.start=e.setup=e.liveMetricsClient=e.defaultClient=e.DistributedTracingModes=void 0;var t,r,n=vn(),o=En(),i=_n(),s=Pn(),a=In(),c=Ln(),l=Mn(),u=Fn(),d=er(),p=w(),h=Vn(),f=zn();e.TelemetryClient=to(),e.Contracts=Wr(),e.azureFunctionsTypes=ro(),(r=t=e.DistributedTracingModes||(e.DistributedTracingModes={}))[r.AI=0]="AI",r[r.AI_AND_W3C=1]="AI_AND_W3C";var g,m,v,y,S,E,_,b,P,T,C,I=!0,O=!1,N=!0,R=!0,A=!0,D=!1,x=!0,k=!0,j=!0,M=!0,L=!1,F=!0,U=void 0,$=void 0,B=!1;function V(){return e.defaultClient?(B=!0,v.enable(I,O),y.enable(N),S.enable(R),E.enable(A),_.enable(D,e.defaultClient.config),b.enable(F,m),P.useAutoCorrelation(M,g),P.enable(x),T.enable(k),e.liveMetricsClient&&L&&e.liveMetricsClient.enable(L)):p.warn("Start cannot be called before setup"),H}e.setup=function(t){return e.defaultClient?p.info("The default client is already setup"):(e.defaultClient=new e.TelemetryClient(t),v=new o(e.defaultClient),y=new i(e.defaultClient),S=new s(e.defaultClient),E=new a(e.defaultClient),_=new c(e.defaultClient),P=new u(e.defaultClient),T=new l(e.defaultClient),b||(b=new f.AutoCollectNativePerformance(e.defaultClient))),e.defaultClient&&e.defaultClient.channel&&e.defaultClient.channel.setUseDiskRetryCaching(j,U,$),H},e.start=V,e.getCorrelationContext=function(){return M?n.CorrelationContextManager.getCurrentContext():null},e.startOperation=function(e,t){return n.CorrelationContextManager.startOperation(e,t)},e.wrapWithCorrelationContext=function(e,t){return n.CorrelationContextManager.wrapCallback(e,t)};var H=function(){function r(){}return r.setDistributedTracingMode=function(e){return d.w3cEnabled=e===t.AI_AND_W3C,r},r.setAutoCollectConsole=function(e,t){return void 0===t&&(t=!1),I=e,O=t,B&&v.enable(e,t),r},r.setAutoCollectExceptions=function(e){return N=e,B&&y.enable(e),r},r.setAutoCollectPerformance=function(e,t){void 0===t&&(t=!0),R=e;var n=f.AutoCollectNativePerformance.parseEnabled(t);return F=n.isEnabled,m=n.disabledMetrics,B&&(S.enable(e),b.enable(n.isEnabled,n.disabledMetrics)),r},r.setAutoCollectPreAggregatedMetrics=function(e){return A=e,B&&E.enable(e),r},r.setAutoCollectHeartbeat=function(t){return D=t,B&&_.enable(t,e.defaultClient.config),r},r.setAutoCollectRequests=function(e){return x=e,B&&P.enable(e),r},r.setAutoCollectDependencies=function(e){return k=e,B&&T.enable(e),r},r.setAutoDependencyCorrelation=function(e,t){return M=e,g=t,B&&P.useAutoCorrelation(e,t),r},r.setUseDiskRetryCaching=function(t,n,o){return j=t,U=n,$=o,e.defaultClient&&e.defaultClient.channel&&e.defaultClient.channel.setUseDiskRetryCaching(t,n,o),r},r.setInternalLogging=function(e,t){return void 0===e&&(e=!1),void 0===t&&(t=!0),p.enableDebug=e,p.disableWarnings=!t,r},r.setSendLiveMetrics=function(t){return void 0===t&&(t=!1),e.defaultClient?(!e.liveMetricsClient&&t?(e.liveMetricsClient=new h(e.defaultClient.config,null),C=new s(e.liveMetricsClient,1e3,!0),e.liveMetricsClient.addCollector(C),e.defaultClient.quickPulseClient=e.liveMetricsClient):e.liveMetricsClient&&e.liveMetricsClient.enable(t),L=t,r):(p.warn("Live metrics client cannot be setup without the default client"),r)},r.start=V,r}();e.Configuration=H,e.dispose=function(){d.w3cEnabled=!0,e.defaultClient=null,B=!1,v&&v.dispose(),y&&y.dispose(),S&&S.dispose(),E&&E.dispose(),_&&_.dispose(),b&&b.dispose(),P&&P.dispose(),T&&T.dispose(),e.liveMetricsClient&&(e.liveMetricsClient.enable(!1),L=!1,e.liveMetricsClient=void 0)}}),oo={};((e,t)=>{for(var r in t)i(e,r,{get:t[r],enumerable:!0})})(oo,{default:()=>po}),e.exports=(n=oo,y(i({},"__esModule",{value:!0}),n));var io=S(r(857)),so=S(r(1398)),ao=S(r(5692)),co=class{constructor(e){this.vscodeAPI=e}getTelemetryLevel(){try{let e=this.vscodeAPI.env.telemetryConfiguration;return e.isUsageEnabled&&e.isErrorsEnabled&&e.isCrashEnabled?"on":e.isErrorsEnabled&&e.isCrashEnabled?"error":"off"}catch{return void 0!==this.vscodeAPI.env.isTelemetryEnabled?this.vscodeAPI.env.isTelemetryEnabled?"on":"off":this.vscodeAPI.workspace.getConfiguration("telemetry").get("enableTelemetry")?"on":"off"}}static applyReplacements(e,t){for(let r of Object.keys(e))for(let n of t)n.lookup.test(r)&&(void 0!==n.replacementString?e[r]=n.replacementString:delete e[r])}static shouldUseOneDataSystemSDK(e){return 74===e.length&&"-"===e[32]&&"-"===e[41]&&"-"===e[46]&&"-"===e[51]&&"-"===e[56]&&"-"===e[69]}static getInstance(e){return co._instance||(co._instance=new co(e)),co._instance}},lo=class{constructor(e,t,r,n,o,i){this.extensionId=e,this.extensionVersion=t,this.telemetryAppender=r,this.osShim=n,this.vscodeAPI=o,this.firstParty=!1,this.userOptIn=!1,this.errorOptIn=!1,this.disposables=[],this.firstParty=!!i,this.updateUserOptStatus(),void 0!==o.env.onDidChangeTelemetryEnabled?(this.disposables.push(o.env.onDidChangeTelemetryEnabled(()=>this.updateUserOptStatus())),this.disposables.push(o.workspace.onDidChangeConfiguration(()=>this.updateUserOptStatus()))):this.disposables.push(o.workspace.onDidChangeConfiguration(()=>this.updateUserOptStatus()))}updateUserOptStatus(){let e=co.getInstance(this.vscodeAPI).getTelemetryLevel();this.userOptIn="on"===e,this.errorOptIn="error"===e||this.userOptIn,(this.userOptIn||this.errorOptIn)&&this.telemetryAppender.instantiateAppender()}cleanRemoteName(e){if(!e)return"none";let t="other";return["ssh-remote","dev-container","attached-container","wsl","codespaces"].forEach(r=>{0===e.indexOf(`${r}`)&&(t=r)}),t}get extension(){return void 0===this._extension&&(this._extension=this.vscodeAPI.extensions.getExtension(this.extensionId)),this._extension}cloneAndChange(e,t){if(null===e||"object"!=typeof e||"function"!=typeof t)return e;let r={};for(let n in e)r[n]=t(n,e[n]);return r}shouldSendErrorTelemetry(){return!(!1===this.errorOptIn||this.firstParty&&this.vscodeAPI.env.remoteName&&"other"===this.cleanRemoteName(this.vscodeAPI.env.remoteName))}getCommonProperties(){let e={};if(e["common.os"]=this.osShim.platform,e["common.nodeArch"]=this.osShim.architecture,e["common.platformversion"]=(this.osShim.release||"").replace(/^(\d+)(\.\d+)?(\.\d+)?(.*)/,"$1$2$3"),e["common.extname"]=this.extensionId,e["common.extversion"]=this.extensionVersion,this.vscodeAPI&&this.vscodeAPI.env){switch(e["common.vscodemachineid"]=this.vscodeAPI.env.machineId,e["common.vscodesessionid"]=this.vscodeAPI.env.sessionId,e["common.vscodeversion"]=this.vscodeAPI.version,e["common.isnewappinstall"]=this.vscodeAPI.env.isNewAppInstall?this.vscodeAPI.env.isNewAppInstall.toString():"false",e["common.product"]=this.vscodeAPI.env.appHost,this.vscodeAPI.env.uiKind){case this.vscodeAPI.UIKind.Web:e["common.uikind"]="web";break;case this.vscodeAPI.UIKind.Desktop:e["common.uikind"]="desktop";break;default:e["common.uikind"]="unknown"}e["common.remotename"]=this.cleanRemoteName(this.vscodeAPI.env.remoteName)}return e}anonymizeFilePaths(e,t){let r;if(null==e)return"";let n=[];""!==this.vscodeAPI.env.appRoot&&n.push(new RegExp(this.vscodeAPI.env.appRoot.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gi")),this.extension&&n.push(new RegExp(this.extension.extensionPath.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gi"));let o=e;if(t){let t=[];for(let o of n)for(;(r=o.exec(e))&&r;)t.push([r.index,o.lastIndex]);let i=/^[\\/]?(node_modules|node_modules\.asar)[\\/]/,s=/(file:\/\/)?([a-zA-Z]:(\\\\|\\|\/)|(\\\\|\\|\/))?([\w-._]+(\\\\|\\|\/))+[\w-._]*/g,a=0;for(o="";(r=s.exec(e))&&r;)r[0]&&!i.test(r[0])&&t.every(([e,t])=>r.index<e||r.index>=t)&&(o+=e.substring(a,r.index)+"<REDACTED: user-file-path>",a=s.lastIndex);a<e.length&&(o+=e.substr(a))}for(let e of n)o=o.replace(e,"");return o}removePropertiesWithPossibleUserInfo(e){if("object"!=typeof e)return;let t={};for(let r of Object.keys(e)){let n=e[r];if(!n)continue;let o=/@[a-zA-Z0-9-.]+/,i=/xox[pbaors]-[a-zA-Z0-9]+-[a-zA-Z0-9-]+?/;/(key|token|sig|signature|password|passwd|pwd|android:value)[^a-zA-Z0-9]/.test(n.toLowerCase())?t[r]="<REDACTED: secret>":o.test(n)?t[r]="<REDACTED: email>":i.test(n)?t[r]="<REDACTED: token>":t[r]=n}return t}get telemetryLevel(){switch(co.getInstance(this.vscodeAPI).getTelemetryLevel()){case"on":return"all";case"error":return"error";case"off":return"off"}}internalSendTelemetryEvent(e,t,r,n,o){if((this.userOptIn||o)&&""!==e){if(t=g(g({},t),this.getCommonProperties()),n){let e=this.cloneAndChange(t,(e,t)=>this.anonymizeFilePaths(t,this.firstParty));t=this.removePropertiesWithPossibleUserInfo(e)}t=t??{},r=r??{},e=`${this.extensionId}/${e}`,this.telemetryAppender.logEvent(e,{properties:t,measurements:r})}}sendTelemetryEvent(e,t,r){this.internalSendTelemetryEvent(e,t,r,!0,!1)}sendRawTelemetryEvent(e,t,r){this.internalSendTelemetryEvent(e,t,r,!1,!1)}sendDangerousTelemetryEvent(e,t,r,n=!0){this.telemetryAppender.instantiateAppender(),this.internalSendTelemetryEvent(e,t,r,n,!0)}internalSendTelemetryErrorEvent(e,t,r,n,o){if((this.shouldSendErrorTelemetry()||o)&&""!==e){if(t=g(g({},t),this.getCommonProperties()),n){let e=this.cloneAndChange(t,(e,t)=>this.anonymizeFilePaths(t,this.firstParty));t=this.removePropertiesWithPossibleUserInfo(e)}t=t??{},r=r??{},e=`${this.extensionId}/${e}`,this.telemetryAppender.logEvent(e,{properties:t,measurements:r})}}sendTelemetryErrorEvent(e,t,r){this.internalSendTelemetryErrorEvent(e,t,r,!0,!1)}sendDangerousTelemetryErrorEvent(e,t,r,n=!0){this.telemetryAppender.instantiateAppender(),this.internalSendTelemetryErrorEvent(e,t,r,n,!0)}internalSendTelemetryException(e,t,r,n,o){if((this.shouldSendErrorTelemetry()||o)&&e){if(t=g(g({},t),this.getCommonProperties()),n){let r=this.cloneAndChange(t,(e,t)=>this.anonymizeFilePaths(t,this.firstParty));e.stack&&(e.stack=this.anonymizeFilePaths(e.stack,this.firstParty)),t=this.removePropertiesWithPossibleUserInfo(r)}t=t??{},r=r??{},this.telemetryAppender.logException(e,{properties:t,measurements:r})}}sendTelemetryException(e,t,r){this.internalSendTelemetryException(e,t,r,!0,!1)}sendDangerousTelemetryException(e,t,r,n=!0){this.telemetryAppender.instantiateAppender(),this.internalSendTelemetryException(e,t,r,n,!0)}dispose(){return this.telemetryAppender.flush(),Promise.all(this.disposables.map(e=>e.dispose()))}},uo=class{constructor(e,t){this._instantiationStatus=0,this._eventQueue=[],this._exceptionQueue=[],this._clientFactory=t,this._key=e}logEvent(e,t){this._telemetryClient?this._telemetryClient.logEvent(e,t):2!==this._instantiationStatus&&this._eventQueue.push({eventName:e,data:t})}logException(e,t){this._telemetryClient?this._telemetryClient.logException(e,t):2!==this._instantiationStatus&&this._exceptionQueue.push({exception:e,data:t})}async flush(){this._telemetryClient&&(await this._telemetryClient.flush(),this._telemetryClient=void 0)}_flushQueues(){this._eventQueue.forEach(({eventName:e,data:t})=>this.logEvent(e,t)),this._eventQueue=[],this._exceptionQueue.forEach(({exception:e,data:t})=>this.logException(e,t)),this._exceptionQueue=[]}instantiateAppender(){0===this._instantiationStatus&&(this._instantiationStatus=1,this._clientFactory(this._key).then(e=>{this._telemetryClient=e,this._instantiationStatus=2,this._flushQueues()}).catch(e=>{console.error(e),this._instantiationStatus=2}))}},po=class extends lo{constructor(e,t,n,o,i){let s=e=>(async(e,t)=>{let r;try{process.env.APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL="1";let t=await Promise.resolve().then(()=>S(no()));t.defaultClient?(r=new t.TelemetryClient(e),r.channel.setUseDiskRetryCaching(!0)):(t.setup(e).setAutoCollectRequests(!1).setAutoCollectPerformance(!1).setAutoCollectExceptions(!1).setAutoCollectDependencies(!1).setAutoDependencyCorrelation(!1).setAutoCollectConsole(!1).setAutoCollectHeartbeat(!1).setUseDiskRetryCaching(!0).start(),r=t.defaultClient),so&&so.env&&(r.context.tags[r.context.keys.userId]=so.env.machineId,r.context.tags[r.context.keys.sessionId]=so.env.sessionId,r.context.tags[r.context.keys.cloudRole]=so.env.appName,r.context.tags[r.context.keys.cloudRoleInstance]=so.env.appName),e&&0===e.indexOf("AIF-")&&(r.config.endpointUrl="https://mobile.events.data.microsoft.com/collect/v1")}catch(e){return Promise.reject("Failed to initialize app insights!\n"+e.message)}return null!=t&&t.length&&function(e,t){e.addTelemetryProcessor(e=>(Array.isArray(e.tags)?e.tags.forEach(e=>co.applyReplacements(e,t)):e.tags&&co.applyReplacements(e.tags,t),e.data.baseData&&co.applyReplacements(e.data.baseData,t),!0))}(r,t),{logEvent:(e,t)=>{try{null==r||r.trackEvent({name:e,properties:null==t?void 0:t.properties,measurements:null==t?void 0:t.measurements})}catch(e){throw new Error("Failed to log event to app insights!\n"+e.message)}},logException:(e,t)=>{try{null==r||r.trackException({exception:e,properties:null==t?void 0:t.properties,measurements:null==t?void 0:t.measurements})}catch(e){throw new Error("Failed to log exception to app insights!\n"+e.message)}},flush:async()=>{try{null==r||r.flush()}catch(e){throw new Error("Failed to flush app insights!\n"+e.message)}}}})(e,i);co.shouldUseOneDataSystemSDK(n)&&(s=e=>(async(e,t,n)=>{let o=await(async(e,t,n)=>{let o=await Promise.all([r.e(491),r.e(754)]).then(r.bind(r,4754)),i=await Promise.all([r.e(491),r.e(522)]).then(r.bind(r,3522)),s=new o.AppInsightsCore,a=new i.PostChannel,c={instrumentationKey:e,endpointUrl:"https://mobile.events.data.microsoft.com/OneCollector/1.0",loggingLevelTelemetry:0,loggingLevelConsole:0,disableCookiesUsage:!0,disableDbgExt:!0,disableInstrumentationKeyValidation:!0,channels:[[a]]};if(n){c.extensionConfig={};let e={alwaysUseXhrOverride:!0,httpXHROverride:n};c.extensionConfig[a.identifier]=e}let l=t.workspace.getConfiguration("telemetry").get("internalTesting");return s.initialize(c,[]),s.addTelemetryInitializer(e=>{!l||(e.ext=e.ext??{},e.ext.utc=e.ext.utc??{},e.ext.utc.flags=8462029)}),s})(e,t,n);return{logEvent:(e,t)=>{try{null==o||o.track({name:e,baseData:{name:e,properties:null==t?void 0:t.properties,measurements:null==t?void 0:t.measurements}})}catch(e){throw new Error("Failed to log event to app insights!\n"+e.message)}},logException:(e,t)=>{throw new Error("1DS SDK does not support logging exceptions, please use logEvent for exception tracking")},flush:async()=>{try{null==o||o.unload()}catch(e){throw new Error("Failed to flush app insights!\n"+e.message)}}}})(e,so,{sendPOST:(e,t)=>{let r={method:"POST",headers:m(g({},e.headers),{"Content-Type":"application/json","Content-Length":Buffer.byteLength(e.data)})};try{let n=ao.request(e.urlString,r,e=>{e.on("data",function(r){t(e.statusCode??200,e.headers,r.toString())}),e.on("error",function(){t(0,{})})});n.write(e.data),n.end()}catch{t(0,{})}}}));let a=new uo(n,s);n&&(0===n.indexOf("AIF-")||co.shouldUseOneDataSystemSDK(n))&&(o=!0),super(e,t,a,{release:io.release(),platform:io.platform(),architecture:io.arch()},so,o)}}},6011(e){function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=6011,e.exports=t},4545(e){function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=4545,e.exports=t},8377(e,t,r){"use strict";r.r(t),r.d(t,{NIL:()=>_,parse:()=>v,stringify:()=>d,v1:()=>m,v3:()=>S,v4:()=>w,v5:()=>E,validate:()=>l,version:()=>b});var n=r(6982),o=r.n(n);const i=new Uint8Array(256);let s=i.length;function a(){return s>i.length-16&&(o().randomFillSync(i),s=0),i.slice(s,s+=16)}const c=/^(?:[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,l=function(e){return"string"==typeof e&&c.test(e)},u=[];for(let e=0;e<256;++e)u.push((e+256).toString(16).substr(1));const d=function(e,t=0){const r=(u[e[t+0]]+u[e[t+1]]+u[e[t+2]]+u[e[t+3]]+"-"+u[e[t+4]]+u[e[t+5]]+"-"+u[e[t+6]]+u[e[t+7]]+"-"+u[e[t+8]]+u[e[t+9]]+"-"+u[e[t+10]]+u[e[t+11]]+u[e[t+12]]+u[e[t+13]]+u[e[t+14]]+u[e[t+15]]).toLowerCase();if(!l(r))throw TypeError("Stringified UUID is invalid");return r};let p,h,f=0,g=0;const m=function(e,t,r){let n=t&&r||0;const o=t||new Array(16);let i=(e=e||{}).node||p,s=void 0!==e.clockseq?e.clockseq:h;if(null==i||null==s){const t=e.random||(e.rng||a)();null==i&&(i=p=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==s&&(s=h=16383&(t[6]<<8|t[7]))}let c=void 0!==e.msecs?e.msecs:Date.now(),l=void 0!==e.nsecs?e.nsecs:g+1;const u=c-f+(l-g)/1e4;if(u<0&&void 0===e.clockseq&&(s=s+1&16383),(u<0||c>f)&&void 0===e.nsecs&&(l=0),l>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");f=c,g=l,h=s,c+=122192928e5;const m=(1e4*(268435455&c)+l)%4294967296;o[n++]=m>>>24&255,o[n++]=m>>>16&255,o[n++]=m>>>8&255,o[n++]=255&m;const v=c/4294967296*1e4&268435455;o[n++]=v>>>8&255,o[n++]=255&v,o[n++]=v>>>24&15|16,o[n++]=v>>>16&255,o[n++]=s>>>8|128,o[n++]=255&s;for(let e=0;e<6;++e)o[n+e]=i[e];return t||d(o)},v=function(e){if(!l(e))throw TypeError("Invalid UUID");let t;const r=new Uint8Array(16);return r[0]=(t=parseInt(e.slice(0,8),16))>>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r};function y(e,t,r){function n(e,n,o,i){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let r=0;r<e.length;++r)t.push(e.charCodeAt(r));return t}(e)),"string"==typeof n&&(n=v(n)),16!==n.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let s=new Uint8Array(16+e.length);if(s.set(n),s.set(e,n.length),s=r(s),s[6]=15&s[6]|t,s[8]=63&s[8]|128,o){i=i||0;for(let e=0;e<16;++e)o[i+e]=s[e];return o}return d(s)}try{n.name=e}catch(e){}return n.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",n.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",n}const S=y("v3",48,function(e){return Array.isArray(e)?e=Buffer.from(e):"string"==typeof e&&(e=Buffer.from(e,"utf8")),o().createHash("md5").update(e).digest()}),w=function(e,t,r){const n=(e=e||{}).random||(e.rng||a)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=n[e];return t}return d(n)},E=y("v5",80,function(e){return Array.isArray(e)?e=Buffer.from(e):"string"==typeof e&&(e=Buffer.from(e,"utf8")),o().createHash("sha1").update(e).digest()}),_="00000000-0000-0000-0000-000000000000",b=function(e){if(!l(e))throw TypeError("Invalid UUID");return parseInt(e.substr(14,1),16)}},3281(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressType=t.ProgressToken=t.createMessageConnection=t.NullLogger=t.ConnectionOptions=t.ConnectionStrategy=t.AbstractMessageBuffer=t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=t.CancellationToken=t.CancellationTokenSource=t.Emitter=t.Event=t.Disposable=t.LRUCache=t.Touch=t.LinkedMap=t.ParameterStructures=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.ErrorCodes=t.ResponseError=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType0=t.RequestType=t.Message=t.RAL=void 0,t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.Trace=void 0;const n=r(6177);Object.defineProperty(t,"Message",{enumerable:!0,get:function(){return n.Message}}),Object.defineProperty(t,"RequestType",{enumerable:!0,get:function(){return n.RequestType}}),Object.defineProperty(t,"RequestType0",{enumerable:!0,get:function(){return n.RequestType0}}),Object.defineProperty(t,"RequestType1",{enumerable:!0,get:function(){return n.RequestType1}}),Object.defineProperty(t,"RequestType2",{enumerable:!0,get:function(){return n.RequestType2}}),Object.defineProperty(t,"RequestType3",{enumerable:!0,get:function(){return n.RequestType3}}),Object.defineProperty(t,"RequestType4",{enumerable:!0,get:function(){return n.RequestType4}}),Object.defineProperty(t,"RequestType5",{enumerable:!0,get:function(){return n.RequestType5}}),Object.defineProperty(t,"RequestType6",{enumerable:!0,get:function(){return n.RequestType6}}),Object.defineProperty(t,"RequestType7",{enumerable:!0,get:function(){return n.RequestType7}}),Object.defineProperty(t,"RequestType8",{enumerable:!0,get:function(){return n.RequestType8}}),Object.defineProperty(t,"RequestType9",{enumerable:!0,get:function(){return n.RequestType9}}),Object.defineProperty(t,"ResponseError",{enumerable:!0,get:function(){return n.ResponseError}}),Object.defineProperty(t,"ErrorCodes",{enumerable:!0,get:function(){return n.ErrorCodes}}),Object.defineProperty(t,"NotificationType",{enumerable:!0,get:function(){return n.NotificationType}}),Object.defineProperty(t,"NotificationType0",{enumerable:!0,get:function(){return n.NotificationType0}}),Object.defineProperty(t,"NotificationType1",{enumerable:!0,get:function(){return n.NotificationType1}}),Object.defineProperty(t,"NotificationType2",{enumerable:!0,get:function(){return n.NotificationType2}}),Object.defineProperty(t,"NotificationType3",{enumerable:!0,get:function(){return n.NotificationType3}}),Object.defineProperty(t,"NotificationType4",{enumerable:!0,get:function(){return n.NotificationType4}}),Object.defineProperty(t,"NotificationType5",{enumerable:!0,get:function(){return n.NotificationType5}}),Object.defineProperty(t,"NotificationType6",{enumerable:!0,get:function(){return n.NotificationType6}}),Object.defineProperty(t,"NotificationType7",{enumerable:!0,get:function(){return n.NotificationType7}}),Object.defineProperty(t,"NotificationType8",{enumerable:!0,get:function(){return n.NotificationType8}}),Object.defineProperty(t,"NotificationType9",{enumerable:!0,get:function(){return n.NotificationType9}}),Object.defineProperty(t,"ParameterStructures",{enumerable:!0,get:function(){return n.ParameterStructures}});const o=r(3352);Object.defineProperty(t,"LinkedMap",{enumerable:!0,get:function(){return o.LinkedMap}}),Object.defineProperty(t,"LRUCache",{enumerable:!0,get:function(){return o.LRUCache}}),Object.defineProperty(t,"Touch",{enumerable:!0,get:function(){return o.Touch}});const i=r(4019);Object.defineProperty(t,"Disposable",{enumerable:!0,get:function(){return i.Disposable}});const s=r(2676);Object.defineProperty(t,"Event",{enumerable:!0,get:function(){return s.Event}}),Object.defineProperty(t,"Emitter",{enumerable:!0,get:function(){return s.Emitter}});const a=r(9850);Object.defineProperty(t,"CancellationTokenSource",{enumerable:!0,get:function(){return a.CancellationTokenSource}}),Object.defineProperty(t,"CancellationToken",{enumerable:!0,get:function(){return a.CancellationToken}});const c=r(4996);Object.defineProperty(t,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return c.SharedArraySenderStrategy}}),Object.defineProperty(t,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return c.SharedArrayReceiverStrategy}});const l=r(9085);Object.defineProperty(t,"MessageReader",{enumerable:!0,get:function(){return l.MessageReader}}),Object.defineProperty(t,"AbstractMessageReader",{enumerable:!0,get:function(){return l.AbstractMessageReader}}),Object.defineProperty(t,"ReadableStreamMessageReader",{enumerable:!0,get:function(){return l.ReadableStreamMessageReader}});const u=r(3193);Object.defineProperty(t,"MessageWriter",{enumerable:!0,get:function(){return u.MessageWriter}}),Object.defineProperty(t,"AbstractMessageWriter",{enumerable:!0,get:function(){return u.AbstractMessageWriter}}),Object.defineProperty(t,"WriteableStreamMessageWriter",{enumerable:!0,get:function(){return u.WriteableStreamMessageWriter}});const d=r(9244);Object.defineProperty(t,"AbstractMessageBuffer",{enumerable:!0,get:function(){return d.AbstractMessageBuffer}});const p=r(577);Object.defineProperty(t,"ConnectionStrategy",{enumerable:!0,get:function(){return p.ConnectionStrategy}}),Object.defineProperty(t,"ConnectionOptions",{enumerable:!0,get:function(){return p.ConnectionOptions}}),Object.defineProperty(t,"NullLogger",{enumerable:!0,get:function(){return p.NullLogger}}),Object.defineProperty(t,"createMessageConnection",{enumerable:!0,get:function(){return p.createMessageConnection}}),Object.defineProperty(t,"ProgressToken",{enumerable:!0,get:function(){return p.ProgressToken}}),Object.defineProperty(t,"ProgressType",{enumerable:!0,get:function(){return p.ProgressType}}),Object.defineProperty(t,"Trace",{enumerable:!0,get:function(){return p.Trace}}),Object.defineProperty(t,"TraceValues",{enumerable:!0,get:function(){return p.TraceValues}}),Object.defineProperty(t,"TraceFormat",{enumerable:!0,get:function(){return p.TraceFormat}}),Object.defineProperty(t,"SetTraceNotification",{enumerable:!0,get:function(){return p.SetTraceNotification}}),Object.defineProperty(t,"LogTraceNotification",{enumerable:!0,get:function(){return p.LogTraceNotification}}),Object.defineProperty(t,"ConnectionErrors",{enumerable:!0,get:function(){return p.ConnectionErrors}}),Object.defineProperty(t,"ConnectionError",{enumerable:!0,get:function(){return p.ConnectionError}}),Object.defineProperty(t,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return p.CancellationReceiverStrategy}}),Object.defineProperty(t,"CancellationSenderStrategy",{enumerable:!0,get:function(){return p.CancellationSenderStrategy}}),Object.defineProperty(t,"CancellationStrategy",{enumerable:!0,get:function(){return p.CancellationStrategy}}),Object.defineProperty(t,"MessageStrategy",{enumerable:!0,get:function(){return p.MessageStrategy}});const h=r(9590);t.RAL=h.default},9850(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;const n=r(9590),o=r(8585),i=r(2676);var s;!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:i.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:i.Event.None}),e.is=function(t){const r=t;return r&&(r===e.None||r===e.Cancelled||o.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}}(s=t.CancellationToken||(t.CancellationToken={}));const a=Object.freeze(function(e,t){const r=(0,n.default)().timer.setTimeout(e.bind(t),0);return{dispose(){r.dispose()}}});class c{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?a:(this._emitter||(this._emitter=new i.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}}t.CancellationTokenSource=class{get token(){return this._token||(this._token=new c),this._token}cancel(){this._token?this._token.cancel():this._token=s.Cancelled}dispose(){this._token?this._token instanceof c&&this._token.dispose():this._token=s.None}}},577(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.ConnectionOptions=t.MessageStrategy=t.CancellationStrategy=t.CancellationSenderStrategy=t.CancellationReceiverStrategy=t.RequestCancellationReceiverStrategy=t.IdCancellationReceiverStrategy=t.ConnectionStrategy=t.ConnectionError=t.ConnectionErrors=t.LogTraceNotification=t.SetTraceNotification=t.TraceFormat=t.TraceValues=t.Trace=t.NullLogger=t.ProgressType=t.ProgressToken=void 0;const n=r(9590),o=r(8585),i=r(6177),s=r(3352),a=r(2676),c=r(9850);var l,u,d,p,h,f,g,m,v,y,S,w,E,_,b,P,T,C;!function(e){e.type=new i.NotificationType("$/cancelRequest")}(l||(l={})),function(e){e.is=function(e){return"string"==typeof e||"number"==typeof e}}(u=t.ProgressToken||(t.ProgressToken={})),function(e){e.type=new i.NotificationType("$/progress")}(d||(d={})),t.ProgressType=class{constructor(){}},function(e){e.is=function(e){return o.func(e)}}(p||(p={})),t.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}}),function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Compact=2]="Compact",e[e.Verbose=3]="Verbose"}(h=t.Trace||(t.Trace={})),(C=t.TraceValues||(t.TraceValues={})).Off="off",C.Messages="messages",C.Compact="compact",C.Verbose="verbose",function(e){e.fromString=function(t){if(!o.string(t))return e.Off;switch(t=t.toLowerCase()){case"off":default:return e.Off;case"messages":return e.Messages;case"compact":return e.Compact;case"verbose":return e.Verbose}},e.toString=function(t){switch(t){case e.Off:return"off";case e.Messages:return"messages";case e.Compact:return"compact";case e.Verbose:return"verbose";default:return"off"}}}(h=t.Trace||(t.Trace={})),function(e){e.Text="text",e.JSON="json"}(t.TraceFormat||(t.TraceFormat={})),function(e){e.fromString=function(t){return o.string(t)&&"json"===(t=t.toLowerCase())?e.JSON:e.Text}}(f=t.TraceFormat||(t.TraceFormat={})),function(e){e.type=new i.NotificationType("$/setTrace")}(g=t.SetTraceNotification||(t.SetTraceNotification={})),function(e){e.type=new i.NotificationType("$/logTrace")}(m=t.LogTraceNotification||(t.LogTraceNotification={})),function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"}(v=t.ConnectionErrors||(t.ConnectionErrors={}));class I extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,I.prototype)}}t.ConnectionError=I,function(e){e.is=function(e){const t=e;return t&&o.func(t.cancelUndispatched)}}(y=t.ConnectionStrategy||(t.ConnectionStrategy={})),function(e){e.is=function(e){const t=e;return t&&(void 0===t.kind||"id"===t.kind)&&o.func(t.createCancellationTokenSource)&&(void 0===t.dispose||o.func(t.dispose))}}(S=t.IdCancellationReceiverStrategy||(t.IdCancellationReceiverStrategy={})),function(e){e.is=function(e){const t=e;return t&&"request"===t.kind&&o.func(t.createCancellationTokenSource)&&(void 0===t.dispose||o.func(t.dispose))}}(w=t.RequestCancellationReceiverStrategy||(t.RequestCancellationReceiverStrategy={})),function(e){e.Message=Object.freeze({createCancellationTokenSource:e=>new c.CancellationTokenSource}),e.is=function(e){return S.is(e)||w.is(e)}}(E=t.CancellationReceiverStrategy||(t.CancellationReceiverStrategy={})),function(e){e.Message=Object.freeze({sendCancellation:(e,t)=>e.sendNotification(l.type,{id:t}),cleanup(e){}}),e.is=function(e){const t=e;return t&&o.func(t.sendCancellation)&&o.func(t.cleanup)}}(_=t.CancellationSenderStrategy||(t.CancellationSenderStrategy={})),function(e){e.Message=Object.freeze({receiver:E.Message,sender:_.Message}),e.is=function(e){const t=e;return t&&E.is(t.receiver)&&_.is(t.sender)}}(b=t.CancellationStrategy||(t.CancellationStrategy={})),function(e){e.is=function(e){const t=e;return t&&o.func(t.handleMessage)}}(P=t.MessageStrategy||(t.MessageStrategy={})),(t.ConnectionOptions||(t.ConnectionOptions={})).is=function(e){const t=e;return t&&(b.is(t.cancellationStrategy)||y.is(t.connectionStrategy)||P.is(t.messageStrategy))},function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"}(T||(T={})),t.createMessageConnection=function(e,r,y,w){const E=void 0!==y?y:t.NullLogger;let _=0,C=0,O=0;const N="2.0";let R;const A=new Map;let D;const x=new Map,k=new Map;let j,M,L=new s.LinkedMap,F=new Map,U=new Set,$=new Map,B=h.Off,V=f.Text,H=T.New;const q=new a.Emitter,z=new a.Emitter,W=new a.Emitter,G=new a.Emitter,K=new a.Emitter,X=w&&w.cancellationStrategy?w.cancellationStrategy:b.Message;function J(e){if(null===e)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+e.toString()}function Q(e){}function Y(){return H===T.Listening}function Z(){return H===T.Closed}function ee(){return H===T.Disposed}function te(){H!==T.New&&H!==T.Listening||(H=T.Closed,z.fire(void 0))}function re(){j||0===L.size||(j=(0,n.default)().timer.setImmediate(()=>{j=void 0,function(){if(0===L.size)return;const e=L.shift();try{const t=w?.messageStrategy;P.is(t)?t.handleMessage(e,ne):ne(e)}finally{re()}}()}))}function ne(e){i.Message.isRequest(e)?function(e){if(ee())return;function t(t,n,o){const s={jsonrpc:N,id:e.id};t instanceof i.ResponseError?s.error=t.toJson():s.result=void 0===t?null:t,se(s,n,o),r.write(s).catch(()=>E.error("Sending response failed."))}function n(t,n,o){const i={jsonrpc:N,id:e.id,error:t.toJson()};se(i,n,o),r.write(i).catch(()=>E.error("Sending response failed."))}!function(e){if(B!==h.Off&&M)if(V===f.Text){let t;B!==h.Verbose&&B!==h.Compact||!e.params||(t=`Params: ${ie(e.params)}\n\n`),M.log(`Received request '${e.method} - (${e.id})'.`,t)}else ce("receive-request",e)}(e);const s=A.get(e.method);let a,c;s&&(a=s.type,c=s.handler);const l=Date.now();if(c||R){const s=e.id??String(Date.now()),u=S.is(X.receiver)?X.receiver.createCancellationTokenSource(s):X.receiver.createCancellationTokenSource(e);null!==e.id&&U.has(e.id)&&u.cancel(),null!==e.id&&$.set(s,u);try{let d;if(c)if(void 0===e.params){if(void 0!==a&&0!==a.numberOfParams)return void n(new i.ResponseError(i.ErrorCodes.InvalidParams,`Request ${e.method} defines ${a.numberOfParams} params but received none.`),e.method,l);d=c(u.token)}else if(Array.isArray(e.params)){if(void 0!==a&&a.parameterStructures===i.ParameterStructures.byName)return void n(new i.ResponseError(i.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by name but received parameters by position`),e.method,l);d=c(...e.params,u.token)}else{if(void 0!==a&&a.parameterStructures===i.ParameterStructures.byPosition)return void n(new i.ResponseError(i.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by position but received parameters by name`),e.method,l);d=c(e.params,u.token)}else R&&(d=R(e.method,e.params,u.token));const p=d;d?p.then?p.then(r=>{$.delete(s),t(r,e.method,l)},t=>{$.delete(s),t instanceof i.ResponseError?n(t,e.method,l):t&&o.string(t.message)?n(new i.ResponseError(i.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,l):n(new i.ResponseError(i.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,l)}):($.delete(s),t(d,e.method,l)):($.delete(s),function(t,n,o){void 0===t&&(t=null);const i={jsonrpc:N,id:e.id,result:t};se(i,n,o),r.write(i).catch(()=>E.error("Sending response failed."))}(d,e.method,l))}catch(r){$.delete(s),r instanceof i.ResponseError?t(r,e.method,l):r&&o.string(r.message)?n(new i.ResponseError(i.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${r.message}`),e.method,l):n(new i.ResponseError(i.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,l)}}else n(new i.ResponseError(i.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,l)}(e):i.Message.isNotification(e)?function(e){if(ee())return;let t,r;if(e.method===l.type.method){const t=e.params.id;return U.delete(t),void ae(e)}{const n=x.get(e.method);n&&(r=n.handler,t=n.type)}if(r||D)try{if(ae(e),r)if(void 0===e.params)void 0!==t&&0!==t.numberOfParams&&t.parameterStructures!==i.ParameterStructures.byName&&E.error(`Notification ${e.method} defines ${t.numberOfParams} params but received none.`),r();else if(Array.isArray(e.params)){const n=e.params;e.method===d.type.method&&2===n.length&&u.is(n[0])?r({token:n[0],value:n[1]}):(void 0!==t&&(t.parameterStructures===i.ParameterStructures.byName&&E.error(`Notification ${e.method} defines parameters by name but received parameters by position`),t.numberOfParams!==e.params.length&&E.error(`Notification ${e.method} defines ${t.numberOfParams} params but received ${n.length} arguments`)),r(...n))}else void 0!==t&&t.parameterStructures===i.ParameterStructures.byPosition&&E.error(`Notification ${e.method} defines parameters by position but received parameters by name`),r(e.params);else D&&D(e.method,e.params)}catch(t){t.message?E.error(`Notification handler '${e.method}' failed with message: ${t.message}`):E.error(`Notification handler '${e.method}' failed unexpectedly.`)}else W.fire(e)}(e):i.Message.isResponse(e)?function(e){if(!ee())if(null===e.id)e.error?E.error(`Received response message without id: Error is: \n${JSON.stringify(e.error,void 0,4)}`):E.error("Received response message without id. No further error information provided.");else{const t=e.id,r=F.get(t);if(function(e,t){if(B!==h.Off&&M)if(V===f.Text){let r;if(B!==h.Verbose&&B!==h.Compact||(e.error&&e.error.data?r=`Error data: ${ie(e.error.data)}\n\n`:e.result?r=`Result: ${ie(e.result)}\n\n`:void 0===e.error&&(r="No result returned.\n\n")),t){const n=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:"";M.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${n}`,r)}else M.log(`Received response ${e.id} without active response promise.`,r)}else ce("receive-response",e)}(e,r),void 0!==r){F.delete(t);try{if(e.error){const t=e.error;r.reject(new i.ResponseError(t.code,t.message,t.data))}else{if(void 0===e.result)throw new Error("Should never happen.");r.resolve(e.result)}}catch(e){e.message?E.error(`Response handler '${r.method}' failed with message: ${e.message}`):E.error(`Response handler '${r.method}' failed unexpectedly.`)}}}}(e):function(e){if(!e)return void E.error("Received empty message.");E.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(e,null,4)}`);const t=e;if(o.string(t.id)||o.number(t.id)){const e=t.id,r=F.get(e);r&&r.reject(new Error("The received response has neither a result nor an error property."))}}(e)}e.onClose(te),e.onError(function(e){q.fire([e,void 0,void 0])}),r.onClose(te),r.onError(function(e){q.fire(e)});const oe=e=>{try{if(i.Message.isNotification(e)&&e.method===l.type.method){const t=e.params.id,n=J(t),o=L.get(n);if(i.Message.isRequest(o)){const i=w?.connectionStrategy,s=i&&i.cancelUndispatched?i.cancelUndispatched(o,Q):void 0;if(s&&(void 0!==s.error||void 0!==s.result))return L.delete(n),$.delete(t),s.id=o.id,se(s,e.method,Date.now()),void r.write(s).catch(()=>E.error("Sending response for canceled message failed."))}const s=$.get(t);if(void 0!==s)return s.cancel(),void ae(e);U.add(t)}!function(e,t){var r;i.Message.isRequest(t)?e.set(J(t.id),t):i.Message.isResponse(t)?e.set(null===(r=t.id)?"res-unknown-"+(++O).toString():"res-"+r.toString(),t):e.set("not-"+(++C).toString(),t)}(L,e)}finally{re()}};function ie(e){if(null!=e)switch(B){case h.Verbose:return JSON.stringify(e,null,4);case h.Compact:return JSON.stringify(e);default:return}}function se(e,t,r){if(B!==h.Off&&M)if(V===f.Text){let n;B!==h.Verbose&&B!==h.Compact||(e.error&&e.error.data?n=`Error data: ${ie(e.error.data)}\n\n`:e.result?n=`Result: ${ie(e.result)}\n\n`:void 0===e.error&&(n="No result returned.\n\n")),M.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-r}ms`,n)}else ce("send-response",e)}function ae(e){if(B!==h.Off&&M&&e.method!==m.type.method)if(V===f.Text){let t;B!==h.Verbose&&B!==h.Compact||(t=e.params?`Params: ${ie(e.params)}\n\n`:"No parameters provided.\n\n"),M.log(`Received notification '${e.method}'.`,t)}else ce("receive-notification",e)}function ce(e,t){if(!M||B===h.Off)return;const r={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};M.log(r)}function le(){if(Z())throw new I(v.Closed,"Connection is closed.");if(ee())throw new I(v.Disposed,"Connection is disposed.")}function ue(e){return void 0===e?null:e}function de(e){return null===e?void 0:e}function pe(e){return null!=e&&!Array.isArray(e)&&"object"==typeof e}function he(e,t){switch(e){case i.ParameterStructures.auto:return pe(t)?de(t):[ue(t)];case i.ParameterStructures.byName:if(!pe(t))throw new Error("Received parameters by name but param is not an object literal.");return de(t);case i.ParameterStructures.byPosition:return[ue(t)];default:throw new Error(`Unknown parameter structure ${e.toString()}`)}}function fe(e,t){let r;const n=e.numberOfParams;switch(n){case 0:r=void 0;break;case 1:r=he(e.parameterStructures,t[0]);break;default:r=[];for(let e=0;e<t.length&&e<n;e++)r.push(ue(t[e]));if(t.length<n)for(let e=t.length;e<n;e++)r.push(null)}return r}const ge={sendNotification:(e,...t)=>{let n,s;if(le(),o.string(e)){n=e;const r=t[0];let o=0,a=i.ParameterStructures.auto;i.ParameterStructures.is(r)&&(o=1,a=r);let c=t.length;const l=c-o;switch(l){case 0:s=void 0;break;case 1:s=he(a,t[o]);break;default:if(a===i.ParameterStructures.byName)throw new Error(`Received ${l} parameters for 'by Name' notification parameter structure.`);s=t.slice(o,c).map(e=>ue(e))}}else{const r=t;n=e.method,s=fe(e,r)}const a={jsonrpc:N,method:n,params:s};return function(e){if(B!==h.Off&&M)if(V===f.Text){let t;B!==h.Verbose&&B!==h.Compact||(t=e.params?`Params: ${ie(e.params)}\n\n`:"No parameters provided.\n\n"),M.log(`Sending notification '${e.method}'.`,t)}else ce("send-notification",e)}(a),r.write(a).catch(e=>{throw E.error("Sending notification failed."),e})},onNotification:(e,t)=>{let r;return le(),o.func(e)?D=e:t&&(o.string(e)?(r=e,x.set(e,{type:void 0,handler:t})):(r=e.method,x.set(e.method,{type:e,handler:t}))),{dispose:()=>{void 0!==r?x.delete(r):D=void 0}}},onProgress:(e,t,r)=>{if(k.has(t))throw new Error(`Progress handler for token ${t} already registered`);return k.set(t,r),{dispose:()=>{k.delete(t)}}},sendProgress:(e,t,r)=>ge.sendNotification(d.type,{token:t,value:r}),onUnhandledProgress:G.event,sendRequest:(e,...t)=>{let n,s,a;if(le(),function(){if(!Y())throw new Error("Call listen() first.")}(),o.string(e)){n=e;const r=t[0],o=t[t.length-1];let l=0,u=i.ParameterStructures.auto;i.ParameterStructures.is(r)&&(l=1,u=r);let d=t.length;c.CancellationToken.is(o)&&(d-=1,a=o);const p=d-l;switch(p){case 0:s=void 0;break;case 1:s=he(u,t[l]);break;default:if(u===i.ParameterStructures.byName)throw new Error(`Received ${p} parameters for 'by Name' request parameter structure.`);s=t.slice(l,d).map(e=>ue(e))}}else{const r=t;n=e.method,s=fe(e,r);const o=e.numberOfParams;a=c.CancellationToken.is(r[o])?r[o]:void 0}const l=_++;let u;a&&(u=a.onCancellationRequested(()=>{const e=X.sender.sendCancellation(ge,l);return void 0===e?(E.log(`Received no promise from cancellation strategy when cancelling id ${l}`),Promise.resolve()):e.catch(()=>{E.log(`Sending cancellation messages for id ${l} failed`)})}));const d={jsonrpc:N,id:l,method:n,params:s};return function(e){if(B!==h.Off&&M)if(V===f.Text){let t;B!==h.Verbose&&B!==h.Compact||!e.params||(t=`Params: ${ie(e.params)}\n\n`),M.log(`Sending request '${e.method} - (${e.id})'.`,t)}else ce("send-request",e)}(d),"function"==typeof X.sender.enableCancellation&&X.sender.enableCancellation(d),new Promise(async(e,t)=>{const o={method:n,timerStart:Date.now(),resolve:t=>{e(t),X.sender.cleanup(l),u?.dispose()},reject:e=>{t(e),X.sender.cleanup(l),u?.dispose()}};try{await r.write(d),F.set(l,o)}catch(e){throw E.error("Sending request failed."),o.reject(new i.ResponseError(i.ErrorCodes.MessageWriteError,e.message?e.message:"Unknown reason")),e}})},onRequest:(e,t)=>{le();let r=null;return p.is(e)?(r=void 0,R=e):o.string(e)?(r=null,void 0!==t&&(r=e,A.set(e,{handler:t,type:void 0}))):void 0!==t&&(r=e.method,A.set(e.method,{type:e,handler:t})),{dispose:()=>{null!==r&&(void 0!==r?A.delete(r):R=void 0)}}},hasPendingResponse:()=>F.size>0,trace:async(e,t,r)=>{let n=!1,i=f.Text;void 0!==r&&(o.boolean(r)?n=r:(n=r.sendNotification||!1,i=r.traceFormat||f.Text)),B=e,V=i,M=B===h.Off?void 0:t,!n||Z()||ee()||await ge.sendNotification(g.type,{value:h.toString(e)})},onError:q.event,onClose:z.event,onUnhandledNotification:W.event,onDispose:K.event,end:()=>{r.end()},dispose:()=>{if(ee())return;H=T.Disposed,K.fire(void 0);const t=new i.ResponseError(i.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(const e of F.values())e.reject(t);F=new Map,$=new Map,U=new Set,L=new s.LinkedMap,o.func(r.dispose)&&r.dispose(),o.func(e.dispose)&&e.dispose()},listen:()=>{le(),function(){if(Y())throw new I(v.AlreadyListening,"Connection is already listening")}(),H=T.Listening,e.listen(oe)},inspect:()=>{(0,n.default)().console.log("inspect")}};return ge.onNotification(m.type,e=>{if(B===h.Off||!M)return;const t=B===h.Verbose||B===h.Compact;M.log(e.message,t?e.verbose:void 0)}),ge.onNotification(d.type,e=>{const t=k.get(e.token);t?t(e.value):G.fire(e)}),ge}},4019(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Disposable=void 0,(t.Disposable||(t.Disposable={})).create=function(e){return{dispose:e}}},2676(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;const n=r(9590);!function(e){const t={dispose(){}};e.None=function(){return t}}(t.Event||(t.Event={}));class o{add(e,t=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(r)&&r.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(!this._callbacks)return;let r=!1;for(let n=0,o=this._callbacks.length;n<o;n++)if(this._callbacks[n]===e){if(this._contexts[n]===t)return this._callbacks.splice(n,1),void this._contexts.splice(n,1);r=!0}if(r)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...e){if(!this._callbacks)return[];const t=[],r=this._callbacks.slice(0),o=this._contexts.slice(0);for(let i=0,s=r.length;i<s;i++)try{t.push(r[i].apply(o[i],e))}catch(e){(0,n.default)().console.error(e)}return t}isEmpty(){return!this._callbacks||0===this._callbacks.length}dispose(){this._callbacks=void 0,this._contexts=void 0}}class i{constructor(e){this._options=e}get event(){return this._event||(this._event=(e,t,r)=>{this._callbacks||(this._callbacks=new o),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);const n={dispose:()=>{this._callbacks&&(this._callbacks.remove(e,t),n.dispose=i._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(r)&&r.push(n),n}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}t.Emitter=i,i._noop=function(){}},8585(e,t){"use strict";function r(e){return"string"==typeof e||e instanceof String}function n(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,t.boolean=function(e){return!0===e||!1===e},t.string=r,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=n,t.stringArray=function(e){return n(e)&&e.every(e=>r(e))}},3352(e,t){"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.LRUCache=t.LinkedMap=t.Touch=void 0,function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last}(n=t.Touch||(t.Touch={}));class o{constructor(){this[r]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=n.None){const r=this._map.get(e);if(r)return t!==n.None&&this.touch(r,t),r.value}set(e,t,r=n.None){let o=this._map.get(e);if(o)o.value=t,r!==n.None&&this.touch(o,r);else{switch(o={key:e,value:t,next:void 0,previous:void 0},r){case n.None:this.addItemLast(o);break;case n.First:this.addItemFirst(o);break;case n.Last:default:this.addItemLast(o)}this._map.set(e,o),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){const r=this._state;let n=this._head;for(;n;){if(t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");n=n.next}}keys(){const e=this._state;let t=this._head;const r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.key,done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return r}values(){const e=this._state;let t=this._head;const r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:t.value,done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return r}entries(){const e=this._state;let t=this._head;const r={[Symbol.iterator]:()=>r,next:()=>{if(this._state!==e)throw new Error("LinkedMap got modified during iteration.");if(t){const e={value:[t.key,t.value],done:!1};return t=t.next,e}return{value:void 0,done:!0}}};return r}[(r=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(0===e)return void this.clear();let t=this._head,r=this.size;for(;t&&r>e;)this._map.delete(t.key),t=t.next,r--;this._head=t,this._size=r,t&&(t.previous=void 0),this._state++}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e,this._state++}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const t=e.next,r=e.previous;if(!t||!r)throw new Error("Invalid list");t.previous=r,r.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(t===n.First||t===n.Last)if(t===n.First){if(e===this._head)return;const t=e.next,r=e.previous;e===this._tail?(r.next=void 0,this._tail=r):(t.previous=r,r.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===n.Last){if(e===this._tail)return;const t=e.next,r=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=r,r.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}toJSON(){const e=[];return this.forEach((t,r)=>{e.push([r,t])}),e}fromJSON(e){this.clear();for(const[t,r]of e)this.set(t,r)}}t.LinkedMap=o,t.LRUCache=class extends o{constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=n.AsNew){return super.get(e,t)}peek(e){return super.get(e,n.None)}set(e,t){return super.set(e,t,n.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}},9244(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractMessageBuffer=void 0,t.AbstractMessageBuffer=class{constructor(e="utf-8"){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){const t="string"==typeof e?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(e=!1){if(0===this._chunks.length)return;let t=0,r=0,n=0,o=0;e:for(;r<this._chunks.length;){const e=this._chunks[r];for(n=0;n<e.length;){switch(e[n]){case 13:switch(t){case 0:t=1;break;case 2:t=3;break;default:t=0}break;case 10:switch(t){case 1:t=2;break;case 3:t=4,n++;break e;default:t=0}break;default:t=0}n++}o+=e.byteLength,r++}if(4!==t)return;const i=this._read(o+n),s=new Map,a=this.toString(i,"ascii").split("\r\n");if(a.length<2)return s;for(let t=0;t<a.length-2;t++){const r=a[t],n=r.indexOf(":");if(-1===n)throw new Error("Message header must separate key and value using :");const o=r.substr(0,n),i=r.substr(n+1).trim();s.set(e?o.toLowerCase():o,i)}return s}tryReadBody(e){if(!(this._totalLength<e))return this._read(e)}get numberOfBytes(){return this._totalLength}_read(e){if(0===e)return this.emptyBuffer();if(e>this._totalLength)throw new Error("Cannot read so many bytes!");if(this._chunks[0].byteLength===e){const t=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(t)}if(this._chunks[0].byteLength>e){const t=this._chunks[0],r=this.asNative(t,e);return this._chunks[0]=t.slice(e),this._totalLength-=e,r}const t=this.allocNative(e);let r=0;for(;e>0;){const n=this._chunks[0];if(n.byteLength>e){const o=n.slice(0,e);t.set(o,r),r+=e,this._chunks[0]=n.slice(e),this._totalLength-=e,e-=e}else t.set(n,r),r+=n.byteLength,this._chunks.shift(),this._totalLength-=n.byteLength,e-=n.byteLength}return t}}},9085(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReadableStreamMessageReader=t.AbstractMessageReader=t.MessageReader=void 0;const n=r(9590),o=r(8585),i=r(2676),s=r(4323);var a;(t.MessageReader||(t.MessageReader={})).is=function(e){let t=e;return t&&o.func(t.listen)&&o.func(t.dispose)&&o.func(t.onError)&&o.func(t.onClose)&&o.func(t.onPartialMessage)};class c{constructor(){this.errorEmitter=new i.Emitter,this.closeEmitter=new i.Emitter,this.partialMessageEmitter=new i.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader received error. Reason: ${o.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageReader=c,function(e){e.fromOptions=function(e){let t,r;const o=new Map;let i;const s=new Map;if(void 0===e||"string"==typeof e)t=e??"utf-8";else{if(t=e.charset??"utf-8",void 0!==e.contentDecoder&&(r=e.contentDecoder,o.set(r.name,r)),void 0!==e.contentDecoders)for(const t of e.contentDecoders)o.set(t.name,t);if(void 0!==e.contentTypeDecoder&&(i=e.contentTypeDecoder,s.set(i.name,i)),void 0!==e.contentTypeDecoders)for(const t of e.contentTypeDecoders)s.set(t.name,t)}return void 0===i&&(i=(0,n.default)().applicationJson.decoder,s.set(i.name,i)),{charset:t,contentDecoder:r,contentDecoders:o,contentTypeDecoder:i,contentTypeDecoders:s}}}(a||(a={})),t.ReadableStreamMessageReader=class extends c{constructor(e,t){super(),this.readable=e,this.options=a.fromOptions(t),this.buffer=(0,n.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new s.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;const t=this.readable.onData(e=>{this.onData(e)});return this.readable.onError(e=>this.fireError(e)),this.readable.onClose(()=>this.fireClose()),t}onData(e){for(this.buffer.append(e);;){if(-1===this.nextMessageLength){const e=this.buffer.tryReadHeaders(!0);if(!e)return;const t=e.get("content-length");if(!t)return void this.fireError(new Error("Header must provide a Content-Length property."));const r=parseInt(t);if(isNaN(r))return void this.fireError(new Error("Content-Length value must be a number."));this.nextMessageLength=r}const e=this.buffer.tryReadBody(this.nextMessageLength);if(void 0===e)return void this.setPartialMessageTimer();this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{const t=void 0!==this.options.contentDecoder?await this.options.contentDecoder.decode(e):e,r=await this.options.contentTypeDecoder.decode(t,this.options);this.callback(r)}).catch(e=>{this.fireError(e)})}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=(0,n.default)().timer.setTimeout((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}},3193(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WriteableStreamMessageWriter=t.AbstractMessageWriter=t.MessageWriter=void 0;const n=r(9590),o=r(8585),i=r(4323),s=r(2676);var a;(t.MessageWriter||(t.MessageWriter={})).is=function(e){let t=e;return t&&o.func(t.dispose)&&o.func(t.onClose)&&o.func(t.onError)&&o.func(t.write)};class c{constructor(){this.errorEmitter=new s.Emitter,this.closeEmitter=new s.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,r){this.errorEmitter.fire([this.asError(e),t,r])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer received error. Reason: ${o.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageWriter=c,function(e){e.fromOptions=function(e){return void 0===e||"string"==typeof e?{charset:e??"utf-8",contentTypeEncoder:(0,n.default)().applicationJson.encoder}:{charset:e.charset??"utf-8",contentEncoder:e.contentEncoder,contentTypeEncoder:e.contentTypeEncoder??(0,n.default)().applicationJson.encoder}}}(a||(a={})),t.WriteableStreamMessageWriter=class extends c{constructor(e,t){super(),this.writable=e,this.options=a.fromOptions(t),this.errorCount=0,this.writeSemaphore=new i.Semaphore(1),this.writable.onError(e=>this.fireError(e)),this.writable.onClose(()=>this.fireClose())}async write(e){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(e,this.options).then(e=>void 0!==this.options.contentEncoder?this.options.contentEncoder.encode(e):e).then(t=>{const r=[];return r.push("Content-Length: ",t.byteLength.toString(),"\r\n"),r.push("\r\n"),this.doWrite(e,r,t)},e=>{throw this.fireError(e),e}))}async doWrite(e,t,r){try{return await this.writable.write(t.join(""),"ascii"),this.writable.write(r)}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}}},6177(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Message=t.NotificationType9=t.NotificationType8=t.NotificationType7=t.NotificationType6=t.NotificationType5=t.NotificationType4=t.NotificationType3=t.NotificationType2=t.NotificationType1=t.NotificationType0=t.NotificationType=t.RequestType9=t.RequestType8=t.RequestType7=t.RequestType6=t.RequestType5=t.RequestType4=t.RequestType3=t.RequestType2=t.RequestType1=t.RequestType=t.RequestType0=t.AbstractMessageSignature=t.ParameterStructures=t.ResponseError=t.ErrorCodes=void 0;const n=r(8585);var o,i;!function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.jsonrpcReservedErrorRangeStart=-32099,e.serverErrorStart=-32099,e.MessageWriteError=-32099,e.MessageReadError=-32098,e.PendingResponseRejected=-32097,e.ConnectionInactive=-32096,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.jsonrpcReservedErrorRangeEnd=-32e3,e.serverErrorEnd=-32e3}(o=t.ErrorCodes||(t.ErrorCodes={}));class s extends Error{constructor(e,t,r){super(t),this.code=n.number(e)?e:o.UnknownErrorCode,this.data=r,Object.setPrototypeOf(this,s.prototype)}toJson(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data),e}}t.ResponseError=s;class a{constructor(e){this.kind=e}static is(e){return e===a.auto||e===a.byName||e===a.byPosition}toString(){return this.kind}}t.ParameterStructures=a,a.auto=new a("auto"),a.byPosition=new a("byPosition"),a.byName=new a("byName");class c{constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return a.auto}}t.AbstractMessageSignature=c,t.RequestType0=class extends c{constructor(e){super(e,0)}},t.RequestType=class extends c{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.RequestType1=class extends c{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.RequestType2=class extends c{constructor(e){super(e,2)}},t.RequestType3=class extends c{constructor(e){super(e,3)}},t.RequestType4=class extends c{constructor(e){super(e,4)}},t.RequestType5=class extends c{constructor(e){super(e,5)}},t.RequestType6=class extends c{constructor(e){super(e,6)}},t.RequestType7=class extends c{constructor(e){super(e,7)}},t.RequestType8=class extends c{constructor(e){super(e,8)}},t.RequestType9=class extends c{constructor(e){super(e,9)}},t.NotificationType=class extends c{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.NotificationType0=class extends c{constructor(e){super(e,0)}},t.NotificationType1=class extends c{constructor(e,t=a.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},t.NotificationType2=class extends c{constructor(e){super(e,2)}},t.NotificationType3=class extends c{constructor(e){super(e,3)}},t.NotificationType4=class extends c{constructor(e){super(e,4)}},t.NotificationType5=class extends c{constructor(e){super(e,5)}},t.NotificationType6=class extends c{constructor(e){super(e,6)}},t.NotificationType7=class extends c{constructor(e){super(e,7)}},t.NotificationType8=class extends c{constructor(e){super(e,8)}},t.NotificationType9=class extends c{constructor(e){super(e,9)}},(i=t.Message||(t.Message={})).isRequest=function(e){const t=e;return t&&n.string(t.method)&&(n.string(t.id)||n.number(t.id))},i.isNotification=function(e){const t=e;return t&&n.string(t.method)&&void 0===e.id},i.isResponse=function(e){const t=e;return t&&(void 0!==t.result||!!t.error)&&(n.string(t.id)||n.number(t.id)||null===t.id)}},9590(e,t){"use strict";let r;function n(){if(void 0===r)throw new Error("No runtime abstraction layer installed");return r}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.install=function(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");r=e}}(n||(n={})),t.default=n},4323(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Semaphore=void 0;const n=r(9590);t.Semaphore=class{constructor(e=1){if(e<=0)throw new Error("Capacity must be greater than 0");this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((t,r)=>{this._waiting.push({thunk:e,resolve:t,reject:r}),this.runNext()})}get active(){return this._active}runNext(){0!==this._waiting.length&&this._active!==this._capacity&&(0,n.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(0===this._waiting.length||this._active===this._capacity)return;const e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{const t=e.thunk();t instanceof Promise?t.then(t=>{this._active--,e.resolve(t),this.runNext()},t=>{this._active--,e.reject(t),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}}},4996(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SharedArrayReceiverStrategy=t.SharedArraySenderStrategy=void 0;const n=r(9850);var o;!function(e){e.Continue=0,e.Cancelled=1}(o||(o={})),t.SharedArraySenderStrategy=class{constructor(){this.buffers=new Map}enableCancellation(e){if(null===e.id)return;const t=new SharedArrayBuffer(4);new Int32Array(t,0,1)[0]=o.Continue,this.buffers.set(e.id,t),e.$cancellationData=t}async sendCancellation(e,t){const r=this.buffers.get(t);if(void 0===r)return;const n=new Int32Array(r,0,1);Atomics.store(n,0,o.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};class i{constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===o.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}}class s{constructor(e){this.token=new i(e)}cancel(){}dispose(){}}t.SharedArrayReceiverStrategy=class{constructor(){this.kind="request"}createCancellationTokenSource(e){const t=e.$cancellationData;return void 0===t?new n.CancellationTokenSource:new s(t)}}},7123(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.createServerSocketTransport=t.createClientSocketTransport=t.createServerPipeTransport=t.createClientPipeTransport=t.generateRandomPipeName=t.StreamMessageWriter=t.StreamMessageReader=t.SocketMessageWriter=t.SocketMessageReader=t.PortMessageWriter=t.PortMessageReader=t.IPCMessageWriter=t.IPCMessageReader=void 0;const i=r(9571);i.default.install();const s=r(6928),a=r(857),c=r(6982),l=r(9278),u=r(3281);o(r(3281),t);class d extends u.AbstractMessageReader{constructor(e){super(),this.process=e;let t=this.process;t.on("error",e=>this.fireError(e)),t.on("close",()=>this.fireClose())}listen(e){return this.process.on("message",e),u.Disposable.create(()=>this.process.off("message",e))}}t.IPCMessageReader=d;class p extends u.AbstractMessageWriter{constructor(e){super(),this.process=e,this.errorCount=0;const t=this.process;t.on("error",e=>this.fireError(e)),t.on("close",()=>this.fireClose)}write(e){try{return"function"==typeof this.process.send&&this.process.send(e,void 0,void 0,t=>{t?(this.errorCount++,this.handleError(t,e)):this.errorCount=0}),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}}t.IPCMessageWriter=p;class h extends u.AbstractMessageReader{constructor(e){super(),this.onData=new u.Emitter,e.on("close",()=>this.fireClose),e.on("error",e=>this.fireError(e)),e.on("message",e=>{this.onData.fire(e)})}listen(e){return this.onData.event(e)}}t.PortMessageReader=h;class f extends u.AbstractMessageWriter{constructor(e){super(),this.port=e,this.errorCount=0,e.on("close",()=>this.fireClose()),e.on("error",e=>this.fireError(e))}write(e){try{return this.port.postMessage(e),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}}t.PortMessageWriter=f;class g extends u.ReadableStreamMessageReader{constructor(e,t="utf-8"){super((0,i.default)().stream.asReadableStream(e),t)}}t.SocketMessageReader=g;class m extends u.WriteableStreamMessageWriter{constructor(e,t){super((0,i.default)().stream.asWritableStream(e),t),this.socket=e}dispose(){super.dispose(),this.socket.destroy()}}t.SocketMessageWriter=m;class v extends u.ReadableStreamMessageReader{constructor(e,t){super((0,i.default)().stream.asReadableStream(e),t)}}t.StreamMessageReader=v;class y extends u.WriteableStreamMessageWriter{constructor(e,t){super((0,i.default)().stream.asWritableStream(e),t)}}t.StreamMessageWriter=y;const S=process.env.XDG_RUNTIME_DIR,w=new Map([["linux",107],["darwin",103]]);t.generateRandomPipeName=function(){const e=(0,c.randomBytes)(21).toString("hex");if("win32"===process.platform)return`\\\\.\\pipe\\vscode-jsonrpc-${e}-sock`;let t;t=S?s.join(S,`vscode-ipc-${e}.sock`):s.join(a.tmpdir(),`vscode-${e}.sock`);const r=w.get(process.platform);return void 0!==r&&t.length>r&&(0,i.default)().console.warn(`WARNING: IPC handle "${t}" is longer than ${r} characters.`),t},t.createClientPipeTransport=function(e,t="utf-8"){let r;const n=new Promise((e,t)=>{r=e});return new Promise((o,i)=>{let s=(0,l.createServer)(e=>{s.close(),r([new g(e,t),new m(e,t)])});s.on("error",i),s.listen(e,()=>{s.removeListener("error",i),o({onConnected:()=>n})})})},t.createServerPipeTransport=function(e,t="utf-8"){const r=(0,l.createConnection)(e);return[new g(r,t),new m(r,t)]},t.createClientSocketTransport=function(e,t="utf-8"){let r;const n=new Promise((e,t)=>{r=e});return new Promise((o,i)=>{const s=(0,l.createServer)(e=>{s.close(),r([new g(e,t),new m(e,t)])});s.on("error",i),s.listen(e,"127.0.0.1",()=>{s.removeListener("error",i),o({onConnected:()=>n})})})},t.createServerSocketTransport=function(e,t="utf-8"){const r=(0,l.createConnection)(e,"127.0.0.1");return[new g(r,t),new m(r,t)]},t.createMessageConnection=function(e,t,r,n){r||(r=u.NullLogger);const o=function(e){const t=e;return void 0!==t.read&&void 0!==t.addListener}(e)?new v(e):e,i=function(e){const t=e;return void 0!==t.write&&void 0!==t.addListener}(t)?new y(t):t;return u.ConnectionStrategy.is(n)&&(n={connectionStrategy:n}),(0,u.createMessageConnection)(o,i,r,n)}},9571(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9023),o=r(3281);class i extends o.AbstractMessageBuffer{constructor(e="utf-8"){super(e)}emptyBuffer(){return i.emptyBuffer}fromString(e,t){return Buffer.from(e,t)}toString(e,t){return e instanceof Buffer?e.toString(t):new n.TextDecoder(t).decode(e)}asNative(e,t){return void 0===t?e instanceof Buffer?e:Buffer.from(e):e instanceof Buffer?e.slice(0,t):Buffer.from(e,0,t)}allocNative(e){return Buffer.allocUnsafe(e)}}i.emptyBuffer=Buffer.allocUnsafe(0);class s{constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),o.Disposable.create(()=>this.stream.off("close",e))}onError(e){return this.stream.on("error",e),o.Disposable.create(()=>this.stream.off("error",e))}onEnd(e){return this.stream.on("end",e),o.Disposable.create(()=>this.stream.off("end",e))}onData(e){return this.stream.on("data",e),o.Disposable.create(()=>this.stream.off("data",e))}}class a{constructor(e){this.stream=e}onClose(e){return this.stream.on("close",e),o.Disposable.create(()=>this.stream.off("close",e))}onError(e){return this.stream.on("error",e),o.Disposable.create(()=>this.stream.off("error",e))}onEnd(e){return this.stream.on("end",e),o.Disposable.create(()=>this.stream.off("end",e))}write(e,t){return new Promise((r,n)=>{const o=e=>{null==e?r():n(e)};"string"==typeof e?this.stream.write(e,t,o):this.stream.write(e,o)})}end(){this.stream.end()}}const c=Object.freeze({messageBuffer:Object.freeze({create:e=>new i(e)}),applicationJson:Object.freeze({encoder:Object.freeze({name:"application/json",encode:(e,t)=>{try{return Promise.resolve(Buffer.from(JSON.stringify(e,void 0,0),t.charset))}catch(e){return Promise.reject(e)}}}),decoder:Object.freeze({name:"application/json",decode:(e,t)=>{try{return e instanceof Buffer?Promise.resolve(JSON.parse(e.toString(t.charset))):Promise.resolve(JSON.parse(new n.TextDecoder(t.charset).decode(e)))}catch(e){return Promise.reject(e)}}})}),stream:Object.freeze({asReadableStream:e=>new s(e),asWritableStream:e=>new a(e)}),console,timer:Object.freeze({setTimeout(e,t,...r){const n=setTimeout(e,t,...r);return{dispose:()=>clearTimeout(n)}},setImmediate(e,...t){const r=setImmediate(e,...t);return{dispose:()=>clearImmediate(r)}},setInterval(e,t,...r){const n=setInterval(e,t,...r);return{dispose:()=>clearInterval(n)}}})});function l(){return c}!function(e){e.install=function(){o.RAL.install(c)}}(l||(l={})),t.default=l},2067(e,t,r){"use strict";e.exports=r(7123)},9768(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PROJECT_DETAILS_VIEW_MIGRATION_MD_PATH=t.DOTNET67_OUT_OF_SUPPORT_MD_PATH=t.GITHUB_BUG_2266_DISABLE_SOLUTION_URL=t.NET_SDK_CSFILE_DEBUG_SUPPORT=t.AZUREFUNCTION_EXTENSION_API_REQUIRED_VERSION=t.AZUREFUNCTION_EXTENSION_REQUIRED_VERSION=t.AZUREFUNCTION_EXTENSION_ID=t.MAUI_WORKLOAD_URL=t.MAUI_EXTENSION_URL=t.MAUI_EXTENSION_ID=t.NET_SDK_VERSION_SUPPORTING_SLNX=t.NET_SDK_MINIMUM_SUPPORTED_VERSION=t.NET_SDK_SUPPORTED_PREVIEW_RUNTIME_MIN_VERSION=t.NET_RUNTIME_VERSION_PATCH=t.NET_RUNTIME_VERSION=t.CSHARP_EXTENSION_TERMINATE_ASPIRE_REQUIRED_VERSION=t.CSHARP_EXTENSION_AZ_FUNCTIONS_REQUIRED_VERSION=t.CSHARP_EXTENSION_BLAZORWASM_REQUIRED_VERSION=t.CSHARP_EXTENSION_SUPPORTS_DEFERRAL_VERSION=t.CSHARP_EXTENSION_REQUIRED_VERSION=t.CSHARP_EXTENSION_ID=t.LICENSE_URL=t.EXTENSION_ID=void 0,t.EXTENSION_ID="ms-dotnettools.csdevkit",t.LICENSE_URL="https://aka.ms/vs/csdevkit/license",t.CSHARP_EXTENSION_ID="ms-dotnettools.csharp",t.CSHARP_EXTENSION_REQUIRED_VERSION="2.0.0",t.CSHARP_EXTENSION_SUPPORTS_DEFERRAL_VERSION="2.4.0",t.CSHARP_EXTENSION_BLAZORWASM_REQUIRED_VERSION="2.0.2",t.CSHARP_EXTENSION_AZ_FUNCTIONS_REQUIRED_VERSION="2.55.0",t.CSHARP_EXTENSION_TERMINATE_ASPIRE_REQUIRED_VERSION="2.87.0",t.NET_RUNTIME_VERSION="10.0",t.NET_RUNTIME_VERSION_PATCH="5",t.NET_SDK_SUPPORTED_PREVIEW_RUNTIME_MIN_VERSION="10.0.105",t.NET_SDK_MINIMUM_SUPPORTED_VERSION="8.0",t.NET_SDK_VERSION_SUPPORTING_SLNX="9.0.200",t.MAUI_EXTENSION_ID="ms-dotnettools.dotnet-maui",t.MAUI_EXTENSION_URL="https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.dotnet-maui",t.MAUI_WORKLOAD_URL="https://learn.microsoft.com/dotnet/maui/get-started/installation?tabs=visual-studio-code#install-net-and-net-maui-workloads",t.AZUREFUNCTION_EXTENSION_ID="ms-azuretools.vscode-azurefunctions",t.AZUREFUNCTION_EXTENSION_REQUIRED_VERSION="1.15.5",t.AZUREFUNCTION_EXTENSION_API_REQUIRED_VERSION="^1.10.0",t.NET_SDK_CSFILE_DEBUG_SUPPORT="10.0.0",t.GITHUB_BUG_2266_DISABLE_SOLUTION_URL="https://github.com/microsoft/vscode-dotnettools/issues/2266#issuecomment-3373048619",t.DOTNET67_OUT_OF_SUPPORT_MD_PATH="contents/Retiring-dotnet67-sdk-support.md",t.PROJECT_DETAILS_VIEW_MIGRATION_MD_PATH="media/WBD-hybrid announcement.md"},293(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CustomBuildTaskTerminal=void 0;const n=r(1398),o=r(5317),i=r(3119),s=r(857),a=r(7383),c=r(680),l=r(5033);t.CustomBuildTaskTerminal=class{command;args;cwd;dotnetTaskDefinition;writeEmitter=new n.EventEmitter;onDidWrite=this.writeEmitter.event;closeEmitter=new n.EventEmitter;onDidClose=this.closeEmitter.event;constructor(e,t,r,n){this.command=e,this.args=t,this.cwd=r,this.dotnetTaskDefinition=n}async open(e){const t=this.dotnetTaskDefinition.file;if(!this.dotnetTaskDefinition.rejoinAspireSession){const e=await this.executeBuild();return void this.closeEmitter.fire(e??1)}{c.logger.log("Aspire session rejoin is enabled.");const e=(await(0,a.queryActiveAspireSessionsAsync)()).filter(e=>e.projectInfo?.projectPath?.toLowerCase()===t?.toLowerCase());await(0,a.stopAspireSessionsAsync)(e);const r=await this.executeBuild();await(0,a.rejoinAspireSessionsAsync)(e),c.logger.log(`Rejoined ${e.length} aspire session(s).`,l.LogImportance.low),this.closeEmitter.fire(r??1)}}close(){}async executeBuild(){let e="dotnet "+this.args.join(" ");this.writeEmitter.fire(e+" \r\n"),this.writeEmitter.fire("C# extension build result service is available.\r\n"),(0,i.startBuildResultServiceAsync)();let t="",r="";return new Promise(e=>{const s=o.spawn(this.command,this.args,{cwd:this.cwd,env:{...process.env,DOTNET_CLI_UI_LANGUAGE:n.env.language}});s.stdout.on("data",e=>{t=t.concat(e);let r=this.formatResult(e);this.writeEmitter.fire(r)}),s.stderr.on("data",e=>{r=r.concat(e);let t=this.formatResult(e);this.writeEmitter.fire(t)}),s.on("close",n=>{"true"===process.env.AUTOMATED_TESTING&&(c.logger.log(`Build exit code: ${n}`),c.logger.log(`Build output:\n${t}`,l.LogImportance.low),r&&c.logger.log(`Build stderr:\n${r}`,l.LogImportance.low)),(0,i.reportBuildResultsToCSharpExtension)(t),e(n??1)}),s.on("error",t=>{console.log(`child process exited with code ${t}`),e(1)})})}formatResult(e){return e.toString().replaceAll(s.EOL,"\n\r")}}},2963(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dotnetSolutionBuildActionUsingTask=t.getAllAspireAppHostProjects=t.getAllProjects=t.getOpenedWorkspaceHelper=t.DotnetTaskProvider=void 0;const n=r(1398),o=r(5125),i=r(7589),s=r(680),a=r(9409),c=r(293),l=r(3119),u="watch",d="rebuild",p="--no-incremental";class h{static dotnetType="dotnet";cachedTasks=void 0;cachedTasksNames=new Set;lastOpenedSolution=void 0;autoDetect=f.on;constructor(){n.workspace.onDidChangeConfiguration(this.onConfigurationChanged,this),this.onConfigurationChanged()}async provideTasks(){if(this.autoDetect===f.off)return;const e=await(0,o.getOpenedSolution)();if(this.lastOpenedSolution!==e){this.lastOpenedSolution=e,this.cachedTasks=await async function(){const e=n.workspace.workspaceFolders,t=[];if(!e||0===e.length)return t;const r=await(0,o.getOpenedSolution)(),s=v();if(r&&s){const e=await g(s,i.BUILD,r,{taskGroup:n.TaskGroup.Build,persistFilePath:!1,rejoinAspireSession:!1});e&&t.push(e);const o=await g(s,i.CLEAN,r,{taskGroup:n.TaskGroup.Clean,persistFilePath:!1,rejoinAspireSession:!1});o&&t.push(o);const a=await y();a&&a.forEach(async e=>{const r=await g(s,`${u} ${e.Name}`,e.Path,{action:u,rejoinAspireSession:!1});r&&t.push(r)})}return t}(),this.cachedTasksNames.clear();for(const e of this.cachedTasks)this.cachedTasksNames.add(e.name)}return this.cachedTasks}async resolveTask(e){if(e.definition.task){const t=e.definition;if(t.task.startsWith(u)&&t.file)return g(e.scope??n.TaskScope.Workspace,e.name,t.file,{taskGroup:e.group,action:u,persistFilePath:!0,taskDefinition:t,rejoinAspireSession:!1});if(t.task.startsWith(i.BUILD)||t.task.startsWith(i.CLEAN)||t.task.startsWith(d)){const r=await(0,o.getOpenedSolution)(),i=v();if(r&&i){const o=t?.file??r;return g(e.scope??n.TaskScope.Workspace,e.name,o,{taskGroup:e.group,persistFilePath:!1,taskDefinition:t})}}}}onConfigurationChanged(){const e=n.workspace.getConfiguration("dotnet").get("autoDetect");this.autoDetect=void 0===e?f.on:e}cacheNewTask(e){if(e.definition.type!==h.dotnetType)throw new Error(`Error: Trying to cache a task that is not ${h.dotnetType}. Actual type ${e.definition.type}`);this.cachedTasks?this.cachedTasksNames.has(e.name)||(this.cachedTasksNames.add(e.name),this.cachedTasks.push(e)):(this.cachedTasksNames.add(e.name),this.cachedTasks=[e])}}var f;async function g(e,t,r,o){var a;if(o.action)a=o.action;else switch(o.taskGroup?.id){case n.TaskGroup.Build.id:case n.TaskGroup.Rebuild.id:a=i.BUILD;break;case n.TaskGroup.Clean.id:a=i.CLEAN;break;default:return}const u=await(0,l.isCSharpExtensionBuildResultServiceAvailable)(),d=o?.taskDefinition??{type:h.dotnetType,task:t,file:o.persistFilePath??1?r:void 0,rejoinAspireSession:o.rejoinAspireSession},p=v();if(!p)return void s.logger.log("Cannot find the current workspace folder. The build operation is aborted.");let f;if(u){const i=new n.CustomExecution(async e=>{const t=e.file??r,n=await m(t,a,o.taskGroup,o.projectTarget);return new c.CustomBuildTaskTerminal(s.dotnetSdkPath??"dotnet",n,p.uri.fsPath,{rejoinAspireSession:o.rejoinAspireSession,...e})});f=new n.Task(d,e,t,"dotnet",i)}else{s.logger.log("Microsoft.VisualStudio.CSharpExtension.BuildResultService not found.");const i={env:{DOTNET_CLI_UI_LANGUAGE:n.env.language},cwd:p.uri.fsPath},c=await m(r,a,o.taskGroup,o.projectTarget),l=new n.ProcessExecution(s.dotnetSdkPath??"dotnet",c,i);f=new n.Task(d,e,t,"dotnet",l),f.problemMatchers=["$msCompile"]}return f.group=o.taskGroup,f}async function m(e,t,r,i){let c;const l=function(){const e=s.environmentStateManager?.getLatestEnvironmentState()?.configuration;if("string"!=typeof e)return{configurationName:void 0,platformName:void 0};const t=e.split("|",2);return{configurationName:t[0]||void 0,platformName:t[1]||void 0}}(),d=l.platformName?"Any CPU"===(h=l.platformName)?"AnyCPU":h:void 0;var h;if(t===u)c=[t,"--project",e];else if((r?.id===n.TaskGroup.Rebuild.id||r?.id===n.TaskGroup.Build.id)&&(0,a.endsWithInvariantIgnoreCase)(e,".csproj")&&i){const s=await(0,o.getOpenedSolution)();r?.id===n.TaskGroup.Rebuild.id&&(i+=":rebuild"),c=s?[t,s,i,"/property:GenerateFullPaths=true"]:[t,e,p,"/property:GenerateFullPaths=true"],l.configurationName&&c.push(`/p:Configuration=${l.configurationName}`);const a=s?l.platformName:d;a&&c.push(`/p:Platform="${a}"`)}else if(c=r?.id===n.TaskGroup.Rebuild.id?[t,e,p,"/property:GenerateFullPaths=true"]:[t,e,"/property:GenerateFullPaths=true"],r?.id===n.TaskGroup.Rebuild.id||r?.id===n.TaskGroup.Build.id||r?.id===n.TaskGroup.Clean.id){l.configurationName&&c.push(`/p:Configuration=${l.configurationName}`);const t=(0,a.endsWithInvariantIgnoreCase)(e,".csproj")||(0,a.endsWithInvariantIgnoreCase)(e,".cs")?d:l.platformName;t&&c.push(`/p:Platform=${t}`)}return(0,a.endsWithInvariantIgnoreCase)(e,".cs")||c.push("/consoleloggerparameters:NoSummary"),"true"===process.env.AUTOMATED_TESTING&&c.push("/p:TreatWarningsAsErrors=false"),c}function v(){if(n.workspace.workspaceFolders&&n.workspace.workspaceFolders.length>=1)return s.environmentStateManager?.getActiveWorkspace()}async function y(){const e={context:"Projects",query:{$properties:["Name","Path","Guid"],$filter:{ProjectsByCapabilities:["!SharedAssetsProject"]}}};return await s.logger.watch("Query for all projects",async()=>{const t=await s.projectQueryableSpace.executeQuery(e),r=[];return t&&t.Items?.forEach(e=>{e&&r.push(e)}),r},{catchUnhandledErrors:!0})}async function S(){const e={context:"Projects",query:{$properties:["Name","Path"],$filter:{ProjectsByCapabilities:["Aspire | AspireOrchestration"]}}};return await s.logger.watch("Query for Aspire AppHost projects",async()=>{const t=await s.projectQueryableSpace.executeQuery(e),r=[];return t&&t.Items?.forEach(e=>{e&&r.push(e)}),r},{catchUnhandledErrors:!0})}t.DotnetTaskProvider=h,function(e){e.on="on",e.off="off"}(f||(f={})),t.getOpenedWorkspaceHelper=v,t.getAllProjects=y,t.getAllAspireAppHostProjects=S,t.dotnetSolutionBuildActionUsingTask=async function(e,t,r,a,c){const l=n.workspace.workspaceFolders;if(!l||0===l.length||!l[0])return{success:Promise.resolve(!1)};var u=void 0,p=e;e===i.BUILD?r?(u=n.TaskGroup.Rebuild,p=d):u=n.TaskGroup.Build:e===i.CLEAN&&(u=n.TaskGroup.Clean);var f=void 0;const m=t.toUpperCase(),y={type:h.dotnetType},w=await n.tasks.fetchTasks(y),E=s.environmentStateManager?.getOpenedSolutionExt();for(const e of w){const t=e.definition;if(t&&t.task.startsWith(p)&&(t.file?.toUpperCase()===m||void 0===t.file&&E&&m.endsWith(E.toUpperCase()))){if(void 0===t.file){const e=await(0,o.getOpenedSolution)();if(e?.toUpperCase()!==m)continue}f=e;break}}if(!f){const e=v();if(e){const r=await S(),n=!!(r&&r.length>0);if((f=await g(e,`${p} ${t}`,t,{taskGroup:u,projectTarget:a,rejoinAspireSession:n}))&&c){if(!s.dotnetTaskProvider)return{success:Promise.resolve(!1)};s.dotnetTaskProvider.cacheNewTask(f)}}}return f?{taskName:`${f.definition.type}: ${f.name}`,success:new Promise(async(e,t)=>{const r=n.tasks.onDidEndTaskProcess(t=>{t.execution.task===f&&(r.dispose(),e(0===t.exitCode))});try{await n.tasks.executeTask(f)}catch(e){r.dispose(),t(e)}})}:{success:Promise.resolve(!1)}}},7983(e,t){"use strict";function r(e){const t=()=>{if(void 0===t.value&&t.loader&&(t.value=t.loader()),void 0===t.value)throw new Error("No loader o value was supplied.");return t.value};return t.loader=e,t}Object.defineProperty(t,"__esModule",{value:!0}),t.setLazyLoadMutable=t.delayedLoadMutable=t.lazyLoadNotImplemented=t.lazyLoadMutable=t.lazyLoad=void 0,t.lazyLoad=function(e){let t;return(r=!0)=>void 0!==t?t:r?t=e():void 0},t.lazyLoadMutable=r,t.lazyLoadNotImplemented=function(){throw new Error("Dependencies: Instance not provided.")},t.delayedLoadMutable=function(e){return r(()=>{throw Error(`Dependencies: ${e} is not yet initialized`)})},t.setLazyLoadMutable=function(e,t){return"function"==typeof t&&(e.loader=t),e}},5033(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JsonOutputMonitor=t.OutputMonitor=t.StepProgressLogger=t.NuGetLogger=t.Logger=t.LoggerBase=t.LogImportance=void 0;const n=r(1398),o=r(1858),i=r(5059),s=r(4369);var a;!function(e){e[e.low=0]="low",e[e.normal=1]="normal",e[e.high=2]="high"}(a||(t.LogImportance=a={}));class c{async watch(e,t,r){const n=r?.importance;this.log(`Starting: ${e}`,n);const i=performance.now();try{const r=await t(),o=performance.now();return this.log(`Completed: ${e} (${(o-i).toFixed()}ms)`,n),r}catch(t){const s=performance.now();if(this.log(`Failed: ${e} (${(s-i).toFixed()}ms) with error: ${t}`,n),r?.telemetry?.addOrUpdateProperties({succeeded:String(!1),error:t instanceof Error?t.name:"error"}),r?.telemetry?.addOrUpdateMeasurements({errorCode:t instanceof o.ErrorCodeError?t.errorCode:void 0}),!r?.catchUnhandledErrors)throw t}}}t.LoggerBase=c;class l extends c{outputChannel;level;constructor(e){switch(super(),this.outputChannel="string"==typeof e?n.window.createOutputChannel(e,{log:!0}):e,this.level=a.normal,process.env.MINIMUM_LOG_LEVEL?.toLowerCase()){case"low":this.level=a.low;break;case"normal":this.level=a.normal;break;case"high":this.level=a.high}}log(e,t){if(void 0===t||t>=this.level){const r="object"==typeof e?JSON.stringify(e,null,2):void 0===e?"":e;if(r&&"trace"in this.outputChannel){const e=this.outputChannel;switch(t??a.normal){case a.low:e.debug(r);break;case a.normal:e.info(r);break;case a.high:e.error(r)}}else r&&this.outputChannel.appendLine(r)}}reportExceptionTelemetryAndLog(e,t,r,n,o,i){let s=null,c=n;c&&(s=c.stack??null);let l={methodName:e,fault:t=t??"(missing)",errorName:r??""};s&&(l.exceptionStack=s),o?.sendTelemetryErrorEvent(c,{...l,...i}),this.log("Error occurred in "+e+": "+n,a.high)}getChannel(){return this.outputChannel}show(){this.outputChannel.show()}}t.Logger=l;class u extends l{static userInteractionRequiredMessage="[CredentialProvider]ATTENTION: User interaction required.";diagnosticsPerFile={};clear(){this.outputChannel.clear(),this.diagnosticsPerFile={}}log(e,t){if("object"==typeof e)return void super.log(e,t);let r;e.split(/\r?\n|\r|\n/g).map(e=>e.trim()).forEach(e=>{if(e.includes(u.userInteractionRequiredMessage))r?r+="\r\n"+e:r=e,n.window.showWarningMessage(i.NuGet.requiresCredentialsMessage,i.NuGet.showDeviceCodeLoginInfo).then(e=>{e===i.NuGet.showDeviceCodeLoginInfo&&this.outputChannel.show()});else{const o=(0,s.parseBuildResultLine)(e);if(o){r&&(super.log(r,t),r=void 0);const[e,i]=(0,s.convertBuildResultToDiagnostic)(o);if("string"!=typeof i.code||!i.code.startsWith("NU",0)){i.source="NuGet";const t=this.diagnosticsPerFile[e];t?t.push(i):this.diagnosticsPerFile[e]=[i]}const a=o[0],c=this.outputChannel;if("trace"in c)switch(i.severity){case n.DiagnosticSeverity.Error:c.error(a);break;case n.DiagnosticSeverity.Warning:c.warn(a);break;default:c.info(a)}else super.log(a,t)}else r?r+="\r\n"+e:r=e}}),r&&(super.log(r,t),r=void 0)}}t.NuGetLogger=u,t.StepProgressLogger=class{logger;name;constructor(e,t){this.logger=e,this.name=t}report(e){this.logger.log(`${this.name}: Step ${e.currentStep} of ${e.totalSteps}.`)}};class d extends c{outputLog;constructor(){super(),this.outputLog=[]}log(e){this.outputLog.push(e)}getOutput(){return this.outputLog.join("")}clearOutput(){this.outputLog=[]}}t.OutputMonitor=d,t.JsonOutputMonitor=class extends d{logger;constructor(e){super(),this.logger=e}log(e){super.log(e),this.logger.log(e)}getOutput(){const e=super.getOutput();return this.extractJson(e)}extractJson(e){const t=e.indexOf("{"),r=e.lastIndexOf("}");if(-1===t||-1===r)throw new Error("No valid JSON object found in the output");return e.slice(t,r+1)}}},3467(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.prepareBrokeredServices=void 0;const n=r(4084),o=r(4701),i=r(1943),s=r(1398),a=r(2776),c=r(5033),l=r(1136),u=r(9791),d=r(1367),p=r(4724),h=r(2269),f=r(4398),g=r(6831),m=r(5611),v=r(9409),y=r(2613),S=r(6928),w=r(4043),E=r(8351),_=r(4345),b=r(868),P=r(1412),T=r(2051),C=r(2470),I=r(3430),O=r(2551),N=r(7256),R=r(3188),A=r(1967),D=r(1020),x=r(9872),k=r(6369),j=r(7815),M=r(9768),L=r(5326),F=r(8189),U=r(5968);function $(e,t){return async function(r,o){await e.watch(`JIT proffering for ${n.ServiceMoniker.toString(o)} is awaiting for the .NET server`,async function(){await t},{importance:c.LogImportance.low})}}function B(e,t,r){const o=[],i=new n.ServiceRegistration(n.ServiceAudience.local,!1,()=>t);for(const t of e)o.push({moniker:t.moniker,registration:i,serviceHub:{serviceModuleInfo:t.serviceModuleInfo,baseDir:t.baseDir}}),r.log(`Registered ServiceHub-hosted brokered service ${n.ServiceMoniker.toString(t.moniker)}.`,c.LogImportance.low);return o}async function V(e){const t=(await(0,i.readdir)(e)).filter(e=>e.endsWith(".servicehub.service.json"));let r=[];for(const o of t){const t=n.ServiceMoniker.create(o.slice(0,o.length-24)),i=await(0,v.readJsonFile)(S.join(e,o));r.push({moniker:t,serviceModuleInfo:i,baseDir:e})}return r}async function H(e){const t=S.join(e,"platforms"),r=await(0,i.readdir)(t,{withFileTypes:!0});let n=[];for(const e of r)if(e.isDirectory()){const r=S.join(t,e.name);if((await(0,i.readdir)(S.join(r))).indexOf("node_modules")>=0){const e=await(0,_.getPackageInfo)(r);for(const t of e){const e=S.resolve(r,"node_modules",t.fullName);n.push(...await V(e))}}}return n}t.prepareBrokeredServices=async function(e,t,r){const _=!s.workspace.workspaceFolders,q=new n.GlobalBrokeredServiceContainer,z=q.getFullAccessServiceBroker();let W=!1,G=new s.EventEmitter;const K=(0,v.lazyPromiseLambda)(()=>(W=!0,G.fire(),r.watch("Spawn .NET server",()=>(0,l.launchDotNetServer)(e,t,q))));let X,J=!1;const Q=(0,v.lazyPromiseLambda)(()=>(J=!0,r.watch("Register services with .NET server",async()=>{await async function(e,t){const r=await t.getProxy(p.default.outOfProcServiceRegistration);try{y(r);for(const{moniker:t,serviceHub:n}of e)n?await r.registerServiceHubService(t,n.serviceModuleInfo,n.baseDir):await r.registerParentProcessService(t)}finally{r?.dispose()}}(X,z)},{importance:c.LogImportance.low})));X=await async function(e,t,r,o,i,s){const l=await(0,a.loadOrCreateCachedValue)(e,"brokered-services-from-components",async()=>{const e={dotNetServerBrokeredServices:[],serviceHubServices:{}};for(const t in r){const i=r[t],a=await V(i);a.length>0&&(e.serviceHubServices[t]=a);const l=await(0,v.readJsonFile)(S.join(i,"package.json"));if(l.brokeredServices)for(const r of l.brokeredServices){const i=new n.ServiceRegistration(r.audience??n.ServiceAudience.local,r.allowGuestClients??!1,$(s,o)),a=".NET runtime";if(Array.isArray(r.moniker))for(const o of r.moniker)e.dotNetServerBrokeredServices.push({moniker:o,registration:i}),s.log(`Registered ${a}-hosted brokered service ${n.ServiceMoniker.toString(o)} from component ${t}.`,c.LogImportance.low);else e.dotNetServerBrokeredServices.push({moniker:r.moniker,registration:i}),s.log(`Registered ${a}-hosted brokered service ${n.ServiceMoniker.toString(r.moniker)} from extension ${t}.`,c.LogImportance.low)}}return e}),u=[];if(!i)for(const e in l.serviceHubServices)u.push(...B(l.serviceHubServices[e],o,s));return u.push(...l.dotNetServerBrokeredServices.map(e=>({...e,registration:new n.ServiceRegistration(e.registration.audience,e.registration.allowGuestClients,()=>o)}))),t.register(u),u}(e,q,t,Q,_,r),X.push(...await async function(e,t,r,o,a){const l=b.idsOfExtensionsAllowedToExtendCsDevKit.map(e=>s.extensions.getExtension(e)),u=[];for(const s of l)if(s&&(!o||s.id===M.EXTENSION_ID))try{const l=s.packageJSON;if(l.brokeredServices){const o=(0,v.lazyPromiseLambda)(async()=>{await a.watch(`JIT proffering brokered services from the '${s.id}' extension `,async function(){await s.activate(),s.exports.profferBrokeredServices&&s.exports.profferBrokeredServices(e)},{importance:c.LogImportance.low})});for(const e of l.brokeredServices){let i,l;e.serviceHub?(i=Array.isArray(e.moniker)||e.moniker.name!==p.default.outOfProcServiceRegistration.moniker.name?$(a,r):async function(e,r){await t},l=".NET runtime"):(i=(e,t)=>o,l="Extension Host");const d=new n.ServiceRegistration(e.audience??n.ServiceAudience.local,e.allowGuestClients??!1,i);if(Array.isArray(e.moniker))for(const t of e.moniker)u.push({moniker:t,registration:d,isInProcVsServer:!!e.serviceHub}),a.log(`Registered ${l}-hosted brokered service ${n.ServiceMoniker.toString(t)} from extension ${s.id}.`,c.LogImportance.low);else u.push({moniker:e.moniker,registration:d,isInProcVsServer:!!e.serviceHub}),a.log(`Registered ${l}-hosted brokered service ${n.ServiceMoniker.toString(e.moniker)} from extension ${s.id}.`,c.LogImportance.low)}}if(!o&&l.serviceHubServiceDirectories)for(const e of l.serviceHubServiceDirectories){const t=S.join(s.extensionPath,e);let n=await V(t);(await(0,i.readdir)(t)).indexOf("platforms")>=0&&n.push(...await H(t));for(const e of B(n,r,a))u.push({...e,isInProcVsServer:!1})}}catch(e){a.log(`Error trying to register services from extension ${s.id}: ${e}`)}return e.register(u),s.extensions.onDidChange(()=>{}),u.filter(e=>!e.isInProcVsServer)}(q,K,Q,_,r)),y(!J);const Y={serviceBroker:z,ensureInitialized:async()=>{await K},getBrokeredServiceServerPipeName:async()=>(await K).brokeredServiceServerPipeName,hasServerProcessLoaded:()=>W,serverProcessLoaded:G.event};return function(e,t,r,n){e.subscriptions.push(t.profferServiceFactory(p.default.tokenAcquisitionService,(e,t,r)=>new f.TokenAcquisitionService)),e.subscriptions.push(t.profferServiceFactory(p.default.errorReportingService,(t,r,n)=>new h.ErrorReportingService(e))),e.subscriptions.push(t.profferServiceFactory(p.default.activeDocumentsInformationService,(e,t,r)=>new u.ActiveDocumentsInformationService)),e.subscriptions.push(t.profferServiceFactory(p.default.buildService,(t,r,n)=>new w.BuildService(e)));const i=(0,v.lazyPromiseLambda)(()=>d.ComponentExportsState.create(e,r));e.subscriptions.push(t.profferServiceFactory(p.default.componentExportsService,async()=>new d.ComponentExportsService(await i))),e.subscriptions.push(t.profferServiceFactory(p.default.vsCodeFileWatcherService,(e,t,r)=>new O.VsCodeFileWatcherService(t)));const a=new E.BrokeredServiceExportsRegistrarState;e.subscriptions.push(t.profferServiceFactory(p.default.brokeredServiceExportsRegistrar,()=>new E.BrokeredServiceExportsRegistrar(a)));const c=(0,v.lazyPromiseLambda)(async()=>s.languages.createDiagnosticCollection("NuGet")),l=(0,v.lazyPromiseLambda)(async()=>s.window.createOutputChannel("NuGet",{log:!0})),y=(0,v.lazyPromiseLambda)(async()=>{const t=g.NuGetSolutionRestoreState.create(await l,await c);return e.subscriptions.push(t),t});e.subscriptions.push(t.profferServiceFactory(p.default.nugetSolutionRestoreService,async(e,t,r)=>{const n=await y;return n.init(r).catch(()=>{}),new g.NuGetSolutionRestoreService(n,t)}));const S=(0,v.lazyPromiseLambda)(async()=>m.LogOutputChannelState.create());e.subscriptions.push(t.profferServiceFactory(p.default.logOutputChannelService,async(e,t,r)=>(await S).createOutputChannel(t))),e.subscriptions.push(t.profferServiceFactory(p.default.hotReloadLogger,(e,t,r)=>P.hotReloadLogger)),e.subscriptions.push(t.profferServiceFactory(p.default.hotReloadClientListener,(e,t,r)=>new T.HotReloadClientListener)),e.subscriptions.push(t.profferServiceFactory(p.default.hotReloadOptionService,(e,t,r)=>(0,C.getHotReloadOptionService)())),e.subscriptions.push(t.profferServiceFactory(p.default.dotnetDebugConfigurationService,(e,t,r)=>new I.DotnetDebugConfigurationService(r,n))),e.subscriptions.push(t.profferServiceFactory(p.default.dotnetDebugLaunchService,(e,t,r)=>new k.DotnetDebugLaunchService(n))),e.subscriptions.push(t.profferServiceFactory(p.default.nugetCommandsService,(e,t,r)=>new N.NuGetDotnetCommandsService(l))),e.subscriptions.push(t.profferServiceFactory(p.default.workspaceConfigurationOptionsService,(e,t,r)=>R.workspaceConfigurationOptionsService)),e.subscriptions.push(t.profferServiceFactory(p.default.vscodeAzureFunctionExtensionService,(e,t,r)=>j.vsCodeAzureFunctionExtensionService));const _=(0,v.lazyPromiseLambda)(async()=>A.OutputChannelState.create());e.subscriptions.push(t.profferServiceFactory(p.default.outputChannelService,async(e,t,r)=>(await _).createOutputChannel(t))),e.subscriptions.push(t.profferServiceFactory(p.default.startupProjectService,(e,t,r)=>new x.FilteredStartupProjectService(D.startupProjectService))),e.subscriptions.push(t.profferServiceFactory(p.default.projectCacheStateService,(t,r,n)=>new F.ProjectCacheStateService(e))),e.subscriptions.push(t.profferServiceFactory(p.default.aspireCopilotService,(e,t,r)=>new L.AspireCopilotService(t))),e.subscriptions.push(t.profferServiceFactory(p.default.diagnosticCollectionService,(e,t,r)=>new U.DiagnosticCollectionService(t))),e.subscriptions.push((0,o.profferTestRunnerService)(t)??s.Disposable.from())}(e,q,t,Y),Y}},2776(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCacheDirectory=t.loadOrCreateCachedValue=t.isCacheEnabled=void 0;const n=r(9896),o=r(1943),i=r(1398),s=r(6928),a="utf8";function c(e){return e.extensionMode===i.ExtensionMode.Production||!1}let l;function u(e){return s.join(e.extensionPath,"cache")}function d(e){return s.join(u(e),"discovery.json")}t.isCacheEnabled=c,t.loadOrCreateCachedValue=async function(e,t,r){let i;if(c(e)&&(l??=async function(e){const t=d(e);try{const e=(0,n.readFileSync)(t);return JSON.parse(e.toString(a))}catch{return{}}}(e),i=await l,t in i))return i[t];const u=await r();return i&&(i[t]=u,await async function(e,t){const r=d(e);await(0,o.mkdir)(s.dirname(r),{recursive:!0}),await(0,o.writeFile)(r,JSON.stringify(t),{encoding:a})}(e,i)),JSON.parse(JSON.stringify(u))},t.getCacheDirectory=u},3923(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findAndParseGlobalJson=t.getGlobalJsonRequirements=t.parseGlobalJson=t.findGlobalJson=void 0;const n=r(1943),o=r(6928);async function i(e){let t=e;for(;;){const e=o.join(t,"global.json");try{return await n.access(e),e}catch{}const r=o.dirname(t);if(r===t)return;t=r}}async function s(e){try{const t=await n.readFile(e,"utf8");return JSON.parse(t)}catch(t){return void console.error(`Failed to parse global.json at ${e}:`,t)}}async function a(e){const t=await s(e);if(t)return{filePath:e,sdkVersion:t.sdk?.version,allowPrerelease:t.sdk?.allowPrerelease,rollForward:t.sdk?.rollForward}}t.findGlobalJson=i,t.parseGlobalJson=s,t.getGlobalJsonRequirements=a,t.findAndParseGlobalJson=async function(e){const t=await i(e);if(t)return a(t)}},3725(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CheckRequirementsViewSerializer=t.openUrlCmdHandler=t.showCheckRequirementsWebviewBeside=t.showCheckRequirementsWebview=void 0;const n=r(6928),o=r(1398),i=r(3130),s=r(4989),a=r(3923),c=r(438);t.showCheckRequirementsWebview=function(e){l.createOrShow(e.extensionPath)},t.showCheckRequirementsWebviewBeside=function(e){l.createOrShow(e.extensionPath,{beside:!0})},t.openUrlCmdHandler=async function(e,t,r){(0,i.sendInfo)(t,{url:r}),o.commands.executeCommand("vscode.open",o.Uri.parse(r))},t.CheckRequirementsViewSerializer=class{context;constructor(e){this.context=e}async deserializeWebviewPanel(e,t){l.createOrShow(this.context.extensionPath,{webviewPanel:e})}};class l{static instance;static viewType=s.CHECK_REQUIREMENTS_WEBVIEW_ID;_panel;_extensionPath;_disposables=[];_discoveredFrameworks=[];_frameworksDiscovered=!1;_globalJsonWatcher;static createOrShow(e,t){let r=o.ViewColumn.Active;if(t?.beside){const e=o.window.activeTextEditor;r=void 0===e||e.viewColumn===o.ViewColumn.One?o.ViewColumn.Two:o.ViewColumn.One}l.instance?l.instance._panel?.reveal():l.instance=new l(e,t?.webviewPanel?t.webviewPanel:r)}constructor(e,t){this._extensionPath=e,t.viewType?this._panel=t:this._panel=o.window.createWebviewPanel(l.viewType,"C# Workspace Requirements",t,{enableScripts:!0,localResourceRoots:[o.Uri.file(n.join(this._extensionPath,"out"))],enableCommandUris:!0,retainContextWhenHidden:!0}),this._panel.webview.html=this._getHtmlForWebview(),this._panel.onDidDispose(()=>this.dispose(),null,this._disposables),this._panel.webview.onDidReceiveMessage(e=>{switch(e.command){case"onWillFetchAvailableReleases":return void this.doFetchAvailableReleases();case"onWillFetchAvailableRuntimes":return void this.doFetchAvailableRuntimes();case"onWillFetchGlobalJsonRequirements":return void this.doFetchGlobalJsonRequirements();case"onWillFetchInstalledSdks":return void this.doFetchInstalledSdks();case"onWillFetchInstalledRuntimes":return void this.doFetchInstalledRuntimes();case"onWillFetchDiscoveredFrameworks":return void this.doFetchDiscoveredFrameworks();case"onWillFetchAsset":return void this.doFetchAsset(e.primaryAsset,e.payload);case"onWillDownloadDotnetSdk":return void this.doDownloadDotnetSdk(e.payload);case"onWillDownloadDotnetRuntime":return void this.doDownloadDotnetRuntime(e.payload);case"onWillUpgradeGlobalJson":return void this.doUpgradeGlobalJson(e.payload);case"onWillOpenGlobalJson":return void this.doOpenGlobalJson(e.payload);case"onWillResolveRequirements":return void this.doResolveRequirements(e.payload);case"onWillReloadWindow":return void this.doReloadWindow()}},null,this._disposables),this._setupGlobalJsonWatcher()}_setupGlobalJsonWatcher(){if(this._globalJsonWatcher?.dispose(),o.workspace.workspaceFolders&&o.workspace.workspaceFolders.length>0){this._globalJsonWatcher=o.workspace.createFileSystemWatcher(new o.RelativePattern(o.workspace.workspaceFolders[0],"**/global.json"));const e=()=>{console.log("[globalJsonWatcher] global.json changed, refreshing..."),this.doFetchGlobalJsonRequirements()};this._globalJsonWatcher.onDidChange(e),this._globalJsonWatcher.onDidCreate(e),this._globalJsonWatcher.onDidDelete(e),this._disposables.push(this._globalJsonWatcher)}}async doFetchAvailableReleases(){const e=await(0,s.getAllSuggestedSDKVersions)();this._panel?.webview.postMessage({command:"onDidFetchAvailableReleases",payload:e})}async doFetchAvailableRuntimes(){const e=await(0,s.getAvailableRuntimeVersions)();this._panel?.webview.postMessage({command:"onDidFetchAvailableRuntimes",payload:e})}async doFetchGlobalJsonRequirements(){const e=o.workspace.workspaceFolders;let t;e&&e.length>0&&(t=await(0,a.findAndParseGlobalJson)(e[0].uri.fsPath)),this._panel?.webview.postMessage({command:"onDidFetchGlobalJsonRequirements",payload:t})}async doFetchInstalledSdks(){console.log("[doFetchInstalledSdks] Fetching installed SDKs...");const e=await(0,s.getInstalledSDKs)();console.log("[doFetchInstalledSdks] Got installed SDKs:",e),this._panel?.webview.postMessage({command:"onDidFetchInstalledSdks",payload:e}),console.log("[doFetchInstalledSdks] Posted message to webview")}async doFetchInstalledRuntimes(){if(console.log("[doFetchInstalledRuntimes] Fetching installed runtimes..."),!this._frameworksDiscovered)return void console.log("[doFetchInstalledRuntimes] Waiting for frameworks to be discovered first...");const e=await(0,s.getInstalledRuntimes)(this._discoveredFrameworks);console.log("[doFetchInstalledRuntimes] Got installed runtimes:",e),this._panel?.webview.postMessage({command:"onDidFetchInstalledRuntimes",payload:e}),console.log("[doFetchInstalledRuntimes] Posted message to webview")}async doFetchDiscoveredFrameworks(){console.log("[doFetchDiscoveredFrameworks] Discovering target frameworks...");const e=o.workspace.workspaceFolders;if(!e||0===e.length)return this._discoveredFrameworks=[],this._frameworksDiscovered=!0,this._panel?.webview.postMessage({command:"onDidFetchDiscoveredFrameworks",payload:void 0}),void this.doFetchInstalledRuntimes();try{const t=e[0].uri.fsPath,r=await(0,c.findProjectFiles)([t]),n=await(0,c.discoverTargetFrameworks)(r,t);this._discoveredFrameworks=Array.from(n.modernFrameworks),this._frameworksDiscovered=!0,console.log("[doFetchDiscoveredFrameworks] Found frameworks:",this._discoveredFrameworks),this._panel?.webview.postMessage({command:"onDidFetchDiscoveredFrameworks",payload:{modernFrameworks:this._discoveredFrameworks,projectCount:n.projects.length}}),this.doFetchInstalledRuntimes()}catch(e){console.error("[doFetchDiscoveredFrameworks] Error:",e),this._discoveredFrameworks=[],this._frameworksDiscovered=!0,this._panel?.webview.postMessage({command:"onDidFetchDiscoveredFrameworks",payload:void 0}),this.doFetchInstalledRuntimes()}}async doFetchAsset(e,t){this._panel?.webview.postMessage({command:"onDidFetchAsset",primaryAsset:e,payload:t})}async doDownloadDotnetSdk(e){(0,s.acquireSDK)(e)}async doDownloadDotnetRuntime(e){(0,s.acquireRuntimeForUser)(e)}async doUpgradeGlobalJson(e){const t=o.workspace.workspaceFolders;if(t&&0!==t.length)if(await(0,a.findAndParseGlobalJson)(t[0].uri.fsPath))try{const n=await Promise.resolve().then(()=>r(9896)),i=(await Promise.resolve().then(()=>r(6928))).join(t[0].uri.fsPath,"global.json"),s={sdk:{version:e}};n.writeFileSync(i,JSON.stringify(s,null,2)),o.window.showInformationMessage(`Updated global.json to require .NET SDK ${e}`),this.doFetchGlobalJsonRequirements()}catch(e){o.window.showErrorMessage(`Failed to update global.json: ${e.message}`)}else o.window.showErrorMessage("No global.json file found in the workspace.");else o.window.showErrorMessage("No workspace folder is open.")}async doOpenGlobalJson(e){try{const t=o.Uri.file(e);await o.window.showTextDocument(t)}catch(e){o.window.showErrorMessage(`Failed to open file: ${e.message}`)}}async doResolveRequirements(e){console.log("[doResolveRequirements] Resolving requirements:",e);const t=o.workspace.workspaceFolders;try{const i=await(0,s.getInstalledSDKs)(),a=e.sdkVersion.split(".").slice(0,2).join(".");if(!i.some(e=>e.startsWith(a))){const t={version:e.sdkVersion,channelVersion:a,supportPhase:"active",supportStatus:"lts"};await(0,s.acquireSDK)(t)}const c=await(0,s.getInstalledRuntimes)(e.runtimeVersions),l=new Set(c.map(e=>e.version.split(".")[0]));for(const t of e.runtimeVersions){const e=t.split(".")[0];l.has(e)||(console.log(`[doResolveRequirements] Installing runtime ${t}`),await(0,s.acquireRuntimeForUser)(t))}if(e.updateGlobalJson&&t&&t.length>0){const o=await Promise.resolve().then(()=>r(9896)),i=e.globalJsonPath||n.join(t[0].uri.fsPath,"global.json");let s={};try{const e=o.readFileSync(i,"utf8");s=JSON.parse(e)}catch{}const a={...s.sdk};a.version=e.sdkVersion;const c={...s,sdk:a};o.writeFileSync(i,JSON.stringify(c,null,2)),console.log("[doResolveRequirements] Updated global.json:",a)}o.window.showInformationMessage("Successfully resolved workspace requirements. Reload the window to apply changes."),setTimeout(()=>{this.doFetchInstalledSdks(),this.doFetchInstalledRuntimes(),this.doFetchGlobalJsonRequirements()},2e3)}catch(e){console.error("[doResolveRequirements] Error:",e),o.window.showErrorMessage(`Failed to resolve requirements: ${e.message}`)}}async doReloadWindow(){await(0,s.webviewCmdLinkHandler)({webview:l.viewType,identifier:"Reload Window",command:"workbench.action.reloadWindow"})}dispose(){for(l.instance=void 0,this._panel?.dispose(),this._panel=void 0;this._disposables.length;){const e=this._disposables.pop();e&&e.dispose()}}_getHtmlForWebview(){const e=o.Uri.file(n.join(this._extensionPath,"out","assets","check-requirements","index.js")),t=this._panel?.webview.asWebviewUri(e),r=(0,s.getNonce)();return`<!DOCTYPE html>\n\t\t\t<html lang="en">\n\t\t\t<head>\n\t\t\t\t<meta charset="utf-8">\n\t\t\t\t<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">\n\t\t\t\t<meta name="theme-color" content="#000000">\n\t\t\t\t<title>C# Workspace Requirements</title>\n\t\t\t\t<style nonce="${r}">\n\t\t\t\t\t#initial-loading {\n\t\t\t\t\t\tdisplay: flex;\n\t\t\t\t\t\tflex-direction: column;\n\t\t\t\t\t\talign-items: center;\n\t\t\t\t\t\tjustify-content: center;\n\t\t\t\t\t\tmin-height: 300px;\n\t\t\t\t\t\tpadding: 40px 20px;\n\t\t\t\t\t\tgap: 16px;\n\t\t\t\t\t\tfont-family: var(--vscode-font-family);\n\t\t\t\t\t\tcolor: var(--vscode-foreground);\n\t\t\t\t\t}\n\t\t\t\t\t#initial-loading h1 {\n\t\t\t\t\t\tfont-size: 20px;\n\t\t\t\t\t\tfont-weight: 600;\n\t\t\t\t\t\tmargin: 0;\n\t\t\t\t\t}\n\t\t\t\t\t#initial-loading p {\n\t\t\t\t\t\topacity: 0.7;\n\t\t\t\t\t\tmargin: 0;\n\t\t\t\t\t}\n\t\t\t\t\t@keyframes spin {\n\t\t\t\t\t\t0% { transform: rotate(0deg); }\n\t\t\t\t\t\t100% { transform: rotate(360deg); }\n\t\t\t\t\t}\n\t\t\t\t\t#initial-loading .spinner {\n\t\t\t\t\t\twidth: 32px;\n\t\t\t\t\t\theight: 32px;\n\t\t\t\t\t\tborder: 3px solid var(--vscode-widget-border, #444);\n\t\t\t\t\t\tborder-top-color: var(--vscode-textLink-foreground, #3794ff);\n\t\t\t\t\t\tborder-radius: 50%;\n\t\t\t\t\t\tanimation: spin 1s linear infinite;\n\t\t\t\t\t}\n\t\t\t\t</style>\n\t\t\t</head>\n\t\t\t<body>\n\t\t\t\t<noscript>You need to enable JavaScript to run this app.</noscript>\n\t\t\t\t<div id="root">\n\t\t\t\t\t<div id="initial-loading">\n\t\t\t\t\t\t<div class="spinner"></div>\n\t\t\t\t\t\t<h1>C# Workspace Requirements</h1>\n\t\t\t\t\t\t<p>Loading workspace information...</p>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<script nonce="${r}" src="${t}" type="module"><\/script>\n\t\t\t</body>\n\t\t\t</html>`}}},438(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMissingRuntimes=t.getRequiredRuntimeVersion=t.findProjectFiles=t.discoverTargetFrameworks=t.extractPropertiesFromPropsFiles=t.resolvePropertyReferences=t.extractPropertiesFromContent=t.findPropsFilesInHierarchy=t.parseProjectFile=t.getFrameworkMajorVersion=t.filterModernFrameworks=t.extractTargetFrameworksFromContent=t.MODERN_DOTNET_FRAMEWORKS=void 0;const n=r(1943),o=r(6928);t.MODERN_DOTNET_FRAMEWORKS=["net5.0","net6.0","net7.0","net8.0","net9.0","net10.0","net11.0"];const i=/<TargetFrameworks?>\s*([^<]+)\s*<\/TargetFrameworks?>/gi,s=/\$\(([^)]+)\)/g,a=/<([A-Za-z_][A-Za-z0-9_]*)>\s*([^<]+)\s*<\/\1>/g;function c(e){const t=[],r=[];let n,o=!1;for(i.lastIndex=0;null!==(n=i.exec(e));){const e=n[1].trim();s.test(e)&&(o=!0,s.lastIndex=0);const i=e.split(";").map(e=>e.trim());r.push(...i),t.push(...i.map(e=>e.toLowerCase()))}return{frameworks:t,rawFrameworks:r,hasUnresolvedProperties:o}}function l(e){const t=new Set;for(const r of e){const e=r.match(/^net(5|6|7|8|9|10|11)\.0/i);e&&t.add(`net${e[1]}.0`)}return Array.from(t)}function u(e){const t=e.match(/^net(\d+)\.0/i);return t?parseInt(t[1],10):void 0}async function d(e){try{const t=await n.readFile(e,"utf8"),{frameworks:r,rawFrameworks:o,hasUnresolvedProperties:i}=c(t);return{projectPath:e,frameworks:r,rawFrameworks:o,hasUnresolvedProperties:i}}catch(t){return{projectPath:e,frameworks:[],rawFrameworks:[],hasUnresolvedProperties:!1}}}async function p(e,t){const r=[];let i=e;const s=o.normalize(t).toLowerCase();for(;;){const e=o.normalize(i).toLowerCase(),t=["Directory.Build.props","Directory.Packages.props"];for(const e of t){const t=o.join(i,e);try{await n.access(t),r.push(t)}catch{}}if(e===s||!e.startsWith(s))break;const a=o.dirname(i);if(a===i)break;i=a}return r}function h(e){const t=new Map;let r;for(a.lastIndex=0;null!==(r=a.exec(e));){const e=r[1],n=r[2].trim();t.set(e,n)}return t}function f(e,t){return e.replace(s,(e,r)=>t.get(r)??e)}async function g(e){const t=new Map;for(const r of e)try{const e=h(await n.readFile(r,"utf8"));for(const[r,n]of e)t.set(r,n)}catch{}return t}function m(e){const t=u(e);if(void 0!==t&&t>=5)return`${t}.0`}t.extractTargetFrameworksFromContent=c,t.filterModernFrameworks=l,t.getFrameworkMajorVersion=u,t.parseProjectFile=d,t.findPropsFilesInHierarchy=p,t.extractPropertiesFromContent=h,t.resolvePropertyReferences=f,t.extractPropertiesFromPropsFiles=g,t.discoverTargetFrameworks=async function(e,r,n=new Set(t.MODERN_DOTNET_FRAMEWORKS)){const i={modernFrameworks:new Set,projects:[],terminatedEarly:!1};for(const t of e){const e=await d(t);i.projects.push(e);let a=l(e.frameworks);if(e.hasUnresolvedProperties){const n=o.dirname(t),i=await p(n,r);if(i.length>0){const t=await g(i),r=[];for(const n of e.rawFrameworks)if(s.test(n)){s.lastIndex=0;const e=f(n,t);r.push(...e.split(";").map(e=>e.trim().toLowerCase()))}else r.push(n.toLowerCase());a=l(r)}}for(const e of a)i.modernFrameworks.add(e);if(i.modernFrameworks.size>=n.size){let e=!0;for(const t of n)if(!i.modernFrameworks.has(t)){e=!1;break}if(e){i.terminatedEarly=!0;break}}}return i},t.findProjectFiles=async function(e,t=["node_modules","bin","obj",".git",".vs"]){const r=[];async function i(e){try{const s=await n.readdir(e,{withFileTypes:!0});for(const n of s){const s=o.join(e,n.name);if(n.isDirectory())t.includes(n.name)||await i(s);else if(n.isFile()){const e=o.extname(n.name).toLowerCase();".csproj"!==e&&".proj"!==e||r.push(s)}}}catch{}}for(const t of e)await i(t);return r},t.getRequiredRuntimeVersion=m,t.getMissingRuntimes=function(e,t){const r=new Set,n=new Set;for(const e of t){const t=e.split(".");t.length>=2&&n.add(`${t[0]}.${t[1]}`)}for(const t of e){const e=m(t);e&&r.add(e)}const o=[];for(const e of r)n.has(e)||o.push(e);return o.sort((e,t)=>{const[r]=e.split(".").map(Number),[n]=t.split(".").map(Number);return r-n}),o}},4324(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkHostApp=void 0;const n=r(1398);r(6928),r(6982),["You may install and use any number of copies of the software only with Microsoft Visual Studio,","Visual Studio for Mac, Visual Studio Code, Azure DevOps, Team Foundation Server, and successor Microsoft products","and services (collectively, the “Visual Studio Products and Services”) to develop and test your applications.","The software is licensed, not sold. This agreement only gives you some rights to use the software. Microsoft reserves all other rights.","You may not:","work around any technical limitations in the software that only allow you to use it in certain ways;","reverse engineer, decompile or disassemble the software, or otherwise attempt to derive the source code for the software,","except and to the extent required by third party licensing terms governing use of certain open source components that may be included in the software;","remove, minimize, block, or modify any notices of Microsoft or its suppliers in the software;","use the software in any way that is against the law or to create or propagate malware; or","share, publish, distribute, or lease the software (except for any distributable code, subject to the terms above),","provide the software as a stand-alone offering for others to use, or transfer the software or this agreement to any third party."].join(" "),t.checkHostApp=function(){return!!["Visual Studio Code","Visual Studio Code - Insiders","Visual Studio Code - Exploration","Visual Studio Code @ Meta","Visual Studio Code @ Meta - Insiders"].includes(n.env.appName)}},4773(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionController=void 0;const n=r(1459),o=r(9242),i=r(5829),s=r(9942);t.CollectionController=class{_context;_serviceBroker;_logger;_telemetryService;_sessionsData=new Map;_collectionService;constructor(e,t,r,n){this._context=e,this._serviceBroker=t,this._logger=r,this._telemetryService=n}async initialize(){const e=await this._serviceBroker.getProxy(n.Descriptors.collectionService);e?(this._collectionService=e,this._context.subscriptions.push(this._collectionService)):this._logger.log("CodeCoverage: Unable to get report service")}dispose(){this._collectionService?.dispose()}async setupCoverageProfile(e){const t=await(0,i.getReportController)();e.loadDetailedCoverage=(e,r,n)=>t.loadDetailedCoverage(r)}async start(e,t,r,n,i){if(!this._collectionService)return this._logger.log("CodeCoverage: Collection service not initialized"),t;if(this._sessionsData.has(e))return this._logger.log("CodeCoverage: Session already started"),t;try{this._sessionsData.set(e,new o.SessionData(e,i,n,r));const s={sessionId:e,runSettings:t,sourceDirectories:n,sourceFiles:i};return await this._collectionService.start(s)}catch(r){return this._logger.log(`CodeCoverage: Error starting coverage collection: ${r}`),this._sessionsData.delete(e),t}}async stop(e){if(!this._collectionService)return void this._logger.log("CodeCoverage: Collection service not initialized");const t=this._sessionsData.get(e);if(!t)return void this._logger.log("CodeCoverage: Active run not initialized");const r=await this._collectionService.stop(e);if(this._telemetryService?.sendTelemetryEvent(s.TelemetryEventNames.CoverageCollectionServerEvent,{},{[s.TelemetryEventNames.SourceDirectoriesCountProperty]:t.sourceDirectories?.length||0,[s.TelemetryEventNames.SourceFilesCountProperty]:t.sourceFiles?.length||0,[s.TelemetryEventNames.ReportsCountProperty]:r.length,[s.TelemetryEventNames.TimeProperty]:performance.now()-t.startTime}),0===r.length)return void this._logger.log("CodeCoverage: No reports generated");const n=await(0,i.getReportController)();for(const e of r)this._logger.log(`CodeCoverage: Report generated: ${e}`),t.testRun?await n.showCoverageReport(e,t.testRun):await n.openCoverageReport(e);this._sessionsData.delete(e)}}},9044(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CODE_COVERAGE_DISPLAY_NAME=t.COVERAGE_CONTROLLER_ID=t.CODE_COVERAGE_ID=void 0,t.CODE_COVERAGE_ID="csdevkit-code-coverage",t.COVERAGE_CONTROLLER_ID="csdevkit-coverage-controller",t.CODE_COVERAGE_DISPLAY_NAME="C# Dev Kit - Code Coverage"},9242(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SessionData=t.CollectionServerData=void 0,t.CollectionServerData=class{sessionId="";runSettings="";sourceDirectories=[];sourceFiles=[]},t.SessionData=class{sessionId="";sourceFiles=[];sourceDirectories=[];testRun;startTime=0;constructor(e,t,r,n){this.sessionId=e,this.sourceFiles=t,this.sourceDirectories=r,this.testRun=n,this.startTime=performance.now()}}},1459(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Descriptors=void 0;const n=r(4084);class o{static reportService=Object.freeze(new n.ServiceJsonRpcDescriptor(n.ServiceMoniker.create("Microsoft.CodeCoverage.VSCode.ReportService","1.0"),n.Formatters.MessagePack,n.MessageDelimiters.BigEndianInt32LengthHeader,{protocolMajorVersion:3}));static collectionService=Object.freeze(new n.ServiceJsonRpcDescriptor(n.ServiceMoniker.create("Microsoft.CodeCoverage.VSCode.CollectionService","1.0"),n.Formatters.MessagePack,n.MessageDelimiters.BigEndianInt32LengthHeader,{protocolMajorVersion:3}))}t.Descriptors=o},1260(e,t){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.CoverageStatus=t.LineCoverageData=t.CoverageFileData=t.CoverageRunData=void 0,t.CoverageRunData=class{fileCoverageData=[]},t.CoverageFileData=class{path="";linesCovered=0;linesNotCovered=0;linesPartiallyCovered=0;linesCoverageData=[]},t.LineCoverageData=class{coverageStatus=r.notCovered;startLine=0;endLine=0;startColumn=0;endColumn=0;blocksCovered=0;blocksNotCovered=0},function(e){e[e.covered=0]="covered",e[e.notCovered=1]="notCovered",e[e.partiallyCovered=2]="partiallyCovered"}(r||(t.CoverageStatus=r={}))},7059(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CoverageController=void 0;const n=r(5123),o=r(4773);t.CoverageController=class{_reportController;_collectionController;constructor(e,t,r,i){this._reportController=new n.ReportController(e,t,r,i),this._collectionController=new o.CollectionController(e,t,r,i)}async initialize(){await this._reportController.initialize(),await this._collectionController.initialize()}dispose(){this._reportController.dispose(),this._collectionController.dispose()}async getReportController(){return this._reportController}async getCollectionController(){return this._collectionController}}},3304(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.openCoverageFile=void 0;const n=r(1398),o={canSelectMany:!1,openLabel:"Open coverage file",canSelectFolders:!1,filters:{"Coverage files":["coverage"],"Cobertura files":["cobertura.xml"],"Xml files":["xml"],"All files":["*"]}};t.openCoverageFile=async function(){return await n.window.showOpenDialog(o).then(e=>{if(e&&e[0])return e[0].fsPath})}},5829(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCollectionController=t.getReportController=t.createCoverageControllers=void 0;const n=r(1398),o=r(6653),i=r(7059),s=r(1247),a=new n.EventEmitter,c=new Promise(e=>a.event(e));t.createCoverageControllers=async function(e,t,r,n){const c=new o.Logger;try{s.Strings.initialize(n);const o=new i.CoverageController(e,t,c,r);c.log("Created Coverage Controller"),await o.initialize(),a.fire(o),e.subscriptions.push(o)}catch(e){c.log(`unable to create coverage controller for c# extension: ${e}`)}},t.getReportController=async function(){const e=await c;return await e.getReportController()},t.getCollectionController=async function(){const e=await c;return await e.getCollectionController()}},6653(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=void 0;const n=r(1398),o=r(9044);t.Logger=class{outputChannel;constructor(){this.outputChannel=n.window.createOutputChannel(o.CODE_COVERAGE_DISPLAY_NAME)}log(e){this.outputChannel.appendLine(e)}logAndThrow(e){throw this.log(e),new Error(e)}}},5123(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReportController=void 0;const n=r(1398),o=r(6928),i=r(1260),s=r(1459),a=r(1247),c=r(3304),l=r(9044),u=r(9942);t.ReportController=class{_context;_serviceBroker;_logger;_telemetryService;_controller;_runProfile;_coverageData=new WeakMap;_reportService;constructor(e,t,r,o){this._context=e,this._serviceBroker=t,this._logger=r,this._telemetryService=o,this._controller=n.tests.createTestController(l.COVERAGE_CONTROLLER_ID,l.CODE_COVERAGE_DISPLAY_NAME),this._runProfile=this._controller.createRunProfile("Coverage",n.TestRunProfileKind.Coverage,(e,t)=>{}),this._runProfile.loadDetailedCoverage=(e,t,r)=>this.loadDetailedCoverage(t)}async initialize(){const e=await this._serviceBroker.getProxy(s.Descriptors.reportService);e?(this._reportService=e,this._context.subscriptions.push(this._reportService)):this._logger.logAndThrow("Unable to get report service")}dispose(){this._runProfile.dispose(),this._controller.dispose(),this._reportService?.dispose()}async loadDetailedCoverage(e){return this._coverageData.get(e)||[]}async openCoverageReport(e){if(!this._reportService)return void this._logger.log("Report service not available");if(!e&&!(e=await(0,c.openCoverageFile)()))return;const t=new n.TestRunRequest(void 0,void 0,this._runProfile),r=o.basename(e),i=this._controller.createTestRun(t,r,!1);await this.showCoverageReport(e,i),i.end()}async showCoverageReport(e,t){if(this._reportService)try{const r=performance.now(),o=await this._reportService.getReport(e);for(const e of o.fileCoverageData){const r=new n.FileCoverage(n.Uri.file(e.path),new n.TestCoverageCount(e.linesCovered+e.linesPartiallyCovered,e.linesCovered+e.linesNotCovered+e.linesPartiallyCovered));this._coverageData.set(r,this.getLines(e)),t.addCoverage(r)}this._telemetryService?.sendTelemetryEvent(u.TelemetryEventNames.LoadReportEvent,{},{[u.TelemetryEventNames.ModulesCountProperty]:o.fileCoverageData.length,[u.TelemetryEventNames.TimeProperty]:performance.now()-r})}catch{n.window.showErrorMessage(a.Strings.get("invalidCoverageFile"))}else this._logger.log("Report service not available")}getLines(e){const t=new Array;for(const r of e.linesCoverageData){const e=r.coverageStatus===i.CoverageStatus.covered,o=this.getRangeOrPosition(r);if(1===r.blocksCovered+r.blocksNotCovered){const r=new n.StatementCoverage(e,o);t.push(r)}else{const i=new Array;for(let e=0;e<r.blocksCovered;e++)i.push(new n.BranchCoverage(!0,o));for(let e=0;e<r.blocksNotCovered;e++)i.push(new n.BranchCoverage(!1,o));const s=new n.StatementCoverage(e,o,i);t.push(s)}}return t}getRangeOrPosition(e){const t=e.startLine-1,r=e.endLine-1,o=0===e.startColumn?0:e.startColumn-1,i=0===e.endColumn?0:e.endColumn-1;return t===r&&o===i&&0===o?new n.Position(t,o):new n.Range(t,o,r,i)}}},1247(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Strings=void 0;class r{static _strings;static initialize(e){r._strings=e}static get(e){if(!r._strings)return"<< Error loading localized string >>";return r._strings[e]||"<< Error loading localized string >>"}}t.Strings=r},9942(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TelemetryEventNames=void 0,t.TelemetryEventNames=class{static LoadReportEvent="vs/codecoverage/vscode/report/load";static CoverageCollectionServerEvent="vs/codecoverage/vscode/collection";static ModulesCountProperty="vs.codecoverage.vscode.modulesCount";static ReportsCountProperty="vs.codecoverage.vscode.reportsCount";static SourceFilesCountProperty="vs.codecoverage.vscode.sourceFilesCount";static SourceDirectoriesCountProperty="vs.codecoverage.vscode.sourceDirectoriesCount";static TimeProperty="vs.codecoverage.vscode.time"}},5537(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(1398),o=r(680),i=r(5059),s=r(5125),a=r(5811),c=r(9687);t.default=async function(e){const t=await(0,s.getOpenedSolution)(),r=c.getActiveWorkspaceRoot(),l=c.parseSolutionFolderFromContextMenu(e),u={};u[i.promptStrings.projectFilesFilterName]=["csproj"];const d=await n.window.showOpenDialog({canSelectFolders:!1,canSelectFiles:!0,canSelectMany:!1,title:i.promptStrings.addExistingProject,filters:u,openLabel:i.promptStrings.chooseProjectFileLabel,defaultUri:n.Uri.file(r)});d&&(await(0,a.executeAddExistingProject)(r,d[0].fsPath,t,l),e&&(0,o.sendFirstInteractionWithExplorerTelemetry)())}},9930(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.openProjectFileAtItem=t.canAddFileToProject=t.addFileToProject=void 0;const n=r(1398),o=r(680),i=r(5059),s=r(6928),a="linux"===process.platform;async function c(e,t){const r=await n.workspace.openTextDocument(e),o=await n.window.showTextDocument(r,{preview:!1}),i=await async function(e,t,r){const o=u(e.getText(),t,r);return void 0!==o?o:await new Promise(o=>{let i,s=!1;const a=e=>{s||(s=!0,clearTimeout(c),i?.dispose(),o(e))},c=setTimeout(()=>a(void 0),1e3);i=n.workspace.onDidChangeTextDocument(n=>{if(s||n.document.uri.toString()!==e.uri.toString())return;const o=u(n.document.getText(),t,r);void 0!==o&&a(o)})})}(r,e,t);if(void 0===i)return;const s=new n.Position(i,0),a=o.document.lineAt(i).range;o.selection=new n.Selection(s,s),o.revealRange(a,n.TextEditorRevealType.InCenter)}function l(e){return e.projectGuid?{ProjectsByProjectGuid:[[e.projectGuid]]}:{ProjectsByPath:[[e.path]]}}function u(e,t,r){const n=e.split(/\r?\n/).map(h),o=function(e,t){const r=s.relative(s.dirname(e),t),n=s.basename(t);return[...new Set([r,r.replace(/\\/g,"/"),r.replace(/\//g,"\\"),n].filter(e=>e.length>0))]}(t,r);for(const e of o){const t=h(e),r=n.findIndex(e=>e.includes('include="'+t+'"')||e.includes('link="'+t+'"'));if(-1!==r)return r}for(const e of o){const t=h(e),r=n.findIndex(e=>e.includes(t));if(-1!==r)return r}}function d(e){return s.basename(e.LinkPath||e.Path||e.FileName||e.ItemName||"")}function p(e){return!!e.LinkPath&&e.LinkPath.length>0}function h(e){const t=e.replace(/\\/g,"/");return a?t:t.toLowerCase()}function f(e){if(!e)return"";const t=s.normalize(e);return a?t:t.toLowerCase()}t.addFileToProject=async function(e,t){await async function(e){const t={context:"Projects",query:{$filter:l(e),$properties:["Id"],Folders:{$properties:["Name"]}}};await o.projectQueryableSpace.executeQuery(t)}(e);const r={update:{target:{context:"Projects",query:{$filter:l(e),$properties:["Id"]}},steps:[{AddFiles:{ItemsPath:[t]}}]}},n=await o.projectQueryableSpace.executeAction(r);n.Errors&&n.Errors.forEach(e=>{o.logger.log(e.Message)})},t.canAddFileToProject=async function(e,t){const r=await async function(e,t){const r=e.name,n=await async function(e){const t={context:"Projects",query:{$filter:l(e),$properties:["Files"],Files:{$properties:["Path","LinkPath","FileName","ItemName"]}}},r=await o.projectQueryableSpace.executeQuery(t);return r.Items?.[0]?.Files??[]}(e),c=f(t),u=s.basename(t),h=n.find(e=>f(e.Path)===c);if(h)return{kind:"duplicate-path",message:i.errorStrings.linkedFileAlreadyInProject(u,r),conflictPath:h.LinkPath||h.Path};const g=n.find(e=>function(e,t){const r=a?"variant":"accent";if(0===e.localeCompare(t,void 0,{sensitivity:r}))return!0;const n=s.parse(e).name,o=s.parse(t).name;return 0===n.localeCompare(o,void 0,{sensitivity:r})}(d(e),u));if(g){const e=(m=u,v=g,s.extname(m)?m:d(v)||m);return{kind:"duplicate-name",message:p(g)?i.errorStrings.linkedFileNameAlreadyInProject(e,r):i.errorStrings.fileNameAlreadyInProject(e,r),conflictPath:g.LinkPath||g.Path}}var m,v}(e,t);return!r||("duplicate-name"===r.kind?(await n.window.showWarningMessage(r.message,{modal:!0}),r.conflictPath&&e.path&&await c(e.path,r.conflictPath)):await n.window.showWarningMessage(r.message),!1)},t.openProjectFileAtItem=c},1820(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(1398),o=r(680),i=r(5059),s=r(8955),a=r(4835),c=r(9930),l=r(9687);t.default=async function(){const e=await(0,a.selectProject)({title:i.addNewItemUiStrings.selectProjectForLinkedFile,placeHolder:i.addNewItemUiStrings.selectProjectForLinkedFilePlaceholder});if(!e)return;const t=l.getActiveWorkspaceRoot(),r=await n.window.showOpenDialog({canSelectFolders:!1,canSelectFiles:!0,canSelectMany:!1,title:i.promptStrings.addLinkedFile,openLabel:i.promptStrings.selectFile,defaultUri:t?n.Uri.file(t):void 0});if(!r||0===r.length)return;const u=r[0].fsPath,d=new s.TelemetryActivity("add-linked-file",o.telemetryService);try{await o.logger.watch("Add a linked file to project",async function(){await(0,c.canAddFileToProject)(e,u)&&(await(0,c.addFileToProject)(e,u),await(0,c.openProjectFileAtItem)(e.path,u))},{telemetry:d})}finally{d.end(),d.sendTelemetry()}}},3331(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addNewFile=t.addNewFileFromNewFileMenu=void 0;const n=r(9896),o=r(1943),i=r(1398),s=r(680),a=r(4724),c=r(2e3),l=r(6798),u=r(5059),d=r(8955),p=r(1038),h=r(9930),f=r(4835),g=r(9687),m=r(9687),v=r(6928);async function y(e,t){if(t??=e?c.InvocationSource.solutionExplorer:c.InvocationSource.commandPalette,!e){const r=await(0,f.selectProject)({includeStandaloneFile:!0,title:u.addNewItemUiStrings.selectProjectForNewFile,placeHolder:u.addNewItemUiStrings.selectProjectPlaceholder});if(null===r)return void await async function(e){const t=new d.TelemetryActivity("add-untitled-file",s.telemetryService);t.addOrUpdateProperties({invocationSource:String(c.InvocationSource[e])});try{await s.logger.watch("create new file in buffer",async function(){await i.commands.executeCommand("workbench.action.files.newUntitledFile");const e=i.window.activeTextEditor;if(!e)return;await i.languages.setTextDocumentLanguage(e.document,"csharp");e.insertSnippet(new i.SnippetString("namespace ${3:ConsoleApp1};\n\npublic ${1|class,interface,enum,record,struct|} ${2:Class1}\n{\n\t${0}\n}\n"))},{telemetry:t})}finally{t.end(),t.sendTelemetry()}}(t);if(void 0===r)return;e=r}if(e.nodeType!==p.nodeTypes.project)return;const r=await(0,l.getTemplateService)();if(!r)return;var n=v.dirname(e.path);if(!(0,m.isWorkingDirectoryInWorkspace)(n))return void s.logger.log(`The selected node's path is located outside the workspace. ${n}`);const y=function(e){return e.path}(e),E=await async function(e,t){const r=t?await e.getProjectItemTemplates(t):await e.getSolutionItemTemplates();if(!r)throw new Error("Unable to fetch item templates");const n=r.map(e=>({label:e.name,defaultName:e.defaultName,groupIdentity:e.groupIdentity,fixedFile:e.fixedFile,fileExtension:e.fileExtension})).concat({label:u.addNewItemUiStrings.custom,defaultName:"",groupIdentity:"custom",fixedFile:!1,fileExtension:""});return n.sort((e,t)=>e.label.localeCompare(t.label)),await i.window.showQuickPick(n,{title:u.addNewItemUiStrings.createNewFile,placeHolder:u.addNewItemUiStrings.searchForTemplates})}(r,y);if(!E)return;var _=E.defaultName;if(E.fixedFile&&w(n,_,E.fileExtension)){const r=u.addNewItemUiStrings.addExistingFileToProject(_);if(await i.window.showQuickPick([u.addNewItemUiStrings.yes,u.addNewItemUiStrings.cancel],{placeHolder:r})!==u.addNewItemUiStrings.yes)return;const o=new d.TelemetryActivity("add-new-file",s.telemetryService);o.addOrUpdateProperties({solutionExplorerNodeType:e.nodeType,existingFileAdded:"true",templateGroupIdentity:E.groupIdentity,invocationSource:String(c.InvocationSource[t])});const l=g.getExtensionBrokerService(),p=await l.getProxy(a.default.solutionFileService);try{await s.logger.watch("Add a file to project",async function(){const t=_+(E.fileExtension?"."+E.fileExtension:""),r=v.join(n,t);await(0,h.addFileToProject)(e,r),i.window.showTextDocument(i.Uri.file(r))},{telemetry:o})}finally{o.end(),o.sendTelemetry(),p?.dispose()}return void(e&&(0,s.sendFirstInteractionWithExplorerTelemetry)())}if(!E.fixedFile){const e=await async function(e,t){const r="custom"!==e.groupIdentity&&null!==e.fileExtension&&void 0!==e.fileExtension;let n=e.defaultName,o=n;if(r){""===n&&(n=v.parse(t).base,o=n);let r=1;do{o=n+r.toString(),r++}while(w(t,o,e.fileExtension))}const s=await i.window.showInputBox({title:u.addNewItemUiStrings.nameNewFile,value:o,validateInput:async function(r){if(!r||0===r.length||0===r.trim().length)return u.addNewItemUiStrings.noFileName;if("custom"===e.groupIdentity){const e=r.lastIndexOf(".");if(-1!==e&&(0===r.substring(0,e).trim().length||0===r.substring(e+1).trim().length))return u.addNewItemUiStrings.noFileName}return v.isAbsolute(r)?u.addNewItemUiStrings.onlyRelative:v.parse(v.normalize(r)).dir.startsWith("..")?u.addNewItemUiStrings.outsideDirectory:(r=S(r,e.fileExtension),w(t,r,e.fileExtension))}});return s?S(s,e.fileExtension):s}(E,n);if(!e)return;const t=v.join(n,e);_=v.basename(t),n=v.dirname(t)}const b=g.getExtensionBrokerService(),P=await b.getProxy(a.default.solutionFileService),T=new d.TelemetryActivity("add-new-file",s.telemetryService);T.addOrUpdateProperties({solutionExplorerNodeType:e.nodeType,templateGroupIdentity:E.groupIdentity,invocationSource:String(c.InvocationSource[t])});const C=-1!==v.extname(y).localeCompare(".shproj",void 0,{sensitivity:"base"});T.addOrUpdateProperties({projectType:C?"SharedProject":"CSharpProject"});try{await s.logger.watch("Add a new file"+("custom"===E.groupIdentity?"":" using template: "+E.label),async function(){const t=_+(E.fileExtension?"."+E.fileExtension:""),s=v.join(n,t);if(await(0,h.canAddFileToProject)(e,s)){if("custom"===E.groupIdentity)await(0,o.writeFile)(v.join(n,_),"");else{const e=await r.createProjectItem(E.groupIdentity,_,n,y);if(e.errorMessage)return void i.window.showErrorMessage(e.errorMessage)}await(0,h.addFileToProject)(e,s),i.window.showTextDocument(i.Uri.file(s))}},{telemetry:T})}finally{T.end(),T.sendTelemetry(),P?.dispose()}}function S(e,t){return t&&e.length>t.length&&e.substring(e.length-t.length).toLowerCase()===t?e.substring(0,e.length-t.length-1):e}function w(e,t,r){const o=r?t+"."+r:t;return(0,n.existsSync)(v.join(e,o))?u.addNewItemUiStrings.fileExists:null}t.addNewFileFromNewFileMenu=async function(){await y(void 0,c.InvocationSource.newFileMenu)},t.addNewFile=y},728(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addNewProject=t.addNewProjectFromNewFileMenu=void 0;const n=r(9896),o=r(1943),i=r(1398),s=r(9768),a=r(1858),c=r(3097),l=r(680),u=r(1760),d=r(5317),p=r(4724),h=r(2e3),f=r(6798),g=r(5059),m=r(8955),v=r(9409),y=r(5125),S=r(9687),w=r(9687),E=r(6928),_=r(5033);async function b(e,t){const r=await(0,c.getAllComponentsMap)(e.asAbsolutePath("components"));let a=E.join(r["@microsoft/vscode.projectsystem.managed"],"Microsoft.TemplateEngine.VSCode.Tool.exe");await(0,v.exists)(a)||(a=void 0);const u=new m.TelemetryActivity("AddNewProject/show-list-of-templates",l.telemetryService);t??=h.InvocationSource.commandPalette;const d=i.extensions.getExtension(s.EXTENSION_ID);if(!d)throw new Error("Unable to find the extension");const p=d.exports.hasServerProcessLoaded();u.addOrUpdateProperties({serverProcessLoaded:String(!p),templateServiceInitialized:String(!f.isTemplateServiceInitialized)});const b=i.window.createQuickPick();b.busy=!0,b.items=[{label:g.addNewItemUiStrings.waitingTemplateService}],b.ignoreFocusOut=!0,b.show();let C=!1;const N=i.Disposable.from(b,b.onDidHide(()=>{C=!0}),i.window.setStatusBarMessage(g.addNewItemUiStrings.waitingTemplateService));let R=null;try{if(p||!a?R=await A.create():(R=await D.create(a),R||(l.logger.log("Failed to start project template tool. Using brokered service instead.",_.LogImportance.high),R=await A.create())),C)return void l.logger.log("Add new project command cancelled by user",_.LogImportance.low);const r=await async function(e){const t=await e.getProjectTemplates();if(!t)throw new Error("Unable to fetch project templates");const r=t.filter(e=>"Microsoft.Maui.MultiProjectApp"!==e.groupIdentity).map(e=>({label:e.name,defaultName:e.defaultName,groupIdentity:e.groupIdentity,detail:e.description}));return r.sort((e,t)=>e.label.localeCompare(t.label)),r}(R);u.sendTelemetry();const c=await i.window.showQuickPick(r,{title:g.addNewItemUiStrings.createNewProject,placeHolder:g.addNewItemUiStrings.searchForTemplates});if(!c)return;c.groupIdentity.startsWith("Microsoft.Maui")&&(i.extensions.getExtension(s.MAUI_EXTENSION_ID)||i.window.showWarningMessage(g.addNewItemUiStrings.mauiExtensionNotFound,g.addNewItemUiStrings.installMaui).then(e=>{e===g.addNewItemUiStrings.installMaui&&i.env.openExternal(i.Uri.parse(s.MAUI_EXTENSION_URL))}));const d=await async function(e,t){const r=i.workspace.workspaceFolders;if(r&&0!==r.length){const r=S.getActiveWorkspaceRoot();let n=await(0,y.getOpenedSolution)();const o=void 0!==n;s=n&&(0,v.containsFileOrFolder)(r,n)?E.dirname(n):r;const{solutionFolder:a,projectName:c}=await P(s,e,void 0!==n);if(!c)return;const l=await async function(e,t,r){const n=E.join(e,t??"."),o=g.addNewItemUiStrings.projectCreatedIn(E.join(n,r)),s=[{label:g.addNewItemUiStrings.defaultDirectory,id:"default",description:o},{label:g.addNewItemUiStrings.chooseDirectory,id:"picker"}],a=await i.window.showQuickPick(s,{title:g.addNewItemUiStrings.locationForNewProject,placeHolder:o});if(!a)return;if("default"===a.id)return n;const c=await i.window.showOpenDialog({canSelectFolders:!0,canSelectFiles:!1,canSelectMany:!1,title:g.addNewItemUiStrings.projectLocation,defaultUri:i.Uri.file(n)});return c?c[0].fsPath:void 0}(s,a,c);if(!l)return;if(!n){const e=await(0,w.selectSolutionFileFormat)(s);if(!e)return;const t=E.parse(c).name+e;n=E.join(s,t)}return{templateGroupIdentity:e.groupIdentity,projectName:c,rootDirectory:s,projectLocation:l,solutionFolder:a,fullSolutionPath:n,openFolder:!1,invocationSource:t,inOpenSolution:o}}{const r=await async function(){const e=await i.window.showOpenDialog({canSelectFolders:!0,canSelectFiles:!1,canSelectMany:!1,title:g.addNewItemUiStrings.projectLocation});if(e)return e[0].fsPath}();if(!r)return;const{solutionFolder:a,projectName:c}=await P(r,e,!0);if(!c)return;var s=r;!(0,n.existsSync)(s)||T(s)||(s=E.join(s,c),await(0,o.mkdir)(s,{recursive:!0}));const l=E.join(s,E.parse(s).name)+".sln",u=E.join(s,a??".");return{templateGroupIdentity:e.groupIdentity,projectName:c,rootDirectory:s,solutionFolder:a,fullSolutionPath:l,projectLocation:u,openFolder:!0,invocationSource:t,inOpenSolution:!1}}}(c,t);if(!d)return;await async function(e,t,r){const n=g.addNewItemUiStrings.projectCreatedIn(E.join(t.projectLocation,t.projectName)),o={label:g.addNewItemUiStrings.createProject,description:n,id:0},s={label:g.addNewItemUiStrings.showTemplateOptions,id:1},a=await i.window.showQuickPick([o,s],{title:g.addNewItemUiStrings.createProjectOrViewOptions,placeHolder:n});if(!a)return;if(0===a.id)return void await O(r,e,t,void 0);const c=await e.getProjectParameters(t.templateGroupIdentity);await I(e,t,c,r)}(R,d,e)}catch(e){l.logger.log("Error while adding new project "+e,_.LogImportance.high)}finally{N.dispose(),R?.dispose()}}async function P(e,t,r){let n,o=1;do{n=t.defaultName+o.toString(),o++}while(await C(e,n,r));const s=(await i.window.showInputBox({title:g.addNewItemUiStrings.nameNewProject,value:n,validateInput:async function(t){return t&&0!==t.length?(t=t.trim(),E.isAbsolute(t)?g.addNewItemUiStrings.onlyRelative:E.parse(E.normalize(t)).dir.startsWith("..")?g.addNewItemUiStrings.outsideDirectory:await C(e,t,r)):g.addNewItemUiStrings.noProjectName}}))?.trim();if(s){const e=E.normalize(s),t=E.dirname(e),r=E.basename(e);return t&&"."!==t?{solutionFolder:t,projectName:r}:{projectName:r}}return{}}function T(e){try{return 0===(0,n.readdirSync)(e).length}catch{return!1}}async function C(e,t,r){for(const e of'"*<>:|?')if(-1!==t.indexOf(e))return g.addNewItemUiStrings.pathInvalidChars;if(e.length+3*t.length>240)return g.addNewItemUiStrings.pathTooLong;const o=E.resolve(e,t);return(0,n.existsSync)(o)&&!T(o)?g.addNewItemUiStrings.projectDirectoryExists:!r&&await(0,w.doesSolutionContainProject)(t,!0)?g.addNewItemUiStrings.solutionContainsItem(t):null}async function I(e,t,r,n){const o=g.addNewItemUiStrings.projectCreatedIn(E.join(t.projectLocation,t.projectName)),s=[{label:g.addNewItemUiStrings.createProject,description:o,id:0},{label:g.addNewItemUiStrings.templateOptions,kind:i.QuickPickItemKind.Separator,id:-1}];var a=0;const c={};for(const e of r){a++;const t=e.selectedValue??e.defaultValue;var l=!0;if(e.visibilityConditions)for(const t of e.visibilityConditions){if(!(t.parameterId in c)){l=!1;break}var u=t.values.includes(c[t.parameterId]);if(t.negated&&(u=!u),!u){l=!1;break}}if(!l)continue;c[e.id]=t;const r=e.values?.find(e=>e.value===t)?.displayName??t,n={label:e.displayName,description:r??t,id:a};s.push(n)}const d=await i.window.showQuickPick(s,{placeHolder:g.addNewItemUiStrings.selectOption,title:g.addNewItemUiStrings.selectOptionToConfigure});d&&(0!==d.id?(await async function(e){const t=e.dataType??"choice";if("choice"===t){const t=[];for(const r of e.values)t.push({label:r.displayName,id:r.value,description:N(e,r.value)});const r=await i.window.showQuickPick(t,{title:g.addNewItemUiStrings.configureOption(e.displayName),placeHolder:g.addNewItemUiStrings.specifyValue(e.displayName)});r&&(e.selectedValue=r.id)}else if("bool"===t){const t=[{label:g.addNewItemUiStrings.trueValue,id:"true",description:N(e,"true")},{label:g.addNewItemUiStrings.falseValue,id:"false",description:N(e,"false")}],r=await i.window.showQuickPick(t,{title:g.addNewItemUiStrings.configureOption(e.displayName),placeHolder:g.addNewItemUiStrings.specifyValue(e.displayName)});r&&(e.selectedValue=r.id)}}(r[d.id-1]),await I(e,t,r,n)):await O(n,e,t,r))}async function O(e,t,r,o){await async function(e,t,r,o){const s=new m.TelemetryActivity("add-project",l.telemetryService);s.addOrUpdateProperties({openFolder:String(r.openFolder),templateGroupIdentity:r.templateGroupIdentity,invocationSource:String(h.InvocationSource[r.invocationSource]),inOpenSolution:String(r.inOpenSolution)});const c=[];try{await l.logger.watch("Instantiate a project template",async()=>{const l="Aspire.Empty"===r.templateGroupIdentity||"Aspire.Starter"===r.templateGroupIdentity||"Aspire.Empty.9"===r.templateGroupIdentity||"Aspire.Starter.9"===r.templateGroupIdentity?r.projectLocation:E.join(r.projectLocation,r.projectName),d=function(e){const t={};if(e)for(const r of e)r.selectedValue&&("bool"===r.dataType&&r.invertBoolean?t[r.name]="true"===r.selectedValue?"false":"true":t[r.name]=r.selectedValue);return t}(o),h=await t.createProject(r.templateGroupIdentity,r.projectName,l,d);if(h.errorMessage)return void i.window.showErrorMessage(h.errorMessage);if(h.postActions&&h.postActions.length>0){const g="84c0da2151c8454199406ca19af04ee6";for(const m of h.postActions)if(m.actionId.toLowerCase()===g){const v=m.args.files;v&&c.push(...v.split(";").map(e=>parseInt(e,10)).filter(e=>e>=0&&e<h.primaryOutputPaths.length).map(e=>E.resolve(E.join(r.projectLocation,r.projectName),h.primaryOutputPaths[e])).filter(e=>(0,n.existsSync)(e)).map(e=>i.Uri.file(e)))}}if(!i.workspace.workspaceFolders||0===i.workspace.workspaceFolders.length)return s.end(),s.sendTelemetry(),void await i.commands.executeCommand("vscode.openFolder",i.Uri.file(l),{filesToOpen:c});let f=!1;if(!(0,n.existsSync)(r.fullSolutionPath)){const w=E.parse(r.fullSolutionPath);if(".sln"===w.ext?await(0,y.isSlnxSupportedInWorkspace)()?await(0,u.dotnetCommand)(a.DotnetCommand.newSln,w.dir,["new","sln","-n",w.name,"-f","sln"]):await(0,u.dotnetCommand)(a.DotnetCommand.newSln,w.dir,["new","sln","-n",w.name]):".slnx"===w.ext&&await(0,u.dotnetCommand)(a.DotnetCommand.newSln,w.dir,["new","sln","-n",w.name,"-f","slnx"]),!r.openFolder){const _=i.workspace.asRelativePath(r.fullSolutionPath);await i.workspace.getConfiguration("dotnet").update("defaultSolution",_),await(0,y.default)(e,r.fullSolutionPath)}}if(h.primaryOutputPaths){const b=S.getExtensionBrokerService(),P=r.inOpenSolution?await b.getProxy(p.default.solutionFileService):null;try{let C=!1;for(const I of h.primaryOutputPaths)R(I)&&(await T(I),C=!0);if(!C){const O=(0,n.readdirSync)(l);for(const N of O)R(N)&&await T(N)}}finally{P?.dispose()}async function T(e){let t;try{const n=E.join(l,e);t=y.vscodeWorkspaceFileWatcher?.onCreateProject(n),await S.addProjectToSolution(r.rootDirectory,r.fullSolutionPath,n,r.solutionFolder),f=!0,await(P?.addProjectToFilter(n))}finally{t?.dispose()}}}f&&r.inOpenSolution&&await(0,y.reloadSolution)(r.fullSolutionPath);for(const A of c)await i.window.showTextDocument(A,{preview:!1})},{telemetry:s})}finally{s.end(),s.sendTelemetry()}r.openFolder&&await i.commands.executeCommand("vscode.openFolder",i.Uri.file(r.rootDirectory),{filesToOpen:c})}(e,t,r,o)}function N(e,t){var r=void 0;return t===e.defaultValue&&(r=g.addNewItemUiStrings.default),t===e.selectedValue&&(r=g.addNewItemUiStrings.selected),r}function R(e){return e.length>=7&&0===e.slice(-7).localeCompare(".csproj",void 0,{sensitivity:"base"})}t.addNewProjectFromNewFileMenu=async function(e){await b(e,h.InvocationSource.newFileMenu)},t.addNewProject=b;class A extends i.Disposable{templateService;static async create(){const e=await(0,f.getTemplateService)();if(!e)throw new Error("Template service is not available");return new A(e)}constructor(e){super(()=>{}),this.templateService=e}getProjectTemplates(e){return this.templateService.getProjectTemplates(e)}getProjectParameters(e,t){return this.templateService.getProjectParameters(e,t)}createProject(e,t,r,n,o){return this.templateService.createProject(e,t,r,n,o)}}class D extends i.Disposable{childProcess;readStdinLine;projectTemplates;static async create(e){const t=await(l.dotnetVersionManager?.getDotnetVersion(void 0,l.logger,void 0)),r=t?[t.format()]:[],n=d.spawn(e,r);n.stderr.on("data",e=>{l.logger.log(`Error from project template executable: ${e.toString()}`,_.LogImportance.high)}),n.on("exit",e=>{e&&l.logger.log(`Project template executable exited with code ${e}`,_.LogImportance.high)});const o=(0,v.createLineReader)(n.stdout),i=await o();if(!i)return l.logger.log("Project template executable did not return any templates",_.LogImportance.high),null;const s=JSON.parse(i);return new D(n,o,s)}constructor(e,t,r){super(()=>e.kill()),this.childProcess=e,this.readStdinLine=t,this.projectTemplates=r}async getProjectTemplates(e){return this.projectTemplates}async getProjectParameters(e,t){this.childProcess.stdin.write(`get-project-parameters:${e}\n`);const r=await this.readStdinLine();if(null===r)throw l.logger.log(`Request to get project template parameters did not return a result (group identity: ${e})`,_.LogImportance.high),new Error(`No parameters returned for group identity: ${e}`);return JSON.parse(r)}async createProject(e,t,r,n,o){let i=`instantiate-project-template:${e}::${t}::${r}`;for(const[e,t]of Object.entries(n))i+=`::${e}=${t}`;i+="\n",this.childProcess.stdin.write(i);const s=await this.readStdinLine();if(null===s)throw l.logger.log(`Request to instantiate project template did not return any result (group identity: ${e})`,_.LogImportance.high),new Error(`No template instantiation result returned for group identity: ${e}`);return this.childProcess.stdin.write("exit\n"),JSON.parse(s)}}},5562(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(1398),o=r(6943),i=r(9768),s=r(680),a=r(4724),c=r(5059),l=r(6452),u=r(9687),d=r(128),p=r(9509),h=r(8955),f=r(9351);t.default=async function(e){const t=n.extensions.getExtension(i.EXTENSION_ID);if(!t)throw new Error("Unable to find the extension.");const r=t.exports.serviceBroker,g=l.NuGetAction.add,m=new d.TelemetryEvent("nuget/add-nuget-package",s.telemetryService);try{const t=new f.NuGetConfigurationSettings;(0,p.addIncludePrereleaseTelemetry)(m,t.includePrerelease);const d=(0,u.getActiveWorkspaceRoot)(),v=await(0,l.verifyServicePrerequisites)(g,d,r,m);if(!v||!v.isPrerequisiteMet)return void(0,p.cancelAtStepTelemetry)(m,"verify-prerequisites");const y=await(0,l.getProjectFromContext)(e);e instanceof n.Uri?(0,p.addEntrypointTelemetry)(m,"file-context-menu"):(0,p.addEntrypointTelemetry)(m,"command-palette");const S=y??await(0,l.showProjectPicker)(g,m);if(!S)return void(0,p.cancelAtStepTelemetry)(m,"project-picker");const w=await async function(e,{title:t,value:r,prompt:o,placeholder:l},u,d,f){const g=n.extensions.getExtension(i.EXTENSION_ID);if(!g)throw new Error("Unable to find the extension.");const m=[],v=g.exports.serviceBroker,y=await v.getProxy(a.default.nugetCommandsService);y&&m.push(y);try{return await new Promise(i=>{const a=n.window.createInputBox();a.title=t,a.value=r,a.prompt=o,a.placeholder=l;let g=0;m.push(a.onDidAccept(async()=>{a.validationMessage="";const t=a.value;let r;a.enabled=!1,a.busy=!0,g++;const n=new h.TelemetryActivity("nuget/search-nuget-packages",s.telemetryService);try{r=await s.logger.watch("Search NuGet packages",async function(){return n.start(),r=await(0,p.runWithDurationTelemetry)(async()=>await(y?.packageSearch(e,t,d.includePrerelease)),u,"packageSearch"),n.end(),r},{telemetry:n,catchUnhandledErrors:!1})}finally{const e=r?.length??0;0===e?a.validationMessage=c.nugetStrings.noPackagesFoundError:i(r),a.busy=!1,a.enabled=!0,u.addOrUpdateMeasurements({numberOfSearches:g}),(0,p.addResultsCountTelemetry)(u,e,"packageSearch"),n.addOrUpdateMeasurements({searchTermLength:t.length}),(0,p.addResultsCountTelemetry)(n,e,"packageSearch"),(0,p.addDotnetSdkTelemetry)(n,f),n.sendTelemetry()}}),a.onDidChangeValue(async()=>{a.validationMessage=""}),a.onDidHide(()=>{i(void 0)}),a),a.show()})}finally{m.forEach(e=>e.dispose())}}(S.fullPath,{title:c.nugetStrings.addPackageTitle,value:"",placeholder:(0,l.getPrereleaseStatusPlaceholder)(t.includePrerelease,c.nugetStrings.packageSearchPlacholder)},m,t,v.value);if(void 0===w)return void(0,p.cancelAtStepTelemetry)(m,"package-search");const E=await async function(e,t){let r;const i=await n.window.showQuickPick(e?.map(e=>new o.NuGetPackageSearchQuickPick(e)),{title:c.nugetStrings.addPackageTitle,placeHolder:(0,l.getPrereleaseStatusPlaceholder)(t.includePrerelease,c.nugetStrings.packagePickerPlaceholder)});return i&&(r=i.info),r}(w,t);if(!E)return void(0,p.cancelAtStepTelemetry)(m,"package-picker");const _=await(0,l.showVersionPicker)(g,E,(0,l.retrievePackageVersions)(S.fullPath,E.id,t.includePrerelease,r,m),t);if(!_)return void(0,p.cancelAtStepTelemetry)(m,"version-picker");await s.logger.watch("Add NuGet package",async function(){const e=await r.getProxy(a.default.nugetCommandsService);try{const t=await(0,p.runWithDurationTelemetry)(async()=>await(e?.addPackage(S.fullPath,E.id,_.version)),m,"addPackage");m.addOrUpdateProperties({succeeded:String(t)})}finally{e?.dispose(),(0,p.addCompletedTelemetry)(m)}},{telemetry:m,catchUnhandledErrors:!0})}finally{m.sendTelemetry(),e&&(0,s.sendFirstInteractionWithExplorerTelemetry)()}}},2393(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addProjectReferenceByProjectPath=t.addProjectReferenceByProjectGuid=void 0;const n=r(1398),o=r(680),i=r(5059),s=r(8955),a=r(4835),c=r(6928);async function l(e){const t=await o.projectQueryableSpace.executeQuery({context:"Projects",query:{$properties:["Name","Path","Id"],$filter:{ProjectsByCapabilities:["!SharedAssetsProject"]}}});if(!t.Items?.length)return void n.window.showWarningMessage(i.errorStrings.addProjectReferenceNoProjects,{modal:!0});const r=t.Items.filter(e=>e.Path&&e.Name&&e.Id?.ProjectGuid).map(e=>({path:e.Path,label:e.Name,guid:e.Id.ProjectGuid}));return r.sort((e,t)=>e.label.localeCompare(t.label)),e?r.find(t=>t.path.toLocaleUpperCase()===e.toLocaleUpperCase()):await n.window.showQuickPick(r,{placeHolder:i.promptStrings.selectProject})}async function u(e,t){const r={update:{target:{context:"Projects",query:{$filter:{ProjectsByProjectGuid:[[e]]},$properties:["Id"]}},steps:[{AddProjectReferenceByPath:{ReferencedProjectPath:t,ReferenceType:"ProjectReference"}}]}},n=await o.projectQueryableSpace.executeAction(r);n.Errors&&n.Errors.forEach(e=>{o.logger.log(e.Message)})}t.default=async function(e){let t;if(e instanceof n.Uri)if((await n.workspace.fs.stat(e)).type===n.FileType.Directory){const r=await(0,a.getSingleProjectFromFolder)(e);r&&(t=await l(r.path))}else{const r=c.normalize(e.fsPath);t=await l(r)}if(!t&&(t=await l(),!t))return;const r=await async function(e,t,r){return await o.logger.watch("Get project to add reference to.",async()=>{const e={context:"Projects",query:{$filter:{ProjectsByProjectGuid:[[r]]},$properties:["ProjectReferences"],ProjectReferences:{$properties:["ReferencedProjectPath"]}}},s=await o.projectQueryableSpace.executeQuery(e),a=[];s.Items?.[0]?.ProjectReferences&&s.Items[0].ProjectReferences.forEach(e=>{e.ReferencedProjectPath&&a.push(e.ReferencedProjectPath)});const c={context:"Projects",query:{$filter:{ProjectsByCapabilities:["!SharedAssetsProject"]},$where:{"!=":[{".":"Name"},t]},$properties:["Name","Path"]}},l=await o.projectQueryableSpace.executeQuery(c);if(l.Items){const e=l.Items.filter(e=>e.Path&&!a.includes(e.Path)).map(e=>({path:e.Path,label:e.Name}));return 0===e.length?void n.window.showWarningMessage(i.errorStrings.addProjectReferenceNoProjects,{modal:!0}):(e.sort((e,t)=>e.label.localeCompare(t.label)),(await n.window.showQuickPick(e,{placeHolder:i.promptStrings.selectReferenceProject}))?.path)}},{catchUnhandledErrors:!1})}(t.path,t.label,t.guid);if(!r)return;const d=new s.TelemetryActivity("add-project-reference",o.telemetryService);try{await o.logger.watch("Add project reference",async()=>{await u(t.guid,r)},{telemetry:d,catchUnhandledErrors:!1})}finally{d.end(),d.sendTelemetry()}(0,o.sendFirstInteractionWithExplorerTelemetry)()},t.addProjectReferenceByProjectGuid=u,t.addProjectReferenceByProjectPath=async function(e,t){const r={update:{target:{context:"Projects",query:{$filter:{ProjectsByPath:[[e]]},$properties:["Id"]}},steps:[{AddProjectReferenceByPath:{ReferencedProjectPath:t,ReferenceType:"ProjectReference"}}]}},n=await o.projectQueryableSpace.executeAction(r);n.Errors&&n.Errors.forEach(e=>{o.logger.log(e.Message)})}},8458(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.selectProject=t.getProjectsFromFile=void 0;const n=r(1398),o=r(9768),i=r(5059),s=r(5962),a=r(8955),c=r(680),l=r(3430),u=r(6928),d=r(4701);async function p(e){const t=[],r={context:"Projects",query:{$properties:["Id","Path","Files"],Files:{$properties:["Id","Path"],$filter:{FilesByPath:[[e]]}},$where:{any:{".":"Files"}}}};try{const e=await c.projectQueryableSpace.executeQuery(r);e&&e.Items?.forEach(e=>{e&&e.Path&&t.push(e.Path)})}catch(t){c.logger.log(`Error querying projects for file '${e}': ${t}`)}return t}async function h(e){let t;if(1===e.length)t=e[0];else{const r=await n.window.showQuickPick(e,{title:i.debugProjectLaunchStrings.selectProject});if(!r)return void n.window.showWarningMessage(i.debugProjectLaunchStrings.warnNoProjectSelected);t=r}return t}t.getProjectsFromFile=p,t.selectProject=h,t.default=async function(e,t){const r=n.extensions.getExtension(o.EXTENSION_ID);if(!r)throw new Error("Unable to find the extension.");if(!n.workspace.workspaceFolders||n.workspace.workspaceFolders.length<1)return void n.window.showErrorMessage(i.debugProjectLaunchStrings.errorNoOpenFolder);const f=n.workspace.workspaceFolders[0];if(!f)return void n.window.showErrorMessage(i.debugProjectLaunchStrings.errorNoOpenFolder);const g=e?.fsPath;if(!g)return void n.window.showErrorMessage(i.debugProjectLaunchStrings.errorNoProjectFound);const m=u.extname(g).toLowerCase();if(".cs"!==m)return void n.window.showErrorMessage(i.debugProjectLaunchStrings.notSupportedFileExtension(g,m));const v=await p(g),y=await r.exports.serviceBroker.getProxy(d.TestWindowDescriptors.TestRunnerService);if(y)try{if(await y.tryRunTestProject(v,{debug:!t.noDebug}))return}finally{y.dispose()}if(v&&v.length>0){const e=await h(v);void 0!==e&&await(0,s.debugLaunch)(e,f,t,r.exports.serviceBroker,"debugFileLaunch")}else{const e=new a.TelemetryActivity("debugFileLaunch",c.telemetryService);e.addOrUpdateProperties({succeeded:String(!0)}),e.addOrUpdateMeasurements({telemetryCode:l.DebugTelemetryCode.fileBasedApp}),e.sendTelemetry(),n.debug.startDebugging(f,{name:g,type:"dotnet",request:"launch",projectPath:g,...t})}}},6121(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(1398),o=r(9768),i=r(5059),s=r(5962),a=r(9409),c=r(9896);t.default=async function(e,t){const r=n.extensions.getExtension(o.EXTENSION_ID);if(!r)throw new Error("Unable to find the extension.");if("file"!==e.scheme)throw new Error("Invalid context. Expected a file URI.");if(!n.workspace.workspaceFolders||n.workspace.workspaceFolders.length<1)return void n.window.showErrorMessage(i.debugProjectLaunchStrings.errorNoOpenFolder);const l=n.workspace.workspaceFolders[0];if(!l)return void n.window.showErrorMessage(i.debugProjectLaunchStrings.errorNoOpenFolder);const u=(d=e.fsPath,(0,a.isWindows)()?c.realpathSync.native(d):d);var d;u?await(0,s.debugLaunch)(u,l,t,r.exports.serviceBroker,"debugProjectLaunch"):n.window.showErrorMessage(i.debugProjectLaunchStrings.errorNoProjectFound)}},6858(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(1398),o=r(5059),i=r(680),s=r(5033),a=r(4724),c=r(2963);t.default=async function(e){let t;const r=await(0,c.getAllProjects)();if(!r||0===r.length)return void n.window.showErrorMessage(o.debugProjectLaunchStrings.errorNoProjectFound);const l=r.map(e=>({label:e.Name,description:e.Path})),u=await n.window.showQuickPick(l,{placeHolder:o.debugProjectLaunchStrings.selectProjectToConfigureDebugProperties,matchOnDescription:!0,matchOnDetail:!1});if(!u)return;if(t=u.description,!t)return void n.window.showErrorMessage(o.debugProjectLaunchStrings.errorNoProjectFound);const d=await e.getProxy(a.default.debugTargetFrameworkService);if(!d)throw new Error("Could not get the IDebugTargetFrameworkService proxy to call subscribe.");try{const e=await d.getLaunchSettingsPath(t,void 0);if(i.logger.log(`Launch settings path for ${t} is ${e}`,s.LogImportance.low),e&&e.length>0){try{await n.workspace.fs.stat(n.Uri.file(e))}catch(r){if(!(r instanceof n.FileSystemError&&"FileNotFound"===r.code))throw r;await d.saveLaunchSettingsFile(t,void 0),n.window.showInformationMessage(o.debugProjectLaunchStrings.launchSettingsFileCreated(e))}const r=n.Uri.file(e),i=await n.workspace.openTextDocument(r);await n.window.showTextDocument(i,{preview:!1})}}catch(e){return i.logger.log(`Error getting launch settings path for ${t}: ${e}`,s.LogImportance.low),void n.window.showErrorMessage(o.debugProjectLaunchStrings.errorGettingLaunchSettingsPath(e))}finally{d&&d.dispose()}}},8928(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publishFolder=t.cleanFolder=t.rebuildFolder=t.buildFolder=void 0;const n=r(1398),o=r(5059),i=r(7589),s=r(4855),a=r(4835),c=r(71);async function l(e,t,r){const n=await(0,a.selectProjects)(e);return!(!n||0===n.length)&&(0,s.executeBuildActionOnProjects)(n,t,r)}t.buildFolder=(e,t)=>l(t,{action:i.BUILD},e),t.rebuildFolder=(e,t)=>l(t,{action:i.BUILD,noIncremental:!0},e),t.cleanFolder=(e,t)=>l(t,{action:i.CLEAN},e),t.publishFolder=e=>async function(e){const t=await(0,a.selectProjects)(e);t&&0!==t.length&&await n.window.withProgress({location:n.ProgressLocation.Window,title:`${o.messageStrings.publishMessage} ${o.messageStrings.projectsMessage(t.length)}`,cancellable:!1},async e=>{const r=t.length;for(let o=0;o<t.length;o++){const i=t[o],s=i.name||"Unknown";e.report({increment:0===o?0:Math.round(100/r),message:r>1?`${s} (${o+1}/${r})`:s}),await(0,c.default)(i.path?n.Uri.file(i.path):void 0)}})}(e)},2104(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FolderContextManager=void 0;const n=r(1398),o=r(6928);t.FolderContextManager=class{workspaceProjectService;subscription;constructor(e){this.workspaceProjectService=e,this.updateFolderContext(),this.subscription=this.workspaceProjectService.onDidChangeProjects(()=>this.updateFolderContext())}updateFolderContext(){const e=this.getFoldersWithProjects().map(e=>e.fsPath);n.commands.executeCommand("setContext","csdevkit.foldersWithProjects",e)}getFoldersWithProjects(){const e=(n.workspace.workspaceFolders??[]).map(e=>e.uri.fsPath),t=t=>e.some(e=>{const r=o.relative(e,t);return""!==r&&".."!==r&&!r.startsWith(".."+o.sep)&&!o.isAbsolute(r)}),r=new Set,i=[];for(const e of this.workspaceProjectService.getWorkspaceItems()){let s=o.dirname(e.path);for(;t(s);){const e=n.Uri.file(s),t=e.fsPath;if(r.has(t))break;r.add(t),i.push(e);const a=o.dirname(s);if(a===s)break;s=a}}return i}dispose(){this.subscription?.dispose()}}},866(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getHotReloadClientService=t.showHotReloadPanel=t.hotReload=void 0;const n=r(9768),o=r(4724),i=r(1857),s=r(1412),a=r(5059),c=r(1398);t.hotReload=async function(){const e=await(0,t.getHotReloadClientService)();try{if(null===e)return void await s.hotReloadLogger.log(new s.HotReloadLogMessage(s.HotReloadVerbosity.minimal,a.hotReloadStrings.serviceNotFound));const t=await e.applyChanges();if(await s.hotReloadLogger.log(new s.HotReloadLogMessage(s.HotReloadVerbosity.diagnostic,`Hot Reload result: ${JSON.stringify(t)}`)),t.result===i.HotReloadResult.applied||t.result===i.HotReloadResult.noChanges)return;if(t.result===i.HotReloadResult.errorEdits){const e={modal:!0,detail:a.dotnetDebugConfigurationServiceStrings.hotReloadUnableToBuildChangesDetails(t.errorDescriptions)};return void await c.window.showWarningMessage(a.dotnetDebugConfigurationServiceStrings.hotReloadUnableToBuildChangesTitle,e)}{const e=a.dotnetDebugConfigurationServiceStrings.hotReloadChangeNotSupportMessage;await s.hotReloadLogger.log(new s.HotReloadLogMessage(s.HotReloadVerbosity.minimal,e));const t={modal:!0,detail:e};await c.window.showWarningMessage(a.dotnetDebugConfigurationServiceStrings.hotReloadNotSupportedTitle,t)}}catch(e){const t=a.hotReloadStrings.exceptionWhenApplying+e;await s.hotReloadLogger.log(new s.HotReloadLogMessage(s.HotReloadVerbosity.detailed,t))}finally{e?.dispose()}},t.showHotReloadPanel=async function(e){await s.hotReloadLogger.outputChannel().show()},t.getHotReloadClientService=async()=>{const e=c.extensions.getExtension(n.EXTENSION_ID);if(!e)throw new Error("Unable to find the extension: "+n.EXTENSION_ID);const t=e.exports.serviceBroker,r=await t.getProxy(o.default.hotReloadService);if(!r)throw new Error("Hot Reload service not available.");return r}},4628(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r="csdevkit",n=new class{openSolution=`${r}.openSolution`;addNewProject=`${r}.addNewProject`;addNewProjectFromNewFileMenu=`${r}.addNewProjectFromNewFileMenu`;addNuGetPackage=`${r}.addNuGetPackage`;updateNuGetPackage=`${r}.updateNuGetPackage`;removeNuGetPackage=`${r}.removeNuGetPackage`;showNuGetOutput=`${r}.showNuGetOutput`;showEntitlementsStatus=`${r}.showEntitlementsStatus`;addExistingProject=`${r}.addExistingProject`;addLinkedFile=`${r}.addLinkedFile`;buildAndRunTests=`${r}.buildAndRunTests`;buildSolution=`${r}.buildSolution`;rebuildSolution=`${r}.rebuildSolution`;cleanSolution=`${r}.cleanSolution`;signIntoVsAccount=`${r}.signIntoVsAccount`;searchProjectFromCommandPalette=`${r}.searchProjectFromCommandPalette`;searchOpenFromCommandPalette=`${r}.searchOpenFromCommandPalette`;searchFromCommandPalette=`${r}.searchFromCommandPalette`;addNewFile=`${r}.addNewFile`;addNewFileFromNewFileMenu=`${r}.addNewFileFromNewFileMenu`;addProjectReference=`${r}.addProjectReference`;removeProjectReference=`${r}.removeProjectReference`;openProjectsLogsView=`${r}.openProjectsLogsView`;openDevKitOutputWindow=`${r}.openDevKitOutputWindow`;hotReload=`${r}.debug.hotReload`;showHotReloadPanel=`${r}.debug.showHotReloadPanel`;debugProjectLaunch=`${r}.debug.projectDebugLaunch`;noDebugProjectLaunch=`${r}.debug.noDebugProjectLaunch`;debugProperties=`${r}.debug.debugProperties`;stepIntoProjectLaunch=`${r}.debug.stepIntoProjectLaunch`;debugFileLaunch=`${r}.debug.fileLaunch`;noDebugFileLaunch=`${r}.debug.noDebugFileLaunch`;selectStartupProject=`${r}.debug.selectStartupProject`;selectLaunchConfiguration=`${r}.debug.selectLaunchConfiguration`;selectLaunchTargetFramework=`${r}.debug.selectLaunchTargetFramework`;installDotnetSdk=`${r}.installDotnetSdk`;installDotnetSdkFromWalkthrough=`${r}.installDotnetSdk.fromWalkthrough`;checkDotnetRequirements=`${r}.checkDotnetRequirements`;webviewRunCommand=`${r}.webview.runCommand`;helperOpenUrl=`${r}.helper.openUrl`;selectActiveConfiguration=`${r}.selectActiveConfiguration`;openCoverageReport=`${r}.openCoverageReport`;saveSolutionFile=`${r}.saveSolutionFile`;collectLogs=`${r}.collectLogs`;manageUserSecrets=`${r}.manageUserSecrets`;publish=`${r}.publish`;buildFolder=`${r}.buildFolder`;rebuildFolder=`${r}.rebuildFolder`;cleanFolder=`${r}.cleanFolder`;publishFolder=`${r}.publishFolder`;showProjectDetailsMigration=`${r}.showProjectDetailsMigration`};t.default=n},521(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.manageUserSecrets=void 0;const n=r(1398),o=r(6928),i=r(857),s=r(9896),a=r(5317),c=r(9023),l=r(5059),u=(0,c.promisify)(a.exec);t.manageUserSecrets=async function(e){let t="";if(e)e instanceof n.Uri&&(t=e.fsPath);else{const e=n.window.activeTextEditor;t=e&&".csproj"===o.extname(e.document.uri.fsPath)?e.document.uri.fsPath:await async function(){const e=await n.workspace.findFiles("**/*.csproj");if(0===e.length)return void n.window.showErrorMessage("No .csproj files found in the workspace");if(1===e.length)return e[0].fsPath;const t=e.map(e=>{const t=n.workspace.getWorkspaceFolder(e);return{label:t?o.relative(t.uri.fsPath,e.fsPath):e.fsPath,description:t?.name||"",fullPath:e.fsPath}}).sort((e,t)=>e.label.localeCompare(t.label,void 0,{sensitivity:"base"})),r=await n.window.showQuickPick(t,{placeHolder:l.promptStrings.selectSourceProject,title:l.promptStrings.selectSourceProject});return r?.fullPath}()||""}if(t&&".csproj"===o.extname(t))try{const e=await async function(e){try{const t=(await s.promises.readFile(e,"utf8")).match(/<UserSecretsId>(.*?)<\/UserSecretsId>/);if(t)return t[1];const{stdout:r,stderr:o}=await u(`dotnet user-secrets init --project "${e}"`);if(o)return n.window.showErrorMessage(`Failed to initialize user secrets. Make sure you have the required permissions and .NET SDK installed.\nError: ${o}`),null;const i=(await s.promises.readFile(e,"utf8")).match(/<UserSecretsId>(.*?)<\/UserSecretsId>/);return i?i[1]:null}catch(e){throw new Error(`Failed to get/create user secrets ID: ${e instanceof Error?e.message:String(e)}`)}}(t);if(!e)return void n.window.showErrorMessage("Failed to get or create user secrets ID");const r=function(e){return"win32"===i.platform()?o.join(i.homedir(),"AppData","Roaming","Microsoft","UserSecrets",e,"secrets.json"):o.join(i.homedir(),".microsoft","usersecrets",e,"secrets.json")}(e);await async function(e){try{await s.promises.mkdir(o.dirname(e),{recursive:!0}),s.existsSync(e)||await s.promises.writeFile(e,"{\n\n}","utf8")}catch(e){throw new Error(`Failed to create secrets file: ${e instanceof Error?e.message:String(e)}`)}}(r);const a=await n.workspace.openTextDocument(r);await n.window.showTextDocument(a)}catch(e){n.window.showErrorMessage("Error opening user secrets file")}else n.window.showErrorMessage("Please select a .csproj file")}},7194(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(5829);t.default=async function(){let e=await(0,n.getReportController)();await e.openCoverageReport()}},3262(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(680);t.default=function(){n.logger.show()}},1242(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(1398),o=r(9768),i=r(4724);t.default=async function(){const e=n.extensions.getExtension(o.EXTENSION_ID);if(!e)throw new Error("Unable to find the extension.");const t=e.exports.serviceBroker,r=await t.getProxy(i.default.logOutputChannelService,{activationArguments:{outputChannelName:"Projects"}});r&&r.show()}},5125(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getOpenedSolution=t.reloadSolution=t.findAnyProjectFiles=t.findTopLevelSolutionFiles=t.findAllSolutionAndFilterFiles=t.isSlnxSupportedInWorkspace=t.hybridOpenSolutionInWorkspace=t.vscodeWorkspaceFileWatcher=t.DISABLE_SOLUTION_SETTING_VALUE=void 0;const n=r(9896),o=r(9589),i=r(1398),s=r(9768),a=r(5033),c=r(1858),l=r(680),u=r(4724),d=r(8477),p=r(5059),h=r(8955),f=r(128),g=r(9409),m=r(5811),v=r(9073),y=r(9687),S=r(6760),w="<CreateNew>";let E,_;t.DISABLE_SOLUTION_SETTING_VALUE="disable";let b=!1;function P(){const e=N();return function(e){l.solutionExplorerProvider?l.solutionExplorerProvider.prepareOpenSolution():async function(e){try{const t=await e.getProxy(u.default.projectQueryExecutionService);t?.dispose()}catch(e){l.logger.log("Failed to get project service"+e)}}(e).catch(e=>{})}(e),{serviceBroker:e,telemetryActivity:new h.TelemetryActivity("open-solution",l.telemetryService)}}function T(){const e=i.workspace.getConfiguration("dotnet").get("defaultSolution"),r=e===t.DISABLE_SOLUTION_SETTING_VALUE||Boolean(e?.trim());return l.logger.log(`Checking if user has selected a default solution. Current value: ${e??"not set"}, selected: ${r}`,a.LogImportance.low),r}function C(){l.logger.log("Disposing aggressive prompt trigger",a.LogImportance.low),E?.dispose(),E=void 0}function I(e,t){l.logger.log("Checking if aggressive prompt to open solution needs to be triggered...",a.LogImportance.low),(0,y.isCSharpRelatedFile)(t)&&(T()?C():_?l.logger.log("Aggressive prompt to open solution is already in progress, skipping trigger...",a.LogImportance.low):_=async function(e){if(T())return void C();const t=!b;b=!0;const r=t?await i.window.showWarningMessage(p.promptStrings.forceOpenSolutionModal,{modal:!0},p.promptStrings.openSolution,p.promptStrings.openNewWorkspace):await i.window.showWarningMessage(p.promptStrings.forceOpenSolutionModal,p.promptStrings.openSolution,p.promptStrings.openNewWorkspace);r===p.promptStrings.openSolution?(await O(e,void 0),C()):r===p.promptStrings.openNewWorkspace&&(await i.commands.executeCommand("vscode.openFolder"),C())}(e).catch(e=>l.logger.log(`Failed to show open solution modal: ${e}`)).finally(()=>{_=void 0,T()&&C()}))}async function O(e,t){const{serviceBroker:r,telemetryActivity:n}=P();if(t)return l.firstExplorerInteractionTelemetry?.addOrUpdateProperties({noSolution:"false"}),".slnx"!==S.extname(t.toString())||await R()?await A(e,t,r,n):void await i.window.showErrorMessage(p.errorStrings.errorSlnxNotSupported(t.toString()));const o=await R(),s=await D(void 0,o);n.addOrUpdateMeasurements({solutionFilesFound:s.length});let a=!1;const c=i.workspace.workspaceFolders;if(!s)throw new Error("No workspace is opened");if(0===s.length){if(!(await k()&&c&&c.length>=1))throw new Error(p.errorStrings.noSolutionInWorkspace);t=w}else if(1===s.length&&".slnf"!==S.extname(s[0].toString()))t=s[0];else{let e;if(c&&1===c.length){const t=c[0].uri.fsPath;e=s.map(e=>S.relative(t,e.fsPath))}else e=s.map(e=>e.fsPath);if(!(t=await i.window.showQuickPick(e.sort(),{placeHolder:p.chooseSolutionToOpen})))return;a=!0}return n.addOrUpdateProperties({showedSolutionPicker:String(a)}),e&&(l.firstExplorerInteractionTelemetry?.addOrUpdateProperties({noSolution:"true"}),(0,l.sendFirstInteractionWithExplorerTelemetry)()),await A(e,t,r,n)}function N(){const e=i.extensions.getExtension(s.EXTENSION_ID);if(!e)throw new Error("Unable to find the extension.");return e.exports.serviceBroker}async function R(e=void 0){const t=o.parse(`${s.NET_SDK_VERSION_SUPPORTING_SLNX}`);if(!t)return!1;if(e){if(await r(e))return!0}else if(i.workspace.workspaceFolders&&i.workspace.workspaceFolders.length>0)for(const e of i.workspace.workspaceFolders)if(await r(e.uri.fsPath))return!0;return!1;async function r(e){const r=await(l.dotnetVersionManager?.getDotnetVersion(e,l.logger));return(r&&r.compareMain(t)>=0)??!1}}async function A(e,t,r,o,s){if(l.environmentStateManager)return await l.environmentStateManager.runOperation(async()=>l.logger.watch("Opening a solution",()=>async function(e,t,r,o){o.start();try{if(l.environmentStateManager){const c="string"==typeof t?t===w?null:await(0,y.convertToFullPath)(t):t.fsPath,p=l.environmentStateManager.getOpenedSolution(),h=l.environmentStateManager.getDisplaySolutionName(),g=void 0!==h&&h.toLowerCase()!==(c?S.basename(c).toLowerCase():void 0);if(p&&p.toLowerCase()===c?.toLowerCase()&&!g)return void l.logger.log("Solution is already opened.");const m=e.workspaceState.get("configSetting",null),E=await l.logger.watch(null!==c?`processing the solution file "${c}" in C# Dev Kit server`:"collecting .csproj files in the workspace in C# Dev Kit server",async function(){if(l.environmentStateManager){l.environmentStateManager.getLatestEnvironmentState()&&await l.logger.watch("closing any previously opened solution",async()=>await l.environmentStateManager.closeSolution()),l.logger.log(`Checking if the opened file is a solution filter: ${c}`),c&&c.toLowerCase().endsWith(".slnf")?l.environmentStateManager.setOpenedFilterFile(c):l.environmentStateManager.setOpenedFilterFile(void 0);const t=i.workspace.workspaceFolders;let u=[];if(t)for(let e=0;e<t?.length;e++){const r=t[e].uri;"file"===r.scheme&&r.fsPath&&u.push(r.fsPath)}0===u.length&&l.logger.log("Fail to locate workspace root folder.",a.LogImportance.high);let d,p=c??void 0;return c?(o.addOrUpdateProperties({extensionType:S.extname(c),isSolutionless:"false"}),d=await l.environmentStateManager.setSolutionAndFolderWorkspace(c,u,m)):(d=await async function(e,t,r,o,i){const s=new f.TelemetryEvent("generate-sln",l.telemetryService);s.addOrUpdateProperties({outside:"true"}),s.sendTelemetry();const c=e.storageUri?.fsPath??null;return l.logger.log(`Generate solution file outside of the workspace at ${c}`,a.LogImportance.low),i.addOrUpdateProperties({isSolutionless:"true"}),new f.TelemetryEvent("sln-less-experience",l.telemetryService).sendTelemetry(),await async function(e){const t=j((0,y.getActiveWorkspaceRoot)());if(t){l.logger.log(`global.json found at ${t}`);try{const r=S.join(e,"global.json");await n.promises.mkdir(e,{recursive:!0}),await n.promises.copyFile(t,r)}catch(e){l.logger.log(e)}}}(c),await t.openNoSolutionWorkspace(r,c,o)}(e,l.environmentStateManager,u,m,o),s=d.containsTemporarySolutionFile),1===d.solutions.length&&(l.projectInitializationStatus&&(l.projectInitializationStatus.init(r).catch(e=>l.logger.log(e)),l.projectInitializationStatus.onEnvironmentUpdate(d.version,d.solutions.length,d.errors)),p=d.solutions[0],!s&&t&&e&&(c&&c.toLowerCase().endsWith(".slnf")?await e.workspaceState.update("defaultSolution",c):await e.workspaceState.update("defaultSolution",p))),d}return null},{telemetry:o}),_=1===E?.solutions.length?E.solutions[0]:void 0;if(_){await async function(){await i.commands.executeCommand("setContext","solutionOpened",!0),await i.commands.executeCommand("setContext","solutionExplorerVisible",!0),l.firstExplorerInteractionTelemetry&&await(0,v.autoExpandSolutionExplorerAsync)(),async function(){const e=l.environmentStateManager?.getLatestEnvironmentState();e&&await l.logger.watch("Restoring NuGet packages",async()=>{const t=N(),r=await t.getProxy(u.default.nugetSolutionRestoreService);r&&(r.setState(),e.projects.length>0&&await r.restoreSolution(),r.dispose())},{catchUnhandledErrors:!0})}().catch()}();var d=l.environmentStateManager?.getLatestEnvironmentState()?.configuration;const e=m??"<Default>";l.logger.log(`Selected configuration: ${e}, active configuration: ${d}`)}return _}}catch(e){if(e instanceof Error&&t.toString().endsWith(".slnf"))return e.message.includes("JSON")?void i.window.showErrorMessage(p.errorStrings.openSolutionFilterFailed):void i.window.showErrorMessage(p.errorStrings.errorNoSolutionDectectedForFilter(t.toString()));throw await i.commands.executeCommand("setContext","solutionOpened",!1),new c.SolutionOpenError(p.errorStrings.errorDuringOpenSolution(e?.toString()))}finally{o.end(),o.sendTelemetry()}}(e,t,r,o)));l.logger.log("Cannot open solution without environmentStateManager",a.LogImportance.high)}async function D(e,t=!1){const r=t?"**/*.{sln,slnx,slnf}":"**/*.{sln,slnf}";return await i.workspace.findFiles(r,"**/{node_modules,obj,bin}/**",e)}async function x(e=!1,t){const r=e?"*.{sln,slnx,slnf}":"*.{sln,slnf}";return await i.workspace.findFiles(r,"**/{node_modules,obj,bin}/**",t)}async function k(){const e=await i.workspace.findFiles("**/*.csproj",m.PROJECT_FILE_EXCLUDE_GLOB,1);return e&&e.length>0&&e[0]}function j(e){let t=e;for(;;){const e=S.join(t,"global.json");if(n.existsSync(e))return e;const r=S.dirname(t);if(r===t)return;t=r}}t.hybridOpenSolutionInWorkspace=async function(e,r){const n=await R();if(t.vscodeWorkspaceFileWatcher??=new d.WorkspaceFileWatcher(e),e.subscriptions.push(t.vscodeWorkspaceFileWatcher),r){if(r===t.DISABLE_SOLUTION_SETTING_VALUE)return void l.logger.log("Solution opening is disabled by user setting");if(".slnx"===S.extname(r)&&!n){const e=j((0,y.getActiveWorkspaceRoot)())?p.errorStrings.errorInstalledSDKNotMet(r):p.errorStrings.errorSlnxNotSupported(r);return void await i.window.showErrorMessage(e)}if(r=await(0,y.convertToFullPath)(r),await(0,g.fileOrDirectoryExists)(r)){const{serviceBroker:t,telemetryActivity:n}=P();try{return l.firstExplorerInteractionTelemetry?.addOrUpdateProperties({noSolution:"false"}),void await A(e,r,t,n,!0)}catch(e){l.logger.log(`Failed to open solution '${r}': ${e}`),await async function(){await i.workspace.getConfiguration("dotnet").update("defaultSolution",void 0,i.ConfigurationTarget.Workspace)}(),n.end(),n.sendTelemetry()}}}const o=await x(n,2);if(0===o.length){const{serviceBroker:t,telemetryActivity:r}=P();return r.addOrUpdateMeasurements({solutionFilesFound:o.length}),l.logger.log("No solution file detected in the workspace, opening workspace development model",a.LogImportance.low),await A(e,w,t,r,!0)}if(1===o.length){const{serviceBroker:t,telemetryActivity:r}=P();return r.addOrUpdateMeasurements({solutionFilesFound:o.length}),l.logger.log("One solution file detected in the workspace, opening it",a.LogImportance.low),await A(e,o[0].fsPath,t,r,!0)}return l.logger.log("Multiple solution files detected in the workspace, prompting user to select one",a.LogImportance.low),function(e){if(T())return l.logger.log("Default solution is already set, no need to trigger aggressive prompt"),void C();E||(E=i.Disposable.from(i.window.onDidChangeActiveTextEditor(t=>{I(e,t?.document)}),i.workspace.onDidOpenTextDocument(t=>{I(e,t)}),i.workspace.onDidChangeConfiguration(e=>{e.affectsConfiguration("dotnet.defaultSolution")&&T()&&C()})),e.subscriptions.push(E)),I(e,i.window.activeTextEditor?.document)}(e)},t.default=O,t.isSlnxSupportedInWorkspace=R,t.findAllSolutionAndFilterFiles=D,t.findTopLevelSolutionFiles=x,t.findAnyProjectFiles=k,t.reloadSolution=async function(e){l.environmentStateManager?await l.logger.watch("Reload a solution",async function(){try{const t=await l.environmentStateManager.loadSolution(e);l.projectInitializationStatus?.onEnvironmentUpdate(t.version,t.solutions.length,t.errors)}catch(e){throw new c.SolutionReloadError(p.errorStrings.errorDuringReloadSolution(e?.toString()))}}):l.logger.log("Cannot reload solution without environmentStateManager",a.LogImportance.high)},t.getOpenedSolution=async function(){return l.environmentStateManager?.getOpenedSolution()}},4835(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSingleProjectFromFolder=t.selectProject=t.selectProjects=void 0;const n=r(1398),o=r(1038),i=r(5125),s=r(5059),a=r(680),c=r(9071),l=r(6928);function u(e){const t=h(e);return{path:e.Path||"",name:t,nodeType:o.nodeTypes.project,projectGuid:e.Id?.ProjectGuid||e.Guid||""}}function d(e){return{path:e.path,name:e.name,nodeType:o.nodeTypes.project,projectGuid:"",isUnloaded:!0}}async function p(e){if(!a.projectQueryableSpace)return[];const t={context:"Projects",query:{$properties:["Name","Path","Id","Guid"],$filter:{ProjectsByCapabilities:["!SharedAssetsProject"]}}};try{const r=await a.projectQueryableSpace.executeQuery(t),n=[];if(r&&r.Items?.forEach(e=>{e&&n.push(e)}),e){const t=e.fsPath;return n.filter(e=>e.Path&&(0,c.isUnderFolder)(e.Path,t))}return n}catch{return[]}}function h(e){return e.Name??l.basename(e.Path??"",l.extname(e.Path??""))}t.selectProjects=async function(e){const t=await(0,i.getOpenedSolution)(),r=await p(e),f=function(e,t,r){let o=a.workspaceProjectService.getWorkspaceItems();if(0===o.length)return[];if(r){const e=r.fsPath;o=o.filter(t=>(0,c.isUnderFolder)(t.path,e))}if(t){const e=n.Uri.file(t).fsPath;o=o.filter(t=>n.Uri.file(t.path).fsPath!==e)}if(0===e.length)return o;const i=e.flatMap(e=>e.Path?[n.Uri.file(e.Path).fsPath]:[]);return o.filter(e=>!i.includes(n.Uri.file(e.path).fsPath))}(r,t,e),g=r.length>0,m=f.length>0;if(!g&&!m)return n.window.showWarningMessage(e?s.promptStrings.noProjectsFoundInFolder:s.promptStrings.noProjectsFoundInWorkspace),[];if(e&&1===r.length&&!m)return[u(r[0])];if(e&&0===r.length&&1===f.length&&!f[0].isSolution)return[d(f[0])];const v=e?void 0:await async function(){const e=n.window.activeTextEditor?.document;if(!e?.fileName)return;const t=e.fileName;let r;r=".csproj"===l.extname(t).toLowerCase()||".shproj"===l.extname(t).toLowerCase()?{context:"Projects",query:{$properties:["Id","Path","Guid"],$filter:{ProjectsByPath:[[t]]}}}:{context:"Projects",query:{$properties:["Id","Files"],Files:{$properties:["Id"],$filter:{FilesByPath:[[t]]}},$where:{any:{".":"Files"}}}};try{const e=await a.projectQueryableSpace.executeQuery(r),t=e.Items?.[0];if(t?.Id?.ProjectPath)return{name:l.basename(t.Id.ProjectPath,l.extname(t.Id.ProjectPath)),path:t.Id.ProjectPath}}catch(e){console.log("Failed to get current project:",e)}}(),y=[];if(t){const e=a.environmentStateManager?.isSolutionGeneratedOutsideWorkspace()?s.promptStrings.workspaceSeparatorLabel:s.promptStrings.solutionSeparatorLabel;y.push({label:e,kind:n.QuickPickItemKind.Separator});const r={label:"All Projects",description:t,isSolutionOption:!0,picked:!v};y.push(r)}if(g){const t=e?s.promptStrings.loadedProjectsSeparatorLabel:s.promptStrings.projectsSeparatorLabel;y.push({label:t,kind:n.QuickPickItemKind.Separator});const o=r.sort((e,t)=>h(e).localeCompare(h(t))).map(e=>{const t=h(e),r=v&&l.normalize(e.Path??"")===l.normalize(v.path);return{label:t,description:e.Path,loadedProject:e,picked:!!r}});y.push(...o)}if(m){y.push({label:s.promptStrings.unloadedSeparatorLabel,kind:n.QuickPickItemKind.Separator});const e=[...f].sort((e,t)=>e.isSolution!==t.isSolution?e.isSolution?-1:1:e.name.localeCompare(t.name)).map(e=>({label:e.name,description:e.path,workspaceItem:e}));y.push(...e)}const S=await n.window.showQuickPick(y,{placeHolder:e?s.promptStrings.multiSelectProjectsInFolder:s.promptStrings.multiSelectProjectOrSolution,title:e?s.promptStrings.selectProjectsInFolder:s.promptStrings.selectProjectOrSolution,canPickMany:!0,ignoreFocusOut:!0});if(!S)return[];const w=[];for(const e of S)e.isSolutionOption?e.description&&w.push({path:e.description,name:e.label,nodeType:o.nodeTypes.solution}):e.loadedProject?w.push(u(e.loadedProject)):e.workspaceItem&&w.push(d(e.workspaceItem));return w},t.selectProject=async function(e){const t=e?.includeStandaloneFile??!1,r=await p(),o=[];if(r.length>0&&(o.push({label:s.addNewItemUiStrings.projectsSeparator,kind:n.QuickPickItemKind.Separator}),o.push(...r.sort((e,t)=>h(e).localeCompare(h(t))).map(e=>({label:h(e),description:e.Path,loadedProject:e})))),t&&(o.push({label:s.addNewItemUiStrings.standaloneFileSeparator,kind:n.QuickPickItemKind.Separator}),o.push({label:s.addNewItemUiStrings.noProjectNewFile,description:s.addNewItemUiStrings.noProjectNewFileDescription,isStandaloneFile:!0})),0===o.length)return void n.window.showWarningMessage(s.promptStrings.noProjectsFoundInWorkspace);const i=await n.window.showQuickPick(o,{title:e?.title,placeHolder:e?.placeHolder});return i?i.isStandaloneFile?null:i.loadedProject?u(i.loadedProject):void 0:void 0},t.getSingleProjectFromFolder=async function(e){const t=e.fsPath,r=a.workspaceProjectService.getWorkspaceItems().filter(e=>!e.isSolution&&(0,c.isUnderFolder)(e.path,t));if(0===r.length)return;if(1===r.length)return{path:r[0].path,name:r[0].name};const o=r.sort((e,t)=>e.name.localeCompare(t.name)).map(e=>({label:e.name,description:e.path,projectPath:e.path})),i=await n.window.showQuickPick(o,{placeHolder:s.promptStrings.selectProjectsInFolder,title:s.promptStrings.selectProjectsInFolder});return i?{path:i.projectPath,name:i.label}:void 0}},71(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(1398),o=r(2963),i=r(680),s=r(4835),a="publish";async function c(e,t){const r=i.dotnetSdkPath??("win32"===process.platform?"dotnet.exe":"dotnet"),o={cwd:t.uri.fsPath,env:{DOTNET_CLI_UI_LANGUAGE:n.env.language}},s=new n.ShellExecution(r,[a,e],o),c=new n.Task({type:"dotnet",task:a},t,`publish ${e}`,"dotnet",s);c.presentationOptions={reveal:n.TaskRevealKind.Always,panel:n.TaskPanelKind.Dedicated};const l=await n.tasks.executeTask(c);return new Promise(t=>{const r=n.tasks.onDidEndTaskProcess(n=>{n.execution===l&&(r.dispose(),0!==n.exitCode&&i.logger.log(`dotnet publish exited with code ${n.exitCode} for ${e}`),t())})})}t.default=async function(e){const t=await async function(e){if(e instanceof n.Uri)return e.fsPath;var t=await(0,s.selectProjects)();if(!t||0===t.length)return;const r=t.map(e=>e.path||"").filter(e=>""!==e);return r.length>0?r:void 0}(e);if(!t)return;const r=(0,o.getOpenedWorkspaceHelper)();if(!r)return void i.logger.log("Cannot find the current workspace folder. The publish operation is aborted.");const a=Array.isArray(t)?t:[t];for(const e of a)await c(e,r)}},91(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(1398),o=r(9768),i=r(680),s=r(4724),a=r(6452),c=r(9687),l=r(128),u=r(9509);t.default=async function(e){const t=n.extensions.getExtension(o.EXTENSION_ID);if(!t)throw new Error("Unable to find the extension.");const r=t.exports.serviceBroker,d=a.NuGetAction.remove,p=new l.TelemetryEvent("nuget/remove-nuget-package",i.telemetryService);try{const t=(0,c.getActiveWorkspaceRoot)(),o=await(0,a.verifyServicePrerequisites)(d,t,r,p);if(!o||!o.isPrerequisiteMet)return void(0,u.cancelAtStepTelemetry)(p,"verify-prerequisites");const l=await(0,a.getProjectFromContext)(e),h=(0,a.getPackageFromContext)(e);e instanceof n.Uri?(0,u.addEntrypointTelemetry)(p,"file-context-menu"):l?(0,u.addEntrypointTelemetry)(p,"package-dependency-context-menu"):(0,u.addEntrypointTelemetry)(p,"command-palette");const f=l??await(0,a.showProjectPicker)(d,p);if(!f)return void(0,u.cancelAtStepTelemetry)(p,"project-picker");let g;const m=(0,a.retrieveInstalledPackages)(f.fullPath,r,p);if(h){if(g=(await m).find(e=>e.id===h),!g)return n.window.showErrorMessage(`Package '${h}' not found in project.`),void(0,u.cancelAtStepTelemetry)(p,"package-picker")}else g=await(0,a.showPackagePickerFromPromise)(d,m);if(!g)return void(0,u.cancelAtStepTelemetry)(p,"package-picker");const v=g.id;await i.logger.watch("Remove NuGet package",async function(){const e=await r.getProxy(s.default.nugetCommandsService);try{const t=await(0,u.runWithDurationTelemetry)(async()=>await(e?.removePackage(f.fullPath,v)),p,"removePackage");p.addOrUpdateProperties({succeeded:String(t)})}finally{e?.dispose(),(0,u.addCompletedTelemetry)(p)}},{telemetry:p,catchUnhandledErrors:!0})}finally{p.sendTelemetry()}e&&i.sendFirstInteractionWithExplorerTelemetry}},4812(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.removeProjectReferenceByProjectPath=t.removeProjectReferenceByProjectGuid=void 0;const n=r(1398),o=r(680),i=r(5059),s=r(8955),a=r(4835),c=r(6928);async function l(e){const t=await o.projectQueryableSpace.executeQuery({context:"Projects",query:{$properties:["Name","Path","Id"],$filter:{ProjectsByCapabilities:["!SharedAssetsProject"]}}});if(!t.Items?.length)return void n.window.showWarningMessage(i.errorStrings.addProjectReferenceNoProjects,{modal:!0});const r=t.Items.filter(e=>e.Path&&e.Name&&e.Id?.ProjectGuid).map(e=>({path:e.Path,label:e.Name,guid:e.Id.ProjectGuid}));return r.sort((e,t)=>e.label.localeCompare(t.label)),e?r.find(t=>t.path.toLocaleUpperCase()===e.toLocaleUpperCase()):await n.window.showQuickPick(r,{placeHolder:i.promptStrings.selectSourceProject})}async function u(e,t){const r={update:{target:{context:"Projects",query:{$filter:{ProjectsByProjectGuid:[[e]]},$get:{ProjectReferences:{$where:{"==":[{".":"ReferencedProjectPath"},t]}}}}},steps:["Delete"]}},n=await o.projectQueryableSpace.executeAction(r);n.Errors&&n.Errors.forEach(e=>{o.logger.log(e.Message)})}t.default=async function(e){let t;if(e instanceof n.Uri)if((await n.workspace.fs.stat(e)).type===n.FileType.Directory){const r=await(0,a.getSingleProjectFromFolder)(e);r&&(t=await l(r.path))}else{const r=c.normalize(e.fsPath);t=await l(r)}if(!t&&(t=await l(),!t))return;const r=await async function(e){return await o.logger.watch("Get project to add reference to.",async()=>{const t={context:"Projects",query:{$filter:{ProjectsByProjectGuid:[[e]]},$get:{ProjectReferences:{}},$properties:["Name","Path","Id"]}},r=await o.projectQueryableSpace.executeQuery(t);if(r.Items){const e=r.Items.map(e=>{const t=e.ReferencedProjectPath;return{path:t,label:c.basename(t,c.extname(t)),description:t}});return 0===e.length?void n.window.showWarningMessage(i.errorStrings.removeProjectReferenceNoProjects,{modal:!0}):(e.sort((e,t)=>e.label.localeCompare(t.label)),(await n.window.showQuickPick(e,{placeHolder:i.promptStrings.selectReferenceToRemove}))?.path)}},{catchUnhandledErrors:!1})}(t.guid);if(!r)return;const d=new s.TelemetryActivity("remove-project-reference",o.telemetryService);try{await o.logger.watch("Remove project reference",async()=>{await u(t.guid,r)},{telemetry:d,catchUnhandledErrors:!1})}finally{d.end(),d.sendTelemetry()}e&&(0,o.sendFirstInteractionWithExplorerTelemetry)()},t.removeProjectReferenceByProjectGuid=u,t.removeProjectReferenceByProjectPath=async function(e,t){const r={update:{target:{context:"Projects",query:{$filter:{ProjectsByPath:[[e]]},$get:{ProjectReferences:{$where:{"==":[{".":"ReferencedProjectPath"},t]}}}}},steps:["Delete"]}},n=await o.projectQueryableSpace.executeAction(r);n.Errors&&n.Errors.forEach(e=>{o.logger.log(e.Message)})}},3126(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(9896),o=r(1398),i=r(680),s=r(4724),a=r(5059),c=r(128),l=r(5125),u=r(9687),d=r(6928),p=r(9687);t.default=async function(){const e=i.environmentStateManager?.getActiveWorkspace();if(!i.environmentStateManager?.isSolutionGeneratedOutsideWorkspace()||!e)return;const t=e.uri.fsPath,r=await async function(e){const t=[{label:a.addNewItemUiStrings.defaultDirectory,id:"default",description:e},{label:a.addNewItemUiStrings.chooseDirectory,id:"picker"}],r=await o.window.showQuickPick(t,{title:a.addNewItemUiStrings.locationForNewSolutionFile,placeHolder:e});if(!r)return;if("default"===r.id)return e;const n=await o.window.showOpenDialog({canSelectFolders:!0,canSelectFiles:!1,canSelectMany:!1,title:a.addNewItemUiStrings.projectLocation,defaultUri:o.Uri.file(e)});return n?n[0].fsPath:void 0}(t);if(!r)return;const h=await async function(e){const t=await(0,l.getOpenedSolution)(),r=d.parse(t).name;let i=(await o.window.showInputBox({title:a.addNewItemUiStrings.newSolutionFileName,value:r,validateInput:async function(t){return t&&0!==t.length?await async function(e,t){if(!e||0===e.length)return a.errorStrings.noName;for(const t of'"*<>:|?/\\')if(-1!==e.indexOf(t))return a.addNewItemUiStrings.pathInvalidChars;return e.length>50?a.addNewItemUiStrings.pathTooLong:n.existsSync(d.join(t,`${e}.sln`))||n.existsSync(d.join(t,`${e}.slnx`))?a.addNewItemUiStrings.solutionAlreadyExists:null}(t,e):a.addNewItemUiStrings.newSolutionFileName}}))?.trim();return i}(r);if(!h)return;const f=await(0,p.selectSolutionFileFormat)(r);if(!f)return;const g=h+f,m=u.getExtensionBrokerService(),v=await m.getProxy(s.default.solutionFileService);let y;try{y=await(v?.saveSolutionFileInWorkspace(t,r,g))}catch(e){o.window.showErrorMessage(a.errorStrings.errorSaveSolutionFile(e))}finally{v?.dispose()}if(!y||0===y.length)return;const S=i.environmentStateManager.getLatestEnvironmentState();await i.environmentStateManager.setSolutionAndFolderWorkspace(y,S.folders,S.configuration),l.vscodeWorkspaceFileWatcher?.dispose();const w=new c.TelemetryEvent("sln-less-solution-creation",i.telemetryService);w.addOrUpdateProperties({extensionType:f}),w.sendTelemetry()}},3873(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.searchFromCommandPalette=t.searchOpenFromCommandPalette=t.searchProjectFromCommandPalette=void 0;const n=r(1398);function o(e){n.commands.executeCommand("workbench.action.quickOpen",">"+e)}t.searchProjectFromCommandPalette=function(){o(".NET: Project")},t.searchOpenFromCommandPalette=function(){o(".NET: Open")},t.searchFromCommandPalette=function(){o(".NET:")}},7804(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(1398),o=r(9768),i=r(4724),s=r(680),a=r(5059),c=r(680);n.extensions.getExtension(o.EXTENSION_ID),t.default=async function(e){const t=c.environmentStateManager?.getLatestEnvironmentState()?.configuration;if(!t)return;const r=await async function(){const e=n.extensions.getExtension(o.EXTENSION_ID);if(!e)throw new Error("Unable to find the extension.");const t=e.exports.serviceBroker,r=await t.getProxy(i.default.solutionFileService);try{return await(r?.getSolutionConfigurations())}catch(e){return void s.logger.log(`Error fetching the solution configurations: ${e}`)}finally{r?.dispose()}}();if(r){const o=function(e){const t=new Set,r=new Set;return e.forEach(e=>{if(e){var n=e.split("|");n.length>=1&&t.add(n[0].trim()),n.length>=2&&r.add(n[1].trim())}}),{configurationNames:t,platformNames:r}}(r);let i=await n.window.showQuickPick(Array.from(o.configurationNames),{placeHolder:a.promptStrings.selectConfiguration});if(i){let r;if(o.platformNames.size>1){const e=await n.window.showQuickPick(Array.from(o.platformNames),{placeHolder:a.promptStrings.selectPlatform});e&&(r=e)}if(r=r||t.split("|")[1],i=`${i}|${r}`,t!==i){e.workspaceState.update("configSetting",i);const t="workbench.action.reloadWindow",r={title:a.promptStrings.reloadWindow,isCloseAffordance:!1};n.window.showInformationMessage(a.promptStrings.reloadOnConfigurationChange,r).then(e=>e===r&&n.commands.executeCommand(t))}}}}},8874(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(1398),o=r(5059);t.default=async function(){const e={title:o.promptStrings.manageWorkspaceTrust,isCloseAffordance:!1},t={title:o.promptStrings.learnMore,isCloseAffordance:!1};n.window.showWarningMessage(o.promptStrings.workspaceTrustMessage,{modal:!0,detail:o.promptStrings.workspaceTrustDetail},e,t).then(r=>{r===e?n.commands.executeCommand("workbench.trust.manage"):r===t&&n.commands.executeCommand("vscode.open",n.Uri.parse("https://aka.ms/vscode-workspace-trust"))})}},7589(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSolutionFolderPathForProject=t.setSolutionBuildAction=t.BuildActionOptions=t.SOLUTION_BUILD_AVAILABLE=t.solutionBuildContextVisible=t.NO_SOLUTION_BUILD_FLAG=t.CLEAN=t.BUILD=void 0;const n=r(1398),o=r(9768),i=r(2963),s=r(680),a=r(4724),c=r(8955),l=r(1038),u=r(5125),d=r(9687),p=r(6928);t.BUILD="build",t.CLEAN="clean",t.NO_SOLUTION_BUILD_FLAG="",t.solutionBuildContextVisible="solutionBuildContextVisible",t.SOLUTION_BUILD_AVAILABLE=!0;const h=new class{cachedPromise};async function f(e,t,r){if(t||r)try{const n=await e.getProxy(a.default.solutionExplorerService);if(!n)return;try{const e=await n.getRootNodes();return await g(n,e,t,r,[])}finally{n.dispose()}}catch(e){return void s.logger?.log(`Error getting solution folder path: ${e}`)}}async function g(e,t,r,n,o){for(const i of t){if(i.NodeType===l.nodeTypes.project&&(r&&i.ProjectGuid===r||i.Name===n)){const e=n??i.Name;return o.length>0?`${o.join("\\")}\\${e}`:e}if(i.NodeType===l.nodeTypes.solutionFolder){const t=await e.getChildrenNodes(i),s=await g(e,t,r,n,[...o,i.Name]);if(s)return s}}}t.BuildActionOptions=class{action;flag;noSolution;constructor(e,t){this.action=e,this.flag=t}},t.setSolutionBuildAction=async function(e,r){if(!n.extensions.getExtension(o.EXTENSION_ID))throw new Error("Unable to find the extension.");const a=await(0,u.getOpenedSolution)();e.noSolution=void 0===a;let g,m="string"==typeof r?r:r?.path;if(a&&void 0!==r&&"string"!=typeof r&&r.nodeType===l.nodeTypes.project&&!r.isUnloaded&&!s.environmentStateManager?.isSolutionGeneratedOutsideWorkspace()){g=r.name;try{const e=n.extensions.getExtension(o.EXTENSION_ID);if(e?.exports?.serviceBroker){const t=await f(e.exports.serviceBroker,r.projectGuid,r.name);t&&(g=t)}}catch(e){s.logger?.log(`Failed to get solution folder path for project: ${e}`)}g=`/target:${g?.replace(/[%$@;.()']/g,"_")}`}const v=n.workspace.getConfiguration("dotnet").get("defaultSolution"),y=v&&v!==u.DISABLE_SOLUTION_SETTING_VALUE?await(0,d.convertToFullPath)(v):void 0;if(void 0!==r&&"string"!=typeof r&&r.nodeType===l.nodeTypes.solution&&m&&y&&".slnf"===p.extname(y)&&(m=y),!m){if(e.noSolution)return!1;m=y&&".slnf"===p.extname(y)?y:r instanceof n.Uri&&r.fsPath.endsWith(".csproj")?p.normalize(r.fsPath):a}return await async function(e,r,o,a){const l=new c.TelemetryActivity("invoke-solution-build",s.telemetryService);return l.start(),await s.logger.watch("Solution Build Action",async()=>{try{if(void 0!==h.cachedPromise)return!1;t.SOLUTION_BUILD_AVAILABLE=!1,await n.commands.executeCommand("setContext",t.solutionBuildContextVisible,t.SOLUTION_BUILD_AVAILABLE),n.workspace.saveAll(!1);const s=await(0,i.dotnetSolutionBuildActionUsingTask)(e,r,o,a);return h.cachedPromise??=s.success,await h.cachedPromise}catch(e){return!1}finally{h.cachedPromise=void 0,t.SOLUTION_BUILD_AVAILABLE=!0,await n.commands.executeCommand("setContext",t.solutionBuildContextVisible,t.SOLUTION_BUILD_AVAILABLE),l.end(),l.sendTelemetry()}})}(e.action,m,e.flag,g)},t.getSolutionFolderPathForProject=f},4855(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.rebuildSolution=t.cleanSolution=t.buildSolution=t.executeBuildActionOnProjects=void 0;const n=r(1398),o=r(680),i=r(5059),s=r(1038),a=r(4835),c=r(7589),l=r(6928);async function u(e,t,r){return n.window.withProgress({location:n.ProgressLocation.Window,title:`${t.action===c.BUILD?t.noIncremental?i.messageStrings.rebuildMessage:i.messageStrings.buildMessage:i.messageStrings.cleanMessage} ${i.messageStrings.projectsMessage(e.length)}`,cancellable:!1},async r=>{let o=!0;const i=e.length;for(let n=0;n<e.length;n++){const s=e[n],a=s.name||"Unknown";r.report({increment:0===n?0:Math.round(100/i),message:i>1?`${a} (${n+1}/${i})`:a});try{await(0,c.setSolutionBuildAction)(new c.BuildActionOptions(t.action,t.noIncremental),s)||(o=!1)}catch(e){o=!1}}return o||n.commands.executeCommand("workbench.panel.markers.view.focus"),o})}async function d(e,t,r){let i;if(e)(0,o.sendFirstInteractionWithExplorerTelemetry)(),e instanceof n.Uri&&(e={path:e.fsPath,name:l.basename(e.fsPath,l.extname(e.fsPath)),nodeType:s.nodeTypes.project}),i=[e];else if(i=await(0,a.selectProjects)(),!i||0===i.length)return!1;return u(i,t)}t.executeBuildActionOnProjects=u,t.buildSolution=(e,t)=>d(t,{action:c.BUILD}),t.cleanSolution=(e,t)=>d(t,{action:c.CLEAN}),t.rebuildSolution=(e,t)=>d(t,{action:c.BUILD,noIncremental:!0})},9687(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isCSharpRelatedFile=t.isPreReleaseExtension=t.selectSolutionFileFormat=t.getExtensionBrokerService=t.updateDefaultName=t.calculateDefaultFolderName=t.doesSolutionContainProjectByPath=t.doesSolutionContainProject=t.isWorkingDirectoryInWorkspace=t.getRelativePathToSolution=t.parseSolutionFolderFromContextMenu=t.getActiveWorkspaceRoot=t.addProjectToSolution=t.convertToFullPath=t.emptyGuid=void 0;const n=r(9896),o=r(9589),i=r(1398),s=r(9768),a=r(2963),c=r(1858),l=r(680),u=r(1760),d=r(5059),p=r(9409),h=r(1038),f=r(5125),g=r(6928);t.emptyGuid="00000000-0000-0000-0000-000000000000",t.convertToFullPath=async function(e){if(!g.isAbsolute(e)){const r=i.workspace.workspaceFolders;if(r&&r.length>0){if(1===r.length)return g.join(r[0].uri.fsPath,e);for(var t=0;t<r.length;t++)if(e.startsWith(r[t].name+"/")){const n=g.join(r[t].uri.fsPath,e.substring(r[t].name.length+1));if(await(0,p.fileOrDirectoryExists)(n))return n}for(t=0;t<r.length;t++){const n=g.join(r[t].uri.fsPath,e);if(await(0,p.fileOrDirectoryExists)(n))return n}}}return e},t.addProjectToSolution=async function(e,t,r,n,o){try{n?await(0,u.dotnetCommand)(c.DotnetCommand.slnAddIntoFolder,e,["sln",t,"add",r,"--solution-folder",n]):o?await(0,u.dotnetCommand)(c.DotnetCommand.slnAdd,e,["sln",t,"add",r,"--in-root"]):await(0,u.dotnetCommand)(c.DotnetCommand.slnAdd,e,["sln",t,"add",r])}catch(e){if(!(e instanceof c.DotnetCommandError))throw e;t.endsWith(".slnx")&&i.window.showInformationMessage(d.promptStrings.addProjectIsNotSupportedForSlnx)}},t.getActiveWorkspaceRoot=function(){let e=l.environmentStateManager?.getActiveWorkspaceRoot();if(!e||!(0,n.existsSync)(e))throw new Error(d.errorStrings.noSolution);return e},t.parseSolutionFolderFromContextMenu=function(e){let t;return e?.contextValue===h.contextValues.solutionFolder&&(t=e.path),t},t.getRelativePathToSolution=async function(e){const t=await(0,f.getOpenedSolution)();if(t)return g.relative(g.dirname(t),e);throw new Error(d.errorStrings.noSolution)},t.isWorkingDirectoryInWorkspace=function(e){const t=(0,a.getOpenedWorkspaceHelper)(),r=t?.uri.fsPath,n=(0,p.containsFileOrFolder)(r,e);return n||i.window.showWarningMessage(d.errorStrings.addingOutsideWorkspace(e,r),{modal:!0}),n},t.doesSolutionContainProject=async function(e,t){const r=await(0,a.getAllProjects)(),n=r?.map(e=>e.Name),o=void 0!==n?.find(t=>(0,p.equalsInvariantIgnoreCase)(t,e));return o&&!t&&i.window.showWarningMessage(d.errorStrings.solutionContainsItem(e),{modal:!0}),o},t.doesSolutionContainProjectByPath=async function(e){const t=await(0,a.getAllProjects)(),r=g.normalize(e),n=t?.some(e=>{const t=g.normalize(e.Path);return(0,p.equalsInvariantIgnoreCase)(t,r)})??!1;return n&&l.logger.log(`Project path check for "${e}" found existing project`),n},t.calculateDefaultFolderName=function(e){const t="NewFolder";var r=[];if(e)for(const n of e)if((0,p.startsWithInvariantIgnoreCase)(n,t)){const e=n.substring(9),t=Number.parseInt(e);t&&t>=1&&r.push(t)}const n=r.sort();var o=1;for(const e of n)if(o===e)o++;else if(e>o)break;return`${t}${o}`},t.updateDefaultName=function e(t,r){return r.includes(t)?e("NewFolder"+(parseInt(t.substring(9))+1),r):t},t.getExtensionBrokerService=function(){const e=i.extensions.getExtension(s.EXTENSION_ID);if(!e)throw new Error("Unable to find the extension");return e.exports.serviceBroker},t.selectSolutionFileFormat=async function(e){if(!e)return;let t;return t=await(0,f.isSlnxSupportedInWorkspace)(e)?await i.window.showQuickPick([d.addNewItemUiStrings.slnFileFormat,d.addNewItemUiStrings.slnxFileFormat],{placeHolder:d.addNewItemUiStrings.selectSolutionFileFormat}):".sln",t},t.isPreReleaseExtension=function(){const e=i.extensions.getExtension(s.EXTENSION_ID);if(!e)return!1;const t=o.parse(e.packageJSON.version);return!!t&&t.minor%10!=0};const m=[{scheme:"file",language:"csharp"},{scheme:"file",language:"xaml"},{scheme:"file",language:"aspnetcorerazor"},{scheme:"file",pattern:"**/*.csproj"}];t.isCSharpRelatedFile=function(e){return!!e&&i.languages.match(m,e)>0}},5462(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(1398),o=r(9768),i=r(680),s=r(4724),a=r(6452),c=r(9687),l=r(128),u=r(9509),d=r(9351);t.default=async function(e){const t=n.extensions.getExtension(o.EXTENSION_ID);if(!t)throw new Error("Unable to find the extension.");const r=t.exports.serviceBroker,p=a.NuGetAction.update,h=new l.TelemetryEvent("nuget/update-nuget-package",i.telemetryService);try{const t=new d.NuGetConfigurationSettings;(0,u.addIncludePrereleaseTelemetry)(h,t.includePrerelease);const o=(0,c.getActiveWorkspaceRoot)(),l=await(0,a.verifyServicePrerequisites)(p,o,r,h);if(!l||!l.isPrerequisiteMet)return void(0,u.cancelAtStepTelemetry)(h,"verify-prerequisites");const f=await(0,a.getProjectFromContext)(e),g=(0,a.getPackageFromContext)(e);e instanceof n.Uri?(0,u.addEntrypointTelemetry)(h,"file-context-menu"):f?(0,u.addEntrypointTelemetry)(h,"package-dependency-context-menu"):(0,u.addEntrypointTelemetry)(h,"command-palette");const m=f??await(0,a.showProjectPicker)(p,h);if(!m)return void(0,u.cancelAtStepTelemetry)(h,"project-picker");let v;const y=(0,a.retrieveOutdatedPackages)(m.fullPath,t.includePrerelease,r,h);if(g){if(v=(await y).find(e=>e.id===g),!v)return n.window.showInformationMessage(`Package '${g}' is already up to date.`),void(0,u.cancelAtStepTelemetry)(h,"package-picker")}else v=await(0,a.showPackagePickerFromPromise)(p,y,t);if(!v)return void(0,u.cancelAtStepTelemetry)(h,"package-picker");const S=v.id,w=await(0,a.showVersionPicker)(p,v,(0,a.retrievePackageVersions)(m.fullPath,S,t.includePrerelease,r,h),t);if(!w||w.version===v.version)return void(0,u.cancelAtStepTelemetry)(h,"version-picker");await i.logger.watch("Update NuGet package",async function(){const e=await r.getProxy(s.default.nugetCommandsService);try{const t=await(0,u.runWithDurationTelemetry)(async()=>await(e?.updatePackage(m.fullPath,S,w.version)),h,"updatePackage");h.addOrUpdateProperties({succeeded:String(t)})}finally{e?.dispose(),(0,u.addCompletedTelemetry)(h)}},{telemetry:h,catchUnhandledErrors:!0})}finally{h.sendTelemetry()}e&&(0,i.sendFirstInteractionWithExplorerTelemetry)()}},4345(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parsePackageInfo=t.getPackageInfo=void 0;const n=r(6928),o=r(1943);t.getPackageInfo=async function(e){let t=null;try{t=await(0,o.readFile)(n.join(e,"package.json"),"utf-8")}catch{}let r=[];if(t){65279===t.charCodeAt(0)&&(t=t.slice(1));const e=JSON.parse(t);if(e.dependencies)for(const t in e.dependencies)r.push(s(t))}return r};const i=/^(?<name>.*?)(?:\.(?<target>\w+-\w+))?$/;function s(e){const t=i.exec(e);if(!t?.groups)throw new Error("Unrecognized package id pattern: "+e);return{fullName:e,name:t.groups.name,target:t.groups.target}}t.parsePackageInfo=s},3097(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAllComponentsMap=void 0;const n=r(1943),o=r(6928),i=r(4345);function s(e){const t=e.toLowerCase().split("_");return 0===t.length?"":`@${t[0]}/${t.slice(1).join("-")}`}function a(e){return e.toLowerCase().replace(/[.\-]/g,"_")}t.getAllComponentsMap=async function(e){const t=await async function(e){const t={},r=await(0,n.readdir)(e,{withFileTypes:!0});for(const s of r)if(s.isDirectory()){const a=o.join(e,s.name);if(await c(a),(await(0,n.readdir)(a)).indexOf("platforms")>=0){const l=o.join(a,"platforms"),u=await(0,n.readdir)(l,{withFileTypes:!0});for(const d of u)if(d.isDirectory()){const p=o.join(l,d.name);(await(0,n.readdir)(o.join(p))).indexOf("node_modules")>=0&&await c(o.join(l,d.name))}}async function c(e){const r=await(0,i.getPackageInfo)(e);for(const n of r)t[n.name]=o.resolve(e,"node_modules",n.fullName)}}return t}(e),r=await async function(e){const t={};for(const r of["package.local.json","package.dev.json"]){const s=o.join(e,r);try{await(0,n.access)(s)}catch{continue}const a=await(0,n.readFile)(s,"utf-8"),c=JSON.parse(a);if(c.dependencies)for(const r in c.dependencies){const s=(0,i.parsePackageInfo)(r),a=o.resolve(e,c.dependencies[r]);try{await(0,n.access)(a),t[s.name]=a}catch{}}else console.log(`No dependencies found in ${s}`)}return t}(e),c={...t,...r},l=function(e,t){const r={},n={};for(const e of t)n[a(e)]=e;for(const[c,l]of Object.entries(process.env))if(c.startsWith("CSDEVKIT_COMPONENT_")&&l){const u=s(c.substring(19)),d=(0,i.parsePackageInfo)(u),p=n[a(d.name)];if(!p){const e=`Environment variable ${c} does not match any known component. Normalized name '${d.name}' could not be resolved. Available components: ${t.join(", ")}`;throw console.error(e),new Error(e)}r[p]=o.resolve(e,l)}return r}(e,Object.keys(c));return Object.freeze({...c,...l})}},8982(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getActiveDebugTargetFrameworkService=t.setupActiveDebugTargetFrameworkService=t.ActiveDebugTargetFrameworkService=void 0;const n=r(1398),o=r(2701),i=r(5059),s=r(1020),a=r(74);class c{debugTargetFrameworkInfoObserver;startupProjectLaunchInfo;targetFrameworkInfos;currentStartupProjectDebugTargetFrameworkInfo;observers;unsubscribeFromStartupProjectObservable;unsubscribeFromDebugTargetFrameworkInfoObserver;constructor(e,t){this.debugTargetFrameworkInfoObserver=t,this.startupProjectLaunchInfo=void 0,this.targetFrameworkInfos=[],this.observers=[],this.unsubscribeFromStartupProjectObservable=e.subscribe(this.startupProjectObserver),this.unsubscribeFromDebugTargetFrameworkInfoObserver=t.subscribe(this.targetFrameworkInfoObserver)}dispose(){this.unsubscribeFromStartupProjectObservable(),this.unsubscribeFromDebugTargetFrameworkInfoObserver()}subscribe(e){return this.observers.push(e),e.onNext(this.currentStartupProjectDebugTargetFrameworkInfo),()=>{this.observers=this.observers.filter(t=>t!==e)}}async pickDebugTargetFramework(){if(!this.startupProjectLaunchInfo)return void n.window.showErrorMessage(i.debugProjectLaunchStrings.errorNoStartupProjectSelected);if(!this.currentStartupProjectDebugTargetFrameworkInfo)return void n.window.showErrorMessage(i.debugProjectLaunchStrings.errorNoTargetFrameworksAvailable);const e=this.currentStartupProjectDebugTargetFrameworkInfo.availableTargetFrameworks.map(e=>new u(e)),t=await(0,a.showQuickPickWithActiveItem)(i.debugProjectLaunchStrings.selectLaunchTargetFramework,e,e.find(e=>e.info.framework===this.currentStartupProjectDebugTargetFrameworkInfo?.debugTargetFramework));if(t){this.debugTargetFrameworkInfoObserver.setDebugTargetFrameworkInfo(this.startupProjectLaunchInfo.fullPath,t.info.framework),this.currentStartupProjectDebugTargetFrameworkInfo.debugTargetFramework=t.info.framework;for(const e of this.observers)e.onNext(this.currentStartupProjectDebugTargetFrameworkInfo)}}getCurrentProjectTargetFrameworkInfo(){return this.currentStartupProjectDebugTargetFrameworkInfo}onNextStartupProject(e){this.startupProjectLaunchInfo=e,this.handleNewState()}onNextDebugTargetFrameworkInfos(e){this.targetFrameworkInfos=e,this.handleNewState()}handleNewState(){let e;if(e=this.startupProjectLaunchInfo?this.targetFrameworkInfos.find(e=>e.fullPath===this.startupProjectLaunchInfo.fullPath):void 0,e!==this.currentStartupProjectDebugTargetFrameworkInfo){this.currentStartupProjectDebugTargetFrameworkInfo=e;for(const e of this.observers)e.onNext(this.currentStartupProjectDebugTargetFrameworkInfo)}}handleObservableCompletion(){for(const e of this.observers)e.onCompleted();this.observers=[]}handleObservableError(e){for(const t of this.observers)t.onError(e);this.observers=[]}startupProjectObserver=new class{service;constructor(e){this.service=e}onNext(e){this.service.onNextStartupProject(e)}onCompleted(){this.service.handleObservableCompletion()}onError(e){this.service.handleObservableError(e)}}(this);targetFrameworkInfoObserver=new class{service;constructor(e){this.service=e}onNext(e){this.service.onNextDebugTargetFrameworkInfos(e)}onCompleted(){this.service.handleObservableCompletion()}onError(e){this.service.handleObservableError(e)}}(this)}let l;t.ActiveDebugTargetFrameworkService=c,t.setupActiveDebugTargetFrameworkService=function(e){if(!l){const t=s.startupProjectService,r=(0,o.getDebugTargetFrameworkInfoObserver)(),n=new c(t,r);e.subscriptions.push(n),l=n}},t.getActiveDebugTargetFrameworkService=function(){if(!l)throw new Error("ActiveDebugTargetFrameworkService has not been initialized");return l};class u{info;label;constructor(e){this.info=e,this.label=e.displayName}}},9741(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getActiveLaunchConfigurationService=t.setupActiveLaunchConfigurationService=t.LaunchConfigurationQuickPick=t.ActiveLaunchConfigurationService=void 0;const n=r(1398),o=r(9431),i=r(5059),s=r(1020),a=r(6915),c=r(74);class l{name;items;constructor(e,t){this.name=e,this.items=t}}class u{projectStateObserver;startupProjectService;constructor(e,t){this.projectStateObserver=e,this.startupProjectService=t}dispose(){this.startupProjectService?.dispose(),this.projectStateObserver?.dispose()}async pickLaunchConfiguration(){const e=await this.startupProjectService.getOrPickCurrentStartupProject();if(!e)return;const t=this.projectStateObserver.getCurrentProjects().find(t=>t.fullPath===e.fullPath);if(!t)return void n.window.showErrorMessage(i.debugProjectLaunchStrings.errorStartupProjectNotFound);const r=this.createQuickPickItems(t),o=await(0,c.showQuickPickWithActiveItem)(i.debugProjectLaunchStrings.selectLaunchConfiguration,r,r.find(e=>e instanceof d&&e.info.id===t.activeLaunchConfigurationId));return o?(await this.projectStateObserver.setActiveLaunchConfiguration(e.fullPath,o.info.id),o.info.id):void 0}createQuickPickItems(e){const t=[new l("",[])];return e.launchConfigurations.reduce((e,t)=>{const r=t.groupDisplayName||"";let n=e.find(e=>e.name===r);return n||(n=new l(r,[]),e.push(n)),n.items.push(t),e},t).flatMap(e=>{let t=[];return""!==e.name&&t.push({label:e.name,kind:n.QuickPickItemKind.Separator}),e.items.forEach(e=>{t.push(new d(e))}),t})}async getLaunchConfiguration(){const e=await this.startupProjectService.getCurrentStartupProject();if(!e)return;const t=this.projectStateObserver.getCurrentProjects().find(t=>t.fullPath===e.fullPath);return t?t.activeLaunchConfigurationId:void 0}}t.ActiveLaunchConfigurationService=u;class d{info;label;description;detail;iconPath;constructor(e){this.info=e,this.label=e.displayName,this.description=e.description,this.detail=e.details,this.iconPath=(0,a.getIconPath)(e.icon)}}let p;t.LaunchConfigurationQuickPick=d,t.setupActiveLaunchConfigurationService=function(e){if(!p){const t=(0,o.getLaunchableProjectInfoObserver)(),r=new u(t,s.startupProjectService);e.subscriptions.push(r),p=r}},t.getActiveLaunchConfigurationService=function(){if(!p)throw new Error("ActiveLaunchConfigurationService has not been initialized");return p}},2701(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupDebugTargetFrameworkInfoObserver=t.getDebugTargetFrameworkInfoObserver=t.DebugTargetFrameworkInfoObserver=void 0;const n=r(4724),o=r(4074),i=r(680);class s extends o.Observer{projects;isSubscribed;debugTargetFrameworkService;observers;constructor(){super(()=>this.onNext),this.projects=[],this.isSubscribed=!1,this.observers=[]}dispose(){this.debugTargetFrameworkService?.dispose()}subscribe(e){return this.observers.push(e),e.onNext(this.projects),()=>{this.observers=this.observers.filter(t=>t!==e)}}async subscribeToTargetFrameworkService(e){let t;try{const r=await e.serviceBroker.getProxy(n.default.debugTargetFrameworkService);if(!r)throw new Error("Could not get the IDebugTargetFrameworkService proxy to call subscribe.");t=await r.subscribe(this),this.isSubscribed=!0,this.debugTargetFrameworkService=r}catch(e){this.isSubscribed=!1}return t}async setDebugTargetFrameworkInfo(e,t,r){if(!this.isSubscribed)throw new Error("DebugTargetFrameworkInfoObserver has not been subscribed to an IDebugTargetFrameworkService");return await this.debugTargetFrameworkService.setDebugTargetFramework(e,t)}getCurrentProjects(){if(!this.isSubscribed)throw new Error("DebugTargetFrameworkInfoObserver has not been subscribed to an IDebugTargetFrameworkService");return this.projects}onNext(e){this.projects=e;for(const t of this.observers)t.onNext(e)}onCompleted(){this.debugTargetFrameworkService?.dispose();for(const e of this.observers)e.onCompleted();this.observers=[]}}let a,c,l;async function u(e,t,r){c=await t.serviceBroker.getProxy(n.default.projectInitializationStatusService),c?(l=new o.Observer(n=>{!async function(e,t,r){const n=await r.subscribeToTargetFrameworkService(t);n&&e.subscriptions.push(n)}(e,t,r)},e=>{e&&i.logger.log(e)}),await c.subscribeInitializationCompletion(l)):i.logger.log("Failed to obtain IProjectInitializationStatusService proxy")}t.DebugTargetFrameworkInfoObserver=s,t.getDebugTargetFrameworkInfoObserver=function(){if(!a)throw new Error("DebugTargetFrameworkInfoObserver has not been initialized");return a},t.setupDebugTargetFrameworkInfoObserver=function(e,t){if(!a){let r=new s;t.hasServerProcessLoaded()?u(e,t,r):t.serverProcessLoaded(async()=>u(e,t,r)),a=r}}},5659(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DotnetDynamicConfigurationProvider=void 0;const n=r(1398),o=r(680),i=r(4724),s=r(5059),a=r(8955),c=r(9409),l=r(3275),u=r(6928),d=r(440);class p{brokeredServiceHost;projectStateObserver;static type="dotnet";launchConfigurationService;constructor(e,t){this.brokeredServiceHost=e,this.projectStateObserver=t,this.launchConfigurationService=(0,c.lazyPromiseLambda)(()=>this.initLaunchConfigurationServiceProxy())}async dispose(){(await this.launchConfigurationService)?.dispose(),this.projectStateObserver?.dispose()}async provideDebugConfigurations(e,t){const r=new a.TelemetryActivity("DotnetDynamicConfigurationProvider/provideDebugConfigurations",o.telemetryService);try{const t=await this.launchConfigurationService;if(e&&t){if(!await(0,d.waitForProjectsToLoad)(this.brokeredServiceHost))throw r.addOrUpdateProperties({succeeded:"false",waitForProjectInitializationTimeout:"true"}),r.sendTelemetry(),new Error(s.debugProjectLaunchStrings.projectInitializing);let t=[];if(await this.projectStateObserver.subscribedSignal,this.projectStateObserver.getCurrentProjects().length>0){let e={name:s.debugProjectLaunchStrings.startupProjectLaunchConfigName,type:p.type,request:"launch"};t.push(e)}let n=0;if(e.uri?.fsPath&&this.projectStateObserver){const o=e.uri.fsPath.replace(/[\\/]+/g,"/");await this.projectStateObserver.subscribedSignal;const i=this.projectStateObserver.getCurrentProjects();for(let e of i){let r=e.fullPath;const i=r.replace(/[\\/]+/g,"/"),s=r.includes("/")?"/":"\\";if(i.startsWith(o+"/"))r="${workspaceFolder}"+r.substring(o.length);else{let e=u.relative(o,r);e?r="${workspaceFolder}"+s+e:n++}t=t.concat(this.createDebugConfigurations(e.displayName,r,e.launchConfigurations))}0===t.length&&0===n||(r.addOrUpdateMeasurements({generatedConfigurationCount:t.length,ignoredProjectCount:n}),r.sendTelemetry())}return t.push(this.createDebugConfiguration(s.debugProjectLaunchStrings.debugActiveFile,"${file}",void 0)),t}}catch(e){let t="";"string"==typeof e?t=e.toUpperCase():e instanceof Error&&(t=e.message),r.addOrUpdateProperties({succeeded:"false"}),r.sendTelemetry(),n.window.showErrorMessage(`${l.errorStrings.failProvideDebugConfigurations}${t}`)}return[]}async resolveDebugConfiguration(e,t,r){return void 0===t.type?this.runAndDebug(t,r):t}static configurationPrefix="C#: ";static createDebugConfigurationName(e){return`${p.configurationPrefix}${e}`}createDebugConfigurations(e,t,r){let n=[];r.length>1&&n.push(this.createDebugConfiguration(p.createDebugConfigurationName(`${e} [Default Configuration]`),t,void 0));for(let o of r){const i=p.createDebugConfigurationName(`${e}${r.length>1?` [${o.displayName}]`:""}`);n.push(this.createDebugConfiguration(i,t,o.id))}return n}createDebugConfiguration(e,t,r){let n={name:e,type:p.type,request:"launch",projectPath:t};return r&&(n.launchConfigurationId=r),n}async runAndDebug(e,t){const r=new a.TelemetryActivity("runAndDebug",o.telemetryService),c=await this.brokeredServiceHost.serviceBroker.getProxy(i.default.dotnetDebugConfigurationService);try{if(c)return void await n.commands.executeCommand("workbench.action.debug.selectandstart",p.type,{noDebug:e.noDebug});throw r.addOrUpdateProperties({succeeded:String(!1)}),r.sendTelemetry(),new Error}catch(e){const t={title:s.promptStrings.moreInformation};n.window.showErrorMessage(s.debugProjectLaunchStrings.errorNoProjectFound,t).then(async e=>{if(e===t){const e="https://aka.ms/vscode/dotnet/debug";n.env.openExternal(n.Uri.parse(e))}})}finally{c?.dispose()}}async initLaunchConfigurationServiceProxy(){const e=await this.brokeredServiceHost.serviceBroker.getProxy(i.default.launchConfigurationService);if(!e)throw new Error("Could not get the ILaunchConfigurationService proxy.");return e}}t.DotnetDynamicConfigurationProvider=p},9359(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getHotReloadTracker=t.prepareHotReload=t.HotReloadTracker=void 0;const n=r(9768),o=r(4724),i=r(2051),s=r(1412),a=r(866),c=r(2470),l=r(1857),u=r(5059),d=r(1398),p=r(4628);class h{context;constructor(e){this.context=e,this.context=e}hotReloadIcon;initialized=!1;enabled=!1;hasPossibleChange=!1;onChangeListener;onSaveListener;async startHotReload(e,t){await this.onHotReloadAvailabilityChanged(e,t)}async onHotReloadAvailabilityChanged(e,t){let r;switch(e.status){case i.ManagedHotReloadAvailabilityStatus.available:return void this.enable();case i.ManagedHotReloadAvailabilityStatus.disabled:r=u.hotReloadStrings.disabledInSettingsStatus;break;default:r=u.hotReloadStrings.notSupportedForSessionStatus}this.disable(r);let n=u.hotReloadStrings.disabledResult;null!==e.localizedMessage&&(n+=" "+e.localizedMessage),await s.hotReloadLogger.log(new s.HotReloadLogMessage(s.HotReloadVerbosity.minimal,n))}async endHotReload(e){await d.commands.executeCommand("setContext","hotReloadEnabled",!1),this.hotReloadIcon?.hide(),this.enabled=!1,this.onChangeListener?.dispose(),this.onSaveListener?.dispose(),this.onChangeListener=void 0,this.onSaveListener=void 0}async reportHotReloadResult(e){let t=null,r=!1;switch(e){case l.HotReloadResult.applyUpdatesFailure:t=u.hotReloadStrings.applyUpdatesFailureResult,r=!0;break;case l.HotReloadResult.errorEdits:case l.HotReloadResult.restartRequired:r=!0;break;case l.HotReloadResult.noChanges:case l.HotReloadResult.applied:case l.HotReloadResult.partiallyApplied:this.hasPossibleChange=!1}null!==t&&await s.hotReloadLogger.log(new s.HotReloadLogMessage(s.HotReloadVerbosity.minimal,t)),r&&(0,a.showHotReloadPanel)()}hasPossibleChanges(){return this.hasPossibleChange}initialize(){this.initialized||(this.hotReloadIcon=function(){const e=d.window.createStatusBarItem("csdevkit.hotreload",d.StatusBarAlignment.Right,1);return e.text="$(flame)",e.command=p.default.showHotReloadPanel,e}(),this.initialized=!0)}async enable(){this.enabled||(await d.commands.executeCommand("setContext","hotReloadEnabled",!0),this.enabled=!0),this.initialize(),this.onChangeListener||(this.onChangeListener=d.workspace.onDidChangeTextDocument(e=>this.onPossibleChange(e)),this.onSaveListener=d.workspace.onWillSaveTextDocument(e=>this.applyOnSave(e))),this.hotReloadIcon.show(),this.hotReloadIcon.tooltip=u.hotReloadStrings.availableStatus}async disable(e){this.enabled&&(await d.commands.executeCommand("setContext","hotReloadEnabled",!1),this.enabled=!1),this.hotReloadIcon&&(this.hotReloadIcon.tooltip=e)}async applyOnSave(e){if(this.enabled&&(0,c.getHotReloadOptionService)().getIsHotReloadOnSave()&&e.reason===d.TextDocumentSaveReason.Manual)return(0,a.hotReload)()}async onPossibleChange(e){if(!this.enabled||this.hasPossibleChange)return;if("csharp"!==e.document.languageId)return;if(0===e.contentChanges.length)return;const t=d.extensions.getExtension(n.EXTENSION_ID);if(!t)throw new Error("Unable to find the extension.");const r=t.exports.serviceBroker,i=await r.getProxy(o.default.hotReloadService);null!==i&&(this.hasPossibleChange=!0,await i.onChanges()),await s.hotReloadLogger.log(new s.HotReloadLogMessage(s.HotReloadVerbosity.minimal,u.hotReloadStrings.changesDetected))}}let f;t.HotReloadTracker=h,t.prepareHotReload=async function(e){e.subscriptions.push(d.commands.registerCommand(p.default.hotReload,a.hotReload)),e.subscriptions.push(d.commands.registerCommand(p.default.showHotReloadPanel,a.showHotReloadPanel)),f=new h(e),(0,c.listenToHotReloadConfigUpdates)()},t.getHotReloadTracker=function(){if(!f)throw new Error("HotReloadTracker is not initialized. Call prepareHotReload first.");return f}},6915(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getIconPath=void 0;const n=r(1398),o=r(2346),i=/^catalog:\/\/(.+):(.+)/,s=/^icon:\/\/(.+)/;t.getIconPath=function(e){if(!e)return;const t=i.exec(e);if(t){let e=(0,o.getImageCatalog)();if(e){let r=t[1],o=parseInt(t[2]),i=e.getIcon(r,o);if(i)return{light:n.Uri.file(i.light),dark:n.Uri.file(i.dark)}}return}const r=s.exec(e);return r?new n.ThemeIcon(r[1]):void 0}},1781(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupLanguageStatusItems=void 0;const n=r(1398),o=r(1020),i=r(5059),s=r(4628),a=r(8982);class c{id;name;commandId;title;tooltip;initialText;documentSelectors=[];languageStatusItems=[];constructor(e,t,r,n,o,i){this.id=e,this.name=t,this.commandId=r,this.title=n,this.tooltip=o,this.initialText=i,this.documentSelectors=this.getDefaultDocumentSelectors()}getDefaultDocumentSelectors(){let e=[];return e.push({language:"csharp",pattern:"**/*.cs"}),e.push({language:"xaml",pattern:"**/*.xaml"}),e.push({language:"xml",pattern:"**/*.{csproj,xml,plist}"}),e.push({language:"plaintext",pattern:"**/*.{sln, slnx}"}),e.push({language:"css",pattern:"**/*.css"}),e.push({language:"aspnetcorerazor",pattern:"**/*.{razor,cshtml}"}),e}deactivate(){this.languageStatusItems.forEach(e=>{e.dispose()}),this.languageStatusItems=[]}activate(){this.deactivate();const e={title:this.title,tooltip:this.tooltip,command:this.commandId};let t=0;this.documentSelectors.forEach(r=>{const n=`${this.id}.${t}}`,o=this.createLanguageStatusItem(n,this.name,r,e,this.initialText);this.languageStatusItems.push(o),t++})}updateStatus(e){this.initialText=e,this.languageStatusItems.forEach(t=>{t.text=e??this.initialText})}createLanguageStatusItem(e,t,r,o,i){let s=n.languages.createLanguageStatusItem(e,r);return s.name=t,s.command=o,s.text=i,s}setBusy(e){this.languageStatusItems.forEach(t=>{t.busy=e})}setSeverity(e){this.languageStatusItems.forEach(t=>{t.severity=e})}setCommand(e,t,r=void 0){this.commandId=e,this.tooltip=t,r&&(this.title=r);const n={title:this.title,tooltip:this.tooltip,command:this.commandId};this.languageStatusItems.forEach(e=>{e.command=n})}}class l{languageStatusItem;unsubscribe;constructor(e){this.languageStatusItem=new c("csdevkit.debug.selectStartupProjectLanguageStatusItem",i.debugProjectLaunchStrings.selectStartupProject,s.default.selectStartupProject,i.debugProjectLaunchStrings.startupProjectTitle,i.debugProjectLaunchStrings.startupProjectTooltip,i.debugProjectLaunchStrings.noProjectPlaceholder),this.unsubscribe=e.subscribe(this),this.languageStatusItem.activate()}dispose(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0),this.languageStatusItem?.deactivate(),this.languageStatusItem=void 0}onNext(e){e?this.languageStatusItem?.updateStatus(e.displayName):this.languageStatusItem?.updateStatus(i.debugProjectLaunchStrings.noProjectPlaceholder)}onCompleted(){}onError(e){}}class u{languageStatusItem;unsubscribe;constructor(e){this.languageStatusItem=new c("csdevkit.debug.selectTargetFrameworkLanguageStatusItem",i.debugProjectLaunchStrings.selectLaunchTargetFramework,s.default.selectLaunchTargetFramework,i.debugProjectLaunchStrings.debugTargetFrameworkTitle,i.debugProjectLaunchStrings.debugTargetFrameworkTooltip,i.debugProjectLaunchStrings.noProjectPlaceholder),this.unsubscribe=e.subscribe(this),this.languageStatusItem.activate()}dispose(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0),this.languageStatusItem?.deactivate(),this.languageStatusItem=void 0}onNext(e){e?this.languageStatusItem?.updateStatus(e.debugTargetFramework??i.debugProjectLaunchStrings.noProjectPlaceholder):this.languageStatusItem?.updateStatus(i.debugProjectLaunchStrings.noProjectPlaceholder)}onCompleted(){}onError(e){}}class d{languageStatusItem;unsubscribe;constructor(e){this.languageStatusItem=new c("csdevkit.debug.selectLaunchConfigurationLanguageStatusItem",i.debugProjectLaunchStrings.selectLaunchConfiguration,s.default.selectLaunchConfiguration,i.debugProjectLaunchStrings.launchConfigurationTitle,i.debugProjectLaunchStrings.launchConfigurationTooltip,i.debugProjectLaunchStrings.noProjectPlaceholder),this.unsubscribe=e.subscribe(this),this.languageStatusItem.activate()}dispose(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=void 0),this.languageStatusItem?.deactivate(),this.languageStatusItem=void 0}onNext(e){if(e){let t=e.launchConfigurations.find(t=>t.id===e.activeLaunchConfigurationId);t?this.languageStatusItem?.updateStatus(t.displayName):this.languageStatusItem?.updateStatus(i.debugProjectLaunchStrings.noProjectPlaceholder)}else this.languageStatusItem?.updateStatus(i.debugProjectLaunchStrings.noProjectPlaceholder)}onCompleted(){}onError(e){}}t.setupLanguageStatusItems=function(e){let t=(0,a.getActiveDebugTargetFrameworkService)(),r=new l(o.startupProjectService);e.subscriptions.push(r);let n=new u(t);e.subscriptions.push(n);let i=new d(o.startupProjectService);e.subscriptions.push(i)}},9431(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setupLaunchableProjectInfoObserver=t.getLaunchableProjectInfoObserver=t.LaunchableProjectInfoObserver=void 0;const n=r(4724),o=r(4074);class i extends o.Observer{projects;isSubscribed;launchConfigurationService;observers;onSubscribed=()=>{};subscribedSignal;constructor(){super(()=>this.onNext),this.projects=[],this.isSubscribed=!1,this.observers=[],this.subscribedSignal=new Promise(e=>{this.onSubscribed=e})}dispose(){this.launchConfigurationService?.dispose()}subscribe(e){return this.observers.push(e),e.onNext(this.projects),()=>{this.observers=this.observers.filter(t=>t!==e)}}async subscribeToLaunchConfigurationService(e){let t;try{const r=await e.serviceBroker.getProxy(n.default.launchConfigurationService);if(!r)throw new Error("Could not get the ILaunchConfigurationService proxy to call subscribe.");t=await r.subscribe(this),this.isSubscribed=!0,this.launchConfigurationService=r,this.onSubscribed()}catch(e){this.isSubscribed=!1}return t}async setActiveLaunchConfiguration(e,t,r){if(!this.isSubscribed)throw new Error("LaunchableProjectInfoObserver has not been subscribed to an ILaunchConfigurationService");return await this.launchConfigurationService.setActiveLaunchConfiguration(e,t,r)}getCurrentProjects(){if(!this.isSubscribed)throw new Error("LaunchableProjectInfoObserver has not been subscribed to an ILaunchConfigurationService");return this.projects}onNext(e){this.projects=e;for(const t of this.observers)t.onNext(e)}onCompleted(){this.launchConfigurationService?.dispose();for(const e of this.observers)e.onCompleted();this.observers=[]}}let s;async function a(e,t,r){const n=await r.subscribeToLaunchConfigurationService(t);n&&e.subscriptions.push(n)}t.LaunchableProjectInfoObserver=i,t.getLaunchableProjectInfoObserver=function(){if(!s)throw new Error("LaunchableProjectInfoObserver has not been initialized");return s},t.setupLaunchableProjectInfoObserver=function(e,t){if(!s){let r=new i;t.hasServerProcessLoaded()?a(e,t,r):t.serverProcessLoaded(async()=>a(e,t,r)),s=r}}},1020(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.initializeStartupProjectService=t.startupProjectService=t.StartupProjectService=void 0;const n=r(1398),o=r(9431),i=r(5059),s=r(6915),a=r(74);class c{projectStateObserver;storage;unsubscribeFromProjectStateObserver;constructor(e,t,r){this.projectStateObserver=e,this.storage=t,this.unsubscribeFromProjectStateObserver=r}}class l{state;startupProject;observers;startupProjectStorageKey="csdevkit.debug.startupProject";constructor(){this.observers=[]}initialize(e,t){if(this.state)throw new Error("StartupProjectService is already initialized");this.state=new c(e,t,void 0),this.state.unsubscribeFromProjectStateObserver=e.subscribe(this)}subscribe(e){return this.observers.push(e),e.onNext(this.startupProject),()=>{this.observers=this.observers.filter(t=>t!==e)}}onNext(e){if(!this.state)throw new Error("StartupProjectService has not been initialized");let t;if(this.startupProject&&(t=e.find(e=>e.fullPath===this.startupProject?.fullPath)),!t){let r=this.state.storage.get(this.startupProjectStorageKey);r&&(t=e.find(e=>e.fullPath===r))}this.startupProject=t;for(const e of this.observers)e.onNext(this.startupProject)}onCompleted(){if(!this.state)throw new Error("StartupProjectService has not been initialized");for(const e of this.observers)e.onCompleted();this.observers=[]}onError(e){if(!this.state)throw new Error("StartupProjectService has not been initialized");for(const t of this.observers)t.onError(e);this.observers=[]}dispose(){this.state&&(this.state.unsubscribeFromProjectStateObserver&&this.state.unsubscribeFromProjectStateObserver(),this.state.projectStateObserver.dispose(),this.state=void 0)}async pickStartupProject(){if(!this.state)throw new Error("StartupProjectService has not been initialized");let e=this.state.projectStateObserver.getCurrentProjects();if(0===e.length)return void n.window.showErrorMessage(i.debugProjectLaunchStrings.errorNoLaunchableProjects);const t=e.map(e=>new u(e)),r=await(0,a.showQuickPickWithActiveItem)(i.debugProjectLaunchStrings.selectStartupProject,t,this.startupProject?t.find(e=>e.info.fullPath===this.startupProject?.fullPath):void 0);if(r){this.startupProject=r.info,this.state.storage.update(this.startupProjectStorageKey,this.startupProject.fullPath);for(const e of this.observers)e.onNext(this.startupProject)}return r?.info}getCurrentStartupProject(){return this.startupProject}async getOrPickCurrentStartupProject(){return this.startupProject||(this.startupProject=await this.pickStartupProject()),this.startupProject}isInitialized(){return void 0!==this.state}}t.StartupProjectService=l,t.startupProjectService=new l,t.initializeStartupProjectService=function(e){if(!t.startupProjectService.isInitialized()){const r=(0,o.getLaunchableProjectInfoObserver)();t.startupProjectService.initialize(r,e.workspaceState),e.subscriptions.push(t.startupProjectService)}};class u{info;label;description;detail;iconPath;constructor(e){this.info=e,this.label=e.displayName,this.description=e.description,this.detail=e.details,this.iconPath=(0,s.getIconPath)(e.icon)}}},9020(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerDynamicDotnetConfigurationProvider=void 0;const n=r(1398),o=r(9431),i=r(5659);t.registerDynamicDotnetConfigurationProvider=function(e,t){const r=(0,o.getLaunchableProjectInfoObserver)(),s=new i.DotnetDynamicConfigurationProvider(t,r);return e.subscriptions.push(s),e.subscriptions.push(n.debug.registerDebugConfigurationProvider(i.DotnetDynamicConfigurationProvider.type,s,n.DebugConfigurationProviderTriggerKind.Dynamic)),{configurationProvider:s,launchableProjectInfoObserver:r}}},5962(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debugLaunch=void 0;const n=r(9896),o=r(6928),i=r(1398),s=r(9768),a=r(5033),c=r(1858),l=r(680),u=r(1760),d=r(4724),p=r(3430),h=r(5059),f=r(8955),g=r(5659);t.debugLaunch=async function(e,t,r,m,v){const y=new f.TelemetryActivity(v,l.telemetryService);r.noDebug&&y.addOrUpdateProperties({noDebug:String(!0)}),r.stopAtEntry&&y.addOrUpdateProperties({stopAtEntry:String(!0)});let S=!1,w=!1;if(n.readFileSync(e).includes("<UseMaui>true</UseMaui>")){if(!i.extensions.getExtension(s.MAUI_EXTENSION_ID)){S=!0;const e="Install the .NET MAUI extension";i.window.showErrorMessage(h.errorStrings.mauiExtensionNotFound,e).then(t=>{t===e&&i.env.openExternal(i.Uri.parse(s.MAUI_EXTENSION_URL))})}let e=new a.OutputMonitor;if(await(0,u.dotnetCommand)(c.DotnetCommand.checkMauiWorkloads,void 0,["workload","list"],e),0===e.getOutput().match(/maui.\*/g)?.length){w=!0;const e="Install the .NET MAUI workloads";i.window.showErrorMessage(h.errorStrings.mauiWorkloadNotFound,e).then(t=>{t===e&&i.env.openExternal(i.Uri.parse(s.MAUI_WORKLOAD_URL))})}if(S||w)return!1}const E=await m.getProxy(d.default.dotnetDebugConfigurationService);if(!E)throw new Error("Unable to obtain IDotnetDebugConfigurationService");try{const n=o.basename(e,".csproj"),s=await E.resolveDebugConfigurationWithLaunchConfigurationService(e,{name:g.DotnetDynamicConfigurationProvider.createDebugConfigurationName(n),type:"dotnet",request:"launch",...r},void 0),a=p.IDotnetDebugConfigurationServiceResultResolver.resolve(s);return a?(y.addOrUpdateProperties({succeeded:String(!0)}),y.sendTelemetry(),i.debug.startDebugging(t,a,void 0)):null===a&&(y.addOrUpdateProperties({succeeded:String(!1)}),y.sendTelemetry()),!0}finally{E?.dispose()}}},3275(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.errorStrings=void 0;const n=r(1398),o=r(2477);o.config({bundleFormat:o.BundleFormat.standalone,locale:n.env.language,messageFormat:o.MessageFormat.both});const i=o.loadMessageBundle(r(6928).join(__dirname,"debugger\\strings.ts"));t.errorStrings={failProvideDebugConfigurations:i(0,null)}},440(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.waitForProjectsToLoad=void 0;const n=r(4084),o=r(680),i=r(4724),s=r(5059),a=r(5125),c=r(1398);let l=!1;t.waitForProjectsToLoad=async function(e){return!!l||c.window.withProgress({location:c.ProgressLocation.Notification,title:s.debugProjectLaunchStrings.debugProjectLoading,cancellable:!1},async()=>(await e.ensureInitialized(),l=await async function(e){if(!await(0,a.findAnyProjectFiles)())return o.logger.log("No project files found in workspace, skipping wait for project initialization."),!0;const t=await e.serviceBroker.getProxy(i.default.projectInitializationStatusService);if(t)return await new Promise((e,r)=>{const i=setTimeout(()=>{e(!1)},3e4);t.subscribeInitializationCompletion(new n.Observer(r=>{const n=o.environmentStateManager?.getLatestEnvironmentState()?.version;n&&!n||(clearTimeout(i),e(!0),t.dispose())},e=>{clearTimeout(i),r(e),t.dispose()}))});throw new Error("Could not get the IProjectInitializationStatusService proxy.")}(e),l))}},6888(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DotnetVersionManager=void 0;const n=r(9589),o=r(1398),i=r(5033),s=r(8184),a=r(680),c=r(9768),l=r(128);t.DotnetVersionManager=class{context;cacheTimeoutInMilliSecs=3e4;versionCache={};constructor(e){this.context=e}async getDotnetVersion(e=process.cwd(),t,r=i.LogImportance.low){const n=this.versionCache[e];if(n&&Date.now()-n.timestamp<this.cacheTimeoutInMilliSecs)return n.version;const o=await this.getDotnetVersionImpl(e,t,r);return o&&(this.versionCache[e]={version:o,timestamp:Date.now()},o.major<8&&await this.showOutOfSupportDocument(t,o)),o}async showOutOfSupportDocument(e,t){const r=this.context.asAbsolutePath(c.DOTNET67_OUT_OF_SUPPORT_MD_PATH);try{await o.commands.executeCommand("markdown.showPreview",o.Uri.file(r));const e=new l.TelemetryEvent("show-out-of-support-sdk",a.telemetryService);e.addOrUpdateProperties({sdk:t.format()}),e.sendTelemetry()}catch(t){e.log(`Failed to execute markdown.showPreview command: ${t}`,i.LogImportance.normal)}}async checkOutOfSupportedSdkInstallationAndShowWarningMessage(e){try{const t=await this.getDotnetSdkVersionStrings(e);if(t){for(const r of t)if(r){const t=n.parse(r);if(t&&t.major<8){await this.showOutOfSupportDocument(e,t);break}}this.context.globalState.update("dotnet67_check",!0)}}catch(t){e.log(`Failed to scan SDKs: ${t}`,i.LogImportance.low)}}async getDotnetSdkVersionStrings(e){try{e.log("dotnet --list-sdks",i.LogImportance.low);return(await(0,s.execChildProcess)(a.dotnetSdkPath??"dotnet",["--list-sdks"],void 0,{...process.env})).split(/\r?\n/).map(e=>e.replace(/^([^ ]+) \[[^\]]+\]$/,"$1"))}catch(t){e.log(`dotnet --list-sdks failed:\t${t}`,i.LogImportance.low)}}async getDotnetVersionImpl(e,t,r){try{const r=await(0,s.execChildProcess)(a.dotnetSdkPath??"dotnet",["--version"],e,{...process.env});return t.log(`dotnet --version\n${r}`,i.LogImportance.low),n.parse(r.replace(/[\r\n]/gm,""))}catch(n){return t.log(`dotnet --version failed on ${e}:\n\t${n}`,r),null}}}},8564(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EnvironmentStateManager=void 0;const n=r(4084),o=r(4434),i=r(1398),s=r(1398),a=r(4628),c=r(680),l=r(4724),u=r(5059),d=r(8955),p=r(9409),h=r(6928);class f extends o.EventEmitter{brokeredServiceHost;environmentService;environmentServiceSubscriber;operationInProgress;isDisposing=!1;environmentStateObserver;openedSolutionPath;openedSolutionExtension;openedFilterFilePath;constructor(e){super(),this.brokeredServiceHost=e,this.environmentService=(0,p.lazyPromiseLambda)(()=>this.initEnvironmentServiceProxy())}async dispose(){this.isDisposing=!0;try{if(this.environmentServiceSubscriber){const e=await this.environmentService;this.environmentServiceSubscriber?.dispose(),e.dispose()}}catch(e){}}getLatestEnvironmentState(){return this.environmentStateObserver?.getLatestEnvironmentState()}getOpenedSolution(){const e=this.environmentStateObserver?.getLatestEnvironmentState();return e?.solutions[0]}getOpenedSolutionExt(){const e=this.getOpenedSolution();return e!==this.openedSolutionPath&&(this.openedSolutionPath=e,e&&(this.openedSolutionExtension=h.extname(e))),this.openedSolutionExtension}getActiveWorkspace(){const e=s.workspace.workspaceFolders;if(e&&e.length>0){if(1===e.length)return e[0];{const t=this.environmentStateObserver?.getLatestEnvironmentState();if(t){const r=t.solutions[0];if(t.containsTemporarySolutionFile)return e[0];if(r){const e=s.workspace.getWorkspaceFolder(s.Uri.file(r));if(e)return e}for(let e=0;e<t.projects.length;e++){const r=t.projects[e].projectId.fullPath;if(r){const e=s.workspace.getWorkspaceFolder(s.Uri.file(r));if(e)return e}}}return e[0]}}}getActiveWorkspaceRoot(){const e=this.getActiveWorkspace();if(e)return e.uri.fsPath;const t=this.getOpenedSolution();return t?h.dirname(t):void 0}isSolutionGeneratedOutsideWorkspace(){return this.environmentStateObserver?.getLatestEnvironmentState()?.containsTemporarySolutionFile??!1}setOpenedFilterFile(e){this.openedFilterFilePath=e}getDisplaySolutionName(){if(this.openedFilterFilePath)return h.basename(this.openedFilterFilePath);const e=this.environmentStateObserver?.getLatestEnvironmentState();return e?.solutions.length?h.basename(e.solutions[0]):void 0}async closeSolution(){const e=await this.environmentService,t=await e.clear();return this.environmentStateObserver.updateEnvironmentStateIfNeeded(t)}async setSolutionAndFolderWorkspace(e,t,r){const n=await this.environmentService,o=await n.setSolutionWorkspace(e,r,t);return this.environmentStateObserver.updateEnvironmentStateIfNeeded(o)}async openNoSolutionWorkspace(e,t,r){const n=await this.environmentService,o=await n.openNoSolutionWorkspace(e,t,r);return this.environmentStateObserver.updateEnvironmentStateIfNeeded(o)}async loadSolution(e){const t=await this.environmentService,r=await t.refreshSolutionContent(e);return this.environmentStateObserver.updateEnvironmentStateIfNeeded(r)}async runOperation(e){for(;this.operationInProgress;)await this.operationInProgress.catch(()=>{});const t=e();this.operationInProgress=t.then(()=>this.operationInProgress=void 0);try{return await t}finally{this.operationInProgress=void 0}}async initEnvironmentServiceProxy(){const e=new d.TelemetryActivity("environment-service-initialization",c.telemetryService);let t=performance.now();const r=await this.brokeredServiceHost.serviceBroker.getProxy(l.default.environmentService);let n=performance.now();if(e.addOrUpdateMeasurements({getProxy:n-t}),!r)throw new Error("Could not get the IEnvironmentService proxy.");return t=performance.now(),this.environmentStateObserver=new g(e=>this.emit("environmentStateChanged",e),()=>this.getDisplaySolutionName()),r&&(this.environmentServiceSubscriber=await r.subscribe(this.environmentStateObserver)),n=performance.now(),e.addOrUpdateMeasurements({registerObserver:n-t}),this.isDisposing&&this.environmentServiceSubscriber?.dispose(),e.sendTelemetry(),r}}t.EnvironmentStateManager=f;class g extends n.Observer{onUpdateEnvironmentStateCallback;getDisplaySolutionNameCallback;latestEnvironmentState;configurationStatusBarItem;latestConfiguration;isEnvironmentPreviouslyValid;getLatestEnvironmentState(){return this.latestEnvironmentState}constructor(e,t){super(()=>this.onNext),this.onUpdateEnvironmentStateCallback=e,this.getDisplaySolutionNameCallback=t}onNext(e){this.updateEnvironmentStateIfNeeded(e)}updateEnvironmentStateIfNeeded(e){if(!this.latestEnvironmentState||e.version>this.latestEnvironmentState.version){this.latestEnvironmentState=e,0===this.latestEnvironmentState.solutions.length?i.commands.executeCommand("setContext","solutionOpened",!1):i.commands.executeCommand("setContext","solutionOpened",!0),this.latestEnvironmentState.containsTemporarySolutionFile?i.commands.executeCommand("setContext","generatedSlnOutsideWorkspace",!0):i.commands.executeCommand("setContext","generatedSlnOutsideWorkspace",!1),this.onUpdateEnvironmentStateCallback(this.latestEnvironmentState),c.projectInitializationStatus?.onEnvironmentUpdate(this.latestEnvironmentState.version,this.latestEnvironmentState.solutions.length,this.latestEnvironmentState.errors),c.selectedSolutionFileStatusBarItem?.onEnvironmentUpdate(this.getDisplaySolutionNameCallback()??"",this.latestEnvironmentState.containsTemporarySolutionFile);const t=!(this.latestEnvironmentState.errors&&this.latestEnvironmentState.errors.length>0);if(this.isEnvironmentPreviouslyValid!==t&&(this.isEnvironmentPreviouslyValid=t,i.commands.executeCommand("setContext","isValidSolution",t)),t){this.configurationStatusBarItem||(this.configurationStatusBarItem=s.window.createStatusBarItem("csdevkit.configuration",s.StatusBarAlignment.Left,11),this.configurationStatusBarItem.name=u.messageStrings.configurationStatusName,this.configurationStatusBarItem.command=a.default.selectActiveConfiguration,this.configurationStatusBarItem.tooltip=u.messageStrings.configurationTooltip);const e=this.latestEnvironmentState.configuration;e?(e!==this.latestConfiguration&&(this.configurationStatusBarItem.text=e.replace(/\|/g," "),this.latestConfiguration=e),this.configurationStatusBarItem.show()):this.configurationStatusBarItem.hide()}else this.configurationStatusBarItem?.hide();this.latestEnvironmentState.containsTemporarySolutionFile=e.containsTemporarySolutionFile}return this.latestEnvironmentState}}},1858(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DotnetCommandError=t.DotnetCommand=t.SolutionOpenError=t.SolutionReloadError=t.ExitCodeError=t.ErrorCodeError=void 0;class r extends Error{errorCode;constructor(e,t){super(t),this.errorCode=e,this.name="ErrorCodeError",this.errorCode=e}}t.ErrorCodeError=r;class n extends r{constructor(e,t){super(e,t),this.name="ExitCodeError"}}t.ExitCodeError=n;class o extends Error{constructor(e){super(e),this.name="SolutionReloadError"}}t.SolutionReloadError=o;class i extends Error{constructor(e){super(e),this.name="SolutionOpenError"}}var s;t.SolutionOpenError=i,function(e){e[e.checkMauiWorkloads=0]="checkMauiWorkloads",e[e.newSln=1]="newSln",e[e.newProject=2]="newProject",e[e.slnAddIntoFolder=3]="slnAddIntoFolder",e[e.slnAdd=4]="slnAdd",e[e.slnRemoveProject=5]="slnRemoveProject",e[e.restore=6]="restore",e[e.updateReference=7]="updateReference",e[e.info=8]="info",e[e.sdkCheck=9]="sdkCheck",e[e.dotnetVersion=10]="dotnetVersion",e[e.nugetAddPackage=11]="nugetAddPackage",e[e.nugetUpdatePackage=12]="nugetUpdatePackage",e[e.nugetRemovePackage=13]="nugetRemovePackage",e[e.nugetPackageSearch=14]="nugetPackageSearch",e[e.nugetGetVersions=15]="nugetGetVersions",e[e.nugetListInstalledPackages=16]="nugetListInstalledPackages",e[e.nugetListOutdatedPackages=17]="nugetListOutdatedPackages",e[e.publish=18]="publish"}(s||(t.DotnetCommand=s={}));class a extends n{constructor(e,t,r){super(t,r);const n=a.getCommandName(e);this.name="DotnetCommand"+n+"Error"}static getCommandName(e){switch(e){case s.checkMauiWorkloads:return"CheckMauiWorkloads";case s.newSln:return"NewSln";case s.newProject:return"NewProject";case s.slnAddIntoFolder:return"SlnAddIntoFolder";case s.slnAdd:return"SlnAdd";case s.slnRemoveProject:return"SlnRemoveProject";case s.restore:return"Restore";case s.updateReference:return"UpdateReference";case s.info:return"Info";case s.sdkCheck:return"SdkCheck";case s.dotnetVersion:return"DotnetVersion";case s.nugetAddPackage:return"NuGetAddPackage";case s.nugetUpdatePackage:return"NuGetUpdatePackage";case s.nugetRemovePackage:return"NuGetRemovePackage";case s.nugetPackageSearch:return"NuGetPackageSearch";case s.nugetGetVersions:return"NuGetGetVersions";case s.nugetListInstalledPackages:return"NuGetListInstalledPackages";case s.nugetListOutdatedPackages:return"NuGetListOutdatedPackages";case s.publish:return"Publish";default:return""}}}t.DotnetCommandError=a},868(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IPackageJsonWithCsDevKitExports=t.idsOfExtensionsAllowedToExtendCsDevKit=void 0;const n=r(9768);var o;t.idsOfExtensionsAllowedToExtendCsDevKit=[n.EXTENSION_ID,n.CSHARP_EXTENSION_ID,"ms-dotnettools.dotnet-maui","ms-dotnettools.vscodeintellicode-csharp","ms-dotnettools.vscode-diagnosticshub"],function(e){e.is=function(e){return e&&!!e.csdevkitExports}}(o||(t.IPackageJsonWithCsDevKitExports=o={}))},680(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setDotNetSdkPath=t.sendFirstInteractionWithExplorerTelemetry=t.deactivate=t.activate=t.dotnetSdkPath=t.dotnetVersionManager=t.firstExplorerInteractionTelemetry=t.dotnetTaskProvider=t.selectedSolutionFileStatusBarItem=t.projectInitializationStatus=t.workspaceProjectService=t.projectQueryableSpace=t.environmentStateManager=t.solutionExplorerTreeView=t.solutionExplorerProvider=t.experimentationService=t.telemetryService=t.logger=void 0;const n=r(5829),o=r(4701),i=r(1398),s=r(3130),a=r(1566),c=r(3467),l=r(2776),u=r(4628),d=r(5537),p=r(1820),h=r(3331),f=r(728),g=r(5562),m=r(2393),v=r(8458),y=r(6121),S=r(1242),w=r(5125),E=r(91),_=r(4812),b=r(3873),P=r(4855),T=r(8928),C=r(2104),I=r(9071),O=r(5462),N=r(6831),R=r(3097),A=r(9768),D=r(9020),x=r(9741),k=r(9359),j=r(1781),M=r(9431),L=r(1020),F=r(2963),U=r(8564),$=r(5404),B=r(5352),V=r(4989),H=r(3725),q=r(5033),z=r(3487),W=r(7383),G=r(6360),K=r(5059),X=r(8955),J=r(6759),Q=r(1569),Y=r(1038),Z=r(9073),ee=r(9896),te=r(857),re=r(6928),ne=r(4324),oe=r(6858),ie=r(866),se=r(521),ae=r(7194),ce=r(3262),le=r(71),ue=r(3126),de=r(7804),pe=r(8874),he=r(8982),fe=r(2701),ge=r(6888),me=r(431),ve=r(1412),ye=r(2470),Se=r(7224),we=r(2850),Ee=r(7032),_e=r(4379),be=r(7505);let Pe,Te;function Ce(e,r){e.subscriptions.push(i.commands.registerCommand(u.default.openSolution,t=>(0,w.default)(e,t))),e.subscriptions.push(i.commands.registerCommand(u.default.addNewProject,()=>(0,f.addNewProject)(e))),e.subscriptions.push(i.commands.registerCommand(u.default.addNewProjectFromNewFileMenu,()=>(0,f.addNewProjectFromNewFileMenu)(e))),e.subscriptions.push(i.commands.registerCommand(u.default.addExistingProject,e=>(0,d.default)(e))),e.subscriptions.push(i.commands.registerCommand(u.default.buildAndRunTests,o.buildAndRunTests)),e.subscriptions.push(i.commands.registerCommand(u.default.buildSolution,t=>(0,P.buildSolution)(e,t))),e.subscriptions.push(i.commands.registerCommand(u.default.rebuildSolution,t=>(0,P.rebuildSolution)(e,t))),e.subscriptions.push(i.commands.registerCommand(u.default.cleanSolution,t=>(0,P.cleanSolution)(e,t))),e.subscriptions.push(i.commands.registerCommand(u.default.showEntitlementsStatus,G.showEntitlementsStatusCommand)),e.subscriptions.push(i.commands.registerCommand(u.default.signIntoVsAccount,G.signInCommand)),e.subscriptions.push(i.commands.registerCommand(u.default.searchProjectFromCommandPalette,b.searchProjectFromCommandPalette)),e.subscriptions.push(i.commands.registerCommand(u.default.searchOpenFromCommandPalette,b.searchOpenFromCommandPalette)),e.subscriptions.push(i.commands.registerCommand(u.default.searchFromCommandPalette,b.searchFromCommandPalette)),e.subscriptions.push(i.commands.registerCommand(u.default.addLinkedFile,p.default)),e.subscriptions.push(i.commands.registerCommand(u.default.addNewFile,h.addNewFile)),e.subscriptions.push(i.commands.registerCommand(u.default.addNewFileFromNewFileMenu,h.addNewFileFromNewFileMenu)),e.subscriptions.push(i.commands.registerCommand(u.default.addProjectReference,m.default)),e.subscriptions.push(i.commands.registerCommand(u.default.removeProjectReference,_.default)),e.subscriptions.push(i.commands.registerCommand(u.default.openProjectsLogsView,S.default)),e.subscriptions.push(i.commands.registerCommand(u.default.openDevKitOutputWindow,ce.default)),e.subscriptions.push(i.commands.registerCommand(u.default.debugProjectLaunch,e=>(0,y.default)(e,{}))),e.subscriptions.push(i.commands.registerCommand(u.default.noDebugProjectLaunch,e=>(0,y.default)(e,{noDebug:!0}))),e.subscriptions.push(i.commands.registerCommand(u.default.debugProperties,()=>(0,oe.default)(r))),e.subscriptions.push(i.commands.registerCommand(u.default.stepIntoProjectLaunch,e=>(0,y.default)(e,{stopAtEntry:!0}))),e.subscriptions.push(i.commands.registerCommand(u.default.debugFileLaunch,e=>(0,v.default)(e,{}))),e.subscriptions.push(i.commands.registerCommand(u.default.noDebugFileLaunch,e=>(0,v.default)(e,{noDebug:!0}))),e.subscriptions.push(i.commands.registerCommand(u.default.selectStartupProject,()=>L.startupProjectService.pickStartupProject())),e.subscriptions.push(i.commands.registerCommand(u.default.selectLaunchConfiguration,()=>(0,x.getActiveLaunchConfigurationService)().pickLaunchConfiguration())),e.subscriptions.push(i.commands.registerCommand(u.default.selectLaunchTargetFramework,()=>(0,he.getActiveDebugTargetFrameworkService)().pickDebugTargetFramework())),e.subscriptions.push(i.commands.registerCommand(u.default.installDotnetSdk,()=>(0,B.showInstallDotnetSdkWebview)(e))),e.subscriptions.push(i.commands.registerCommand(u.default.installDotnetSdkFromWalkthrough,()=>function(e){(0,B.showInstallDotnetSdkWebviewBeside)(e)}(e))),e.subscriptions.push(i.commands.registerCommand(u.default.checkDotnetRequirements,()=>(0,H.showCheckRequirementsWebview)(e))),e.subscriptions.push(i.commands.registerCommand(u.default.helperOpenUrl,t=>(0,B.openUrlCmdHandler)(e,"OpenUrl",t))),e.subscriptions.push(i.commands.registerCommand(u.default.selectActiveConfiguration,()=>(0,de.default)(e))),e.subscriptions.push(i.commands.registerCommand(u.default.saveSolutionFile,ue.default)),e.subscriptions.push(i.commands.registerCommand(u.default.collectLogs,()=>(0,we.collectLogs)(e,r))),e.subscriptions.push(i.commands.registerCommand(u.default.manageUserSecrets,se.manageUserSecrets)),e.subscriptions.push(i.commands.registerCommand(u.default.publish,e=>(0,le.default)(e))),e.subscriptions.push(i.commands.registerCommand(u.default.buildFolder,t=>(0,T.buildFolder)(e,t))),e.subscriptions.push(i.commands.registerCommand(u.default.rebuildFolder,t=>(0,T.rebuildFolder)(e,t))),e.subscriptions.push(i.commands.registerCommand(u.default.cleanFolder,t=>(0,T.cleanFolder)(e,t))),e.subscriptions.push(i.commands.registerCommand(u.default.publishFolder,e=>(0,T.publishFolder)(e))),e.subscriptions.push((0,s.instrumentOperationAsVsCodeCommand)(u.default.webviewRunCommand,V.webviewCmdLinkHandler)),e.subscriptions.push(i.commands.registerCommand(u.default.addNuGetPackage,g.default)),e.subscriptions.push(i.commands.registerCommand(u.default.updateNuGetPackage,O.default)),e.subscriptions.push(i.commands.registerCommand(u.default.removeNuGetPackage,E.default)),e.subscriptions.push(i.commands.registerCommand(u.default.showNuGetOutput,N.showNuGetOutput)),e.subscriptions.push(i.commands.registerCommand(u.default.openCoverageReport,ae.default)),e.subscriptions.push(i.commands.registerCommand(u.default.showProjectDetailsMigration,()=>(0,Q.showProjectDetailsMigrationNotification)(e,t.logger,!0))),e.subscriptions.push(new be.SolutionSyncService(r,()=>t.projectQueryableSpace,()=>w.vscodeWorkspaceFileWatcher??void 0,()=>t.environmentStateManager?.getOpenedSolution()))}function Ie(e,r,s=!1){if(e.subscriptions.push(i.window.registerWebviewPanelSerializer(u.default.installDotnetSdk,new B.InstallDotnetSdkViewSerializer(e))),e.subscriptions.push(i.window.registerWebviewPanelSerializer(u.default.checkDotnetRequirements,new H.CheckRequirementsViewSerializer(e))),s)return;t.environmentStateManager=new U.EnvironmentStateManager(r),t.solutionExplorerProvider=new Y.SolutionExplorerProvider(e,r,t.environmentStateManager),t.projectInitializationStatus=new _e.ProjectInitializationStatus,t.selectedSolutionFileStatusBarItem=new Ee.SelectedSolutionFileStatus;const a=i.window.registerTreeDataProvider("solutionExplorer",t.solutionExplorerProvider);return t.solutionExplorerTreeView=i.window.createTreeView("solutionExplorer",{treeDataProvider:t.solutionExplorerProvider}),e.subscriptions.push(a,t.solutionExplorerProvider,t.solutionExplorerTreeView,t.projectInitializationStatus,t.selectedSolutionFileStatusBarItem),Oe(r,()=>(0,n.createCoverageControllers)(e,r.serviceBroker,t.telemetryService,K.codeCoverageStrings)),Oe(r,()=>(0,o.createAndRegisterTestController)(e,r.serviceBroker,(0,n.getCollectionController)())),{solutionExplorerProvider:t.solutionExplorerProvider,environmentStateManager:t.environmentStateManager}}async function Oe(e,r){e.hasServerProcessLoaded()?await r():e.serverProcessLoaded(async function(){try{await r()}catch(e){t.logger.log("Server process spawn handler failed: "+e,q.LogImportance.high)}})}function Ne(e,t){return(0,z.addDotNetDumpCreationEnvironmentValues)(t),(0,J.writeCommonPropsToFileAsync)(e)}t.activate=async function(e){const n=Date.now();let s=null;async function d(e,t){s=e;try{const e=await t();return s+=" (succeeded)",e}catch(e){throw s+=" (failed)",e}}t.logger=new q.Logger(e.extension.packageJSON.displayName);const p=e.logUri.fsPath;t.logger.log("C# Dev Kit extension activating...",q.LogImportance.low);try{await d("initializeTelemetryAsync",()=>async function(e){t.telemetryService=new J.TelemetryService(e);try{await t.telemetryService.saveVSCodePropsAsync(e)}catch(e){t.logger.log("Saving VSCode common properties failed: "+e,q.LogImportance.high)}}(e)),await d("initializeExperimentationServiceAsync",()=>async function(e){const r=A.EXTENSION_ID,n=e.extension.packageJSON.version;let o;switch(i.env.uriScheme){case"vscode":default:o=a.TargetPopulation.Public;break;case"vscode-insiders":o=a.TargetPopulation.Insiders;break;case"vscode-exploration":o=a.TargetPopulation.Internal;break;case"code-oss":o=a.TargetPopulation.Team}try{const i=t.telemetryService?.getExperimentationTelemetryReporter();i&&(t.experimentationService=await(0,a.getExperimentationServiceAsync)(r,n,o,i,e.globalState),await t.experimentationService.initializePromise,await t.experimentationService.initialFetch)}catch(e){t.logger.log("Experimentation service initialization failed: "+e)}}(e));const s=new X.TelemetryActivity("extension-activation",t.telemetryService,n);if(t.firstExplorerInteractionTelemetry=new X.TelemetryActivity("first-interaction-with-explorer",t.telemetryService),(0,ne.checkHostApp)()||(0,me.showLicenseViolationToastAndThrow)(),!i.workspace.isTrusted)return function(e){for(const t of Object.values(u.default))e.subscriptions.push(i.commands.registerCommand(t,pe.default))}(e),{isLimitedActivation:!0};const h=!i.workspace.workspaceFolders;h||await d("activateCSharpExtension",async()=>{const e=i.extensions.getExtension(A.CSHARP_EXTENSION_ID);if(!e)throw new Error(`C# extension (${A.CSHARP_EXTENSION_ID}) is not installed or not activated.`);e.isActive||await t.logger.watch(`Activating C# extension (version ${e.packageJSON.version})`,async()=>{await e.activate()})}),await i.commands.executeCommand("setContext","solutionExplorerVisible",!1);const f=await d("loadOrCreateCachedValue->getAllComponentsMap",()=>(0,l.loadOrCreateCachedValue)(e,"components",()=>(0,R.getAllComponentsMap)(e.asAbsolutePath("components")))),g=await d("prepareBrokeredServices",()=>(0,c.prepareBrokeredServices)(e,f,t.logger));let m;t.dotnetVersionManager=new ge.DotnetVersionManager(e);let v=null;const y=!h&&i.workspace.getConfiguration("dotnet").get("preferCSharpExtension");if(h)Ce(e,g.serviceBroker),m=Ie(e,g,!0);else if(y&&(0,$.doesCSharpExtensionSupportDeferral)())t.logger.log("C# Dev Kit extension is disabled because the setting 'dotnet.preferCSharpExtension' is set to 'true'"),s.addOrUpdateProperties({disabled:String(!0)});else if(await(0,$.checkCSharpExtensionVersionCompatibility)(e)){Ce(e,g.serviceBroker),m=Ie(e,g),t.projectQueryableSpace=new Se.ProjectQueryableSpace(g.serviceBroker),(i.workspace.workspaceFolders&&i.workspace.workspaceFolders.length>0?i.workspace.workspaceFolders[0].uri.fsPath:null)&&(t.dotnetTaskProvider=new F.DotnetTaskProvider,Pe=i.tasks.registerTaskProvider(F.DotnetTaskProvider.dotnetType,t.dotnetTaskProvider)),t.workspaceProjectService=new I.WorkspaceProjectService,await t.workspaceProjectService.initialize(),e.subscriptions.push(t.workspaceProjectService);const r=new C.FolderContextManager(t.workspaceProjectService);e.subscriptions.push(r),(0,M.setupLaunchableProjectInfoObserver)(e,g),(0,L.initializeStartupProjectService)(e),(0,x.setupActiveLaunchConfigurationService)(e),(0,fe.setupDebugTargetFrameworkInfoObserver)(e,g),(0,he.setupActiveDebugTargetFrameworkService)(e),(0,j.setupLanguageStatusItems)(e),v=await d("registerDynamicDotnetConfigurationProvider",()=>(0,D.registerDynamicDotnetConfigurationProvider)(e,g)),(0,k.prepareHotReload)(e)}const[S,E]=await d("registerIdentityService",()=>(0,G.registerIdentityService)(e));t.telemetryService?.registerForTelLevelChangeEvent(g,e),t.telemetryService?.registerUpdateIsMicrosoftInternal(S,e),s.end(),s.sendTelemetry(),Te=J.TelemetryService.getSessionId(i.env.sessionId),t.telemetryService?.sendTelemetryEvent("CSDevKit/Extension/Start"),h||await d("checkAndOpenInstallSdkView",()=>async function(e){try{if(i.workspace.getConfiguration("dotnet").get("suppressSdkInstallView",!1))return void t.logger.log("SDK install view suppressed by user setting");const{findAndParseGlobalJson:n}=await Promise.resolve().then(()=>r(3923)),{getInstalledSDKs:o}=await Promise.resolve().then(()=>r(4989)),{NET_RUNTIME_VERSION:s}=await Promise.resolve().then(()=>r(9768)),a=i.workspace.workspaceFolders;if(!a||0===a.length)return;const c=s,l=await o(),u=l?.some(e=>e.startsWith(c+".")),d=await n(a[0].uri.fsPath),p=d?.sdkVersion,h=p&&l?.some(e=>e.startsWith(p.split(".").slice(0,2).join(".")+"."));(!u||p&&!h)&&(t.logger.log("Missing required .NET SDK(s), opening Check Requirements view"),(0,H.showCheckRequirementsWebview)(e))}catch(e){t.logger.log(`Failed to check for missing SDKs: ${e}`)}}(e)),t.dotnetTaskProvider&&(0,Z.showSolutionExplorer)(e),h||(0,Q.showProjectDetailsMigrationNotification)(e,t.logger);const _={outputChannel:ve.hotReloadLogger.outputChannel,hotReloadTestLogger:ve.hotReloadLogger,createHotReloadClientService:()=>(0,ie.getHotReloadClientService)(),setHotReloadOptionServiceForTesting:ye.setHotReloadOptionServiceForTesting,resetHotReloadOptionServiceForTesting:ye.resetHotReloadOptionServiceForTesting,getHotReloadOptionService:ye.getHotReloadOptionService};return{isLimitedActivation:!1,serviceBroker:g.serviceBroker,getBrokeredServiceServerPipeName:g.getBrokeredServiceServerPipeName,components:f,hasServerProcessLoaded:g.hasServerProcessLoaded,serverProcessLoaded:g.serverProcessLoaded,writeCommonPropsAsync:J.writeCommonPropsToFileAsync,setupTelemetryAsync:Ne,setupTelemetryEnvironmentAsync:t=>(0,J.writeCommonPropsToFileAsync)(e,t),launchChildProcessAsync:(e,t,r,n)=>async function(e,t,r,n,o){return(0,z.launchChildProcess)(e,t,r,n,o)}(f,e,t,r,n),testHooks:m?{views:m,telemetryService:t.telemetryService,identityTestHooks:E,getTestController:o.getTestController,logDirectory:p,debuggerTestExports:v,hotReloadTestExports:_,getAspireServiceAsync:W.getAspireServiceAsync,environmentStateManager:t.environmentStateManager,workspaceProjectService:t.workspaceProjectService,getWorkspaceFileWatcher:()=>w.vscodeWorkspaceFileWatcher,getSelectedSolutionStatusText:()=>t.selectedSolutionFileStatusBarItem?.getText()}:void 0}}catch(e){throw t.logger.reportExceptionTelemetryAndLog("activate",s,"",e,t.telemetryService),e}},t.deactivate=function(){let e="CsDevKit/Extension/Exit",r="deactivate: start";t.telemetryService?.sendTelemetryEvent(e+"/Begin");try{t.logger.log("C# Dev Kit deactivate() is now executing..."),r="deactivate: write session deactivated file",ee.writeFile(re.join(function(){let e=re.join(te.tmpdir(),"csdevkit","sessions","deactivated");try{ee.existsSync(e)||ee.mkdirSync(e,{recursive:!0})}catch(r){t.logger.log(`Failed to create deactivated sessions folder path ${e} due to ${r}`),e=te.tmpdir()}return e}(),Te?.toLowerCase()+".txt"),"",e=>{}),r="deactivate: dispose environmentStateManager",t.environmentStateManager?.dispose(),r="deactivate: dispose dotnetTaskProvider",r=Pe?.dispose(),r="deactivate: dispose projectQueryableSpace",t.projectQueryableSpace?.dispose(),t.telemetryService?.sendTelemetryEvent(e,{shutdownReason:"Normal"})}catch(e){throw t.logger.reportExceptionTelemetryAndLog("deactivate",r,"",e,t.telemetryService,{shutdownReason:"Abnormal"}),e}finally{t.telemetryService?.dispose(),t.telemetryService=null}},t.sendFirstInteractionWithExplorerTelemetry=function(){t.firstExplorerInteractionTelemetry&&(t.firstExplorerInteractionTelemetry.end(),t.firstExplorerInteractionTelemetry.sendTelemetry(),t.firstExplorerInteractionTelemetry=void 0)},t.setDotNetSdkPath=function(e){t.dotnetSdkPath=e}},5404(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.doesCSharpExtensionSupportDeferral=t.checkCSharpExtensionVersionCompatibility=void 0;const n=r(9768),o=r(680),i=r(9589),s=r(1398),a=r(2477),c=r(128);a.config({bundleFormat:a.BundleFormat.standalone,locale:s.env.language,messageFormat:a.MessageFormat.both});const l=a.loadMessageBundle(r(6928).join(__dirname,"extensionDependenciesChecks.ts"));t.checkCSharpExtensionVersionCompatibility=async function(e){const t=s.extensions.getExtension(n.CSHARP_EXTENSION_ID),r=t?.packageJSON.version;let a=!0;if(r?i.lt(r,n.CSHARP_EXTENSION_REQUIRED_VERSION)&&(o.logger.log(`The C# extension is installed, but has version ${r} which is incompatible with C# Dev Kit.`),async function(){const t=e.extension.packageJSON.displayName,r=l(0,null,t,n.CSHARP_EXTENSION_REQUIRED_VERSION,n.CSHARP_EXTENSION_ID),o=l(1,null);if(await s.window.showWarningMessage(r,o)===o){const e=s.extensions.getExtension(n.EXTENSION_ID)?.packageJSON.preview;e||s.extensions.getExtension(n.CSHARP_EXTENSION_ID)?.packageJSON.preview?await s.commands.executeCommand("workbench.extensions.action.switchToPreReleaseVersion",n.CSHARP_EXTENSION_ID):await s.commands.executeCommand("workbench.extensions.action.switchToReleaseVersion",n.CSHARP_EXTENSION_ID),await s.commands.executeCommand("workbench.action.reloadWindow")}}().catch(()=>{}),a=!1):(o.logger.log("The C# extension is missing."),a=!1),!a){let e=new c.TelemetryEvent("dependency-update-needed",o.telemetryService);e.addOrUpdateProperties({csharpExtensionCurrentVersion:r,csharpExtensionRequiredVersion:n.CSHARP_EXTENSION_REQUIRED_VERSION}),e.sendTelemetry()}return a},t.doesCSharpExtensionSupportDeferral=function(){const e=s.extensions.getExtension(n.CSHARP_EXTENSION_ID),t=e?.packageJSON.version;return!!t&&i.gte(t,n.CSHARP_EXTENSION_SUPPORTS_DEFERRAL_VERSION)}},5352(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InstallDotnetSdkViewSerializer=t.openUrlCmdHandler=t.showInstallDotnetSdkWebviewBeside=t.showInstallDotnetSdkWebview=void 0;const n=r(6928),o=r(1398),i=r(3130),s=r(4989);t.showInstallDotnetSdkWebview=function(e){a.createOrShow(e.extensionPath)},t.showInstallDotnetSdkWebviewBeside=function(e){a.createOrShow(e.extensionPath,{beside:!0})},t.openUrlCmdHandler=async function(e,t,r){(0,i.sendInfo)(t,{url:r}),o.commands.executeCommand("vscode.open",o.Uri.parse(r))},t.InstallDotnetSdkViewSerializer=class{context;constructor(e){this.context=e}async deserializeWebviewPanel(e,t){a.createOrShow(this.context.extensionPath,{webviewPanel:e})}};class a{static instance;static viewType=s.INSTALL_SDK_WEBVIEW_ID;_panel;_extensionPath;_disposables=[];static createOrShow(e,t){let r=o.ViewColumn.Active;if(t?.beside){const e=o.window.activeTextEditor;r=void 0===e||e.viewColumn===o.ViewColumn.One?o.ViewColumn.Two:o.ViewColumn.One}a.instance?a.instance._panel?.reveal():a.instance=new a(e,t?.webviewPanel?t.webviewPanel:r)}constructor(e,t){this._extensionPath=e,t.viewType?this._panel=t:this._panel=o.window.createWebviewPanel(a.viewType,"Install New .NET SDK",t,{enableScripts:!0,localResourceRoots:[o.Uri.file(n.join(this._extensionPath,"out"))],enableCommandUris:!0,retainContextWhenHidden:!0}),this._panel.webview.html=this._getHtmlForWebview(),this._panel.onDidDispose(()=>this.dispose(),null,this._disposables),this._panel.webview.onDidReceiveMessage(e=>{switch(e.command){case"onWillFetchAvailableReleases":return void this.doFetchAvailableReleases();case"onWillFetchAsset":return void this.doFetchAsset(e.primaryAsset,e.payload);case"onWillDownloadDotnetSdk":return void this.doDownloadDotnetSdk(e.payload);case"onWillReloadWindow":this.doReloadWindow()}},null,this._disposables)}async doFetchAvailableReleases(){const e=await(0,s.getAllSuggestedSDKVersions)();this._panel?.webview.postMessage({command:"onDidFetchAvailableReleases",payload:e})}async doFetchAsset(e,t){this._panel?.webview.postMessage({command:"onDidFetchAsset",primaryAsset:e,payload:t})}async doDownloadDotnetSdk(e){(0,s.acquireSDK)(e)}async doReloadWindow(){await(0,s.webviewCmdLinkHandler)({webview:a.viewType,identifier:"Reload Window",command:"workbench.action.reloadWindow"})}dispose(){for(a.instance=void 0,this._panel?.dispose(),this._panel=void 0;this._disposables.length;){const e=this._disposables.pop();e&&e.dispose()}}_getHtmlForWebview(){const e=o.Uri.file(n.join(this._extensionPath,"out","assets","install-sdk","index.js")),t=this._panel?.webview.asWebviewUri(e);return`<!DOCTYPE html>\n\t\t\t<html lang="en">\n\t\t\t<head>\n\t\t\t\t<meta charset="utf-8">\n\t\t\t\t<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">\n\t\t\t\t<meta name="theme-color" content="#000000">\n\t\t\t\t<title>React App</title>\n\t\t\t</head>\n\t\t\t<body>\n\t\t\t\t<noscript>You need to enable JavaScript to run this app.</noscript>\n\t\t\t\t<div id="root"></div>\n\n\t\t\t\t<script nonce="${(0,s.getNonce)()}" src="${t}" type="module"><\/script>\n\t\t\t</body>\n\t\t\t</html>`}}},431(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.showLicenseViolationToastAndThrow=void 0;const n=r(1398),o=r(5059),i=r(9768);t.showLicenseViolationToastAndThrow=function(){throw n.window.showErrorMessage(`${o.licenseViolationMessage}.`,o.promptStrings.moreInformation).then(e=>{e===o.promptStrings.moreInformation&&n.env.openExternal(n.Uri.parse(i.LICENSE_URL))}),new Error(o.licenseViolationMessage)}},2850(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.collectLogs=t.collectLogsCore=t.crc32=t.buildZipBuffer=void 0;const n=r(5317),o=r(9896),i=r(857),s=r(6928),a=r(1398),c=r(3106),l=r(9768),u=r(680),d=r(6274),p=r(1750),h=r(3853),f=r(236),g=r(778),m=r(1298),v=r(3116);function y(e){const t=[],r=[];let n=0;for(const o of e){const e=Buffer.from(o.name,"utf8"),i=new Uint8Array(c.deflateRawSync(new Uint8Array(o.data))),s=Buffer.alloc(30+e.length);s.writeUInt32LE(67324752,0),s.writeUInt16LE(20,4),s.writeUInt16LE(0,6),s.writeUInt16LE(8,8),s.writeUInt16LE(0,10),s.writeUInt16LE(0,12),s.writeUInt32LE(w(o.data),14),s.writeUInt32LE(i.length,18),s.writeUInt32LE(o.data.length,22),s.writeUInt16LE(e.length,26),s.writeUInt16LE(0,28),s.set(e,30),t.push(new Uint8Array(s),i);const a=Buffer.alloc(46+e.length);a.writeUInt32LE(33639248,0),a.writeUInt16LE(20,4),a.writeUInt16LE(20,6),a.writeUInt16LE(0,8),a.writeUInt16LE(8,10),a.writeUInt16LE(0,12),a.writeUInt16LE(0,14),a.writeUInt32LE(w(o.data),16),a.writeUInt32LE(i.length,20),a.writeUInt32LE(o.data.length,24),a.writeUInt16LE(e.length,28),a.writeUInt16LE(0,30),a.writeUInt16LE(0,32),a.writeUInt16LE(0,34),a.writeUInt16LE(0,36),a.writeUInt32LE(0,38),a.writeUInt32LE(n,42),a.set(e,46),r.push(new Uint8Array(a)),n+=s.length+i.length}const o=n,i=r.reduce((e,t)=>e+t.length,0),s=Buffer.alloc(22);s.writeUInt32LE(101010256,0),s.writeUInt16LE(0,4),s.writeUInt16LE(0,6),s.writeUInt16LE(e.length,8),s.writeUInt16LE(e.length,10),s.writeUInt32LE(i,12),s.writeUInt32LE(o,16),s.writeUInt16LE(0,20);const a=t.reduce((e,t)=>e+t.length,0)+r.reduce((e,t)=>e+t.length,0)+s.length,l=new Uint8Array(a);let u=0;for(const e of[...t,...r,new Uint8Array(s)])l.set(e,u),u+=e.length;return l}t.buildZipBuffer=y;const S=(()=>{const e=new Uint32Array(256);for(let t=0;t<256;t++){let r=t;for(let e=0;e<8;e++)r=1&r?3988292384^r>>>1:r>>>1;e[t]=r}return e})();function w(e){let t=4294967295;for(let r=0;r<e.length;r++)t=S[255&(t^e[r])]^t>>>8;return(4294967295^t)>>>0}function E(){const e=a.extensions.getExtension(l.CSHARP_EXTENSION_ID);if(e?.isActive)return e.exports??void 0}async function _(e,t,r=[]){const n=[],o=new Set([".log",".svclog",...r.map(e=>e.toLowerCase())]);try{const i=await a.workspace.fs.readDirectory(e);for(const[s,c]of i){if(c===a.FileType.Directory){const o=a.Uri.joinPath(e,s),i=await _(o,`${t}/${s}`,r);n.push(...i);continue}const i=s.toLowerCase(),l=Array.from(o).some(e=>i.endsWith(e));if(c===a.FileType.File&&l)try{const r=a.Uri.joinPath(e,s),o=await a.workspace.fs.readFile(r);n.push({name:`${t}/${s}`,data:Buffer.from(o)})}catch{}}}catch{}return n}async function b(e,t){const r=[],c=await _(e.logUri,"csdevkit");r.push(...c);const l=E()?.logDirectory;if(l){const e=a.Uri.file(l),t=await _(e,"csharp");r.push(...t)}const p=(h=e.logUri,f=v.DOTNET_INSTALL_TOOL_EXTENSION_ID,a.Uri.joinPath(h,"..",f));var h,f;const g=await _(p,"dotnet-runtime",[".txt",".tmp"]);r.push(...g);const m=(0,d.gatherCurrentSettings)("csdevkit","dotnet","csharp","razor");r.push({name:"settings.json",data:Buffer.from(m,"utf8")});const S=function(e){const t=[`VS Code Version : ${a.version}`,`OS : ${i.type()} ${i.release()} ${i.arch()}`,`Node : ${process.versions.node}`,`V8 : ${process.versions.v8}`,`Electron : ${process.versions.electron??"N/A"}`,"","--- dotnet --info ---",e,"","--- Installed Extensions ---"],r=a.extensions.all.filter(e=>!e.packageJSON?.isBuiltin).sort((e,t)=>(e.id??"").localeCompare(t.id??""));for(const e of r)t.push(` ${e.id} ${e.packageJSON?.version??"?"}`);return(0,d.normalizeFilePaths)(t.join("\n"))}(await function(){const e=u.dotnetSdkPath??"dotnet",t=a.workspace.workspaceFolders?.[0]?.uri.fsPath;return new Promise(r=>{n.execFile(e,["--info"],{timeout:15e3,cwd:t},(e,t,n)=>{r(e?`Error running dotnet --info: ${e.message}`:t+(n?`\n${n}`:""))})})}());if(r.push({name:"environment.txt",data:Buffer.from(S,"utf8")}),t?.activityLogs){const{csharpLog:e,lspTraceLog:n,razorLog:o}=t.activityLogs;e&&r.push({name:"csharp.activity.log",data:Buffer.from(e,"utf8")}),n&&r.push({name:"csharp-lsp-trace.activity.log",data:Buffer.from(n,"utf8")}),o&&r.push({name:"razor.activity.log",data:Buffer.from(o,"utf8")})}if(t?.additionalFiles)for(const e of t.additionalFiles)try{const t=await o.promises.readFile(e);r.push({name:s.basename(e),data:t})}catch{}return y(r)}function P(){const e=`csdevkit-logs-${(new Date).toISOString().replace(/[:.]/g,"-").slice(0,19)}.zip`,t=a.workspace.workspaceFolders?.[0];return t?a.Uri.joinPath(t.uri,e):a.Uri.file(s.join(i.homedir(),e))}async function T(e,t){const r=await async function(){const e={label:h.collectExistingLogsLabel,description:h.collectExistingLogsDescription,detail:h.collectExistingLogsDetail,mode:"existing"},t=[{label:h.recordNewTraceLabel,description:h.recordNewTraceDescription,detail:h.recordNewTraceDetail,mode:"trace"}];(function(){const e=E();return"function"==typeof e?.captureActivityLogs})()&&t.push({label:h.recordActivityLogsLabel,description:h.recordActivityLogsDescription,detail:h.recordActivityLogsDetail,mode:"activity"}),t.push({label:h.memoryDumpLabel,description:h.memoryDumpDescription,detail:h.memoryDumpDetail,mode:"memory-dump"},{label:h.gcDumpLabel,description:h.gcDumpDescription,detail:h.gcDumpDetail,mode:"gc-dump"});const r=[e,...t];return new Promise(t=>{const n=a.window.createQuickPick();n.title=h.collectLogsTitle,n.placeholder=h.collectLogsPlaceholder,n.canSelectMany=!0,n.items=r,n.selectedItems=[e],n.onDidChangeSelection(t=>{t.includes(e)||(n.selectedItems=[e,...t])});let o=!1;n.onDidAccept(()=>{o=!0;const e=n.selectedItems.map(e=>e.mode);t(e),n.dispose()}),n.onDidHide(()=>{o||(t([]),n.dispose())}),n.show()})}();if(0===r.length)return;const n=r.includes("trace"),o=r.includes("activity"),i=r.includes("memory-dump"),s=r.includes("gc-dump"),c=i||s,l=n||o,u=c||n,m=[];if(n&&m.push({toolName:"dotnet-trace",checkFn:g.ensureDotnetTraceAvailable}),i&&m.push({toolName:"dotnet-dump",checkFn:g.ensureDotnetDumpAvailable}),s&&m.push({toolName:"dotnet-gcdump",checkFn:g.ensureDotnetGcDumpAvailable}),m.length>0&&!await(0,g.ensureAllToolsAvailable)(m))return;let v;if(u&&(v=await(0,p.selectProcesses)(t),!v))return;const y=c&&l,S=[];let w;if(y&&v){const e=await O(v,i,s,"before-");S.push(...e)}if(n&&o&&v){if(v=(0,p.revalidateProcesses)(v),!v)return;let e=()=>{};const r=new Promise(t=>{e=t}),n=(0,f.recordLiveTrace)(t,{processes:v,stopSignal:r}),o=C(r),i=Promise.all([n,o]).then(()=>{});await a.window.withProgress({location:a.ProgressLocation.Notification,title:h.recordingDiagnosticsTitle,cancellable:!0},async(t,n)=>{n.onCancellationRequested(()=>e()),await Promise.race([r,i])}),e();const[s,c]=await Promise.all([n,o]);S.push(...s),w=c}else if(n&&v){if(v=(0,p.revalidateProcesses)(v),!v)return;const e=await(0,f.recordLiveTrace)(t,{processes:v});S.push(...e)}else o&&(w=await C());if(n&&0===S.length)return void a.window.showWarningMessage(h.noTraceFilesProduced);if(y&&v){const e=await O(v,i,s,"after-");S.push(...e)}if(c&&!l&&v){const e=await O(v,i,s);if(0===e.length)return void a.window.showWarningMessage(h.noDumpFilesProduced);S.push(...e)}const _={activityLogs:o,performanceTrace:n,memoryDump:i,gcDump:s},T=await a.window.showSaveDialog({defaultUri:P(),filters:{zipFiles:["zip"]},saveLabel:h.saveLogsLabel,title:h.saveLogsTitle});if(T){try{await a.window.withProgress({location:a.ProgressLocation.Notification,title:h.collectingLogsProgressTitle,cancellable:!1},async t=>{t.report({message:h.gatheringLogsMessage});const r=await b(e,{additionalFiles:S.length>0?S:void 0,activityLogs:w});t.report({message:h.savingArchiveMessage}),await a.workspace.fs.writeFile(T,r)})}catch(e){return void a.window.showErrorMessage((0,h.failedToSaveArchive)(e instanceof Error?e.message:String(e)))}await async function(e,t){const r=(0,d.generateReadmeContent)(e,t),n=await a.workspace.openTextDocument({content:r,language:"markdown"});await a.commands.executeCommand("markdown.showPreview",n.uri)}(_,T.fsPath),await async function(e){await a.window.showInformationMessage(h.logsSavedMessage,h.openFolder)===h.openFolder&&await a.commands.executeCommand("revealFileInOS",e)}(T)}}async function C(e){const t=E();if(!t?.captureActivityLogs)return;let r;try{r=await t.captureActivityLogs()}catch{return}if(r){if(e)await e;else{let e=()=>{};const t=new Promise(t=>{e=t});await a.window.withProgress({location:a.ProgressLocation.Notification,title:h.recordingActivityLogsTitle,cancellable:!0},async(r,n)=>{n.onCancellationRequested(()=>e()),await t})}try{return r.getActivityLogs()}finally{r.dispose()}}}function I(e,t,r){return new Promise(o=>{const i=`${e} ${t.join(" ")}`;r.info((0,h.runningToolMessage)(e,t.join(" "))),n.exec(i,{windowsHide:!0},(t,n,i)=>{n.trim()&&r.info(`[${e}] ${n.trim()}`),i.trim()&&r.warn(`[${e}] ${i.trim()}`),t?r.error((0,h.toolErrorMessage)(e,t.message)):r.info((0,h.toolCompletedMessage)(e)),o()})})}async function O(e,t,r,n=""){const c=u.logger.getChannel(),l=(0,m.formatTimestamp)(new Date),d=s.join(i.tmpdir(),`csdevkit-dump-${l}`);await(0,m.ensureDirectoryExists)(d);const p=[];return await a.window.withProgress({location:a.ProgressLocation.Notification,title:h.collectingDumpsProgressTitle,cancellable:!1},async i=>{for(const a of e){const e=a.name.replace(/[^a-zA-Z0-9._-]/g,"_");if(t){i.report({message:`${h.collectingMemoryDumpMessage} (${a.name})`});const t=s.join(d,`${n}${e}-${a.pid}.dmp`);await I("dotnet-dump",["collect","--process-id",String(a.pid),"--output",t],c);try{await o.promises.access(t),p.push(t)}catch{}}if(r){i.report({message:`${h.collectingGcDumpMessage} (${a.name})`});const t=s.join(d,`${n}${e}-${a.pid}.gcdump`);await I("dotnet-gcdump",["collect","--process-id",String(a.pid),"--output",t],c);try{await o.promises.access(t),p.push(t)}catch{}}}}),p}t.crc32=w,t.collectLogsCore=b,t.collectLogs=async function(e,t){return T(e,t)}},236(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.recordLiveTrace=void 0;const n=r(857),o=r(6928),i=r(1398),s=r(680),a=r(1298),c=r(778),l=r(3853),u=r(1750),d=r(778);function p(e,t){return e.shellIntegration?Promise.resolve(e.shellIntegration):new Promise(r=>{const n=setTimeout(()=>{o.dispose(),r(void 0)},t),o=i.window.onDidChangeTerminalShellIntegration(t=>{t.terminal===e&&(clearTimeout(n),o.dispose(),r(t.shellIntegration))})})}t.recordLiveTrace=async function(e,t){const r=s.logger.getChannel();let h;if(t?.processes)h=t.processes;else{if(!await(0,d.ensureAllToolsAvailable)([{toolName:"dotnet-trace",checkFn:c.ensureDotnetTraceAvailable}]))return[];const t=await(0,u.selectProcesses)(e);if(!t)return[];h=t}const f=(0,a.formatTimestamp)(new Date),g=o.join(n.tmpdir(),`csdevkit-trace-${f}`);await(0,a.ensureDirectoryExists)(g);const m=[];for(const e of h){const t=o.join(g,(0,a.buildTraceFileName)(e,f)),n=(0,a.buildDotnetTraceCommand)({pid:e.pid,outputPath:t});r.info(`Starting dotnet-trace for ${e.name} (PID ${e.pid}): ${n}`);const s=i.window.createTerminal({name:`dotnet-trace (${e.name})`});s.show(!0);const c=await p(s,3e3);let l;r.info(`Shell integration for ${e.name}: ${c?"available":"unavailable (using sendText fallback)"}`);const u=[];if(c){const e=c.executeCommand(n);l=new Promise(t=>{const r=()=>u.forEach(e=>e.dispose());u.push(i.window.onDidEndTerminalShellExecution(n=>{n.execution===e&&(r(),t(n.exitCode))})),u.push(i.window.onDidCloseTerminal(e=>{e===s&&(r(),t(e.exitStatus?.code))}))})}else s.sendText(n),l=new Promise(e=>{const t=i.window.onDidCloseTerminal(r=>{r===s&&(t.dispose(),e(r.exitStatus?.code))});u.push(t)});m.push({info:e,outputPath:t,terminal:s,exited:l,disposables:u})}if(0===m.length)return[];r.info(`Trace output directory: ${g}`);const v=Promise.all(m.map(e=>e.exited)).then(()=>{});if(t?.stopSignal)await Promise.race([t.stopSignal,v]);else{let e;const t=new Promise(t=>{e=t});await i.window.withProgress({location:i.ProgressLocation.Notification,title:(0,l.recordingProgressTitle)(m.length),cancellable:!0},async(r,n)=>{n.onCancellationRequested(()=>e()),await Promise.race([t,v])})}let y=[];return await i.window.withProgress({location:i.ProgressLocation.Notification,title:l.stoppingTraceTitle,cancellable:!1},async()=>{for(const e of m)try{e.terminal.sendText("",!1)}catch{}r.info("Waiting for trace files to finalize...");const e=await Promise.race([Promise.all(m.map(e=>e.exited)),new Promise(e=>setTimeout(()=>e("timeout"),5e3))]);if("timeout"===e)r.warn("Timed out waiting for dotnet-trace to exit; trace files may be incomplete");else for(let t=0;t<m.length;t++){const n=e[t];void 0!==n&&0!==n&&r.warn(`dotnet-trace for ${m[t].info.name} exited with code ${n}`)}for(const e of m)for(const t of e.disposables)t.dispose();for(const e of m)try{e.terminal.dispose()}catch{}await new Promise(e=>setTimeout(e,1e3));for(const e of m)try{const t=await i.workspace.fs.stat(i.Uri.file(e.outputPath));t.size>0&&(y.push(e.outputPath),r.info(`Trace file created: ${e.outputPath} (${t.size} bytes)`))}catch{r.warn(`Trace file not found or empty: ${e.outputPath}`)}}),0===y.length?(i.window.showWarningMessage(l.noTraceFilesProduced),[]):y}},6274(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateReadmeContent=t.gatherCurrentSettings=t.normalizeFilePaths=t.redactSettings=void 0;const n=r(857),o=r(1398),i=[/password/i,/secret/i,/token/i,/(^|\.)key$/i,/credential/i,/auth/i,/connectionString/i,/apiKey/i,/passphrase/i,/certificate/i,/proxy/i];function s(e){const t=e.includes(".")?e.slice(e.lastIndexOf(".")+1):e;return i.some(r=>r.test(e)||r.test(t))}function a(e){const t={};for(const[r,n]of Object.entries(e))s(r)?t[r]="<REDACTED>":null!==n&&"object"==typeof n?Array.isArray(n)?t[r]=n.map(e=>"object"==typeof e&&null!==e?a(e):e):t[r]=a(n):t[r]=n;return t}t.redactSettings=a;const c=r(6928);let l;function u(e){l||(l=function(){const e=n.homedir();if(!e)return[];const t=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),r=t.replace(/\\\\/g,"/"),o=t.replace(/\//g,"\\\\"),i=[];let s;r!==o?i.push({pattern:new RegExp(o,"g"),replacement:"~"},{pattern:new RegExp(r,"g"),replacement:"~"}):i.push({pattern:new RegExp(t,"g"),replacement:"~"});try{s=n.userInfo().username}catch{}if(s&&s.length>2){const e=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");i.push({pattern:new RegExp(`(?<=[/\\\\](?:Users|home|users))[/\\\\]${e}(?=[/\\\\]|$)`,"gi"),replacement:`${c.sep}<user>`})}return i}());let t=e;for(const{pattern:e,replacement:r}of l)t=t.replace(e,r);return t}t.normalizeFilePaths=u,t.gatherCurrentSettings=function(...e){const t={};for(const r of e){const e=o.workspace.getConfiguration(r),n={};try{const t=JSON.parse(JSON.stringify(e));if(t&&"object"==typeof t)for(const[e,r]of Object.entries(t))"function"!=typeof r&&(n[e]=r)}catch{}t[r]=n}const r=a(t);return u(JSON.stringify(r,null,2))};const d=r(3853);t.generateReadmeContent=function(e,t){const r=[];return r.push(`# ${d.readmeTitle}`),r.push(""),r.push(d.readmeIntro),r.push(""),r.push((0,d.readmeArchiveLocation)(t)),r.push(""),r.push(`## ${d.readmeContentsHeading}`),r.push(""),r.push(`### ${d.readmeExistingLogsHeading}`),r.push(""),r.push(d.readmeExistingLogsDescription),r.push(""),r.push(`| ${d.readmeFileColumnHeader} | ${d.readmeDescriptionColumnHeader} |`),r.push("| --- | --- |"),r.push(`| \`environment.txt\` | ${d.readmeEnvironmentTxtDescription} |`),r.push(`| \`settings.json\` | ${d.readmeSettingsJsonDescription} |`),r.push(`| \`csdevkit/*.log\`, \`csdevkit/*.svclog\` | ${d.readmeCsdevkitLogsDescription} |`),r.push(`| \`csdevkit/servicehub/*.log\` | ${d.readmeServicehubLogsDescription} |`),r.push(`| \`dotnet-runtime/*.txt\`, \`dotnet-runtime/*.tmp\` | ${d.readmeDotnetRuntimeLogsDescription} |`),r.push(`| \`csharp/*.log\` | ${d.readmeCsharpLogsDescription} |`),r.push(""),e.activityLogs&&(r.push(`### ${d.readmeRecordActivityHeading}`),r.push(""),r.push(d.readmeRecordActivityDescription),r.push(d.readmeRecordActivityScope),r.push(""),r.push(`| ${d.readmeFileColumnHeader} | ${d.readmeDescriptionColumnHeader} |`),r.push("| --- | --- |"),r.push(`| \`csharp.activity.log\` | ${d.readmeCsharpActivityLogDescription} |`),r.push(`| \`csharp-lsp-trace.activity.log\` | ${d.readmeLspTraceActivityLogDescription} |`),r.push(`| \`razor.activity.log\` | ${d.readmeRazorActivityLogDescription} |`),r.push("")),e.performanceTrace&&(r.push(`### ${d.readmePerformanceTraceHeading}`),r.push(""),r.push(d.readmePerformanceTraceDescription),r.push(d.readmePerformanceTraceDescription2),r.push(""),r.push(d.readmePerformanceTraceViewer),r.push("")),e.memoryDump&&(r.push(`### ${d.readmeMemoryDumpHeading}`),r.push(""),r.push(d.readmeMemoryDumpDescription),r.push(""),(e.activityLogs||e.performanceTrace)&&(r.push(d.readmeMemoryDumpBeforeAfter),r.push("")),r.push(`> **${d.readmeWarningLabel}**: ${d.readmeMemoryDumpWarning}`),r.push("")),e.gcDump&&(r.push(`### ${d.readmeGcDumpHeading}`),r.push(""),r.push(d.readmeGcDumpDescription),r.push(""),(e.activityLogs||e.performanceTrace)&&(r.push(d.readmeGcDumpBeforeAfter),r.push(""))),r.push(`## ${d.readmeSharingHeading}`),r.push(""),r.push(`> **${d.readmeWarningLabel}**: ${d.readmeSharingWarning}`),r.push(""),r.push(d.readmeSharingPublicly),r.push(""),r.push(d.readmeSharingPrivately),r.push(""),r.push(d.readmePrivacyStatement),r.push(""),r.join("\n")}},1750(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.revalidateProcesses=t.selectProcesses=void 0;const n=r(1398),o=r(9768),i=r(680),s=r(1298),a=r(3853);t.selectProcesses=async function(e){const t=i.logger.getChannel();await Promise.all(["server","pshost"].map(r=>(0,s.refreshProcessInformation)(e,t,r)));const{active:r}=s.processTracker.validate(),c=function(){const e=n.extensions.getExtension(o.CSHARP_EXTENSION_ID);if(!e?.isActive)return;const t=e.exports;if("function"!=typeof t?.languageServerProcessId)return;const r=t.languageServerProcessId();return"number"==typeof r&&r>0?r:void 0}(),l=[];for(const e of r)"number"==typeof e.pid&&e.pid>0&&l.push({label:e.name,description:`PID ${e.pid}`,detail:e.description,picked:!0,process:e});if(c){const e={processType:"roslyn",name:a.roslynLanguageServerName,description:a.roslynLanguageServerDescription,pid:c,lastSeen:new Date};l.push({label:a.roslynLanguageServerName,description:`PID ${c}`,detail:a.roslynLanguageServerDescription,picked:!0,process:e})}if(0===l.length)return void n.window.showWarningMessage(a.noProcessesFoundMessage);const u=await n.window.showQuickPick(l,{title:a.selectDiagnosticProcessesTitle,placeHolder:a.selectDiagnosticProcessesPlaceholder,canPickMany:!0,matchOnDetail:!0});return u&&0!==u.length?u.map(e=>e.process):void 0},t.revalidateProcesses=function(e){const t=e.filter(e=>s.processTracker.isAlive(e.pid));if(0!==t.length)return t;n.window.showWarningMessage(a.selectedProcessesNoLongerRunning)}},3853(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.selectDiagnosticProcessesPlaceholder=t.selectDiagnosticProcessesTitle=t.batchToolInstallModalMessage=t.installTools=t.installToolButtonLabel=t.batchToolsRequiredNotInstalledMessage=t.toolRequiredNotInstalledMessage=t.learnMore=t.showOutput=t.installingToolProgressTitle=t.installAndContinue=t.installToolTitle=t.noDumpFilesProduced=t.collectingGcDumpMessage=t.collectingMemoryDumpMessage=t.collectingDumpsProgressTitle=t.gcDumpDetail=t.gcDumpDescription=t.gcDumpLabel=t.memoryDumpDetail=t.memoryDumpDescription=t.memoryDumpLabel=t.roslynLanguageServerDescription=t.roslynLanguageServerName=t.recordingDiagnosticsTitle=t.recordingActivityLogsTitle=t.noTraceFilesProduced=t.stoppingTraceTitle=t.recordingProgressTitle=t.selectedProcessesNoLongerRunning=t.noProcessesFoundMessage=t.failedToSaveArchive=t.savingArchiveMessage=t.gatheringLogsMessage=t.collectingLogsProgressTitle=t.openFolder=t.logsSavedMessage=t.saveLogsTitle=t.saveLogsLabel=t.collectLogsPlaceholder=t.collectLogsTitle=t.recordActivityLogsDetail=t.recordActivityLogsDescription=t.recordActivityLogsLabel=t.recordNewTraceDetail=t.recordNewTraceDescription=t.recordNewTraceLabel=t.collectExistingLogsDetail=t.collectExistingLogsDescription=t.collectExistingLogsLabel=void 0,t.readmeSharingWarning=t.readmeSharingHeading=t.readmeWarningLabel=t.readmeGcDumpBeforeAfter=t.readmeGcDumpDescription=t.readmeGcDumpHeading=t.readmeMemoryDumpWarning=t.readmeMemoryDumpBeforeAfter=t.readmeMemoryDumpDescription=t.readmeMemoryDumpHeading=t.readmePerformanceTraceViewer=t.readmePerformanceTraceDescription2=t.readmePerformanceTraceDescription=t.readmePerformanceTraceHeading=t.readmeRazorActivityLogDescription=t.readmeLspTraceActivityLogDescription=t.readmeCsharpActivityLogDescription=t.readmeRecordActivityScope=t.readmeRecordActivityDescription=t.readmeRecordActivityHeading=t.readmeCsharpLogsDescription=t.readmeDotnetRuntimeLogsDescription=t.readmeServicehubLogsDescription=t.readmeCsdevkitLogsDescription=t.readmeSettingsJsonDescription=t.readmeEnvironmentTxtDescription=t.readmeDescriptionColumnHeader=t.readmeFileColumnHeader=t.readmeExistingLogsDescription=t.readmeExistingLogsHeading=t.readmeContentsHeading=t.readmeArchiveLocation=t.readmeIntro=t.readmeTitle=t.chooseTraceFolderTitle=t.selectTraceFolderLabel=t.toolExitedMessage=t.toolCompletedMessage=t.toolErrorMessage=t.runningToolMessage=t.failedToInstallToolErrorMessage=t.toolInstallFailedWithCodeMessage=t.toolAlreadyInstalledMessage=t.toolInstalledSuccessfullyMessage=t.installingToolViaMessage=t.toolExitedWithCodeMessage=t.toolVerificationSucceededMessage=t.toolVerificationFailedMessage=t.toolNotOnPathMessage=t.failedToInstallToolMessage=void 0,t.readmePrivacyStatement=t.readmeSharingPrivately=t.readmeSharingPublicly=void 0;const n=r(1398),o=r(2477);o.config({bundleFormat:o.BundleFormat.standalone,locale:n.env.language,messageFormat:o.MessageFormat.both});const i=o.loadMessageBundle(r(6928).join(__dirname,"logging\\strings.ts"));t.collectExistingLogsLabel=i(0,null),t.collectExistingLogsDescription=i(1,null),t.collectExistingLogsDetail=i(2,null),t.recordNewTraceLabel=i(3,null),t.recordNewTraceDescription=i(4,null),t.recordNewTraceDetail=i(5,null),t.recordActivityLogsLabel=i(6,null),t.recordActivityLogsDescription=i(7,null),t.recordActivityLogsDetail=i(8,null),t.collectLogsTitle=i(9,null),t.collectLogsPlaceholder=i(10,null),t.saveLogsLabel=i(11,null),t.saveLogsTitle=i(12,null),t.logsSavedMessage=i(13,null),t.openFolder=i(14,null),t.collectingLogsProgressTitle=i(15,null),t.gatheringLogsMessage=i(16,null),t.savingArchiveMessage=i(17,null),t.failedToSaveArchive=e=>i(18,null,e),t.noProcessesFoundMessage=i(19,null),t.selectedProcessesNoLongerRunning=i(20,null),t.recordingProgressTitle=e=>i(1===e?21:22,null,e),t.stoppingTraceTitle=i(23,null),t.noTraceFilesProduced=i(24,null),t.recordingActivityLogsTitle=i(25,null),t.recordingDiagnosticsTitle=i(26,null),t.roslynLanguageServerName=i(27,null),t.roslynLanguageServerDescription=i(28,null),t.memoryDumpLabel=i(29,null),t.memoryDumpDescription=i(30,null),t.memoryDumpDetail=i(31,null),t.gcDumpLabel=i(32,null),t.gcDumpDescription=i(33,null),t.gcDumpDetail=i(34,null),t.collectingDumpsProgressTitle=i(35,null),t.collectingMemoryDumpMessage=i(36,null),t.collectingGcDumpMessage=i(37,null),t.noDumpFilesProduced=i(38,null),t.installToolTitle=i(39,null),t.installAndContinue=i(40,null),t.installingToolProgressTitle=i(41,null),t.showOutput=i(42,null),t.learnMore=i(43,null),t.toolRequiredNotInstalledMessage=function(e){return i(44,null,e)},t.batchToolsRequiredNotInstalledMessage=function(e){return i(45,null,e.join(", "))},t.installToolButtonLabel=function(e){return i(46,null,e)},t.installTools=i(47,null),t.batchToolInstallModalMessage=function(e){return i(48,null,e.join(", "),t.installAndContinue)},t.selectDiagnosticProcessesTitle=i(49,null),t.selectDiagnosticProcessesPlaceholder=i(50,null),t.failedToInstallToolMessage=function(e){return i(51,null,e)},t.toolNotOnPathMessage=function(e){return i(52,null,e)},t.toolVerificationFailedMessage=function(e,t){return i(53,null,e,t)},t.toolVerificationSucceededMessage=function(e){return i(54,null,e)},t.toolExitedWithCodeMessage=function(e,t){return i(55,null,e,t)},t.installingToolViaMessage=function(e,t){return i(56,null,t,e)},t.toolInstalledSuccessfullyMessage=function(e){return i(57,null,e)},t.toolAlreadyInstalledMessage=function(e){return i(58,null,e)},t.toolInstallFailedWithCodeMessage=function(e,t){return i(59,null,e,t)},t.failedToInstallToolErrorMessage=function(e,t){return i(60,null,e,t)},t.runningToolMessage=function(e,t){return i(61,null,e,t)},t.toolErrorMessage=function(e,t){return i(62,null,e,t)},t.toolCompletedMessage=function(e){return i(63,null,e)},t.toolExitedMessage=function(e,t){return i(64,null,e,t)},t.selectTraceFolderLabel=i(65,null),t.chooseTraceFolderTitle=i(66,null),t.readmeTitle=i(67,null),t.readmeIntro=i(68,null),t.readmeArchiveLocation=e=>i(69,null,e),t.readmeContentsHeading=i(70,null),t.readmeExistingLogsHeading=i(71,null),t.readmeExistingLogsDescription=i(72,null),t.readmeFileColumnHeader=i(73,null),t.readmeDescriptionColumnHeader=i(74,null),t.readmeEnvironmentTxtDescription=i(75,null),t.readmeSettingsJsonDescription=i(76,null),t.readmeCsdevkitLogsDescription=i(77,null),t.readmeServicehubLogsDescription=i(78,null),t.readmeDotnetRuntimeLogsDescription=i(79,null),t.readmeCsharpLogsDescription=i(80,null),t.readmeRecordActivityHeading=i(81,null),t.readmeRecordActivityDescription=i(82,null),t.readmeRecordActivityScope=i(83,null),t.readmeCsharpActivityLogDescription=i(84,null),t.readmeLspTraceActivityLogDescription=i(85,null),t.readmeRazorActivityLogDescription=i(86,null),t.readmePerformanceTraceHeading=i(87,null),t.readmePerformanceTraceDescription=i(88,null),t.readmePerformanceTraceDescription2=i(89,null),t.readmePerformanceTraceViewer=i(90,null),t.readmeMemoryDumpHeading=i(91,null),t.readmeMemoryDumpDescription=i(92,null),t.readmeMemoryDumpBeforeAfter=i(93,null),t.readmeMemoryDumpWarning=i(94,null),t.readmeGcDumpHeading=i(95,null),t.readmeGcDumpDescription=i(96,null),t.readmeGcDumpBeforeAfter=i(97,null),t.readmeWarningLabel=i(98,null),t.readmeSharingHeading=i(99,null),t.readmeSharingWarning=i(100,null),t.readmeSharingPublicly=i(101,null),t.readmeSharingPrivately=i(102,null),t.readmePrivacyStatement=i(103,null)},778(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ensureAllToolsAvailable=t.ensureDotnetGcDumpAvailable=t.ensureDotnetDumpAvailable=t.ensureDotnetTraceAvailable=void 0;const n=r(5317),o=r(1398),i=r(680),s=r(3853);function a(e,t){return new Promise(r=>{n.exec(`${e} --version`,{windowsHide:!0},(n,o,i)=>{if(n){const o=n?.code;"ENOENT"===o?t.warn((0,s.toolNotOnPathMessage)(e)):t.warn((0,s.toolExitedWithCodeMessage)(e,n.code??-1)),r(!1)}else t.trace((0,s.toolVerificationSucceededMessage)(e)),r(!0)})})}function c(e,t){return new Promise(r=>{const o=i.dotnetSdkPath??"dotnet",a=`"${o}" tool install -g ${e}`;t.info((0,s.installingToolViaMessage)(o,e)),n.exec(a,{windowsHide:!0},(n,o,i)=>{o.trim()&&t.info(`[install] ${o.trim()}`),i.trim()&&t.warn(`[install] ${i.trim()}`),n?(t.error((0,s.toolInstallFailedWithCodeMessage)(e,n.code??-1)),r(!1)):(t.info((0,s.toolInstalledSuccessfullyMessage)(e)),r(!0))})})}t.ensureDotnetTraceAvailable=async function(e){return a("dotnet-trace",e)},t.ensureDotnetDumpAvailable=async function(e){return a("dotnet-dump",e)},t.ensureDotnetGcDumpAvailable=async function(e){return a("dotnet-gcdump",e)},t.ensureAllToolsAvailable=async function(e){if(0===e.length)return!0;const t=i.logger.getChannel(),r=(await Promise.all(e.map(async e=>({toolName:e.toolName,available:await e.checkFn(t)})))).filter(e=>!e.available).map(e=>e.toolName);if(0===r.length)return!0;const n=1===r.length?(0,s.toolRequiredNotInstalledMessage)(r[0]):(0,s.batchToolsRequiredNotInstalledMessage)(r),a=1===r.length?(0,s.installToolButtonLabel)(r[0]):s.installTools,l=await o.window.showErrorMessage(n,a,s.learnMore);if(l===s.learnMore){const e=1===r.length?`https://learn.microsoft.com/dotnet/core/diagnostics/${r[0]}`:"https://learn.microsoft.com/dotnet/core/diagnostics/";return o.env.openExternal(o.Uri.parse(e)),!1}if(l!==a)return!1;let u=!0;return o.window.showInformationMessage(s.installingToolProgressTitle,s.showOutput).then(e=>{e===s.showOutput&&t.show(!0)}),await o.window.withProgress({location:o.ProgressLocation.Notification,title:s.installingToolProgressTitle,cancellable:!1},async e=>{for(const n of r)e.report({message:n}),await c(n,t)||(o.window.showErrorMessage((0,s.failedToInstallToolMessage)(n)),u=!1)}),u}},2924(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getNodeAddon=void 0;const n=r(6928),o="undefined"!=typeof require?require:r(4006);let i;t.getNodeAddon=function(){if(void 0!==i)return i;if("win32"===process.platform){try{const e="arm64"===process.arch?"win32-arm64":"win32-x64",t=n.resolve(__dirname,"..","..","..","dist","native",e,"NodeAddon.node"),s=n.join(__dirname,"native",e,"NodeAddon.node"),a=r(9896).existsSync(s)?s:t;i=o(a)}catch(e){console.error("[C# Dev Kit] Failed to load native addon:",e),i=void 0}return i}}},1760(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dotnetCommand=t.findAspNetRuntime=t.acquireLocalDotNetVersion=t.acquireRuntime=t.dotnetRuntimeResolved=void 0;const n=r(5317),o=r(9896),i=r(6928),s=r(1398),a=r(9768),c=r(5033),l=r(1858),u=r(680),d=r(8184),p=r(9409),h=r(5059);var f;async function g(e){let t={version:a.NET_RUNTIME_VERSION,requestingExtensionId:a.EXTENSION_ID,mode:"aspnetcore"},r="true"===process.env.AUTOMATED_TESTING?void 0:await s.commands.executeCommand("dotnet.acquireStatus",t);return void 0===r&&(await s.commands.executeCommand("dotnet.showAcquisitionLog"),r=await s.commands.executeCommand("dotnet.acquire",t)),r?.dotnetPath?(await async function(e){const t=[e];await s.commands.executeCommand("dotnet.ensureDotnetDependencies",{command:e,arguments:t})}(r.dotnetPath),r.dotnetPath):null}!function(e){e[e.DisplayAllErrorPopups=0]="DisplayAllErrorPopups",e[e.DisableErrorPopups=1]="DisableErrorPopups"}(f||(f={})),t.acquireRuntime=async function(e,r){if(t.dotnetRuntimeResolved)return t.dotnetRuntimeResolved;if(void 0===t.dotnetRuntimeResolved){const p=s.workspace.getConfiguration("dotnet").get("toolingRuntimePath");if(p)if(0!==p.length&&i.isAbsolute(p)&&(0,o.existsSync)(p)){if("Use Override"===await s.window.showWarningMessage(`C# Dev Kit: Tooling runtime path is overridden to: ${p}. This bypasses all runtime acquisition. Continue with this override?`,{modal:!0},"Use Override"))return u.logger.log(`Using toolingRuntimePath override: "${p}". User accepted.`),t.dotnetRuntimeResolved={path:p,isAcquired:!1,globalPath:p,dotnetInfo:null,dotnetFailureMessage:void 0},t.dotnetRuntimeResolved;u.logger.log("User declined toolingRuntimePath override. Falling back to automatic discovery.")}else u.logger.log(`Warning: "dotnet.toolingRuntimePath" is set to "${p}" but the path is empty, not absolute, or does not exist. Falling back to automatic discovery.`);if(e){const e=await(0,d.getDotnetInfoLegacy)(u.logger);let n;if(!e){const e=await(0,d.findInstalledDotnetFromPathLegacy)(null,u.logger);n=e?h.errorStrings.corruptedDotnetInstallation(e):h.errorStrings.cannotFindDotnetInstallation,u.logger.log(n,c.LogImportance.high),u.logger.show(),s.window.showErrorMessage(n);const t=process.env.PATH;t?u.logger.log(`PATH=${t}`,c.LogImportance.high):u.logger.log("PATH environment variable cannot be found.",c.LogImportance.high)}const o=await(0,d.findMatchedDotnetFromPathLegacy)(r,u.logger,e);let i="string"==typeof o?o:null,a=!1;if(i?u.logger.log(`Using preinstalled .NET runtime at "${i}" to load C# Dev Kit processes`):(i=await g())&&(u.logger.log(`Using local .NET runtime at "${i}"`),a=!0),i){const r=e?await(0,d.findInstalledDotnetFromPathLegacy)(e,u.logger):null;t.dotnetRuntimeResolved=a?{path:i,isAcquired:a,globalRuntimeMismatchingReason:o,globalPath:r,dotnetInfo:e,dotnetFailureMessage:n}:{path:i,isAcquired:a,globalPath:r,dotnetInfo:e,dotnetFailureMessage:n}}else t.dotnetRuntimeResolved=null}else{const e=await(0,d.getArchitectureFromTargetPlatform)(r,u.logger);var n=null,l=null;if("true"===process.env.CSDEVKIT_FORCE_OWN_RUNTIME||"darwin"===process.platform&&s.workspace?.getConfiguration("dotnet")?.get("workingWithTestSignedSdk"))"true"===process.env.CSDEVKIT_FORCE_OWN_RUNTIME?u.logger.log('Finding existing .NET runtime is disabled because environment variable "CSDEVKIT_FORCE_OWN_RUNTIME" is set to true.'):u.logger.log('Finding existing .NET runtime is disabled because the setting "dotnet.workingWithTestSignedSdk" is enabled.');else{const t={acquireContext:{version:`${a.NET_RUNTIME_VERSION}.${a.NET_RUNTIME_VERSION_PATCH}`,requestingExtensionId:a.EXTENSION_ID,architecture:e,mode:"runtime"},versionSpecRequirement:"latestFeature",rejectPreviews:!0},r=await s.commands.executeCommand("dotnet.findPath",t);r&&r.dotnetPath?u.logger.log(`.NET Runtime found at: "${r.dotnetPath}".`,c.LogImportance.low):u.logger.log("No suitable .NET runtime was found.",c.LogImportance.low);const o=r?.dotnetPath;n="string"==typeof o?o:null;const i={acquireContext:{version:`${a.NET_RUNTIME_VERSION}.${a.NET_RUNTIME_VERSION_PATCH}`,requestingExtensionId:a.EXTENSION_ID,architecture:e,mode:"aspnetcore"},versionSpecRequirement:"latestFeature",rejectPreviews:!0},d=await s.commands.executeCommand("dotnet.findPath",i);d&&d.dotnetPath?u.logger.log(`ASP.NET Runtime found at: "${d.dotnetPath}".`,c.LogImportance.low):u.logger.log("No suitable ASP.NET runtime was found.",c.LogImportance.low);const p=d?.dotnetPath;l="string"==typeof p?p:null}let o=!1;if(n&&l&&n===l?u.logger.log(`Using existing .NET runtime at "${n}" to load C# Dev Kit processes`):(n=await g())&&(u.logger.log(`Using acquired .NET runtime at "${n}"`),o=!0),n){const r={acquireContext:{version:a.NET_SDK_MINIMUM_SUPPORTED_VERSION,requestingExtensionId:a.EXTENSION_ID,installType:"global",architecture:e,mode:"sdk"},versionSpecRequirement:"greater_than_or_equal"},i=await s.commands.executeCommand("dotnet.findPath",r);i&&i.dotnetPath?u.logger.log(`.NET SDK found: "${i.dotnetPath}"`):(await(u.dotnetVersionManager?.checkOutOfSupportedSdkInstallationAndShowWarningMessage(u.logger)),u.logger.log("Could not find installed SDK"));const c=i?.dotnetPath;t.dotnetRuntimeResolved={path:n,isAcquired:o,globalPath:c,dotnetInfo:null,dotnetFailureMessage:void 0}}else t.dotnetRuntimeResolved=null}}if(null===t.dotnetRuntimeResolved)throw new Error("Could not resolve the dotnet path!");return t.dotnetRuntimeResolved},t.acquireLocalDotNetVersion=async function(e){const t=["runtime","aspnetcore"];let r=null;for(const n of t){const t={version:e,requestingExtensionId:a.EXTENSION_ID,mode:n};let o="true"===process.env.AUTOMATED_TESTING?void 0:await s.commands.executeCommand("dotnet.acquireStatus",t);if(void 0===o){await s.commands.executeCommand("dotnet.showAcquisitionLog");try{o=await s.commands.executeCommand("dotnet.acquire",t)}catch(t){s.window.showWarningMessage(`Failed to install .NET ${"aspnetcore"===n?"ASP.NET Core":""} Runtime ${e}. Please view the 'Output' -> '.NET Install Tool' window for more info.`);continue}}o?.dotnetPath&&(r=o)}return r&&s.window.showInformationMessage(`Installation of the .NET ${e} runtimes succeeded.`),r},t.findAspNetRuntime=async function(e,t,r){if(!e)return r.log("Skipping ASP.NET runtime lookup because no dotnet root was provided.",c.LogImportance.low),!1;const n=await(0,d.getArchitectureFromTargetPlatform)(void 0,r),o={acquireContext:{version:`${t.major}.${t.minor}.0`,requestingExtensionId:a.EXTENSION_ID,architecture:n,mode:"aspnetcore"},versionSpecRequirement:"latestMajor",rejectPreviews:!1};r.log(`Searching for ASP.NET runtime matching ${t.toString()} for dotnet root "${e}" (architecture: ${n}).`,c.LogImportance.low);const l=await s.commands.executeCommand("dotnet.findPath",o),u=l?.dotnetPath;if(!u)return r.log(`No ASP.NET runtime was found for dotnet root "${e}".`,c.LogImportance.low),!1;const p=i.dirname(u),h=e=>i.normalize(e),f=h(e),g=h(p);return("win32"===process.platform?f.toLowerCase()===g.toLowerCase():f===g)?(r.log(`ASP.NET runtime found at "${u}".`,c.LogImportance.low),!0):(r.log(`ASP.NET runtime located at "${u}", but it does not match expected dotnet root "${e}".`,c.LogImportance.low),!1)},t.dotnetCommand=async function(e,t,r,o,i,a){try{const e=u.dotnetSdkPath??("win32"===process.platform?"dotnet.exe":"dotnet"),c=i?u.logger:o??u.logger;await c.watch(`command: "${e}" ${r.join(" ")}`,async()=>{const i={windowsHide:!0,cwd:t,env:{DOTNET_CLI_UI_LANGUAGE:s.env.language,...process.env}},c=n.execFile(e,r,i,null);a&&c.pid&&a(c.pid),await(0,p.waitForProcess)(c,o)})}catch(t){throw t instanceof l.ExitCodeError?new l.DotnetCommandError(e,t.errorCode,t.message):t instanceof Error?new l.DotnetCommandError(e,0,t.message):new l.DotnetCommandError(e,0,t?.toString()??"")}}},8184(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getArchitectureFromTargetPlatform=t.execChildProcess=t.getDotnetInfoLegacy=t.findInstalledDotnetFromPathLegacy=t.findMatchedDotnetFromPathLegacy=t.CompatibleDotnetSearchFailedReason=void 0;const n=r(1398),o=r(5317),i=r(9589),s=r(9768),a=r(9409),c=r(5033),l=r(1943),u=r(6928),d=r(4989),p=r(9896);var h;async function f(e,t,r){const n=await(0,l.realpath)(e),o="win32"===process.platform?"dotnet.exe":"dotnet";if(n.toLowerCase().endsWith(o)){const e=u.dirname(n),t=u.join(e,"host");if((0,p.existsSync)(t))return r.log(`Found installed dotnet location "${n}" to load projects.`,c.LogImportance.high),n}t||(t=await m(r));const i=t?.runtimeVersions["Microsoft.NETCore.App"];if(i)for(const e of i){const t=u.dirname(u.dirname(e.path));if(t){const e=u.join(t,o);if(await(0,a.exists)(e))return r.log(`Found installed dotnet location "${e}" by using dotnet runtime location.`,c.LogImportance.high),e}}return r.log(`Found installed dotnet location "${n}" as final fallback after fail to find runtime. This is unexpected and the extension might not work.`,c.LogImportance.high),n}async function g(e,t){const r=(0,a.isWindows)()?"where.exe":"which";try{const n=await v(r,["dotnet"]);if(!n)return t.log(`Unable to find dotnet from ${r}.`,c.LogImportance.high),null;const o=n.trim().replace(/\r/gm,"").split("\n")[0];return await(0,a.exists)(o)?(t.log(`dotnet found at ${o}`,c.LogImportance.low),await f(o,e,t)):(t.log(`dotnet path does not exist: "${o}"`,c.LogImportance.high),null)}catch(n){t.log(`Failed to find dotnet from path with "${r} dotnet".\n${n}`,c.LogImportance.high);const o=process.env.PATH?.split(u.delimiter);if(o){const r="win32"===process.platform?"dotnet.exe":"dotnet";for(let n=0;n<o.length;n++){const i=u.resolve(o[n],r);if(await(0,a.exists)(i))return t.log(`dotnet found at ${i} from PATH`,c.LogImportance.low),await f(i,e,t)}}}return null}async function m(e){try{let t;const r=n.workspace?.workspaceFolders;r&&r.length>0&&(t=r[0].uri.fsPath);const o=await v("dotnet",["--info"],t,{...process.env,DOTNET_CLI_UI_LANGUAGE:"en-US"});let s,a;e.log(`dotnet --info\n${o}`,c.LogImportance.low);let l=o.replace(/\r/gm,"").split("\n");for(const e of l){let t;(t=/^\s*Version:\s*([^\s].*)$/.exec(e))?s=i.parse(t[1]):(t=/^\s*Architecture:\s*(.*)/.exec(e))&&(a=t[1])}const u={},d=await v("dotnet",["--list-runtimes"]);e.log(`dotnet --list-runtimes\n${d}`,c.LogImportance.low),l=d.split(/\r?\n/);for(const e of l){let t;if(t=/^([\w\.]+) ([^ ]+) \[([^\]]+)\]$/.exec(e)){const e=t[1],r=t[2],n=t[3];e in u?u[e].push({version:i.parse(r),path:n}):u[e]=[{version:i.parse(r),path:n}]}}if(s){const t={version:s,architecture:a,runtimeVersions:u};return e.log(`Returning dotnet info: ${JSON.stringify(t)}`,c.LogImportance.low),t}return e.log("Failed to parse dotnet version information",c.LogImportance.high),null}catch(t){return e.log(`Error running "dotnet --info". Either the dotnet installation cannot be found from PATH, or it might be corrupted.\n${t}`,c.LogImportance.high),null}}async function v(e,t=[],r=process.cwd(),n=process.env){return new Promise((i,s)=>{o.execFile(e,t,{windowsHide:!0,maxBuffer:512e3,cwd:r,env:n},(e,t,r)=>{e?s(new Error(`${e}\nSTDOUT:\n${t}\nSTDERR:\n${r}`)):r&&!r.includes("screen size is bogus")?s(new Error(r)):i(t)})})}async function y(e,t){let r=process.arch;if(e){const n=e.asAbsolutePath("extension.vsixmanifest");if(await(0,a.exists)(n)){const e=await(0,l.readFile)(n,"utf-8"),o=/TargetPlatform="[^"-]+-(.*)"/.exec(e);o?(r=o[1],t.log(`Found extension target platform: ${r}`,c.LogImportance.low)):t.log(`Could not find extension target platform in "${n}. Falling back to ${r}."`,c.LogImportance.high)}else t.log(`Unable to find extension target platform - no vsix manifest file exists at "${n}". Falling back to ${r}.`,c.LogImportance.low)}return r}!function(e){e[e.noCandidateFound=0]="noCandidateFound",e[e.mismatchedArchitectureFound=1]="mismatchedArchitectureFound",e[e.mismatchedHigherVersionRuntimeFound=2]="mismatchedHigherVersionRuntimeFound",e[e.mismatchedVersionRuntimeFound=3]="mismatchedVersionRuntimeFound",e[e.disabled=4]="disabled"}(h||(t.CompatibleDotnetSearchFailedReason=h={})),t.findMatchedDotnetFromPathLegacy=async function(e,t,r){try{if(void 0===r&&(r=await m(t)),!r)return h.noCandidateFound;const o=await y(e,t);if(o!==r.architecture)return t.log(`The architecture of the .NET runtime (${r.architecture}) does not match the architecture of the extension (${o}).`,c.LogImportance.low),h.mismatchedArchitectureFound;const l=i.parse(`${s.NET_RUNTIME_VERSION}.${s.NET_RUNTIME_VERSION_PATCH}`),p=r.runtimeVersions["Microsoft.NETCore.App"],f=r.runtimeVersions["Microsoft.AspNetCore.App"],v=(0,d.apiIsAvailable)(d.OPTION_TO_CHECK_AND_ACQUIRE_ASPNETCORE);let S=!1,w=!1,E="";for(const e of p){const t=e.version;if(!(t.prerelease?.length>0))if(t.major===l.major){if(t.compare(l)>=0&&(!v||f?.find(e=>0===e.version.compare(t)))){S=!0,E=e.path;break}}else 1!==t.compare(l)||v&&!f?.find(e=>0===e.version.compare(t))||(w=!0,E=e.path)}if(!S)return t.log("No extension compatible .NET runtime found from installed SDKs.",c.LogImportance.low),w?h.mismatchedHigherVersionRuntimeFound:h.mismatchedVersionRuntimeFound;if("true"===process.env.CSDEVKIT_FORCE_OWN_RUNTIME||"darwin"===process.platform&&n.workspace?.getConfiguration("dotnet")?.get("workingWithTestSignedSdk"))return h.disabled;if(E&&(E=u.dirname(u.dirname(E)),E)){const e=u.join(E,(0,a.isWindows)()?"dotnet.exe":"dotnet");if(await(0,a.exists)(e))return e}const _=await g(r,t);if(_)return _}catch(e){t.log(`Failed to find dotnet info from path: ${e}`,c.LogImportance.high)}return h.noCandidateFound},t.findInstalledDotnetFromPathLegacy=g,t.getDotnetInfoLegacy=m,t.execChildProcess=v,t.getArchitectureFromTargetPlatform=y},9351(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NuGetConfigurationSettings=void 0;const n=r(1398);class o{_config=void 0;constructor(e){this._config=this.getConfiguration(e)}getConfiguration(e){const t=n.workspace.getConfiguration(e);if(!t)throw new Error(`Configuration ${t} not found`);return t}getValue(e,t){return this._config?.get(e,t)??t}}class i extends o{static configurationName="nuget";static includePrereleaseKey="includePrereleasePackageVersions";constructor(){super(i.configurationName)}get includePrerelease(){return this.getValue(i.includePrereleaseKey,!1)}}t.NuGetConfigurationSettings=i},6452(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getPrereleaseStatusPlaceholder=t.getPackageFromContext=t.getProjectFromContext=t.retrieveOutdatedPackages=t.retrieveInstalledPackages=t.retrievePackageVersions=t.showVersionPicker=t.showPackagePickerFromPromise=t.showProjectPicker=t.verifyServicePrerequisites=t.NuGetAction=void 0;const n=r(1398),o=r(6943),i=r(9589),s=r(2963),a=r(680),c=r(5059),l=r(4724),u=r(7256),d=r(9509),p=r(1038),h=r(4835),f=r(6928);var g;!function(e){e[e.add=0]="add",e[e.update=1]="update",e[e.remove=2]="remove"}(g||(t.NuGetAction=g={})),t.verifyServicePrerequisites=async function(e,t,r,o){return await a.logger.watch("Check NuGet service prerequisites",async function(){const i=await r.getProxy(l.default.nugetCommandsService);try{const r=await(0,d.runWithDurationTelemetry)(async()=>await(i?.checkPrerequisites(t)),o,"verifyPrerequisites");let s;return r&&!r.isPrerequisiteMet&&r.message&&r.actionText&&i instanceof u.NuGetDotnetCommandsService&&(s=await n.window.showQuickPick([r.actionText,c.promptStrings.cancel],{title:y(e),placeHolder:r.message}),s&&s!==c.promptStrings.cancel&&n.commands.executeCommand("vscode.open",n.Uri.parse("https://go.microsoft.com/fwlink/?linkid=2263657"))),(0,d.addDotnetSdkTelemetry)(o,r?.value??"unknown",s?s===c.promptStrings.cancel?"cancel":"install":void 0),r}finally{i?.dispose()}},{telemetry:o,catchUnhandledErrors:!0})},t.showProjectPicker=async function(e,t){const r=await(0,d.runWithDurationTelemetry)(async()=>await(0,s.getAllProjects)(),t,"getAllProjects");if((0,d.addResultsCountTelemetry)(t,r?.length??0,"getAllProjects"),r&&r.length>0){const t=r.map(e=>({name:e.Name,fullPath:e.Path})).sort((e,t)=>e.name.localeCompare(t.name));let i;if(1===t.length)i=t[0];else{const r=await n.window.showQuickPick(t.map(e=>new o.ProjectInfoQuickPick(e)),{title:y(e),placeHolder:m(e)});i=r?.info}return i}};const m=e=>({[g.add]:c.nugetStrings.projectPickerPlaceholderAdd,[g.update]:c.nugetStrings.projectPickerPlaceholderUpdate,[g.remove]:c.nugetStrings.projectPickerPlaceholderRemove}[e]??c.nugetStrings.projectPickerPlaceholder);function v(e){return null!=e&&"object"==typeof e&&"node"in e&&"object"==typeof e.node&&"NodeType"in e.node}function y(e,t=void 0){return e===g.add?t?c.nugetStrings.addPackageNameTitle(t):c.nugetStrings.addPackageTitle:e===g.update?t?c.nugetStrings.updatePackageNameTitle(t):c.nugetStrings.updatePackageTitle:e===g.remove?c.nugetStrings.removePackageTitle:""}function S(e,t){return e?c.nugetStrings.prereleaseIncludedSuffix(t):c.nugetStrings.prereleaseNotIncludedSuffix(t)}function w(e){return e===g.update?c.nugetStrings.noPackagesToUpdateResult:e===g.remove?c.nugetStrings.noPackagesToRemoveResult:""}t.showPackagePickerFromPromise=async function(e,t,r){let i;const s=await n.window.showQuickPick(new Promise(async r=>{const n=await t;n&&n.length>0?r(n?.map(e=>new o.NuGetPackageUpdateQuickPick(e))):r([{label:w(e)}])}),{title:y(e),placeHolder:r?S(r.includePrerelease,c.nugetStrings.packagePickerPlaceholder):c.nugetStrings.packagePickerPlaceholder});return s&&s instanceof o.NuGetPackageUpdateQuickPick&&(i=s.info),i},t.showVersionPicker=async function(e,t,r,s){let a;const l=await n.window.showQuickPick(new Promise(async e=>{const n=await r;let s=!1;const a=[];n&&n.length>0?(n.sort((e,t)=>{const r=i.parse(e.version,{loose:!0}),n=i.parse(t.version,{loose:!0});return n&&r?i.compare(n,r,{loose:!0}):0}).map(e=>{if(e.version){s||(e.isLatest=s=!0),e.version===t.version&&(e.isCurrent=!0);const r=new o.NuGetPackageVersionQuickPick(e);a.push(r)}}),e(a)):e([{label:c.nugetStrings.noVersionsFoundError}])}),{title:y(e,t.id),placeHolder:S(s.includePrerelease,c.nugetStrings.selectVersionPlaceholder)});return l&&l instanceof o.NuGetPackageVersionQuickPick&&(a=l.info),a},t.retrievePackageVersions=async function(e,t,r,n,o){return await a.logger.watch("Get NuGet package versions",async function(){const i=await n.getProxy(l.default.nugetCommandsService);try{const n=await(0,d.runWithDurationTelemetry)(async()=>await(i?.getVersions(e,t,r)),o,"getPackageVersions")??[];return(0,d.addResultsCountTelemetry)(o,n.length,"getPackageVersions"),n}finally{i?.dispose()}},{telemetry:o,catchUnhandledErrors:!0})},t.retrieveInstalledPackages=async function(e,t,r){return await a.logger.watch("Get installed NuGet packages",async function(){const n=await t.getProxy(l.default.nugetCommandsService);try{const t=await(0,d.runWithDurationTelemetry)(async()=>await(n?.getInstalledPackages(e)),r,"listInstalledPackages")??[];return(0,d.addResultsCountTelemetry)(r,t.length,"listInstalledPackages"),t}finally{n?.dispose()}},{telemetry:r,catchUnhandledErrors:!0})},t.retrieveOutdatedPackages=async function(e,t,r,n){return await a.logger.watch("Get outdated NuGet packages",async function(){const o=await r.getProxy(l.default.nugetCommandsService);try{const r=await(0,d.runWithDurationTelemetry)(async()=>await(o?.getOutdatedPackages(e,t)),n,"listOutdatedPackages")??[];return(0,d.addResultsCountTelemetry)(n,r.length,"listOutdatedPackages"),r}finally{o?.dispose()}},{telemetry:n,catchUnhandledErrors:!0})},t.getProjectFromContext=async function(e){if(e instanceof n.Uri){if((await n.workspace.fs.stat(e)).type===n.FileType.Directory){const t=await(0,h.getSingleProjectFromFolder)(e);return t?{name:t.name,fullPath:t.path}:void 0}const t=f.normalize(e.fsPath);return{name:f.basename(t,".csproj"),fullPath:t}}if(v(e)){let t=e;for(;t;){if(t.node.NodeType===p.nodeTypes.project&&t.node.Path){const e=f.normalize(t.node.Path);return{name:f.basename(e,f.extname(e)),fullPath:e}}t=t.parentNode}}},t.getPackageFromContext=function(e){if(v(e)&&e.node.NodeType===p.nodeTypes.packageDependency)return e.node.Name},t.getPrereleaseStatusPlaceholder=S},6943(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NuGetPackageUpdateQuickPick=t.NuGetPackageVersionQuickPick=t.NuGetPackageSearchQuickPick=t.ProjectInfoQuickPick=void 0;const n=r(5059);t.ProjectInfoQuickPick=class{info;label;description;constructor(e){this.info=e,this.label=e.name,this.description=e.fullPath}},t.NuGetPackageSearchQuickPick=class{info;label;description;detail;constructor(e){this.info=e,this.label=e.id}},t.NuGetPackageVersionQuickPick=class{info;label;description;detail;constructor(e){this.info=e,this.label=e.version;const t=[];e.isLatest&&t.push(n.nugetStrings.versionLatestLabel),e.isCurrent&&t.push(n.nugetStrings.versionCurrentLabel),t.length>0&&(this.description=`(${t.join(", ")})`)}},t.NuGetPackageUpdateQuickPick=class{info;label;description;detail;constructor(e){this.info=e,this.label=e.id,this.description=e.version}}},9509(e,t){"use strict";async function r(e){const t=Date.now();return{result:await e(),durationMilliseconds:Date.now()-t}}Object.defineProperty(t,"__esModule",{value:!0}),t.measureExecutionTime=t.runWithDurationTelemetry=t.addResultsCountTelemetry=t.addDotnetSdkTelemetry=t.addIncludePrereleaseTelemetry=t.addCompletedTelemetry=t.cancelAtStepTelemetry=t.addEntrypointTelemetry=void 0,t.addEntrypointTelemetry=function(e,t){e.addOrUpdateProperties({entrypoint:t})},t.cancelAtStepTelemetry=function(e,t){e.addOrUpdateProperties({wasCompleted:String(!1),canceledAtStep:t})},t.addCompletedTelemetry=function(e){e.addOrUpdateProperties({wasCompleted:String(!0)})},t.addIncludePrereleaseTelemetry=function(e,t){e.addOrUpdateProperties({includePrerelease:String(t)})},t.addDotnetSdkTelemetry=function(e,t,r){e.addOrUpdateProperties({dotnetSdkVersion:t,minDotnetSdkPromptSelected:r})},t.addResultsCountTelemetry=function(e,t,r){e.addOrUpdateMeasurements({[r+"ResultsCount"]:t})},t.runWithDurationTelemetry=async function(e,t,n){if(!t)return e();const{result:o,durationMilliseconds:i}=await r(e);return t.addOrUpdateMeasurements({[n+"Duration"]:i}),o},t.measureExecutionTime=r},8739(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let r={};process.env.VSSERVER_DOTNET_EventPipeOutputPath&&(r={DOTNET_EnableEventPipe:1,DOTNET_EventPipeConfig:"Microsoft-Windows-DotNETRuntime:0x1F000080018:5",DOTNET_EventPipeOutputPath:process.env.VSSERVER_DOTNET_EventPipeOutputPath,DOTNET_ReadyToRun:0,DOTNET_TieredCompilation:1,DOTNET_TC_CallCounting:0,DOTNET_TC_QuickJitForLoops:1,DOTNET_JitCollect64BitCounts:1}),t.default=r},1569(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.showProjectDetailsMigrationNotification=void 0;const n=r(1398),o=r(5033),i=r(9768),s="projectDetailsMigrationShown";t.showProjectDetailsMigrationNotification=async function(e,t,r=!1){if(!r&&e.globalState.get(s))return;const a=e.asAbsolutePath(i.PROJECT_DETAILS_VIEW_MIGRATION_MD_PATH);try{await n.commands.executeCommand("markdown.showPreview",n.Uri.file(a)),await e.globalState.update(s,!0)}catch(e){t.log(`Failed to show project details migration document: ${e}`,o.LogImportance.normal)}}},5492(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.updateProjectReferenceInCsprojXml=t.csprojHasLiteralProjectReferenceTo=t.removeProjectReferenceFromCsprojXml=void 0;const n=r(6928);t.removeProjectReferenceFromCsprojXml=function(e,t,r){if(!a(e,r))return e;const n=c(r);return e.replace(i,(e,r)=>s(r,t,n)?"":e)},t.csprojHasLiteralProjectReferenceTo=function(e,t,r){if(!a(e,r))return!1;const n=c(r),i=new RegExp(o.source,o.flags);let l;for(;null!==(l=i.exec(e));)if(s(l[2],t,n))return!0;return!1},t.updateProjectReferenceInCsprojXml=function(e,t,r,i){if(!a(e,r))return e;const l=c(r),u=n.relative(t,i);return e.replace(o,(e,r,o,i)=>s(o,t,l)?`${r}${function(e,t){const r=(t.match(/\//g)??[]).length,o=(t.match(/\\/g)??[]).length;let i;return i=0===r&&0===o?"win32"!==process.platform:r>=o,i?e.split(n.sep).join("/"):e.split("/").join("\\")}(u,o)}${i}`:e)};const o=/(<ProjectReference\b[^>]*?\bInclude\s*=\s*")([^"]+)("[^>]*?(?:\/>|>[^<]*<\/ProjectReference>))/gi,i=/[ \t]*<ProjectReference\b[^>]*?\bInclude\s*=\s*"([^"]+)"[^>]*?(?:\/>|>[^<]*<\/ProjectReference>)\s*\r?\n?/gi;function s(e,t,r){if(e.includes("$("))return!1;const o=e.replace(/[\\/]+/g,n.sep);return c(n.resolve(t,o))===r}function a(e,t){const r=n.basename(t),o="win32"===process.platform?e.toLowerCase():e,i="win32"===process.platform?r.toLowerCase():r;return o.includes(i)}function c(e){const t=n.normalize(e);return"win32"===process.platform?t.toLowerCase():t}},74(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.showQuickPickWithActiveItem=void 0;const n=r(1398);t.showQuickPickWithActiveItem=async function(e,t,r){const o=n.window.createQuickPick();return o.title=e,o.items=t,r&&(o.activeItems=[r]),o.show(),new Promise(e=>{o.onDidAccept(()=>{const r=o.selectedItems[0];t.dispose(),o.dispose(),e(r)});const t=o.onDidHide(()=>{o.dispose(),e(void 0)})})}},3787(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getReliabilityMonitorPath=t.scheduleLaunchReliabilityMonitor=void 0;const n=r(6928),o=r(8739),i=r(1398),s=r(680),a=r(6759),c=r(3487),l=r(5033);function u(e){return n.join(e["@microsoft/visualstudio-reliability-monitor"],"Microsoft.VisualStudio.Reliability.Monitor")}t.scheduleLaunchReliabilityMonitor=function(e,t,r){!async function(e,t,r){await Promise.resolve();try{const n=u(t),d=a.TelemetryService.getSessionId(i.env.sessionId),p=s.telemetryService?.getTelemetryLevel()??"off",h={...process.env,...o.default};h.DOTNET_MULTILEVEL_LOOKUP="0",h.DOTNET_ROOT=r,(0,c.addDotNetDumpCreationEnvironmentValues)(h),(0,c.setComponentPathsInEnvironment)(h,t,c.VSSERVER_SHARED_COMPONENT_NAME);const f=[];f.push("--vscodeSessionId",d),f.push("--vscodeTelemetryLevel",p),(0,c.launchChildProcess)(t,n,f,e.extensionPath,h),s.logger.log("Reliability monitor launched.",l.LogImportance.low)}catch(e){s.logger.reportExceptionTelemetryAndLog("launchReliabilityMonitor",null,"CsDevKit.Reliability.Monitor.Launch.Error",e,s.telemetryService)}}(e,t,r)},t.getReliabilityMonitorPath=u},1136(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getServerPath=t.getServiceHubHostEntrypointName=t.launchDotNetServer=t.SERVICEHUB_HOST_COMPONENT_NAME=t.SERVICEHUB_CONTROLLER_COMPONENT_NAME=void 0;const n=r(4084),o=r(5518),i=r(9278),s=r(7700),a=r(1398),c=r(2776),l=r(680),u=r(1760),d=r(8739),p=r(3787),h=r(3487),f=r(8955),g=r(6759),m=r(9896),v=r(6928),y=r(9568),S=r(9409),w=r(9768),E=r(8184),_=r(9589),b=r(4989),P=r(431),T=r(1298),C="serviceBroker";function I(){return v.join("win32"===process.platform?"\\\\.\\pipe":"/tmp",(0,s.v4)())}function O(){return"Microsoft.VisualStudio.Code.ServiceHost"+("win32"===process.platform?".exe":"")}function N(e){return process.env.CSDEVKIT_SERVER_PATH||v.join(e["@microsoft/visualstudio-server"],"Microsoft.VisualStudio.Code.Server")}t.SERVICEHUB_CONTROLLER_COMPONENT_NAME="@microsoft/visualstudio-controller",t.SERVICEHUB_HOST_COMPONENT_NAME="@microsoft/visualstudio-code-servicehost",t.launchDotNetServer=async function(e,r,s){let R=null;const A=new f.TelemetryActivity("launch-server",l.telemetryService);async function D(e,t){R=e;try{const e=performance.now(),r=await t(),n=performance.now();return R+=" (succeeded)",{result:r,duration:n-e}}catch(e){throw R+=" (failed)",e}}const x="CsDevKit/Server/Start",k=I(),j=N(r),M=O(),L=a.workspace?.getConfiguration("dotnet")?.get("useLegacyDotnetResolution")||!(0,b.apiIsAvailable)(b.FIND_PATH_API);let F,U;l.telemetryService?.sendTelemetryEvent("CsDevKit/Server/DotnetResolution",{legacy:L.toString()}),L?l.logger.log("Using legacy dotnet resolution"):l.logger.log('Using dotnet resolution provided by ".NET Install Tool"');try{await D("setExecuteBit",()=>(0,h.setExecuteBit)(r));const t=await D("acquireRuntime",()=>(0,u.acquireRuntime)(L,e));F=t.result,U=v.dirname(F.path),A.addOrUpdateMeasurements({acquireDotNetProcessDependencies:t.duration})}catch(e){throw l.telemetryService?.sendTelemetryErrorEvent(x,{fault:R??"(missing)"}),e}try{const p={...process.env,...d.default};a.workspace.workspaceFolders||(p.EmptyCodeWorkspace="1"),p.DOTNET_MULTILEVEL_LOOKUP="0",p.DOTNET_ROOT=U,p.DOTNET_PROJECTSYSTEM_HOST_EXECCOMMAND="",p.PRJHOST_DOTNET_ROOT=U,p.PRJHOST_ROLL_FORWARD_TO_PRERELEASE="0",p.PRJHOST_ROLL_FORWARD="Major",p.PRJ_BUILD_DOTNET_HOST=F.globalPath??"",p.DOTNET_ROOT_USER=process.env.DOTNET_ROOT??"EMPTY",a.workspace.getConfiguration("dotnet.projectsystem").get("useNewMemoryOptimization")&&(p.CDK_OnDemandProjectCache="true");let f=!1,O=!1;const N=_.parse(`${w.NET_RUNTIME_VERSION}.${w.NET_RUNTIME_VERSION_PATCH}`);let R=N,$=a.workspace.getConfiguration("dotnet").get("projectRuntimePath"),B=a.workspace.getConfiguration("dotnet").get("projectSdkPath");!$||v.isAbsolute($)&&(0,m.existsSync)($)||(l.logger.log(`Warning: "dotnet.projectRuntimePath" is set to "${$}" but the path is not absolute or does not exist. Ignoring override.`),$=void 0),!B||v.isAbsolute(B)&&(0,m.existsSync)(B)||(l.logger.log(`Warning: "dotnet.projectSdkPath" is set to "${B}" but the path is not absolute or does not exist. Ignoring override.`),B=void 0);let V=!1;if($&&B?"Use Overrides"===await a.window.showWarningMessage(`C# Dev Kit: Project runtime paths are overridden. Runtime: ${$}, SDK: ${B}. This bypasses all runtime/SDK discovery. Continue with these overrides?`,{modal:!0},"Use Overrides")?(l.logger.log(`Using projectRuntimePath override: "${$}". User accepted.`),l.logger.log(`Using projectSdkPath override: "${B}". User accepted.`),p.PRJHOST_DOTNET_ROOT=v.dirname($),p.PRJ_BUILD_DOTNET_HOST=B,(0,l.setDotNetSdkPath)(B),V=!0):l.logger.log("User declined project runtime overrides. Falling back to automatic discovery."):$&&!B?l.logger.log('Warning: "dotnet.projectRuntimePath" is set but "dotnet.projectSdkPath" is not. Both must be set to override project dotnet paths. Falling back to automatic discovery.'):!$&&B&&l.logger.log('Warning: "dotnet.projectSdkPath" is set but "dotnet.projectRuntimePath" is not. Both must be set to override project dotnet paths. Falling back to automatic discovery.'),!V&&F.globalPath){if((0,l.setDotNetSdkPath)(F.globalPath),L){if(F.dotnetInfo){const e=F.dotnetInfo.runtimeVersions["Microsoft.NETCore.App"];let t=F.globalRuntimeMismatchingReason===E.CompatibleDotnetSearchFailedReason.mismatchedHigherVersionRuntimeFound,r=!1,n=!1;for(const o of e){const e=o.version;if(e.major>N.major?t=!0:e.compare(N)>=0&&(e.prerelease?.length>0&&(n=!0),r=!0),t&&r&&n)break}if((t||n)&&(f=!r,!f))if(a.workspace.workspaceFolders&&a.workspace.workspaceFolders.length>0)for(let e=0;e<a.workspace.workspaceFolders.length;e++){const t=await(l.dotnetVersionManager?.getDotnetVersion(a.workspace.workspaceFolders[e].uri.fsPath,l.logger));if(t){if(t.major>N.major){f=!0,R=t;break}n&&t.major===N.major&&t.prerelease?.length>0&&(R=R>t?R:t,O=!0)}}else t?f=!0:O=!0}f||O||F.globalRuntimeMismatchingReason!==E.CompatibleDotnetSearchFailedReason.mismatchedArchitectureFound||l.telemetryService?.sendTelemetryEvent("CsDevKit/Server/mismatchingArchitectureSDK")}else if(a.workspace.workspaceFolders&&a.workspace.workspaceFolders.length>0){const e=_.parse(w.NET_SDK_SUPPORTED_PREVIEW_RUNTIME_MIN_VERSION);for(let t=0;t<a.workspace.workspaceFolders.length;t++){const r=await(l.dotnetVersionManager?.getDotnetVersion(a.workspace.workspaceFolders[t].uri.fsPath,l.logger));if(l.logger.log(`Workspace folder: "${a.workspace.workspaceFolders[t].uri.fsPath}" requires SDK version: ${r?.toString()??"unknown"}`),r){if(r.major>N.major){f=!0,R=r;break}r.major===N.major&&r.prerelease?.length>0&&r.compare(e)>=0&&(O=!0,R=R>r?R:r)}}}else f=!0;(f||O)&&(p.PRJHOST_DOTNET_ROOT=v.dirname(F.globalPath),p.DEV_KIT_ON_SDK_RUNTIME="1",p.PRJHOST_ROLL_FORWARD_TO_PRERELEASE="1",l.telemetryService?.sendTelemetryEvent("CsDevKit/Server/UseSDKRuntime"),l.logger.log("Project system hosting process will use runtime installed in SDK"),l.logger.log(`Project Host Dotnet Root: ${p.PRJHOST_DOTNET_ROOT}`),l.logger.log(`Project system required runtime version: ${R.toString()}`),f&&(p.PRJHOST_ROLL_FORWARD="LatestMajor"))}p.CSDEVKIT_LOG_DIRECTORY=e.logUri.fsPath,await D("addDotNetDumpCreationEnvironmentValues",()=>(0,h.addDotNetDumpCreationEnvironmentValues)(p)),(0,h.setComponentPathsInEnvironment)(p,r,t.SERVICEHUB_CONTROLLER_COMPONENT_NAME,t.SERVICEHUB_HOST_COMPONENT_NAME,h.VSSERVER_SHARED_COMPONENT_NAME),p.SERVICEHUB_HOST_ENTRYPOINT=M,f&&"darwin"===process.platform&&F.globalPath&&a.workspace.getConfiguration("dotnet").get("workingWithTestSignedSdk")?(p.DOTNET_PROJECTSYSTEM_HOST_ENTRYPOINT=F.globalPath,p.DOTNET_PROJECTSYSTEM_HOST_EXECCOMMAND="exec",p.DOTNET_PROJECTSYSTEM_HOST_INPUT=v.join(r[t.SERVICEHUB_HOST_COMPONENT_NAME],"Microsoft.VisualStudio.Code.ServiceHost.dll")):(p.DOTNET_PROJECTSYSTEM_HOST_ENTRYPOINT=v.join(r[t.SERVICEHUB_HOST_COMPONENT_NAME],M),p.DOTNET_PROJECTSYSTEM_HOST_INPUT="");const H=(0,b.apiIsAvailable)(b.OPTION_TO_CHECK_AND_ACQUIRE_ASPNETCORE);if(f||O){const e=await D("findAspnetcoreRuntimePath",async()=>(0,u.findAspNetRuntime)(p.PRJHOST_DOTNET_ROOT,R,l.logger));e.result?(l.logger.log(`ASP.NET runtime found for PS dotnet host ${p.PRJHOST_DOTNET_ROOT}, using ASP.NET runtimeconfig for project system host`),p.DOTNET_PROJECTSYSTEM_HOST_RUNTIMECONFIGFILE=v.join(r[t.SERVICEHUB_HOST_COMPONENT_NAME],"Microsoft.VisualStudio.Code.ServiceHost.MultipleHeap.runtimeconfig.json")):(l.logger.log(`ASP.NET runtime not found for PS dotnet host ${p.PRJHOST_DOTNET_ROOT}, using default runtimeconfig for project system host.`),p.DOTNET_PROJECTSYSTEM_HOST_RUNTIMECONFIGFILE=v.join(r[t.SERVICEHUB_HOST_COMPONENT_NAME],"Microsoft.VisualStudio.Code.ServiceHost.runtimeconfig.json")),l.telemetryService?.sendTelemetryEvent("CsDevKit/Server/SDKAspNetRuntimeAvailability",{found:(!!e.result).toString(),prereleaseRuntime:O.toString(),requestedRuntimeVersion:R.toString()})}else H?(l.logger.log("ASP.NET runtime found, using ASP.NET runtimeconfig for project system host."),p.DOTNET_PROJECTSYSTEM_HOST_RUNTIMECONFIGFILE=v.join(r[t.SERVICEHUB_HOST_COMPONENT_NAME],"Microsoft.VisualStudio.Code.ServiceHost.MultipleHeap.runtimeconfig.json")):(l.logger.log("ASP.NET runtime not found, using default runtimeconfig for project system host."),p.DOTNET_PROJECTSYSTEM_HOST_RUNTIMECONFIGFILE=v.join(r[t.SERVICEHUB_HOST_COMPONENT_NAME],"Microsoft.VisualStudio.Code.ServiceHost.runtimeconfig.json"));l.telemetryService?.sendTelemetryEvent("CsDevKit/Server/ProjectSystemHostRuntimeConfig",{runtimeConfig:v.basename(p.DOTNET_PROJECTSYSTEM_HOST_RUNTIMECONFIGFILE)}),p.DOTNET_ASPIRESERVER_HOST_ENTRYPOINT=H?F.path:F.globalPath??F.path,p.DOTNET_ASPIRESERVER_HOST_RUNTIMECONFIGFILE=v.join(r[t.SERVICEHUB_HOST_COMPONENT_NAME],"Microsoft.VisualStudio.Code.ServiceHost.AspNet.runtimeconfig.json"),p.DOTNET_ASPIRESERVER_HOST_INPUT=v.join(r[t.SERVICEHUB_HOST_COMPONENT_NAME],"Microsoft.VisualStudio.Code.ServiceHost.dll"),p.ASPIRE_HOST_DOTNET_ROOT=H?p.DOTNET_ROOT:p.PRJHOST_DOTNET_ROOT,p.ASPIRE_HOST_ROLL_FORWARD_TO_PRERELEASE=H?"0":p.PRJHOST_ROLL_FORWARD_TO_PRERELEASE,p.ASPIRE_HOST_ROLL_FORWARD=H?"Major":p.PRJHOST_ROLL_FORWARD,a.workspace.getConfiguration("dotnet").get("preferVisualStudioCodeFileSystemWatcher",void 0)&&(p.ENABLE_VSCODE_FILEWATCHER="true");let q=v.join(e.extensionPath,"components/servicehub");const z=await D("createSocket",()=>function(){const e=I(),t=new Promise(async(t,r)=>{try{const n=(0,i.createServer)(e=>{try{n.close(),t(e)}catch(e){r(e)}});n.listen(e)}catch(e){r(e)}});return{pipeName:e,socket:t}}());A.addOrUpdateMeasurements({createSocket:z.duration});const W=g.TelemetryService.getSessionId(a.env.sessionId),G=l.telemetryService?.getTelemetryLevel()??"off",K=process.env.CSDEVKIT_CODE_COVERAGE_OUTPUT,X=!!K,J=[],Q=X?l.dotnetSdkPath??"dotnet":j;X&&(await l.logger.watch("Installing dotnet-coverage tool...",async()=>{const t=(0,h.launchChildProcess)(r,l.dotnetSdkPath??"dotnet",["tool","install","dotnet-coverage"],e.extensionPath,p);await(0,S.waitForProcess)(t)}),l.logger.log(`Launching .NET server with code coverage to ${K}`),J.push("tool","run","dotnet-coverage"),J.push("collect",j),J.push("--output",K)),J.push("--serviceHubConfigPath",v.join(q,"servicehub.config.json")),J.push("--pipe",z.result.pipeName),J.push("--pipe-server",k),J.push("--log-directory",e.logUri.fsPath),J.push("--log-verbosity",process.env.CSDEVKIT_VERBOSITY??"Information"),J.push("--vscodeSessionId",W),J.push("--vscodeTelemetryLevel",G),(0,c.isCacheEnabled)(e)&&J.push("--cache-directory",(0,c.getCacheDirectory)(e)),J.push("--component",...Object.values(r));const Y=performance.now(),Z=await D("launchChildProcess",()=>(0,h.launchChildProcess)(r,Q,J,e.extensionPath,p));A.addOrUpdateMeasurements({launchChildProcess:Z.duration}),T.processTracker.attachChildProcess("server",Z.result),Z.result.pid&&l.logger.log(`vs-green server PID: ${Z.result.pid}`),Z.result.stdout.on("data",e=>{l.logger.log(`.NET server STDOUT: ${e}`)}),Z.result.stderr.on("data",e=>{l.logger.log(`.NET server STDERR: ${e}`)}),Z.result.on("exit",e=>{18===e&&(0,P.showLicenseViolationToastAndThrow)(),l.logger.log(`.NET server exited with ${e}`),l.telemetryService?.sendTelemetryEvent("CsDevKit/Server/Exit",{shutdownReason:"Abnormal"},{exitCode:e??1})});const ee=await z.result.socket,te=await D("mxstream.create",()=>o.MultiplexingStream.CreateAsync(ee));A.addOrUpdateMeasurements({mxstreamcreate:te.duration});const re=s.getLimitedAccessServiceBroker(n.ServiceAudience.local,y.Map(),n.ClientCredentialsPolicy.requestOverridesDefault);(async function(e,t){const r=await e.offerChannelAsync(C);try{const o=new n.MultiplexingRelayServiceBroker(t,e,!1);n.FrameworkServices.remoteServiceBroker.constructRpc(o,r),await o.completion}finally{r.stream.end()}})(te.result,re).catch(e=>console.log(`Proffer of a service broker failed: ${e}`));const ne=await async function(e){const t=await e.acceptChannelAsync(C);return n.FrameworkServices.remoteServiceBroker.constructRpc(t)}(te.result);s.profferRemoteServiceBroker(ne,te.result,n.ServiceSource.otherProcessOnSameMachine,null);const oe=performance.now();l.logger.log(`.NET server started and IPC established in ${(oe-Y).toFixed()}ms`);const ie=s.getFullAccessServiceBroker();(0,T.refreshProcessInformation)(ie,l.logger.getChannel(),"pshost").then(()=>{const e=T.processTracker.get("pshost");e?.pid&&l.logger.log(`Project System Host PID: ${e.pid}`)}).catch(()=>{}),l.telemetryService?.sendTelemetryEvent(x),A.sendTelemetry()}catch(e){throw l.logger.reportExceptionTelemetryAndLog("launchDotNetServer",R,"",e,l.telemetryService),e}finally{l.telemetryService?.sendTelemetryEvent("CsDevKit/Reliability/Monitor/Launch"),(0,p.scheduleLaunchReliabilityMonitor)(e,r,U)}return{brokeredServiceServerPipeName:k}},t.getServiceHubHostEntrypointName=O,t.getServerPath=N},3487(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.launchChildProcess=t.addDotNetDumpCreationEnvironmentValues=t.setComponentPathsInEnvironment=t.setExecuteBit=t.VSSERVER_SHARED_COMPONENT_NAME=void 0;const n=r(5317),o=r(6928),i=r(1943),s=r(680),a=r(1136),c=r(3787);t.VSSERVER_SHARED_COMPONENT_NAME="@microsoft/visualstudio-server-shared",t.setExecuteBit=async function(e){if("win32"!==process.platform){const t=o.join(e[a.SERVICEHUB_CONTROLLER_COMPONENT_NAME],"Microsoft.VisualStudio.Code.ServiceController"),r=o.join(e[a.SERVICEHUB_HOST_COMPONENT_NAME],(0,a.getServiceHubHostEntrypointName)()),n=[(0,a.getServerPath)(e),t,r,(0,c.getReliabilityMonitorPath)(e)];await Promise.all(n.map(e=>(0,i.chmod)(e,"0755")))}};const l=/[\-/]/g;t.setComponentPathsInEnvironment=function(e,t,...r){for(const n of r)e["COMPONENT_"+n.replace("@","").replace(l,"_").toUpperCase()]=t[n]},t.addDotNetDumpCreationEnvironmentValues=function(e){"win32"!==process.platform&&(e.DOTNET_DbgEnableMiniDump="1",e.DOTNET_DbgMiniDumpType="2",e.DOTNET_DbgMiniDumpName=o.join(function(){const e=r(857),t=r(9896);let n="";n="linux"===process.platform?o.join(e.homedir(),".cache","Microsoft","csdevkit","dumps"):o.join(e.tmpdir(),"csdevkit","dumps");try{t.existsSync(n)||t.mkdirSync(n,{recursive:!0})}catch(t){s.logger.log(`Failed to create crash dump path ${n} due to ${t}`),n=e.tmpdir()}return n}(),"%e.%d.dmp"),e.DOTNET_EnableCrashReport="1")},t.launchChildProcess=function(e,t,r,o,i){return n.spawn(t,r,{windowsHide:!0,cwd:o,env:i})}},9791(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ActiveDocumentsInformationService=t.ActiveDocumentsChangesEventArgs=void 0;const n=r(4434),o=r(1398);class i{newActiveDocument;newDocuments;closedDocuments;constructor(e,t,r){e&&(this.newActiveDocument=e),t&&(this.newDocuments=t),r&&(this.closedDocuments=r)}}t.ActiveDocumentsChangesEventArgs=i;class s extends n.EventEmitter{isInitialized;constructor(){super()}rpcEventNames=["activeDocumentsChanged"];getActiveDocuments(){this.isInitialized||(o.window.onDidChangeActiveTextEditor(e=>{if(e){const t=e.document.fileName;this.emit("activeDocumentsChanged",new i(t))}}),o.workspace.onDidOpenTextDocument(e=>{const t=e.fileName;this.shouldIgnoreDocument(t)||this.emit("activeDocumentsChanged",new i(void 0,[t]))}),o.workspace.onDidCloseTextDocument(e=>{const t=e.fileName;this.shouldIgnoreDocument(t)||this.emit("activeDocumentsChanged",new i(void 0,[],[t]))}));const e=[],t=o.window.activeTextEditor?.document?.fileName;t&&e.push(t);const r=o.workspace.textDocuments;for(var n=0;n<r.length;n++){const o=r[n].fileName;this.shouldIgnoreDocument(o)||o===t||e.push(o)}return e}shouldIgnoreDocument(e){return e.endsWith(".git")}getDirtyDocuments(){return o.workspace.textDocuments.filter(e=>e.isDirty).map(e=>e.fileName)}async saveDocument(e){try{const t=o.workspace.textDocuments.find(t=>t.fileName===e&&t.isDirty);return!t||await t.save()}catch(e){return!1}}}t.ActiveDocumentsInformationService=s},5326(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OpenAIChatCompletionEventArgs=t.AspireCopilotService=void 0;const n=r(1398),o=r(4434),i=r(7983),s=r(5033);class a extends o.EventEmitter{rpcEventNames=["responseGenerated"];outputChannel;logger;constructor(e){super(),e.activationArguments?.needEvents&&this.on("responseGenerated",e=>this.emit("responseGenerated",e)),this.outputChannel=(0,i.lazyLoad)(()=>n.window.createOutputChannel("C# Dev Kit - Aspire",{log:!0})),this.logger=(0,i.lazyLoad)(()=>new s.Logger(this.outputChannel()))}async getGhcpInfo(e){var t=await n.lm.selectChatModels({vendor:"copilot"});return 0===t.length?{state:"Disabled",models:[],launcher:"vscode"}:(this.logger().log(`Models: ${JSON.stringify(t)}`),{state:"Enabled",launcher:"vscode",models:t.filter(e=>{if(e.family.startsWith("claude-3.7"))return!1;const t=e.capabilities;return void 0===t||void 0===t.supportsToolCalling||!0===t.supportsToolCalling}).map(e=>({name:e.id,display_name:e.name,family:e.family,input_tokens:e.maxInputTokens}))})}dispose(){this.logger().log("Disposing AspireCopilotService",s.LogImportance.low),this.off("responseGenerated",e=>this.emit("responseGenerated",e))}async log(e,t){!0!==t?.isCancellationRequested&&this.logger().log(e)}async generateResponse(e,t){const r=JSON.stringify(e,null,2);await this.logTrace(`Generating response with message: ${r}`,t);var o=await n.lm.selectChatModels({vendor:"copilot",family:e.model??"gpt-4o"});if(0===o.length)throw new Error("403 - No model available, have you logged into your github account?");o.length>1&&this.logTrace(`Multiple models selected: ${JSON.stringify(o)}`);const i=o[0],s=e.messages??[];let a=[];for(let e of s)if("assistant"===e.role){let t=e;void 0!==t.tool_calls&&t.tool_calls.length>0&&(a=a.concat(t.tool_calls))}const l=s.map(e=>{if("user"===e.role){let t=e;return n.LanguageModelChatMessage.User(t.content,t.name)}if("system"===e.role){let t=e;return n.LanguageModelChatMessage.Assistant(t.content)}if("tool"===e.role){let t=e,r=a.find(e=>e.id===t.tool_call_id);if(void 0===r)throw new Error("Tool call object not found");let o=`\n${r.function.name}\n- tool call id: ${t.tool_call_id}\n- tool call arguments: ${r.function.arguments}\n- tool call result: ${t.content}\n`;return n.LanguageModelChatMessage.User(o)}if("assistant"===e.role){let t=e;if(void 0!==t.tool_calls&&t.tool_calls.length>0)return null;if(void 0!==t.content)return n.LanguageModelChatMessage.Assistant(t.content,t.name);throw new Error("Unrecognized assistant message")}throw new Error("Unrecognized message role")}),u=(e.tools??[]).map(e=>({name:e.function.name,description:e.function.description,inputSchema:e.function.parameters}));await this.logTrace(`Using tools: ${JSON.stringify(u)}`),await this.logTrace(`Using messages: ${JSON.stringify(l)}`);const d=[];try{const e=await i.sendRequest(l.filter(e=>null!==e),{tools:u});for await(const t of e.stream)if(t instanceof n.LanguageModelTextPart){await this.logTrace(t.value);const e=new c({created:Date.now()/1e3,choices:[{index:0,message:{role:"assistant",content:t.value},delta:{role:"assistant",content:t.value}}],object:"chat.completion",model:i.family});d.push(t),this.emit("responseGenerated",e)}else t instanceof n.LanguageModelToolCallPart?(await this.logTrace(`Tool call: ${t.name}`),await this.logTrace(`Arguments: ${JSON.stringify(t.input)}`),d.push(t)):await this.logTrace(`Unsupported chunk type: ${t?.constructor?.name??typeof t}, content: ${JSON.stringify(t)}`);if(await this.logTrace("Response generated"),await this.logTrace("Response chunks: "+d.length),d.length>0){const e=d.filter(e=>e instanceof n.LanguageModelToolCallPart).map((e,t)=>{if(e instanceof n.LanguageModelToolCallPart)return{id:e.callId,type:"function",function:{name:e.name,arguments:JSON.stringify(e.input)},index:t}}),t=e.length>0?"tool_calls":"stop",r={created:Date.now()/1e3,choices:[{index:0,delta:{role:"assistant",content:"",tool_calls:e},message:{role:"assistant",content:"",tool_calls:e},finish_reason:t}],object:"chat.completion",model:i.family};this.logTrace(`Final response: ${JSON.stringify(r)}`);const o=new c(r);return this.emit("responseGenerated",o),r}throw new Error("No response generated")}catch(t){if(await this.log(`Error: ${t}`),t instanceof Error){if(t.message.includes("model_not_supported")){await this.log("Not authorized to use this model");const t=`\n## Enable the model in GitHub Copilot settings\n\nEnable access to \`${e.model}\` in GitHub Copilot settings. After enabling, please restart the vscode and try again.\n\n[Copilot setting page](https://github.com/settings/copilot)`;await this.logTrace(t);const r={created:Date.now()/1e3,choices:[{index:0,delta:{role:"assistant",content:t},message:{role:"assistant",content:t},finish_reason:"stop"}],object:"chat.completion",model:e.model},n=new c(r);return this.emit("responseGenerated",n),r}}else if(t instanceof n.LanguageModelError){if(await this.log(`Error message: ${t.message}`),await this.log(`Error code: ${t.code}`),t.code===n.LanguageModelError.NoPermissions.name)throw await this.log("user consent not given"),new Error("403 - Not authorized to use this model");if(t.code===n.LanguageModelError.Blocked.name)throw await this.log("quota limits exceeded"),new Error("429 - Quota limits exceeded");if(t.code===n.LanguageModelError.NotFound.name)throw await this.log("model does not exist anymore"),new Error("500 - model does not exist anymore")}throw t}}async logTrace(e,t){!0!==t?.isCancellationRequested&&await this.logger().log(e,s.LogImportance.low)}}t.AspireCopilotService=a;class c{chunk;constructor(e){this.chunk=e}}t.OpenAIChatCompletionEventArgs=c},7383(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.rejoinAspireSessionsAsync=t.rejoinAspireSessionAsync=t.stopAspireSessionAsync=t.stopAspireSessionsAsync=t.queryActiveAspireSessionsAsync=t.getAspireServiceAsync=void 0;const n=r(1398),o=r(4724),i=r(9768),s=r(680),a=r(5033),c=(0,r(7983).lazyLoad)(async()=>{{const e=n.extensions.getExtension(i.EXTENSION_ID);if(!e)throw new Error("Unable to find the extension: "+i.EXTENSION_ID);const t=e.exports.serviceBroker,r=await t.getProxy(o.default.aspireService);if(!r)throw new Error("Aspire service not available.");return r}});async function l(e,r){const n=await(0,t.getAspireServiceAsync)();return s.logger.log(`Stopping session ${e} for DCP ID: ${r}...`,a.LogImportance.high),await n.StopSessionAsync(r,e,!1)}async function u(e,r,n){const o=await(0,t.getAspireServiceAsync)();return s.logger.log(`Rejoining session ${e} for project ${n.projectPath}...`,a.LogImportance.high),await o.StartProjectAsync(r,{...n,sessionId:e})}t.getAspireServiceAsync=async()=>c(!0),t.queryActiveAspireSessionsAsync=async function(){const e=await(0,t.getAspireServiceAsync)(),r=await e.QuerySessionsAsync(null);if(!r)throw new Error("No Aspire session found");return r},t.stopAspireSessionsAsync=async function(e){for(const t of e)await l(t.sessionId,t.dcpId)},t.stopAspireSessionAsync=l,t.rejoinAspireSessionAsync=u,t.rejoinAspireSessionsAsync=async function(e){for(const t of e)await u(t.sessionId,t.dcpId,{disableLaunchProfile:!1,...t.projectInfo,sessionId:t.sessionId})}},8351(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrokeredServiceExportsRegistrar=t.BrokeredServiceExportsRegistrarState=void 0,t.BrokeredServiceExportsRegistrarState=class{registeredServices={}},t.BrokeredServiceExportsRegistrar=class{state;constructor(e){this.state=e}async registerExports(e,t){let r=this.state.registeredServices[e];void 0===r&&(r=[],this.state.registeredServices[e]=r),Array.isArray(t)?r.push(...t):r.push(t)}async getExports(e){const t=this.state.registeredServices[e];return t?[...t]:[]}}},4369(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertBuildResultToDiagnostic=t.parseBuildResultLine=t.parseBuildResult=void 0;const n=r(2613),o=r(1398);t.parseBuildResult=function(e){let t,r=[];const n=/^(?:\s*\d+>)?(\S.*)\((\d+|\d+,\d+|\d+,\d+,\d+,\d+)\)\s*:\s+((?:fatal +)?error|warning|info)\s+(\w+\d+)\s*:\s*(.*)$/gm;do{t=n.exec(e),t&&r.push(t)}while(t);return r},t.parseBuildResultLine=function(e){return/^(?:\s*\d+>)?(\S.*)\((\d+|\d+,\d+|\d+,\d+,\d+,\d+)\)\s*:\s+((?:fatal +)?error|warning|info)\s+(\w+\d+)\s*:\s*(.*)$/.exec(e)||/^(?:\s*\d+>)?(\S.*)(\s*):\s+((?:fatal +)?error|warning|info)\s+(\w+\d+)\s*:\s*(.*)$/.exec(e)},t.convertBuildResultToDiagnostic=function(e){const t=e[1].trim(),r=e[2]?.trim(),i=e[3],s=e[4],a=e[5];let c=0,l=0;if(r){const e=r.split(",");c=Math.max(0,parseInt(e[0],10)-1),e.length>1&&(l=Math.max(0,parseInt(e[1])-1))}const u=new o.Range(c,l,c,l);let d;switch(n(u,"Build diagnostic range could not be calculated. Attempted to parse value: "+r),i){case"error":default:d=o.DiagnosticSeverity.Error;break;case"warning":d=o.DiagnosticSeverity.Warning;break;case"info":d=o.DiagnosticSeverity.Information}const p=new o.Diagnostic(u,a,d);return p.code=s,[t,p]}},3119(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertBuildResultsToDiagnostics=t.reportBuildResultsToCSharpExtension=t.startBuildResultServiceAsync=t.isCSharpExtensionBuildResultServiceAvailable=void 0;const n=r(1398),o=r(4724),i=r(9768),s=r(2613),a=r(680),c=r(4369);async function l(){const e=n.extensions.getExtension(i.EXTENSION_ID);if(!e)throw new Error("Unable to find the extension: "+i.EXTENSION_ID);const t=e.exports.serviceBroker;return await t.getProxy(o.default.csharpExtensionBuildResultService)}function u(e){const t={};return e.forEach(e=>{const[r,n]=(0,c.convertBuildResultToDiagnostic)(e),o=t[r];o?o.push(n):t[r]=[n]}),t}t.isCSharpExtensionBuildResultServiceAvailable=async function(){return null!==await l()},t.startBuildResultServiceAsync=async function(){const e=await l();try{s(e),e?.buildStarted()}finally{e?.dispose()}},t.reportBuildResultsToCSharpExtension=async function(e){a.logger.log("Reporting build results to C# extension.");const t=(0,c.parseBuildResult)(e);if(0===t.length)return void a.logger.log("No problems found in the build");const r=u(t),n=await l();try{s(n),n?.reportBuildResult(r)}finally{n?.dispose()}},t.convertBuildResultsToDiagnostics=u},4043(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BuildService=void 0;const n=r(7589);t.BuildService=class{context;constructor(e){this.context=e}build(e,t){var r=new n.BuildActionOptions(n.BUILD);return(0,n.setSolutionBuildAction)(r,e)}rebuild(e,t){var r=new n.BuildActionOptions(n.BUILD,!0);return(0,n.setSolutionBuildAction)(r,e)}}},1367(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ComponentExportsState=t.ComponentExportsService=void 0;const n=r(2776),o=r(680),i=r(5033),s=r(9409),a=r(6928),c=r(1398),l=r(868);t.ComponentExportsService=class{state;constructor(e){this.state=e}getExports(e){return this.state.componentExports[e]??null}};class u{componentExports;constructor(e){this.componentExports=e}static async create(e,t){let r={};return r=await(0,n.loadOrCreateCachedValue)(e,"component-exports",async()=>await u.gatherComponentExports(t,r)),await u.gatherExtensionExports(r),new u(r)}static async gatherComponentExports(e,t){for(const r in e){const n=e[r];await u.tryGetExportsJson(r,n,t)}return t}static async gatherExtensionExports(e){const t=l.idsOfExtensionsAllowedToExtendCsDevKit.map(e=>c.extensions.getExtension(e));for(const r of t){if(!r)continue;const t=r.packageJSON;t.csdevkitExports&&(this.gatherExports(e,t.csdevkitExports,e=>a.join(r.extensionPath,e)),o.logger.log(`Read exports from ${r.id} in ${a}.`,i.LogImportance.low))}}static async tryGetExportsJson(e,t,r){try{const n=a.join(t,"exports.json"),c=await(0,s.readJsonFile)(n);this.gatherExports(r,c,e=>e.replace("$(ComponentPath)",t)),o.logger.log(`Read exports from ${e} in ${a}.`,i.LogImportance.low)}catch(t){o.logger.log(`No exports read from ${e}.`,i.LogImportance.low)}}static gatherExports(e,t,r){for(const n in t){let o=e[n];void 0===o&&(o=[],e[n]=o);let i=t[n];for(let e=0;e<i.length;e++)o.push(r(i[e]))}}}t.ComponentExportsState=u},4724(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(4084);class o{static environmentService=this.create(n.ServiceMoniker.create("Microsoft.VisualStudio.NoDelay.EnvironmentService","0.1"));static solutionFileService=this.create(n.ServiceMoniker.create("Microsoft.VisualStudio.SolutionFileService","0.1"));static buildService=this.create(n.ServiceMoniker.create("Microsoft.VisualStudio.BuildService","0.1"));static telemetrySessionUpdateService=this.create(n.ServiceMoniker.create("Microsoft.VisualStudio.Telemetry.TelemetrySessionUpdateService","0.1"));static diagnosticsService=this.create(n.ServiceMoniker.create("Microsoft.VisualStudio.DiagnosticsService","0.1"));static outOfProcServiceRegistration=Object.freeze(new n.ServiceJsonRpcDescriptor(n.ServiceMoniker.create("Microsoft.VisualStudio.OutOfProcServiceRegistration","0.1"),n.Formatters.Utf8,n.MessageDelimiters.HttpLikeHeaders));static solutionExplorerService=this.create(n.ServiceMoniker.create("Microsoft.VisualStudio.NoDelay.SolutionViewService","0.1"));static projectTreeProvider=this.create(n.ServiceMoniker.create("Microsoft.VisualStudio.ProjectSystem.ProjectTreeProvider","0.1"));static projectIconSourceService=this.create(n.ServiceMoniker.create("Microsoft.VisualStudio.CpsProjectIconSourceService","0.1"));static componentExportsService=this.create(n.ServiceMoniker.create("Microsoft.VisualStudio.ComponentExportsService","0.1"));static brokeredServiceExportsRegistrar=this.create(n.ServiceMoniker.create("Microsoft.VisualStudio.BrokeredServiceExportsRegistrar","0.1"));static errorReportingService=this.create(n.ServiceMoniker.create("Microsoft.VisualStudio.ErrorReportingService","0.1"));static activeDocumentsInformationService=this.create(n.ServiceMoniker.create("Microsoft.VisualStudio.ActiveDocumentsInformationService","0.1"));static logOutputChannelService=this.create(n.ServiceMoniker.create("Microsoft.VisualStudio.LogOutputChannelService","0.1"));static outputChannelService=this.create(n.ServiceMoniker.create("Microsoft.VisualStudio.OutputChannelService","0.1"));static tokenAcquisitionService=Object.freeze(new n.ServiceJsonRpcDescriptor(n.ServiceMoniker.create("Microsoft.VisualStudio.TokenAcquisitionService","0.1"),n.Formatters.Utf8,n.MessageDelimiters.HttpLikeHeaders));static projectQueryExecutionService=this.create(n.ServiceMoniker.create("Microsoft.VisualStudio.ProjectSystem.Query.Remoting.QueryExecutionService","0.3"));static projectInitializationStatusService=this.create(n.ServiceMoniker.create("Microsoft.VisualStudio.ProjectSystem.ProjectInitializationStatusService","0.1"));static nugetCommandsService=this.create(n.ServiceMoniker.create("Microsoft.VisualStudio.NuGetCommandsService","0.1"));static nugetSolutionRestoreService=Object.freeze(new n.ServiceJsonRpcDescriptor(n.ServiceMoniker.create("Microsoft.VisualStudio.NuGetSolutionRestoreService","0.1"),n.Formatters.Utf8,n.MessageDelimiters.HttpLikeHeaders));static aspireService=Object.freeze(new n.ServiceJsonRpcDescriptor(n.ServiceMoniker.create("Microsoft.VisualStudio.AspireService","0.1"),n.Formatters.Utf8,n.MessageDelimiters.HttpLikeHeaders,{protocolMajorVersion:3}));static aspireCopilotService=Object.freeze(new n.ServiceJsonRpcDescriptor(n.ServiceMoniker.create("Microsoft.VisualStudio.Aspire.CobraService","0.1"),n.Formatters.Utf8,n.MessageDelimiters.HttpLikeHeaders,{protocolMajorVersion:3}));static hotReloadLogger=this.create(n.ServiceMoniker.create("Microsoft.VisualStudio.Debugger.HotReloadLogger","0.1"));static hotReloadClientListener=this.create(n.ServiceMoniker.create("Microsoft.VisualStudio.Debugger.HotReloadClientListener","0.1"));static hotReloadOptionService=this.create(n.ServiceMoniker.create("Microsoft.VisualStudio.Debugger.HotReloadOptionService","0.1"));static hotReloadService=this.create(n.ServiceMoniker.create("Microsoft.VisualStudio.Debugger.HotReloadClientService","0.1"));static launchConfigurationService=Object.freeze(new n.ServiceJsonRpcDescriptor(n.ServiceMoniker.create("Microsoft.VisualStudio.LaunchConfigurationService",void 0),n.Formatters.Utf8,n.MessageDelimiters.HttpLikeHeaders,{protocolMajorVersion:3}));static debugTargetFrameworkService=Object.freeze(new n.ServiceJsonRpcDescriptor(n.ServiceMoniker.create("Microsoft.VisualStudio.ProjectSystem.DebugTargetFrameworkService","0.1"),n.Formatters.Utf8,n.MessageDelimiters.HttpLikeHeaders,{protocolMajorVersion:3}));static dotnetDebugConfigurationService=this.create(n.ServiceMoniker.create("Microsoft.VisualStudio.Debugger.DotnetDebugConfigurationService","0.1"));static vsCodeFileWatcherService=this.create(n.ServiceMoniker.create("Microsoft.VisualStudio.VsCodeFileWatcherService","0.1"));static templateService=this.create(n.ServiceMoniker.create("Microsoft.TemplateEngine.VSCode.TemplateService","0.1"));static csharpExtensionBuildResultService=this.create(n.ServiceMoniker.create("Microsoft.VisualStudio.CSharpExtension.BuildResultService","0.1"));static dotnetDebugLaunchService=Object.freeze(new n.ServiceJsonRpcDescriptor(n.ServiceMoniker.create("Microsoft.VisualStudio.DotnetDebugLaunchService","0.1"),n.Formatters.Utf8,n.MessageDelimiters.HttpLikeHeaders,{protocolMajorVersion:3}));static workspaceConfigurationOptionsService=this.create(n.ServiceMoniker.create("Microsoft.VisualStudio.OptionService","0.1"));static startupProjectService=this.create(n.ServiceMoniker.create("Microsoft.VisualStudio.StartupProjectService","0.1"));static vscodeAzureFunctionExtensionService=Object.freeze(new n.ServiceJsonRpcDescriptor(n.ServiceMoniker.create("Microsoft.VisualStudio.Debugger.VSCodeAzureFunctionExtensionService","0.1"),n.Formatters.Utf8,n.MessageDelimiters.HttpLikeHeaders,{protocolMajorVersion:3}));static aspireDebugSessionManagerService=this.create(n.ServiceMoniker.create("Microsoft.VisualStudio.Debugger.AspireDebugSessionManagerService","0.1"));static projectCacheStateService=this.create(n.ServiceMoniker.create("Microsoft.VisualStudio.ProjectCacheStateService","0.1"));static diagnosticCollectionService=this.create(n.ServiceMoniker.create("Microsoft.VisualStudio.DiagnosticCollectionService","0.1"));static create(e){return Object.freeze(new n.ServiceJsonRpcDescriptor(e,n.Formatters.MessagePack,n.MessageDelimiters.BigEndianInt32LengthHeader,{protocolMajorVersion:3}))}}t.default=o},5968(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticCollectionService=void 0;const n=r(1398),o=r(128),i=r(680);t.DiagnosticCollectionService=class{collectionName;innerCollection;hasPublished=!1;constructor(e){const t=e.activationArguments?.collectionName;if(!t)throw new Error("Missing ServiceActivationOptions.activationArguments.collectionName");this.collectionName=t,this.innerCollection=n.languages.createDiagnosticCollection(this.collectionName);const r=n.workspace.getConfiguration("dotnet").get("enablePublishIssuesToProblems"),s=new o.TelemetryEvent("publishIssuesToProblemSetting",i.telemetryService);s.addOrUpdateProperties({isEnabled:String(r)}),s.sendTelemetry()}clear(){this.innerCollection?.clear()}set(e,t){if(!n.workspace.getConfiguration("dotnet").get("enablePublishIssuesToProblems"))return void(this.hasPublished&&(this.innerCollection?.clear(),this.hasPublished=!1));let r;if(this.hasPublished=!0,t){r=[];for(const e of t){const t=new n.Range(e.line??0,e.column??0,e.endLine??e.line??0,e.endColumn??e.column??0),o=new n.Diagnostic(t,e.message,e.severity);o.code=e.code,o.source=e.source??this.collectionName,r.push(o)}}this.innerCollection?.set(n.Uri.file(e),r)}}},3430(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IDotnetDebugConfigurationServiceResultResolver=t.LaunchTargetToDebugConfigurationConverter=t.DotnetDebugConfigurationService=t.DEBUGGER_START_DEBUG_TELEMETRY_PROPERTY=t.DotnetDebugConfigurationServiceError=t.DebugTelemetryCode=t.DotnetDebugConfigurationServiceErrorKind=void 0;const n=r(1398),o=r(4724),i=r(2031),s=r(5059),a=r(8955),c=r(680),l=r(9768),u=r(9589),d=r(2963),p=r(7589),h=r(9431),f=r(1020),g=r(5659),m=r(857),v=r(481),y=r(6928),S=r(7815),w=r(440),E=r(9409),_=r(9768),b=r(8458),P="2.22.8";var T,C,I;!function(e){e.internalError="internalError",e.launchCancelled="launchCancelled",e.userError="userError"}(T||(t.DotnetDebugConfigurationServiceErrorKind=T={})),function(e){e[e.unknown=0]="unknown",e[e.launchCancelled=1]="launchCancelled",e[e.fileBasedApp=2]="fileBasedApp",e[e.invalidActivationId=32769]="invalidActivationId",e[e.noLaunchTargets=32770]="noLaunchTargets",e[e.invalidAzureFunctionExtension=32771]="invalidAzureFunctionExtension",e[e.invalidAzureFunctionExtensionVersion=32772]="invalidAzureFunctionExtensionVersion",e[e.invalidAzureFunctionExportAPI=32773]="invalidAzureFunctionExportAPI",e[e.azureFunctionStartFuncProcessFailed=32774]="azureFunctionStartFuncProcessFailed",e[e.projectInitializing=32775]="projectInitializing",e[e.noProjectsFound=32776]="noProjectsFound",e[e.noBrokeredService=36608]="noBrokeredService",e[e.missingExeBeforeBrowserTarget=36609]="missingExeBeforeBrowserTarget",e[e.failedToConvertLaunchTargetToConfig=36610]="failedToConvertLaunchTargetToConfig",e[e.noImplCustomLaunchTarget=36611]="noImplCustomLaunchTarget",e[e.noImplMultipleDebugEngines=36612]="noImplMultipleDebugEngines",e[e.noImplMultipleDebugLaunch=36613]="noImplMultipleDebugLaunch",e[e.noDebugConfig=36614]="noDebugConfig",e[e.failedToFindProjectForFile=36615]="failedToFindProjectForFile",e[e.noValidBrowser=36616]="noValidBrowser",e[e.missingCSharpExtensionExport=36617]="missingCSharpExtensionExport",e[e.unknownLaunchTarget=36618]="unknownLaunchTarget",e[e.csFileSDKNotSupported=36619]="csFileSDKNotSupported",e[e.noTaskProvider=36624]="noTaskProvider",e[e.missingExeBeforeBrowserInspectUriTarget=36625]="missingExeBeforeBrowserInspectUriTarget",e[e.invalidCSharpExtVersionAspire=36626]="invalidCSharpExtVersionAspire",e[e.invalidCSharpExtVersionAzFunc=36627]="invalidCSharpExtVersionAzFunc",e[e.noDebugEnginesProvided=36628]="noDebugEnginesProvided",e[e.failedToStartWasmDebugSession=36629]="failedToStartWasmDebugSession"}(C||(t.DebugTelemetryCode=C={})),function(e){e[e.dismissed=0]="dismissed",e[e.yes=1]="yes",e[e.no=2]="no",e[e.doNotShowAgain=3]="doNotShowAgain"}(I||(I={}));class O{kind;message;telemetryCode;constructor(e,t,r){this.kind=e,this.message=t,this.telemetryCode=r}}t.DotnetDebugConfigurationServiceError=O,t.DEBUGGER_START_DEBUG_TELEMETRY_PROPERTY="debuggerStartDebugTelemetry",t.DotnetDebugConfigurationService=class{serviceBroker;brokeredServiceHost;constructor(e,t){this.serviceBroker=e,this.brokeredServiceHost=t}async resolveDebugConfigurationWithLaunchConfigurationService(e,t,r){const i=await this.serviceBroker.getProxy(o.default.launchConfigurationService);if(i)try{e&&(e=y.normalize(e));let o=!1;if(e&&(0,E.endsWithInvariantIgnoreCase)(e,".cs")){const t=await(0,b.getProjectsFromFile)(e);if(t&&t.length>0){const r=await(0,b.selectProject)(t);if(void 0===r)return{configurations:[],error:new O(T.launchCancelled,s.debugProjectLaunchStrings.warnNoProjectSelected,C.launchCancelled)};e=y.normalize(r)}else o=!0}if(e&&o){const t=y.dirname(e);if(!await this.checkDotnetForDebugFileSupport(t))return{configurations:[],error:new O(T.userError,s.debugProjectLaunchStrings.errorDebugCSFileSupport,C.csFileSDKNotSupported)}}if(!o&&!await(0,w.waitForProjectsToLoad)(this.brokeredServiceHost))return{configurations:[],error:new O(T.userError,s.debugProjectLaunchStrings.projectInitializing,C.projectInitializing)};if(!o&&!e){const r=(0,h.getLaunchableProjectInfoObserver)().getCurrentProjects();if(0===r.length)return{configurations:[],error:new O(T.userError,s.debugProjectLaunchStrings.errorNoLaunchableProjects,C.noProjectsFound)};const n=await f.startupProjectService.getOrPickCurrentStartupProject();if(!n)return{configurations:[],error:new O(T.launchCancelled,s.debugProjectLaunchStrings.errorNoStartupProjectSelected,C.launchCancelled)};const o=r.find(e=>e.fullPath===n.fullPath);if(!o)return{configurations:[],error:new O(T.internalError,s.debugProjectLaunchStrings.errorStartupProjectNotFound,C.failedToFindProjectForFile)};t.name=g.DotnetDynamicConfigurationProvider.createDebugConfigurationName(o.displayName),e=y.normalize(o.fullPath)}if(!e)return{configurations:[],error:new O(T.userError,s.debugProjectLaunchStrings.errorNoProjectFound,C.failedToFindProjectForFile)};let a={};const l=Date.now();if(o||!await this.isMAUIProject(e)){let r=await this.buildProject(e);const o=Date.now();if(a.buildCompletedTimestamp=`0x${o.toString(16)}`,a.totalBuildTime=o-l,t.preLaunchTask||t.preRestartTask||(r||n.window.showWarningMessage(s.dotnetDebugConfigurationServiceStrings.warningMissingBuildTask),t.preRestartTask=r),!n.workspace.getConfiguration("dotnet.debug").get("suppressInvalidDebugTypeWarning")){const[t,r]=await this.getDebugType(e);if(!t)return{configurations:[],error:new O(T.userError,s.dotnetDebugConfigurationServiceStrings.warningInvalidDebugTypeDetails(r),C.launchCancelled)}}}if(e){const n=t.launchConfigurationId;if(n&&!await i.setActiveLaunchConfiguration(e,n,r))return{configurations:[],error:new O(T.userError,s.dotnetDebugConfigurationServiceStrings.invalidLaunchConfigurationId(n),C.invalidActivationId)}}const u=t.noDebug??!1,d="linux"!==m.platform().toLowerCase()&&!n.env.remoteName&&n.env.uiKind!==n.UIKind.Web,p=[];if(o){const t=n.extensions.getExtension(_.EXTENSION_ID);if(!t)throw new Error("Unable to find the extension: "+_.EXTENSION_ID);const r=await new Promise(async(r,n)=>{try{let o;const i=setTimeout(()=>{o?.kill(),n(new Error("Timeout while waiting for dotnet run-api response"))},1e4),s=y.dirname(e);c.logger.log(`dotnet run-api - starting process in: ${s}`),o=await t.exports.launchChildProcessAsync("dotnet",["run-api"],s,process.env),o.on("error",n),o.on("exit",(e,t)=>{clearTimeout(i),n(new Error(`dotnet run-api exited with ${e??t}`))}),v.createInterface(o.stdout).on("line",e=>{clearTimeout(i),c.logger.log(`dotnet run-api - received: ${e}`),r(e)});const a=JSON.stringify({$type:"GetRunCommand",EntryPointFileFullPath:e});c.logger.log(`dotnet run-api - sending: ${a}`),o.stdin.write(a+m.EOL),o.stdin.end()}catch(e){n(e)}}),o=JSON.parse(r);if("Error"===o.$type)throw new Error(`dotnet run-api failed: ${o.Message}`);if("RunCommand"!==o.$type)throw new Error(`dotnet run-api failed: Unexpected response type '${o.$type}'`);const i={executable:o.ExecutablePath,directory:o.WorkingDirectory,commandLineArguments:o.CommandLineArguments,environmentVariables:o.EnvironmentVariables,isConsoleApp:!0,isUsingSSL:!1,launchOptions:{noDebug:u,preferSSL:d},debugEngines:["coreclr"]};p.push(i)}else if(p.push(...await i.queryLaunchTargets(e,{noDebug:u,preferSSL:d},r)),0===p.length)return{configurations:[],error:new O(T.userError,s.debugProjectLaunchStrings.errorNoLaunchTargets(e),C.noLaunchTargets)};t.brokeredServicePipeName=await this.brokeredServiceHost.getBrokeredServiceServerPipeName();const S=await N.convert(t,p,a,e);return 0!==S.length?{configurations:S}:{configurations:[],error:new O(T.internalError,"Unable to convert launch target to a vscode debug configuration.",C.failedToConvertLaunchTargetToConfig)}}catch(e){if(e instanceof O)return{configurations:[],error:e};{let t;return"string"==typeof e?t=e:e instanceof Error&&(t=e.message),{configurations:[],error:new O(T.internalError,t,C.unknown)}}}finally{i?.dispose()}return{configurations:[],error:new O(T.internalError,"Unable to obtain services to resolve dotnet debug configurations.",C.noBrokeredService)}}async buildProject(e){if(!c.dotnetTaskProvider)throw new O(T.internalError,void 0,C.noTaskProvider);const t=await(0,d.dotnetSolutionBuildActionUsingTask)(p.BUILD,e,void 0,void 0,!0);if(t.taskName&&!await t.success){const t={title:s.promptStrings.yes},r={title:s.promptStrings.no,isCloseAffordance:!0},o={modal:!0,detail:s.dotnetDebugConfigurationServiceStrings.errorBuildDetails(e)};if(await n.window.showErrorMessage(s.dotnetDebugConfigurationServiceStrings.errorBuildTitle,o,t,r)!==t)throw new O(T.launchCancelled,void 0,C.launchCancelled)}return t.taskName}async isMAUIProject(e){let t=!1;if(n.extensions.getExtension(l.MAUI_EXTENSION_ID)){const r={context:"Projects",query:{$properties:["Path","Capabilities"],$filter:{ProjectsByCapabilities:["Android | Apple | Maui | UseMaui | UseMauiCore"]}}},n=await c.projectQueryableSpace.executeQuery(r);if(n&&n.Items){let r=e.replace(/[\\/]+/g,"/");t=n.Items.some(e=>{if(e&&e.Path){let t=e.Path.replace(/[\\/]+/g,"/");return"win32"!==m.platform()&&"darwin"!==m.platform()||(t=t.toLowerCase(),r=r.toLowerCase()),t===r}return!1})}}return t}async getDebugType(e){const t={context:"Projects",query:{$properties:["Id","Path","ActiveConfigurations"],ActiveConfigurations:{$properties:["Name","Properties"],Properties:{$properties:["Name","Value"],$filter:{PropertiesByName:[["DebugInfo"]]}}},$filter:{ProjectsByPath:[[e]]}}};try{const e=await c.projectQueryableSpace.executeQuery(t);if(e&&1===e.Items?.length){const t=e.Items[0];if(1===t.ActiveConfigurations?.length){const e=t.ActiveConfigurations[0];if(e.Properties?.length){const t=e.Properties.find(e=>"debuginfo"===e.Name?.toLowerCase()),r=t?.Value;if("full"===r?.toLocaleLowerCase()||"pdbonly"===r?.toLocaleLowerCase()){const e=new a.TelemetryActivity("DotnetDebugConfigurationService/getDebugType",c.telemetryService),t=await n.window.showWarningMessage(s.dotnetDebugConfigurationServiceStrings.warningInvalidDebugTypeTitle,{modal:!0,detail:s.dotnetDebugConfigurationServiceStrings.warningInvalidDebugTypeDetails(r)},{title:s.promptStrings.yes,isCloseAffordance:!0},{title:s.promptStrings.no,isCloseAffordance:!1},{title:s.promptStrings.doNotShowAgain,isCloseAffordance:!1});let o=I.dismissed;return t?.title===s.promptStrings.no?o=I.no:t?.title===s.promptStrings.doNotShowAgain?o=I.doNotShowAgain:t?.title===s.promptStrings.yes&&(o=I.yes),e.addOrUpdateMeasurements({dialogResponse:o}),e.sendTelemetry(),o===I.no?[!1,r]:(o===I.doNotShowAgain&&await n.workspace.getConfiguration("dotnet.debug").update("suppressInvalidDebugTypeWarning",!0),[!0,r])}}}}}catch(t){c.logger.log(`Error querying 'DebugType' for '${e}': ${t}`)}return[!0,""]}async checkDotnetForDebugFileSupport(e){const t=await(c.dotnetVersionManager?.getDotnetVersion(e,c.logger));return(t&&t.compareMain(l.NET_SDK_CSFILE_DEBUG_SUPPORT)>=0)??!1}};class N{static async convert(e,r,o,a){let c=[];for(let p of r){if(p.debugEngines.length>1)throw new O(T.internalError,s.dotnetDebugConfigurationServiceStrings.errorMultipleDebugEngines(p.debugEngines.join(",")),C.noImplMultipleDebugEngines);if(i.ExeLaunchTarget.is(p)){p.isConsoleApp&&(o.projectType="Console");const r=N.convertExeLaunchTarget(e,p);if(r.env&&r.env.DEBUG_SESSION_PORT&&r.env.DEBUG_SESSION_TOKEN&&(o.projectType="Aspire",r.isAspire=!0,!N.doesCSharpExtensionSupportAspire()))throw new O(T.userError,s.dotnetDebugConfigurationServiceStrings.errorAspireLaunchMinimumVersion(P),C.invalidCSharpExtVersionAspire);r[t.DEBUGGER_START_DEBUG_TELEMETRY_PROPERTY]=o,c.push(r)}else if(i.BrowserInspectUriTarget.is(p)){if(!(p.debugEngines&&p.debugEngines.length>0))throw new O(T.internalError,"Missing 'type' on WASMLaunchTarget.",C.failedToConvertLaunchTargetToConfig);{const r=p.debugEngines[0];if("blazorwasm"!==r)throw new O(T.internalError,`Unknown an WASMLaunchTarget type: ${r}.`,C.failedToConvertLaunchTargetToConfig);{const r=c.pop();if(!r)throw new O(T.internalError,"Expected an ExeLaunchTarget type before seeing a BrowserInspectUriTarget for resolving targets.",C.missingExeBeforeBrowserInspectUriTarget);{const[o,i,s]=a?await N.tryToUseVSDbgForMono(p.url,a):["",0,0];if(""!==o){const t={name:e.name+" Wasm Managed",type:"monovsdbg_wasm",request:"launch",monoDebuggerOptions:{ip:"127.0.0.1",port:i,platform:"browser",isServer:!0},cascadeTerminateToConfigurations:[e.name,e.name+" Browser"]};r.env||(r.env={}),r.env.DOTNET_MODIFIABLE_ASSEMBLIES="debug",p.inspectUri=o,p.port=s;const a=(0,d.getOpenedWorkspaceHelper)();if(!a)throw new O(T.internalError,"No workspace folder found for WASM debug session",C.failedToStartWasmDebugSession);if(!await n.debug.startDebugging(a,t))throw new O(T.internalError,"Failed to start WASM managed debug session",C.failedToStartWasmDebugSession)}r[t.DEBUGGER_START_DEBUG_TELEMETRY_PROPERTY].projectType="Blazorwasm";const l=await N.getBrowserType();if(!l)throw new O(T.internalError,"A valid browser is not installed.",C.noValidBrowser);if(u.gte(n.version,"1.85.0")){const t=N.convertBrowserInspectUriLaunchTarget(e,l,p);c.push({...r,serverReadyAction:{action:"startDebugging",config:t,pattern:"\\bNow listening on:\\s+https?://\\S+",killOnServerStop:!0}})}else c.push(N.convertBrowserInspectUriLaunchTarget(e,l,p))}}}}else if(i.BrowserLaunchTarget.is(p)){const e=c.pop();if(!e)throw new O(T.internalError,"Expected an ExeLaunchTarget type before seeing a BrowserLaunchTarget for resolving targets.",C.missingExeBeforeBrowserTarget);{const r=N.convertNoDebugBrowserLaunchTarget(p);e[t.DEBUGGER_START_DEBUG_TELEMETRY_PROPERTY].projectType="Web",c.push({...e,...r})}}else{if(!i.AzureFunctionsLaunchTarget.is(p)){if(i.CustomLaunchTarget.is(p)){for(var l in e.type=p.debugEngines[0],p.launchOptions&&(e.noDebug=p.launchOptions.noDebug),p.options)e[l]=p.options[l];return[e]}throw i.ErrorLaunchTarget.is(p)?new O(T.userError,p.userMessage):new O(T.internalError,"Unknown Launch Target type",C.unknownLaunchTarget)}{o.projectType="AzureFunctions",(0,S.validateCSharpExtensionVersionForAzFunctions)();const r=(0,S.getAzureFunctionAPIExports)();if(await r.isFuncCoreToolsInstalled(s.vsCodeAzureFunctionExtensionServiceStrings.errorFuncCoreToolsMissing)){const r=N.convertAzureFunctionsLaunchTarget(e,p);r[t.DEBUGGER_START_DEBUG_TELEMETRY_PROPERTY]=o,c.push(r)}}}}return c}static convertAzureFunctionsLaunchTarget(e,t){if(t.debugEngines.length<1)throw new O(T.internalError,s.dotnetDebugConfigurationServiceStrings.errorNoDebugEngine,C.noDebugEnginesProvided);const r=y.dirname(t.functionsApp);let n=["--no-build"];t.isUsingSSL&&!n.includes("--useHttps")&&n.push("--useHttps"),t.commandLineArguments&&(n=n.concat(t.commandLineArguments.split(" ")));const i=N.convertEnvironmentVariablesToObj(t.environmentVariables);return{...e,type:t.debugEngines[0],program:t.functionsApp,cwd:t.directory,checkForDevCert:t.isUsingSSL,launchService:{name:o.default.vscodeAzureFunctionExtensionService.moniker.name,version:o.default.vscodeAzureFunctionExtensionService.moniker.version},launchServiceData:{[S.VSCodeAzureFunctionExtensionLaunchDataKeys.buildPath]:r,[S.VSCodeAzureFunctionExtensionLaunchDataKeys.args]:n,[S.VSCodeAzureFunctionExtensionLaunchDataKeys.env]:i}}}static convertExeLaunchTarget(e,t){if(t.debugEngines.length<1)throw new O(T.internalError,s.dotnetDebugConfigurationServiceStrings.errorNoDebugEngine,C.noDebugEnginesProvided);let r="internalConsole";return t.isConsoleApp&&(r=this.getDebugOption("console","internalConsole"),"internalConsole"===r&&e.noDebug&&(r="integratedTerminal")),{...e,type:t.debugEngines[0],program:t.executable,args:t.commandLineArguments,cwd:t.directory,env:N.convertEnvironmentVariablesToObj(t.environmentVariables),console:r,checkForDevCert:t.isUsingSSL,launchSettingsProfile:null,debugConsoleVerbosity:this.getDebugOption("debugConsoleVerbosity","minimal")}}static convertBrowserInspectUriLaunchTarget(e,t,r){let n={name:e.name+" Browser",type:t,request:"launch",timeout:3e4,webRoot:"${workspaceFolder}",url:r.url,inspectUri:r.inspectUri,noDebug:e.noDebug,port:r.port,cascadeTerminateToConfigurations:[e.name,e.name+" Wasm Managed"]};return r.userDataDir&&(n.userDataDir=r.userDataDir),n}static convertNoDebugBrowserLaunchTarget(e){return{serverReadyAction:{action:"openExternally",pattern:e.pattern??"\\bNow listening on:\\s+https?://\\S+",uriFormat:e.url}}}static getDebugOption(e,t){const r=n.workspace.getConfiguration("csharp.debug");if(r){const t=r.get(e);if(t)return t}return t}static async getBrowserType(){const e=await n.extensions.getExtension(l.CSHARP_EXTENSION_ID),t=e?.packageJSON.version;if(!e||!t)throw new O(T.internalError,"Could not obtain exports from C# Extension ",C.missingCSharpExtensionExport);if(u.lt(t,l.CSHARP_EXTENSION_BLAZORWASM_REQUIRED_VERSION))throw new O(T.internalError,`The C# extension is installed, but has version ${t} which is incompatible with blazorwasm Debug Launch. Please update your C# Extension.`,C.missingCSharpExtensionExport);return await e.exports.determineBrowserType()}static async tryToUseVSDbgForMono(e,t){try{const r=await n.extensions.getExtension(l.CSHARP_EXTENSION_ID);return void 0===r||void 0===r.exports.tryToUseVSDbgForMono?["",0,0]:await r.exports.tryToUseVSDbgForMono(e,t)}catch(e){return c.logger.log(`Failed to initialize VSDbg for Mono: ${e}`),["",0,0]}}static convertEnvironmentVariablesToObj(e){let t={};if(Array.isArray(e)){for(let r=0;r<e.length;r++){const n=e[r];t[n.Key]=n.Value}return t}if(e instanceof Map){for(const r in e){const n=e.get(r);t[r]=n??""}return t}return e}static doesCSharpExtensionSupportAspire(){const e=n.extensions.getExtension(l.CSHARP_EXTENSION_ID),t=e?.packageJSON.version;return!!t&&u.gte(t,P)}}t.LaunchTargetToDebugConfigurationConverter=N,t.IDotnetDebugConfigurationServiceResultResolver=class{static resolve(e){const t=new a.TelemetryActivity("DotnetDebugConfigurationService/resolve",c.telemetryService);try{if(e.error){t.addOrUpdateProperties({succeeded:String(!1)});const r=e.error;switch(r.kind){case T.launchCancelled:return void t.addOrUpdateMeasurements({telemetryCode:C.launchCancelled});case T.internalError:case T.userError:t.addOrUpdateMeasurements({telemetryCode:r.telemetryCode??C.unknown});const e=r.message??s.debugProjectLaunchStrings.errorGenericFailedToGetConfigurations;return n.window.showErrorMessage(e),null;default:throw new Error(`Unexpected error kind: '${r.kind}'`)}}const r=e.configurations;if(0===r.length)return t.addOrUpdateProperties({succeeded:String(!1)}),t.addOrUpdateMeasurements({telemetryCode:C.noDebugConfig}),n.window.showErrorMessage(s.debugProjectLaunchStrings.errorNoConfigurations),null;if(1===r.length)return t.addOrUpdateProperties({succeeded:String(!0)}),r[0];if(2===r.length){const e=n.debug.onDidStartDebugSession(t=>{t.name===r[0].name&&(e.dispose(),n.debug.startDebugging(t.workspaceFolder,r[1],t))});return r[0]}if(r.length>2)return t.addOrUpdateProperties({succeeded:String(!1)}),t.addOrUpdateMeasurements({telemetryCode:C.noImplMultipleDebugLaunch}),n.window.showErrorMessage(s.debugProjectLaunchStrings.errorDebugMultipleConfigurations),null;throw new Error("Unexpected configuration array from IDotnetDebugConfigurationServiceResult.")}finally{t.sendTelemetry()}}}},459(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DotnetDebugLaunchCallback=void 0;const n=r(1398),o=r(4724),i=r(680),s=r(9768),a=r(9589);t.DotnetDebugLaunchCallback=class{brokeredServiceHost;launchTargetOptions;debugSession;constructor(e,t,r){this.brokeredServiceHost=e,this.launchTargetOptions=r,this.debugSession=t}async stopDebugging(){if(this.debugSession)try{let e=null;if(await async function(e){const t=n.extensions.getExtension(s.CSHARP_EXTENSION_ID),r=t?.packageJSON.version;return!!r&&(!!a.gte(r,s.CSHARP_EXTENSION_TERMINATE_ASPIRE_REQUIRED_VERSION)||(e&&i.logger.log(`Unable to terminate individual Aspire sessions. Please ensure you have a version C# extension greater than or equal to ${s.CSHARP_EXTENSION_TERMINATE_ASPIRE_REQUIRED_VERSION}.`),!1))}(!!this.launchTargetOptions?.aspireSession)&&(e=await this.brokeredServiceHost.serviceBroker.getProxy(o.default.aspireDebugSessionManagerService)),e&&this.launchTargetOptions?.aspireSession){const t=await e.terminateStandaloneSession(this.launchTargetOptions.aspireSession);return t&&(this.debugSession=void 0),t}return await n.debug.stopDebugging(this.debugSession),this.debugSession=void 0,!0}catch(e){i.logger.log(`DotnetDebugLaunchCallback.stopDebugging: ${e}`)}return!1}}},6369(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DotnetDebugLaunchService=void 0;const n=r(1398),o=r(3430),i=r(459),s=r(5659),a=r(680),c="DotnetDebugLaunchService_LaunchTargetId";t.DotnetDebugLaunchService=class{brokeredServiceHost;constructor(e){this.brokeredServiceHost=e}async launchTargets(e,t,r){return null!==await this.launchTargets2(e,t,r)}async launchTargets2(e,t,r){let l={name:e,type:"dotnet",request:"launch",brokeredServicePipeName:await this.brokeredServiceHost.getBrokeredServiceServerPipeName()};const u=await o.LaunchTargetToDebugConfigurationConverter.convert(l,t,{});if(u&&u.length>0){const l={configurations:u},d=o.IDotnetDebugConfigurationServiceResultResolver.resolve(l);if(d){const l=crypto.randomUUID();d[c]=l,r.aspireSession&&(d[o.DEBUGGER_START_DEBUG_TELEMETRY_PROPERTY].isAspireLaunch=!0,d.aspireSession=r.aspireSession);const u=new n.CancellationTokenSource,p=new Promise((e,t)=>{let r,o;const i=()=>{clearTimeout(r),o?.dispose(),o=void 0};u.token.onCancellationRequested(()=>{i(),t(new n.CancellationError)}),r=setTimeout(()=>{i(),t(new Error("Timed out waiting for debug session to start."))},6e4),o=n.debug.onDidStartDebugSession(t=>{"coreclr"!==t.type&&t.type!==s.DotnetDynamicConfigurationProvider.type||!(c in t.configuration)||t.configuration[c]!==l||(i(),e(t))})}),h=await n.debug.startDebugging(void 0,d);try{if(h){const e=await p;return new i.DotnetDebugLaunchCallback(this.brokeredServiceHost,e,r)}u.cancel(),a.logger.log(`[ERROR] vscode.debug.startDebugging failed for:\n${JSON.stringify(d,null,2)}`)}catch(r){a.logger.log(`[ERROR] Failed to start debugging session "${e}" for targets:\n${JSON.stringify(t,null,2)}\nError: ${r}`)}finally{u.dispose()}}}return null}}},2269(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorReportingService=void 0;const n=r(1398),o=r(5059),i=r(9768),s=r(4724),a=r(680),c=r(128),l=r(5404);t.ErrorReportingService=class{context;constructor(e){this.context=e}async reportError(e,t){var r=void 0;const u=[];if(t?.additionalLogFile&&u.push(o.promptStrings.openLog),t?.openSettingPage&&u.push(o.promptStrings.openSettings),t?.promptToDisableExtension){if(r=new c.TelemetryEvent("prompt-project-unsupported",a.telemetryService),!(0,l.doesCSharpExtensionSupportDeferral)())return r?.addOrUpdateProperties({deferralnotsupported:String(!0)}),void r?.sendTelemetry();u.push(o.promptStrings.disableExtensionButton)}if(t?.doNotShowInWorkspace){t?.promptToDisableExtension?u.push(o.promptStrings.doNotShowAgain):u.push(o.promptStrings.doNotShowInWorkspaceAgain);const e="suppressMessage."+t.doNotShowInWorkspace;if(this.context.workspaceState.get(e))return r?.addOrUpdateProperties({skipped:String(!0)}),void r?.sendTelemetry();r?.addOrUpdateProperties({skipped:String(!1)})}t?.openOutputChannel&&u.push(o.promptStrings.openLogChannel),r?.sendTelemetry();const d=await n.window.showInformationMessage(e,...u);if(t?.additionalLogFile&&d===o.promptStrings.openLog){const e=await n.workspace.openTextDocument(t?.additionalLogFile);e&&await n.window.showTextDocument(e)}else if(!t?.doNotShowInWorkspace||d!==o.promptStrings.doNotShowInWorkspaceAgain&&d!==o.promptStrings.doNotShowAgain){if(t?.openSettingPage&&d===o.promptStrings.openSettings)await n.commands.executeCommand("workbench.action.openSettings",t?.openSettingPage);else if(t?.openOutputChannel&&d===o.promptStrings.openLogChannel){const e=n.extensions.getExtension(i.EXTENSION_ID);if(!e)throw new Error("Unable to find the extension.");const r=await e.exports.serviceBroker.getProxy(s.default.logOutputChannelService,{activationArguments:{outputChannelName:t?.openOutputChannel}});r?.show()}else if(t?.promptToDisableExtension&&d===o.promptStrings.disableExtensionButton){const e=new c.TelemetryEvent("prompt-project-unsupported-action",a.telemetryService);e.addOrUpdateProperties({disableExtension:String(!0)}),e.sendTelemetry(),n.workspace.getConfiguration().update("dotnet.preferCSharpExtension",!0,n.ConfigurationTarget.Workspace)}}else{if(t?.promptToDisableExtension){const e=new c.TelemetryEvent("prompt-project-unsupported-action",a.telemetryService);e.addOrUpdateProperties({donotshowagain:String(!0)}),e.sendTelemetry()}const e="suppressMessage."+t.doNotShowInWorkspace;this.context.workspaceState.update(e,"0")}}async reportAndWaitResume(e){await n.window.showInformationMessage(e,"Resume")}}},2051(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HotReloadClientListener=t.ManagedHotReloadAvailabilityStatus=void 0;const n=r(9359);var o;!function(e){e[e.available=0]="available",e[e.interop=1]="interop",e[e.sqlClr=2]="sqlClr",e[e.minidump=3]="minidump",e[e.attach=4]="attach",e[e.moduleNotLoaded=5]="moduleNotLoaded",e[e.moduleReloaded=6]="moduleReloaded",e[e.notBuilt=8]="notBuilt",e[e.unsupportedEngine=9]="unsupportedEngine",e[e.notSupportedForClr64Version=10]="notSupportedForClr64Version",e[e.notAllowedForModule=11]="notAllowedForModule",e[e.optimized=12]="optimized",e[e.domainNeutralAssembly=13]="domainNeutralAssembly",e[e.reflectionAssembly=14]="reflectionAssembly",e[e.intelliTrace=15]="intelliTrace",e[e.notAllowedForRuntime=16]="notAllowedForRuntime",e[e.internalError=17]="internalError",e[e.unavailable=18]="unavailable",e[e.disabled=19]="disabled",e[e.notAllowedXPlat=20]="notAllowedXPlat"}(o||(t.ManagedHotReloadAvailabilityStatus=o={})),t.HotReloadClientListener=class{onSessionStarted(e,t){return(0,n.getHotReloadTracker)().startHotReload(e,t)}onHotReloadAvailabilityChanged(e,t){return(0,n.getHotReloadTracker)().onHotReloadAvailabilityChanged(e,t)}onSessionEnded(e){return(0,n.getHotReloadTracker)().endHotReload(e)}async onApplyChangesStarted(e){}reportHotReloadResult(e,t){return(0,n.getHotReloadTracker)().reportHotReloadResult(e)}}},1412(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hotReloadLogger=t.HotReloadLogger=t.HotReloadLogMessage=t.HotReloadDiagnosticErrorLevel=t.HotReloadVerbosity=void 0;const n=r(1398),o=r(5033),i=r(7983),s=r(2470);var a,c;!function(e){e[e.minimal=0]="minimal",e[e.detailed=1]="detailed",e[e.diagnostic=2]="diagnostic"}(a||(t.HotReloadVerbosity=a={})),function(e){e[e.info=0]="info",e[e.warning=1]="warning",e[e.error=2]="error"}(c||(t.HotReloadDiagnosticErrorLevel=c={})),t.HotReloadLogMessage=class{verbosity;instanceId;message;errorLevel;projectName;variant;constructor(e,t,r,n){this.verbosity=e,this.message=t,this.instanceId=r??0,this.errorLevel=n??c.info}};class l{outputChannel;logger;logSubscribers=[];constructor(){this.outputChannel=(0,i.lazyLoad)(()=>n.window.createOutputChannel(".NET Hot Reload",{log:!0})),this.logger=(0,i.lazyLoad)(()=>new o.Logger(this.outputChannel()))}subscribe(e){return this.logSubscribers.push(e),new n.Disposable(()=>{const t=this.logSubscribers.indexOf(e);t>-1&&this.logSubscribers.splice(t,1)})}notifySubscribers(e){for(const t of this.logSubscribers)t(e)}shouldLogMessage(e){switch((0,s.getHotReloadOptionService)().getVerbosity()){case"minimal":return e===a.minimal;case"detailed":return e===a.minimal||e===a.detailed;default:return!0}}async log(e,t){if(!this.shouldLogMessage(e.verbosity))return;let r="";e.projectName&&(r+=` ${e.projectName}`,e.variant&&(r+=` (${e.variant})`),r+=":"),0!==e.instanceId&&(r+=`${e.instanceId}:`),r+=` ${e.message}`;let n=!1;switch(e.errorLevel){case c.info:this.outputChannel().info(r);break;case c.warning:this.outputChannel().warn(r);break;case c.error:this.outputChannel().error(r),n=!0}this.notifySubscribers(r),n&&this.outputChannel().show()}}t.HotReloadLogger=l,t.hotReloadLogger=new l},2470(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.listenToHotReloadConfigUpdates=t.resetHotReloadOptionServiceForTesting=t.setHotReloadOptionServiceForTesting=t.getHotReloadOptionService=t.HotReloadOptionService=void 0;const n=r(1398),o=r(5059),i=r(1412);class s{enabled=!1;verbosity="minimal";hotReloadOnSave=!0;async isHotReloadEnabled(e,t){return this.enabled}updateConfig(e){this.enabled=e.enabled??!1,this.verbosity=e.verbosity??"minimal",this.hotReloadOnSave=e.hotReloadOnSave??!0}getIsHotReloadEnabled(){return this.enabled}getIsHotReloadOnSave(){return this.hotReloadOnSave}getVerbosity(){return this.verbosity}isSettingsEnabled(){return this.enabled}async getRudeEditSettingsAsync(e){return{automaticRestartEnabled:!1,agentRestartEnabled:!0}}async beforeRestartProjectsAsync(e,t,r,i){const s={title:o.promptStrings.rebuildAndApplyChanges},a={title:o.promptStrings.continueEditing,isCloseAffordance:!0},c=o.dotnetDebugConfigurationServiceStrings.hotReloadChangeNotSupportDetails(t,e,r),l=await n.window.showWarningMessage(o.dotnetDebugConfigurationServiceStrings.hotReloadNotSupportedTitle,{modal:!0,detail:c},s,a);return void 0!==l&&l===s}async notifyRudeEditRebuildInProgressAsync(e,t){const r=new i.HotReloadLogMessage(i.HotReloadVerbosity.minimal,e?o.dotnetDebugConfigurationServiceStrings.hotReloadRebuildInProgress:o.dotnetDebugConfigurationServiceStrings.hotReloadRebuildCompleted);await i.hotReloadLogger.log(r)}}t.HotReloadOptionService=s;let a=c();function c(){const e=new s;return u(e),e}function l(){u(a)}function u(e){const t=n.workspace.getConfiguration("csharp.debug"),r=n.workspace.getConfiguration("csharp.experimental.debug").get("hotReload")??!1,o=t.get("hotReloadVerbosity")??"minimal",i=t.get("hotReloadOnSave")??!0;e.updateConfig({enabled:r,verbosity:o,hotReloadOnSave:i})}t.getHotReloadOptionService=function(){return a},t.setHotReloadOptionServiceForTesting=function(e){a=e},t.resetHotReloadOptionServiceForTesting=function(){a=c()},t.listenToHotReloadConfigUpdates=function(){n.workspace.onDidChangeConfiguration(l),l()}},1857(e,t){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.HotReloadResult=void 0,function(e){e[e.applied=0]="applied",e[e.noChanges=1]="noChanges",e[e.restartRequired=2]="restartRequired",e[e.errorEdits=3]="errorEdits",e[e.applyUpdatesFailure=4]="applyUpdatesFailure",e[e.partiallyApplied=5]="partiallyApplied"}(r||(t.HotReloadResult=r={}))},2031(e,t){"use strict";var r,n,o,i,s,a;Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorLaunchTarget=t.CustomLaunchTarget=t.AzureFunctionsLaunchTarget=t.BrowserInspectUriTarget=t.BrowserLaunchTarget=t.ExeLaunchTarget=void 0,function(e){e.is=function(e){return"executable"in e&&"directory"in e&&"commandLineArguments"in e&&"environmentVariables"in e&&"isConsoleApp"in e&&"isUsingSSL"in e}}(r||(t.ExeLaunchTarget=r={})),function(e){e.is=function(e){return"url"in e}}(n||(t.BrowserLaunchTarget=n={})),function(e){e.is=function(e){return"url"in e&&"inspectUri"in e}}(o||(t.BrowserInspectUriTarget=o={})),function(e){e.is=function(e){return"functionsApp"in e&&"directory"in e&&"environmentVariables"in e&&"isUsingSSL"in e}}(i||(t.AzureFunctionsLaunchTarget=i={})),function(e){e.is=function(e){return"options"in e}}(s||(t.CustomLaunchTarget=s={})),function(e){e.is=function(e){return"userMessage"in e&&"details"in e}}(a||(t.ErrorLaunchTarget=a={}))},7664(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SolutionRestoreCompletedEventArgs=t.SolutionRestoreStartedEventArgs=void 0,t.SolutionRestoreStartedEventArgs=class{solutionFilePath;pid;constructor(e,t){this.solutionFilePath=e,this.pid=t}},t.SolutionRestoreCompletedEventArgs=class{result;solutionFilePath;constructor(e,t){this.solutionFilePath=e,this.result=t}}},3188(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.workspaceConfigurationOptionsService=void 0;const n=r(1398);t.workspaceConfigurationOptionsService=new class{getOption(e,t){return n.workspace.getConfiguration(e).get(t)}getStringOption(e,t){const r=this.getOption(e,t);if(void 0!==r&&"string"==typeof r)return r;throw new Error(`Unable to find a string from ${t} in ${e}`)}getNumberOption(e,t){const r=this.getOption(e,t);if(void 0!==r&&"number"==typeof r)return r;throw new Error(`Unable to find a number from ${t} in ${e}`)}getBooleanOption(e,t){const r=this.getOption(e,t);if(void 0!==r&&"boolean"==typeof r)return r;throw new Error(`Unable to find a boolean from ${t} in ${e}`)}getJSONStringSection(e,t){const r=this.getOption(e,t);if(void 0!==r)return JSON.stringify(r);throw new Error(`Unable to find anything from ${t} in ${e}`)}}},3247(e,t){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.ProjectErrorState=void 0,function(e){e[e.notSupported=1]="notSupported",e[e.missing=2]="missing",e[e.accessDenied=3]="accessDenied",e[e.corrupted=4]="corrupted",e[e.otherError=10]="otherError"}(r||(t.ProjectErrorState=r={}))},7224(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProjectQueryableSpace=void 0;const n=r(4084),o=r(680),i=r(4724),s=r(9409),a=r(5033);t.ProjectQueryableSpace=class{serviceBroker;queryExecutionServiceProxy;constructor(e){this.serviceBroker=e,this.queryExecutionServiceProxy=(0,s.lazyPromiseLambda)(()=>this.initializeProxy())}async dispose(){if(this.queryExecutionServiceProxy){const e=await this.queryExecutionServiceProxy;e?.dispose()}}async initializeProxy(){return await this.serviceBroker.getProxy(i.default.projectQueryExecutionService)}async executeQuery(e,t){return await o.logger.watch("ExecuteQuery with project query execution service",async()=>{const r=JSON.stringify(e),n=await this.queryExecutionServiceProxy;try{if(n){const e=await n.ExecuteQueryAsync(r,t);return JSON.parse(e)}}catch(e){throw new Error("Exception while talking to proxy: "+e)}},{importance:a.LogImportance.low})}async executeAction(e,t){return await o.logger.watch("ExecuteQuery action with project query execution service",async()=>{const r=JSON.stringify(e),n=await this.queryExecutionServiceProxy;try{if(n){const e=await n.ExecuteRemoteExecutableAsync(r,t);return JSON.parse(e)}}catch(e){throw new Error("Exception while talking to proxy: "+e)}},{importance:a.LogImportance.low})}async subscribeQuery(e,t){return await o.logger.watch("Subscribe with project query",async()=>{const r=new c(t),n=JSON.stringify(e),o=await this.queryExecutionServiceProxy;try{if(o)return await o.SubscribeQueryResultsAsync(n,r)}catch(e){throw new Error("Exception while talking to proxy: "+e)}},{importance:a.LogImportance.low})}};class c extends n.Observer{resultsReceiver;constructor(e){super(t=>{e.onNext(JSON.parse(t))},t=>{t?(o.logger.log("queryCompleted Failed",a.LogImportance.low),o.logger.log(t,a.LogImportance.low),e.onError(t)):(o.logger.log("queryCompleted",a.LogImportance.low),e.onCompleted())}),this.resultsReceiver=e}}},9872(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FilteredStartupProjectService=void 0,t.FilteredStartupProjectService=class{service;observers;currentStartupProjectPath;unsubscribe;constructor(e){this.service=e,this.observers=[]}onNext(e){let t=e?.fullPath;if(t!==this.currentStartupProjectPath){this.currentStartupProjectPath=t;for(const e of this.observers)e.onNext(t)}}onCompleted(){for(const e of this.observers)e.onCompleted()}onError(e){for(const t of this.observers)t.onError(e)}subscribe(e){return this.observers.push(e),1===this.observers.length?this.unsubscribe=this.service.subscribe(this):e.onNext(this.currentStartupProjectPath),()=>{this.observers=this.observers.filter(t=>t!==e),0===this.observers.length&&(this.unsubscribe?.(),this.unsubscribe=void 0)}}async pickStartupProject(){let e=await this.service.pickStartupProject();return e?.fullPath}getCurrentStartupProject(){return this.service.getCurrentStartupProject()?.fullPath}async getOrPickCurrentStartupProject(){let e=await this.service.getOrPickCurrentStartupProject();return e?.fullPath}}},2e3(e,t){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.InvocationSource=void 0,function(e){e[e.solutionExplorer=0]="solutionExplorer",e[e.commandPalette=1]="commandPalette",e[e.newFileMenu=2]="newFileMenu"}(r||(t.InvocationSource=r={}))},7337(e,t){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.VsCodeFileWatcherEventArgs=t.FileSystemWatcherChangeTypes=void 0,function(e){e[e.created=1]="created",e[e.deleted=2]="deleted",e[e.changed=4]="changed"}(r||(t.FileSystemWatcherChangeTypes=r={})),t.VsCodeFileWatcherEventArgs=class{watcherChangeType;fsPath;constructor(e,t){this.watcherChangeType=e,this.fsPath=t}}},5611(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogOutputChannelState=void 0;const n=r(1398),o=r(680),i=r(5033);class s{outputChannel;constructor(e){this.outputChannel=e}appendError(e){this.outputChannel?this.outputChannel.error(e):o.logger.log(e,i.LogImportance.high)}appendWarning(e){this.outputChannel?this.outputChannel.warn(e):o.logger.log(e,i.LogImportance.normal)}appendLine(e){this.outputChannel?this.outputChannel.appendLine(e):o.logger.log(e)}show(){this.outputChannel?.show(!0)}}class a{outputChannels=new Map;constructor(){}static create(){return new a}createOutputChannel(e){const t=e.activationArguments?.outputChannelName;if(t){let e=this.outputChannels.get(t);return e||(e=n.window.createOutputChannel(t,{log:!0}),this.outputChannels.set(t,e)),new s(e)}return new s}}t.LogOutputChannelState=a},7256(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NuGetDotnetCommandsService=void 0;const n=r(9589),o=r(6928),i=r(5033),s=r(1760),a=r(1858),c=r(5059),l=r(9409);class u{outputChannel;static interactiveSwitch="--interactive";static includePrereleaseSwitch="--include-prerelease";static prereleaseSwitch="--prerelease";static minRequiredDotnetVersion="8.0.200";outputLogger;constructor(e){this.outputChannel=e,this.outputLogger=(0,l.lazyPromiseLambda)(async()=>new i.NuGetLogger(await this.outputChannel))}async checkPrerequisites(e){const t=e?(0,o.dirname)(e):void 0,r=new i.OutputMonitor;await(0,s.dotnetCommand)(a.DotnetCommand.dotnetVersion,t,["--version"],r,!0);const l=r.getOutput();if(!l)return{isPrerequisiteMet:!1};const d=n.clean(l);return d?n.gte(d,u.minRequiredDotnetVersion)?{isPrerequisiteMet:!0,value:d}:{isPrerequisiteMet:!1,value:d,message:c.nugetStrings.missingDotnetSdkError,actionText:c.nugetStrings.missingDotnetSdkActionMessage}:{isPrerequisiteMet:!1,message:c.nugetStrings.missingDotnetSdkError,actionText:c.nugetStrings.missingDotnetSdkActionMessage}}async addPackage(e,t,r){return this.executeAddPackage(e,t,r,a.DotnetCommand.nugetAddPackage)}async updatePackage(e,t,r){return this.executeAddPackage(e,t,r,a.DotnetCommand.nugetUpdatePackage)}async executeAddPackage(e,t,r,n){if(!e||!t||!r)return!1;const i=e?(0,o.dirname)(e):void 0,c=["add",e,"package",t,"-v",r,u.interactiveSwitch];return await(0,s.dotnetCommand)(a.DotnetCommand.nugetAddPackage,i,c,await this.outputLogger),!0}async removePackage(e,t){if(!e||!t)return!1;const r=e?(0,o.dirname)(e):void 0,n=["remove",e,"package",t];return await(0,s.dotnetCommand)(a.DotnetCommand.nugetRemovePackage,r,n,await this.outputLogger),!0}async packageSearch(e,t,r){const c=["package","search",t,"--format","json",u.interactiveSwitch];r&&c.push(u.prereleaseSwitch);const l=e?(0,o.dirname)(e):void 0,d=new i.JsonOutputMonitor(await this.outputLogger);await(0,s.dotnetCommand)(a.DotnetCommand.nugetPackageSearch,l,c,d,!0);const p=await this.parseJsonFromOutput(d,"packageSearch");if(p){const e=new Map;return p.searchResult?.forEach(t=>{t.packages.map(e=>({id:e.id,latestVersion:e.latestVersion})).forEach(t=>{const r=e.get(t.id),o=n.coerce(t.latestVersion),i=n.coerce(r?.version);(!r||o&&i&&n.gt(o,i))&&e.set(t.id,t)})}),Array.from(e.values())}return[]}async getVersions(e,t,r){const n=["package","search",t,"--exact-match","--format","json",u.interactiveSwitch];r&&n.push(u.prereleaseSwitch);const c=e?(0,o.dirname)(e):void 0,l=new i.JsonOutputMonitor(await this.outputLogger);await(0,s.dotnetCommand)(a.DotnetCommand.nugetGetVersions,c,n,l,!0);const d=await this.parseJsonFromOutput(l,"getVersions");if(d){const e=d.version??0;return d.searchResult.reduce((t,r)=>t.concat(r.packages.map(t=>this.mapVersionOutput(t,e))),[])}return[]}async getInstalledPackages(e){return this.listInstalledPackages(e,!1)}async getOutdatedPackages(e,t){return this.listInstalledPackages(e,!0,t)}async listInstalledPackages(e,t,r=!1){let c=a.DotnetCommand.nugetListInstalledPackages;const l=["list",e,"package","--format","json",u.interactiveSwitch];t&&(l.push("--outdated"),c=a.DotnetCommand.nugetListOutdatedPackages,r&&l.push(u.includePrereleaseSwitch));const d=e?(0,o.dirname)(e):void 0,p=new i.JsonOutputMonitor(await this.outputLogger);await(0,s.dotnetCommand)(c,d,l,p,!0);const h=await this.parseJsonFromOutput(p,t?"getOutdatedPackages":"getInstalledPackages");if(h){const e=new Map;return h.projects?.forEach(r=>{r.frameworks?.forEach(r=>{r.topLevelPackages?.filter(e=>!t||this.isVersion(e.latestVersion)).map(e=>({id:e.id,version:e.requestedVersion})).forEach(t=>{const r=e.get(t.id);r&&!n.gt(t.version,r.version)||e.set(t.id,t)})})}),Array.from(e.values())}return[]}async parseJsonFromOutput(e,t){try{const t=e.getOutput();return JSON.parse(t)}catch{const e=await this.outputLogger;return void e?.log(c.nugetStrings.invalidJsonError(t))}}mapVersionOutput(e,t){let r;return r=1===t?{id:e.id,version:e.latestVersion}:2===t?{id:e.id,version:e.version}:{id:e.id,version:e.latestVersion},r}isVersion(e){const t=e?.trim();return t&&!isNaN(t.charAt(0))}}t.NuGetDotnetCommandsService=u},6831(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NuGetSolutionRestoreState=t.NuGetSolutionRestoreService=t.showNuGetOutput=void 0;const n=r(4084),o=r(4434),i=r(1398),s=r(5033),a=r(9687),c=r(1858),l=r(680),u=r(1760),d=r(5059),p=r(7664),h=r(4628),f=r(4724),g=r(1398);let m;t.showNuGetOutput=function(){m?.show()};class v extends o.EventEmitter{state;rpcEventNames=["solutionRestoreStarted","solutionRestoreCompleted"];startedHandler;completedHandler;constructor(e,t){super(),this.state=e,t.activationArguments?.needEvents&&(this.startedHandler=e=>this.emit("solutionRestoreStarted",e),this.completedHandler=e=>this.emit("solutionRestoreCompleted",e),this.state.on("solutionRestoreStarted",this.startedHandler),this.state.on("solutionRestoreCompleted",this.completedHandler))}dispose(){this.startedHandler&&this.state.off("solutionRestoreStarted",this.startedHandler),this.completedHandler&&this.state.off("solutionRestoreCompleted",this.completedHandler)}async setState(){const e=l.environmentStateManager?.getLatestEnvironmentState();if(!e)throw new Error("Environment state is undefined");this.state.setState(e)}async restoreSolution(){return await this.state.restoreSolution()}async nominateProject(e){return await this.state.nominateProject(e)}isNominationOnGoing(){return this.state.isNominationOnGoing()}}t.NuGetSolutionRestoreService=v;class y extends o.EventEmitter{diagnosticCollection;rootDirectory;solutionFile;totalProjects;projectsNominatedSoFar;cachedRestoreResult;outputChannel;outputLogger;restoreCount;environmentVersion;initialized=!1;statusServiceProxy;statusSubscription;constructor(e,t){super(),this.diagnosticCollection=t,this.outputChannel=e,this.outputLogger=new s.NuGetLogger(this.outputChannel),this.restoreCount=0,m=e}static create(e,t){return new y(e,t)}dispose(){try{this.statusSubscription?.dispose(),this.statusServiceProxy?.dispose()}catch{}}async init(e){if(!this.initialized)try{const t=await e.getProxy(f.default.projectInitializationStatusService);if(t){this.statusServiceProxy=t;const e=new n.Observer(e=>{this.onProjectInitializationCompleted(e)},e=>{l.logger.log(`NuGet restore: Failed to monitor project initialization status: ${e}`)});this.statusSubscription=await t.subscribeInitializationCompletion(e)}this.initialized=!0}catch(e){l.logger.log(`NuGet restore: Failed to subscribe to project initialization status: ${e}`)}}setState(e){0!==e.solutions.length&&this.solutionFile===e.solutions[0]||this.diagnosticCollection.clear(),this.projectsNominatedSoFar=new Set,this.solutionFile=e.solutions[0],this.rootDirectory=(0,a.getActiveWorkspaceRoot)(),this.totalProjects=e.projects.filter(e=>e.projectId.fullPath.endsWith(".csproj")).length,this.environmentVersion=e.version,this.cachedRestoreResult=void 0}async restoreSolution(){if(!this.solutionFile)return l.logger.log("No solution to run NuGet restore"),!1;if(this.cachedRestoreResult)try{return await this.cachedRestoreResult,!0}catch(e){return!1}try{l.logger.log("Starting NuGet restore for the solution.",s.LogImportance.low);var e=!1,t=["restore",this.solutionFile,"--interactive"];return 1===++this.restoreCount&&t.push("--nodereuse:false"),this.outputLogger.clear(),this.diagnosticCollection.clear(),this.cachedRestoreResult=(0,u.dotnetCommand)(c.DotnetCommand.restore,this.rootDirectory,t,this.outputLogger,!0,t=>{this.emit("solutionRestoreStarted",new p.SolutionRestoreStartedEventArgs(this.solutionFile,t)),e=!0}),await this.cachedRestoreResult,e&&this.emit("solutionRestoreCompleted",new p.SolutionRestoreCompletedEventArgs(this.solutionFile,!0)),l.logger.log("Completed NuGet restore.",s.LogImportance.low),!0}catch(e){return this.emit("solutionRestoreCompleted",new p.SolutionRestoreCompletedEventArgs(this.solutionFile,!1)),this.reportSolutionRestoreFailureDiagnostic(),l.logger.log(`Completed NuGet restore with error: ${e}`),!1}finally{const e=this.outputLogger.diagnosticsPerFile;if(i.workspace.getConfiguration("dotnet").get("enablePublishIssuesToProblems"))for(var r in e)this.diagnosticCollection.set(g.Uri.file(r),e[r]);this.cachedRestoreResult=void 0}}async nominateProject(e){return this.projectsNominatedSoFar&&!this.areAllProjectsNominated()?(this.projectsNominatedSoFar.add(e),!0):await this.restoreSolution()}isNominationOnGoing(){return!!this.cachedRestoreResult}areAllProjectsNominated(){return this.projectsNominatedSoFar?.size===this.totalProjects}onProjectInitializationCompleted(e){void 0!==this.environmentVersion&&e.environmentStateVersion>=this.environmentVersion&&(l.logger.log(`Project initialization complete for environment version ${e.environmentStateVersion}. ${e.projectsFailedCount??0} failed project(s). Future nominations will trigger restore.`,s.LogImportance.low),this.projectsNominatedSoFar=void 0)}reportSolutionRestoreFailureDiagnostic(){if(!this.solutionFile)return;const e=i.Uri.file(this.solutionFile),t=new i.Diagnostic(new i.Range(0,0,0,0),d.NuGet.restoreFailure,i.DiagnosticSeverity.Error);t.source="NuGet",t.code={value:d.nugetStrings.viewlogs,target:i.Uri.parse(`command:${h.default.showNuGetOutput}`)},this.diagnosticCollection.set(e,[t])}}t.NuGetSolutionRestoreState=y},1967(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OutputChannelState=void 0;const n=r(1398);class o{outputChannel;constructor(e){this.outputChannel=e}append(e){this.outputChannel.append(e)}appendLine(e){this.outputChannel.appendLine(e)}show(e){this.outputChannel.show(e)}clear(){this.outputChannel?.clear()}}class i{outputChannels=new Map;constructor(){}static create(){return new i}createOutputChannel(e){const t=e.activationArguments?.outputChannelName;if(!t)throw new Error("Missing ServiceActivationOptions.activationArguments.outputChannelName");let r=this.outputChannels.get(t);return r||(r=n.window.createOutputChannel(t),this.outputChannels.set(t,r)),new o(r)}}t.OutputChannelState=i},8189(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProjectCacheStateService=void 0,t.ProjectCacheStateService=class{context;current;constructor(e){this.context=e,this.current=this.context.workspaceState.get("projectsCacheState",{})}getAll(){return{...this.current}}async set(e,t){t?this.current[e]=t:delete this.current[e],await this.context.workspaceState.update("projectsCacheState",this.current)}}},7505(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SolutionSyncService=void 0;const n=r(9896),o=r(1398),i=r(680),s=r(5811),a=r(9409),c=r(4724),l=r(6928);async function u(e,t,r){return((0,a.pathHasExtension)(e,".csproj")?await(0,s.findCsprojFiles)(e):await(0,s.getKnownProjectFilesInFolder)(e,r)).map(r=>({oldPath:r,newPath:l.join(t,l.relative(e,r))}))}async function d(e,t){return(await(0,s.findCsprojFiles)(t)).map(r=>({oldPath:l.join(e,l.relative(t,r)),newPath:r}))}async function p(e,t){if((0,a.pathHasExtension)(e,".csproj")||(0,a.pathHasExtension)(t,".csproj"))return!0;try{return(await n.promises.stat(t)).isDirectory()}catch{return""===l.extname(e)&&""===l.extname(t)}}t.SolutionSyncService=class{serviceBroker;getProjectQueryableSpace;getWorkspaceFileWatcher;getOpenedSolution;pendingRenamesByItemPath=new Map;pendingRenamesByProjectPath=new Map;pendingOrphanChangesByItemPath=new Map;pendingFolderRenames=new Map;pendingDeletesByItemPath=new Map;pendingDeletesByProjectPath=new Map;disposables=[];constructor(e,t,r,n){this.serviceBroker=e,this.getProjectQueryableSpace=t,this.getWorkspaceFileWatcher=r,this.getOpenedSolution=n,this.disposables.push(o.workspace.onWillRenameFiles(e=>this.onWillRenameFiles(e)),o.workspace.onDidRenameFiles(e=>this.onDidRenameFiles(e)),o.workspace.onDidCreateFiles(e=>this.onDidCreateFiles(e)),o.workspace.onWillDeleteFiles(e=>this.onWillDeleteFiles(e)),o.workspace.onDidDeleteFiles(e=>this.onDidDeleteFiles(e)))}dispose(){for(const e of this.disposables)e.dispose();this.disposables.length=0,this.pendingRenamesByItemPath.clear(),this.pendingRenamesByProjectPath.clear(),this.pendingOrphanChangesByItemPath.clear(),this.pendingFolderRenames.clear(),this.pendingDeletesByItemPath.clear(),this.pendingDeletesByProjectPath.clear()}onWillRenameFiles(e){this.getOpenedSolution()&&e.waitUntil(this.collectPendingRenames(e.files))}createBatchSolutionFileServiceProxyGetter(){let e,t=!1;return{get:async()=>(t||(t=!0,e=await this.serviceBroker.getProxy(c.default.solutionFileService)??void 0),e),dispose:()=>{e?.dispose()}}}async collectPendingRenames(e){const t=this.getProjectQueryableSpace(),r=await Promise.all(e.map(async e=>({oldPath:e.oldUri.fsPath,newPath:e.newUri.fsPath,isFolderRename:!(0,a.pathHasExtension)(e.oldUri.fsPath,".csproj"),projectRenames:await u(e.oldUri.fsPath,e.newUri.fsPath,t)})));"win32"===process.platform&&await Promise.all(r.map(async e=>{e.isFolderRename&&e.projectRenames.length>0&&await async function(e,t){const r=new Set,n=await Promise.all(e.map(e=>(0,s.getProjectBuildOutputDirs)(e,t)));let a=!1;for(const e of n)for(const t of e)if(!r.has(t)){r.add(t);try{await o.workspace.fs.delete(o.Uri.file(t),{recursive:!0,useTrash:!1}),i.logger.log(`Deleted ${t} to release directory handles`),a=!0}catch{}}a&&await new Promise(e=>setTimeout(e,100))}(e.projectRenames.map(e=>e.oldPath),this.getProjectQueryableSpace())}));const n=r.filter(e=>e.projectRenames.length>0);if(0===n.length)return;const l=await this.serviceBroker.getProxy(c.default.environmentService);try{await Promise.all(n.map(async e=>{const t=e.isFolderRename,r=[],n=(await Promise.all(e.projectRenames.map(async e=>{const t=this.getWorkspaceFileWatcher()?.onMoveProjectFile(e.oldPath,e.newPath);try{const r=l?await(0,s.getProjectFromPath)(e.oldPath,this.serviceBroker,l):void 0;if(r){let n=[];try{n=await(0,s.getReferencingProjects)(r.projectId.fullPath,this.getProjectQueryableSpace())}catch(e){i.logger.log(`Failed to query referencing projects before rename: ${e}`)}return{project:r,oldPath:e.oldPath,newPath:e.newPath,referencingProjectPaths:n,change:t}}}catch(e){i.logger.log(`Failed to look up project info before rename: ${e}`)}t&&r.push(t)}))).filter(e=>void 0!==e);if(r.length>0&&this.pendingOrphanChangesByItemPath.set(e.oldPath,r),n.length>0){this.pendingRenamesByItemPath.set(e.oldPath,n);for(const e of n)this.pendingRenamesByProjectPath.set(e.oldPath,e);t&&this.pendingFolderRenames.set(e.oldPath,{oldFolderPath:e.oldPath,newFolderPath:e.newPath,sampleProjectGuid:n[0].project.projectId.projectGuid})}}))}finally{l?.dispose()}}async onDidRenameFiles(e){try{const t=new Set,r=this.createBatchSolutionFileServiceProxyGetter();try{for(const n of e.files){const e=this.pendingRenamesByItemPath.get(n.oldUri.fsPath)??(this.pendingRenamesByProjectPath.get(n.oldUri.fsPath)?[this.pendingRenamesByProjectPath.get(n.oldUri.fsPath)]:void 0);this.pendingRenamesByItemPath.delete(n.oldUri.fsPath),this.pendingRenamesByProjectPath.delete(n.oldUri.fsPath);const o=this.pendingOrphanChangesByItemPath.get(n.oldUri.fsPath);this.pendingOrphanChangesByItemPath.delete(n.oldUri.fsPath);try{const o=e??[];if(0===o.length&&!await p(n.oldUri.fsPath,n.newUri.fsPath))continue;if(0===o.length)for(const e of await d(n.oldUri.fsPath,n.newUri.fsPath)){const t=await(0,s.getProjectFromPath)(e.newPath,this.serviceBroker);if(!t)continue;let r=[];try{r=await(0,s.getReferencingProjects)(e.oldPath,this.getProjectQueryableSpace())}catch(e){i.logger.log(`Failed to query referencing projects after rename: ${e}`)}o.push({project:t,oldPath:e.oldPath,newPath:e.newPath,referencingProjectPaths:r,change:void 0})}if(0===o.length)continue;for(const e of o){const n=e.oldPath;t.has(n)||(t.add(n),this.pendingRenamesByProjectPath.delete(n),await(0,s.handleProjectFileRename)(e.oldPath,e.newPath,e.project.projectId.projectGuid,this.serviceBroker,e.referencingProjectPaths,this.getProjectQueryableSpace(),e.change,await r.get()))}const a=this.pendingFolderRenames.get(n.oldUri.fsPath);this.pendingFolderRenames.delete(n.oldUri.fsPath),a&&await this.renameMatchingSolutionFolder(a,await r.get())}finally{o?.forEach(e=>e.dispose())}}}finally{r.dispose()}}catch(e){i.logger.log(`Unexpected error in onDidRenameFiles: ${e}`)}}async renameMatchingSolutionFolder(e,t){const r=l.basename(e.oldFolderPath),n=l.basename(e.newFolderPath);if(r!==n)if(t)try{const o=await t.getSolutionFolderGuidForProjectAncestor(r,e.sampleProjectGuid);await t.renameSolutionFolder(o,n)}catch(e){i.logger.log(`Failed to rename matching solution folder: ${e}`)}else i.logger.log("Could not get solution file service proxy for folder rename")}async onDidCreateFiles(e){try{if(!this.getOpenedSolution())return;const t=this.getWorkspaceFileWatcher(),r=[],n=new Set;for(const o of e.files)for(const e of await(0,s.findCsprojFiles)(o.fsPath))n.has(e)||(n.add(e),t?.isChangePending(e)||r.push(e));if(0===r.length)return;const o=r.map(e=>t?.onCreateProject(e));try{await(0,s.handleProjectFileCreateBatch)(r)}finally{for(const e of o)e?.dispose()}}catch(e){i.logger.log(`Unexpected error in onDidCreateFiles: ${e}`)}}onWillDeleteFiles(e){this.getOpenedSolution()&&e.waitUntil(this.collectPendingDeletes(e.files))}async collectPendingDeletes(e){const t=this.getProjectQueryableSpace(),r=(await Promise.all(e.map(async e=>{const r=(0,a.pathHasExtension)(e.fsPath,".csproj")?await(0,s.findCsprojFiles)(e.fsPath):await(0,s.getKnownProjectFilesInFolder)(e.fsPath,t);return{oldPath:e.fsPath,projectPaths:r.filter(e=>!this.getWorkspaceFileWatcher()?.isChangePending(e))}}))).filter(e=>e.projectPaths.length>0);if(0!==r.length)for(const e of r){const t=await Promise.all(e.projectPaths.map(async e=>{let t=[];try{t=await(0,s.getReferencingProjects)(e,this.getProjectQueryableSpace())}catch(t){i.logger.log(`Failed to collect referencing projects for ${e}: ${t}`)}return{projectPath:e,referencingProjectPaths:t,change:this.getWorkspaceFileWatcher()?.onDeleteProject(e)}}));this.pendingDeletesByItemPath.set(e.oldPath,t);for(const e of t)this.pendingDeletesByProjectPath.set(e.projectPath,e)}}async onDidDeleteFiles(e){try{const t=new Set,r=this.createBatchSolutionFileServiceProxyGetter();try{for(const n of e.files){const e=this.pendingDeletesByItemPath.get(n.fsPath)??(this.pendingDeletesByProjectPath.get(n.fsPath)?[this.pendingDeletesByProjectPath.get(n.fsPath)]:void 0);if(this.pendingDeletesByItemPath.delete(n.fsPath),this.pendingDeletesByProjectPath.delete(n.fsPath),e)for(const n of e)t.has(n.projectPath)||(t.add(n.projectPath),this.pendingDeletesByProjectPath.delete(n.projectPath),await(0,s.handleProjectFileDelete)(n.projectPath,this.serviceBroker,this.getProjectQueryableSpace(),n.referencingProjectPaths,n.change,await r.get()));else try{const e=await r.get();await(e?.removeSolutionItemViaPath(n.fsPath))}catch(e){i.logger.log(`Failed to remove solution item ${n.fsPath}: ${e}`)}}}finally{r.dispose()}}catch(e){i.logger.log(`Unexpected error in onDidDeleteFiles: ${e}`)}}}},6798(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTemplateService=t.isTemplateServiceInitialized=void 0;const n=r(1398),o=r(857),i=r(9768),s=r(4724),a=r(8184),c=r(680),l=r(9687),u=r(5059),d=r(8955),p=r(5033);let h;t.isTemplateServiceInitialized=!1,t.getTemplateService=async function(){if(h)return h;const e=n.extensions.getExtension(i.EXTENSION_ID);if(!e)throw new Error("Unable to find the extension");const r=e.exports.serviceBroker,f=await r.getProxy(s.default.templateService);if(!f)throw new Error("Unable to get template service from brokered services");const g=new d.TelemetryActivity("TemplateService/initialization",c.telemetryService);let m=!1;try{await c.logger.watch("Initialize template service",async()=>{const e=n.workspace.workspaceFolders,t=e&&0!==e.length?l.getActiveWorkspaceRoot():(0,o.homedir)(),r=await(c.dotnetVersionManager?.getDotnetVersion(t,c.logger,p.LogImportance.normal)),i=c.dotnetSdkPath??(r?await(0,a.findInstalledDotnetFromPathLegacy)(null,c.logger):null);if(r&&i){if(g.addOrUpdateProperties({version:r.version}),m=await f.initialize(i,r.version),!m)throw new Error("Unable to initialize template engine host using version: "+r.version+" and path: "+i)}else await n.window.showErrorMessage(u.addNewItemUiStrings.noSdkFound)},{telemetry:g})}finally{g.end(),g.sendTelemetry()}return m?(h=f,t.isTemplateServiceInitialized=!0,h):null}},7815(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateCSharpExtensionVersionForAzFunctions=t.getAzureFunctionAPIExports=t.vsCodeAzureFunctionExtensionService=t.VSCodeAzureFunctionExtensionLaunchDataKeys=void 0;const n=r(9768),o=r(5059),i=r(3430),s=r(1398),a=r(9589);var c;function l(){const e=s.extensions.getExtension(n.AZUREFUNCTION_EXTENSION_ID);if(!e)throw new i.DotnetDebugConfigurationServiceError(i.DotnetDebugConfigurationServiceErrorKind.userError,o.vsCodeAzureFunctionExtensionServiceStrings.errorAzureFunctionsExtensionMissing,i.DebugTelemetryCode.invalidAzureFunctionExtension);const t=e.packageJSON.version;if(a.lt(t,n.AZUREFUNCTION_EXTENSION_REQUIRED_VERSION))throw new i.DotnetDebugConfigurationServiceError(i.DotnetDebugConfigurationServiceErrorKind.userError,o.vsCodeAzureFunctionExtensionServiceStrings.errorAzureFunctionMinimumVersion(n.AZUREFUNCTION_EXTENSION_REQUIRED_VERSION),i.DebugTelemetryCode.invalidAzureFunctionExtensionVersion);try{return e.exports.getApi(n.AZUREFUNCTION_EXTENSION_API_REQUIRED_VERSION)}catch{throw new i.DotnetDebugConfigurationServiceError(i.DotnetDebugConfigurationServiceErrorKind.internalError,o.vsCodeAzureFunctionExtensionServiceStrings.errorAzureFunctionExportsMissing,i.DebugTelemetryCode.invalidAzureFunctionExportAPI)}}!function(e){e.buildPath="buildPath",e.args="args",e.env="env"}(c||(t.VSCodeAzureFunctionExtensionLaunchDataKeys=c={})),t.vsCodeAzureFunctionExtensionService=new class{async startProcess(e){try{const t=e[c.buildPath];if(!t)throw new Error(o.vsCodeAzureFunctionExtensionServiceStrings.errorAzureFunctionStartFunc(c.buildPath));let r=e[c.args];r||(r=[]);let n=i.LaunchTargetToDebugConfigurationConverter.convertEnvironmentVariablesToObj(e[c.env]);return await l().startFuncProcess(t,r,n)}catch(e){let t="";return"string"==typeof e?t=e:e instanceof Error&&(t=e.message),{processId:-1,success:!1,error:t}}}},t.getAzureFunctionAPIExports=l,t.validateCSharpExtensionVersionForAzFunctions=async function(){const e=await s.extensions.getExtension(n.CSHARP_EXTENSION_ID),t=e?.packageJSON.version;if(!e||!t)throw new i.DotnetDebugConfigurationServiceError(i.DotnetDebugConfigurationServiceErrorKind.internalError,"Could not obtain exports from C# Extension ",i.DebugTelemetryCode.missingCSharpExtensionExport);if(a.lt(t,n.CSHARP_EXTENSION_AZ_FUNCTIONS_REQUIRED_VERSION))throw new i.DotnetDebugConfigurationServiceError(i.DotnetDebugConfigurationServiceErrorKind.internalError,`The C# extension is installed, but has version ${t} which is incompatible with Azure Functions Debug Launch. Please update your C# Extension.`,i.DebugTelemetryCode.invalidCSharpExtVersionAzFunc)}},2551(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VsCodeFileWatcherService=void 0;const n=r(1398),o=r(7337),i=r(4434);class s extends i.EventEmitter{fileSystemWatcher;constructor(e){super();let t=e.activationArguments?.globPattern??"**";const r=e.activationArguments?.basePath,i=!!e.activationArguments?.ignoreCreateEvents&&JSON.parse(e.activationArguments.ignoreCreateEvents.toLowerCase()),s=!!e.activationArguments?.ignoreChangeEvents&&JSON.parse(e.activationArguments.ignoreChangeEvents.toLowerCase()),a=!!e.activationArguments?.ignoreDeleteEvents&&JSON.parse(e.activationArguments.ignoreDeleteEvents.toLowerCase());r&&(t=new n.RelativePattern(r,t)),this.fileSystemWatcher=n.workspace.createFileSystemWatcher(t,i,s,a),this.fileSystemWatcher.onDidCreate(e=>{this.emit("onFileSystemChange",new o.VsCodeFileWatcherEventArgs(o.FileSystemWatcherChangeTypes.created,e.fsPath))}),this.fileSystemWatcher.onDidChange(e=>{this.emit("onFileSystemChange",new o.VsCodeFileWatcherEventArgs(o.FileSystemWatcherChangeTypes.changed,e.fsPath))}),this.fileSystemWatcher.onDidDelete(e=>{this.emit("onFileSystemChange",new o.VsCodeFileWatcherEventArgs(o.FileSystemWatcherChangeTypes.deleted,e.fsPath))})}rpcEventNames=["onDidChange","onDidCreate","onDidDelete","onFileSystemChange"];dispose(){this.fileSystemWatcher.dispose()}}t.VsCodeFileWatcherService=s},8477(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WorkspaceFileWatcher=void 0;const n=r(5811),o=r(9687),i=r(680),s=r(7337),a=r(2551),c=r(6928);t.WorkspaceFileWatcher=class{fileWatcherService;serviceBroker=(0,o.getExtensionBrokerService)();changeManager=new l;constructor(e){const t={activationArguments:{globPattern:"**/*.csproj",basePath:(0,o.getActiveWorkspaceRoot)(),ignoreCreateEvents:"false",ignoreChangeEvents:"true",ignoreDeleteEvents:"false"}};this.fileWatcherService=new a.VsCodeFileWatcherService(t),this.fileWatcherService.on("onFileSystemChange",async e=>{if(this.changeManager.consumeIfPending(e.fsPath,e.watcherChangeType))return;const t=i.environmentStateManager?.getOpenedSolution();switch(e.watcherChangeType){case s.FileSystemWatcherChangeTypes.created:t&&i.environmentStateManager?.isSolutionGeneratedOutsideWorkspace()&&await(0,n.handleProjectFileCreate)(e.fsPath);break;case s.FileSystemWatcherChangeTypes.deleted:t&&await(0,n.handleProjectFileDelete)(e.fsPath,this.serviceBroker,i.projectQueryableSpace)}})}onCreateProject(e){const t=this.changeManager.startChange(e);return{dispose:()=>this.changeManager.clear(t)}}onDeleteProject(e){const t=this.changeManager.startChange(e.toLocaleUpperCase());return{dispose:()=>this.changeManager.clear(t)}}onMoveProjectFile(e,t){const r=this.changeManager.startChange(e,s.FileSystemWatcherChangeTypes.deleted),n=this.changeManager.startChange(t,s.FileSystemWatcherChangeTypes.created);return{dispose:()=>{this.changeManager.clear(r),this.changeManager.clear(n)}}}get hasPendingChanges(){return this.changeManager.hasPendingChanges}isChangePending(e){return this.changeManager.isChangePending(e)}dispose(){this.fileWatcherService.dispose()}};class l{_pendingChanges=new Map;startChange(e,t){const r=c.normalize(e).toLocaleUpperCase(),n=new u(e,t);return this._pendingChanges.set(r,n),n}consumeIfPending(e,t){const r=c.normalize(e).toLocaleUpperCase(),n=this._pendingChanges.get(r);return!!n&&(void 0===n.expectedEventType||void 0!==t&&n.expectedEventType===t)&&(this._pendingChanges.delete(r),!0)}clear(e){const t=c.normalize(e.filePath).toLocaleUpperCase();this._pendingChanges.get(t)===e&&this._pendingChanges.delete(t)}isChangePending(e){const t=c.normalize(e).toLocaleUpperCase();return this._pendingChanges.has(t)}get hasPendingChanges(){return this._pendingChanges.size>0}}class u{_filePath;_expectedEventType;constructor(e,t){this._filePath=e,this._expectedEventType=t}get filePath(){return this._filePath}get expectedEventType(){return this._expectedEventType}}},9071(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isUnderFolder=t.WorkspaceProjectService=void 0;const n=r(1398),o=r(6928),i=r(680),s="**/*.{csproj,sln,slnx,slnf}",a=new Set([".sln",".slnx",".slnf"]);t.WorkspaceProjectService=class{_onDidChangeProjects=new n.EventEmitter;onDidChangeProjects=this._onDidChangeProjects.event;workspaceItems=new Map;fileWatcher;disposables=[];scanPromise=Promise.resolve();async initialize(){await this.scanWorkspace(),this.fileWatcher=n.workspace.createFileSystemWatcher(s),this.fileWatcher.onDidCreate(e=>this.onFileCreated(e)),this.fileWatcher.onDidDelete(e=>this.onFileDeleted(e)),this.disposables.push(this.fileWatcher);const e=n.workspace.onDidChangeWorkspaceFolders(()=>this.scanWorkspace());this.disposables.push(e)}getWorkspaceItems(){return Array.from(this.workspaceItems.values()).map(e=>{return{path:e.fsPath,name:o.basename(e.fsPath),isSolution:(t=e.fsPath,a.has(o.extname(t).toLowerCase()))};var t})}async scanWorkspace(){return this.scanPromise=this.scanPromise.catch(e=>i.logger.log(`Error during workspace scan: ${e}`)).then(async()=>{const e=await n.workspace.findFiles(s),t=new Map;for(const r of e)t.set(r.toString(),r);this.workspaceItems=t,this._onDidChangeProjects.fire()}),this.scanPromise}onFileCreated(e){const t=e.toString();this.workspaceItems.has(t)||(this.workspaceItems.set(t,e),this._onDidChangeProjects.fire())}onFileDeleted(e){this.workspaceItems.delete(e.toString())&&this._onDidChangeProjects.fire()}dispose(){for(const e of this.disposables)e.dispose();this._onDidChangeProjects.dispose()}},t.isUnderFolder=function(e,t){const r=o.relative(t,o.dirname(e));return!r.startsWith("..")&&!o.isAbsolute(r)}},7542(e,t,r){"use strict";var n=this&&this.__runInitializers||function(e,t,r){for(var n=arguments.length>2,o=0;o<t.length;o++)r=n?t[o].call(e,r):t[o].call(e);return n?r:void 0},o=this&&this.__esDecorate||function(e,t,r,n,o,i){function s(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var a,c=n.kind,l="getter"===c?"get":"setter"===c?"set":"value",u=!t&&e?n.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),p=!1,h=r.length-1;h>=0;h--){var f={};for(var g in n)f[g]="access"===g?{}:n[g];for(var g in n.access)f.access[g]=n.access[g];f.addInitializer=function(e){if(p)throw new TypeError("Cannot add initializers after decoration has completed");i.push(s(e||null))};var m=(0,r[h])("accessor"===c?{get:d.get,set:d.set}:d[l],f);if("accessor"===c){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw new TypeError("Object expected");(a=s(m.get))&&(d.get=a),(a=s(m.set))&&(d.set=a),(a=s(m.init))&&o.unshift(a)}else(a=s(m))&&("field"===c?o.unshift(a):d[l]=a)}u&&Object.defineProperty(u,n.name,d),p=!0},i=this&&this.__setFunctionName||function(e,t,r){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})};Object.defineProperty(t,"__esModule",{value:!0}),t.EntitlementsService=void 0;const s=r(1398),a=r(9243),c=r(8077),l=r(231),u=r(5401),d=r(4964),p="csdevkit_entitlementCode",h=new Date((new Date).setFullYear((new Date).getFullYear()+1));t.EntitlementsService=(()=>{let e,t,r=[];return class{static{e=[(0,u.catchErrors)(c.EntitlementError.requestFailure),u.addGetEntitlementTelemetry],o(this,t={value:i(async function(e,t){let r=await this.#e(e,t);const n=this.#t();return c.Entitlement.isActive(n)&&!c.Entitlement.isActive(r)&&(r=n),!t||r===this.#r||r instanceof c.Entitlement&&this.#r instanceof c.Entitlement&&r.equals(this.#r)||(this.#r=r,this.#n.fire(r)),r},"#getEntitlementsInternal")},e,{kind:"method",name:"#getEntitlementsInternal",static:!1,private:!0,access:{has:e=>#o in e,get:e=>e.#o}},null,r)}#i=void n(this,r);#s;#n=new s.EventEmitter;#a;entitlementsChanged=this.#n.event;#c=new Map;#r=c.EntitlementError.noEntitlement;constructor(e,t,r){this.#i=e,this.#s=t,this.#i.msSessionChanged(()=>this.#l()),this.#a=r??f.create()}async getEntitlements(e){return this.#o(e,!1)}getRequiredScopes(){return this.#a.getRequiredScopes()}#t(){return(0,d.isInDevBox)()?new c.Entitlement("DevBoxAccontIdStub","DevBoxSubscriptionId",c.EntitlementType.devbox,c.EntitlementSourceType.environment,l.identityStrings.devBoxSubscription,c.Entitlement.activeSubscriptionStatus,h,"DevBox programCode","DevBox channel"):(0,d.isInCodeSpaces)()?new c.Entitlement("CodeSpacesAccountIdStub","CodeSpacesSubscriptionId",c.EntitlementType.codespaces,c.EntitlementSourceType.environment,l.identityStrings.codeSpacesSubscription,c.Entitlement.activeSubscriptionStatus,h,"CodeSpaces programCode","CodeSpaces channel"):null}#l(){this.#o({silent:!0},!0).catch(e=>{(0,u.sendErrorEvent)("EntitlementsService","sessionChanged",e)})}get#o(){return t.value}async#e(e,t){const r=JSON.stringify([e,t]);if(this.#c.has(r))return this.#c.get(r);const n=this.#u(e,t).finally(()=>this.#c.delete(r));return this.#c.set(r,n),n}async#u(e,t){let r=c.EntitlementError.requestFailure;if(a.useEntitlementsCache()){const e=await this.#s.get(p),o=e?c.Entitlement.deserialize(e):c.EntitlementError.noEntitlement;if(c.Entitlement.isActive(o))if(t){var n=await this.#i.getMsAccessToken(this.#a.getRequiredScopes(),{silent:!0,callerId:"EntitlementService",requestReason:"Entitlement Cache Check"});n&&n.accountId===o.accountId||await this.#s.delete(p)}else if(r=o,o.isFresh())return o}try{const t=await this.#a.fetch(this.#i,e);if(t===c.EntitlementError.noSession)return r=c.EntitlementError.noSession,this.#s.delete(p),c.EntitlementError.noSession;c.Entitlement.isActive(r)||(r=t),c.Entitlement.isActive(t)&&(r=t,await this.#s.store(p,t.serialize()))}catch(e){(0,u.sendErrorEvent)("EntitlementsService","requestEntitlementWithCaching",e)}return r}dispose(){this.#i.dispose(),this.#n.dispose()}}})();class f{sources;name="AggregatedEntitlementSource";constructor(e){this.sources=e}async fetch(e,t){let r=c.EntitlementError.requestFailure;for(let n of this.sources){try{r=await n.fetch(e,t)}catch(e){(0,u.sendErrorEvent)(n.name,"fetch entitlements",e)}if(r!==c.EntitlementError.requestFailure)return r}return r}getRequiredScopes(){return this.sources.find(e=>e!==m.instance)?.getRequiredScopes()??[]}static create(){let e=[v.ideBenefitsSource,m.instance];switch(a.entitlementsApiType()){case"Entitlements":e=[v.entitlementsSource,m.instance];break;case"IdeBenefitsOnly":e=[v.ideBenefitsSource]}return new f(e)}}class g{name;url;scopes;constructor(e,t,r){this.name=e,this.url=t,this.scopes=r}async fetch(e,t){const r=await e.getMsAccessToken(this.scopes,{...t,callerId:"EntitlementsService",requestReason:l.identityStrings.entitlementsSignInReason});if(!r)return c.EntitlementError.noSession;const n=await(0,d.httpsGet)(this.url,r.accessToken);return n?this.parseResponse(n,r.accountId):c.EntitlementError.requestFailure}getRequiredScopes(){return this.scopes}}class m extends g{static instance=new m("LicensingWebSource",m.#d(),["499b84ac-1321-427f-aa17-267ca6975798/.default"]);static#d(){return"https://app.vssps.visualstudio.com/_apis/Licensing/ClientRights/VisualStudio?productVersion=17.0.0.0%20CSDEVKIT&edition=Professional&relType=release&machineId=00000000-0000-0000-0000-00000000000"}fetch(e,t){return super.fetch(e,{silent:!0})}parseResponse(e,t){const r=m.#p(e);if(!r||!Array.isArray(r))return c.EntitlementError.noEntitlement;const n=r.map(e=>({obj:e,type:m.#h(e?.Attributes?.SubscriptionLevel)})).sort((e,t)=>t.type-e.type)[0];if(!n||!n.obj)return c.EntitlementError.noEntitlement;const o=n.obj.LicenseFallbackDescription??n.obj?.Attributes?.SubscriptionLevel;return o?new c.Entitlement(t,"LicensingApiSubscriptionId",n.type,c.EntitlementSourceType.licensingApi,o,c.Entitlement.activeSubscriptionStatus,h,"programCode unavailable","channel unavailable"):c.EntitlementError.noEntitlement}static#h(e){switch(e?.toLowerCase()){case"enterprise":return c.EntitlementType.enterprise;case"ultimate":return c.EntitlementType.ultimate;case"premium":return c.EntitlementType.premium;case"professional":return c.EntitlementType.pro;case"testprofessional":return c.EntitlementType.testPro;default:return c.EntitlementType.none}}static#p(e){const t=e.split(".")[1];if(!t)return;const r=Buffer.from(t,"base64").toString("binary"),n=JSON.parse(r);return n.Rights?JSON.parse(n.Rights):void 0}}class v extends g{static#f="IdeBenefitsSource";static entitlementsSource=new v("EntitlementsSource","https://api.subscriptions.visualstudio.microsoft.com/api/GetMyEntitlements",["https://graph.microsoft.com/.default"]);static ideBenefitsSource=new v(v.#f,a.getIdeBenefitsEndpoint(),["6f1cc985-85e8-487e-b0dd-aa633302a731/.default"]);static#g="LicensingIde";parseResponse(e,t){const r=JSON.parse(e);if(!r||0===r.length)return c.EntitlementError.noEntitlement;const n=r.filter(e=>e.entitlementType===v.#g).map(e=>this.#m(e,t));if(0===n.length)return c.EntitlementError.noEntitlement;(0,u.sendReceivedEntitlementsTelemetry)(n);const o=n.filter(e=>e.isActive()).sort((e,t)=>t.type-e.type);return o.length>0?o[0]:c.EntitlementError.inactiveEntitlement}#m(e,t){return new c.Entitlement(t,e.benefitDetailGuid,v.#h(e.entitlementCode),this.name===v.#f?c.EntitlementSourceType.ideBenefitsApi:c.EntitlementSourceType.entitlementApi,e.subscriptionLevelName,e.subscriptionStatus?.toLocaleLowerCase(),new Date(e.subscriptionExpirationDate),e.subscriptionProgramCode,e.subscriptionChannel)}static#h(e){switch(e){case"IDE-ENTERPRISE":return c.EntitlementType.enterprise;case"IDE-ULTIMATE":return c.EntitlementType.ultimate;case"IDE-PREMIUM":return c.EntitlementType.premium;case"IDE-PRO":return c.EntitlementType.pro;case"IDE-TESTPRO":return c.EntitlementType.testPro;default:return c.EntitlementType.none}}}},4398(e,t,r){"use strict";var n=this&&this.__runInitializers||function(e,t,r){for(var n=arguments.length>2,o=0;o<t.length;o++)r=n?t[o].call(e,r):t[o].call(e);return n?r:void 0},o=this&&this.__esDecorate||function(e,t,r,n,o,i){function s(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var a,c=n.kind,l="getter"===c?"get":"setter"===c?"set":"value",u=!t&&e?n.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),p=!1,h=r.length-1;h>=0;h--){var f={};for(var g in n)f[g]="access"===g?{}:n[g];for(var g in n.access)f.access[g]=n.access[g];f.addInitializer=function(e){if(p)throw new TypeError("Cannot add initializers after decoration has completed");i.push(s(e||null))};var m=(0,r[h])("accessor"===c?{get:d.get,set:d.set}:d[l],f);if("accessor"===c){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw new TypeError("Object expected");(a=s(m.get))&&(d.get=a),(a=s(m.set))&&(d.set=a),(a=s(m.init))&&o.unshift(a)}else(a=s(m))&&("field"===c?o.unshift(a):d[l]=a)}u&&Object.defineProperty(u,n.name,d),p=!0},i=this&&this.__setFunctionName||function(e,t,r){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})};Object.defineProperty(t,"__esModule",{value:!0}),t.AccessTokenInfo=t.TokenAcquisitionService=void 0;const s=r(1398),a=r(5401),c="microsoft",l="github",u=["VSCODE_TENANT:organizations"];t.TokenAcquisitionService=(()=>{let e,t,r=[];return class{static{e=[(0,a.catchErrors)(void 0),a.addGetSessionTelemetry],o(this,t={value:i(async function(e,t,r){if(!r||!r.callerId?.trim()||!r.requestReason?.trim())throw new Error("Please provide callerId and requestReason in TokenRequestOptions");if(r.createIfNone&&!r.forceNewSession){const n=await this.#v.getSession(e,t,{silent:!0});if(n)return n;r.createIfNone=!1,r.forceNewSession=!0}return!0===r.forceNewSession&&(r.forceNewSession={detail:r.requestReason}),await this.#v.getSession(e,t,r)},"#getSession")},e,{kind:"method",name:"#getSession",static:!1,private:!0,access:{has:e=>#y in e,get:e=>e.#y}},null,r)}#v=void n(this,r);#S;#w=new s.EventEmitter;#E=new s.EventEmitter;msSessionChanged=this.#w.event;gitHubSessionChanged=this.#E.event;constructor(e){this.#v=e??new d,this.#S=this.#v.onDidChangeSessions(e=>this.#_(e.provider.id))}async getSessionInfo(e,t){const r=[...e,...u];return await this.#y(c,r,t)??null}getMsAccessToken(e,t){const r=[...e,...u];return this.#b(c,r,t)}getGitHubAccessToken(e,t){return this.#b(l,e,t)}async#b(e,t,r){const n=await this.#y(e,t,r);return n?.accessToken?new p(n.accessToken,n.account?.id??"no-account-id"):null}get#y(){return t.value}#_(e){switch(e){case c:this.#w.fire();break;case l:this.#E.fire()}}dispose(){this.#w.dispose(),this.#E.dispose(),this.#S.dispose()}}})();class d{getSession(e,t,r){return s.authentication.getSession(e,t,r)}onDidChangeSessions=s.authentication.onDidChangeSessions}class p{accessToken;accountId;constructor(e,t){this.accessToken=e,this.accountId=t}}t.AccessTokenInfo=p},9243(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.integrationTestMode=t.getIdeBenefitsEndpoint=t.daysEntitlementIsFresh=t.daysEntitlementIsValid=t.daysBetweenSignInPrompts=t.entitlementsApiType=t.showEntitlementExpiryDate=t.useEntitlementsCache=void 0;const n=r(1398);function o(e,t){return n.workspace.getConfiguration("dotnet").get(e,t)}t.useEntitlementsCache=function(){return o("useEntitlementsCache",!0)},t.showEntitlementExpiryDate=function(){return o("showEntitlementExpiryDate",!1)},t.entitlementsApiType=function(){return o("EntitlementsApiType","IdeBenefits")},t.daysBetweenSignInPrompts=function(){return o("daysBetweenSignInPrompts",15)},t.daysEntitlementIsValid=function(){return o("daysEntitlementIsValid",30)},t.daysEntitlementIsFresh=function(){return o("daysEntitlementIsFresh",2)},t.getIdeBenefitsEndpoint=function(){return o("ideBenefitsEndpoint","https://api.subscriptions.visualstudio.microsoft.com/Me/Entitlements/IDEBenefits?api-version=2023-03-26&caller=vscode")},t.integrationTestMode=function(){return!!process.env.AUTOMATED_INTEGRATION_TEST}},8077(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EntitlementSourceType=t.EntitlementError=t.EntitlementType=t.Entitlement=void 0;const n=r(4964),o=r(9243);class i{accountId;benefitDetailGuid;type;sourceType;subscriptionLevelName;subscriptionStatus;expirationDate;programCode;channel;acquisitionDate;fromCache;static activeSubscriptionStatus="active";constructor(e,t,r,n,o,i,s,a,c,l=new Date,u=!1){this.accountId=e,this.benefitDetailGuid=t,this.type=r,this.sourceType=n,this.subscriptionLevelName=o,this.subscriptionStatus=i,this.expirationDate=s,this.programCode=a,this.channel=c,this.acquisitionDate=l,this.fromCache=u}equals(e){return this===e||e&&this.subscriptionLevelName===e.subscriptionLevelName&&this.type===e.type}isActive(){return this.type>s.testPro&&this.subscriptionStatus===i.activeSubscriptionStatus&&(0,n.daysPassedSince)(this.acquisitionDate)<o.daysEntitlementIsValid()}isFresh(){return this.isActive()&&(0,n.daysPassedSince)(this.acquisitionDate)<o.daysEntitlementIsFresh()}serialize(){return JSON.stringify(this)}static deserialize(e){const t=JSON.parse(e);return t&&t.accountId&&t.benefitDetailGuid&&t.type&&t.sourceType&&t.subscriptionLevelName&&t.subscriptionStatus&&t.programCode&&t.channel&&t.expirationDate&&t.acquisitionDate?new i(t.accountId,t.benefitDetailGuid,t.type,t.sourceType,t.subscriptionLevelName,t.subscriptionStatus,new Date(t.expirationDate),t.programCode,t.channel,new Date(t.acquisitionDate),!0):null}static isActive(e){return e instanceof i&&e.isActive()}}var s,a,c;t.Entitlement=i,function(e){e[e.devbox=8]="devbox",e[e.codespaces=7]="codespaces",e[e.enterprise=6]="enterprise",e[e.ultimate=5]="ultimate",e[e.premium=4]="premium",e[e.pro=3]="pro",e[e.testPro=2]="testPro",e[e.none=1]="none"}(s||(t.EntitlementType=s={})),function(e){e[e.noSession=1]="noSession",e[e.requestFailure=2]="requestFailure",e[e.noEntitlement=3]="noEntitlement",e[e.inactiveEntitlement=4]="inactiveEntitlement"}(a||(t.EntitlementError=a={})),function(e){e[e.ideBenefitsApi=1]="ideBenefitsApi",e[e.environment=2]="environment",e[e.entitlementApi=3]="entitlementApi",e[e.licensingApi=4]="licensingApi"}(c||(t.EntitlementSourceType=c={}))},2542(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTestHooks=void 0;const n=r(1398),o=r(9243),i=r(8077),s=r(5401);t.getTestHooks=function(){return o.integrationTestMode()?{secretStorage:l.instance,vsCodeAuthentication:a.instance,entlementSource:c.instance,notificationService:u.instance}:null};class a{static instance=new a;didChangeSessionsEmitter=new n.EventEmitter;lastRequestProviderId=void 0;lastRequestScopes=[];lastRequestOptions=void 0;responseToProvide=void 0;onDidChangeSessions=this.didChangeSessionsEmitter.event;getSession(e,t,r){return this.lastRequestProviderId=e,this.lastRequestScopes=t,this.lastRequestOptions=r,Promise.resolve(this.responseToProvide)}}class c{static instance=new c;name="MockEntlementSource";lastRequestOptions=void 0;responseScopesToProvide=[];#P=i.EntitlementError.noSession;getRequiredScopes(){return this.responseScopesToProvide}fetch(e,t){return this.lastRequestOptions=t,Promise.resolve(this.#P)}setResponseEntitlementToProvide(e){this.#P="string"==typeof e?i.Entitlement.deserialize(e)??i.EntitlementError.requestFailure:e}}class l{static instance=new l;typeMap=new Map;didChangeEmitter=new n.EventEmitter;onDidChange=this.didChangeEmitter.event;get(e){return Promise.resolve(this.typeMap.get(e))}store(e,t){return this.typeMap.set(e,t),Promise.resolve(!0)}delete(e){return this.typeMap.delete(e),Promise.resolve(!0)}clear(){this.typeMap.clear()}}class u extends s.NotificationService{static instance=new u;lastRequestMessage;lastRequestOptions=[];responseToProvide;async showNotification(e,t,...r){return this.lastRequestMessage=t,this.lastRequestOptions=r,this.responseToProvide}}},6360(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.showEntitlementsStatusCommand=t.signInCommand=t.registerIdentityService=void 0;const n=r(1398),o=r(4628),i=r(9243),s=r(7542),a=r(4398),c=r(4964),l=r(8955),u=r(5401),d=r(8077),p=r(2542),h=r(231),f=r(680),g=r(8077),m="lastPromptDate";let v,y=new c.EventBouncer;async function S(e){const t=new l.TelemetryActivity("show-entitlement-command",f.telemetryService);if(!v)return void(0,u.sendErrorEvent)("showEntitlementsStatusCommand","get dependencies");y.stop();const r=await b(v.entitlementsService),n=await P(v.entitlementsService,v.tokenAcquisitionService);if(d.Entitlement.isActive(r)||n)await E(v.notificationService,r,n,"showEntitlementCommand"),t.addOrUpdateProperties({signInRequested:String(!1)});else{const e=await w(v,{messageReason:"showEntitlementCommand"});e&&y.raiseNext(),t.addOrUpdateProperties({signInRequested:String(!0),signInSucceded:String(e)})}t.end(),t.addOrUpdateProperties({caller:e}),(0,u.addAccountInfoToEvent)(t,n),(0,u.addEntitlementInfoToEvent)(t,r),t.sendTelemetry()}async function w(e,t){return await e.secrets.store(m,(new Date).toISOString()),"signInBtn"===await e.notificationService.showNotification({messageReason:`promptToSignIn+${t.messageReason}`,telemetryUpdate:t.telemetryUpdate},h.identityStrings.signInRequest,"signInBtn","dismissBtn")&&await T(e.entitlementsService,e.tokenAcquisitionService)}async function E(e,t,r,n){const o=_(t,r);await e.showNotification({messageReason:`showStatusPopUp+${n}`,telemetryUpdate:e=>{(0,u.addAccountInfoToEvent)(e,r),(0,u.addEntitlementInfoToEvent)(e,t)}},o,"dismissBtn")}function _(e,t){const r=d.Entitlement.isActive(e),n=t?.label?.split(" - ").pop()?.trim();let o=n?`${h.identityStrings.softwareIsLicensedTo} ${n}`:h.identityStrings.softwareIsLicensed;switch(o+=" ",r?e.type:g.EntitlementType.none){case g.EntitlementType.enterprise:case g.EntitlementType.ultimate:o+=h.identityStrings.underVsEnterpriseSubscription;break;case g.EntitlementType.pro:case g.EntitlementType.premium:o+=h.identityStrings.underVsProSubscription;break;case g.EntitlementType.devbox:o+=h.identityStrings.underDevBoxSubscription;break;case g.EntitlementType.codespaces:o+=h.identityStrings.underCodeSpacesSubscription;break;case g.EntitlementType.testPro:case g.EntitlementType.none:default:o+=h.identityStrings.underIndividualLicense}return o+=".",r&&i.showEntitlementExpiryDate()&&(o+=` ${h.identityStrings.expirationDateHeader} ${e.expirationDate.toLocaleDateString()}.`),o}function b(e){return e.getEntitlements({silent:!0})}async function P(e,t,r=!1){const n=await t.getSessionInfo(e.getRequiredScopes(),{callerId:"showEntitlementsStatus",requestReason:h.identityStrings.entitlementsSignInReason,silent:!r,createIfNone:r});return n?.account??null}async function T(e,t){return!!await P(e,t,!0)}t.registerIdentityService=function(e){const t=(0,p.getTestHooks)();v=function(e,t){const r=t?.secretStorage??new u.SecretStorageWithErrorHandling(e.secrets),n=t?.notificationService??u.NotificationService.instance,o=new a.TokenAcquisitionService(t?.vsCodeAuthentication);return{secrets:r,notificationService:n,tokenAcquisitionService:o,entitlementsService:new s.EntitlementsService(o,r,t?.entlementSource)}}(e,t),e.subscriptions.push(v.entitlementsService);const r=async function(e,t){(0,c.setVersionForUserAgent)(t.extension.packageJSON.version);const r=await e.entitlementsService.getEntitlements({createIfNone:!1});!function(e,t,r){const i=n.window.createStatusBarItem("csdevkit.status",n.StatusBarAlignment.Right,0);function s(e){i.text=d.Entitlement.isActive(e)?"$(statusbar-entitlement)":"$(statusbar-no-entitlement)",i.tooltip=_(e,null),i.show()}i.command=o.default.showEntitlementsStatus,s(r),e.subscriptions.push(i,t(s))}(t,e.entitlementsService.entitlementsChanged,r);const s=y.createEventHandler(e=>{d.Entitlement.isActive(e)&&S("entitlementsChangedEvent")});t.subscriptions.push(e.entitlementsService.entitlementsChanged(s)),r!==d.EntitlementError.noSession||await async function(e,t){return!!await P(e,t,!1)}(e.entitlementsService,e.tokenAcquisitionService)||await async function(e){const t=await e.secrets.get(m);(t?(0,c.daysPassedSince)(new Date(t))>i.daysBetweenSignInPrompts():await e.secrets.store(m,(new Date).toISOString()))&&await w(e,{messageReason:"periodicalReminder",telemetryUpdate:e=>{e.addOrUpdateProperties({previousReminderDate:t})}})}(e)}(v,e).catch(e=>{(0,u.sendErrorEvent)("registerIdentityService","initialization",e)});return t&&(t.initPromise=r),[v.tokenAcquisitionService,t]},t.signInCommand=async function(){const e=new l.TelemetryActivity("sign-in-command",f.telemetryService);if(!v)return void(0,u.sendErrorEvent)("signInCommand","get dependencies");let t=d.EntitlementError.noEntitlement;const r=await P(v.entitlementsService,v.tokenAcquisitionService);r?(t=await b(v.entitlementsService),await E(v.notificationService,t,r,"signInCommand")):await T(v.entitlementsService,v.tokenAcquisitionService),e.end(),(0,u.addAccountInfoToEvent)(e,r),(0,u.addEntitlementInfoToEvent)(e,t),e.sendTelemetry()},t.showEntitlementsStatusCommand=async function(){await S("command")}},231(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.identityStrings=void 0;const n=r(1398),o=r(2477);o.config({bundleFormat:o.BundleFormat.standalone,locale:n.env.language,messageFormat:o.MessageFormat.both});const i=o.loadMessageBundle(r(6928).join(__dirname,"services\\identity\\strings.ts"));t.identityStrings={devBoxSubscription:i(0,null),codeSpacesSubscription:i(1,null),softwareIsLicensed:i(2,null),softwareIsLicensedTo:i(3,null),underVsEnterpriseSubscription:i(4,null),underVsProSubscription:i(5,null),underDevBoxSubscription:i(6,null),underCodeSpacesSubscription:i(7,null),underIndividualLicense:i(8,null),expirationDateHeader:i(9,null),signInRequest:i(10,null),signInBtn:i(11,null),dismissBtn:i(12,null),entitlementsSignInReason:i(13,null)}},5401(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addGetEntitlementTelemetry=t.addGetSessionTelemetry=t.catchErrors=t.SecretStorageWithErrorHandling=t.addSignInRequestInfoToActivity=t.sendErrorEvent=t.addEnvironmentInfoToEvent=t.addAccountInfoToEvent=t.addEntitlementInfoToEvent=t.sendReceivedEntitlementsTelemetry=t.NotificationService=void 0;const n=r(1398),o=r(8955),i=r(4964),s=r(680),a=r(128),c=r(8077),l=r(231),u=r(5033);class d{static instance=new d;async showNotification(e,t,...r){const i=new o.TelemetryActivity("show-notification",s.telemetryService),a=await n.window.showInformationMessage(t,...r.map(e=>l.identityStrings[e])),c=a?r.find(e=>a===l.identityStrings[e]):void 0;return i.end(),i.addOrUpdateProperties({notificationType:"Information",reason:e.messageReason,response:c}),h(i),e.telemetryUpdate&&e.telemetryUpdate(i),i.sendTelemetry(),c}}function p(e,t){t instanceof c.Entitlement?e.addOrUpdateProperties({entitlementType:c.EntitlementType[t.type],expirationDate:t.expirationDate.toISOString(),benefitDetailGuid:t.benefitDetailGuid,subscriptionLevelName:t.subscriptionLevelName,source:c.EntitlementSourceType[t.sourceType],fromCache:String(t.fromCache),isActive:String(t.isActive()),isFresh:String(t.isFresh()),programCode:t.programCode,channel:t.channel}):e.addOrUpdateProperties({entitlementError:c.EntitlementError[t]})}function h(e){e.addOrUpdateProperties({environmentType:(0,i.isInCodeSpaces)()?"codespaces":(0,i.isInDevBox)()?"devbox":"local"})}function f(e,t,r=null){const n=`${e}: Failed to ${t}. Error: '${r}'`;s.logger.log(n,u.LogImportance.high);const o=r instanceof Error?r:new Error(String(r??n)),a=r instanceof i.ErrorWithProperties?r.properties:{};s.telemetryService?.sendTelemetryErrorEvent("identity-error",{source:e,action:t,errorName:o.name,errorMessage:o.message,errorStack:String(o.stack),...a})}function g(e,t){e.addOrUpdateProperties({silent:String(t.silent),createIfNone:String(t.createIfNone),clearSessionPreference:String(t.clearSessionPreference),forceNewSession:String(t.forceNewSession)})}t.NotificationService=d,t.sendReceivedEntitlementsTelemetry=function(e){for(let t of e){const e=new a.TelemetryEvent("received-entitlement",s.telemetryService);p(e,t),h(e),e.sendTelemetry()}},t.addEntitlementInfoToEvent=p,t.addAccountInfoToEvent=function(e,t){e.addOrUpdateProperties({signedIn:String(!!t)})},t.addEnvironmentInfoToEvent=h,t.sendErrorEvent=f,t.addSignInRequestInfoToActivity=g,t.SecretStorageWithErrorHandling=class{storage;constructor(e){this.storage=e,this.onDidChange=e.onDidChange}async get(e){try{return await this.storage.get(e)}catch(t){return void f("secretStorage",`get secret '${e}' from the store`,t)}}async store(e,t){try{return await this.storage.store(e,t),!0}catch(t){return f("secretStorage",`store secret '${e}' in the store`,t),!1}}async delete(e){try{return await this.storage.delete(e),!0}catch(t){return f("secretStorage",`delete secret '${e}' from the store`,t),!1}}onDidChange},t.catchErrors=function(e){return function(t,r){const n=String(r.name);return async function(...r){let o=e;try{o=await t.call(this,...r)}catch(e){f(n,"running method",e)}return o}}},t.addGetSessionTelemetry=function(e,t){return async function(...t){const r=new o.TelemetryActivity("get-session",s.telemetryService);let n;try{n=await e.call(this,...t)}catch(e){throw r.addOrUpdateProperties({error:e instanceof Error?e.name:"error"}),e}finally{if(r.end(),n?.id){const[e,t,o]=n.id.split("/");r.addOrUpdateProperties({tenantId:e})}const[e,o,i]=t;r.addOrUpdateProperties({succeeded:String(!!n),providerId:e,scopes:o.join(" "),callerId:i.callerId}),h(r),g(r,i),r.sendTelemetry()}return n}},t.addGetEntitlementTelemetry=function(e,t){return async function(...t){const r=new o.TelemetryActivity("get-entitlement",s.telemetryService);let n=c.EntitlementError.requestFailure;try{n=await e.call(this,...t)}catch(e){throw r.addOrUpdateProperties({error:e instanceof Error?e.name:"error"}),e}finally{const e=t[0],o=t[1];r.end(),r.addOrUpdateProperties({succeeded:String(n instanceof c.Entitlement),isSessionUpdated:String(o)}),g(r,e),h(r),p(r,n),r.sendTelemetry()}return n}}},4964(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isInDevBox=t.isInCodeSpaces=t.EventBouncer=t.ErrorWithProperties=t.httpsGet=t.daysPassedSince=t.setVersionForUserAgent=void 0;const n=r(5692),o=r(1398);let i="CSharp-DevKit-Identity/1.0.0";t.setVersionForUserAgent=function(e){i=`CSharp-DevKit-Identity/${e}`},t.daysPassedSince=function(e){return Math.floor((Date.now()-e.getTime())/864e5)},t.httpsGet=function(e,t){return new Promise((r,o)=>{const a={json:!0,headers:{Authorization:"bearer "+t,"User-Agent":i}},c=n.get(e,a,t=>{let n=[];t.on("data",e=>n.push(e)),t.on("end",()=>{const i=n.join(""),a=t.statusCode;a&&a>199&&a<300&&i?r(i):o(new s(`Request to ${e} failed with status code: ${a} and response "${i}"`,{statusCode:String(a),content:i,uri:e}))})});c.on("error",e=>o(e)),c.end()})};class s extends Error{properties;constructor(e,t){super(e),this.properties=t}}t.ErrorWithProperties=s,t.EventBouncer=class{#T=!1;stop(){this.#T=!1}raiseNext(){this.#T=!0}createEventHandler(e){return t=>{this.#T&&(this.stop(),e(t))}}},t.isInCodeSpaces=function(){return"codespaces"===o.env.remoteName},t.isInDevBox=function(){return"true"===process.env.IsDevBox?.toLocaleLowerCase()}},3116(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CHECK_REQUIREMENTS_WEBVIEW_ID=t.INSTALL_SDK_WEBVIEW_ID=t.EXTENSION_ID=t.RECOMMENDED_VERSION_API_OLD=t.DOTNET_INSTALL_TOOL_EXTENSION_ID=t.OPTION_TO_CHECK_AND_ACQUIRE_ASPNETCORE=t.AVAILABLE_INSTALLS_API=t.FIND_PATH_API=t.ACQUIRE_RUNTIME_API=t.ACQUIRE_SDK_GLOBAL_API=t.AVAILABLE_VERSIONS_API=t.RECOMMENDED_VERSION_API=void 0,t.RECOMMENDED_VERSION_API="dotnet.recommendedVersion",t.AVAILABLE_VERSIONS_API="dotnet.listVersions",t.ACQUIRE_SDK_GLOBAL_API="dotnet.acquireGlobalSDK",t.ACQUIRE_RUNTIME_API="dotnet.acquire",t.FIND_PATH_API="dotnet.findPath",t.AVAILABLE_INSTALLS_API="dotnet.availableInstalls",t.OPTION_TO_CHECK_AND_ACQUIRE_ASPNETCORE="dotnet.acquireStatus/options",t.DOTNET_INSTALL_TOOL_EXTENSION_ID="ms-dotnettools.vscode-dotnet-runtime",t.RECOMMENDED_VERSION_API_OLD="placeholder.dotnet.oldApiCallWhichNoLongerExists",t.EXTENSION_ID="ms-dotnettools.csdevkit",t.INSTALL_SDK_WEBVIEW_ID="csdevkit.installDotnetSdk",t.CHECK_REQUIREMENTS_WEBVIEW_ID="csdevkit.checkDotnetRequirements"},354(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getInstalledRuntimes=t.getInstalledSDKs=t.getAvailableRuntimeVersions=t.getAllSuggestedSDKVersions=t.acquireRuntimeForUser=t.acquireSDK=t.getAlternativeRecommendedVersions=t.getRecommendedVersion=t.apiIsAvailable=void 0;const n=r(3116),o=r(1398);function i(e){const t=o.extensions?.getExtension(n.DOTNET_INSTALL_TOOL_EXTENSION_ID),r=t?.packageJSON.version;if(!r)return!1;switch(e){case n.RECOMMENDED_VERSION_API:return r>="2.0.3";case n.AVAILABLE_VERSIONS_API:return r>="2.0.2";case n.ACQUIRE_SDK_GLOBAL_API:return r>="2.2.8";case n.RECOMMENDED_VERSION_API_OLD:return r>="2.0.2";case n.OPTION_TO_CHECK_AND_ACQUIRE_ASPNETCORE:return r>="2.0.9";case n.FIND_PATH_API:return r>="2.2.9";case n.AVAILABLE_INSTALLS_API:return r>="2.1.0";default:return!1}}t.apiIsAvailable=i;const s={version:"8.0.100",channelVersion:"8.0",supportStatus:"lts",supportPhase:"active"};async function a(){const e={listRuntimes:!1};if(i(n.RECOMMENDED_VERSION_API)){const t=await o.commands.executeCommand(n.RECOMMENDED_VERSION_API,e);if(t&&t.at(0))return t.at(0)}else if(i(n.RECOMMENDED_VERSION_API_OLD)){const t=await o.commands.executeCommand(n.RECOMMENDED_VERSION_API,e);if(t)return{version:t,channelVersion:`${t.split(".").at(0)}.${t.split(".").at(1)}`,supportStatus:Number(t.charAt(0))%2==0?"lts":"sts",supportPhase:"eol"}}return o.window.showWarningMessage("Unable to get latest .NET Installation Data: Please update the .NET Install Tool to version 2.0.2 or later."),s}async function c(){const e={listRuntimes:!1};if(i(n.AVAILABLE_VERSIONS_API)){const t=(await o.commands.executeCommand(n.AVAILABLE_VERSIONS_API,e)).filter(e=>"maintenance"===e.supportPhase||"active"===e.supportPhase).slice(1,3);if(t)return t}return o.window.showWarningMessage("Unable to get latest .NET Installation Data: Please update the .NET Install Tool to version 2.0.2 or later."),[s,s]}function l(e){return o.window.showErrorMessage(e.message),null}t.getRecommendedVersion=a,t.getAlternativeRecommendedVersions=c,t.acquireSDK=async function(e){const t={version:e.version,requestingExtensionId:n.EXTENSION_ID,installType:"global",architecture:void 0};if(i(n.ACQUIRE_SDK_GLOBAL_API))try{o.window.showInformationMessage("The .NET Install Tool began installing the .NET SDK. You may be asked for permission to complete the installation.");const e=await o.commands.executeCommand(n.ACQUIRE_SDK_GLOBAL_API,t);return e&&e.dotnetPath?(o.window.showInformationMessage(`Installation of the .NET SDK version ${t.version} succeeded.`),e):l(new Error("The .NET Install Tool returned an unexpected result. Please view the 'Output' -> '.NET Install Tool' window for more info."))}catch(e){return l(e instanceof Error?e:new Error("The .NET Install Tool failed to install the .NET SDK. Please view the 'Output' -> '.NET Install Tool' window for more info."))}else o.window.showErrorMessage("Unable to install the .NET SDK: The .NET Install Tool must be updated to version 2.2.8 or later.");return null},t.acquireRuntimeForUser=async function(e){const{acquireLocalDotNetVersion:t}=await Promise.resolve().then(()=>r(1760));return t(e)},t.getAllSuggestedSDKVersions=async function(){return{recommended:await a(),alternatives:await c()}},t.getAvailableRuntimeVersions=async function(){const e={listRuntimes:!0};return i(n.AVAILABLE_VERSIONS_API)?(await o.commands.executeCommand(n.AVAILABLE_VERSIONS_API,e)).filter(e=>"maintenance"===e.supportPhase||"active"===e.supportPhase):[]},t.getInstalledSDKs=async function(){const e={mode:"sdk",requestingExtensionId:n.EXTENSION_ID},t=o.extensions?.getExtension(n.DOTNET_INSTALL_TOOL_EXTENSION_ID);if(!t)return console.error("[getInstalledSDKs] .NET Install Tool extension not found"),[];if(!t.isActive)try{await t.activate(),await new Promise(e=>setTimeout(e,100))}catch(e){return console.error("[getInstalledSDKs] Failed to activate extension:",e),[]}if(i(n.AVAILABLE_INSTALLS_API))try{const t=await o.commands.executeCommand(n.AVAILABLE_INSTALLS_API,e);if(t&&Array.isArray(t))return t.map(e=>e.version)}catch(e){return console.error("[getInstalledSDKs] Error:",e),[]}return[]},t.getInstalledRuntimes=async function(e){const t={mode:"runtime",requestingExtensionId:n.EXTENSION_ID},r=o.extensions?.getExtension(n.DOTNET_INSTALL_TOOL_EXTENSION_ID);if(!r)return console.error("[getInstalledRuntimes] .NET Install Tool extension not found"),[];if(!r.isActive)try{await r.activate(),await new Promise(e=>setTimeout(e,100))}catch(e){return console.error("[getInstalledRuntimes] Failed to activate extension:",e),[]}const s=[],a=new Set,c=new Set;if(i(n.AVAILABLE_INSTALLS_API))try{const e=await o.commands.executeCommand(n.AVAILABLE_INSTALLS_API,t);if(e&&Array.isArray(e))for(const t of e){const e=`${t.mode}:${t.version}`;if(c.has(e))continue;s.push({version:t.version,mode:t.mode,source:"global"}),c.add(e);const r=t.version.split(".").slice(0,2).join(".");a.add(`${t.mode}:${r}`)}}catch(e){console.error("[getInstalledRuntimes] Error searching global hive:",e)}if(e&&e.length>0)for(const t of e){const e=t.replace(/^net/,"").split(".").slice(0,2).join(".");if(!a.has(`runtime:${e}`))try{const t={version:e,requestingExtensionId:n.EXTENSION_ID,mode:"runtime"},r=await o.commands.executeCommand("dotnet.acquireStatus",t);r?.dotnetPath&&(s.push({version:e,mode:"runtime",source:"vscode-hive"}),a.add(`runtime:${e}`))}catch{}}return s}},9041(e,t){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.AcquireErrorConfiguration=void 0,function(e){e[e.DisplayAllErrorPopups=0]="DisplayAllErrorPopups",e[e.DisableErrorPopups=1]="DisableErrorPopups"}(r||(t.AcquireErrorConfiguration=r={}))},4989(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getNonce=t.openExternalLinkFromWebview=t.webviewCmdLinkHandler=t.encodeExternalLinkWithTelemetry=t.encodeCommandUriWithTelemetry=t.getInstalledRuntimes=t.getInstalledSDKs=t.getAvailableRuntimeVersions=t.getAllSuggestedSDKVersions=t.acquireRuntimeForUser=t.acquireSDK=t.getAlternativeRecommendedVersions=t.getRecommendedVersion=t.apiIsAvailable=t.CHECK_REQUIREMENTS_WEBVIEW_ID=t.INSTALL_SDK_WEBVIEW_ID=t.EXTENSION_ID=t.RECOMMENDED_VERSION_API_OLD=t.DOTNET_INSTALL_TOOL_EXTENSION_ID=t.OPTION_TO_CHECK_AND_ACQUIRE_ASPNETCORE=t.AVAILABLE_INSTALLS_API=t.FIND_PATH_API=t.ACQUIRE_SDK_GLOBAL_API=t.AVAILABLE_VERSIONS_API=t.RECOMMENDED_VERSION_API=t.AcquireErrorConfiguration=void 0;var n=r(9041);Object.defineProperty(t,"AcquireErrorConfiguration",{enumerable:!0,get:function(){return n.AcquireErrorConfiguration}});var o=r(3116);Object.defineProperty(t,"RECOMMENDED_VERSION_API",{enumerable:!0,get:function(){return o.RECOMMENDED_VERSION_API}}),Object.defineProperty(t,"AVAILABLE_VERSIONS_API",{enumerable:!0,get:function(){return o.AVAILABLE_VERSIONS_API}}),Object.defineProperty(t,"ACQUIRE_SDK_GLOBAL_API",{enumerable:!0,get:function(){return o.ACQUIRE_SDK_GLOBAL_API}}),Object.defineProperty(t,"FIND_PATH_API",{enumerable:!0,get:function(){return o.FIND_PATH_API}}),Object.defineProperty(t,"AVAILABLE_INSTALLS_API",{enumerable:!0,get:function(){return o.AVAILABLE_INSTALLS_API}}),Object.defineProperty(t,"OPTION_TO_CHECK_AND_ACQUIRE_ASPNETCORE",{enumerable:!0,get:function(){return o.OPTION_TO_CHECK_AND_ACQUIRE_ASPNETCORE}}),Object.defineProperty(t,"DOTNET_INSTALL_TOOL_EXTENSION_ID",{enumerable:!0,get:function(){return o.DOTNET_INSTALL_TOOL_EXTENSION_ID}}),Object.defineProperty(t,"RECOMMENDED_VERSION_API_OLD",{enumerable:!0,get:function(){return o.RECOMMENDED_VERSION_API_OLD}}),Object.defineProperty(t,"EXTENSION_ID",{enumerable:!0,get:function(){return o.EXTENSION_ID}}),Object.defineProperty(t,"INSTALL_SDK_WEBVIEW_ID",{enumerable:!0,get:function(){return o.INSTALL_SDK_WEBVIEW_ID}}),Object.defineProperty(t,"CHECK_REQUIREMENTS_WEBVIEW_ID",{enumerable:!0,get:function(){return o.CHECK_REQUIREMENTS_WEBVIEW_ID}});var i=r(354);Object.defineProperty(t,"apiIsAvailable",{enumerable:!0,get:function(){return i.apiIsAvailable}}),Object.defineProperty(t,"getRecommendedVersion",{enumerable:!0,get:function(){return i.getRecommendedVersion}}),Object.defineProperty(t,"getAlternativeRecommendedVersions",{enumerable:!0,get:function(){return i.getAlternativeRecommendedVersions}}),Object.defineProperty(t,"acquireSDK",{enumerable:!0,get:function(){return i.acquireSDK}}),Object.defineProperty(t,"acquireRuntimeForUser",{enumerable:!0,get:function(){return i.acquireRuntimeForUser}}),Object.defineProperty(t,"getAllSuggestedSDKVersions",{enumerable:!0,get:function(){return i.getAllSuggestedSDKVersions}}),Object.defineProperty(t,"getAvailableRuntimeVersions",{enumerable:!0,get:function(){return i.getAvailableRuntimeVersions}}),Object.defineProperty(t,"getInstalledSDKs",{enumerable:!0,get:function(){return i.getInstalledSDKs}}),Object.defineProperty(t,"getInstalledRuntimes",{enumerable:!0,get:function(){return i.getInstalledRuntimes}});var s=r(2544);Object.defineProperty(t,"encodeCommandUriWithTelemetry",{enumerable:!0,get:function(){return s.encodeCommandUriWithTelemetry}}),Object.defineProperty(t,"encodeExternalLinkWithTelemetry",{enumerable:!0,get:function(){return s.encodeExternalLinkWithTelemetry}}),Object.defineProperty(t,"webviewCmdLinkHandler",{enumerable:!0,get:function(){return s.webviewCmdLinkHandler}}),Object.defineProperty(t,"openExternalLinkFromWebview",{enumerable:!0,get:function(){return s.openExternalLinkFromWebview}}),Object.defineProperty(t,"getNonce",{enumerable:!0,get:function(){return s.getNonce}})},2544(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getNonce=t.openExternalLinkFromWebview=t.webviewCmdLinkHandler=t.encodeExternalLinkWithTelemetry=t.encodeCommandUriWithTelemetry=void 0;const n=r(1398),o=r(3130),i=r(6982);function s(e,t,r,n){const o={webview:e,identifier:t,command:r,args:n};return`command:csdevkit.webview.runCommand?${encodeURIComponent(JSON.stringify(o))}`}async function a(e){const{webview:t,identifier:r,command:i,args:s}=e;(0,o.sendInfo)("",{name:"openWebviewUrl",webview:t,identifier:r}),void 0!==s?await n.commands.executeCommand(i,...s):await n.commands.executeCommand(i)}t.encodeCommandUriWithTelemetry=s,t.encodeExternalLinkWithTelemetry=function(e,t,r){return s(e,t,"csdevkit.helper.openUrl",[r])},t.webviewCmdLinkHandler=a,t.openExternalLinkFromWebview=async function(e,t,r){await a({webview:e,identifier:t,command:"csdevkit.helper.openUrl",args:[r]})},t.getNonce=function(){const e=new Uint8Array(16),t=i.getRandomValues(e),r=String.fromCharCode(...t);return btoa(r)}},5811(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.executeAddExistingProject=t.handleProjectFileCreateBatch=t.handleProjectFileCreate=t.handleProjectFileDelete=t.handleProjectFileRename=t.getProjectBuildOutputDirs=t.getReferencingProjects=t.getProjectFromPath=t.getKnownProjectFilesInFolder=t.findCsprojFiles=t.PROJECT_FILE_EXCLUDE_GLOB=void 0;const n=r(1398),o=r(680),i=r(5492),s=r(4724),a=r(5125),c=r(9687),l=r(9687),u=r(9409),d=r(6928);async function p(e){if((0,u.pathHasExtension)(e,".csproj"))try{return await n.workspace.fs.stat(n.Uri.file(e)),[e]}catch{return[]}const r=new n.RelativePattern(n.Uri.file(e),"**/*.csproj");return(await n.workspace.findFiles(r,t.PROJECT_FILE_EXCLUDE_GLOB)).map(e=>e.fsPath)}async function h(e,t){const r={context:"Projects",query:{$properties:["Path"],ProjectReferences:{$properties:["ReferencedProjectPath"],$where:{"==":[{".":"ReferencedProjectPath"},e]}},$where:{any:{".":"ProjectReferences"}}}},s=await t.executeQuery(r),a=s.Items?.map(e=>e.Path).filter(e=>!!e)??[];return 0===a.length?[]:(await Promise.all(a.map(async t=>{try{const r=await n.workspace.fs.readFile(n.Uri.file(t)),o=Buffer.from(r).toString("utf8");return(0,i.csprojHasLiteralProjectReferenceTo)(o,d.dirname(t),e)?t:void 0}catch(e){return void o.logger.log(`Failed to read ${t} while filtering referencing projects: ${e}`)}}))).filter(e=>void 0!==e)}async function f(e){if(0===e.length)return;const t=await(0,a.getOpenedSolution)();if(!t)return;const r=c.getActiveWorkspaceRoot();await o.logger.watch("Add existing projects",async()=>{const n=o.environmentStateManager?.isSolutionGeneratedOutsideWorkspace()??!1,i=[];for(const t of e)if(!await(0,l.doesSolutionContainProjectByPath)(t)){if(!n){const e=d.parse(t).name;if(await(0,l.doesSolutionContainProject)(e))continue}i.push(t)}if(0!==i.length){for(const e of i)try{await c.addProjectToSolution(r,t,e)}catch(t){o.logger.log(`Failed to add ${e} to solution: ${t}`)}if(await(0,a.reloadSolution)(t),".slnf"===d.extname(t).toLowerCase()){const e=c.getExtensionBrokerService(),t=await e.getProxy(s.default.solutionFileService);try{for(const e of i)try{await(t?.addProjectToFilter(e))}catch(t){o.logger.log(`Failed to add ${e} to solution filter: ${t}`)}}finally{t?.dispose()}}}})}t.PROJECT_FILE_EXCLUDE_GLOB="**/{node_modules,bin,obj,.git,.vs,out,dist,.nuget,packages}/**",t.findCsprojFiles=p,t.getKnownProjectFilesInFolder=async function(e,t){const r={context:"Projects",query:{$properties:["Path"],$filter:{ProjectsByCapabilities:["!SharedAssetsProject"]}}};try{const n=await t.executeQuery(r);if(n.Items?.length){const t=d.normalize(e),r=n.Items.filter(e=>{if(!e.Path)return!1;const r=d.normalize(e.Path),n=d.relative(t,r);return""!==n&&!n.startsWith("..")&&!d.isAbsolute(n)}).map(e=>e.Path);if(r.length>0)return r}}catch(t){o.logger.log(`Project query for folder ${e} failed, falling back to file scan: ${t}`)}return p(e)},t.getProjectFromPath=async function(e,t,r){const n=!r,o=r??await t.getProxy(s.default.environmentService);if(o)try{return await o.getProjectByFullPath(e)}finally{n&&o.dispose()}},t.getReferencingProjects=h,t.getProjectBuildOutputDirs=async function(e,t){const r=d.dirname(e),n=[d.join(r,"obj"),d.join(r,"bin")],i={context:"Projects",query:{$properties:["Path","ActiveConfigurations"],ActiveConfigurations:{$properties:["Name","Properties"],Properties:{$properties:["Name","Value"],$filter:{PropertiesByName:[["BaseIntermediateOutputPath","BaseOutputPath"]]}}},$filter:{ProjectsByPath:[[e]]}}};try{const e=await t.executeQuery(i),o=e.Items?.[0]?.ActiveConfigurations?.[0]?.Properties;if(!o?.length)return n;const s=[];for(const e of["BaseIntermediateOutputPath","BaseOutputPath"]){const t=o.find(t=>t.Name===e)?.Value;t?s.push(d.resolve(r,t)):s.push(d.join(r,"BaseIntermediateOutputPath"===e?"obj":"bin"))}return s}catch(t){return o.logger.log(`Failed to query build output paths for ${e}, falling back to obj/bin: ${t}`),n}},t.handleProjectFileRename=async function(e,t,r,a,l,u,p,h){try{await async function(e,t,r,n){await o.logger.watch("Rename Project in Solution File",async function(){const i=n??await r.getProxy(s.default.solutionFileService);if(i)try{const r=await c.getRelativePathToSolution(t);await i.moveProject(e,r)}catch(e){throw o.logger.log(`Error renaming project in solution file with error: ${e}`),e}finally{n||i.dispose()}})}(r,t,a,h),await async function(e,t,r){0!==r.length&&await Promise.all(r.map(async r=>{try{const o=n.Uri.file(r),s=await n.workspace.fs.readFile(o),a=Buffer.from(s).toString("utf8"),c=(0,i.updateProjectReferenceInCsprojXml)(a,d.dirname(r),t,e);if(c===a)return;await n.workspace.fs.writeFile(o,Buffer.from(c,"utf8"))}catch(e){o.logger.log(`Failed to update <ProjectReference> in ${r}: ${e}`)}}))}(t,e,l)}catch(r){o.logger.log(`Failed to sync solution for rename of ${e} to ${t}: ${r instanceof Error?r.message:r}`)}finally{p?.dispose()}},t.handleProjectFileDelete=async function(e,t,r,a,c,u){try{await(0,l.doesSolutionContainProjectByPath)(e)&&await async function(e,t,r){await o.logger.watch("Remove Project from Solution File",async function(){const n=r??await t.getProxy(s.default.solutionFileService);if(n)try{await n.removeProjectViaPath(e)}catch(e){throw o.logger.log(`Error removing project from solution file with error: ${e}`),e}finally{r||n.dispose()}})}(e,t,u);const c=a??await async function(e,t){try{return await h(e,t)}catch(t){return o.logger.log(`Failed to collect referencing projects for ${e} in OS-watcher fallback: ${t}`),[]}}(e,r);await async function(e,t,r){if(0!==t.length){try{await async function(e,t){const r={update:{target:{context:"Projects",query:{$get:{ProjectReferences:{$where:1===t.length?{"==":[{".":"ReferencedProjectPath"},t[0]]}:{or:t.map(e=>({"==":[{".":"ReferencedProjectPath"},e]}))}}}}},steps:["Delete"]}};!function(e){if(e)throw e.forEach(e=>{o.logger.log(e.Message)}),new Error}((await e.executeAction(r)).Errors)}(r,[e])}catch(t){o.logger.log(`Project-query delete of references to ${e} failed: ${t}. Falling back to text edit.`)}await Promise.all(t.map(t=>async function(e,t){let r;try{const t=n.Uri.file(e),o=await n.workspace.fs.readFile(t);r=Buffer.from(o).toString("utf8")}catch(t){return void o.logger.log(`Could not read ${e} for reference cleanup: ${t}`)}const s=d.dirname(e),a=(0,i.removeProjectReferenceFromCsprojXml)(r,s,t);if(a!==r)try{const t=n.Uri.file(e);await n.workspace.fs.writeFile(t,Buffer.from(a,"utf8"))}catch(t){o.logger.log(`Failed to write cleaned reference list for ${e}: ${t}`)}}(t,e)))}}(e,c,r)}catch(t){o.logger.log(`Failed to sync solution for delete of ${e}: ${t instanceof Error?t.message:t}`)}finally{c?.dispose()}},t.handleProjectFileCreate=async function(e){await f([e])},t.handleProjectFileCreateBatch=f,t.executeAddExistingProject=async function(e,t,r,n){await o.logger.watch("Add existing project",async()=>{if(!await(0,l.doesSolutionContainProjectByPath)(t)){if(!o.environmentStateManager?.isSolutionGeneratedOutsideWorkspace()){const e=d.parse(t).name;if(await(0,l.doesSolutionContainProject)(e))return}if(await c.addProjectToSolution(e,r,t,n),await(0,a.reloadSolution)(r),".slnf"===d.extname(r).toLowerCase()){const e=c.getExtensionBrokerService(),r=await e.getProxy(s.default.solutionFileService);try{await(r?.addProjectToFilter(t))}finally{r?.dispose()}}}})}},5059(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.startsWithInvariantIgnoreCase=t.equalsInvariantIgnoreCase=t.nugetStrings=t.hotReloadStrings=t.vsCodeAzureFunctionExtensionServiceStrings=t.dotnetDebugConfigurationServiceStrings=t.debugProjectLaunchStrings=t.codeCoverageStrings=t.formatTestString=t.testExplorerStrings=t.messageStrings=t.errorStrings=t.promptStrings=t.addNewItemUiStrings=t.NuGet=t.showError=t.chooseSolutionToOpen=t.openDocument=t.licenseViolationMessage=void 0;const n=r(1398),o=r(2477);o.config({bundleFormat:o.BundleFormat.standalone,locale:n.env.language,messageFormat:o.MessageFormat.both});const i=o.loadMessageBundle(r(6928).join(__dirname,"strings.ts"));t.licenseViolationMessage=i(0,null),t.openDocument=i(1,null),t.chooseSolutionToOpen=i(2,null),t.showError=i(3,null);class s{static restoreFailure=i(4,null);static requiresCredentialsMessage=i(5,null);static showDeviceCodeLoginInfo=i(6,null)}function a(e,t){return 0===e.localeCompare(t,"en",{sensitivity:"accent"})}t.NuGet=s,t.addNewItemUiStrings={noSdkFound:i(7,null),createNewProject:i(8,null),searchForTemplates:i(9,null),waitingTemplateService:i(10,null),installMaui:i(11,null),mauiExtensionNotFound:i(12,null),nameNewProject:i(13,null),noProjectName:i(14,null),onlyRelative:i(15,null),outsideDirectory:i(16,null),pathInvalidChars:i(17,null),pathTooLong:i(18,null),projectDirectoryExists:i(19,null),solutionContainsItem:e=>i(20,null,e),locationForNewProject:i(21,null),projectCreatedIn:e=>i(22,null,e),defaultDirectory:i(23,null),chooseDirectory:i(24,null),projectLocation:i(25,null),createProject:i(26,null),showTemplateOptions:i(27,null),templateOptions:i(28,null),createProjectOrViewOptions:i(29,null),selectOption:i(30,null),selectOptionToConfigure:i(31,null),default:i(32,null),selected:i(33,null),configureOption:e=>i(34,null,e),specifyValue:e=>i(35,null,e),trueValue:i(36,null),falseValue:i(37,null),custom:i(38,null),createNewFile:i(39,null),addExistingFileToSolutionFolder:e=>i(40,null,e),addExistingFileToProject:e=>i(41,null,e),yes:i(42,null),cancel:i(43,null),nameNewFile:i(44,null),noFileName:i(45,null),fileExists:i(46,null),selectProjectForNewFile:i(47,null),selectProjectPlaceholder:i(48,null),selectProjectForLinkedFile:i(49,null),selectProjectForLinkedFilePlaceholder:i(50,null),noProjectNewFile:i(51,null),noProjectNewFileDescription:i(52,null),projectsSeparator:i(53,null),standaloneFileSeparator:i(54,null),newSolutionFileName:i(55,null),locationForNewSolutionFile:i(56,null),noSolution:i(57,null),solutionAlreadyExists:i(58,null),selectSolutionFileFormat:i(59,null),slnFileFormat:i(60,null),slnxFileFormat:i(61,null)},t.promptStrings={selectProject:i(62,null),selectReferenceProject:i(63,null),selectSourceProject:i(64,null),selectReferenceToRemove:i(65,null),selectProjectOrSolution:i(66,null),multiSelectProjectOrSolution:i(67,null),noProjectsFoundInWorkspace:i(68,null),noProjectsFoundInFolder:i(69,null),selectProjectsInFolder:i(70,null),multiSelectProjectsInFolder:i(71,null),selectProjectTitle:i(72,null),projectsSeparatorLabel:i(73,null),loadedProjectsSeparatorLabel:i(74,null),unloadedSeparatorLabel:i(75,null),solutionSeparatorLabel:i(76,null),workspaceSeparatorLabel:i(77,null),addExistingFile:i(78,null),addLinkedFile:i(79,null),selectFile:i(80,null),yes:i(81,null),no:i(82,null),ok:i(83,null),cancel:i(84,null),dismiss:i(85,null),addExistingProject:i(86,null),deleteConfirmation:e=>i(87,null,e),newFolderName:i(88,null),newSolutionFolder:i(89,null),removeItemConfirmation:e=>i(90,null,e),newName:i(91,null),moreInformation:i(92,null),chooseProjectToOpen:i(93,null),mentionSolutionsAvailable:i(94,null),chooseToOpen:i(95,null),chooseProjectFileLabel:i(96,null),projectFilesFilterName:i(97,null),doNotOpenSolution:i(98,null),openProjectLog:i(99,null),openLog:i(100,null),doNotShowInWorkspaceAgain:i(101,null),openSettings:i(102,null),openLogChannel:i(103,null),disableExtensionButton:i(104,null),doNotShowAgain:i(105,null),reloadOnConfigurationChange:i(106,null),reloadWindow:i(107,null),selectConfiguration:i(108,null),selectPlatform:i(109,null),dragDropSolutionNode:(e,t)=>i(110,null,e,t),overwriteExistingItem:e=>i(111,null,e),addSolutionItemNotSupportedWorkspaceBased:i(112,null),addSolutionItemNotSupportedSolutionless:i(113,null),addProjectIsNotSupportedForSlnx:i(114,null),rebuildAndApplyChanges:i(115,null),continueEditing:i(116,null),workspaceTrustMessage:i(117,null),workspaceTrustDetail:i(118,null),manageWorkspaceTrust:i(119,null),learnMore:i(120,null),walkMeThrough:i(121,null),forceOpenSolutionModal:i(122,null),openSolution:i(123,null),openNewWorkspace:i(124,null)},t.errorStrings={noName:i(125,null),solutionContainsItem:e=>i(126,null,e),folderContainsItem:e=>i(127,null,e),pathTooLong:i(128,null),pathInvalidChars:i(129,null),noSolution:i(130,null),noSolutionInWorkspace:i(131,null),openSolutionFilterFailed:i(132,null),errorDuringOpenSolution:e=>i(133,null,e),errorDuringReloadSolution:e=>i(134,null,e),unsupportedProject:i(135,null),addingOutsideWorkspace:(e,t)=>i(136,null,e,t),deleteOperationFailed:e=>i(137,null,e),newFolderFailed:e=>i(138,null,e),fileOrFolderAlreadyExists:i(139,null),linkedFileAlreadyInProject:(e,t)=>i(140,null,e,t),fileNameAlreadyInProject:(e,t)=>i(141,null,e,t),linkedFileNameAlreadyInProject:(e,t)=>i(142,null,e,t),removeOperationFailed:e=>i(143,null,e),renameOperationFailed:e=>i(144,null,e),addProjectReferenceNoProjects:i(145,null),removeProjectReferenceNoProjects:i(146,null),mauiWorkloadNotFound:i(147,null),mauiExtensionNotFound:i(148,null),notSupportedDraggedItem:e=>i(149,null,e),errorMovingItem:e=>i(150,null,e),cannotFindDotnetInstallation:i(151,null),corruptedDotnetInstallation:e=>i(152,null,e),errorSaveSolutionFile:e=>i(153,null,e),errorNoSolutionDectectedForFilter:e=>i(154,null,e),errorSlnxNotSupported:e=>i(155,null,e),errorInstalledSDKNotMet:e=>i(156,null,e)},t.messageStrings={projectsStatusName:i(157,null),noSolutionLoadedStatus:i(158,null),projectsLoadingStatus:e=>i(159,null,e),projectsLoadingInProgress:i(160,null),projectsReadyState:e=>i(161,null,e),noProjectStateToolTip:i(162,null),noProjectStateCodeFileToolTip:i(163,null),fileOutsideOfProjectsToolTip:i(164,null),projectFileTooltip:i(165,null),fileInsideProjectToolTip:e=>i(166,null,e),fileInsideMultipleProjectsToolTip:i(167,null),noSolutionStateToolTip:i(168,null),projectsFailedToLoadToolTip:e=>i(169,null,e),configurationStatusName:i(170,null),configurationTooltip:i(171,null),retrievingInformationForCurrentDocumentInProgress:i(172,null),solutionFileInvalid:i(173,null),solutionExplorerNodeInvalid:i(174,null),projectNotSupported:i(175,null),solutionExplorerItemMissing:i(176,null),buildMessage:i(177,null),rebuildMessage:i(178,null),cleanMessage:i(179,null),projectsMessage:e=>i(e>1?180:181,null),publishMessage:i(182,null),buildFailedMessage:e=>i(183,null,e),buildFailedMultipleMessage:(e,t)=>i(184,null,e,t),workspaceBasedDevelopmentOpened:i(185,null),workspaceBasedDevelopmentOpenedTooltip:i(186,null),solutionFileOpened:e=>i(187,null,e),solutionFileOpenedTooltip:e=>i(188,null,e)},t.testExplorerStrings={buildFailed:i(189,null),buildAndRunTestsLabel:i(190,null),buildAndRunTestsPlaceholder:i(191,null),buildAndRunTestsNoTestProjectsSelected:i(192,null),testControllerNotAvailable:i(193,null),testDiscoveryAborted:i(194,null),showErrors:i(195,null),testAssemblyNotFound:i(196,null),buildProject:i(197,null),buildFailedForProject:i(198,null),testFailed:i(199,null),testCouldNotBeFound:i(200,null),testCouldNotBeRun:i(201,null),runningTests:i(202,null),attachments:i(203,null),testRunSummary:i(204,null),totalTests:i(205,null),passed:i(206,null),failed:i(207,null),skipped:i(208,null),resultFailed:"❌ "+i(209,null),resultSucceeded:"✅ "+i(210,null),resultAborted:"❌ "+i(211,null),testExecutionTime:i(212,null),totalTimeIncludingBuild:i(213,null),outputPassed:"✅ "+i(214,null),outputFailed:"❌ "+i(215,null),outputSkipped:"⏭️ "+i(216,null),outputErrorTestNotFound:"⚠️ "+i(217,null),outputErrorTestCouldNotRun:"⚠️ "+i(218,null),outputNotAvailable:i(219,null)},t.formatTestString=function(e,...t){return e.replace(/\{(\d+)\}/g,(e,r)=>{const n=parseInt(r,10);return n<t.length?String(t[n]):e})},t.codeCoverageStrings={invalidCoverageFile:i(220,null)},t.debugProjectLaunchStrings={notSupportedFileExtension:(e,t)=>i(221,null,e,t),errorNoConfigurations:i(222,null),errorNoLaunchTargets:e=>i(223,null,e),errorDebugMultipleConfigurations:i(224,null),errorNoProjectFound:i(225,null),errorNoOpenFolder:i(226,null),errorGenericFailedToGetConfigurations:i(227,null),selectProject:i(228,null),warnNoProjectSelected:i(229,null),selectStartupProject:i(230,null),startupProjectTitle:i(231,null),errorNoLaunchableProjects:i(232,null),errorNoStartupProjectSelected:i(233,null),errorStartupProjectNotFound:i(234,null),startupProjectLaunchConfigName:i(235,null),debugActiveFile:i(236,null),launchSettingsFileCreated:e=>i(237,null,e),errorGettingLaunchSettingsPath:e=>i(238,null,e),selectLaunchConfiguration:i(239,null),startupProjectTooltip:i(240,null),noProjectPlaceholder:i(241,null),launchConfigurationTitle:i(242,null),launchConfigurationTooltip:i(243,null),selectLaunchTargetFramework:i(244,null),debugTargetFrameworkTitle:i(245,null),debugTargetFrameworkTooltip:i(246,null),errorNoTargetFrameworksAvailable:i(247,null),projectInitializing:i(248,null),brokeredServiceLoadedTimeout:i(249,null),debugProjectLoading:i(250,null),selectProjectToConfigureDebugProperties:i(251,null),errorDebugCSFileSupport:i(252,null)},t.dotnetDebugConfigurationServiceStrings={errorMultipleDebugEngines:e=>i(253,null,e),invalidLaunchConfigurationId:e=>i(254,null,e),errorBuildTitle:i(255,null),errorBuildDetails:e=>i(256,null,e),warningMissingBuildTask:i(257,null),errorAspireLaunchMinimumVersion:e=>i(258,null,e),errorNoDebugEngine:i(259,null),hotReloadNotSupportedTitle:i(260,null),hotReloadChangeNotSupportMessage:i(261,null),hotReloadChangeNotSupportDetails:(e,t,r)=>i(262,null,e.length,t.length,r.length,e.map(e=>`- ${e.projectFilePath} (${e.targetFramework})`).join("\n"),t.map(e=>`- ${e.projectFilePath} (${e.targetFramework})`).join("\n")),hotReloadUnableToBuildChangesTitle:i(263,null),hotReloadUnableToBuildChangesDetails:e=>i(264,null,e.join("\n")),hotReloadRebuildInProgress:i(265,null),hotReloadRebuildCompleted:i(266,null),warningInvalidDebugTypeTitle:i(267,null),warningInvalidDebugTypeDetails:e=>i(268,null,e)},t.vsCodeAzureFunctionExtensionServiceStrings={errorFuncCoreToolsMissing:i(269,null),errorAzureFunctionsExtensionMissing:i(270,null),errorAzureFunctionMinimumVersion:e=>i(271,null,e),errorAzureFunctionExportsMissing:i(272,null),errorAzureFunctionStartFunc:e=>i(273,null,e)},t.hotReloadStrings={disabledInSettingsStatus:i(274,null),notSupportedForSessionStatus:i(275,null),availableStatus:i(276,null),disabledResult:i(277,null),applyUpdatesFailureResult:i(278,null),changesDetected:i(279,null),serviceNotFound:i(280,null),exceptionWhenApplying:i(281,null)},t.nugetStrings={projectPickerPlaceholder:i(282,null),projectPickerPlaceholderAdd:i(283,null),projectPickerPlaceholderUpdate:i(284,null),projectPickerPlaceholderRemove:i(285,null),packageSearchPlacholder:i(286,null),packagePickerPlaceholder:i(287,null),versionLatestLabel:i(288,null),versionCurrentLabel:i(289,null),versionOthersLabel:i(290,null),selectVersionPlaceholder:i(291,null),noPackagesFoundError:i(292,null),noVersionsFoundError:i(293,null),noPackagesToUpdateResult:i(294,null),noPackagesToRemoveResult:i(295,null),addPackageTitle:i(296,null),updatePackageTitle:i(297,null),removePackageTitle:i(298,null),addPackageNameTitle:e=>i(299,null,e),updatePackageNameTitle:e=>i(300,null,e),missingDotnetSdkError:i(301,null),missingDotnetSdkActionMessage:i(302,null),invalidJsonError:e=>i(303,null,e),prereleaseIncludedSuffix:e=>i(304,null,e),prereleaseNotIncludedSuffix:e=>i(305,null,e),viewlogs:i(306,null)},t.equalsInvariantIgnoreCase=a,t.startsWithInvariantIgnoreCase=function(e,t){return e.length>=t.length&&(e.startsWith(t)||a(e.substring(0,t.length),t))}},4056(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExperimentationTelemetry=void 0;const n=r(680);t.ExperimentationTelemetry=class{properties;measurements;constructor(){this.properties={},this.measurements={}}postEvent(e,t){let r={};t.forEach((e,t)=>{r[t]=e}),r={...this.properties,...r},n.telemetryService?.sendTelemetryEvent(e,r,this.measurements)}setSharedProperty(e,t){this.properties[e]=t}getProperties(){return this.properties}}},8955(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TelemetryActivity=void 0;const n=r(128);class o extends n.TelemetryEvent{static startTimeMeasurementName="startTimeInMilliseconds";static endTimeMeasurementName="endTimeInMilliseconds";static durationMeasurementName="ActivityDurationInMilliseconds";startTime;endTime;constructor(e,t,r){super(e,t),this.startTime=r??Date.now()}start(){this.startTime=Date.now(),this.endTime=void 0}end(){void 0!==this.startTime&&(this.endTime=Date.now())}sendTelemetry(){void 0===this.endTime&&(this.endTime=Date.now()),this.measurements[o.startTimeMeasurementName]=this.startTime,this.measurements[o.endTimeMeasurementName]=this.endTime,this.measurements[o.durationMeasurementName]=this.endTime-this.startTime,super.sendTelemetry()}}t.TelemetryActivity=o},3966(e,t,r){"use strict";function n(e){}Object.defineProperty(t,"__esModule",{value:!0}),t.tryLogTelemetryEtwErrorEvent=t.tryLogTelemetryEtwEvent=t.telemetryEtwLogger=void 0;const o={logEvent:n,logErrEvent:n,logPerfEvent:n,logInfoEvent:n,logStartCommand:n,logStopCommand:n,logStartUpdateProgram:n,logStopUpdateProgram:n,logStartUpdateGraph:n,logStopUpdateGraph:n,logStartResolveModule:n,logStopResolveModule:n,logStartParseSourceFile:n,logStopParseSourceFile:n,logStartReadFile:n,logStopReadFile:n,logStartBindFile:n,logStopBindFile:n,logStartScheduledOperation:n,logStopScheduledOperation:n},i=(0,r(2924).getNodeAddon)();t.telemetryEtwLogger=i??o,t.tryLogTelemetryEtwEvent=function(e,t,r){if(i){var n=`{"eventname":"${e}","properties":${t?JSON.stringify(t):"{}"},"measures":${r?JSON.stringify(r):"{}"}}`;i.logEvent(n)}},t.tryLogTelemetryEtwErrorEvent=function(e,t,r){if(i){var n=`{"eventname":"${e}","properties":${t?JSON.stringify(t):"{}"},"measures":${r?JSON.stringify(r):"{}"}}`;i.logErrEvent(n)}}},128(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TelemetryEvent=void 0,t.TelemetryEvent=class{eventName;telemetryService;properties;measurements;sharedProperties;constructor(e,t){this.eventName=e,this.telemetryService=t;const r=t?.getExperimentationTelemetryReporter();this.sharedProperties=r?r.getProperties():{},this.properties={},this.measurements={}}addOrUpdateProperties(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const r=e[t];r&&(this.properties[t]=r)}}addOrUpdateMeasurements(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const r=e[t];r&&(this.measurements[t]=r)}}sendTelemetry(){Object.keys(this.sharedProperties).length>0&&(this.properties={...this.sharedProperties,...this.properties}),this.telemetryService?.sendTelemetryEvent(this.eventName,this.properties,this.measurements)}}},1278(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.generateUserTempFilePath=t.readTelemetryFileAsync=t.writeTempJsonFileAsync=void 0;const n=r(9896),o=r(857),i=r(6928),s=r(680);function a(e){try{return i.basename(e)}catch(t){s.logger.reportExceptionTelemetryAndLog("getFileNameFromPath","error getting filename from path","",t,s.telemetryService,{faultingFilePath:e})}return e}function c(e,t,r){switch(process.platform){case"win32":return i.join(o.tmpdir(),`${e}`,`${t}`,`${r}`);case"darwin":return i.join(function(){const e=o.homedir();return i.join(e,"Library","Application Support")}(),`${e}`,`${t}`,`${r}`);default:return i.join(function(){let e=process.env.XDG_CACHE_HOME;if(!e){const t=o.homedir();e=i.join(t,".cache","Microsoft")}return e}(),`${e}`,`${t}`,`${r}`)}}t.writeTempJsonFileAsync=async function(e,t,r){let l=c(e,"",t);try{const c=i.dirname(l);if(await n.promises.mkdir(c,{recursive:!0}),await n.promises.writeFile(l,r,{encoding:"utf8"}),"win32"===o.platform()){let r=await async function(e,t,r){if("win32"===process.platform){if(e.indexOf("~")>0){try{e=await n.promises.realpath(e)}catch(e){return void s.logger.reportExceptionTelemetryAndLog("resolveShortPathWindows","error getting windows filepath","",e,s.telemetryService,{faultingFileName:a(r)})}e.indexOf("~")>0&&(e="string"==typeof process.env.LOCALAPPDATA?i.win32.join(process.env.LOCALAPPDATA,"Temp",`${t}`,`${r}`):i.win32.join(o.homedir(),"AppData","Local","Temp",`${t}`,`${r}`))}return e}}(l,e,t);if(void 0===r)return"";l=r}}catch(e){return s.logger?.reportExceptionTelemetryAndLog("writeTempJsonFileAsync","error writing json file","",e,s.telemetryService),""}try{process.on("exit",e=>{n.unlink(l,e=>{e&&s.logger.reportExceptionTelemetryAndLog("writeTempJsonFileAsync","error deleting temp file","",e,s.telemetryService)})})}catch(e){s.logger.reportExceptionTelemetryAndLog("writeTempJsonFileAsync","error linking process to file for deletion","",e,s.telemetryService)}return l},t.readTelemetryFileAsync=async function(e,t,r){try{let o=c(e,t,r);return n.existsSync(o)?await n.promises.readFile(o,{encoding:"utf8",flag:"r"}):""}catch(e){s.logger.reportExceptionTelemetryAndLog("readTelemetryFileAsync","error reading file","",e,s.telemetryService,{faultingFileName:r})}return""},t.generateUserTempFilePath=c},6759(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TelemetryService=t.writeCommonPropsToFileAsync=void 0;const n=r(1170),o=r(1398),i=r(5033),s=r(6982),a=r(857),c=r(1278),l=r(4724),u=r(9896),d=r(3966),p=r(6928),h=r(4056),f=r(2924);async function g(e,t){if(process.env.CommonPropertyBagPath)return t&&(t.CommonPropertyBagPath=process.env.CommonPropertyBagPath),process.env.CommonPropertyBagPath;const r=e.extension.packageJSON.name,i=e.extension.packageJSON.version,l=m.getSessionId(o.env.sessionId),d=e.extension.packageJSON.publisher,h=await async function(){try{if("win32"===process.platform)return(0,f.getNodeAddon)()?.getDeviceId()??"";if("darwin"===process.platform||"linux"===process.platform){const e="darwin"===process.platform?p.join(a.homedir(),"Library","Application Support","Microsoft","DeveloperTools"):p.join(process.env.XDG_CACHE_HOME??p.join(a.homedir(),".cache"),"Microsoft","DeveloperTools"),t=p.join(e,"deviceid");try{return await u.promises.readFile(t,"utf8")}catch{const r=(0,s.randomUUID)().toLowerCase();return await u.promises.mkdir(e,{recursive:!0}),await u.promises.writeFile(t,r,"utf8"),r}}}catch(e){console.error("[C# Dev Kit] Failed to get device ID:",e)}return""}();let g="";if("win32"===a.platform()){let t=await(0,c.readTelemetryFileAsync)(r,"Telemetry","Resources.json");try{t&&t.length>0&&(t=t.replace(/\r?\n|\r/g," ").replace(/\s+/g," ").trim(),g=JSON.parse(t))}catch(t){if(g="",e.extension.packageJSON.aiKey&&""!==e.extension.packageJSON.aiKey.trim()){let r={},o=p.join(a.tmpdir(),e.extension.packageJSON.name,"Telemetry","Resources.json"),i="false";try{u.rmSync(o,{force:!0})}catch(e){}finally{u.existsSync(o)||(i="true")}r.methodname="writecommonpropstofileasync",r.filedeletesuccess=!u.existsSync(o),function(e,t,r){let o=function(e){const t=new n.default(e.extension.packageJSON.aiKey);return e.subscriptions.push(t),t}(e),i=r??{};try{t&&(i.errormessage=t.toString(),t instanceof Error&&(i.exceptionstack=t.stack??""))}catch(t){}finally{o.sendTelemetryErrorEvent("csdevkit/extension/error",i)}}(e,t,r)}}}let v="csdevkit.release";e.extension.packageJSON.preview&&(v="csdevkit.insider");let y={"common.vscodesessionid":l,"common.devdeviceid":h,"common.extname":d+"."+r,"common.extversion":i,"common.os":a?.platform(),"common.platformversion":(a?.release()??"").replace(/^(\d+)(\.\d+)?(\.\d+)?(.*)/,"$1$2$3"),"common.vscodemachineid":o.env.machineId,"common.vscodeversion":o.version,"common.product":o.env.appHost?.toLowerCase(),"common.channelid":v,GlobalStorageUri:e.globalStorageUri.fsPath},S={version:2,commonProperties:{"common.vscodesessionid":l,"common.devdeviceid":h,"common.extname":d+"."+r,"common.extversion":i,"common.os":a?.platform(),"common.platformversion":(a?.release()??"").replace(/^(\d+)(\.\d+)?(\.\d+)?(.*)/,"$1$2$3"),"common.vscodemachineid":o.env.machineId,"common.vscodeversion":o.version,"common.product":o.env.appHost?.toLowerCase(),"common.channelid":v},sessionConfiguration:{globalStorageUri:e.globalStorageUri.fsPath,bucketFilters:g}},w=l.split("-");const E=w[0],_=w[w.length-1],b=await(0,c.writeTempJsonFileAsync)(r,`${E}.json`,JSON.stringify(y)),P=await(0,c.writeTempJsonFileAsync)(r,`${_}.json`,JSON.stringify(S));return process.env.CommonPropertyBagPath=`${b}`,process.env.CommonPropertyBagWithConfigPath=`${P}`,b}t.writeCommonPropsToFileAsync=g;class m{telemetryReporter;tokenAcquisitionService;propertyBagFilePath;sessionProperties;telemetryLogger;brokeredService;experimentationTelemetryReporter;static getSessionId(e){return"somevalue.sessionid"===e?.toLowerCase()?(0,s.randomUUID)():e}constructor(e){"true"===process.env.EnableTelemetryInOutputWindow&&(this.telemetryLogger=new i.Logger(`${e.extension.packageJSON.displayName} - Telemetry`));try{this.telemetryReporter=new n.default(e.extension.packageJSON.aiKey),e.subscriptions.push(this.telemetryReporter),this.experimentationTelemetryReporter=new h.ExperimentationTelemetry}catch(e){this.telemetryLogger?.log(`Failed to create TelemetryReporter due to ${e}`)}}getTelemetryLevel(){return"true"===process.env.PERFTEST_TELEMETRY_OPTIN?"all":this.telemetryReporter?.telemetryLevel}getExperimentationTelemetryReporter(){return this.experimentationTelemetryReporter}sendTelemetryEvent(e,t,r){this.outputTelemetryToLog(e,t,r);const n=this.experimentationTelemetryReporter?.getProperties();n&&Object.keys(n).length>0&&(t={...n,...t}),this.telemetryReporter?.sendTelemetryEvent(e,t,r),(0,d.tryLogTelemetryEtwEvent)(e,t,r)}sendTelemetryErrorEvent(e,t,r){if(null==e||""===e)return;let n="csdevkit/extension/error",o=t??{};e instanceof Error?(o.exceptiontype=e.name??"",o.exceptionStack=e.stack??""):o.errormessage="string"==typeof e?e:e.toString();const i=this.experimentationTelemetryReporter?.getProperties();i&&Object.keys(i).length>0&&(t={...i,...t}),this.outputTelemetryToLog(n,o,r),this.telemetryReporter?.sendTelemetryErrorEvent(n,o,r),(0,d.tryLogTelemetryEtwErrorEvent)(n,o,r)}sendTelemetryException(e,t,r){this.sendTelemetryErrorEvent(e,t,r)}async updateIsMicrosoftInternal(){let e=null;const t=await(this.tokenAcquisitionService?.getSessionInfo([],{silent:!0,callerId:"TelemetryService.updateIsMicrosoftInternal",requestReason:"updateIsMicrosoftInternal"}));if(t){const r=t?.idToken.split(".")[1],n=Buffer.from(r,"base64").toString("binary"),o=JSON.parse(n);e=o?.preferred_username?.toString()??null}let r=null,n=!1;if(e){var o=e.split("@");2===o.length?"microsoft.com"===o[1]?.toLowerCase()&&(n=!0,r=o[0]):this.telemetryLogger?.log(`Invalid email address format: ${e}`)}if(this.brokeredService?.hasServerProcessLoaded()){const e=await(this.brokeredService?.serviceBroker.getProxy(l.default.telemetrySessionUpdateService));try{e&&await e.updateIsMicrosoftInternal(n,r)}catch(e){this.telemetryLogger?.log(`Failed to call ITelemetrySessionUpdateService due to ${e}`)}finally{e?.dispose()}}}outputTelemetryToLog(e,t,r){if(this.telemetryLogger?.log(`Event: ${e}`),this.sessionProperties&&(t=t?{...this.sessionProperties,...t}:this.sessionProperties),this.telemetryLogger){t={...t,locallogtimestamp:this.getLocalLogTimestamp()},this.telemetryLogger.log("Properties");for(const e in t)this.telemetryLogger.log(` ${e}: ${t[e]}`)}const n=Date.now();if(r?r.hasOwnProperty("startTimeInMilliseconds")||(r.startTimeInMilliseconds=n):r={startTimeInMilliseconds:n},void 0!==r&&this.telemetryLogger){this.telemetryLogger.log("Measurements");for(const e in r)this.telemetryLogger.log(` ${e}: ${r[e]}`)}this.telemetryLogger?.log("")}getLocalLogTimestamp(){return(new Date).toISOString().replace(/T/," ").replace(/Z/,"")}async saveVSCodePropsAsync(e){if(this.propertyBagFilePath=await g(e),void 0!==this.propertyBagFilePath){const e=u.readFileSync(this.propertyBagFilePath,"utf-8"),t=JSON.parse(e);let r=null;try{const e=process.env.TEST_SESSION_TELEMETRY_PROPS;e&&(r=JSON.parse(e))}catch{}this.sessionProperties=r?{...r,...t}:t}}registerUpdateIsMicrosoftInternal(e,t){this.tokenAcquisitionService=e,this.tokenAcquisitionService.msSessionChanged(()=>this.updateIsMicrosoftInternal()),this.updateIsMicrosoftInternal()}registerForTelLevelChangeEvent(e,t){this.brokeredService=e;const r=this.telemetryReporter?.onDidChangeTelemetryLevel(async e=>{if(this.brokeredService?.hasServerProcessLoaded()){const t=await(this.brokeredService?.serviceBroker.getProxy(l.default.telemetrySessionUpdateService));try{t&&await t.updateTelemetryOptInLevel(e)}catch(e){this.telemetryLogger?.log(`Failed to call ITelemetrySessionUpdateService due to ${e}`)}finally{t?.dispose()}}});r&&t.subscriptions.push(r)}async dispose(){if(void 0!==this.telemetryReporter)return await this.telemetryReporter.dispose()}}t.TelemetryService=m},6947(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getAspireEnvironmentVars=t.connectToAspireServer=void 0;const n=r(2068);t.connectToAspireServer=async function(e,t,r){try{const t=await e.getProxy(n.InternalDescriptors.aspireServer);if(!t)throw new Error("Failed to obtain the AspireServer service proxy.");return t}catch(e){return t.error(()=>"Error connecting to AspireServer",e),r?.sendTelemetryErrorEvent(e,{context:"connecting to AspireServer"}),null}},t.getAspireEnvironmentVars=async function(e){return e?await e.GetServerConnectionEnvironmentAsync():{}}},5051(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buildAndRunTests=void 0;const n=r(1398),o=r(4701),i=r(5059);class s{label;description=void 0;data;constructor(e){this.label=e.projectName,this.description=e.projectPath,this.data=e}}t.buildAndRunTests=async()=>{const e=await(0,o.getTestController)();if(!e)return void n.window.showErrorMessage(i.testExplorerStrings.testControllerNotAvailable);const t=e.knownTestProjects(),r=new Map;for(const e of t)r.set(e.projectPath,new s(e));const c=Array.from(r.values());c.sort((e,t)=>e.label.localeCompare(t.label));const l=await a(c);if(void 0===l)return;if(0===l.length)return void n.window.showWarningMessage(i.testExplorerStrings.buildAndRunTestsNoTestProjectsSelected);const u=l.length===c.length,d=new Set(l.map(e=>e.data.projectPath)),p=[];for(const e of t)d.has(e.projectPath)&&p.push(e);const h=new n.CancellationTokenSource;try{await e.buildAndRunTests(p,u,h.token)}finally{h.dispose()}};const a=async e=>{const t=[];try{return await new Promise(r=>{const o=n.window.createQuickPick();t.push(o),o.canSelectMany=!0,o.items=e,o.selectedItems=e,o.ignoreFocusOut=!0,o.title=i.testExplorerStrings.buildAndRunTestsLabel,o.placeholder=i.testExplorerStrings.buildAndRunTestsPlaceholder;let s=!1;t.push(o.onDidAccept(()=>{s=!0,r(o.selectedItems)},this,t),o.onDidHide(()=>{s||r(void 0)},this,t)),o.show()})}finally{for(const e of t)e.dispose()}}},2679(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveConfigVariables=t.skipTargetFrameworkCompatibilityCheck=t.buildOnRunIsDisabled=t.buildOnRefreshIsDisabled=t.autoDiscoveryIsDisabled=t.nextTestIsEnabled=t._resetMonoCache=t.isMonoInstalled=void 0;const n=r(1398),o=r(5317);let i;t.isMonoInstalled=()=>{if(void 0===i)try{(0,o.execFileSync)("mono",["--version"],{stdio:"ignore",timeout:5e3}),i=!0}catch{i=!1}return i},t._resetMonoCache=()=>{i=void 0},t.nextTestIsEnabled=()=>n.workspace.getConfiguration("dotnet.testWindow").get("enableNextTest",!1),t.autoDiscoveryIsDisabled=()=>n.workspace.getConfiguration("dotnet.testWindow").get("disableAutoDiscovery",!1),t.buildOnRefreshIsDisabled=()=>n.workspace.getConfiguration("dotnet.testWindow").get("disableBuildOnRefresh",!1),t.buildOnRunIsDisabled=()=>n.workspace.getConfiguration("dotnet.testWindow").get("disableBuildOnRun",!1),t.skipTargetFrameworkCompatibilityCheck=()=>n.workspace.getConfiguration("dotnet.testWindow").get("skipTargetFrameworkCompatibilityCheck",!1),t.resolveConfigVariables=e=>{if(!e)return e;let t=e;t=t.replace(/\$\{env:([^}]+)\}/g,(e,t)=>process.env[t]??"");const r=n.workspace.workspaceFolders?.[0];return r&&(t=t.replace(/\$\{workspaceFolder\}/g,r.uri.fsPath)),t}},4348(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_DISCOVERY_RUN_SETTINGS=t.DEFAULT_EXECUTION_RUN_SETTINGS=t.TEST_EXPLORER_DISPLAY_NAME=t.TEST_CONTROLLER_ID=t.VERSIONED_NODE_ID_EXPAND_CHILDREN_VERSION=void 0,t.VERSIONED_NODE_ID_EXPAND_CHILDREN_VERSION=-1,t.TEST_CONTROLLER_ID="csdevkit-test-controller",t.TEST_EXPLORER_DISPLAY_NAME="C# Dev Kit - Test Explorer",t.DEFAULT_EXECUTION_RUN_SETTINGS='<?xml version="1.0" encoding="utf-8"?>\n<RunSettings>\n <RunConfiguration>\n <CollectSourceInformation>true</CollectSourceInformation>\n </RunConfiguration>\n <DataCollectionRunSettings>\n <DataCollectors/>\n </DataCollectionRunSettings>\n</RunSettings>',t.DEFAULT_DISCOVERY_RUN_SETTINGS='<?xml version="1.0" encoding="utf-8"?>\n<RunSettings>\n <RunConfiguration>\n <MaxCpuCount>0</MaxCpuCount>\n <CollectSourceInformation>true</CollectSourceInformation>\n </RunConfiguration>\n <DataCollectionRunSettings>\n <DataCollectors/>\n </DataCollectionRunSettings>\n</RunSettings>'},5304(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CoverageManager=void 0,t.CoverageManager=class{_collectionController;constructor(e){this._collectionController=e}setupCoverageProfile(e){this._collectionController.setupCoverageProfile(e)}startCoverageCollection(e,t,r,n){return this._collectionController.start(e,t,r,n,[])}stopCoverageCollection(e){return this._collectionController.stop(e)}}},554(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debugRefresh=t.debugTestItems=t.debugTestItem=t.debugTestMeta=t.debugTestStructure=t.debugTestNodeNesting=t.debugVersionedId=t.debugTestNodes=t.debugTestNode=void 0,t.debugTestNode=e=>`${e.id}:${e.nodeVersion} ${e.displayName} ${e.isExpandable?"expandable":""} ${e.testCaseRecordId}`,t.debugTestNodes=e=>`\n{${e.map(e=>(0,t.debugTestNode)(e)).join("}\n{")}}`,t.debugVersionedId=e=>`${e.nodeId}:${e.nodeVersion}:${e.collectionVersion}`,t.debugTestNodeNesting=e=>`[${(0,t.debugVersionedId)(e.parentNodeId)}]--${"".concat(...e.childNodeIds.map(e=>`[${(0,t.debugVersionedId)(e)}];`))}`,t.debugTestStructure=e=>`\n${e.map(e=>(0,t.debugTestNodeNesting)(e)).join("\n")}`,t.debugTestMeta=e=>{let r="";return e.forEach((e,n)=>{r+=` \n${n} => ${(0,t.debugTestNodeNesting)(e)}`}),r},t.debugTestItem=e=>`${e.id}: '${e.label}' (${e.children.size})`,t.debugTestItems=e=>{let r="";return e.forEach((e,n)=>{r+=` \n${n} => ${(0,t.debugTestItem)(e)}`}),r},t.debugRefresh=(e,r)=>`req: ${e.viewId}:${e.viewVersion}\nnodes: [${e.parentNodes.map(e=>(0,t.debugVersionedId)(e)).join(",")}]\nresp: ${r.viewId}:${r.viewVersion}\nstruct: ${(0,t.debugTestStructure)(r.structure)}\nnodes: ${(0,t.debugTestNodes)(r.tests)}`},2749(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FilePoller=void 0;const n=r(9896),o=r(4434);t.FilePoller=class{uri;pollIntervalMs;_logger;intervalId;lastKnownStat;didCreateEmitter=new o.EventEmitter;didChangeEmitter=new o.EventEmitter;didDeleteEmitter=new o.EventEmitter;constructor(e,t=2500,r){this.uri=e,this.pollIntervalMs=t,this._logger=r,this.startPolling()}onDidCreate(e){this.didCreateEmitter.on("didCreate",e)}onDidChange(e){this.didChangeEmitter.on("didChange",e)}onDidDelete(e){this.didDeleteEmitter.on("didDelete",e)}dispose(){this.intervalId&&clearInterval(this.intervalId),this.didCreateEmitter.removeAllListeners(),this.didChangeEmitter.removeAllListeners(),this.didDeleteEmitter.removeAllListeners()}startPolling(){this.intervalId=setInterval(()=>{this._logger.trace(()=>`Polling ${this.uri.fsPath}`),n.stat(this.uri.fsPath,(e,t)=>{e?this.lastKnownStat?(this.lastKnownStat=void 0,this.didDeleteEmitter.emit("didDelete",this.uri)):this._logger.trace(()=>`Error polling ${this.uri.fsPath}: ${e.message}`):this.lastKnownStat?t.mtimeMs!==this.lastKnownStat.mtimeMs&&(this.lastKnownStat=t,this.didChangeEmitter.emit("didChange",this.uri)):(this.lastKnownStat=t,this.didCreateEmitter.emit("didCreate",this.uri))})},this.pollIntervalMs)}}},2068(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InternalDescriptors=void 0;const n=r(4084);class o{static csDKTestWindowServer=Object.freeze(new n.ServiceJsonRpcDescriptor(n.ServiceMoniker.create("Microsoft.VisualStudio.CsDKTestWindow.Service","0.1"),n.Formatters.MessagePack,n.MessageDelimiters.BigEndianInt32LengthHeader,{protocolMajorVersion:3}));static csDKSourceBasedTestDiscovery=Object.freeze(new n.ServiceJsonRpcDescriptor(n.ServiceMoniker.create("Microsoft.VisualStudio.CsDKSourceBasedTestDiscovery.Service","0.1"),n.Formatters.MessagePack,n.MessageDelimiters.BigEndianInt32LengthHeader,{protocolMajorVersion:3}));static testWindowVSCodeServer=Object.freeze(new n.ServiceJsonRpcDescriptor(n.ServiceMoniker.create("Microsoft.VisualStudio.TestWindow.VSCode.Service","0.1"),n.Formatters.MessagePack,n.MessageDelimiters.BigEndianInt32LengthHeader,{protocolMajorVersion:3}));static projectSystemProviderServer=Object.freeze(new n.ServiceJsonRpcDescriptor(n.ServiceMoniker.create("Microsoft.VisualStudio.TestWindow.VSCode.ProjectSystemProvider.Service","0.1"),n.Formatters.MessagePack,n.MessageDelimiters.BigEndianInt32LengthHeader,{protocolMajorVersion:3}));static environmentService=Object.freeze(new n.ServiceJsonRpcDescriptor(n.ServiceMoniker.create("Microsoft.VisualStudio.NoDelay.EnvironmentService","0.1"),n.Formatters.MessagePack,n.MessageDelimiters.BigEndianInt32LengthHeader,{protocolMajorVersion:3}));static aspireServer=Object.freeze(new n.ServiceJsonRpcDescriptor(n.ServiceMoniker.create("Microsoft.VisualStudio.AspireRunSettingService","0.1"),n.Formatters.MessagePack,n.MessageDelimiters.BigEndianInt32LengthHeader))}t.InternalDescriptors=o},8373(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Logger=void 0;const n=r(1398),o=r(4348);t.Logger=class{outputChannel;constructor(){this.outputChannel=n.window.createOutputChannel(o.TEST_EXPLORER_DISPLAY_NAME,{log:!0}),this.outputChannel.onDidChangeLogLevel(e=>this.onLogLevelChanged(e),this),this.onDidChangeLogLevel=this.outputChannel.onDidChangeLogLevel}onLogLevelChanged(e){this.info(()=>`Log verbosity changed to: ${n.LogLevel[e]}`)}onDidChangeLogLevel;get logLevel(){return this.outputChannel.logLevel}show(e){this.outputChannel.show(e)}error(e,...t){n.LogLevel.Error>=this.outputChannel.logLevel&&this.outputChannel.logLevel!==n.LogLevel.Off&&this.outputChannel.error(e(),...t)}fromCaughtError(e){return e instanceof Error?`${e}`:"string"==typeof e?e:`${e}`}caughtError(e,t){if(n.LogLevel.Error>=this.outputChannel.logLevel&&this.outputChannel.logLevel!==n.LogLevel.Off){let r=e?e+": ":"";r+=this.fromCaughtError(t)??"unknown",this.outputChannel.error(r)}}warn(e,...t){n.LogLevel.Warning>=this.outputChannel.logLevel&&this.outputChannel.logLevel!==n.LogLevel.Off&&this.outputChannel.warn(e(),...t)}info(e,...t){n.LogLevel.Info>=this.outputChannel.logLevel&&this.outputChannel.logLevel!==n.LogLevel.Off&&this.outputChannel.info(e(),...t)}debug(e,...t){n.LogLevel.Debug>=this.outputChannel.logLevel&&this.outputChannel.logLevel!==n.LogLevel.Off&&this.outputChannel.debug(e(),...t)}trace(e,...t){n.LogLevel.Trace>=this.outputChannel.logLevel&&this.outputChannel.logLevel!==n.LogLevel.Off&&this.outputChannel.trace(e(),...t)}logWithLevel(e,t){switch(t){case n.LogLevel.Error:this.error(e);break;case n.LogLevel.Warning:this.warn(e);break;case n.LogLevel.Info:this.info(e);break;case n.LogLevel.Debug:this.debug(e);break;case n.LogLevel.Trace:this.trace(e)}}}},1467(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProjectSystemMonitor=void 0;const n=r(4434),o=r(2068);t.ProjectSystemMonitor=class{emitter=new n.EventEmitter;logger;projectSystemservice;constructor(e){this.logger=e}notifyProjectsChanged(e){return this.emitter.emit("projectChanged",e),Promise.resolve()}notifySolutionClosed(){return this.emitter.emit("solutionClosed"),Promise.resolve()}async start(e,t,r,n,i=!1){if(this.projectSystemservice=await t.getProxy(o.InternalDescriptors.projectSystemProviderServer,{clientRpcTarget:this}),!this.projectSystemservice){const e=new Error("Failed to connect to the Project System provider service.");throw this.logger.error(()=>e),e}n&&this.emitter.on("solutionClosed",n),this.emitter.on("projectChanged",r),await this.projectSystemservice.initialize(i),this.logger.debug(()=>"Initialized Project System provider.")}async getProject(e){return this.projectSystemservice?await this.projectSystemservice.getProject(e):[]}}},1052(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRunSettings=void 0;const n=r(1398),o=r(6928),i=r(9896),s=r(4348);t.getRunSettings=async function(e,t){const r=n.workspace.getConfiguration().get("dotnet.unitTests.runSettingsPath"),a=e?s.DEFAULT_DISCOVERY_RUN_SETTINGS:s.DEFAULT_EXECUTION_RUN_SETTINGS;if(!r)return t.debug(()=>"No runSettingsPath configured. Falling back to default settings."),a;t.debug(()=>`Raw runSettingsPath from configuration: ${r}`);const c=function(e){const t=n.workspace.workspaceFolders;if(!t||0===t.length)return void e.info(()=>"No workspace folders are open. Cannot determine relevant folder.");if(1===t.length)return e.debug(()=>`Only one workspace folder: ${t[0].uri.fsPath}. Using it directly.`),t[0];for(const r of t)try{const t=i.readdirSync(r.uri.fsPath),n=t.some(e=>e.endsWith(".sln")),o=t.some(e=>e.endsWith(".csproj"));if(n||o)return e.info(()=>`Selected workspace folder: ${r.uri.fsPath} (contains .sln or .csproj)`),r}catch(t){e.info(()=>`Error reading folder ${r.uri.fsPath}: ${String(t)}`)}const r=t[0];return e.info(()=>`No folder with .sln or .csproj found. Falling back to first folder: ${r.uri.fsPath}`),r}(t);if(!c)return t.warn(()=>"No valid workspace folder found. Falling back to default settings."),a;const l=function(e,t,r){if(!e||!t)return e;const o=t.uri.fsPath,i=t.name,s=n.workspace.workspaceFolders??[];r.info(()=>`Replacing variables using folder: ${o} (basename: ${i})`);const a=(e=(e=(e=e.replace(/\$\{workspaceFolder:([^}]+)\}/g,(e,t)=>{const n=s.find(e=>e.name===t);return n?n.uri.fsPath:(r.info(()=>`Warning: no workspaceFolder named '${t}' – leaving blank.`),"")})).replace(/\$\{workspaceFolder\}/g,o)).replace(/\$\{workspaceFolderBasename\}/g,i)).match(/\$\{[^}]+\}/g)||[];return a.length&&r.warn(()=>`Warning: Unsupported variables ${a.join(", ")}. Supported: \${workspaceFolder}, \${workspaceFolderBasename}, \${workspaceFolder:<name>}.`),e}(r,c,t);t.info(()=>`Resolved runSettingsPath after substitution: ${l}`);let u=l;if(o.isAbsolute(l)||(u=o.join(c.uri.fsPath,l),t.debug(()=>`Final absolutePath after path.join: ${u}`)),!i.existsSync(u))return t.warn(()=>`Runsettings file does not exist at: ${u}. Falling back to default settings.`),a;try{t.info(()=>`Using custom runsettings file at: ${u}`);const e=await n.workspace.fs.readFile(n.Uri.file(u));return(new TextDecoder).decode(e)}catch(e){return t.warn(()=>"Error reading runsettings file. Falling back to default settings.",e),a}}},4553(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaskQueue=void 0;class r{last=Promise.resolve();logger;pendingTasks=new Map;constructor(e){this.logger=e}enqueue(e,t,n){const o=r.runAfter(this.last,e,t,n,this.logger);return this.last=o.catch(()=>{}),o}enqueueMerged(e,t,n,o,i){const s=this.pendingTasks.get(e);if(s&&!s.started)return s.items.push(...t),s.promise;let a,c;const l=new Promise((e,t)=>{a=e,c=t}),u={items:t,promise:l,started:!1};this.pendingTasks.set(e,u);const d=async()=>{u.started=!0,this.pendingTasks.delete(e);const t=i(u.items),s=o(u.items);this.logger.debug(()=>`Started Task [${t}]`);try{const e=await r.withTimeout(n(u.items,s,t),s,t);return this.logger.debug(()=>`Completed Task [${t}]`),e}catch(e){const r=e instanceof Error?`${e.message}\n${e.stack}`:String(e);throw this.logger.error(()=>`Failed Task [${t}]: ${r}`),e}},p=this.last.then(()=>d());return this.last=p.catch(()=>{}),p.then(a,c),l}static async runAfter(e,t,n,o,i){try{await e.catch(()=>{}),i.debug(()=>`Started Task [${o}]`);const s=await r.withTimeout(t(),n,o);return i.debug(()=>`Completed Task [${o}]`),s}catch(e){const t=e instanceof Error?`${e.message}\n${e.stack}`:String(e);throw i.error(()=>`Failed Task [${o}]: ${t}`),e}}static withTimeout(e,t,r){return new Promise((n,o)=>{t=Math.min(t,2147483647);const i=setTimeout(()=>{o(new Error(`Task [${r}] timed out after ${t}ms`))},t);e.then(e=>{clearTimeout(i),n(e)}).catch(e=>{clearTimeout(i),o(e)})})}}t.TaskQueue=r},7502(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TelemetryEventNames=void 0,t.TelemetryEventNames=class{static ReliabilityTestControllerLoaded="vs/unittest/testwindow/testcontrollerloaded";static ReliabilityTestControllerLoadedVersionProperty="vs.unittest.testwindow.testexplorerversion";static ReliabilityRefreshButtonClicks="vs/unittest/testwindow/refreshbuttonclicks";static ReliabilityRefreshButtonClicksNumberOfTestsProperty="vs.unittest.testwindow.numberoftests";static ReliabilityTimeToRefreshEvent="vs/unittest/testwindow/timetorefresh";static ReliabilityRefreshTimeProperty="vs.unittest.testwindow.refreshtimeinms";static ReliabilityTestDiscoveryNullResultEvent="vs/unittest/testwindow/testdiscoverynullresult";static ReliabilityTestButtonsUsageEvent="vs/unittest/testwindow/testbuttonsusage";static ReliabilityZeroTestsDiscoveredEvent="vs/unittest/testwindow/zerotestsdiscovered";static ReliabilityTotalDiscoveredProjectsProperty="vs.unittest.testwindow.totaldiscoveredprojects";static ReliabilityTotalTestItemsWithSourceFileEmptyProperty="vs.unittest.testwindow.totaltestitemswithsourcefileempty";static ReliabilityTotalTestItemsProperty="vs.unittest.testwindow.totaltestitems";static ExtensionVersionProperty="vs.unittest.testwindow.extensionversion";static BuildOnRefreshDisabledProperty="vs.unittest.testwindow.buildonrefreshdisabled";static BuildOnRunDisabledProperty="vs.unittest.testwindow.buildonrundisabled";static AutoDiscoveryDisabledProperty="vs.unittest.testwindow.autodiscoverydisabled";static DiffEnabledProperty="vs.unittest.testwindow.diffenabled";static PlatformProperty="vs.unittest.testwindow.platform";static ArchitectureProperty="vs.unittest.testwindow.architecture";static DebugTestButtonUsageEventProperty="vs.unittest.testwindow.debugtestbuttonusage";static RunTestButtonUsageEventProperty="vs.unittest.testwindow.runtestbuttonusage";static CoverageTestButtonUsageEventProperty="vs.unittest.testwindow.coveragetestbuttonusage";static ExceptionEvent="vs/unittest/testwindow/exception";static TimeToPrepareTestRunEvent="vs/unittest/testwindow/timetopreparetestrun";static TestPreparationTimeProperty="vs.unittest.testwindow.preparationtimeinms";static TestBuildKindProperty="vs.unittest.testwindow.buildkind";static IntegrationTestTimeToDiscoverAllTestsEvent="vs/unittest/testwindow/integrationtesttimetodiscoveralltests";static IntegrationTestTimeToRunAllTestsEvent="vs/unittest/testwindow/integrationtesttimetorunalltests";static IntegrationTestKindProperty="vs.unittest.testwindow.integrationtestkind";static IntegrationTestTimeToRunAllTestsProperty="vs.unittest.testwindow.IntegrationTestTimeToRunAllTestsinms";static IntegrationTestTimeToDiscoverAllTestsProperty="vs.unittest.testwindow.IntegrationTestTimeToDiscoverAllTestsinms";static TimeToDiscoverTestsEvent="vs/unittest/testwindow/timetodiscovertests";static DiscoveryTimeProperty="vs.unittest.testwindow.discoverytimeinms";static NumberOfTestProjectsProperty="vs.unittest.testwindow.numtestprojects";static NumberOfTestsProperty="vs.unittest.testwindow.numtests";static IsAbortedProperty="vs.unittest.testwindow.isaborted";static FirstDiscoveryProperty="vs.unittest.testwindow.firstdiscovery";static CsDKDiscoveryLifecycleEvent="vs/unittest/csdk/discoverylifecycle";static CsDKDiscoveryNumTestsProperty="vs.unittest.csdk.discovery.numtests";static CsDKDiscoveryIsTestingPlatformProperty="vs.unittest.csdk.discovery.istestingplatform";static CsDKDiscoverySucceededProperty="vs.unittest.csdk.discovery.succeeded";static CsDKDiscoveryDurationProperty="vs.unittest.csdk.discovery.durationinms";static CsDKExecutionLifecycleEvent="vs/unittest/csdk/executionlifecycle";static CsDKExecutionNumTestsProperty="vs.unittest.csdk.execution.numtests";static CsDKExecutionNumPassedProperty="vs.unittest.csdk.execution.numpassed";static CsDKExecutionNumFailedProperty="vs.unittest.csdk.execution.numfailed";static CsDKExecutionNumSkippedProperty="vs.unittest.csdk.execution.numskipped";static CsDKExecutionIsDebugProperty="vs.unittest.csdk.execution.isdebug";static CsDKExecutionIsCoverageProperty="vs.unittest.csdk.execution.iscoverage";static CsDKExecutionIsSelectedRunProperty="vs.unittest.csdk.execution.isselectedrun";static CsDKExecutionNumProjectsProperty="vs.unittest.csdk.execution.numprojects";static CsDKExecutionSucceededProperty="vs.unittest.csdk.execution.succeeded";static CsDKExecutionDurationProperty="vs.unittest.csdk.execution.durationinms";static CsDKExecutionResultProperty="vs.unittest.csdk.execution.result";static CsDKFirstProjectAvailableEvent="vs/unittest/csdk/firstprojectavailable";static CsDKFirstProjectAvailableDurationProperty="vs.unittest.csdk.firstproject.durationinms";static CsDKFirstTestDiscoveredEvent="vs/unittest/csdk/firsttestdiscovered";static CsDKFirstTestDiscoveredDurationProperty="vs.unittest.csdk.firsttest.durationinms";static ControllerTypeProperty="vs.unittest.testwindow.controllertype";static ControllerInitCompleteEvent="vs/unittest/testwindow/controllerinitcomplete";static ControllerInitDurationProperty="vs.unittest.testwindow.initdurationinms";static FirstProjectAvailableEvent="vs/unittest/testwindow/firstprojectavailable";static FirstProjectAvailableDurationProperty="vs.unittest.testwindow.firstproject.durationinms";static FirstProjectAvailableSourceProperty="vs.unittest.testwindow.firstproject.source";static FirstTestInteractableEvent="vs/unittest/testwindow/firsttestinteractable";static FirstTestInteractableDurationProperty="vs.unittest.testwindow.firstinteractable.durationinms";static FirstTestInteractableNumTestsProperty="vs.unittest.testwindow.firstinteractable.numtests";static FirstTestInteractableTriggerProperty="vs.unittest.testwindow.firstinteractable.trigger";static E2ERunLifecycleEvent="vs/unittest/testwindow/e2erunlifecycle";static E2ERunTotalDurationProperty="vs.unittest.testwindow.e2erun.totaldurationinms";static E2ERunBuildDurationProperty="vs.unittest.testwindow.e2erun.builddurationinms";static E2ERunDiscoveryDurationProperty="vs.unittest.testwindow.e2erun.discoverydurationinms";static E2ERunExecutionDurationProperty="vs.unittest.testwindow.e2erun.executiondurationinms";static E2ERunNumProjectsProperty="vs.unittest.testwindow.e2erun.numprojects";static E2ERunNumTestsProperty="vs.unittest.testwindow.e2erun.numtests";static CsDKCacheRestoreEvent="vs/unittest/csdk/cacherestore";static CsDKCacheProjectCountProperty="vs.unittest.csdk.cache.projectcount";static CsDKCacheDurationProperty="vs.unittest.csdk.cache.durationinms";static CsDKCacheAvailableProperty="vs.unittest.csdk.cache.available";static CsDKTestFileActivationEvent="vs/unittest/csdk/testfileactivation";static CsDKActivationDurationProperty="vs.unittest.csdk.activation.durationinms";static CsDKActivationSourceProperty="vs.unittest.csdk.activation.source";static CsDKActivationProjectFoundProperty="vs.unittest.csdk.activation.projectfound";static CsDKActivationDiscoveryTriggeredProperty="vs.unittest.csdk.activation.discoverytriggered"}},6651(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestOperationScheduler=void 0;const n=r(1398),o=r(4553),i=r(9943),s=r(2679);class a{_taskQueue;_logger;_telemetryService;_serviceBroker;discoveryScheduled=new Map;testBuildOrExecutionInProgress=!1;constructor(e,t,r){this._logger=e,this._telemetryService=t,this._taskQueue=new o.TaskQueue(e),this._serviceBroker=r}static async fileStat(e){try{return await n.workspace.fs.stat(e)}catch{return}}static async fileExist(e){try{return await n.workspace.fs.stat(e),!0}catch(e){if(e instanceof n.FileSystemError&&"FileNotFound"===e.code)return!1;throw e}}static async getTimestampedProjects(e){const t=[];for(const r of e){const e=n.Uri.file(r.outputPath),o=await a.fileStat(e);t.push({mtime:o?.mtime??0,...r})}return t}static async getModifiedProjects(e){const t=[];for(const r of e){const e=n.Uri.file(r.outputPath),o=await a.fileStat(e);o&&o.mtime>r.mtime&&t.push(r)}return t}static async getModifiedProjectsSinceLastDiscovery(e){const t=[];for(const r of e){const e=n.Uri.file(r.outputPath),o=await a.fileStat(e);o&&o.mtime>parseInt(r.lastDiscovery??"0")&&t.push(r)}return t}tryScheduleDiscovery(e){const t=this.discoveryScheduled.get(e.outputPath);if(t&&e.mtime<=t){const t=new Date(e.mtime).toLocaleString();return this._logger.debug(()=>`Skipping discovery, already scheduled: ${e.outputPath} [${t}]`),!1}return this.discoveryScheduled.set(e.outputPath,e.mtime),!0}async discoverProjects(e,t){const r=[];for(const t of e){const e=n.Uri.file(t.outputPath),o=await a.fileStat(e);if(o){const e={...t,mtime:o.mtime};this.tryScheduleDiscovery(e)&&r.push(e)}else r.push({...t,mtime:0})}if(0===r.length)return void this._logger.debug(()=>"Skipping discovery, no projects to discover");const o=[];for(const e of r)if(0===e.mtime)this._logger.debug(()=>`Assembly not found for discovery: ${e.outputPath}. A build is required.`),o.push(e.outputPath);else{const t=new Date(e.mtime).toLocaleString();this._logger.debug(()=>`Scheduling discovery: ${e.outputPath} [Last modified: ${t}]`)}if(o.length>0){const e=1===o.length?"Assembly":"Assemblies",t=5,r=o.slice(0,t),n=o.length-r.length,i=n>0?` ...and ${n} more`:"";this._logger.warn(()=>`${e} not found for discovery (${o.length}): ${r.join(", ")}${i}. Use .NET Build command to build them.`)}return await this._taskQueue.enqueueMerged("discovery",r,async(e,r,n)=>{try{return await t(e)}catch(e){const t=e instanceof Error?e.message:String(e);throw this._logger.error(()=>`Discovery failed: ${t}`),this._telemetryService?.sendTelemetryErrorEvent(e,{context:"discovery task failure",description:n},{timeoutMs:r}),e}finally{for(const t of e)this.discoveryScheduled.delete(t.outputPath)}},e=>{const t=n.workspace.getConfiguration("dotnet.testWindow").get("discoveryTimeoutInSec",0);if(t>0)return 1e3*t;{let t=1e4*e.length;return t=Math.max(t,6e4),t=Math.min(t,9e5),t}},e=>`discovery: ${e.map(e=>e.outputPath).join(", ")}`)}buildProjects=async(e,t)=>{const r=await a.getTimestampedProjects(e),n=await this._serviceBroker.getProxy(i.Descriptors.buildService);if(!n)return this._logger.error(()=>"Error connecting to the build service."),{changedProjects:[],allProjects:[],success:!0,buildKind:""};let o;try{const i=new Set(e.map(e=>e.projectPath));let c=!0;if(t)o="solution",c=await n.build("");else{o="project";for(const e of i.values())await n.build(e)||(c=!1)}return(0,s.autoDiscoveryIsDisabled)()?(this._logger.debug(()=>"Skipping test auto discovery (dotnet.testWindow.disableAutoDiscovery=true) for projects "),{changedProjects:await a.getModifiedProjectsSinceLastDiscovery(e),allProjects:e,success:c,buildKind:o}):{changedProjects:await a.getModifiedProjects(r),allProjects:e,success:c,buildKind:o}}finally{n.dispose()}};async enqueueOperation(e,t,r){try{return this.testBuildOrExecutionInProgress=!0,await this._taskQueue.enqueue(()=>e(),t,r)}finally{this.testBuildOrExecutionInProgress=!1}}}t.TestOperationScheduler=a},853(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestViewManager=t.RootNodeId=void 0;const n=r(1398),o=r(6928),i=r(7433),s=r(4348),a=r(1052),c=r(554),l=r(6651),u=r(7502),d=r(5059),p=r(4553),h=r(6947),f=r(2679),g=r(3822),m=r(4603),v=r(1398);t.RootNodeId=0;const y=()=>Math.trunc(Math.random()*Math.pow(2,31)),S=e=>({parentNodeId:{nodeId:e,nodeVersion:0,collectionVersion:0},childNodeIds:[]});var w;!function(e){e.Refresh="Refresh",e.Run="Run",e.BuildAndRun="BuildAndRun"}(w||(w={})),t.TestViewManager=class{_service;_testController;_logger;_runProfile;_debugProfile;_coverageProfile;_testOperationScheduler;_testWindowTestController;_serviceBroker;_discoverBeforeRunHandler;_existingFilesCache;viewId;viewVersion=0;testItems;testItemsByTestCaseRecordId;testMeta;_telemetryService;_coverageManager;_enableTestExplorerDiff;_aspireServiceInitialized=!1;_aspireService=null;_debugTestUsageCounter=0;_runTestUsageCounter=0;_coverageUsageCounter=0;_countSourceFileEmpty=0;_countTotalTestItems=0;_e2eBuildDuration=0;_e2eDiscoveryDuration=0;_e2eExecutionDuration=0;_e2eIsDebug=!1;_e2eIsCoverage=!1;_e2eIsRunAll=!1;_e2eNumProjects=0;constructor(e,r,o,i,s,a,c,l,u){this.viewId=y(),this._service=e,this._testOperationScheduler=r,this._testWindowTestController=o,this._logger=s,this._refreshQueue=new p.TaskQueue(this._logger),this._serviceBroker=a,this._telemetryService=c,this._discoverBeforeRunHandler=l,this._coverageManager=u,this._testController=i,this._testController.refreshHandler=this.refreshHandler,this._testController.resolveHandler=this.resolveHandler,this._runProfile=this._testController.createRunProfile("Run",n.TestRunProfileKind.Run,this.runHandler,!0),n.extensions.getExtension("ms-dotnettools.csharp")?this._debugProfile=this._testController.createRunProfile("Debug",n.TestRunProfileKind.Debug,this.debugHandler,!0):this._logger.error(()=>"Please install the C# tools extension, which is required for debugging tests."),this._coverageProfile=this._testController.createRunProfile("Coverage",n.TestRunProfileKind.Coverage,this.coverageHandler,!0),this._coverageManager.setupCoverageProfile(this._coverageProfile),this.testItems=new Map,this.testItemsByTestCaseRecordId=new Map,this.testMeta=new Map,this.testMeta.set(t.RootNodeId,S(t.RootNodeId)),this._existingFilesCache=new Map,this._enableTestExplorerDiff=this.getEnableDiffOption(),n.workspace.onDidChangeConfiguration(e=>this.onConfigurationChanged(e),this)}getEnableDiffOption(){return n.workspace.getConfiguration("dotnet.testWindow").get("enableTestExplorerDiff",!0)}onConfigurationChanged(e){e.affectsConfiguration("dotnet.testWindow.enableTestExplorerDiff")&&(this._enableTestExplorerDiff=this.getEnableDiffOption(),this._logger.info(()=>"Diff feature "+(this._enableTestExplorerDiff?"enabled":"disabled")))}debugHandler=async(e,t)=>{this._debugTestUsageCounter++,await this.runTestsHelper(e,[],(e,t)=>this._service.debugTests(e,t),!1,!0,t)};runHandler=async(e,t)=>{this._runTestUsageCounter++,await this.runTestsHelper(e,[],(e,t)=>this._service.runTests(e,t),!1,!1,t)};coverageHandler=async(e,t)=>{this._coverageUsageCounter++,await this.runTestsHelper(e,[],(e,t)=>this._service.runTests(e,t),!0,!1,t)};async runTestsHelper(e,t,r,i,s,a){let c=!1,u=!1;e.include||t&&0!==t.length||(t=this._testWindowTestController.knownTestProjects(),c=!0,u=!0);const p={viewId:this.viewId,testNodes:[],sources:t,runSettings:await this.getRunSettings(!1)};if(u)await this.expandAllNodes(a);else{const r=[];let n=[];e.include&&(e.include.forEach(e=>r.push(parseInt(e.id))),n=e.include),t&&t.length>0&&[...this.testItems.entries()].filter(([,e])=>e.uri&&t.some(t=>e.uri?.fsPath===t.outputPath)).forEach(([e,t])=>{r.push(e),n.push(t)}),p.testNodes=r,await this.expandNodes(r,a)}const f=y().toString();try{this.beforeTestRun(e,u),this.testRunStartTime=performance.now(),this._e2eBuildDuration=0,this._e2eDiscoveryDuration=0,this._e2eExecutionDuration=0,this._e2eIsDebug=s,this._e2eIsCoverage=i,this._e2eIsRunAll=u,this._e2eNumProjects=t.length,this.activeTestRun?.appendOutput(`${d.testExplorerStrings.runningTests}\r\n\r\n`),a.onCancellationRequested(async()=>{this.activeTestRun?.end();const e=n.debug.activeDebugSession;e&&await n.debug.stopDebugging(e)}),await this._testOperationScheduler.enqueueOperation(async()=>{const t=performance.now(),s=await this.buildTestsIfNeeded(p,c,w.Run,a);if(this._e2eBuildDuration=performance.now()-t,!s.success)return this._logger.error(()=>"Error building your test projects. Please correct the build errors and try again."),void n.window.showErrorMessage(d.testExplorerStrings.buildFailed);if(s.changedProjects.length>0){const e=await l.TestOperationScheduler.getTimestampedProjects(s.changedProjects),{sourcesToDiscover:t}=this._testWindowTestController.filterDiscoverableProjects(e);if(t.length>0){const e=performance.now(),r=await this.discoverTestsAndRefreshTree(t,a);if(this._e2eDiscoveryDuration=performance.now()-e,!r||r.isAborted)return void this._logger.error(()=>"Test discovery failed. Tests will not be run.")}}if(await this.showTestResultsView(),i){const e=s.allProjects.map(e=>o.dirname(e.outputPath));p.runSettings=await this._coverageManager.startCoverageCollection(f,p.runSettings,this.activeTestRun,e),this._logger.debug(()=>"Starting coverage collection with run settings: "+p.runSettings)}e.profile?.kind===n.TestRunProfileKind.Debug&&this._isAspireTestProject(s.allProjects)&&(this._aspireServiceInitialized||(this._logger.debug(()=>"Aspire project detected."),this._aspireService=await(0,h.connectToAspireServer)(this._serviceBroker,this._logger,this._telemetryService),this._aspireServiceInitialized=!0),p.runSettings=await this._updateRunSettings(this._aspireService,p.runSettings));try{const e=performance.now();this.testRunResponse=await r(p,a),this._e2eExecutionDuration=performance.now()-e}catch(e){throw this._logger.caughtError("Error running tests",e),this._telemetryService?.sendTelemetryErrorEvent(e,{context:"runHandler",numberOfProjects:s.changedProjects.length.toString(),targetFramework:s.changedProjects.map(e=>e.targetFramework).join(", ")}),e}},Number.MAX_SAFE_INTEGER,`run:${Date.now()}`)}finally{i&&await this._coverageManager.stopCoverageCollection(f),await this.afterTestRun()}}_isAspireTestProject(e){return e.some(e=>e.capabilities.includes("AspireDashboard"))}async _updateRunSettings(e,t){const r=await(0,h.getAspireEnvironmentVars)(e);if(!r||0===Object.keys(r).length)return this._logger.debug(()=>"No environment variables found from Aspire server."),t;try{const e=(new m.XMLParser).parse(t);e.RunSettings||(e.RunSettings={}),e.RunSettings.RunConfiguration||(e.RunSettings.RunConfiguration={}),e.RunSettings.RunConfiguration.EnvironmentVariables||(e.RunSettings.RunConfiguration.EnvironmentVariables={});for(const[t,n]of Object.entries(r))e.RunSettings.RunConfiguration.EnvironmentVariables[t]=n;let n=new m.XMLBuilder({format:!0,suppressEmptyNode:!0}).build(e);const o='<?xml version="1.0" encoding="utf-8"?>';n=n.replace(/^<\?xml.*?\?>/,o),n.startsWith("<?xml")||(n=`${o}\n${n}`);const i=["DEBUG_SESSION_PORT","DCP_INSTANCE_ID_PREFIX"],s=Object.entries(r).filter(([e])=>i.includes(e)).map(([e,t])=>`${e}=${t}`).join(", ");return this._logger.debug(()=>s?`Updated runSettings with non-sensitive vars: ${s}`:`Updated runSettings with ${Object.keys(r).length} environment variables (no non-sensitive vars present)`),n}catch(e){return this._logger.caughtError("Failed to update runSettings",e),t}}buildTestsIfNeeded=async(e,t,r,n)=>{const o=performance.now();let i="";try{let o=e.sources;if(0===e.sources.length&&(o=await this._service.getProjectsForTests(e,n)),(0,f.buildOnRefreshIsDisabled)()&&r==w.Refresh||(0,f.buildOnRunIsDisabled)()&&r==w.Run){const e=await l.TestOperationScheduler.getModifiedProjectsSinceLastDiscovery(o);return this._logger.debug(()=>`Skipping build and return projects based on last discovery. Projects: ${e.map(e=>e.projectName).join(", ")}`),{changedProjects:e,allProjects:o,success:!0,buildKind:i}}const s=await this._testOperationScheduler.buildProjects(o,t);return i=s.buildKind,s}finally{this._telemetryService?.sendTelemetryEvent(u.TelemetryEventNames.TimeToPrepareTestRunEvent,{[u.TelemetryEventNames.TestBuildKindProperty]:i},{[u.TelemetryEventNames.TestPreparationTimeProperty]:performance.now()-o})}};refreshHandler=async e=>{this._telemetryService?.sendTelemetryEvent(u.TelemetryEventNames.ReliabilityRefreshButtonClicks,{[u.TelemetryEventNames.ReliabilityRefreshButtonClicksNumberOfTestsProperty]:this.testItems.size.toString()}),await this._testOperationScheduler.enqueueOperation(async()=>{const t={viewId:this.viewId,testNodes:[],sources:this._testWindowTestController.knownTestProjects(),runSettings:await this.getRunSettings(!1)},r=await this.buildTestsIfNeeded(t,!0,w.Refresh,e);if(!r.success)return this._logger.error(()=>"Error building your test projects. Please correct the build errors and try again."),void n.window.showErrorMessage(d.testExplorerStrings.buildFailed);if(r.changedProjects.length>0){const e=await l.TestOperationScheduler.getTimestampedProjects(r.changedProjects),{sourcesToDiscover:t}=this._testWindowTestController.filterDiscoverableProjects(e);if(t.length>0){const e=Date.now();await this._discoverBeforeRunHandler(t);const r=Date.now()-e;this._telemetryService?.sendTelemetryEvent(u.TelemetryEventNames.ReliabilityTimeToRefreshEvent,{[u.TelemetryEventNames.ReliabilityRefreshTimeProperty]:r.toString()})}}},Number.MAX_SAFE_INTEGER,`refreshCmd:${this.viewId}:${Date.now()}`)};resolveHandler=async e=>{if(!e)return;const t=parseInt(e.parent?.id??"0"),r=this.testMeta.get(t);if(!r)return;for(const e of r.childNodeIds)this.testMeta.set(e.nodeId,S(e.nodeId));const o=new n.CancellationTokenSource;try{await this.refresh(o.token)}catch(t){const r=e.error?e.error instanceof n.MarkdownString?e.error.value:e.error:"unknown";this._logger.caughtError("Error during resolve",t),this._telemetryService?.sendTelemetryErrorEvent(t,{context:"resolveHandler",testItemError:r,testItem:e.canResolveChildren?"expandable":"not expandable"})}finally{o.dispose()}};discoverTestsAndRefreshTree=async(e,t)=>{const r=await this._discoverBeforeRunHandler(e);return r&&!r.isAborted&&await this.expandAllNodes(t),r};buildAndRunTests=async(e,t,r)=>{await this._testOperationScheduler.enqueueOperation(async()=>{const o={viewId:this.viewId,testNodes:[],sources:e,buildSolution:t,runSettings:await this.getRunSettings(!1)},i=await this.buildTestsIfNeeded(o,t,w.BuildAndRun,r);if(!i.success)return this._logger.error(()=>"Error building your test projects. Please correct the build errors and try again."),void n.window.showErrorMessage(d.testExplorerStrings.buildFailed);const s=await l.TestOperationScheduler.getTimestampedProjects(e),{sourcesToDiscover:a}=this._testWindowTestController.filterDiscoverableProjects(s);for(const e of a)this._testWindowTestController.watchTestSource(e);this._logger.debug(()=>`Discovering test sources: ${a.map(e=>e.outputPath).join(", ")}`);const c=await this.discoverTestsAndRefreshTree(a,r);if(!c||!c.isAborted)try{const i=[],s=[];e&&e.length>0?[...this.testItems.entries()].filter(([,t])=>t.uri&&e.some(e=>t.uri?.fsPath===e.outputPath)).forEach(([e,t])=>{i.push(e),s.push(t)}):this._logger.error(()=>"No sources found for build and run. This should not happen.");const a=new n.TestRunRequest(s,void 0,this._runProfile);this.beforeTestRun(a,t),await this.showTestResultsView(),this.testRunResponse=await this._service.runTests(o,r)}catch(e){throw this._logger.caughtError("Error running tests",e),this._telemetryService?.sendTelemetryErrorEvent(e,{context:"buildAndRunTests",numberOfProjects:i.changedProjects.length.toString(),targetFramework:i.changedProjects.map(e=>e.targetFramework).join(", ")}),e}finally{await this.afterTestRun()}},Number.MAX_SAFE_INTEGER,`buildAndRunTests:${this.viewId}:${Date.now()}`)};addTestItem(e,t){const r=e.sourceFile?n.Uri.file(e.sourceFile):void 0;this._countTotalTestItems++,void 0===r&&this._countSourceFileEmpty++;const o=this._testController.createTestItem(e.id.toString(),e.displayName,r);return e.sourceFileLineNumber>0&&(o.range=new n.Range(e.sourceFileLineNumber-1,0,e.sourceFileLineNumber,0)),o.canResolveChildren=e.isExpandable,this.testItems.set(e.id,o),e.testCaseRecordId&&this.testItemsByTestCaseRecordId.set(e.testCaseRecordId,o),t.add(o),o}updateTestItem(e){const t=this.testItems.get(e.id);if(!t)throw new Error("Cannot update find testItem to update");return e.sourceFileLineNumber>0&&(t.range=new n.Range(e.sourceFileLineNumber-1,0,e.sourceFileLineNumber,0)),t.label=e.displayName,t.canResolveChildren=e.isExpandable,t}activeTestRun;testRunStartTime;testRunResponse;beforeTestRun(e,t){if(this.activeTestRun=this._testController.createTestRun(e,void 0,!0),e.include&&e.include.length>0)for(const t of e.include)this.activeTestRun.enqueued(t);else if(t)for(const e of this.testItems.values())this.activeTestRun.enqueued(e)}_testResultNotificationInProgress=Promise.resolve();async notifyTestResult(e,t){this._testResultNotificationInProgress=this.notifyTestResultImpl(e,t),await this._testResultNotificationInProgress}async notifyTestResultImpl(e,t){const r=this.activeTestRun;if(r){for(const e of t){const t=this.testItemsByTestCaseRecordId.get(e);t&&r.started(t)}for(const t of e){const e=this.testItemsByTestCaseRecordId.get(t.testCaseRecordId);if(e){switch(t.outcome){case i.TestOutcome.Failed:{let o;const i=await this.parseErrorStackTrace(t.errorStackTrace);let s="";i.length>0&&(s=i.map(e=>e.uri&&e.position?`at ${e.label} (${e.uri.toString().replace(/\\/g,"/")}#L${e.position.line+1},${e.position.character})`:e.uri?`at ${e.label} (${e.uri.toString().replace(/\\/g,"/")})`:`at ${e.label}`).join("\r\n"));const a=`${t.errorMessage??d.testExplorerStrings.testFailed}\r\n${s}`;let c;c=this._enableTestExplorerDiff&&(o=(0,g.parseExpectedActual)(t.errorMessage??""))?n.TestMessage.diff(a,o.expected,o.actual):new n.TestMessage(a),i.length>0&&(c.stackTrace=i,i[0].uri&&i[0].position&&(c.location=new n.Location(i[0].uri,i[0].position))),r.failed(e,c,t.duration);const l=t.duration?`${t.duration}ms`:d.testExplorerStrings.outputNotAvailable;r.appendOutput(`${(0,d.formatTestString)(d.testExplorerStrings.outputFailed,e.label,l)}\r\n`,void 0,void 0),t.errorMessage&&r.appendOutput(` ${t.errorMessage}\r\n`,void 0,void 0);break}case i.TestOutcome.Passed:{r.passed(e,t.duration);const n=t.duration?`${t.duration}ms`:d.testExplorerStrings.outputNotAvailable;r.appendOutput(`${(0,d.formatTestString)(d.testExplorerStrings.outputPassed,e.label,n)}\r\n`,void 0,void 0);break}case i.TestOutcome.Skipped:r.skipped(e),r.appendOutput(`${(0,d.formatTestString)(d.testExplorerStrings.outputSkipped,e.label)}\r\n`,void 0,void 0);break;case i.TestOutcome.NotFound:r.errored(e,new n.TestMessage(d.testExplorerStrings.testCouldNotBeFound),t.duration),r.appendOutput(`${(0,d.formatTestString)(d.testExplorerStrings.outputErrorTestNotFound,e.label)}\r\n`,void 0,void 0);break;default:r.errored(e,new n.TestMessage(d.testExplorerStrings.testCouldNotBeRun),t.duration),r.appendOutput(`${(0,d.formatTestString)(d.testExplorerStrings.outputErrorTestCouldNotRun,e.label)}\r\n`,void 0,void 0)}if(t.standardOutput){const n=t.standardOutput.replace(/(?<!\r)\n/g,"\r\n");r.appendOutput(n,void 0,e),r.appendOutput(`[${e.label}] ${n}`,void 0,void 0)}if(t.standardError){const n=t.standardError.replace(/(?<!\r)\n/g,"\r\n");r.appendOutput(n,void 0,e),r.appendOutput(`[${e.label}] ERROR: ${n}`,void 0,void 0)}if(t.attachments&&t.attachments.length>0){r.appendOutput(`\r\n${d.testExplorerStrings.attachments}\r\n`,void 0,e);for(const o of t.attachments)for(const t of o.attachments)try{const o=n.Uri.parse(t.uri).fsPath;r.appendOutput(` 📄 ${o}\r\n`,void 0,e),this._logger.debug(()=>`Added attachment for test ${e.label}: ${o}`)}catch(t){this._logger.warn(()=>`Failed to process attachment for test ${e.label}: ${this._logger.fromCaughtError(t)}`)}}}else this._logger.warn(()=>`Unable to find a test case with id ${t.testCaseRecordId}`)}}else this._logger.info(()=>"No active test run.")}async parseStackTrace(e){const t=[];if(!e)return t;const r=e.split("\n"),o=/at (.*?)(?:\s+in\s+(.*?)(?::line\s+(\d+))?)?$/m;for(const e of r){const r=o.exec(e.trim());if(r){const[e,o,i,s]=r;if(i){const e=n.Uri.file(i),r=e.toString();let a;if(this._existingFilesCache.has(r))a=this._existingFilesCache.get(r);else{try{a=await l.TestOperationScheduler.fileExist(e)}catch(e){this._logger.error(()=>`Unknown error accessing file ${r}`),this._telemetryService?.sendTelemetryErrorEvent(e,{context:"parseStackTrace file not exist",fileUri:r}),a=!1}this._existingFilesCache.set(r,a)}if(a)if(s){const r=new n.Position(parseInt(s)-1,0);t.push({label:o,fileUri:e,position:r})}else t.push({label:o,fileUri:e});else t.push({label:o})}else t.push({label:o})}}return t}async parseErrorStackTrace(e){const t=[],r=await this.parseStackTrace(e);for(const e of r)t.push(new n.TestMessageStackFrame(e.label,e.fileUri,e.position));return t}async afterTestRun(){if(await this._testResultNotificationInProgress,void 0!==this.testRunStartTime||void 0!==this.testRunResponse){if(this.activeTestRun?.appendOutput("\r\n========================================\r\n"),this.activeTestRun?.appendOutput(`${d.testExplorerStrings.testRunSummary}\r\n`),this.activeTestRun?.appendOutput("========================================\r\n"),this.testRunResponse){const e=this.testRunResponse;if(this.activeTestRun?.appendOutput(`${(0,d.formatTestString)(d.testExplorerStrings.totalTests,e.totalTests)}\r\n`),this.activeTestRun?.appendOutput(`${(0,d.formatTestString)(d.testExplorerStrings.passed,e.passedTests)}\r\n`),this.activeTestRun?.appendOutput(`${(0,d.formatTestString)(d.testExplorerStrings.failed,e.failedTests)}\r\n`),this.activeTestRun?.appendOutput(`${(0,d.formatTestString)(d.testExplorerStrings.skipped,e.skippedTests)}\r\n`),e.isSucceeded?this.activeTestRun?.appendOutput(`${e.failedTests>0?d.testExplorerStrings.resultFailed:d.testExplorerStrings.resultSucceeded}\r\n`):this.activeTestRun?.appendOutput(`${d.testExplorerStrings.resultAborted}\r\n`),e.elapsedTimeInMs>0){const t=(e.elapsedTimeInMs/1e3).toFixed(2);this.activeTestRun?.appendOutput(`${(0,d.formatTestString)(d.testExplorerStrings.testExecutionTime,t,e.elapsedTimeInMs)}\r\n`)}}if(void 0!==this.testRunStartTime){const e=performance.now()-this.testRunStartTime,t=(e/1e3).toFixed(2);this.activeTestRun?.appendOutput(`${(0,d.formatTestString)(d.testExplorerStrings.totalTimeIncludingBuild,t,e.toFixed(0))}\r\n`)}this.activeTestRun?.appendOutput("========================================\r\n")}if(void 0!==this.testRunStartTime){const e=performance.now()-this.testRunStartTime,t=this.testRunResponse?this.testRunResponse.failedTests>0?"Failed":"Passed":"NotCompleted";this._telemetryService?.sendTelemetryEvent(u.TelemetryEventNames.E2ERunLifecycleEvent,{[u.TelemetryEventNames.ControllerTypeProperty]:"legacy",[u.TelemetryEventNames.CsDKExecutionIsDebugProperty]:String(this._e2eIsDebug),[u.TelemetryEventNames.CsDKExecutionIsCoverageProperty]:String(this._e2eIsCoverage),[u.TelemetryEventNames.CsDKExecutionIsSelectedRunProperty]:String(!this._e2eIsRunAll),[u.TelemetryEventNames.CsDKExecutionResultProperty]:t},{[u.TelemetryEventNames.E2ERunTotalDurationProperty]:e,[u.TelemetryEventNames.E2ERunBuildDurationProperty]:this._e2eBuildDuration,[u.TelemetryEventNames.E2ERunDiscoveryDurationProperty]:this._e2eDiscoveryDuration,[u.TelemetryEventNames.E2ERunExecutionDurationProperty]:this._e2eExecutionDuration,[u.TelemetryEventNames.E2ERunNumProjectsProperty]:this._e2eNumProjects,[u.TelemetryEventNames.E2ERunNumTestsProperty]:this.testRunResponse?.totalTests??0})}this.activeTestRun?.end(),this.activeTestRun=void 0,this.testRunStartTime=void 0,this.testRunResponse=void 0}testNodesToQuery(){return Array.from(this.testMeta.values()).map(e=>e.parentNodeId)}updateChildItems(e,t,r){const n=new Set;e.forEach(e=>n.add(parseInt(e.id)));for(const o of t.childNodeIds){const t=r.get(o.nodeId);if(!t)throw new Error(`test node data for ${o.nodeId}:${o.nodeVersion}:${o.collectionVersion} expected but not provided.`);if(e.get(o.nodeId.toString())){let e=this.testMeta.get(o.nodeId);e||(e={parentNodeId:o,childNodeIds:[]},this.testMeta.set(o.nodeId,e)),(o.nodeVersion>e.parentNodeId.nodeVersion||o.collectionVersion>e.parentNodeId.collectionVersion)&&this.updateTestItem(t)}else this.addTestItem(t,e);n.delete(o.nodeId)}for(const t of n)e.delete(t.toString()),this.recursivelyRemoveTestMeta(t)}recursivelyRemoveTestMeta(e){const t=this.testMeta.get(e);if(t)for(const e of t.childNodeIds)this.recursivelyRemoveTestMeta(e.nodeId);this.testMeta.delete(e)}yield(){return new Promise(e=>{setTimeout(e,0)})}async applyTestNodeChanges(e){try{const t=new Map(e.tests.map(e=>[e.id,e])),r=100;let n=performance.now()+r,o=0,i=performance.now();for(const i of e.structure){const e=this.testItems.get(i.parentNodeId.nodeId),s=e?e.children:this._testController.items;this.updateChildItems(s,i,t),performance.now()>n&&(n=performance.now()+r,o++,await this.yield()),this.testMeta.set(i.parentNodeId.nodeId,i)}for(const t of e.structure)for(const e of t.childNodeIds){const t=this.testMeta.get(e.nodeId);(!t||t.parentNodeId.nodeVersion<e.nodeVersion||t.parentNodeId.collectionVersion<e.collectionVersion)&&this.testMeta.set(e.nodeId,{parentNodeId:e,childNodeIds:[]})}i=performance.now()-i,this._logger.debug(()=>`[UpdCost] applyTestNodeChanges (${i.toFixed(2)}ms); yieldCt: ${o}; structCt: ${e.structure.length} testsCt: ${e.tests.length}`),this.viewVersion=e.viewVersion}catch(t){throw this._logger.error(()=>"Error applying test node updates:",t),this._telemetryService?.sendTelemetryErrorEvent(t,{context:"apply node changes",numberOfTests:e.tests.length.toString()}),t}}debugState(){return this._logger.logLevel!=v.LogLevel.Trace?"":`items: ${(0,c.debugTestItems)(this.testItems)}\nstruct: ${(0,c.debugTestMeta)(this.testMeta)}`}_refreshQueue;refresh(e){return this._refreshQueue.enqueue(async()=>{const t={viewId:this.viewId,viewVersion:this.viewVersion,parentNodes:this.testNodesToQuery()};let r=performance.now();const n=await this._service.updateView(t,e);r=performance.now()-r;let o=performance.now();await this.applyTestNodeChanges(n),o=performance.now()-o,this._logger.debug(()=>`[UpdCost] refresh - updateView: ${r.toFixed(2)}ms applyTestNodeChanges: ${o.toFixed(2)}ms`)},Number.MAX_SAFE_INTEGER,`refreshNodes:${this.viewId}:${Date.now()}`)}expandNodes(e,t){for(const t of e){const e=this.testMeta.get(t);e?e.parentNodeId.collectionVersion=s.VERSIONED_NODE_ID_EXPAND_CHILDREN_VERSION:this._logger.warn(()=>`Cannot expand node with of ${t} as it is not found.`)}return this.refresh(t)}expandAllNodes(e){const r=this.testMeta.get(t.RootNodeId);return r?r.parentNodeId.collectionVersion=s.VERSIONED_NODE_ID_EXPAND_CHILDREN_VERSION:this._logger.warn(()=>"Cannot find the root node to expand it."),this.refresh(e)}async runAllTests(){const e=performance.now(),t={include:Array.from(this.testItems.values()),exclude:void 0,profile:void 0,preserveFocus:!1},r=new n.CancellationTokenSource;await this.runTestsHelper(t,[],(e,t)=>this._service.runTests(e,t),!1,!1,r.token),this._telemetryService?.sendTelemetryEvent(u.TelemetryEventNames.IntegrationTestTimeToRunAllTestsEvent,{[u.TelemetryEventNames.TestBuildKindProperty]:"runAllTests"},{[u.TelemetryEventNames.IntegrationTestTimeToRunAllTestsProperty]:performance.now()-e})}sendTestUsageTelemetry(){this._telemetryService?.sendTelemetryEvent(u.TelemetryEventNames.ReliabilityTestButtonsUsageEvent,{[u.TelemetryEventNames.DebugTestButtonUsageEventProperty]:this._debugTestUsageCounter.toString(),[u.TelemetryEventNames.RunTestButtonUsageEventProperty]:this._runTestUsageCounter.toString(),[u.TelemetryEventNames.CoverageTestButtonUsageEventProperty]:this._coverageUsageCounter.toString(),[u.TelemetryEventNames.ReliabilityTotalTestItemsWithSourceFileEmptyProperty]:this._countSourceFileEmpty.toString(),[u.TelemetryEventNames.ReliabilityTotalTestItemsProperty]:this._countTotalTestItems.toString()}),this._debugTestUsageCounter=0,this._runTestUsageCounter=0,this._coverageUsageCounter=0,this._countSourceFileEmpty=0,this._countTotalTestItems=0}async showTestResultsView(){if("neverOpen"!==n.workspace.getConfiguration("testing").get("automaticallyOpenTestResults"))try{await n.commands.executeCommand("workbench.panel.testResults.view.focus",{preserveFocus:!0}),this._logger.debug(()=>"Switched focus to Test Results view after successful build")}catch(e){this._logger.caughtError("Could not switch to Test Results view",e)}else this._logger.debug(()=>"Skipping Test Results view switch due to testing.automaticallyOpenTestResults setting")}dispose(){this.testItems.clear(),this.testItemsByTestCaseRecordId.clear(),this.testMeta.clear(),this._existingFilesCache.clear(),this._service.closeStore().then(()=>{this._runProfile.dispose(),this._debugProfile&&this._debugProfile.dispose(),this._testController.dispose(),this._coverageProfile.dispose()})}async getRunSettings(e){return(0,a.getRunSettings)(e,this._logger)}}},141(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestWindowTestController=void 0;const n=r(1398),o=r(4348),i=r(6618),s=r(2068),a=r(1467),c=r(5059),l=r(680),u=r(6651),d=r(853),p=r(4932),h=r(7502),f=r(6928),g=r(2679),m=r(2749),v=r(5304);class y{_context;_controller;_serviceBroker;_testOperationScheduler;_logger;_coverageCollectionController;_callback;_projectSystemMonitor;_knownTestProjects=new Map;_testExplorerVersion=24;_testWindowService;_testViewManager;_telemetryService;_testControllerInitialized=!1;_totalDiscoveredSources=0;_discoverProjectsCount=0;_nullDiscoveryResultsCount=0;_totalDiscoveredTests=-1;_totalDiscoveredTestInSameSession=0;_totalDiscoveredProjectInSameSession=0;_totalTestDiscoveredReady=new n.EventEmitter;_firstDiscovery=!0;_startTime=performance.now();_firstProjectReported=!1;_firstTestInteractableReported=!1;_runningOnWindows=!1;_runningOnMacOs=!1;_runningOnLinux=!1;_processArchitecture;_platform="";constructor(e,t,r,i){this._context=e,this._controller=n.tests.createTestController(o.TEST_CONTROLLER_ID,o.TEST_EXPLORER_DISPLAY_NAME),this._serviceBroker=t,this._logger=r,this._coverageCollectionController=i,this._projectSystemMonitor=new a.ProjectSystemMonitor(r),this._callback=new p.TestWindowVSCodeServerCallbackService(this._logger),this._telemetryService=l.telemetryService,this._testOperationScheduler=new u.TestOperationScheduler(r,this._telemetryService,this._serviceBroker)}knownTestProjects(){return Array.from(this._knownTestProjects.values())}get testOperationScheduler(){return this._testOperationScheduler}async initialize(){this._logger.debug(()=>`Log verbosity: ${n.LogLevel[this._logger.logLevel]}`);const e=this._context.extension.packageJSON.version;this._logger.debug(()=>`C# Dev Kit version: ${e}`),this._logger.debug(()=>`Test Explorer version: ${this._testExplorerVersion}`),this._runningOnWindows="win32"===process?.platform,this._runningOnMacOs="darwin"===process?.platform,this._runningOnLinux="linux"===process?.platform,this._platform=process?.platform,this._logger.debug(()=>`platform: ${this._platform}`),this._processArchitecture=process?.arch,this._logger.debug(()=>`arch: ${this._processArchitecture}`),this.logTestWindowSettings();const t=await this._serviceBroker.getProxy(s.InternalDescriptors.testWindowVSCodeServer,{clientRpcTarget:this._callback});if(!t)return void this._logger.error(()=>"Error connecting to the test window service.");this._testWindowService=t,this._context.subscriptions.push(t),this._testViewManager=new d.TestViewManager(t,this._testOperationScheduler,this,this._controller,this._logger,this._serviceBroker,this._telemetryService,this.internalInvokeDiscovery,new v.CoverageManager(await this._coverageCollectionController)),this._callback.setTestViewManager(this._testViewManager);const r=(0,g.resolveConfigVariables)(n.workspace.getConfiguration("dotnet.testWindow").get("useTestPlatformPath",void 0)),o=n.workspace.getConfiguration().get("dotnet.dotnetPath"),a=n.workspace?.workspaceFolders??[],c=a[0]?.uri.fsPath??"";await t.initialize({workingDirectory:c,messageLevel:(0,i.MessageLevelFromLogLevel)(this._logger.logLevel),dotnetPath:o,useTestPlatformPath:r,logDirectory:this._context.logUri?.fsPath}),this._logger.onDidChangeLogLevel(e=>{const r=(0,i.MessageLevelFromLogLevel)(e);t.setLogLevel(r)});const l=this._context.storageUri;if(!l)return void this._logger.warn(()=>"Workspace storage folder is not available.");const u=new n.CancellationTokenSource;try{await n.workspace.fs.createDirectory(l);const e=l.fsPath;this._logger.debug(()=>`Test Store Folder: ${e}`);const r=await t.openStore(e);this._logger.debug(()=>"Test Store loaded from persistance: "+(r.loadedFromPersistence?"Yes":"No")),await this._testViewManager.expandAllNodes(u.token)}catch(e){throw this._telemetryService?.sendTelemetryErrorEvent(e,{context:"initialize.openStore",errorMessage:this._logger.fromCaughtError(e)??"unknown"}),e}finally{u.dispose()}this._projectSystemMonitor.start(this._context,this._serviceBroker,e=>{if(this._logger.info(()=>`${e.addedProjects.length} projects added, ${e.changedProjects.length} changed, ${e.removedProjects.length} removed.`),e.addedProjects.length>0){for(const t of e.addedProjects)this._knownTestProjects.set(t.outputPath,t);if(this.updateContextHasTestProjects(),!this._firstProjectReported){this._firstProjectReported=!0;const e=performance.now()-this._startTime;this._telemetryService?.sendTelemetryEvent(h.TelemetryEventNames.FirstProjectAvailableEvent,{[h.TelemetryEventNames.ControllerTypeProperty]:"legacy",[h.TelemetryEventNames.FirstProjectAvailableSourceProperty]:"projectsystem"},{[h.TelemetryEventNames.FirstProjectAvailableDurationProperty]:e})}this.discoverProjects(e.addedProjects)}if(e.changedProjects.length>0&&this.discoverProjects(e.changedProjects),e.removedProjects.length>0){for(const t of e.removedProjects)this._knownTestProjects.delete(t.outputPath);this.updateContextHasTestProjects(),this.removeProjects(Array.from(e.removedProjects.map(e=>n.Uri.file(e.outputPath))))}},()=>{this._logger.debug(()=>"Solution closed, sending test usage telemetry"),this._testViewManager?.sendTestUsageTelemetry()}).then(()=>{this._logger.info(()=>"Waiting for projects to be detected by Project System... (see C# Dev Kit output for details)")}),this._testControllerInitialized=!0,this._logger.info(()=>"Test controller initialized."),this._telemetryService?.sendTelemetryEvent(h.TelemetryEventNames.ReliabilityTestControllerLoaded,{[h.TelemetryEventNames.ControllerTypeProperty]:"legacy",[h.TelemetryEventNames.ExtensionVersionProperty]:e,[h.TelemetryEventNames.ReliabilityTestControllerLoadedVersionProperty]:this._testExplorerVersion.toString(),[h.TelemetryEventNames.BuildOnRefreshDisabledProperty]:this.isBuildOnRefreshDisabled().toString(),[h.TelemetryEventNames.BuildOnRunDisabledProperty]:this.isBuildOnRunDisabled().toString(),[h.TelemetryEventNames.AutoDiscoveryDisabledProperty]:this.isAutoDiscoveryDisabled().toString(),[h.TelemetryEventNames.DiffEnabledProperty]:this.isDiffEnabled().toString(),[h.TelemetryEventNames.PlatformProperty]:this._platform,[h.TelemetryEventNames.ArchitectureProperty]:this._processArchitecture});const p=performance.now()-this._startTime;this._telemetryService?.sendTelemetryEvent(h.TelemetryEventNames.ControllerInitCompleteEvent,{[h.TelemetryEventNames.ControllerTypeProperty]:"legacy",[h.TelemetryEventNames.PlatformProperty]:this._platform,[h.TelemetryEventNames.ArchitectureProperty]:this._processArchitecture??"unknown"},{[h.TelemetryEventNames.ControllerInitDurationProperty]:p})}logTestWindowSettings(){this._logger.debug(()=>`Build-on-Refresh disabled: ${this.isBuildOnRefreshDisabled()}`),this._logger.debug(()=>`Build-on-Run disabled: ${this.isBuildOnRunDisabled()}`),this._logger.debug(()=>`Auto-Discovery disabled: ${this.isAutoDiscoveryDisabled()}`),this._logger.debug(()=>`Diff enabled: ${this.isDiffEnabled()}`)}updateContextHasTestProjects(){n.commands.executeCommand("setContext","csdevkit.hasTestProjects",this._knownTestProjects.size>0)}isBuildOnRefreshDisabled(){return n.workspace.getConfiguration("dotnet.testWindow").get("disableBuildOnRefresh",!1)}isBuildOnRunDisabled(){return n.workspace.getConfiguration("dotnet.testWindow").get("disableBuildOnRun",!1)}isAutoDiscoveryDisabled(){return n.workspace.getConfiguration("dotnet.testWindow").get("disableAutoDiscovery",!1)}isDiffEnabled(){return n.workspace.getConfiguration("dotnet.testWindow").get("enableTestExplorerDiff",!1)}pollers=new Map;watchers=new Map;static relativePattern(e,t){const r=n.workspace.getWorkspaceFolder(e);if(!r){t.debug(()=>`Test container is outside of workspace: ${e.fsPath}`);const r=f.dirname(e.fsPath),o=f.basename(e.fsPath);return new n.RelativePattern(n.Uri.file(r),o)}const o=n.workspace.asRelativePath(e,!1);return new n.RelativePattern(r,o)}watchTestSource(e){const t=n.Uri.file(e.outputPath),r=t.toString(!0);if((0,g.autoDiscoveryIsDisabled)())this._logger.info(()=>`Skipping test auto discovery (dotnet.testWindow.disableAutoDiscovery=true): ${e.outputPath}`);else if(this._runningOnMacOs||this._runningOnLinux){if(this.pollers.has(r))return void this._logger.trace(()=>`Already watching this file, ignore: ${e.outputPath}`);const n=new m.FilePoller(t,2500,this._logger);this._context.subscriptions.push({dispose:()=>n.dispose()}),n.onDidChange(()=>{this._logger.debug(()=>`Tests changed, running test discovery: ${e.outputPath}`),this.discoverProjects([e])}),n.onDidCreate(()=>{this._logger.info(()=>`Tests are available, running test discovery: ${e.outputPath}`),this.discoverProjects([e])}),n.onDidDelete(()=>{this._logger.debug(()=>`Test source removed: ${t.fsPath}`),this._testOperationScheduler.testBuildOrExecutionInProgress||this.removeTestSources([t])}),this.pollers.set(r,n),this._logger.debug(()=>`Poller added for project: ${e.outputPath}`)}else{if(this.watchers.has(r))return void this._logger.debug(()=>`Already watching this file, ignore: ${e.outputPath}`);const o=y.relativePattern(t,this._logger),i=n.workspace.createFileSystemWatcher(o);this._context.subscriptions.push(i),i.onDidChange(()=>{this._logger.debug(()=>`Tests changed, running test discovery: ${e.outputPath}`),this.discoverProjects([e]).catch(e=>{const t=this._logger.fromCaughtError(e);this._logger.info(()=>`discoverProjects failed: ${t}`),this._telemetryService?.sendTelemetryErrorEvent(e,{context:"onDidChange",errorMessage:t??"unknown"})})}),i.onDidCreate(()=>{this._logger.debug(()=>`Tests are available, running test discovery: ${e.outputPath}`),this.discoverProjects([e]).catch(e=>{this._logger.info(()=>`discoverProjects failed on create: ${this._logger.fromCaughtError(e)}`),this._telemetryService?.sendTelemetryErrorEvent(e,{context:"onDidCreate",errorMessage:this._logger.fromCaughtError(e)??"unknown"})})}),i.onDidDelete(()=>{this._logger.debug(()=>`Test source removed: ${t.fsPath}`),this.removeTestSources([t]).catch(e=>{const t=this._logger.fromCaughtError(e)??"unknown";this._logger.info(()=>`removeTestSources failed on delete: ${t}`),this._telemetryService?.sendTelemetryErrorEvent(e,{context:"onDidDelete",errorMessage:t})})}),this.watchers.set(r,i),this._logger.debug(()=>`Watcher added for project: ${e.outputPath}`)}}async buildAndRunTests(e,t,r){this._testViewManager?await this._testViewManager.buildAndRunTests(e,t,r):this._logger.error(()=>"TestViewManager is not available.")}internalInvokeDiscovery=async e=>{if(!this._testWindowService)return void this._logger.info(()=>"TestWindowService is not available.");if(!this._testViewManager)return void this._logger.info(()=>"TestViewManager is not available.");if(0===e.length)return void this._logger.debug(()=>"No projects to discover.");const t={sources:e,discoverySettings:await this._testViewManager.getRunSettings(!0)};try{const e=await this._testWindowService.discoverTests(t);if(e.isAborted){this._logger.error(()=>"Test discovery was aborted. See troubleshooting guidance: https://aka.ms/csdk-test-trouble");const e=c.testExplorerStrings.showErrors;n.window.showErrorMessage(c.testExplorerStrings.testDiscoveryAborted,e).then(t=>{t===e&&this._logger.show()})}return e}catch(t){const r=this._logger.fromCaughtError(t);return void this._telemetryService?.sendTelemetryErrorEvent(t,{context:"discoverTests",projectCount:e.length.toString(),errorMessage:r??"unknown"})}};isNetFrameworkTfm(e){if(!e)return!1;const t=e.toLowerCase().trim();if(t.includes(".netframework,version=")||t.includes("netframework,version="))return!0;const r=t.startsWith(".")?t.substring(1):t;if(r.startsWith("netframework"))return!0;if(!r.startsWith("net"))return!1;const n=r.substring(3);if(n.startsWith("coreapp")||n.startsWith("standard"))return!1;if(n.includes(".")){const e=parseInt(n.split(".")[0],10);return!isNaN(e)&&e>=1&&e<=4}return/^[1-4]\d+$/.test(n)}projectIsValidForPlatform(e){const t=e.targetFramework?.toLowerCase()??"",r=(0,g.skipTargetFrameworkCompatibilityCheck)();return this.isNetFrameworkTfm(t)?this._runningOnWindows?r:!(!r||!(0,g.isMonoInstalled)()||(this._logger.info(()=>`Mono runtime detected — allowing .NET Framework project "${e.projectName}" (${t}) for discovery.`),0)):!(!r&&(this._runningOnMacOs&&"arm64"===this._processArchitecture&&(t.startsWith("netcoreapp1")||t.startsWith("netcoreapp2")||t.startsWith("netcoreapp3")||t.startsWith("net5"))||this._runningOnLinux&&"arm64"===this._processArchitecture&&(t.startsWith("netcoreapp1")||t.startsWith("netcoreapp2.0"))))}filterDiscoverableProjects(e){const t=[];for(const r of e){if(!this.projectIsValidForPlatform(r)){const e=this._processArchitecture||"unknown architecture",t=this._runningOnWindows?"Windows":this._runningOnMacOs?"macOS":this._runningOnLinux?"Linux":"unknown OS";this._logger.info(()=>`Skipping "${r.outputPath}" (${r.targetFramework??"unknown TFM"}) — unsupported target framework on ${t} (${e}).\n\t\t\t\t\t\t.NET Framework projects require Windows or Mono (https://www.mono-project.com).\n\t\t\t\t\t\tFor .NET Core, verify compatibility at: https://dotnet.microsoft.com/en-us/download/dotnet/`);continue}this.watchTestSource(r),t.push(r)}const r=[],o=[];for(const e of t)0===e.mtime?o.push(n.Uri.file(e.outputPath)):r.push(e);return{sourcesToDiscover:r,sourcesToRemove:o}}discoverProjects(e){return this._testOperationScheduler.discoverProjects(e,async e=>{const t=performance.now();try{const r=this._firstDiscovery;this._firstDiscovery=!1,this._discoverProjectsCount++;const{sourcesToDiscover:o,sourcesToRemove:i}=this.filterDiscoverableProjects(e);for(const e of o)this.watchTestSource(e);await this.removeTestSources(i),this._logger.debug(()=>`Discovering test sources: ${o.map(e=>e.outputPath).join(", ")}`),i.length>0&&this._logger.debug(()=>`Missing test sources: ${i.join(", ")}`),await this.removeTestSources(i);const s=await this.internalInvokeDiscovery(o);if(!s)return this._logger.debug(()=>"Null tests discovery results."),this._nullDiscoveryResultsCount++,this._telemetryService?.sendTelemetryEvent(h.TelemetryEventNames.ReliabilityTestDiscoveryNullResultEvent),s;if(this._telemetryService?.sendTelemetryEvent(h.TelemetryEventNames.TimeToDiscoverTestsEvent,{[h.TelemetryEventNames.ControllerTypeProperty]:"legacy",[h.TelemetryEventNames.IsAbortedProperty]:s.isAborted.toString(),[h.TelemetryEventNames.FirstDiscoveryProperty]:r.toString()},{[h.TelemetryEventNames.DiscoveryTimeProperty]:performance.now()-t,[h.TelemetryEventNames.NumberOfTestProjectsProperty]:s.discoveredSources.length,[h.TelemetryEventNames.NumberOfTestsProperty]:s.totalTests}),this._totalDiscoveredTestInSameSession+=s.totalTests,this._totalDiscoveredProjectInSameSession=s.discoveredSources.length,this._totalDiscoveredSources=s.discoveredSources.length,this._totalDiscoveredTests=s.totalTests,this._totalTestDiscoveredReady.fire(s.totalTests),s.totalTests>0&&(this._logger.info(()=>`${s.totalTests} tests discovered from ${s.discoveredSources.length} sources in ${s.elapsedTimeInMs.toFixed(0)} ms`),this._logger.debug(()=>`discovered sources: ${s.discoveredSources.join(";")}`),!this._firstTestInteractableReported)){this._firstTestInteractableReported=!0;const e=performance.now()-this._startTime;this._telemetryService?.sendTelemetryEvent(h.TelemetryEventNames.FirstTestInteractableEvent,{[h.TelemetryEventNames.ControllerTypeProperty]:"legacy",[h.TelemetryEventNames.FirstTestInteractableTriggerProperty]:"autodiscovery"},{[h.TelemetryEventNames.FirstTestInteractableDurationProperty]:e,[h.TelemetryEventNames.FirstTestInteractableNumTestsProperty]:s.totalTests})}0===s.totalTests&&this._logger.debug(()=>"No tests discovered. See troubleshooting guidance: https://aka.ms/csdk-test-trouble");const a=new n.CancellationTokenSource;try{await(this._testViewManager?.expandAllNodes(a.token))}catch{}finally{a.dispose()}return r&&await this.pruneTestSources(),s}catch(e){throw this._telemetryService?.sendTelemetryErrorEvent(e,{context:"discoverProjects",errorMessage:this._logger.fromCaughtError(e)??"unknown"}),e}})}async pruneTestSources(){try{const e=await(this._testWindowService?.getOrphanedTestSources())??[];for(const t of e)this._logger.debug(()=>`Pruning orphaned tests: ${t}`);await(this._testWindowService?.removeTestSources(e))}catch(e){this._logger.error(()=>"pruneTestSources RPC failed",e),this._telemetryService?.sendTelemetryEvent("TestDiscovery.PruneTestSourcesException",{errorMessage:this._logger.fromCaughtError(e)??"unknown"})}}removeTestSources(e){const t=e.map(e=>e.fsPath);return this._testWindowService?.removeTestSources(t).catch(e=>{this._logger.error(()=>"removeTestSources RPC failed",e),this._telemetryService?.sendTelemetryErrorEvent(e,{context:"removeTestSources",errorMessage:this._logger.fromCaughtError(e)??"unknown"})})??Promise.resolve()}removeProjects(e){for(const t of e){const e=t.toString(!0);if(this._runningOnMacOs||this._runningOnLinux){const t=this.pollers.get(e);t&&(this.pollers.delete(e),t.dispose())}else{const t=this.watchers.get(e);t&&(this.watchers.delete(e),t.dispose())}}return this.removeTestSources(e)}dispose(){0===this._totalDiscoveredTestInSameSession&&this._telemetryService?.sendTelemetryEvent(h.TelemetryEventNames.ReliabilityZeroTestsDiscoveredEvent,{[h.TelemetryEventNames.ReliabilityTotalDiscoveredProjectsProperty]:this._totalDiscoveredProjectInSameSession.toString()}),this._testViewManager?.dispose(),this._controller.dispose()}isTestControllerInitialized(){return this._testControllerInitialized}totalDiscoveredTestsAsync(){return this._totalDiscoveredTests<=0?new Promise(e=>this._totalTestDiscoveredReady.event(e)):(this._telemetryService?.sendTelemetryEvent(h.TelemetryEventNames.IntegrationTestTimeToDiscoverAllTestsEvent,{[h.TelemetryEventNames.TestBuildKindProperty]:"discoverAllTests"},{[h.TelemetryEventNames.IntegrationTestTimeToDiscoverAllTestsProperty]:performance.now()-this._startTime}),Promise.resolve(this._totalDiscoveredTests))}totalDiscoveredProjects(){return this._totalDiscoveredSources}totalExecutionsOfDiscoverProjectsCount(){return this._discoverProjectsCount}getWatchedPaths(){return this._runningOnMacOs||this._runningOnLinux?Array.from(this.pollers.keys()):Array.from(this.watchers.keys())}isTestWindowServiceAvailable(){return!!this._testWindowService}isTestViewManagerAvailable(){return!!this._testViewManager}getNullDiscoveryResultsCount(){return this._nullDiscoveryResultsCount}getControllerItems(){return this._controller.items}runAllTests(){return this._testViewManager?.runAllTests()??Promise.resolve()}async expandAllNodesInTestExplorer(){const e=new n.CancellationTokenSource,t=e.token;try{await(this._testViewManager?.expandAllNodes(t))}catch(e){this._logger.error(()=>"expandAllNodesInTestExplorer failed",e),this._telemetryService?.sendTelemetryErrorEvent(e,{context:"expandAllNodesInTestExplorer",errorMessage:this._logger.fromCaughtError(e)??"unknown"})}finally{e.dispose()}}}t.TestWindowTestController=y},4932(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestWindowVSCodeServerCallbackService=void 0;const n=r(1398),o=r(6618),i=r(6982),s=r(7700);class a{logger;testViewManager;constructor(e){this.logger=e}buildDebugConfiguration(e){return{type:n.workspace.getConfiguration("dotnet.testWindow").get("overrideDebugSessionType",void 0)??"coreclr",name:".NET Test Attach",request:"attach",processId:e}}async attachDebuggerToProcess(e,t){this.logger.debug(()=>`attachDebuggerToProcess processId=${e}`);const r=Date.now(),o=this.buildDebugConfiguration(e);o.attachRequestId=(0,i.randomUUID)();const s=this.waitForDebuggerAttachComplete(o.attachRequestId);try{await n.debug.startDebugging(void 0,o)||this.logger.info(()=>"Unable to start debugging session.")}catch(t){return this.logger.error(()=>`Error starting debugging session: attachDebuggerToProcess END processId=${e} result=${a} time=${Date.now()-r}ms`,t),!1}const a=await s;return this.logger.debug(()=>`attachDebuggerToProcess END processId=${e} result=${a} time=${Date.now()-r}ms`),a}async launchProcessUnderDebugger(e,t,r,o,i){this.logger.info(()=>`launchProcessUnderDebugger filePath=${e} args=${t} workingDirectory=${r}`);const c=Date.now(),l=(0,s.v4)(),u={type:"coreclr",request:"launch",name:".NET Test Host Debug",program:e,args:a.parseArgs(t),cwd:r,env:o,console:"integratedTerminal",stopAtEntry:!1,unitTestSessionId:l};let d;const p=new Promise(e=>d=e),h=n.debug.registerDebugAdapterTrackerFactory("coreclr",{createDebugAdapterTracker(e){if(e.configuration.unitTestSessionId===l)return{onDidSendMessage:e=>{"process"===e.event&&"number"==typeof e.body?.systemProcessId&&d(e.body.systemProcessId)}}}});let f;const g=n.debug.onDidStartDebugSession(e=>{e.configuration.unitTestSessionId===l&&(f=e)}),m=n.debug.onDidTerminateDebugSession(e=>{e===f&&d(-1)});try{if(!await n.debug.startDebugging(void 0,u))return-1;const e=await p;return this.logger.debug(()=>`launchProcessUnderDebugger END pid=${e} time=${Date.now()-c}ms`),e}finally{h.dispose(),g.dispose(),m.dispose()}}waitForDebuggerAttachComplete(e){return new Promise(t=>{let r=null,o=null,i=!1;const s=n=>{!1===i&&(i=!0,r?.dispose(),o?.dispose(),this.logger.info(()=>`waitForDebuggerAttachComplete END request=${e} result=${n}`),t(n))};r=n.debug.onDidTerminateDebugSession(t=>{t.configuration.attachRequestId===e&&(this.logger.info(()=>"Debug session terminated"),s(!1))}),o=n.debug.onDidReceiveDebugSessionCustomEvent(t=>{t.session.configuration.attachRequestId===e&&"attachComplete"===t.event&&(this.logger.info(()=>"Debugger attached"),s(!0))})})}setTestViewManager(e){this.testViewManager=e}log(e){return new Promise(t=>{const r=(0,o.LogLevelFromMessageLevel)(e.messageLevel);this.logger.logWithLevel(()=>e.message,r),t()})}notifyTestsChanged(e,t){return this.testViewManager?this.testViewManager.refresh(t):Promise.resolve()}async getDotnetPath(e,t){const r=await this.tryFindDotnet(e,t);return void 0===r?(this.logger.debug(()=>`Failed to find dotnet.exe for SDK version: ${e}, requirement: ${t}`),""):(this.logger.debug(()=>`Found dotnet.exe at: ${r}`),r)}async tryFindDotnet(e,t){try{const r={acquireContext:{version:e,requestingExtensionId:"ms-dotnettools.csdevkit",architecture:process?.arch,mode:"sdk",installType:"global"},versionSpecRequirement:t,rejectPreviews:!1};this.logger.debug(()=>`Calling dotnet.findPath with context: ${JSON.stringify(r)}`);const o=await n.commands.executeCommand("dotnet.findPath",r);if(o){let e;if("string"==typeof o)e=o;else{if(!o||"object"!=typeof o||!("dotnetPath"in o)||"string"!=typeof o.dotnetPath)return void this.logger.debug(()=>`Unexpected result from dotnet.findPath: ${JSON.stringify(o)}`);e=o.dotnetPath}return e}return void this.logger.debug(()=>`No .NET SDK matching version ${e} (${t}) found by dotnet.findPath.`)}catch(e){return void this.logger.debug(()=>`Error calling dotnet.findPath: ${this.logger.fromCaughtError(e)}`)}}notifyNewTestResults(e,t,r){return this.testViewManager?.notifyTestResult(e,t)??Promise.resolve()}static parseArgs(e){return e.split(" ")}}t.TestWindowVSCodeServerCallbackService=a},2811(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Descriptors=void 0;const n=r(4084);class o{static TestRunnerService=Object.freeze(new n.ServiceJsonRpcDescriptor(n.ServiceMoniker.create("Microsoft.VisualStudio.TestRunnerService","0.1"),n.Formatters.MessagePack,n.MessageDelimiters.BigEndianInt32LengthHeader,{protocolMajorVersion:3}))}t.Descriptors=o},7433(e,t){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.TestOutcome=void 0,function(e){e[e.None=0]="None",e[e.Passed=1]="Passed",e[e.Failed=2]="Failed",e[e.Skipped=3]="Skipped",e[e.NotFound=4]="NotFound"}(r||(t.TestOutcome=r={}))},6618(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogVisibility=t.LogLevelFromMessageLevel=t.MessageLevelFromLogLevel=t.MessageLevel=void 0;const n=r(1398);var o,i;!function(e){e[e.None=0]="None",e[e.Error=1]="Error",e[e.Warning=2]="Warning",e[e.Informational=3]="Informational",e[e.Diagnostic=4]="Diagnostic",e[e.Trace=5]="Trace"}(o||(t.MessageLevel=o={})),t.MessageLevelFromLogLevel=e=>{switch(e){case n.LogLevel.Error:return o.Error;case n.LogLevel.Warning:return o.Warning;case n.LogLevel.Info:return o.Informational;case n.LogLevel.Debug:return o.Diagnostic;case n.LogLevel.Trace:return o.Trace;default:return o.None}},t.LogLevelFromMessageLevel=e=>{switch(e){case o.Error:return n.LogLevel.Error;case o.Warning:return n.LogLevel.Warning;case o.Informational:return n.LogLevel.Info;case o.Diagnostic:return n.LogLevel.Debug;case o.Trace:return n.LogLevel.Trace;default:return n.LogLevel.Off}},function(e){e[e.All=0]="All",e[e.UserOnly=1]="UserOnly",e[e.DevOnly=2]="DevOnly"}(i||(t.LogVisibility=i={}))},3822(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseExpectedActual=void 0,t.parseExpectedActual=function(e){const t=e.includes("\r\n")?"\r\n":"\n",r=e.replace(/\r\n/g,"\n"),n=new RegExp(["Assert\\.AreEqual failed\\.\\s*","Expected a difference no greater than <(?<tolerance>[^>]+)>","\\s+between\\s+expected\\s+value\\s+<(?<expectedVal>[^>]+)>","\\s+and\\s+actual\\s+value\\s+<(?<actualVal>[^>]+)>","\\.?"].join(""),"m"),o=new RegExp(["CollectionAssert\\.AreEquivalent failed\\.","[^]*?","The expected collection contains\\s+(?<expectedCount>\\d+)\\s+occurrence\\(s\\)\\s+of <(?<missingItem>[^>]+)>\\.","\\s+","The actual collection contains\\s+(?<actualCount>\\d+)\\s+occurrence\\(s\\)\\."].join(""),"m"),i=new RegExp(["Assert\\.Equal\\(\\) Failure:.*?","(?:\\n.*?)*?","\\nExpected:\\s*(?<expected>[^\\n]+)","\\nActual:\\s*(?<actual>[^\\n]+)"].join(""),"m"),s=new RegExp(["Assert\\.NotEqual\\(\\) Failure:.*?","(?:\\n.*?)*?","\\nExpected:\\s*(?<expected>[^\\n]+)","\\nActual:\\s*(?<actual>[^\\n]+)"].join(""),"m"),a=new RegExp(["Expected:<(?<expected>[^>]+)>","[.,]?\\s*","[\\n]?","Actual:<(?<actual>[^>]+)>"].join(""),"m"),c=new RegExp(["Expected:\\s*(?<expected>[^\n]*)","[\\s\\n]+","Actual:(?<actual>[\\s\\S]+)"].join(""),"m"),l=new RegExp(["Expected:\\s*(?<expected>[^\n]+)","(?:\\s+|\\n)","But\\s+was:\\s*(?<actual>[^\n]+)"].join(""),"m");let u=null;{const e=/Values differ at index \[(\d+)\]/.exec(r);e&&(u=parseInt(e[1],10))}const d=[{name:"1) MSTest numeric tolerance",regex:n,parseFn:e=>{const{tolerance:t,expectedVal:r,actualVal:n}=e.groups??{};return t&&r&&n?{expected:`a difference no greater than ${t.trim()} from ${r.trim()}`,actual:n.trim()}:null}},{name:"2) MSTest AreEquivalent",regex:o,parseFn:e=>{const{expectedCount:t,missingItem:r,actualCount:n}=e.groups??{};return t&&r&&n?{expected:`${t} ${1===parseInt(t,10)?"occurrence":"occurrences"} of <${r}>`,actual:`${n} ${1===parseInt(n,10)?"occurrence":"occurrences"} of <${r}>`}:null}},{name:"3) MSTest AreEqual index mismatch",regex:/CollectionAssert\.AreEqual failed\.\s*\((?<detail>Element at index \d+ do not match\.)\)/m,parseFn:e=>{const t=e.groups?.detail?.trim();return t?{expected:"all values to match",actual:t}:null}},{name:"4) MSTest AreNotEqual",regex:/Expected any value except:<(?<notVal>[^>]+)>.\s*Actual:<(?<actual>[^>]+)>/m,parseFn:e=>{const t=e.groups?.notVal?.trim(),r=e.groups?.actual?.trim();return t&&r?{expected:`any value except: ${t}`,actual:r}:null}},{name:"4.5) MSTest AreNotSame",regex:/Assert\.AreNotSame failed\.\s*$/m,parseFn:()=>({expected:"different references",actual:"the same reference"})},{name:"4.6) MSTest AreSame",regex:/Assert\.AreSame failed\.\s*$/m,parseFn:()=>({expected:"the same reference",actual:"different references"})},{name:"4.7) xUnit Assert.NotSame",regex:/Assert\.NotSame\(\) Failure: Values are the same instance/m,parseFn:()=>({expected:"different references",actual:"the same reference"})},{name:"4.8) xUnit Assert.Equal() Failure",regex:i,parseFn:e=>({expected:e.groups?.expected?.trim()??"",actual:e.groups?.actual?.trim()??""})},{name:"4.9) xUnit Assert.NotEqual() Failure",regex:s,parseFn:e=>({expected:e.groups?.expected?.trim()??"",actual:e.groups?.actual?.trim()??""})},{name:"5) Original C# style",regex:a,parseFn:e=>({expected:e.groups?.expected?.trim()??"",actual:e.groups?.actual?.trim()??""})},{name:'6) Generic multiline "Expected: x Actual: y"',regex:c,parseFn:e=>{let r=e.groups?.expected??"",n=e.groups?.actual??"";return r=r.trim(),n.startsWith("\n")||(n=n.trim()),"\r\n"===t&&(r=r.replace(/\n/g,"\r\n"),n=n.replace(/\n/g,"\r\n")),{expected:r,actual:n}}},{name:'7) NUnit style "Expected: x ... But was: y"',regex:l,parseFn:e=>{let t=e.groups?.expected?.trim()??"",r=e.groups?.actual?.trim()??"";return null!==u&&(t+=` at index [${u}]`,r+=` at index [${u}]`),{expected:t,actual:r}}}];for(const e of d){const t=e.regex.exec(r);if(!t)continue;const n=e.parseFn(t);if(n)return n}return null}},9943(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Descriptors=void 0;const n=r(4084);class o{static buildService=Object.freeze(new n.ServiceJsonRpcDescriptor(n.ServiceMoniker.create("Microsoft.VisualStudio.BuildService","0.1"),n.Formatters.MessagePack,n.MessageDelimiters.BigEndianInt32LengthHeader,{protocolMajorVersion:3}));static environmentService=Object.freeze(new n.ServiceJsonRpcDescriptor(n.ServiceMoniker.create("Microsoft.VisualStudio.NoDelay.EnvironmentService","0.1"),n.Formatters.MessagePack,n.MessageDelimiters.BigEndianInt32LengthHeader,{protocolMajorVersion:3}));static projectCacheStateService=Object.freeze(new n.ServiceJsonRpcDescriptor(n.ServiceMoniker.create("Microsoft.VisualStudio.ProjectCacheStateService","0.1"),n.Formatters.MessagePack,n.MessageDelimiters.BigEndianInt32LengthHeader,{protocolMajorVersion:3}));static projectQueryExecutionService=Object.freeze(new n.ServiceJsonRpcDescriptor(n.ServiceMoniker.create("Microsoft.VisualStudio.ProjectSystem.Query.Remoting.QueryExecutionService","0.2"),n.Formatters.Utf8,n.MessageDelimiters.HttpLikeHeaders));static projectActivationService=Object.freeze(new n.ServiceJsonRpcDescriptor(n.ServiceMoniker.create("Microsoft.VisualStudio.ProjectSystem.ProjectActivationService","0.1"),n.Formatters.MessagePack,n.MessageDelimiters.BigEndianInt32LengthHeader,{protocolMajorVersion:3}))}t.Descriptors=o},1002(e,t){"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.LanguageServiceRequirement=t.ProjectRequestPriority=void 0,function(e){e[e.Idle=0]="Idle",e[e.Background=10]="Background",e[e.BackgroundQuery=20]="BackgroundQuery",e[e.BackgroundPriority=30]="BackgroundPriority",e[e.ForegroundDependencies=40]="ForegroundDependencies",e[e.Foreground=50]="Foreground",e[e.Interactive=69]="Interactive"}(r||(t.ProjectRequestPriority=r={})),function(e){e[e.None=0]="None",e[e.Basics=1]="Basics",e[e.Full=2]="Full"}(n||(t.LanguageServiceRequirement=n={}))},4701(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.profferTestRunnerService=t.getTestController=t.createAndRegisterTestController=t.TestWindowDescriptors=t.buildAndRunTests=void 0;const n=r(1398),o=r(8373),i=r(141),s=r(2679),a=r(8376),c=r(2811),l=new n.EventEmitter,u=new Promise(e=>l.event(e));let d;var p=r(5051);Object.defineProperty(t,"buildAndRunTests",{enumerable:!0,get:function(){return p.buildAndRunTests}});var h=r(2811);Object.defineProperty(t,"TestWindowDescriptors",{enumerable:!0,get:function(){return h.Descriptors}}),t.createAndRegisterTestController=async function(e,t,r){process.env.TestExplorerDebugLaunch;const n=new o.Logger;try{if((0,s.nextTestIsEnabled)()){const o=new a.CsDKTestWindowTestController(e,t,n,r);n.info(()=>"Created Test Controller (Lightweight Test Experience)"),await o.initialize(),d=o,l.fire(null),e.subscriptions.push(o),e.subscriptions.push({dispose:()=>d=void 0})}else{const o=new i.TestWindowTestController(e,t,n,r);n.info(()=>"Created Test Controller"),await o.initialize(),l.fire(o),e.subscriptions.push(o)}}catch(e){n.error(()=>"unable to create test controller for c# extension",e)}},t.getTestController=function(){return u},t.profferTestRunnerService=function(e){return e.profferServiceFactory(c.Descriptors.TestRunnerService,()=>d?d.createTestRunnerService():null)}},4897(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CsDKSourceBasedTestDiscoveryCallback=void 0,t.CsDKSourceBasedTestDiscoveryCallback=class{logger;testTree;constructor(e,t){this.logger=e,this.testTree=t}async reportTests(e){this.logger.debug(()=>`Source-based discovery disabled, ignoring ${e.length} test methods`)}}},6438(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CsDKTestWindowServiceCallback=void 0;const n=r(1398),o=r(6982),i=r(7700);class s{logger;testTree;_onTestResultEmitter=new n.EventEmitter;_onRunCompleteEmitter=new n.EventEmitter;_onTestsDiscoveredEmitter=new n.EventEmitter;_onDiscoveryCompleteEmitter=new n.EventEmitter;onTestResult=this._onTestResultEmitter.event;onRunComplete=this._onRunCompleteEmitter.event;onTestsDiscovered=this._onTestsDiscoveredEmitter.event;onDiscoveryComplete=this._onDiscoveryCompleteEmitter.event;constructor(e,t){this.logger=e,this.testTree=t}async log(e){this.logger.logWithLevel(()=>e.message,e.logLevel)}addProject(e){this.testTree.addProject(e)}updateProject(e){this.testTree.updateProject(e)}removeProject(e){this.testTree.removeProject(e)}async reportTestResult(e,t){this.logger.debug(()=>`Test result [${e}]: ${t.testId} => ${t.outcome} (${t.durationMs}ms)`),this._onTestResultEmitter.fire({sessionId:e,result:t})}async testRunComplete(e){this.logger.debug(()=>`Test run complete [${e}].`),this._onRunCompleteEmitter.fire({sessionId:e})}async reportTests(e,t){this.logger.debug(()=>`Discovered ${t.length} test(s) [${e}].`),this._onTestsDiscoveredEmitter.fire({sessionId:e,tests:t})}async discoveryComplete(e){this.logger.debug(()=>`Discovery complete [${e}].`),this._onDiscoveryCompleteEmitter.fire({sessionId:e})}async launchProcessUnderDebugger(e,t,r,o,a){this.logger.info(()=>`launchProcessUnderDebugger filePath=${e} args=${t} workingDirectory=${r}`);const c=Date.now(),l=(0,i.v4)(),u={type:"coreclr",request:"launch",name:".NET Test Host Debug",program:e,args:s.parseArgs(t),cwd:r,env:o,console:"integratedTerminal",stopAtEntry:!1,unitTestSessionId:l};let d;const p=new Promise(e=>d=e),h=n.debug.registerDebugAdapterTrackerFactory("coreclr",{createDebugAdapterTracker(e){if(e.configuration.unitTestSessionId===l)return{onDidSendMessage:e=>{"process"===e.event&&"number"==typeof e.body?.systemProcessId&&d(e.body.systemProcessId)}}}});let f;const g=n.debug.onDidStartDebugSession(e=>{e.configuration.unitTestSessionId===l&&(f=e)}),m=n.debug.onDidTerminateDebugSession(e=>{e===f&&d(-1)});try{if(!await n.debug.startDebugging(void 0,u))return-1;const e=await p;return this.logger.debug(()=>`launchProcessUnderDebugger END pid=${e} time=${Date.now()-c}ms`),e}finally{h.dispose(),g.dispose(),m.dispose()}}static parseArgs(e){const t=[];let r="",n=!1;for(let o=0;o<e.length;o++){const i=e[o];'"'===i?n=!n:" "!==i||n?r+=i:r.length>0&&(t.push(r),r="")}return r.length>0&&t.push(r),t}async attachDebuggerToProcess(e,t){this.logger.debug(()=>`attachDebuggerToProcess processId=${e}`);const r=Date.now(),i=n.workspace.getConfiguration("dotnet.testWindow").get("overrideDebugSessionType",void 0),s=(0,o.randomUUID)(),a={type:i??"coreclr",name:".NET Test Attach",request:"attach",processId:e,attachRequestId:s},c=this.waitForDebuggerAttachComplete(s);try{if(!await n.debug.startDebugging(void 0,a))return this.logger.info(()=>"Unable to start debugging session."),!1}catch(t){return this.logger.error(()=>`Error starting debugging session for processId=${e}: ${String(t)}`,t),!1}const l=await c;return this.logger.debug(()=>`attachDebuggerToProcess END processId=${e} result=${l} time=${Date.now()-r}ms`),l}waitForDebuggerAttachComplete(e){return new Promise(t=>{let r=null,o=null,i=!1;const s=n=>{!1===i&&(i=!0,r?.dispose(),o?.dispose(),this.logger.info(()=>`waitForDebuggerAttachComplete END request=${e} result=${n}`),t(n))};r=n.debug.onDidTerminateDebugSession(t=>{t.configuration.attachRequestId===e&&(this.logger.info(()=>"Debug session terminated before attach completed"),s(!1))}),o=n.debug.onDidReceiveDebugSessionCustomEvent(t=>{t.session.configuration.attachRequestId===e&&"attachComplete"===t.event&&(this.logger.info(()=>"Debugger attached"),s(!0))})})}dispose(){this._onTestResultEmitter.dispose(),this._onRunCompleteEmitter.dispose(),this._onTestsDiscoveredEmitter.dispose(),this._onDiscoveryCompleteEmitter.dispose()}}t.CsDKTestWindowServiceCallback=s},8376(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CsDKTestWindowTestController=void 0;const n=r(1398),o=r(6982),i=r(4348),s=r(4553),a=r(680),c=r(7502),l=r(6928),u=r(2679),d=r(8845),p=r(2068),h=r(6438),f=r(4897),g=r(1002),m=r(9943),v=r(1467),y=r(4127),S=r(5304),w=r(1052),E=r(6947),_=r(7102),b=r(5059),P=r(4603),T=r(2963),C=r(293),I=r(5125),O=r(7589);function N(e,t){0===e.children.size?t.push(e):e.children.forEach(e=>N(e,t))}function R(e){return e.capabilities?.includes("TestingPlatformServer")??!1}class A{_context;_controller;_serviceBroker;_logger;_projectSystemMonitor;_knownTestProjects=new Map;_outputWatchers=new Map;_discoveryTimestamps=new Map;_expandedProjects=new Set;_testTree;_buildQueue;_telemetryService;_processArchitecture;_platform="";_testWindowService;_discoveryService;_projectActivationService;_callback;_coverageManager;_coverageCollectionController;_aspireServiceInitialized=!1;_aspireService=null;_initializeStartTime=0;_firstProjectReported=!1;_firstTestReported=!1;_firstTestInteractableReported=!1;_projectsCompletionPromise;resolveProjectsCompletionPromise;_projectsComplete=!1;_discoveryCompletionPromise;_resolveDiscoveryCompletionPromise;_pendingDiscoveryCount=0;_executionCompletionPromise;_resolveExecutionCompletionPromise;_pendingExecutionCount=0;constructor(e,t,r,o){this._context=e,this._controller=n.tests.createTestController(i.TEST_CONTROLLER_ID,i.TEST_EXPLORER_DISPLAY_NAME),this._serviceBroker=t,this._logger=r,this._testTree=new y.TestTree(r,this._controller),this._buildQueue=new s.TaskQueue(r),this._projectSystemMonitor=new v.ProjectSystemMonitor(r),this._telemetryService=a.telemetryService,this._coverageCollectionController=o,this.resetProjectsCompletionPromise(),this.resetDiscoveryCompletionPromise(),this.resetExecutionCompletionPromise()}async initialize(){this._initializeStartTime=performance.now(),this._callback=new h.CsDKTestWindowServiceCallback(this._logger,this._testTree),this._context.subscriptions.push(this._callback),this._logger.info(()=>`Log verbosity: ${n.LogLevel[this._logger.logLevel]}`);const e=this._context.extension.packageJSON.version;this._logger.info(()=>`C# Dev Kit version: ${e}`),this._platform=process?.platform,this._logger.debug(()=>`platform: ${this._platform}`),this._processArchitecture=process?.arch,this._logger.debug(()=>`arch: ${this._processArchitecture}`);const t=await this._serviceBroker.getProxy(p.InternalDescriptors.csDKTestWindowServer,{clientRpcTarget:this._callback});if(!t)return void this._logger.error(()=>"Error connecting to the test window service.");this._testWindowService=t,this._context.subscriptions.push(t);const r=new f.CsDKSourceBasedTestDiscoveryCallback(this._logger,this._testTree),o=await this._serviceBroker.getProxy(p.InternalDescriptors.csDKSourceBasedTestDiscovery,{clientRpcTarget:r});if(!o)return void this._logger.error(()=>"Error connecting to the source-based test discovery service.");this._discoveryService=o,this._context.subscriptions.push(o);const i=await this._serviceBroker.getProxy(m.Descriptors.projectActivationService);i?(this._projectActivationService=i,this._context.subscriptions.push(i)):this._logger.warn(()=>"Project activation service is not available. Test project activation will be skipped."),this._controller.createRunProfile("Run",n.TestRunProfileKind.Run,(e,t)=>this.runTests(e,t),!0),n.extensions.getExtension("ms-dotnettools.csharp")?this._controller.createRunProfile("Debug",n.TestRunProfileKind.Debug,(e,t)=>this.debugTests(e,t),!0):this._logger.warn(()=>"C# extension not found. Debug test profile will not be available."),this._coverageManager=new S.CoverageManager(await this._coverageCollectionController);const s=this._controller.createRunProfile("Coverage",n.TestRunProfileKind.Coverage,(e,t)=>this.coverageTests(e,t),!0);this._coverageManager.setupCoverageProfile(s),this._controller.resolveHandler=async e=>{if(!e)return;if(e.parent)return;const t=this._testTree.getProjectData(e);if(!t)return void this._logger.error(()=>`No project data found for item: ${e.id}`);const r=(0,y.getProjectId)(t);if(this._discoveryTimestamps.has(r))this._logger.debug(()=>`Discovery already completed for project: ${t.projectName}, skipping.`);else{this._expandedProjects.add(r),this._logger.debug(()=>`Resolving tests for project: ${t.projectName}`);try{let e=!1;if(t.outputPath)try{await n.workspace.fs.stat(n.Uri.file(t.outputPath)),e=!0}catch{}if(e)await this.discoverTestsInProject(t);else{const e=b.testExplorerStrings.buildProject;await n.window.showWarningMessage((0,b.formatTestString)(b.testExplorerStrings.testAssemblyNotFound,t.projectName),{modal:!0},e)===e&&(await this.buildProject(t.projectPath)?await this.discoverTestsInProject(t):this._logger.error(()=>`Build failed for project '${t.projectName}', unable to discover tests.`))}}catch(e){this._logger.error(()=>`Error discovering tests in project ${t.projectName}: ${String(e)}`)}}};const a=(0,u.resolveConfigVariables)(n.workspace.getConfiguration("dotnet.testWindow").get("useTestPlatformPath",void 0)),l=n.workspace.getConfiguration().get("dotnet.dotnetPath"),d=n.workspace?.workspaceFolders??[],g=d[0]?.uri.fsPath??"";await t.initialize({workingDirectory:g,logLevel:this._logger.logLevel,dotnetPath:l,useTestPlatformPath:a}),this._logger.onDidChangeLogLevel(e=>{t.setLogLevel(e)}),this._context.subscriptions.push(n.workspace.onDidOpenTextDocument(async e=>{"csharp"===e.languageId&&(this._logger.debug(()=>`C# file opened: ${e.uri.fsPath}`),await this.tryActivateTestProject(e.uri.fsPath))})),this._context.subscriptions.push(n.window.onDidChangeActiveTextEditor(async e=>{e&&"csharp"===e.document.languageId&&(this._logger.debug(()=>`Switched to C# file: ${e.document.uri.fsPath}`),await this.tryActivateTestProject(e.document.uri.fsPath,"editorswitch"))})),await this.initializeFromCache(),await this.startProjectSystemMonitor();const v=performance.now()-this._initializeStartTime;this._telemetryService?.sendTelemetryEvent(c.TelemetryEventNames.ControllerInitCompleteEvent,{[c.TelemetryEventNames.ControllerTypeProperty]:"csdk",[c.TelemetryEventNames.PlatformProperty]:this._platform,[c.TelemetryEventNames.ArchitectureProperty]:this._processArchitecture??"unknown"},{[c.TelemetryEventNames.ControllerInitDurationProperty]:v});const w=n.window.activeTextEditor;w&&"csharp"===w.document.languageId&&(this._logger.debug(()=>`C# file already active: ${w.document.uri.fsPath}`),await this.tryActivateTestProject(w.document.uri.fsPath))}createTestRunnerService(){return new _.TestRunnerService(this._logger,this._projectSystemMonitor,this)}async runTestsForProjects(e,t,r){const o=[];for(const t of e){const e=this._testTree.findProjectItem(t);e&&o.push(e)}const i=new n.TestRunRequest(o);await this.runOrDebugTests(i,t,!1,r)}async tryActivateTestProject(e,t="fileopen"){if(!this._discoveryService||!this._projectActivationService)return;const r=performance.now();let n=!1,o=!1;try{const t=await this._discoveryService.tryGetProjectForTestFile(e);if(t){n=!0,this._logger.debug(()=>`Test file detected, activating project: ${t}`),await this._projectActivationService.activateProject(t,g.ProjectRequestPriority.Foreground,g.LanguageServiceRequirement.Full);const e=await this._projectSystemMonitor.getProject(t);if(e&&e.length>0){this._logger.debug(()=>`Project activated, adding project: ${e[0].projectName}`);for(const t of e)this.addOrUpdateProject(t);o=!0,await Promise.all(e.map(e=>this.discoverTestsInProject(e)))}}}catch(t){this._logger.warn(()=>`Failed to activate test project for '${e}': ${String(t)}`)}finally{const e=performance.now()-r;this._telemetryService?.sendTelemetryEvent(c.TelemetryEventNames.CsDKTestFileActivationEvent,{[c.TelemetryEventNames.CsDKActivationSourceProperty]:t,[c.TelemetryEventNames.CsDKActivationProjectFoundProperty]:String(n),[c.TelemetryEventNames.CsDKActivationDiscoveryTriggeredProperty]:String(o)},{[c.TelemetryEventNames.CsDKActivationDurationProperty]:e})}}async runTests(e,t){await this.runOrDebugTests(e,!1,!1,t)}async debugTests(e,t){await this.runOrDebugTests(e,!0,!1,t)}async coverageTests(e,t){await this.runOrDebugTests(e,!1,!0,t)}async showTestResultsView(){if("neverOpen"!==n.workspace.getConfiguration("testing").get("automaticallyOpenTestResults"))try{await n.commands.executeCommand("workbench.panel.testResults.view.focus",{preserveFocus:!0}),this._logger.debug(()=>"Switched focus to Test Results view")}catch(e){this._logger.warn(()=>`Could not switch to Test Results view: ${String(e)}`)}else this._logger.debug(()=>"Skipping Test Results view switch due to testing.automaticallyOpenTestResults setting")}async runOrDebugTests(e,t,r=!1,i){const s=this._testWindowService;if(!s||!this._callback)return void this._logger.error(()=>"Test window service is not available.");this.beginExecution();const a=this._controller.createTestRun(e),u=performance.now();let d=0,p=0,h=0;const f=void 0!==e.include&&e.include.length>0;let g=!1,m=0,v=0,S=0,_=u;try{const c=new Map;if(e.include&&e.include.length>0)for(const t of e.include){let e=t;for(;e.parent;)e=e.parent;const r=[];N(t,r);const n=c.get(e)??[];n.push(...r),c.set(e,n)}else this._controller.items.forEach(e=>{c.set(e,[])});if(0===c.size)return this._logger.warn(()=>"No test projects to run."),void a.end();const u=[];for(const[e,t]of c){const r=this._testTree.getProjectData(e);r&&u.push({projectItem:e,projectData:r,selectedTests:t})}m=u.length;const f=new Set,P=new Set,T=performance.now(),C=new Set;for(const{projectData:e}of u)C.add(e.projectPath);const I=u.map(e=>e.projectData);if(!i?.isCancellationRequested&&C.size>0){const e=await this._buildQueue.enqueue(()=>this.buildProjectsWithSolution(I),12e5,`Build ${C.size} projects`);if(!0===e)for(const e of C)f.add(e);else if(!1===e)for(const e of C)P.add(e);else{this._logger.warn(()=>"Batch build was not possible, falling back to sequential project builds.");for(const{projectData:e}of u){if(i?.isCancellationRequested)break;const t=e.projectPath;f.has(t)||P.has(t)||(await this.buildProject(t)?f.add(t):(this._logger.error(()=>`Build failed for project: ${t}`),P.add(t)))}}}v=performance.now()-T;const O=new Set,A=performance.now();for(const{projectItem:e,projectData:t}of u){if(i?.isCancellationRequested)break;if(P.has(t.projectPath))continue;const r=(0,y.getProjectId)(t);this._discoveryTimestamps.has(r)||(this._logger.info(()=>`Discovery not yet run for '${t.projectName}', discovering now before test run.`),await this.discoverTestsInProject(t),O.add(e))}S=performance.now()-A,await this.showTestResultsView(),_=performance.now();const D=r?(0,o.randomUUID)():void 0;let x;if(r&&this._coverageManager&&D){const e=await(0,w.getRunSettings)(!1,this._logger),t=u.filter(e=>!P.has(e.projectData.projectPath)).map(e=>l.dirname(e.projectData.outputPath));x=await this._coverageManager.startCoverageCollection(D,e,a,t),this._logger.debug(()=>`Starting coverage collection with run settings: ${x}`)}if(t&&u.some(e=>!P.has(e.projectData.projectPath)&&e.projectData.capabilities.includes("AspireDashboard"))){this._aspireServiceInitialized||(this._logger.debug(()=>"Aspire project detected."),this._aspireService=await(0,E.connectToAspireServer)(this._serviceBroker,this._logger,this._telemetryService),this._aspireServiceInitialized=!0);const e=x??await(0,w.getRunSettings)(!1,this._logger);x=await this._updateRunSettingsForAspireProject(this._aspireService,e)}try{for(const{projectItem:e,projectData:r,selectedTests:c}of u){if(i?.isCancellationRequested)break;if(P.has(r.projectPath)){const t=c.length>0?c:[];0===t.length&&N(e,t);for(const e of t)a.errored(e,new n.TestMessage((0,b.formatTestString)(b.testExplorerStrings.buildFailedForProject,r.projectName)));continue}let l,u;O.has(e)?(l=[],N(e,l),u=l.map(e=>this._testTree.getTestInfo(e)?.testId).filter(e=>void 0!==e)):c.length>0?(l=c,u=l.map(e=>this._testTree.getTestInfo(e)?.testId).filter(e=>void 0!==e)):(l=[],N(e,l),u=void 0);for(const e of l)a.enqueued(e);for(const e of l)a.started(e);const f=new Map;for(const e of l){const t=this._testTree.getTestInfo(e);t&&f.set(t.testId,e)}const g=new Set,m=(0,o.randomUUID)(),v=[],y=new Promise(e=>{v.push(this._callback.onTestResult(e=>{if(e.sessionId!==m)return;const t=f.get(e.result.testId);this._testTree.applyResult(a,e.result,t,r).then(t=>{switch(t&&!f.has(e.result.testId)&&f.set(e.result.testId,t),t&&g.add(t),e.result.outcome){case"Passed":d++;break;case"Failed":p++;break;default:h++}})}),this._callback.onRunComplete(t=>{t.sessionId===m&&e()})),i?.onCancellationRequested(()=>{s.cancelTestRun(),e()})});try{await s.runTests({projectPath:r.projectPath,outputPath:r.outputPath,isTestingPlatform:R(r),testIds:u,sessionId:m,isDebug:t,runSettings:x},i)}catch(e){if(!i?.isCancellationRequested)throw e;this._logger.info(()=>`Test ${t?"debug":"run"} cancelled for '${r.projectName}'.`)}await y,v.forEach(e=>{e.dispose()});for(const e of l)g.has(e)||a.skipped(e)}}finally{r&&this._coverageManager&&D&&await this._coverageManager.stopCoverageCollection(D)}g=!0}catch(e){this._logger.error(()=>"Error running tests",e),this._telemetryService?.sendTelemetryErrorEvent(e,{context:"runOrDebugTests"})}finally{const e=d+p+h;if(e>0){a.appendOutput("\r\n========================================\r\n"),a.appendOutput(`${b.testExplorerStrings.testRunSummary}\r\n`),a.appendOutput("========================================\r\n"),a.appendOutput(`${(0,b.formatTestString)(b.testExplorerStrings.totalTests,e)}\r\n`),a.appendOutput(`${(0,b.formatTestString)(b.testExplorerStrings.passed,d)}\r\n`),a.appendOutput(`${(0,b.formatTestString)(b.testExplorerStrings.failed,p)}\r\n`),a.appendOutput(`${(0,b.formatTestString)(b.testExplorerStrings.skipped,h)}\r\n`),a.appendOutput(`${p>0?b.testExplorerStrings.resultFailed:b.testExplorerStrings.resultSucceeded}\r\n`);const t=performance.now()-u,r=(t/1e3).toFixed(2);a.appendOutput(`${(0,b.formatTestString)(b.testExplorerStrings.totalTimeIncludingBuild,r,t.toFixed(0))}\r\n`),a.appendOutput("========================================\r\n")}const n=performance.now()-u,o=performance.now()-_,i=p>0?"Failed":d>0?"Passed":h>0?"Skipped":"NoTests";this._telemetryService?.sendTelemetryEvent(c.TelemetryEventNames.CsDKExecutionLifecycleEvent,{[c.TelemetryEventNames.ControllerTypeProperty]:"csdk",[c.TelemetryEventNames.CsDKExecutionIsDebugProperty]:String(t),[c.TelemetryEventNames.CsDKExecutionIsCoverageProperty]:String(r),[c.TelemetryEventNames.CsDKExecutionIsSelectedRunProperty]:String(f),[c.TelemetryEventNames.CsDKExecutionSucceededProperty]:String(g),[c.TelemetryEventNames.CsDKExecutionResultProperty]:i},{[c.TelemetryEventNames.CsDKExecutionDurationProperty]:n,[c.TelemetryEventNames.CsDKExecutionNumTestsProperty]:d+p+h,[c.TelemetryEventNames.CsDKExecutionNumPassedProperty]:d,[c.TelemetryEventNames.CsDKExecutionNumFailedProperty]:p,[c.TelemetryEventNames.CsDKExecutionNumSkippedProperty]:h,[c.TelemetryEventNames.CsDKExecutionNumProjectsProperty]:m}),this._telemetryService?.sendTelemetryEvent(c.TelemetryEventNames.E2ERunLifecycleEvent,{[c.TelemetryEventNames.ControllerTypeProperty]:"csdk",[c.TelemetryEventNames.CsDKExecutionIsDebugProperty]:String(t),[c.TelemetryEventNames.CsDKExecutionIsCoverageProperty]:String(r),[c.TelemetryEventNames.CsDKExecutionIsSelectedRunProperty]:String(f),[c.TelemetryEventNames.CsDKExecutionResultProperty]:i},{[c.TelemetryEventNames.E2ERunTotalDurationProperty]:n,[c.TelemetryEventNames.E2ERunBuildDurationProperty]:v,[c.TelemetryEventNames.E2ERunDiscoveryDurationProperty]:S,[c.TelemetryEventNames.E2ERunExecutionDurationProperty]:o,[c.TelemetryEventNames.E2ERunNumProjectsProperty]:m,[c.TelemetryEventNames.E2ERunNumTestsProperty]:d+p+h}),this.endExecution(),a.end()}}async _updateRunSettingsForAspireProject(e,t){const r=await(0,E.getAspireEnvironmentVars)(e);if(!r||0===Object.keys(r).length)return this._logger.debug(()=>"No environment variables found from Aspire server."),t;try{const e=(new P.XMLParser).parse(t);e.RunSettings||(e.RunSettings={}),e.RunSettings.RunConfiguration||(e.RunSettings.RunConfiguration={}),e.RunSettings.RunConfiguration.EnvironmentVariables||(e.RunSettings.RunConfiguration.EnvironmentVariables={});for(const[t,n]of Object.entries(r))e.RunSettings.RunConfiguration.EnvironmentVariables[t]=n;let n=new P.XMLBuilder({format:!0,suppressEmptyNode:!0}).build(e);const o='<?xml version="1.0" encoding="utf-8"?>';n=n.replace(/^<\?xml.*?\?>/,o),n.startsWith("<?xml")||(n=`${o}\n${n}`);const i=["DEBUG_SESSION_PORT","DCP_INSTANCE_ID_PREFIX"],s=Object.entries(r).filter(([e])=>i.includes(e)).map(([e,t])=>`${e}=${t}`).join(", ");return this._logger.debug(()=>s?`Updated runSettings with non-sensitive vars: ${s}`:`Updated runSettings with ${Object.keys(r).length} environment variables (no non-sensitive vars present)`),n}catch(e){return this._logger.caughtError("Failed to update runSettings",e),t}}buildProject(e){return this._buildQueue.enqueue(()=>this.executeBuild(e),12e5,`Build ${l.basename(e)}`)}async executeBuild(e){const t=await this._serviceBroker.getProxy(m.Descriptors.buildService);if(!t)return this._logger.error(()=>"Error connecting to the build service."),!1;try{this._logger.info(()=>`Building project: ${e}`);const r=await t.build(e);return r||this._logger.error(()=>`Build failed for project: ${e}`),r}finally{t.dispose?.()}}async buildProjectsWithSolution(e){if(0===e.length)return!0;const t=await(0,I.getOpenedSolution)();if(!t)return void this._logger.warn(()=>"No opened solution found, cannot batch build.");const r=[],o=new Set;for(const t of e){let e=t.projectName;try{const r=await(0,O.getSolutionFolderPathForProject)(this._serviceBroker,void 0,t.projectName);r&&(e=r)}catch(e){this._logger.warn(()=>`Failed to resolve solution folder path for ${t.projectName}: ${e}`)}const n=e.replace(/[%$@;.()']/g,"_");o.has(n)||(o.add(n),r.push(n))}const i=`/target:${r.join(";")}`,s=[O.BUILD,t,i],c=new Set(e.map(e=>e.targetFramework).filter(Boolean));if(1===c.size){const e=[...c][0];s.push("--framework",e),this._logger.debug(()=>`All projects target ${e}, adding --framework flag.`)}s.push("/property:GenerateFullPaths=true");const l=a.environmentStateManager?.getLatestEnvironmentState()?.configuration;if("string"==typeof l){const e=l.split("|",2);e[0]&&s.push(`/p:Configuration=${e[0]}`),e[1]&&s.push(`/p:Platform="${e[1]}"`)}s.push("/consoleloggerparameters:NoSummary"),this._logger.debug(()=>`Batch building ${e.length} projects via solution targets: ${r.join(", ")}`);const u=(0,T.getOpenedWorkspaceHelper)();if(!u)return void this._logger.error(()=>"Cannot find workspace folder for batch build.");const d=`build ${r.length} projects`,p={type:T.DotnetTaskProvider.dotnetType,task:d,file:t},h=new n.CustomExecution(async()=>new C.CustomBuildTaskTerminal(a.dotnetSdkPath??"dotnet",s,u.uri.fsPath,p)),f=new n.Task(p,u,d,"dotnet",h);return f.group=n.TaskGroup.Build,new Promise((e,t)=>{const r=n.tasks.onDidEndTaskProcess(t=>{t.execution.task===f&&(r.dispose(),e(0===t.exitCode))});n.tasks.executeTask(f).then(void 0,e=>{r.dispose(),t(e)})})}async discoverTestsInProject(e){const t=this._testWindowService;if(!t||!this._callback)return void this._logger.error(()=>"Test window service is not available for discovery.");if(!e.outputPath)return void this._logger.debug(()=>`No output path for project '${e.projectName}', skipping vstest discovery.`);this.beginDiscovery(),this._logger.debug(()=>`discoverTestsInProject: '${e.projectName}'`);const r=(0,o.randomUUID)(),n=performance.now();let i=0,s=!1;const a=[],l=new Promise(t=>{a.push(this._callback.onTestsDiscovered(t=>{if(t.sessionId===r){i+=t.tests.length;for(const r of t.tests)this._testTree.addTestInfo(r,e);if(!this._firstTestReported&&t.tests.length>0){this._firstTestReported=!0;const e=performance.now()-this._initializeStartTime;this._telemetryService?.sendTelemetryEvent(c.TelemetryEventNames.CsDKFirstTestDiscoveredEvent,{[c.TelemetryEventNames.ControllerTypeProperty]:"csdk"},{[c.TelemetryEventNames.CsDKFirstTestDiscoveredDurationProperty]:e})}if(!this._firstTestInteractableReported&&t.tests.length>0){this._firstTestInteractableReported=!0;const e=performance.now()-this._initializeStartTime;this._telemetryService?.sendTelemetryEvent(c.TelemetryEventNames.FirstTestInteractableEvent,{[c.TelemetryEventNames.ControllerTypeProperty]:"csdk",[c.TelemetryEventNames.FirstTestInteractableTriggerProperty]:"expand"},{[c.TelemetryEventNames.FirstTestInteractableDurationProperty]:e,[c.TelemetryEventNames.FirstTestInteractableNumTestsProperty]:t.tests.length})}}}),this._callback.onDiscoveryComplete(e=>{e.sessionId===r&&t()}))});try{await t.discoverTests({projectPath:e.projectPath,outputPath:e.outputPath,isTestingPlatform:R(e),sessionId:r}),await l,this.markProjectDiscovered((0,y.getProjectId)(e)),s=!0}catch(t){this._logger.error(()=>`Error during test discovery for '${e.projectName}': ${String(t)}`),this._telemetryService?.sendTelemetryErrorEvent(t,{context:"discoverTestsInProject"})}finally{const t=performance.now()-n;this._telemetryService?.sendTelemetryEvent(c.TelemetryEventNames.CsDKDiscoveryLifecycleEvent,{[c.TelemetryEventNames.ControllerTypeProperty]:"csdk",[c.TelemetryEventNames.CsDKDiscoveryIsTestingPlatformProperty]:String(R(e)),[c.TelemetryEventNames.CsDKDiscoverySucceededProperty]:String(s)},{[c.TelemetryEventNames.CsDKDiscoveryDurationProperty]:t,[c.TelemetryEventNames.CsDKDiscoveryNumTestsProperty]:i}),a.forEach(e=>{e.dispose()}),this.endDiscovery()}}markProjectDiscovered(e){const t=Date.now();this._discoveryTimestamps.set(e,t),this._logger.debug(()=>`Discovery marked complete for project '${e}' at ${new Date(t).toISOString()}`)}getLastDiscoveryTimestamp(e){return this._discoveryTimestamps.get(e)}watchOutputFile(e){const t=(0,y.getProjectId)(e),r=this._outputWatchers.get(t);if(r&&r.dispose(),!e.outputPath)return;const o=n.Uri.file(e.outputPath),i=A.relativePattern(o,this._logger),s=n.workspace.createFileSystemWatcher(i);s.onDidChange(async()=>{this._logger.info(()=>`Output file changed: ${e.outputPath}`),this._expandedProjects.has(t)?await this.discoverTestsInProject(e):this._logger.debug(()=>`Skipping discovery for '${e.projectName}' — project node has not been expanded yet.`)}),s.onDidCreate(async()=>{this._logger.info(()=>`Output file created: ${e.outputPath}`),this._expandedProjects.has(t)?await this.discoverTestsInProject(e):this._logger.debug(()=>`Skipping discovery for '${e.projectName}' — project node has not been expanded yet.`)}),this._outputWatchers.set(t,s),this._context.subscriptions.push(s)}async initializeFromCache(){if(!this._callback)return;const e=performance.now();let t,r=0,n=!1;try{if(t=await this._serviceBroker.getProxy(m.Descriptors.projectCacheStateService)??void 0,!t)return void this._logger.warn(()=>"Project cache state service is not available.");const e=t.getAll(),o=Object.entries(e);if(0===o.length)return void this._logger.info(()=>"No cached projects found.");n=!0,this._logger.info(()=>`Initializing ${o.length} project(s) from cache.`);for(const[e,t]of o){if(!t||!1===t.isTestProject)continue;const n=l.basename(e,l.extname(e)),o=t.targetFrameworks??[],i=Object.keys(t.keyOutputs??{}),s=t.capabilities??[];if(o.length>0)for(const a of o){const o=i.find(e=>e.endsWith(`|${a}`)),c=o?t.keyOutputs[o]:"";this.addOrUpdateProject({projectName:n,projectPath:e,outputPath:c,targetFramework:a,targetRuntime:"",capabilities:s,fromCache:!0}),r++}else{if(!t.targetFramework){this._logger.warn(()=>`Skipping cached project '${n}': no target framework available.`);continue}const o=i.length>0?t.keyOutputs[i[0]]:"";this.addOrUpdateProject({projectName:n,projectPath:e,outputPath:o,targetFramework:t.targetFramework,targetRuntime:"",capabilities:s,fromCache:!0}),r++}}}catch(e){this._logger.error(()=>`Failed to initialize from project cache: ${String(e)}`)}finally{const o=performance.now()-e;this._telemetryService?.sendTelemetryEvent(c.TelemetryEventNames.CsDKCacheRestoreEvent,{[c.TelemetryEventNames.CsDKCacheAvailableProperty]:String(n)},{[c.TelemetryEventNames.CsDKCacheProjectCountProperty]:r,[c.TelemetryEventNames.CsDKCacheDurationProperty]:o}),t?.dispose?.()}}addOrUpdateProject(e){if(!this._callback)return;if(!this.projectIsValidForPlatform(e))return void this._logger.debug(()=>`Skipping project '${e.projectName}' due to unsupported target framework '${e.targetFramework}' on platform '${this._platform}'`);const t=(0,y.getProjectId)(e);if(this._knownTestProjects.get(t))this._knownTestProjects.set(t,e),this._testTree.updateProject(e);else if(this._knownTestProjects.set(t,e),this._testTree.addProject(e),!this._firstProjectReported){this._firstProjectReported=!0;const t=performance.now()-this._initializeStartTime,r=e.fromCache?"cache":"projectsystem";this._telemetryService?.sendTelemetryEvent(c.TelemetryEventNames.CsDKFirstProjectAvailableEvent,{[c.TelemetryEventNames.ControllerTypeProperty]:"csdk",[c.TelemetryEventNames.FirstProjectAvailableSourceProperty]:r},{[c.TelemetryEventNames.CsDKFirstProjectAvailableDurationProperty]:t})}this.watchOutputFile(e)}async startProjectSystemMonitor(){if(this._callback)try{await this._projectSystemMonitor.start(this._context,this._serviceBroker,e=>this.handleProjectsChanged(e),()=>this.handleSolutionClosed(),!0)}catch(e){this._logger.error(()=>`Failed to start project system monitor: ${String(e)}`)}}waitForTestProjects(){return this._projectsComplete?Promise.resolve():this._projectsCompletionPromise}resetProjectsCompletionPromise(){this._projectsCompletionPromise=new Promise(e=>{this.resolveProjectsCompletionPromise=e})}waitForDiscovery(){return 0===this._pendingDiscoveryCount?Promise.resolve():this._discoveryCompletionPromise}resetDiscoveryCompletionPromise(){this._discoveryCompletionPromise=new Promise(e=>{this._resolveDiscoveryCompletionPromise=e})}beginDiscovery(){0===this._pendingDiscoveryCount&&this.resetDiscoveryCompletionPromise(),this._pendingDiscoveryCount++}endDiscovery(){this._pendingDiscoveryCount--,0===this._pendingDiscoveryCount&&this._resolveDiscoveryCompletionPromise()}waitForExecution(){return 0===this._pendingExecutionCount?Promise.resolve():this._executionCompletionPromise}resetExecutionCompletionPromise(){this._executionCompletionPromise=new Promise(e=>{this._resolveExecutionCompletionPromise=e})}beginExecution(){0===this._pendingExecutionCount&&this.resetExecutionCompletionPromise(),this._pendingExecutionCount++}endExecution(){this._pendingExecutionCount--,0===this._pendingExecutionCount&&this._resolveExecutionCompletionPromise()}handleProjectsChanged(e){if(this._callback){for(const t of e.addedProjects)this.addOrUpdateProject(t);for(const t of e.changedProjects)this.addOrUpdateProject(t);for(const t of e.removedProjects){const e=(0,y.getProjectId)(t);this._knownTestProjects.delete(e),this._discoveryTimestamps.delete(e),this._testTree.removeProject(t);const r=this._outputWatchers.get(e);r&&(r.dispose(),this._outputWatchers.delete(e))}e.isIncomplete?this._projectsComplete&&(this._projectsComplete=!1,this.resetProjectsCompletionPromise()):(this._projectsComplete=!0,this.resolveProjectsCompletionPromise())}}handleSolutionClosed(){this._knownTestProjects.clear(),this._discoveryTimestamps.clear(),this._testTree.replaceAll([]);for(const e of this._outputWatchers.values())e.dispose();this._outputWatchers.clear(),this._projectsComplete=!1,this.resolveProjectsCompletionPromise(),this.resetProjectsCompletionPromise(),this._resolveDiscoveryCompletionPromise(),this._pendingDiscoveryCount=0,this.resetDiscoveryCompletionPromise(),this._resolveExecutionCompletionPromise(),this._pendingExecutionCount=0,this.resetExecutionCompletionPromise()}static relativePattern(e,t){const r=n.workspace.getWorkspaceFolder(e);if(!r){t.debug(()=>`Test container is outside of workspace: ${e.fsPath}`);const r=l.dirname(e.fsPath),o=l.basename(e.fsPath);return new n.RelativePattern(n.Uri.file(r),o)}const o=n.workspace.asRelativePath(e,!1);return new n.RelativePattern(r,o)}projectIsValidForPlatform(e){return(0,d.isProjectValidForPlatform)(e.targetFramework,this._platform,this._processArchitecture)}dispose(){for(const e of this._outputWatchers.values())e.dispose();this._outputWatchers.clear(),this._controller.dispose()}}t.CsDKTestWindowTestController=A},7102(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestRunnerService=void 0,t.TestRunnerService=class{logger;projectSystemMonitor;testController;constructor(e,t,r){this.logger=e,this.projectSystemMonitor=t,this.testController=r}async tryRunTestProject(e,t,r){if(!e||0===e.length)return!1;try{const n=[];for(const t of e){if(r?.isCancellationRequested)return this.logger.info(()=>"Test run cancelled before looking up project data."),!1;const e=await this.projectSystemMonitor.getProject(t);e&&0!==e.length?n.push(...e):this.logger.warn(()=>`Project '${t}' is not a known test project.`)}return 0!==n.length&&(await this.testController.runTestsForProjects(n,t.debug,r),!0)}catch(e){return this.logger.error(()=>`Error running test projects: ${e instanceof Error?e.message:String(e)}`),!1}}}},4127(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestTree=t.getProjectLabel=t.getProjectId=void 0;const n=r(1398),o=r(5059),i="win32"===process.platform;t.getProjectId=e=>`${e.projectPath}[${e.targetFramework}]`,t.getProjectLabel=e=>{const t=e.targetFramework??"unknown";return`${e.projectName} (${t})`},t.TestTree=class{logger;controller;_projectDataMap=new WeakMap;_testInfoMap=new WeakMap;constructor(e,t){this.logger=e,this.controller=t}getProjectData(e){return this._projectDataMap.get(e)}getTestInfo(e){return this._testInfoMap.get(e)}getOrCreateItem(e,t,r,n){const o=e.get(t);if(o)return o;const i=this.controller.createTestItem(t,r,n);return e.add(i),i}addProject(e){const r=`project:${(0,t.getProjectId)(e)}`,n=this.getOrCreateItem(this.controller.items,r,(0,t.getProjectLabel)(e));return n.canResolveChildren=!0,this._projectDataMap.set(n,e),n}updateProject(e){const r=`project:${(0,t.getProjectId)(e)}`,n=this.controller.items.get(r);n?(n.label=(0,t.getProjectLabel)(e),this._projectDataMap.set(n,e)):this.addProject(e)}removeProject(e){const r=`project:${(0,t.getProjectId)(e)}`;this.controller.items.delete(r)}replaceAll(e){this.controller.items.replace(e)}findProjectItem(e){const r=`project:${(0,t.getProjectId)(e)}`;return this.controller.items.get(r)}findProjectsByPath(e){const t=`project:${e}`,r=[];return this.controller.items.forEach(e=>{if(function(e,t){return!(e.length<t.length)&&(i?0===e.slice(0,t.length).localeCompare(t,void 0,{sensitivity:"accent"}):e.startsWith(t))}(e.id,t)){const t=this._projectDataMap.get(e);t&&r.push(t)}}),r}addTestInfo(e,r){if(!e.displayHierarchy||0===e.displayHierarchy.length)return;const n=`project:${(0,t.getProjectId)(r)}`;return this.addTestInfoUnderProject(n,(0,t.getProjectLabel)(r),e,r)}async parseErrorStackTrace(e){const t=[];if(!e)return t;const r=e.split("\n"),o=/at (.*?)(?:\s+in\s+(.*?)(?::line\s+(\d+))?)?$/m;for(const e of r){const r=o.exec(e.trim());if(r){const[,e,o,i]=r;if(o){const r=n.Uri.file(o);let s=!1;try{await n.workspace.fs.stat(r),s=!0}catch{}if(s){const o=i?new n.Position(parseInt(i)-1,0):void 0;t.push(new n.TestMessageStackFrame(e,r,o))}else t.push(new n.TestMessageStackFrame(e))}else t.push(new n.TestMessageStackFrame(e))}}return t}async applyResult(e,t,r,i){let s=r;if(s||(s=this.addTestInfo(t,i)),s){switch(t.outcome){case"Passed":{e.passed(s,t.durationMs);const r=t.durationMs?`${t.durationMs}ms`:o.testExplorerStrings.outputNotAvailable;e.appendOutput(`${(0,o.formatTestString)(o.testExplorerStrings.outputPassed,s.label,r)}\r\n`,void 0,void 0);break}case"Failed":{const r=await this.parseErrorStackTrace(t.errorStackTrace);let i="";r.length>0&&(i=r.map(e=>e.uri&&e.position?`at ${e.label} (${e.uri.toString().replace(/\\/g,"/")}#L${e.position.line+1},${e.position.character})`:e.uri?`at ${e.label} (${e.uri.toString().replace(/\\/g,"/")})`:`at ${e.label}`).join("\r\n"));const a=`${t.errorMessage??o.testExplorerStrings.testFailed}\r\n${i}`,c=new n.TestMessage(a);r.length>0?(c.stackTrace=r,r[0].uri&&r[0].position&&(c.location=new n.Location(r[0].uri,r[0].position))):s.uri&&s.range&&(c.location=new n.Location(s.uri,s.range)),e.failed(s,c,t.durationMs);const l=t.durationMs?`${t.durationMs}ms`:o.testExplorerStrings.outputNotAvailable;e.appendOutput(`${(0,o.formatTestString)(o.testExplorerStrings.outputFailed,s.label,l)}\r\n`,void 0,void 0),t.errorMessage&&e.appendOutput(` ${t.errorMessage}\r\n`,void 0,void 0);break}case"NotExecuted":e.skipped(s),e.appendOutput(`${(0,o.formatTestString)(o.testExplorerStrings.outputSkipped,s.label)}\r\n`,void 0,void 0);break;default:e.errored(s,new n.TestMessage(o.testExplorerStrings.testCouldNotBeRun),t.durationMs),e.appendOutput(`${(0,o.formatTestString)(o.testExplorerStrings.outputErrorTestCouldNotRun,s.label)}\r\n`,void 0,void 0)}if(t.stdOut){const r=t.stdOut.replace(/(?<!\r)\n/g,"\r\n");e.appendOutput(r,void 0,s),e.appendOutput(`[${s.label}] ${r}`,void 0,void 0)}if(t.stdErr){const r=t.stdErr.replace(/(?<!\r)\n/g,"\r\n");e.appendOutput(r,void 0,s),e.appendOutput(`[${s.label}] ERROR: ${r}`,void 0,void 0)}return s}this.logger.warn(()=>`No test item for result: ${t.testId}`)}addTestInfoUnderProject(e,t,r,n){const o=this.getOrCreateItem(this.controller.items,e,t);return this._projectDataMap.set(o,n),this.addTestInfoUnderProjectItem(e,o,r,n)}addTestInfoUnderProjectItem(e,t,r,o){const i=r.displayHierarchy;if(0===i.length)return;let s=t,a=e;for(let e=0;e<i.length-1;e++)a=`${a}/${i[e]}`,s=this.getOrCreateItem(s.children,a,i[e]),this._projectDataMap.set(s,o);const c=i[i.length-1],l=`${a}/${c}`,u=r.sourceFilePath?n.Uri.file(r.sourceFilePath):void 0,d=this.getOrCreateItem(s.children,l,c,u);return r.sourceFileLineNumber>0&&(d.range=new n.Range(r.sourceFileLineNumber-1,0,r.sourceFileLineNumber,0)),this._projectDataMap.set(d,o),this._testInfoMap.set(d,r),d}}},8845(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isProjectValidForPlatform=void 0;const n=r(2679),o=new Set(["net11","net20","net35","net40","net403","net45","net451","net452","net46","net461","net462","net47","net471","net472","net48","net481"]);t.isProjectValidForPlatform=function(e,t,r){if((0,n.skipTargetFrameworkCompatibilityCheck)())return!0;const i=e?.toLowerCase()??"";return!(o.has(i)||"darwin"===t&&"arm64"===r&&(i.startsWith("netcoreapp1")||i.startsWith("netcoreapp2")||i.startsWith("netcoreapp3")||i.startsWith("net5"))||"linux"===t&&"arm64"===r&&(i.startsWith("netcoreapp1")||i.startsWith("netcoreapp2.0")))}},1298(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.refreshProcessInformation=t.pickTraceOutputDirectory=t.buildDotnetTraceCommand=t.buildDotnetTraceArgs=t.buildTraceFileName=t.ensureDirectoryExists=t.getDefaultTraceDirectory=t.formatTimestamp=t.processTracker=t.ProcessTracker=void 0;const n=r(857),o=r(6928),i=r(1398),s=r(4724),a=r(680),c=r(3853),l={server:{name:"Microsoft.VisualStudio.Code.Server",description:"Main server process (ServiceHub, brokered services)"},pshost:{name:"Project System Host",description:"CPS, MSBuild, design-time builds"}},u=["Microsoft-DotNETCore-SampleProfiler","Microsoft-Windows-DotNETRuntime","Microsoft-VisualStudio-CpsCore"],d=".csdevkit-traces";class p{processes=new Map;constructor(){for(const e of Object.keys(l))this.ensure(e)}attachChildProcess(e,t,r){const n=t=>{"number"==typeof t&&t>0&&this.update(e,{pid:t,...r})};"number"==typeof t.pid&&t.pid>0?n(t.pid):t.once("spawn",()=>n(t.pid)),t.once("exit",()=>{const t=this.processes.get(e);t?.pid&&this.update(e,{pid:void 0})})}update(e,t){const r=this.ensure(e),n={processType:e,name:t.name??r.name,description:t.description??r.description,pid:t.pid,lastSeen:"number"==typeof t.pid&&t.pid>0?new Date:r.lastSeen};return this.processes.set(e,n),n}clear(e){this.update(e,{pid:void 0})}get(e){return this.processes.get(e)}getAll(){return[...this.processes.values()]}validate(e){const t=e??[...this.processes.keys()],r=[],n=[];for(const e of t){const t=this.processes.get(e);t&&t.pid?this.isAlive(t.pid)?r.push(t):(this.clear(e),n.push(e)):t?.lastSeen&&n.push(e)}return{active:r,inactive:n}}ensure(e,t){const r=this.processes.get(e);if(r){if(t?.name||t?.description){const n={...r,name:t.name??r.name,description:t.description??r.description};return this.processes.set(e,n),n}return r}const n=l[e],o={processType:e,name:t?.name??n.name,description:t?.description??n.description,pid:void 0,lastSeen:void 0};return this.processes.set(e,o),o}isAlive(e){if(!Number.isFinite(e)||e<=0)return!1;try{return process.kill(e,0),!0}catch(e){return"EPERM"===e?.code}}}t.ProcessTracker=p,t.processTracker=new p;const h={server:[s.default.diagnosticsService],pshost:[s.default.projectTreeProvider]};function f(){const e=i.workspace.workspaceFolders?.[0];return e?o.join(e.uri.fsPath,d):o.join(n.tmpdir(),d)}async function g(e){await i.workspace.fs.createDirectory(i.Uri.file(e))}function m(e){return 0===e.length?"''":`'${e.replace(/'/g,"''")}'`}async function v(e,t){const r=await e.getProxy(t);if(!r)throw new Error(`No service available for descriptor: ${t}`);try{return await r.getProcessInfo()}finally{r.dispose()}}t.formatTimestamp=function(e){return e.toISOString().replace(/[:.]/g,"-")},t.getDefaultTraceDirectory=f,t.ensureDirectoryExists=g,t.buildTraceFileName=function(e,t){const r="number"==typeof e.pid?e.pid.toString():"unknown";return`CSharp_DevKit_${e.processType}_${r}_${t}.nettrace`},t.buildDotnetTraceArgs=function(e){const t=e.providers??u.join(","),r=["collect","--process-id",e.pid.toString(),"--format","nettrace","--providers",t,"--output",e.outputPath];return e.additionalArgs&&e.additionalArgs.trim().length>0&&r.push(...e.additionalArgs.trim().split(/\s+/)),r},t.buildDotnetTraceCommand=function(e){const t=e.providers??u.join(","),r=["dotnet-trace"],n=["collect","--process-id",e.pid.toString(),"--format","nettrace","--providers",t,"--output",e.outputPath];for(const e of n)"collect"===e||e.startsWith("--")||/^[\w-]+$/.test(e)?r.push(e):r.push(m(e));return e.additionalArgs&&e.additionalArgs.trim().length>0&&r.push(e.additionalArgs.trim()),r.join(" ")},t.pickTraceOutputDirectory=async function(e){const t=f(),r=await i.window.showOpenDialog({defaultUri:i.Uri.file(t),canSelectFiles:!1,canSelectFolders:!0,canSelectMany:!1,openLabel:c.selectTraceFolderLabel,title:c.chooseTraceFolderTitle});if(!r||0===r.length)return void e.trace("Trace collection cancelled: no output folder selected.");const n=r[0].fsPath;return await g(n),n},t.refreshProcessInformation=async function(e,r,n){const o=h[n];if(o)for(const i of o)try{const o=await v(e,i);a.logger.log(`Querying process information for ${n} using descriptor: ${i} and got ${JSON.stringify(o)}`);const s=o?.processId??o?.ProcessId;if("number"==typeof s&&s>0){const e=t.processTracker.update(n,{pid:s});return void r.info(`Discovered ${e.name} (PID ${e.pid}) for ${n}.`)}}catch(e){const t=e instanceof Error?e.message:String(e);r.trace(`Unable to query process information for ${n}: ${t}`)}}},9409(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createLineReader=t.isWindows=t.exists=t.containsFileOrFolder=t.waitForProcess=t.pathHasExtension=t.endsWithInvariantIgnoreCase=t.startsWithInvariantIgnoreCase=t.equalsInvariantIgnoreCase=t.delay=t.lazyPromiseLambda=t.fileOrDirectoryExists=t.readJsonFile=t.stripBomFromUtf8BufferIfPresent=void 0;const n=r(1943),o=r(8299),i=r(857),s=r(1858),a=r(6928),c=Buffer.from([239,187,191]);function l(e){return e.length>=3&&e.slice(0,3).equals(c)?e.slice(3):e}function u(e,t){return 0===e.localeCompare(t,"en",{sensitivity:"accent"})}function d(e,t){return e.length>=t.length&&(e.endsWith(t)||u(e.substring(e.length-t.length),t))}t.stripBomFromUtf8BufferIfPresent=l,t.readJsonFile=async function(e){const t=l(await(0,n.readFile)(e));return JSON.parse(t.toString())},t.fileOrDirectoryExists=async function(e){return!!await(0,n.stat)(e).catch(e=>!1)},t.lazyPromiseLambda=function(e){return new o.default((t,r)=>{try{t(e())}catch(e){r(e)}})},t.delay=function(e){return new Promise(t=>setTimeout(t,e))},t.equalsInvariantIgnoreCase=u,t.startsWithInvariantIgnoreCase=function(e,t){return e.length>=t.length&&(e.startsWith(t)||u(e.substring(0,t.length),t))},t.endsWithInvariantIgnoreCase=d,t.pathHasExtension=function(e,t){return"win32"===process.platform||"darwin"===process.platform?d(e,t):e.endsWith(t)},t.waitForProcess=async function(e,t){return new Promise(async function(r,n){let o,a=[],c=0;function l(e,t){e?(e.on("data",t),e.on("close",()=>{++c,u()}),e.readableEnded&&++c):++c}function u(){2===c&&void 0!==o&&(o&&0!==o?a.length>0?n(new s.ExitCodeError(o,`Failed with ExitCode(${o})${i.EOL}Details${i.EOL}${a.join("")}`)):n(new s.ExitCodeError(o,`Failed with ExitCode(${o})`)):r(!0))}l(e.stderr,e=>{t?.log(e.toString()),a.push(e.toString())}),l(e.stdout,e=>{t?.log(e.toString().trimEnd())}),e.on("exit",e=>{o=e,u()}),e.on("error",e=>{c=3,n(new s.ExitCodeError(o??-1,`Process error: ${e.message}`))})})},t.containsFileOrFolder=function(e,t){if(e=a.normalize(e),(t=a.normalize(t)).length>e.length){const r=a.relative(e,t);if(r)return!r.startsWith("..")&&!a.isAbsolute(r)}else if(t.length===e.length){if(e===t)return!0;const r=process.platform;if(("win32"===r||"darwin"===r)&&u(e,t))return!0}return!1},t.exists=async function(e){try{return await(0,n.stat)(e),!0}catch{return!1}},t.isWindows=function(){return"win32"===process.platform},t.createLineReader=function(e){const t=[],r=[];let n="";return e.on("data",e=>{let o;for(n+=e.toString();(o=n.indexOf("\n"))>=0;){let e=n.slice(0,o);n=n.slice(o+1),e.endsWith("\r")&&(e=e.slice(0,-1)),r.length>0?r.shift()(e):t.push(e)}}),e.on("end",()=>{o(null)}),e.on("error",e=>{o(Promise.reject(e))}),()=>t.length>0?Promise.resolve(t.shift()):new Promise(e=>{r.push(e)});function o(e){if(r.length>0){for(const t of r)t(e);r.length=0}}}},2346(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getOrCreateImageCatalog=t.getImageCatalog=t.ImageCatalog=void 0;const n=r(9896),o=r(680),i=r(6928),s=r(9409);class a{imageCatalogPath;imageCatalog;constructor(e,t){this.imageCatalogPath=e,this.imageCatalog=t}getIcon(e,t){const r=e.toLowerCase()+":"+t,s=this.imageCatalog[r];if(s&&this.imageCatalogPath){const e=i.join(this.imageCatalogPath,"svg",s+".16.16.svg"),t=i.join(this.imageCatalogPath,"svg",s+".dark.16.16.svg");if((0,n.existsSync)(e))return{light:e,dark:t};o.logger.log("Requested icon not found: "+s)}return null}}let c;t.ImageCatalog=a,t.getImageCatalog=function(){return c},t.getOrCreateImageCatalog=async function(e){if(!c)try{const t=e.asAbsolutePath("imageCatalog"),r=(e.asAbsolutePath("imageCatalog/imageCatalog.json"),await(0,s.readJsonFile)(e.asAbsolutePath("imageCatalog/imageCatalog.json")));c=new a(t,r)}catch(e){o.logger.log(`Error reading image catalog: ${e}`)}return c}},7032(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectedSolutionFileStatus=void 0;const n=r(1398),o=r(1398),i=r(4628),s=r(680),a=r(5059);t.SelectedSolutionFileStatus=class{statusBarItem;constructor(){this.statusBarItem=n.window.createStatusBarItem("csdevkit.solution",o.StatusBarAlignment.Left,3),this.statusBarItem.hide()}async dispose(){try{this.statusBarItem?.dispose()}catch(e){s.logger.log(`Error disposing solution file opened status bar item: ${e}`)}}show(){this.statusBarItem?.show()}hide(){this.statusBarItem?.hide()}getText(){return this.statusBarItem?.text}async onEnvironmentUpdate(e,t){if(this.statusBarItem){if(t)this.statusBarItem.text=a.messageStrings.workspaceBasedDevelopmentOpened,this.statusBarItem.tooltip=a.messageStrings.workspaceBasedDevelopmentOpened,this.statusBarItem.command=i.default.showProjectDetailsMigration;else{if(""===e)return void this.hide();this.statusBarItem.text=a.messageStrings.solutionFileOpened(e),this.statusBarItem.tooltip=a.messageStrings.solutionFileOpenedTooltip(e),this.statusBarItem.command=i.default.openSolution}this.show()}}}},4379(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProjectInitializationStatus=void 0;const n=r(1398),o=r(3247),i=r(4084),s=r(4724),a=r(680),c=r(4628),l=r(5059),u=r(6928),d=r(5033),p=r(1760);t.ProjectInitializationStatus=class{statusBarItem;statusObserver;environmentVersion;environmentErrors;completedVersion;brokerService;statusService;solutionCount;projectsCount;failedProjectsCount;subscription;activeDocument;activeDocumentVersion;activeProjects;activeProjectsVersion;activeProjectsSubscription;noProjectStatusService;projectStatusServiceFailed;projectLoadingDiagnostics;constructor(){this.statusObserver=new i.Observer(e=>{this.onCompleted(e),this.publishDignosticData(e)},e=>{a.logger.log("Failed to monitor project loading status."),e?(a.logger.log(e,d.LogImportance.low),p.dotnetRuntimeResolved?.dotnetFailureMessage?this.projectStatusServiceFailed=p.dotnetRuntimeResolved.dotnetFailureMessage:"System.AggregateException"===e.ClassName&&e.InnerException?this.projectStatusServiceFailed=e.InnerException.Message:this.projectStatusServiceFailed=e.Message,this.projectStatusServiceFailed??=JSON.stringify(e,null,2)):this.projectStatusServiceFailed="Unknown Error",this.refreshStatus()}),this.statusBarItem=n.window.createStatusBarItem("csdevkit.projects",n.StatusBarAlignment.Left,12),this.statusBarItem.name=l.messageStrings.projectsStatusName,this.environmentVersion=0,this.completedVersion=0,this.solutionCount=0,this.projectsCount=0,this.failedProjectsCount=0,this.environmentErrors=void 0,this.setStatusBarItem(l.messageStrings.noSolutionLoadedStatus,l.messageStrings.noSolutionStateToolTip,new n.ThemeColor("statusBarItem.errorBackground"),c.default.openSolution),n.window.onDidChangeActiveTextEditor(e=>{e&&"file"!==e.document?.uri?.scheme||(this.activeDocument=e?.document?.fileName,this.refreshActiveProjects())}),"file"===n.window.activeTextEditor?.document?.uri?.scheme&&(this.activeDocument=n.window.activeTextEditor?.document?.fileName),this.activeDocumentVersion=0}async dispose(){try{this.subscription?.dispose(),this.statusBarItem.dispose(),this.activeProjectsSubscription?.dispose(),this.projectLoadingDiagnostics?.dispose()}catch(e){}}show(){this.noProjectStatusService||this.statusBarItem.show()}async init(e){try{this.brokerService=e,this.statusService=await e.getProxy(s.default.projectInitializationStatusService),this.noProjectStatusService=!1,this.statusService?(this.subscription=await this.statusService.subscribeInitializationCompletion(this.statusObserver),this.statusBarItem.show()):(this.noProjectStatusService=!0,this.statusBarItem.hide())}catch(e){a.logger.log(`Failed to listen to project initialization status: ${e?.toString()}`),this.noProjectStatusService=!0,this.statusBarItem.hide()}}onEnvironmentUpdate(e,t,r){this.environmentVersion=e,this.solutionCount=t,this.environmentErrors=r,this.refreshStatus()}onActiveProjectsSubscriptionUpdate(e){if(!e)return;const t=e.Items?.filter(e=>e.Name).map(e=>({fullPath:e.Id.ProjectPath,name:e.Name}));this.activeProjectsVersion=this.activeDocumentVersion,this.activeProjects=t,this.refreshStatus()}onCompleted(e){this.completedVersion=e.environmentStateVersion,this.projectsCount=e.projectsLoadedCount??0,this.failedProjectsCount=e.projectsFailedCount??0,this.activeProjectsSubscription||this.refreshActiveProjects(),this.refreshStatus()}publishDignosticData(e){this.projectLoadingDiagnostics&&this.projectLoadingDiagnostics.clear(),n.workspace.getConfiguration("dotnet").get("enablePublishIssuesToProblems")&&e.failedProjects&&e.failedProjects.length>0&&(this.projectLoadingDiagnostics??=n.languages.createDiagnosticCollection("Projects"),e.failedProjects.forEach(e=>{if(e.errorState===o.ProjectErrorState.notSupported){const t=new n.Diagnostic(new n.Range(0,0,0,0),l.errorStrings.unsupportedProject,n.DiagnosticSeverity.Warning);t.source="Project",this.projectLoadingDiagnostics.set(n.Uri.file(e.path),[t])}}))}refreshActiveProjects(){if(!this.brokerService)return;this.activeProjectsSubscription?.dispose(),this.activeProjectsSubscription=void 0;const e=++this.activeDocumentVersion;try{this.activeDocument&&this.solutionCount>0?this.activeProjectsSubscription=new h(this.brokerService,this.activeDocument):e===this.activeDocumentVersion&&(this.activeProjectsVersion=e,this.activeProjects=void 0,this.refreshStatus())}catch(e){a.logger.log("Failed to handle active text editor:"+e)}}setStatusBarItem(e,t,r,n){this.statusBarItem.text=e,this.statusBarItem.tooltip=t,this.statusBarItem.backgroundColor=r,this.statusBarItem.command=n}getRevealProjectCommand(){const e=a.environmentStateManager?.getLatestEnvironmentState();if(!e?.projects||0===e.projects.length)return;let t;if(!t&&this.activeProjects&&this.activeProjects.length>0&&(t=this.activeProjects[0].fullPath),this.activeDocument){const r=this.findProjectByPath(e.projects,this.activeDocument);r?.projectId?.fullPath&&(t=r.projectId.fullPath)}return t||(t=e.projects[0]?.projectId?.fullPath),t?{command:"revealInExplorer",title:"Reveal Project",arguments:[n.Uri.file(t)]}:void 0}findProjectByPath(e,t){if(!e)return;const r=n.Uri.file(t).fsPath;return e.find(e=>e?.projectId?.fullPath&&n.Uri.file(e.projectId.fullPath).fsPath===r)}refreshStatus(){if(this.projectStatusServiceFailed)this.setStatusBarItem(l.messageStrings.projectsLoadingStatus("$(error)"),this.projectStatusServiceFailed,new n.ThemeColor("statusBarItem.errorBackground"),c.default.openDevKitOutputWindow);else if(this.environmentVersion>this.completedVersion)this.setStatusBarItem(l.messageStrings.projectsLoadingStatus("$(loading~spin)"),l.messageStrings.projectsLoadingInProgress,void 0,void 0),this.statusService&&this.statusBarItem.show();else if(0===this.solutionCount)this.setStatusBarItem(l.messageStrings.noSolutionLoadedStatus,l.messageStrings.noSolutionStateToolTip,new n.ThemeColor("statusBarItem.errorBackground"),c.default.openSolution);else if(this.environmentErrors&&this.environmentErrors.length>0)this.setStatusBarItem(l.messageStrings.projectsLoadingStatus("$(error) 0"),l.messageStrings.solutionFileInvalid+this.environmentErrors.map(e=>e.message).join("\n"),new n.ThemeColor("statusBarItem.errorBackground"),void 0);else if(this.failedProjectsCount>0)this.setStatusBarItem(l.messageStrings.projectsLoadingStatus(`$(error) ${this.failedProjectsCount}`),l.messageStrings.projectsFailedToLoadToolTip(this.failedProjectsCount),new n.ThemeColor("statusBarItem.errorBackground"),c.default.openProjectsLogsView);else{const e=this.activeDocument&&this.activeDocument.toLowerCase().endsWith(".cs"),t=e?new n.ThemeColor("statusBarItem.warningBackground"):void 0;if(this.projectsCount>0){const e=this.getRevealProjectCommand();if(this.activeDocument)if(this.activeProjectsVersion&&this.activeProjectsVersion===this.activeDocumentVersion)if(this.activeProjects&&0!==this.activeProjects.length)1===this.activeProjects.length?this.setStatusBarItem(l.messageStrings.projectsLoadingStatus(`${this.activeProjects[0].name}`),l.messageStrings.fileInsideProjectToolTip(`${this.activeProjects[0].name}`),void 0,e):this.setStatusBarItem(l.messageStrings.projectsLoadingStatus(`${this.activeProjects.length}`),l.messageStrings.fileInsideMultipleProjectsToolTip+this.activeProjects.map(e=>e.name).join("\n"),void 0,e);else{const r=this.activeDocument?.toLowerCase(),n=a.environmentStateManager?.getOpenedSolutionExt(),o=n&&r?.endsWith(n),i=r?.endsWith(".csproj")||r?.endsWith(".shproj");if(o||i){const n=a.environmentStateManager?.getLatestEnvironmentState();let s=!1;if(o){const n=a.environmentStateManager?.getOpenedSolution();n&&n.toLowerCase()===r?this.setStatusBarItem(l.messageStrings.projectsLoadingStatus(`${this.projectsCount}`),l.messageStrings.projectsReadyState(`${this.projectsCount}`),t,e):s=!0}else if(i){const r=this.findProjectByPath(n?.projects,this.activeDocument),o=r?r.projectId?.fullPath:void 0;o?this.setStatusBarItem(l.messageStrings.projectsLoadingStatus(`${u.parse(o).name}`),l.messageStrings.projectFileTooltip,t,e):s=!0}s&&this.setStatusBarItem(l.messageStrings.projectsLoadingStatus(`$(warning) ${this.projectsCount}`),l.messageStrings.fileOutsideOfProjectsToolTip,t,e)}else this.setStatusBarItem(l.messageStrings.projectsLoadingStatus(`$(warning) ${this.projectsCount}`),l.messageStrings.fileOutsideOfProjectsToolTip,t,e)}else this.setStatusBarItem(l.messageStrings.projectsLoadingStatus("$(loading~spin)"),l.messageStrings.retrievingInformationForCurrentDocumentInProgress,void 0,e);else this.setStatusBarItem(l.messageStrings.projectsLoadingStatus(`${this.projectsCount}`),l.messageStrings.projectsReadyState(`${this.projectsCount}`),void 0,e)}else if(this.solutionCount>0){const r=e?l.messageStrings.noProjectStateCodeFileToolTip:l.messageStrings.noProjectStateToolTip;this.setStatusBarItem(l.messageStrings.projectsLoadingStatus("0"),r,t,void 0)}}}};class h{activeProjectSubscription;brokerService;isDisposed=!1;constructor(e,t){this.brokerService=e,this.subscribeActiveProjectsAsync(t).catch(e=>a.logger.log("Failed to subscribe to active projects: "+e))}onNext(e){this.isDisposed||a.projectInitializationStatus?.onActiveProjectsSubscriptionUpdate(e)}onCompleted(){}onError(e){}dispose(){this.isDisposed||(this.isDisposed=!0,this.activeProjectSubscription?.dispose())}async subscribeActiveProjectsAsync(e){if(!this.brokerService)return;const t={context:"Projects",query:{$properties:["Id","Name","Files"],Files:{$properties:["Id","Path"],$filter:{FilesByPath:[[e]]}},$where:{any:{".":"Files"}}}};this.activeProjectSubscription=await a.projectQueryableSpace.subscribeQuery(t,this),this.isDisposed&&this.activeProjectSubscription?.dispose()}}},1038(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SolutionExplorerProvider=t.contextValues=t.nodeTypes=void 0;const n=r(4084),o=r(1398),i=r(1398),s=r(4628),a=r(680),c=r(4724),l=r(5059),u=r(8955),d=r(9409),p=r(5033),h=r(5059),f=r(2346),g=r(9073),m=r(873),v=r(6928);t.nodeTypes={solution:"Solution",solutionFolder:"Solution Folder",file:"File",project:"Project",virtual:"Virtual",folder:"Folder",error:"Error",packageDependency:"PackageDependency"},t.contextValues={solution:"Solution",solutionFolder:"SolutionFolder",project:"Project",folder:"Folder",linkedFile:"LinkedFile",packageDependency:"PackageDependency"},t.SolutionExplorerProvider=class{context;brokeredServiceHost;environmentStateManager;solutionViewService;solutionRoot;_onDidChangeTreeData=new o.EventEmitter;_expandingItems=new Set;_expandedItems=new Map;_expandedProjects=new Set;_projectIcons=new Map;_projects=new Map;decorationProvider;decorationProviderRegistration;refreshCallBack;solutionViewServiceReady;get serviceBroker(){return this.brokeredServiceHost.serviceBroker}imageCatalogPath;projectTreeProvider=(0,d.lazyPromiseLambda)(async()=>{const e=await this.serviceBroker.getProxy(c.default.projectTreeProvider);return e&&(e.on("collectionReset",e=>this.refresh(Array.isArray(e)?e[0].Id:e.Id)),this.decorationProvider.init(e).catch(e=>a.logger.log(e))),e});projectIconProvider=(0,d.lazyPromiseLambda)(async()=>{const e=await this.serviceBroker.getProxy(c.default.projectIconSourceService);if(e){const t=new n.Observer(e=>{if(e&&e.projectIcons)for(let t=0;t<e.projectIcons.length;t++){const r=e.projectIcons[t];if(r?.projectId?.fullPath){this._projectIcons.set(r.projectId.fullPath,r);const e=(0,f.getImageCatalog)();if(e){const t=this._projects.get(r.projectId.fullPath);if(t&&(t.node.IconGuid!==r.iconGuid||t.node.IconId!==r.iconId)){t.node.IconGuid=r.iconGuid,t.node.IconId=r.iconId;const n=this.getIconForNode(e,t.node);n&&(t.iconPath=n,this.abandonPendingTasks(t),this._onDidChangeTreeData.fire(t))}}}}},e=>{e&&(a.logger.log("Failed to retrieve project icons.",p.LogImportance.low),a.logger.log(e,p.LogImportance.low))});e.subscribe(t)}return e});projectTypeInfos=(0,d.lazyPromiseLambda)(async()=>{const e=new Map;try{const t=await this.serviceBroker.getProxy(c.default.componentExportsService);if(t){const r=t.getExports("projectSystems");if(r)for(let t=0;t<r?.length;t++){let n;try{n=await(0,d.readJsonFile)(v.join(r[t],"package.json"))}catch{continue}const o=n,i=o.provides?.projectSystems;if(i)for(let t=0;t<i.length;t++){const r=i[t];for(let t=0;t<r.extensions.length;t++)e.set(r.extensions[t],r)}}}return e}catch(e){a.logger.log(`Error reading image catalog: ${e}`)}});getIconForNode(e,r){if(r.NodeType===t.nodeTypes.file&&!r.IsMissing)return i.ThemeIcon.File;if(r.NodeType===t.nodeTypes.folder||r.NodeType===t.nodeTypes.solutionFolder)return i.ThemeIcon.Folder;const n=e.getIcon(r.IconGuid,r.IconId);return n?{light:o.Uri.file(n.light),dark:o.Uri.file(n.dark)}:null}constructor(e,t,r){this.context=e,this.brokeredServiceHost=t,this.environmentStateManager=r,this.solutionViewService=(0,d.lazyPromiseLambda)(()=>this.refreshSolutionViewServiceProxy(null)),this.decorationProvider=new w(this),this.decorationProviderRegistration=o.window.registerFileDecorationProvider(this.decorationProvider)}dispose(){this.decorationProvider.dispose(),this.decorationProviderRegistration.dispose()}onDidChangeTreeData=this._onDidChangeTreeData.event;prepareOpenSolution(){this.projectTreeProvider.catch(e=>{})}async expandToActiveItemAsync(e,t,r){let n=this.solutionRoot;const i=this.environmentStateManager?.getOpenedSolutionExt();if(i&&v.extname(e)===i)await a.solutionExplorerTreeView.reveal(n,{select:!0});else if(await c(t,!0))if(n?.node.Path?.toLocaleUpperCase()===e.toLocaleUpperCase())await l(!0);else{const t=await(0,g.getFileVisualPathViaQueryAsync)(n?.node.ProjectGuid,e),r=t?.split("/");if(r&&r.length>1&&!await c(r.slice(0,-1),!1))return;await l(!0)}function s(e,t,r){return t.expandedChildren?.find(t=>r?t.node.ProjectGuid===e:t.label===e)}async function c(e,t){for(const o of e){if(!n||r?.isCancellationRequested)return!1;if(n=s(o,n,t),await l(!1),r?.isCancellationRequested)return!1}return!0}async function l(t){if(n&&!r?.isCancellationRequested)if(t){const t=n?.expandedChildren.find(t=>t.label===v.basename(e));await a.solutionExplorerTreeView.reveal(t,{select:!0})}else n.collapsibleState===o.TreeItemCollapsibleState.Collapsed&&(await a.solutionExplorerTreeView.reveal(n,{expand:!0}),n.collapsibleState=o.TreeItemCollapsibleState.Expanded)}}async autoExpandSolutionExplorerAsync(){if(a.solutionExplorerTreeView.visible){let e=this.solutionRoot;await a.solutionExplorerTreeView.reveal(e,{select:!0,focus:!0})}}async expandToAddedFile(e,r){if(e.id)if(e.node.NodeType===t.nodeTypes.solutionFolder){let t=0;const n=this.solutionRoot;for(;t<40;){if(n!==this.solutionRoot&&this.solutionRoot.expandedChildren.length>0){if(e=o(e,this)){const t=(await this.getChildren(e)).find(e=>e.label===r);a.solutionExplorerTreeView.reveal(t,{select:!0})}return}await new Promise(e=>setTimeout(e,50)),t++}}else{a.solutionExplorerTreeView.reveal(e,{select:!1,expand:1});let t=0;for(;t<40;){const o=n(e,r);if(o)return void a.solutionExplorerTreeView.reveal(o,{select:!0});await new Promise(e=>setTimeout(e,50)),t++}}function n(e,t){return e.expandedChildren.find(e=>e.label===t)}function o(e,t){return e.parentNode?n(o(e.parentNode,t),e.label):t.solutionRoot}}refresh(e){if(e){let t=this._expandedItems.get(e);void 0!==t&&(this.abandonPendingTasks(t),this._onDidChangeTreeData.fire(t))}else this.abandonPendingTasks(void 0),this._onDidChangeTreeData.fire(void 0)}abandonPendingTasks(e){if(0!==this._expandingItems.size)if(e){const t=[];this._expandingItems.forEach(r=>{let n=r.parent;for(;n;){if(n===e)return t.push(r),void r.abandon();n=n.parentNode}}),t.length>0&&t.forEach(e=>this._expandingItems.delete(e))}else this._expandingItems.forEach(e=>e.abandon()),this._expandingItems.clear()}getTreeItem(e){return e}getParent(e){return e.parentNode}async getChildren(e){void 0===e||e.node.NodeType===t.nodeTypes.solution?(this._expandedItems.clear(),this._projects.clear()):(this._expandedItems.set(e.id,e),this.clearOldExpandedItems(e));const r=this.getChildrenImpl(e),n=new y(e);this._expandingItems.add(n);try{const e=new Promise(async(e,t)=>{n.promiseResolve=e;try{const t=await r;n.isFinished||(n.isFinished=!0,e(t))}catch(e){n.isFinished||(n.isFinished=!0,t(e))}}),t=await e;return t?(this._expandingItems.delete(n),t):[]}catch(e){throw this._expandingItems.delete(n),e}}async getChildrenImpl(e){const r=this.environmentStateManager.getOpenedSolution();if(!r)return this.solutionViewServiceReady||this.refreshCallBack||(this.refreshCallBack=()=>{this.environmentStateManager.getOpenedSolution()&&this.refresh(void 0)},this.environmentStateManager.on("environmentStateChanged",this.refreshCallBack)),[];const n=await this.solutionViewService,o=await this.projectTypeInfos;await this.projectIconProvider;let i=[],s=e?.sourceTreeProvider??null;if(n)if(void 0===e){let e=await n.getSolutionCaption();if(e){const n=this.environmentStateManager?.isSolutionGeneratedOutsideWorkspace()?this.environmentStateManager.getActiveWorkspaceRoot()?.toString():r;i=[{NodeType:t.nodeTypes.solution,Name:e,Path:n,Id:"<solution>",IsExpandable:!0,IsExpanded:!0,IconGuid:"ae27a6b0-e345-4288-96df-5eaf394ee369",IconId:2855,ProjectGuid:""}]}}else if(e.node.NodeType===t.nodeTypes.solution)i=await a.logger.watch("Expand solution",async()=>await n.getRootNodes(),{importance:p.LogImportance.low});else if(e.node.NodeType===t.nodeTypes.project&&e.node.ProjectGuid){let t;if(e.isSupportedProject){this._expandedProjects.has(e.node.ProjectGuid)||(this._expandedProjects.add(e.node.ProjectGuid),t=new u.TelemetryActivity("project-expanded",a.telemetryService));try{await a.logger.watch("Expand project",async()=>{if(s=await this.projectTreeProvider,s){var r=await s.getChildren(e.node);r.error&&r.error.message&&(i=this.createErrorNodes(r.error.message)),r.items&&(i=r.items)}else t=void 0},{telemetry:t,importance:p.LogImportance.low})}finally{t&&(t.end(),t.sendTelemetry())}(0,a.sendFirstInteractionWithExplorerTelemetry)()}}else s?(i=await a.logger.watch("Expand project node",async()=>{const t=await(s?.getChildren(e.node));return t?.items??[]},{importance:p.LogImportance.low}),(0,a.sendFirstInteractionWithExplorerTelemetry)()):(i=await a.logger.watch("Expand solution folder",async()=>await n.getChildrenNodes(e.node),{importance:p.LogImportance.low}),(0,a.sendFirstInteractionWithExplorerTelemetry)());const c=await(0,f.getOrCreateImageCatalog)(this.context);var l=i.map(t=>this.createSolutionExplorerItem(t,s,e,c,o));return e?e.expandedChildren=l:this.solutionRoot=l[0],l}createErrorNodes(e){return[{NodeType:t.nodeTypes.error,Name:e,IsExpandable:!1,IsExpanded:!0,IconGuid:"ae27a6b0-e345-4288-96df-5eaf394ee369",IconId:2935,ProjectGuid:""}]}createSolutionExplorerItem(e,r,n,o,i){let s,a=!1;if(i&&e.NodeType===t.nodeTypes.project&&e.Path){const t=this._projectIcons.get(e.Path);t&&(e.IconGuid=t.iconGuid,e.IconId=t.iconId),s=!1,a=!0;const r=v.extname(e.Path);if(r){const t=i.get(r.toLocaleLowerCase());if(t){if(e.IconId<0){const r=t?.icon;r?(e.IconGuid=r.catalog,e.IconId=r.id):(e.IconGuid="{ae27a6b0-e345-4288-96df-5eaf394ee369}",e.IconId=165)}t.treeProvider&&(s=!0)}}}if(e.NodeType===t.nodeTypes.solution){const t=this.environmentStateManager.getLatestEnvironmentState()?.errors;t&&t.length>0&&(e.Description=h.messageStrings.solutionExplorerNodeInvalid)}if(a)if(s){const t=this.decorationProvider.getProjectExtraState(e.Path);t&&(e.IsMissing??=t.IsMissing,e.Description??=t.Description)}else e.IsExpandable=!1,e.Description=h.messageStrings.projectNotSupported;e.IsMissing&&(e.Description=h.messageStrings.solutionExplorerItemMissing);const c=this.getIconForNode(o,e),l=new S(e,r,s,n,c,this.environmentStateManager.getOpenedSolution());return i&&e.NodeType===t.nodeTypes.project&&e.Path&&this._projects.set(e.Path,l),l}clearOldExpandedItems(e){for(let r=0;r<e.expandedChildren.length;r++){let n=e.expandedChildren[r];this._expandedItems.delete(n.id),n.node.NodeType===t.nodeTypes.project&&n.node.Path&&this._projects.delete(n.node.Path),this.clearOldExpandedItems(n)}e.expandedChildren=[]}async refreshSolutionViewServiceProxy(e,t){if(e)try{const t=await e;t?.dispose()}catch{}const r=await this.serviceBroker.getProxy(c.default.solutionExplorerService);return r&&(this.solutionViewServiceReady=!0,this.refreshCallBack&&(this.environmentStateManager.off("environmentStateChanged",this.refreshCallBack),this.refreshCallBack=void 0),r.on("workspaceRootChanged",e=>this.refresh(void 0)),this.projectTreeProvider.catch(e=>{})),e&&this.refresh(void 0),r}};class y{parent;isFinished;promiseResolve;constructor(e){this.parent=e}abandon(){this.isFinished||(a.logger.log(`abandon pending getChildren from ${this.parent?.id??"root"}`),this.isFinished=!0,this.promiseResolve&&this.promiseResolve(void 0))}}class S extends o.TreeItem{node;sourceTreeProvider;isSupportedProject;expandedChildren=[];path;parentNode;constructor(e,r,n,i,a,c){super(e.DisplayName??e.Name,e.IsExpandable?e.IsExpanded?o.TreeItemCollapsibleState.Expanded:o.TreeItemCollapsibleState.Collapsed:o.TreeItemCollapsibleState.None),this.node=e,this.sourceTreeProvider=r,this.isSupportedProject=n,this.parentNode=i,e.Path&&(e.NodeType===t.nodeTypes.solutionFolder&&c?this.resourceUri=o.Uri.file(v.join(v.dirname(c),e.Path)):this.resourceUri=o.Uri.file(e.Path)),a&&(this.iconPath=a),e.Description&&(this.description=e.Description),function(e){return!!e.Path&&e.Path.length>0&&(e.NodeType===t.nodeTypes.file||e.NodeType===t.nodeTypes.project||e.NodeType===t.nodeTypes.solution)&&!e.IsMissing}(e)&&(this.command={command:"vscode.open",arguments:[this.resourceUri],title:l.openDocument}),this.id=e.Id,this.contextValue=e.NodeType,e.NodeType===t.nodeTypes.solutionFolder&&e.Path?(this.path=`${e.Path.replace("/",v.sep)}`,this.contextValue=t.contextValues.solutionFolder):e.NodeType!==t.nodeTypes.project||n||(this.contextValue=void 0),e.NodeType===t.nodeTypes.file&&e.Flags?.includes(m.TreeFlags.linkedItem)&&(this.contextValue=t.contextValues.linkedFile),e.NodeType===t.nodeTypes.virtual&&(this.tooltip=e.Name),e.NodeType===t.nodeTypes.error&&(this.command={command:s.default.openProjectsLogsView,title:l.promptStrings.openProjectLog})}}class w extends n.Observer{solutionExplorerProvider;_onDidChangeFileDecorations=new o.EventEmitter;projectFileStates=new Map;subscription;constructor(e){super(e=>{if(e.items){for(let t=0;t<e.items.length;t++){const r=e.items[t],n=r.Path;n&&(r.Description?(this.projectFileStates.set(n,r),this._onDidChangeFileDecorations.fire(o.Uri.file(n))):this.projectFileStates.delete(n)&&this._onDidChangeFileDecorations.fire(o.Uri.file(n)))}this.solutionExplorerProvider.refresh()}},e=>{e&&(a.logger.log("Failed to monitor project state.",p.LogImportance.low),a.logger.log(e,p.LogImportance.low))}),this.solutionExplorerProvider=e}async init(e){this.subscription=await e.subscribeTreeAttachedNodesState(this)}dispose(){this.subscription?.dispose()}getProjectExtraState(e){return this.projectFileStates.get(e)}onDidChangeFileDecorations=this._onDidChangeFileDecorations.event;provideFileDecoration(e,t){const r=this.projectFileStates.get(e.fsPath);if(r&&r.Description){const e=new o.FileDecoration(void 0,r.Description,new o.ThemeColor("list.errorForeground"));return e.propagate=!0,e}}}},9073(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findSolutionTreeNodeViaPath=t.autoExpandSolutionExplorerAsync=t.getFileVisualPathViaQueryAsync=t.showSolutionExplorer=void 0;const n=r(1398),o=r(5033),i=r(680),s=r(5059),a=r(5125);t.showSolutionExplorer=function(e){process.nextTick(()=>{(async function(e){let t,r=n.workspace.getConfiguration("dotnet").get("defaultSolution",void 0);if(i.logger.log(`Default solution: ${r??"not set"}`,o.LogImportance.normal),r)t=!0;else{const e=await n.workspace.findFiles("**/*.{csproj}","**/node_modules/**",1);t=e&&e.length>0}t?"true"!==process.env.DisableOpenDefaultSolution?await(0,a.hybridOpenSolutionInWorkspace)(e,r).catch(e=>i.logger.log("Failed to open solution "+e)):i.logger.log("Loading solution file is disabled."):i.logger.log("No C# project is found in the workspace."),await n.commands.executeCommand("setContext","solutionExplorerVisible",t),i.projectInitializationStatus?.show()})(e).catch(e=>i.logger.log("Failed to load solution explorer"+e))})},t.getFileVisualPathViaQueryAsync=async function(e,t){const r={context:"Projects",query:{$properties:["Id","Files"],Files:{$properties:["Id","VisualPath"],$filter:{FilesByPath:[[t]]}},$filter:{ProjectsByProjectGuid:[[e]]}}},n=await i.projectQueryableSpace.executeQuery(r);if(!n)return;let o=n.Items?.[0];const s=o.Files?.[0]?.VisualPath;return s},t.autoExpandSolutionExplorerAsync=async function(){i.solutionExplorerProvider&&await i.solutionExplorerProvider.autoExpandSolutionExplorerAsync()},t.findSolutionTreeNodeViaPath=async function e(t,r){if(t.node.Path){if((0,s.equalsInvariantIgnoreCase)(t.node.Path,r))return t;for(const n of t.expandedChildren){const t=await e(n,r);if(t)return t}}}},873(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeFlags=void 0,t.TreeFlags={linkedItem:"LinkedItem"}},9526(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.loadMessageBundle=t.localize=t.format=t.setPseudo=t.isPseudo=t.isDefined=t.BundleFormat=t.MessageFormat=void 0;var n,o,i,s=r(7124);function a(e){return void 0!==e}function c(e,r){return t.isPseudo&&(e="["+e.replace(/[aouei]/g,"$&$&")+"]"),0===r.length?e:e.replace(/\{(\d+)\}/g,function(e,t){var n=t[0],o=r[n],i=e;return"string"==typeof o?i=o:"number"!=typeof o&&"boolean"!=typeof o&&null!=o||(i=String(o)),i})}(i=t.MessageFormat||(t.MessageFormat={})).file="file",i.bundle="bundle",i.both="both",(o=t.BundleFormat||(t.BundleFormat={})).standalone="standalone",o.languagePack="languagePack",function(e){e.is=function(e){var t=e;return t&&a(t.key)&&a(t.comment)}}(n||(n={})),t.isDefined=a,t.isPseudo=!1,t.setPseudo=function(e){t.isPseudo=e},t.format=c,t.localize=function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return c(t,r)},t.loadMessageBundle=function(e){return(0,s.default)().loadMessageBundle(e)},t.config=function(e){return(0,s.default)().config(e)}},7124(e,t){"use strict";var r;function n(){if(void 0===r)throw new Error("No runtime abstraction layer installed");return r}Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.install=function(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");r=e}}(n||(n={})),t.default=n},2477(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=t.loadMessageBundle=t.BundleFormat=t.MessageFormat=void 0;var n=r(6928),o=r(9896),i=r(7124),s=r(9526),a=r(9526);Object.defineProperty(t,"MessageFormat",{enumerable:!0,get:function(){return a.MessageFormat}}),Object.defineProperty(t,"BundleFormat",{enumerable:!0,get:function(){return a.BundleFormat}});var c,l,u=Object.prototype.toString;function d(e){return"[object String]"===u.call(e)}function p(e){return JSON.parse(o.readFileSync(e,"utf8"))}function h(e){return function(t,r){for(var n,o=[],i=2;i<arguments.length;i++)o[i-2]=arguments[i];return n=t,"[object Number]"===u.call(n)?t>=e.length?void console.error("Broken localize call found. Index out of bounds. Stacktrace is\n: ".concat(new Error("").stack)):(0,s.format)(e[t],o):d(r)?(console.warn("Message ".concat(r," didn't get externalized correctly.")),(0,s.format)(r,o)):void console.error("Broken localize call found. Stacktrace is\n: ".concat(new Error("").stack))}}function f(e,t){return c[e]=t,t}function g(e){try{return function(e){var t=p(n.join(e,"nls.metadata.json")),r=Object.create(null);for(var o in t){var i=t[o];r[o]=i.messages}return r}(e)}catch(e){return void console.log("Generating default bundle from meta data failed.",e)}}function m(e,t){var r;if(!0===l.languagePackSupport&&void 0!==l.cacheRoot&&void 0!==l.languagePackId&&void 0!==l.translationsConfigFile&&void 0!==l.translationsConfig)try{r=function(e,t){var r,i,s,a=n.join(l.cacheRoot,"".concat(e.id,"-").concat(e.hash,".json")),c=!1,u=!1;try{return r=JSON.parse(o.readFileSync(a,{encoding:"utf8",flag:"r"})),i=a,s=new Date,o.utimes(i,s,s,function(){}),r}catch(e){if("ENOENT"===e.code)u=!0;else{if(!(e instanceof SyntaxError))throw e;console.log("Syntax error parsing message bundle: ".concat(e.message,".")),o.unlink(a,function(e){e&&console.error("Deleting corrupted bundle ".concat(a," failed."))}),c=!0}}if(r=function(e,t){var r=l.translationsConfig[e.id];if(r){var o=p(r).contents,i=p(n.join(t,"nls.metadata.json")),s=Object.create(null);for(var a in i){var c=i[a],u=o["".concat(e.outDir,"/").concat(a)];if(u){for(var h=[],f=0;f<c.keys.length;f++){var g=c.keys[f],m=u[d(g)?g:g.key];void 0===m&&(m=c.messages[f]),h.push(m)}s[a]=h}else s[a]=c.messages}return s}}(e,t),!r||c)return r;if(u)try{o.writeFileSync(a,JSON.stringify(r),{encoding:"utf8",flag:"wx"})}catch(e){if("EEXIST"===e.code)return r;throw e}return r}(e,t)}catch(e){console.log("Load or create bundle failed ",e)}if(!r){if(l.languagePackSupport)return g(t);var i=function(e){for(var t=l.language;t;){var r=n.join(e,"nls.bundle.".concat(t,".json"));if(o.existsSync(r))return r;var i=t.lastIndexOf("-");t=i>0?t.substring(0,i):void 0}if(void 0===t&&(r=n.join(e,"nls.bundle.json"),o.existsSync(r)))return r}(t);if(i)try{return p(i)}catch(e){console.log("Loading in the box message bundle failed.",e)}r=g(t)}return r}function v(e){if(!e)return s.localize;var t=n.extname(e);if(t&&(e=e.substr(0,e.length-t.length)),l.messageFormat===s.MessageFormat.both||l.messageFormat===s.MessageFormat.bundle){var r=function(e){for(var t,r=n.dirname(e);t=n.join(r,"nls.metadata.header.json"),!o.existsSync(t);){var i=n.dirname(r);if(i===r){t=void 0;break}r=i}return t}(e);if(r){var i=n.dirname(r),a=c[i];if(void 0===a)try{var u=JSON.parse(o.readFileSync(r,"utf8"));try{var d=m(u,i);a=f(i,d?{header:u,nlsBundle:d}:null)}catch(e){console.error("Failed to load nls bundle",e),a=f(i,null)}}catch(e){console.error("Failed to read header file",e),a=f(i,null)}if(a){var g=e.substr(i.length+1).replace(/\\/g,"/"),v=a.nlsBundle[g];return void 0===v?(console.error("Messages for file ".concat(e," not found. See console for details.")),function(){return"Messages not found."}):h(v)}}}if(l.messageFormat===s.MessageFormat.both||l.messageFormat===s.MessageFormat.file)try{var y=p(function(e){var t;if(l.cacheLanguageResolution&&t);else{if(s.isPseudo||!l.language)t=".nls.json";else for(var r=l.language;r;){var n=".nls."+r+".json";if(o.existsSync(e+n)){t=n;break}var i=r.lastIndexOf("-");i>0?r=r.substring(0,i):(t=".nls.json",r=null)}l.cacheLanguageResolution}return e+t}(e));return Array.isArray(y)?h(y):(0,s.isDefined)(y.messages)&&(0,s.isDefined)(y.keys)?h(y.messages):(console.error("String bundle '".concat(e,"' uses an unsupported format.")),function(){return"File bundle has unsupported format. See console for details"})}catch(e){"ENOENT"!==e.code&&console.error("Failed to load single file bundle",e)}return console.error("Failed to load message bundle for file ".concat(e)),function(){return"Failed to load message bundle. See console for details."}}function y(e){return e&&(d(e.locale)&&(l.locale=e.locale.toLowerCase(),l.language=l.locale,c=Object.create(null)),void 0!==e.messageFormat&&(l.messageFormat=e.messageFormat),e.bundleFormat===s.BundleFormat.standalone&&!0===l.languagePackSupport&&(l.languagePackSupport=!1)),(0,s.setPseudo)("pseudo"===l.locale),v}!function(){if(l={locale:void 0,language:void 0,languagePackSupport:!1,cacheLanguageResolution:!0,messageFormat:s.MessageFormat.bundle},d(process.env.VSCODE_NLS_CONFIG))try{var e=JSON.parse(process.env.VSCODE_NLS_CONFIG),t=void 0;if(e.availableLanguages){var r=e.availableLanguages["*"];d(r)&&(t=r)}if(d(e.locale)&&(l.locale=e.locale.toLowerCase()),void 0===t?l.language=l.locale:"en"!==t&&(l.language=t),function(e){return!0===e||!1===e}(e._languagePackSupport)&&(l.languagePackSupport=e._languagePackSupport),d(e._cacheRoot)&&(l.cacheRoot=e._cacheRoot),d(e._languagePackId)&&(l.languagePackId=e._languagePackId),d(e._translationsConfigFile)){l.translationsConfigFile=e._translationsConfigFile;try{l.translationsConfig=p(l.translationsConfigFile)}catch(t){if(e._corruptedFile){var i=n.dirname(e._corruptedFile);o.exists(i,function(t){t&&o.writeFile(e._corruptedFile,"corrupted","utf8",function(e){console.error(e)})})}}}}catch(e){}(0,s.setPseudo)("pseudo"===l.locale),c=Object.create(null)}(),t.loadMessageBundle=v,t.config=y,i.default.install(Object.freeze({loadMessageBundle:v,config:y}))},1566(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TargetPopulation=t.getExperimentationServiceAsync=t.getExperimentationService=void 0;var n=r(2493);Object.defineProperty(t,"getExperimentationService",{enumerable:!0,get:function(){return n.getExperimentationService}}),Object.defineProperty(t,"getExperimentationServiceAsync",{enumerable:!0,get:function(){return n.getExperimentationServiceAsync}});var o=r(8967);Object.defineProperty(t,"TargetPopulation",{enumerable:!0,get:function(){return o.TargetPopulation}})},8142(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MementoKeyValueStorage=void 0,t.MementoKeyValueStorage=class{constructor(e){this.mementoGlobalStorage=e}async getValue(e,t){return await this.mementoGlobalStorage.get(e)||t}setValue(e,t){this.mementoGlobalStorage.update(e,t)}}},9052(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=class{constructor(){this.initializePromise=Promise.resolve(),this.initialFetch=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)}}},8967(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TargetPopulation=t.Filters=t.VSCodeFilterProvider=void 0;const n=r(1398);class o{constructor(e,t,r){this.extensionName=e,this.extensionVersion=t,this.targetPopulation=r}static trimVersionSuffix(e){return e.split(/\-[a-zA-Z0-9]+$/)[0]}getFilterValue(e){switch(e){case i.ApplicationVersion:return o.trimVersionSuffix(n.version);case i.Build:return n.env.appName;case i.ClientId:return n.env.machineId;case i.ExtensionName:return this.extensionName;case i.ExtensionVersion:return o.trimVersionSuffix(this.extensionVersion);case i.Language:return n.env.language;case i.TargetPopulation:return this.targetPopulation;default:return""}}getFilters(){let e=new Map,t=Object.values(i);for(let r of t)e.set(r,this.getFilterValue(r));return e}}var i,s;t.VSCodeFilterProvider=o,function(e){e.Market="X-MSEdge-Market",e.CorpNet="X-FD-Corpnet",e.ApplicationVersion="X-VSCode-AppVersion",e.Build="X-VSCode-Build",e.ClientId="X-MSEdge-ClientId",e.ExtensionName="X-VSCode-ExtensionName",e.ExtensionVersion="X-VSCode-ExtensionVersion",e.Language="X-VSCode-Language",e.TargetPopulation="X-VSCode-TargetPopulation"}(i||(t.Filters=i={})),function(e){e.Team="team",e.Internal="internal",e.Insiders="insider",e.Public="public"}(s||(t.TargetPopulation=s={}))},2493(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getExperimentationServiceAsync=t.getExperimentationService=void 0;const n=r(8967),o=r(2909),i=r(1398),s=r(8142),a=r(9052);function c(e,t,r,c,l,...u){if(!l)throw new Error("Memento storage was not provided.");const d=i.workspace.getConfiguration("telemetry");if(!(void 0===i.env.isTelemetryEnabled?d.get("enableTelemetry",!0):i.env.isTelemetryEnabled))return new a.default;const p=[new n.VSCodeFilterProvider(e,t,r),...u],h=new s.MementoKeyValueStorage(l);return new o.ExperimentationService({filterProviders:p,telemetry:c,storageKey:"VSCode.ABExp.FeatureData",keyValueStorage:h,featuresTelemetryPropertyName:"",assignmentContextTelemetryPropertyName:"abexp.assignmentcontext",telemetryEventName:"query-expfeature",endpoint:"https://default.exp-tas.com/vscode/ab",refetchInterval:18e5})}t.getExperimentationService=c,t.getExperimentationServiceAsync=async function(e,t,r,n,o,...i){const s=c(e,t,r,n,o,...i);return await s.initializePromise,s}},259(e){"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},8799(e,t,r){"use strict";function n(e){var t=this;if(t instanceof n||(t=new n),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach(function(e){t.push(e)});else if(arguments.length>0)for(var r=0,o=arguments.length;r<o;r++)t.push(arguments[r]);return t}function o(e,t,r){var n=t===e.head?new a(r,null,t,e):new a(r,t,t.next,e);return null===n.next&&(e.tail=n),null===n.prev&&(e.head=n),e.length++,n}function i(e,t){e.tail=new a(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function s(e,t){e.head=new a(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function a(e,t,r,n){if(!(this instanceof a))return new a(e,t,r,n);this.list=n,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}e.exports=n,n.Node=a,n.create=n,n.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t},n.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},n.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},n.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)i(this,arguments[e]);return this.length},n.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)s(this,arguments[e]);return this.length},n.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},n.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},n.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,n=0;null!==r;n++)e.call(t,r.value,n,this),r=r.next},n.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,n=this.length-1;null!==r;n--)e.call(t,r.value,n,this),r=r.prev},n.prototype.get=function(e){for(var t=0,r=this.head;null!==r&&t<e;t++)r=r.next;if(t===e&&null!==r)return r.value},n.prototype.getReverse=function(e){for(var t=0,r=this.tail;null!==r&&t<e;t++)r=r.prev;if(t===e&&null!==r)return r.value},n.prototype.map=function(e,t){t=t||this;for(var r=new n,o=this.head;null!==o;)r.push(e.call(t,o.value,this)),o=o.next;return r},n.prototype.mapReverse=function(e,t){t=t||this;for(var r=new n,o=this.tail;null!==o;)r.push(e.call(t,o.value,this)),o=o.prev;return r},n.prototype.reduce=function(e,t){var r,n=this.head;if(arguments.length>1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");n=this.head.next,r=this.head.value}for(var o=0;null!==n;o++)r=e(r,n.value,o),n=n.next;return r},n.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");n=this.tail.prev,r=this.tail.value}for(var o=this.length-1;null!==n;o--)r=e(r,n.value,o),n=n.prev;return r},n.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},n.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},n.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var o=0,i=this.head;null!==i&&o<e;o++)i=i.next;for(;null!==i&&o<t;o++,i=i.next)r.push(i.value);return r},n.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var o=this.length,i=this.tail;null!==i&&o>t;o--)i=i.prev;for(;null!==i&&o>e;o--,i=i.prev)r.push(i.value);return r},n.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,i=this.head;null!==i&&n<e;n++)i=i.next;var s=[];for(n=0;i&&n<t;n++)s.push(i.value),i=this.removeNode(i);for(null===i&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev),n=0;n<r.length;n++)i=o(this,i,r[n]);return s},n.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;null!==r;r=r.prev){var n=r.prev;r.prev=r.next,r.next=n}return this.head=t,this.tail=e,this};try{r(259)(n)}catch(e){}},4006(e){function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=4006,e.exports=t},4597(e){"use strict";e.exports=require("applicationinsights-native-metrics")},1398(e){"use strict";e.exports=require("vscode")},2613(e){"use strict";e.exports=require("assert")},290(e){"use strict";e.exports=require("async_hooks")},5317(e){"use strict";e.exports=require("child_process")},4236(e){"use strict";e.exports=require("console")},9140(e){"use strict";e.exports=require("constants")},6982(e){"use strict";e.exports=require("crypto")},2250(e){"use strict";e.exports=require("dns")},3167(e){"use strict";e.exports=require("domain")},4434(e){"use strict";e.exports=require("events")},9896(e){"use strict";e.exports=require("fs")},1943(e){"use strict";e.exports=require("fs/promises")},8611(e){"use strict";e.exports=require("http")},5692(e){"use strict";e.exports=require("https")},3339(e){"use strict";e.exports=require("module")},9278(e){"use strict";e.exports=require("net")},6760(e){"use strict";e.exports=require("node:path")},481(e){"use strict";e.exports=require("node:readline")},857(e){"use strict";e.exports=require("os")},6928(e){"use strict";e.exports=require("path")},2987(e){"use strict";e.exports=require("perf_hooks")},2203(e){"use strict";e.exports=require("stream")},3557(e){"use strict";e.exports=require("timers")},7016(e){"use strict";e.exports=require("url")},9023(e){"use strict";e.exports=require("util")},3106(e){"use strict";e.exports=require("zlib")},4603(e){(()=>{"use strict";var t={d:(e,r)=>{for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},r={};t.r(r),t.d(r,{XMLBuilder:()=>Ae,XMLParser:()=>me,XMLValidator:()=>De});const n=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",o=new RegExp("^["+n+"]["+n+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");function i(e,t){const r=[];let n=t.exec(e);for(;n;){const o=[];o.startIndex=t.lastIndex-n[0].length;const i=n.length;for(let e=0;e<i;e++)o.push(n[e]);r.push(o),n=t.exec(e)}return r}const s=function(e){return!(null==o.exec(e))},a=["hasOwnProperty","toString","valueOf","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__"],c=["__proto__","constructor","prototype"],l={allowBooleanAttributes:!1,unpairedTags:[]};function u(e,t){t=Object.assign({},l,t);const r=[];let n=!1,o=!1;"\ufeff"===e[0]&&(e=e.substr(1));for(let i=0;i<e.length;i++)if("<"===e[i]&&"?"===e[i+1]){if(i+=2,i=p(e,i),i.err)return i}else{if("<"!==e[i]){if(d(e[i]))continue;return w("InvalidChar","char '"+e[i]+"' is not expected.",b(e,i))}{let s=i;if(i++,"!"===e[i]){i=h(e,i);continue}{let a=!1;"/"===e[i]&&(a=!0,i++);let c="";for(;i<e.length&&">"!==e[i]&&" "!==e[i]&&"\t"!==e[i]&&"\n"!==e[i]&&"\r"!==e[i];i++)c+=e[i];if(c=c.trim(),"/"===c[c.length-1]&&(c=c.substring(0,c.length-1),i--),!_(c)){let t;return t=0===c.trim().length?"Invalid space after '<'.":"Tag '"+c+"' is an invalid name.",w("InvalidTag",t,b(e,i))}const l=m(e,i);if(!1===l)return w("InvalidAttr","Attributes for '"+c+"' have open quote.",b(e,i));let u=l.value;if(i=l.index,"/"===u[u.length-1]){const r=i-u.length;u=u.substring(0,u.length-1);const o=y(u,t);if(!0!==o)return w(o.err.code,o.err.msg,b(e,r+o.err.line));n=!0}else if(a){if(!l.tagClosed)return w("InvalidTag","Closing tag '"+c+"' doesn't have proper closing.",b(e,i));if(u.trim().length>0)return w("InvalidTag","Closing tag '"+c+"' can't have attributes or invalid starting.",b(e,s));if(0===r.length)return w("InvalidTag","Closing tag '"+c+"' has not been opened.",b(e,s));{const t=r.pop();if(c!==t.tagName){let r=b(e,t.tagStartPos);return w("InvalidTag","Expected closing tag '"+t.tagName+"' (opened in line "+r.line+", col "+r.col+") instead of closing tag '"+c+"'.",b(e,s))}0==r.length&&(o=!0)}}else{const a=y(u,t);if(!0!==a)return w(a.err.code,a.err.msg,b(e,i-u.length+a.err.line));if(!0===o)return w("InvalidXml","Multiple possible root nodes found.",b(e,i));-1!==t.unpairedTags.indexOf(c)||r.push({tagName:c,tagStartPos:s}),n=!0}for(i++;i<e.length;i++)if("<"===e[i]){if("!"===e[i+1]){i++,i=h(e,i);continue}if("?"!==e[i+1])break;if(i=p(e,++i),i.err)return i}else if("&"===e[i]){const t=S(e,i);if(-1==t)return w("InvalidChar","char '&' is not expected.",b(e,i));i=t}else if(!0===o&&!d(e[i]))return w("InvalidXml","Extra text at the end",b(e,i));"<"===e[i]&&i--}}}return n?1==r.length?w("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",b(e,r[0].tagStartPos)):!(r.length>0)||w("InvalidXml","Invalid '"+JSON.stringify(r.map(e=>e.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):w("InvalidXml","Start tag expected.",1)}function d(e){return" "===e||"\t"===e||"\n"===e||"\r"===e}function p(e,t){const r=t;for(;t<e.length;t++)if("?"==e[t]||" "==e[t]){const n=e.substr(r,t-r);if(t>5&&"xml"===n)return w("InvalidXml","XML declaration allowed only at the start of the document.",b(e,t));if("?"==e[t]&&">"==e[t+1]){t++;break}continue}return t}function h(e,t){if(e.length>t+5&&"-"===e[t+1]&&"-"===e[t+2]){for(t+=3;t<e.length;t++)if("-"===e[t]&&"-"===e[t+1]&&">"===e[t+2]){t+=2;break}}else if(e.length>t+8&&"D"===e[t+1]&&"O"===e[t+2]&&"C"===e[t+3]&&"T"===e[t+4]&&"Y"===e[t+5]&&"P"===e[t+6]&&"E"===e[t+7]){let r=1;for(t+=8;t<e.length;t++)if("<"===e[t])r++;else if(">"===e[t]&&(r--,0===r))break}else if(e.length>t+9&&"["===e[t+1]&&"C"===e[t+2]&&"D"===e[t+3]&&"A"===e[t+4]&&"T"===e[t+5]&&"A"===e[t+6]&&"["===e[t+7])for(t+=8;t<e.length;t++)if("]"===e[t]&&"]"===e[t+1]&&">"===e[t+2]){t+=2;break}return t}const f='"',g="'";function m(e,t){let r="",n="",o=!1;for(;t<e.length;t++){if(e[t]===f||e[t]===g)""===n?n=e[t]:n!==e[t]||(n="");else if(">"===e[t]&&""===n){o=!0;break}r+=e[t]}return""===n&&{value:r,index:t,tagClosed:o}}const v=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function y(e,t){const r=i(e,v),n={};for(let e=0;e<r.length;e++){if(0===r[e][1].length)return w("InvalidAttr","Attribute '"+r[e][2]+"' has no space in starting.",P(r[e]));if(void 0!==r[e][3]&&void 0===r[e][4])return w("InvalidAttr","Attribute '"+r[e][2]+"' is without value.",P(r[e]));if(void 0===r[e][3]&&!t.allowBooleanAttributes)return w("InvalidAttr","boolean attribute '"+r[e][2]+"' is not allowed.",P(r[e]));const o=r[e][2];if(!E(o))return w("InvalidAttr","Attribute '"+o+"' is an invalid name.",P(r[e]));if(Object.prototype.hasOwnProperty.call(n,o))return w("InvalidAttr","Attribute '"+o+"' is repeated.",P(r[e]));n[o]=1}return!0}function S(e,t){if(";"===e[++t])return-1;if("#"===e[t])return function(e,t){let r=/\d/;for("x"===e[t]&&(t++,r=/[\da-fA-F]/);t<e.length;t++){if(";"===e[t])return t;if(!e[t].match(r))break}return-1}(e,++t);let r=0;for(;t<e.length;t++,r++)if(!(e[t].match(/\w/)&&r<20)){if(";"===e[t])break;return-1}return t}function w(e,t,r){return{err:{code:e,msg:t,line:r.line||r,col:r.col}}}function E(e){return s(e)}function _(e){return s(e)}function b(e,t){const r=e.substring(0,t).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function P(e){return e.startIndex+e[1].length}const T=e=>a.includes(e)?"__"+e:e,C={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,r){return e},captureMetaData:!1,maxNestedTags:100,strictReservedNames:!0,jPath:!0,onDangerousProperty:T};function I(e,t){if("string"!=typeof e)return;const r=e.toLowerCase();if(a.some(e=>r===e.toLowerCase()))throw new Error(`[SECURITY] Invalid ${t}: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`);if(c.some(e=>r===e.toLowerCase()))throw new Error(`[SECURITY] Invalid ${t}: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`)}function O(e){return"boolean"==typeof e?{enabled:e,maxEntitySize:1e4,maxExpansionDepth:10,maxTotalExpansions:1e3,maxExpandedLength:1e5,maxEntityCount:100,allowedTags:null,tagFilter:null}:"object"==typeof e&&null!==e?{enabled:!1!==e.enabled,maxEntitySize:Math.max(1,e.maxEntitySize??1e4),maxExpansionDepth:Math.max(1,e.maxExpansionDepth??1e4),maxTotalExpansions:Math.max(1,e.maxTotalExpansions??1/0),maxExpandedLength:Math.max(1,e.maxExpandedLength??1e5),maxEntityCount:Math.max(1,e.maxEntityCount??1e3),allowedTags:e.allowedTags??null,tagFilter:e.tagFilter??null}:O(!0)}const N=function(e){const t=Object.assign({},C,e),r=[{value:t.attributeNamePrefix,name:"attributeNamePrefix"},{value:t.attributesGroupName,name:"attributesGroupName"},{value:t.textNodeName,name:"textNodeName"},{value:t.cdataPropName,name:"cdataPropName"},{value:t.commentPropName,name:"commentPropName"}];for(const{value:e,name:t}of r)e&&I(e,t);return null===t.onDangerousProperty&&(t.onDangerousProperty=T),t.processEntities=O(t.processEntities),t.stopNodes&&Array.isArray(t.stopNodes)&&(t.stopNodes=t.stopNodes.map(e=>"string"==typeof e&&e.startsWith("*.")?".."+e.substring(2):e)),t};let R;R="function"!=typeof Symbol?"@@xmlMetadata":Symbol("XML Node Metadata");class A{constructor(e){this.tagname=e,this.child=[],this[":@"]=Object.create(null)}add(e,t){"__proto__"===e&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e,t){"__proto__"===e.tagname&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child}),void 0!==t&&(this.child[this.child.length-1][R]={startIndex:t})}static getMetaDataSymbol(){return R}}class D{constructor(e){this.suppressValidationErr=!e,this.options=e}readDocType(e,t){const r=Object.create(null);let n=0;if("O"!==e[t+3]||"C"!==e[t+4]||"T"!==e[t+5]||"Y"!==e[t+6]||"P"!==e[t+7]||"E"!==e[t+8])throw new Error("Invalid Tag instead of DOCTYPE");{t+=9;let o=1,i=!1,s=!1,a="";for(;t<e.length;t++)if("<"!==e[t]||s)if(">"===e[t]){if(s?"-"===e[t-1]&&"-"===e[t-2]&&(s=!1,o--):o--,0===o)break}else"["===e[t]?i=!0:a+=e[t];else{if(i&&k(e,"!ENTITY",t)){let o,i;if(t+=7,[o,i,t]=this.readEntityExp(e,t+1,this.suppressValidationErr),-1===i.indexOf("&")){if(!1!==this.options.enabled&&null!=this.options.maxEntityCount&&n>=this.options.maxEntityCount)throw new Error(`Entity count (${n+1}) exceeds maximum allowed (${this.options.maxEntityCount})`);const e=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");r[o]={regx:RegExp(`&${e};`,"g"),val:i},n++}}else if(i&&k(e,"!ELEMENT",t)){t+=8;const{index:r}=this.readElementExp(e,t+1);t=r}else if(i&&k(e,"!ATTLIST",t))t+=8;else if(i&&k(e,"!NOTATION",t)){t+=9;const{index:r}=this.readNotationExp(e,t+1,this.suppressValidationErr);t=r}else{if(!k(e,"!--",t))throw new Error("Invalid DOCTYPE");s=!0}o++,a=""}if(0!==o)throw new Error("Unclosed DOCTYPE")}return{entities:r,i:t}}readEntityExp(e,t){const r=t=x(e,t);for(;t<e.length&&!/\s/.test(e[t])&&'"'!==e[t]&&"'"!==e[t];)t++;let n=e.substring(r,t);if(j(n),t=x(e,t),!this.suppressValidationErr){if("SYSTEM"===e.substring(t,t+6).toUpperCase())throw new Error("External entities are not supported");if("%"===e[t])throw new Error("Parameter entities are not supported")}let o="";if([t,o]=this.readIdentifierVal(e,t,"entity"),!1!==this.options.enabled&&null!=this.options.maxEntitySize&&o.length>this.options.maxEntitySize)throw new Error(`Entity "${n}" size (${o.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);return[n,o,--t]}readNotationExp(e,t){const r=t=x(e,t);for(;t<e.length&&!/\s/.test(e[t]);)t++;let n=e.substring(r,t);!this.suppressValidationErr&&j(n),t=x(e,t);const o=e.substring(t,t+6).toUpperCase();if(!this.suppressValidationErr&&"SYSTEM"!==o&&"PUBLIC"!==o)throw new Error(`Expected SYSTEM or PUBLIC, found "${o}"`);t+=o.length,t=x(e,t);let i=null,s=null;if("PUBLIC"===o)[t,i]=this.readIdentifierVal(e,t,"publicIdentifier"),'"'!==e[t=x(e,t)]&&"'"!==e[t]||([t,s]=this.readIdentifierVal(e,t,"systemIdentifier"));else if("SYSTEM"===o&&([t,s]=this.readIdentifierVal(e,t,"systemIdentifier"),!this.suppressValidationErr&&!s))throw new Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:n,publicIdentifier:i,systemIdentifier:s,index:--t}}readIdentifierVal(e,t,r){let n="";const o=e[t];if('"'!==o&&"'"!==o)throw new Error(`Expected quoted string, found "${o}"`);const i=++t;for(;t<e.length&&e[t]!==o;)t++;if(n=e.substring(i,t),e[t]!==o)throw new Error(`Unterminated ${r} value`);return[++t,n]}readElementExp(e,t){const r=t=x(e,t);for(;t<e.length&&!/\s/.test(e[t]);)t++;let n=e.substring(r,t);if(!this.suppressValidationErr&&!s(n))throw new Error(`Invalid element name: "${n}"`);let o="";if("E"===e[t=x(e,t)]&&k(e,"MPTY",t))t+=4;else if("A"===e[t]&&k(e,"NY",t))t+=2;else if("("===e[t]){const r=++t;for(;t<e.length&&")"!==e[t];)t++;if(o=e.substring(r,t),")"!==e[t])throw new Error("Unterminated content model")}else if(!this.suppressValidationErr)throw new Error(`Invalid Element Expression, found "${e[t]}"`);return{elementName:n,contentModel:o.trim(),index:t}}readAttlistExp(e,t){let r=t=x(e,t);for(;t<e.length&&!/\s/.test(e[t]);)t++;let n=e.substring(r,t);for(j(n),r=t=x(e,t);t<e.length&&!/\s/.test(e[t]);)t++;let o=e.substring(r,t);if(!j(o))throw new Error(`Invalid attribute name: "${o}"`);t=x(e,t);let i="";if("NOTATION"===e.substring(t,t+8).toUpperCase()){if(i="NOTATION","("!==e[t=x(e,t+=8)])throw new Error(`Expected '(', found "${e[t]}"`);t++;let r=[];for(;t<e.length&&")"!==e[t];){const n=t;for(;t<e.length&&"|"!==e[t]&&")"!==e[t];)t++;let o=e.substring(n,t);if(o=o.trim(),!j(o))throw new Error(`Invalid notation name: "${o}"`);r.push(o),"|"===e[t]&&(t++,t=x(e,t))}if(")"!==e[t])throw new Error("Unterminated list of notations");t++,i+=" ("+r.join("|")+")"}else{const r=t;for(;t<e.length&&!/\s/.test(e[t]);)t++;i+=e.substring(r,t);const n=["CDATA","ID","IDREF","IDREFS","ENTITY","ENTITIES","NMTOKEN","NMTOKENS"];if(!this.suppressValidationErr&&!n.includes(i.toUpperCase()))throw new Error(`Invalid attribute type: "${i}"`)}t=x(e,t);let s="";return"#REQUIRED"===e.substring(t,t+8).toUpperCase()?(s="#REQUIRED",t+=8):"#IMPLIED"===e.substring(t,t+7).toUpperCase()?(s="#IMPLIED",t+=7):[t,s]=this.readIdentifierVal(e,t,"ATTLIST"),{elementName:n,attributeName:o,attributeType:i,defaultValue:s,index:t}}}const x=(e,t)=>{for(;t<e.length&&/\s/.test(e[t]);)t++;return t};function k(e,t,r){for(let n=0;n<t.length;n++)if(t[n]!==e[r+n+1])return!1;return!0}function j(e){if(s(e))return e;throw new Error(`Invalid entity name ${e}`)}const M=/^[-+]?0x[a-fA-F0-9]+$/,L=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,F={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0,infinity:"original"},U=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/,$=new Set(["push","pop","reset","updateCurrent","restore"]);class B{constructor(e={}){this.separator=e.separator||".",this.path=[],this.siblingStacks=[]}push(e,t=null,r=null){this._pathStringCache=null,this.path.length>0&&(this.path[this.path.length-1].values=void 0);const n=this.path.length;this.siblingStacks[n]||(this.siblingStacks[n]=new Map);const o=this.siblingStacks[n],i=r?`${r}:${e}`:e,s=o.get(i)||0;let a=0;for(const e of o.values())a+=e;o.set(i,s+1);const c={tag:e,position:a,counter:s};null!=r&&(c.namespace=r),null!=t&&(c.values=t),this.path.push(c)}pop(){if(0===this.path.length)return;this._pathStringCache=null;const e=this.path.pop();return this.siblingStacks.length>this.path.length+1&&(this.siblingStacks.length=this.path.length+1),e}updateCurrent(e){if(this.path.length>0){const t=this.path[this.path.length-1];null!=e&&(t.values=e)}}getCurrentTag(){return this.path.length>0?this.path[this.path.length-1].tag:void 0}getCurrentNamespace(){return this.path.length>0?this.path[this.path.length-1].namespace:void 0}getAttrValue(e){if(0===this.path.length)return;const t=this.path[this.path.length-1];return t.values?.[e]}hasAttr(e){if(0===this.path.length)return!1;const t=this.path[this.path.length-1];return void 0!==t.values&&e in t.values}getPosition(){return 0===this.path.length?-1:this.path[this.path.length-1].position??0}getCounter(){return 0===this.path.length?-1:this.path[this.path.length-1].counter??0}getIndex(){return this.getPosition()}getDepth(){return this.path.length}toString(e,t=!0){const r=e||this.separator;if(r===this.separator&&!0===t){if(null!==this._pathStringCache&&void 0!==this._pathStringCache)return this._pathStringCache;const e=this.path.map(e=>t&&e.namespace?`${e.namespace}:${e.tag}`:e.tag).join(r);return this._pathStringCache=e,e}return this.path.map(e=>t&&e.namespace?`${e.namespace}:${e.tag}`:e.tag).join(r)}toArray(){return this.path.map(e=>e.tag)}reset(){this._pathStringCache=null,this.path=[],this.siblingStacks=[]}matches(e){const t=e.segments;return 0!==t.length&&(e.hasDeepWildcard()?this._matchWithDeepWildcard(t):this._matchSimple(t))}_matchSimple(e){if(this.path.length!==e.length)return!1;for(let t=0;t<e.length;t++){const r=e[t],n=this.path[t],o=t===this.path.length-1;if(!this._matchSegment(r,n,o))return!1}return!0}_matchWithDeepWildcard(e){let t=this.path.length-1,r=e.length-1;for(;r>=0&&t>=0;){const n=e[r];if("deep-wildcard"===n.type){if(r--,r<0)return!0;const n=e[r];let o=!1;for(let e=t;e>=0;e--){const i=e===this.path.length-1;if(this._matchSegment(n,this.path[e],i)){t=e-1,r--,o=!0;break}}if(!o)return!1}else{const e=t===this.path.length-1;if(!this._matchSegment(n,this.path[t],e))return!1;t--,r--}}return r<0}_matchSegment(e,t,r){if("*"!==e.tag&&e.tag!==t.tag)return!1;if(void 0!==e.namespace&&"*"!==e.namespace&&e.namespace!==t.namespace)return!1;if(void 0!==e.attrName){if(!r)return!1;if(!t.values||!(e.attrName in t.values))return!1;if(void 0!==e.attrValue){const r=t.values[e.attrName];if(String(r)!==String(e.attrValue))return!1}}if(void 0!==e.position){if(!r)return!1;const n=t.counter??0;if("first"===e.position&&0!==n)return!1;if("odd"===e.position&&n%2!=1)return!1;if("even"===e.position&&n%2!=0)return!1;if("nth"===e.position&&n!==e.positionValue)return!1}return!0}snapshot(){return{path:this.path.map(e=>({...e})),siblingStacks:this.siblingStacks.map(e=>new Map(e))}}restore(e){this._pathStringCache=null,this.path=e.path.map(e=>({...e})),this.siblingStacks=e.siblingStacks.map(e=>new Map(e))}readOnly(){return new Proxy(this,{get(e,t,r){if($.has(t))return()=>{throw new TypeError(`Cannot call '${t}' on a read-only Matcher. Obtain a writable instance to mutate state.`)};const n=Reflect.get(e,t,r);return"path"===t||"siblingStacks"===t?Object.freeze(Array.isArray(n)?n.map(e=>e instanceof Map?Object.freeze(new Map(e)):Object.freeze({...e})):n):"function"==typeof n?n.bind(e):n},set(e,t){throw new TypeError(`Cannot set property '${String(t)}' on a read-only Matcher.`)},deleteProperty(e,t){throw new TypeError(`Cannot delete property '${String(t)}' from a read-only Matcher.`)}})}}class V{constructor(e,t={}){this.pattern=e,this.separator=t.separator||".",this.segments=this._parse(e),this._hasDeepWildcard=this.segments.some(e=>"deep-wildcard"===e.type),this._hasAttributeCondition=this.segments.some(e=>void 0!==e.attrName),this._hasPositionSelector=this.segments.some(e=>void 0!==e.position)}_parse(e){const t=[];let r=0,n="";for(;r<e.length;)e[r]===this.separator?r+1<e.length&&e[r+1]===this.separator?(n.trim()&&(t.push(this._parseSegment(n.trim())),n=""),t.push({type:"deep-wildcard"}),r+=2):(n.trim()&&t.push(this._parseSegment(n.trim())),n="",r++):(n+=e[r],r++);return n.trim()&&t.push(this._parseSegment(n.trim())),t}_parseSegment(e){const t={type:"tag"};let r=null,n=e;const o=e.match(/^([^\[]+)(\[[^\]]*\])(.*)$/);if(o&&(n=o[1]+o[3],o[2])){const e=o[2].slice(1,-1);e&&(r=e)}let i,s,a=n;if(n.includes("::")){const t=n.indexOf("::");if(i=n.substring(0,t).trim(),a=n.substring(t+2).trim(),!i)throw new Error(`Invalid namespace in pattern: ${e}`)}let c=null;if(a.includes(":")){const e=a.lastIndexOf(":"),t=a.substring(0,e).trim(),r=a.substring(e+1).trim();["first","last","odd","even"].includes(r)||/^nth\(\d+\)$/.test(r)?(s=t,c=r):s=a}else s=a;if(!s)throw new Error(`Invalid segment pattern: ${e}`);if(t.tag=s,i&&(t.namespace=i),r)if(r.includes("=")){const e=r.indexOf("=");t.attrName=r.substring(0,e).trim(),t.attrValue=r.substring(e+1).trim()}else t.attrName=r.trim();if(c){const e=c.match(/^nth\((\d+)\)$/);e?(t.position="nth",t.positionValue=parseInt(e[1],10)):t.position=c}return t}get length(){return this.segments.length}hasDeepWildcard(){return this._hasDeepWildcard}hasAttributeCondition(){return this._hasAttributeCondition}hasPositionSelector(){return this._hasPositionSelector}toString(){return this.pattern}}function H(e,t){if(!e)return{};const r=t.attributesGroupName?e[t.attributesGroupName]:e;if(!r)return{};const n={};for(const e in r)e.startsWith(t.attributeNamePrefix)?n[e.substring(t.attributeNamePrefix.length)]=r[e]:n[e]=r[e];return n}function q(e){if(!e||"string"!=typeof e)return;const t=e.indexOf(":");if(-1!==t&&t>0){const r=e.substring(0,t);if("xmlns"!==r)return r}}class z{constructor(e){var t;if(this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(e,t)=>se(t,10,"&#")},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(e,t)=>se(t,16,"&#x")}},this.addExternalEntities=W,this.parseXml=Q,this.parseTextData=G,this.resolveNameSpace=K,this.buildAttributesMap=J,this.isItStopNode=te,this.replaceEntitiesValue=Z,this.readStopNodeData=oe,this.saveTextToParentTag=ee,this.addChild=Y,this.ignoreAttributesFn="function"==typeof(t=this.options.ignoreAttributes)?t:Array.isArray(t)?e=>{for(const r of t){if("string"==typeof r&&e===r)return!0;if(r instanceof RegExp&&r.test(e))return!0}}:()=>!1,this.entityExpansionCount=0,this.currentExpandedLength=0,this.matcher=new B,this.readonlyMatcher=this.matcher.readOnly(),this.isCurrentNodeStopNode=!1,this.options.stopNodes&&this.options.stopNodes.length>0){this.stopNodeExpressions=[];for(let e=0;e<this.options.stopNodes.length;e++){const t=this.options.stopNodes[e];"string"==typeof t?this.stopNodeExpressions.push(new V(t)):t instanceof V&&this.stopNodeExpressions.push(t)}}}}function W(e){const t=Object.keys(e);for(let r=0;r<t.length;r++){const n=t[r],o=n.replace(/[.\-+*:]/g,"\\.");this.lastEntities[n]={regex:new RegExp("&"+o+";","g"),val:e[n]}}}function G(e,t,r,n,o,i,s){if(void 0!==e&&(this.options.trimValues&&!n&&(e=e.trim()),e.length>0)){s||(e=this.replaceEntitiesValue(e,t,r));const n=this.options.jPath?r.toString():r,a=this.options.tagValueProcessor(t,e,n,o,i);return null==a?e:typeof a!=typeof e||a!==e?a:this.options.trimValues||e.trim()===e?ie(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function K(e){if(this.options.removeNSPrefix){const t=e.split(":"),r="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=r+t[1])}return e}const X=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function J(e,t,r){if(!0!==this.options.ignoreAttributes&&"string"==typeof e){const n=i(e,X),o=n.length,s={},a=new Array(o);let c=!1;const l={};for(let e=0;e<o;e++){const t=this.resolveNameSpace(n[e][1]),o=n[e][4];if(t.length&&void 0!==o){let n=o;this.options.trimValues&&(n=n.trim()),n=this.replaceEntitiesValue(n,r,this.readonlyMatcher),a[e]=n,l[t]=n,c=!0}}c&&"object"==typeof t&&t.updateCurrent&&t.updateCurrent(l);const u=this.options.jPath?t.toString():this.readonlyMatcher;let d=!1;for(let e=0;e<o;e++){const t=this.resolveNameSpace(n[e][1]);if(this.ignoreAttributesFn(t,u))continue;let r=this.options.attributeNamePrefix+t;if(t.length)if(this.options.transformAttributeName&&(r=this.options.transformAttributeName(r)),r=ce(r,this.options),void 0!==n[e][4]){const n=a[e],o=this.options.attributeValueProcessor(t,n,u);s[r]=null==o?n:typeof o!=typeof n||o!==n?o:ie(n,this.options.parseAttributeValue,this.options.numberParseOptions),d=!0}else this.options.allowBooleanAttributes&&(s[r]=!0,d=!0)}if(!d)return;if(this.options.attributesGroupName){const e={};return e[this.options.attributesGroupName]=s,e}return s}}const Q=function(e){e=e.replace(/\r\n?/g,"\n");const t=new A("!xml");let r=t,n="";this.matcher.reset(),this.entityExpansionCount=0,this.currentExpandedLength=0;const o=new D(this.options.processEntities);for(let i=0;i<e.length;i++)if("<"===e[i])if("/"===e[i+1]){const t=re(e,">",i,"Closing Tag is not closed.");let o=e.substring(i+2,t).trim();if(this.options.removeNSPrefix){const e=o.indexOf(":");-1!==e&&(o=o.substr(e+1))}o=ae(this.options.transformTagName,o,"",this.options).tagName,r&&(n=this.saveTextToParentTag(n,r,this.readonlyMatcher));const s=this.matcher.getCurrentTag();if(o&&-1!==this.options.unpairedTags.indexOf(o))throw new Error(`Unpaired tag can not be used as closing tag: </${o}>`);s&&-1!==this.options.unpairedTags.indexOf(s)&&(this.matcher.pop(),this.tagsNodeStack.pop()),this.matcher.pop(),this.isCurrentNodeStopNode=!1,r=this.tagsNodeStack.pop(),n="",i=t}else if("?"===e[i+1]){let t=ne(e,i,!1,"?>");if(!t)throw new Error("Pi Tag is not closed.");if(n=this.saveTextToParentTag(n,r,this.readonlyMatcher),this.options.ignoreDeclaration&&"?xml"===t.tagName||this.options.ignorePiTags);else{const e=new A(t.tagName);e.add(this.options.textNodeName,""),t.tagName!==t.tagExp&&t.attrExpPresent&&(e[":@"]=this.buildAttributesMap(t.tagExp,this.matcher,t.tagName)),this.addChild(r,e,this.readonlyMatcher,i)}i=t.closeIndex+1}else if("!--"===e.substr(i+1,3)){const t=re(e,"--\x3e",i+4,"Comment is not closed.");if(this.options.commentPropName){const o=e.substring(i+4,t-2);n=this.saveTextToParentTag(n,r,this.readonlyMatcher),r.add(this.options.commentPropName,[{[this.options.textNodeName]:o}])}i=t}else if("!D"===e.substr(i+1,2)){const t=o.readDocType(e,i);this.docTypeEntities=t.entities,i=t.i}else if("!["===e.substr(i+1,2)){const t=re(e,"]]>",i,"CDATA is not closed.")-2,o=e.substring(i+9,t);n=this.saveTextToParentTag(n,r,this.readonlyMatcher);let s=this.parseTextData(o,r.tagname,this.readonlyMatcher,!0,!1,!0,!0);null==s&&(s=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[{[this.options.textNodeName]:o}]):r.add(this.options.textNodeName,s),i=t+2}else{let o=ne(e,i,this.options.removeNSPrefix);if(!o){const t=e.substring(Math.max(0,i-50),Math.min(e.length,i+50));throw new Error(`readTagExp returned undefined at position ${i}. Context: "${t}"`)}let s=o.tagName;const a=o.rawTagName;let c=o.tagExp,l=o.attrExpPresent,u=o.closeIndex;if(({tagName:s,tagExp:c}=ae(this.options.transformTagName,s,c,this.options)),this.options.strictReservedNames&&(s===this.options.commentPropName||s===this.options.cdataPropName||s===this.options.textNodeName||s===this.options.attributesGroupName))throw new Error(`Invalid tag name: ${s}`);r&&n&&"!xml"!==r.tagname&&(n=this.saveTextToParentTag(n,r,this.readonlyMatcher,!1));const d=r;d&&-1!==this.options.unpairedTags.indexOf(d.tagname)&&(r=this.tagsNodeStack.pop(),this.matcher.pop());let p=!1;c.length>0&&c.lastIndexOf("/")===c.length-1&&(p=!0,"/"===s[s.length-1]?(s=s.substr(0,s.length-1),c=s):c=c.substr(0,c.length-1),l=s!==c);let h,f=null,g={};h=q(a),s!==t.tagname&&this.matcher.push(s,{},h),s!==c&&l&&(f=this.buildAttributesMap(c,this.matcher,s),f&&(g=H(f,this.options))),s!==t.tagname&&(this.isCurrentNodeStopNode=this.isItStopNode(this.stopNodeExpressions,this.matcher));const m=i;if(this.isCurrentNodeStopNode){let t="";if(p)i=o.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(s))i=o.closeIndex;else{const r=this.readStopNodeData(e,a,u+1);if(!r)throw new Error(`Unexpected end of ${a}`);i=r.i,t=r.tagContent}const n=new A(s);f&&(n[":@"]=f),n.add(this.options.textNodeName,t),this.matcher.pop(),this.isCurrentNodeStopNode=!1,this.addChild(r,n,this.readonlyMatcher,m)}else{if(p){({tagName:s,tagExp:c}=ae(this.options.transformTagName,s,c,this.options));const e=new A(s);f&&(e[":@"]=f),this.addChild(r,e,this.readonlyMatcher,m),this.matcher.pop(),this.isCurrentNodeStopNode=!1}else{if(-1!==this.options.unpairedTags.indexOf(s)){const e=new A(s);f&&(e[":@"]=f),this.addChild(r,e,this.readonlyMatcher,m),this.matcher.pop(),this.isCurrentNodeStopNode=!1,i=o.closeIndex;continue}{const e=new A(s);if(this.tagsNodeStack.length>this.options.maxNestedTags)throw new Error("Maximum nested tags exceeded");this.tagsNodeStack.push(r),f&&(e[":@"]=f),this.addChild(r,e,this.readonlyMatcher,m),r=e}}n="",i=u}}else n+=e[i];return t.child};function Y(e,t,r,n){this.options.captureMetaData||(n=void 0);const o=this.options.jPath?r.toString():r,i=this.options.updateTag(t.tagname,o,t[":@"]);!1===i||("string"==typeof i?(t.tagname=i,e.addChild(t,n)):e.addChild(t,n))}function Z(e,t,r){const n=this.options.processEntities;if(!n||!n.enabled)return e;if(n.allowedTags){const o=this.options.jPath?r.toString():r;if(!(Array.isArray(n.allowedTags)?n.allowedTags.includes(t):n.allowedTags(t,o)))return e}if(n.tagFilter){const o=this.options.jPath?r.toString():r;if(!n.tagFilter(t,o))return e}for(const t of Object.keys(this.docTypeEntities)){const r=this.docTypeEntities[t],o=e.match(r.regx);if(o){if(this.entityExpansionCount+=o.length,n.maxTotalExpansions&&this.entityExpansionCount>n.maxTotalExpansions)throw new Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${n.maxTotalExpansions}`);const t=e.length;if(e=e.replace(r.regx,r.val),n.maxExpandedLength&&(this.currentExpandedLength+=e.length-t,this.currentExpandedLength>n.maxExpandedLength))throw new Error(`Total expanded content size exceeded: ${this.currentExpandedLength} > ${n.maxExpandedLength}`)}}if(-1===e.indexOf("&"))return e;for(const t of Object.keys(this.lastEntities)){const r=this.lastEntities[t],o=e.match(r.regex);if(o&&(this.entityExpansionCount+=o.length,n.maxTotalExpansions&&this.entityExpansionCount>n.maxTotalExpansions))throw new Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${n.maxTotalExpansions}`);e=e.replace(r.regex,r.val)}if(-1===e.indexOf("&"))return e;if(this.options.htmlEntities)for(const t of Object.keys(this.htmlEntities)){const r=this.htmlEntities[t],o=e.match(r.regex);if(o&&(this.entityExpansionCount+=o.length,n.maxTotalExpansions&&this.entityExpansionCount>n.maxTotalExpansions))throw new Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${n.maxTotalExpansions}`);e=e.replace(r.regex,r.val)}return e.replace(this.ampEntity.regex,this.ampEntity.val)}function ee(e,t,r,n){return e&&(void 0===n&&(n=0===t.child.length),void 0!==(e=this.parseTextData(e,t.tagname,r,!1,!!t[":@"]&&0!==Object.keys(t[":@"]).length,n))&&""!==e&&t.add(this.options.textNodeName,e),e=""),e}function te(e,t){if(!e||0===e.length)return!1;for(let r=0;r<e.length;r++)if(t.matches(e[r]))return!0;return!1}function re(e,t,r,n){const o=e.indexOf(t,r);if(-1===o)throw new Error(n);return o+t.length-1}function ne(e,t,r,n=">"){const o=function(e,t,r=">"){let n,o="";for(let i=t;i<e.length;i++){let t=e[i];if(n)t===n&&(n="");else if('"'===t||"'"===t)n=t;else if(t===r[0]){if(!r[1])return{data:o,index:i};if(e[i+1]===r[1])return{data:o,index:i}}else"\t"===t&&(t=" ");o+=t}}(e,t+1,n);if(!o)return;let i=o.data;const s=o.index,a=i.search(/\s/);let c=i,l=!0;-1!==a&&(c=i.substring(0,a),i=i.substring(a+1).trimStart());const u=c;if(r){const e=c.indexOf(":");-1!==e&&(c=c.substr(e+1),l=c!==o.data.substr(e+1))}return{tagName:c,tagExp:i,closeIndex:s,attrExpPresent:l,rawTagName:u}}function oe(e,t,r){const n=r;let o=1;for(;r<e.length;r++)if("<"===e[r])if("/"===e[r+1]){const i=re(e,">",r,`${t} is not closed`);if(e.substring(r+2,i).trim()===t&&(o--,0===o))return{tagContent:e.substring(n,r),i};r=i}else if("?"===e[r+1])r=re(e,"?>",r+1,"StopNode is not closed.");else if("!--"===e.substr(r+1,3))r=re(e,"--\x3e",r+3,"StopNode is not closed.");else if("!["===e.substr(r+1,2))r=re(e,"]]>",r,"StopNode is not closed.")-2;else{const n=ne(e,r,">");n&&((n&&n.tagName)===t&&"/"!==n.tagExp[n.tagExp.length-1]&&o++,r=n.closeIndex)}}function ie(e,t,r){if(t&&"string"==typeof e){const t=e.trim();return"true"===t||"false"!==t&&function(e,t={}){if(t=Object.assign({},F,t),!e||"string"!=typeof e)return e;let r=e.trim();if(0===r.length)return e;if(void 0!==t.skipLike&&t.skipLike.test(r))return e;if("0"===r)return 0;if(t.hex&&M.test(r))return function(e){if(parseInt)return parseInt(e,16);if(Number.parseInt)return Number.parseInt(e,16);if(window&&window.parseInt)return window.parseInt(e,16);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}(r);if(isFinite(r)){if(r.includes("e")||r.includes("E"))return function(e,t,r){if(!r.eNotation)return e;const n=t.match(U);if(n){let o=n[1]||"";const i=-1===n[3].indexOf("e")?"E":"e",s=n[2],a=o?e[s.length+1]===i:e[s.length]===i;return s.length>1&&a?e:(1!==s.length||!n[3].startsWith(`.${i}`)&&n[3][0]!==i)&&s.length>0?r.leadingZeros&&!a?(t=(n[1]||"")+n[3],Number(t)):e:Number(t)}return e}(e,r,t);{const o=L.exec(r);if(o){const i=o[1]||"",s=o[2];let a=(n=o[3])&&-1!==n.indexOf(".")?("."===(n=n.replace(/0+$/,""))?n="0":"."===n[0]?n="0"+n:"."===n[n.length-1]&&(n=n.substring(0,n.length-1)),n):n;const c=i?"."===e[s.length+1]:"."===e[s.length];if(!t.leadingZeros&&(s.length>1||1===s.length&&!c))return e;{const n=Number(r),o=String(n);if(0===n)return n;if(-1!==o.search(/[eE]/))return t.eNotation?n:e;if(-1!==r.indexOf("."))return"0"===o||o===a||o===`${i}${a}`?n:e;let c=s?a:r;return s?c===o||i+c===o?n:e:c===o||c===i+o?n:e}}return e}}var n;return function(e,t,r){const n=t===1/0;switch(r.infinity.toLowerCase()){case"null":return null;case"infinity":return t;case"string":return n?"Infinity":"-Infinity";default:return e}}(e,Number(r),t)}(e,r)}return void 0!==e?e:""}function se(e,t,r){const n=Number.parseInt(e,t);return n>=0&&n<=1114111?String.fromCodePoint(n):r+e+";"}function ae(e,t,r,n){if(e){const n=e(t);r===t&&(r=n),t=n}return{tagName:t=ce(t,n),tagExp:r}}function ce(e,t){if(c.includes(e))throw new Error(`[SECURITY] Invalid name: "${e}" is a reserved JavaScript keyword that could cause prototype pollution`);return a.includes(e)?t.onDangerousProperty(e):e}const le=A.getMetaDataSymbol();function ue(e,t){if(!e||"object"!=typeof e)return{};if(!t)return e;const r={};for(const n in e)n.startsWith(t)?r[n.substring(t.length)]=e[n]:r[n]=e[n];return r}function de(e,t,r,n){return pe(e,t,r,n)}function pe(e,t,r,n){let o;const i={};for(let s=0;s<e.length;s++){const a=e[s],c=he(a);if(void 0!==c&&c!==t.textNodeName){const e=ue(a[":@"]||{},t.attributeNamePrefix);r.push(c,e)}if(c===t.textNodeName)void 0===o?o=a[c]:o+=""+a[c];else{if(void 0===c)continue;if(a[c]){let e=pe(a[c],t,r,n);const o=ge(e,t);if(a[":@"]?fe(e,a[":@"],n,t):1!==Object.keys(e).length||void 0===e[t.textNodeName]||t.alwaysCreateTextNode?0===Object.keys(e).length&&(t.alwaysCreateTextNode?e[t.textNodeName]="":e=""):e=e[t.textNodeName],void 0!==a[le]&&"object"==typeof e&&null!==e&&(e[le]=a[le]),void 0!==i[c]&&Object.prototype.hasOwnProperty.call(i,c))Array.isArray(i[c])||(i[c]=[i[c]]),i[c].push(e);else{const r=t.jPath?n.toString():n;t.isArray(c,r,o)?i[c]=[e]:i[c]=e}void 0!==c&&c!==t.textNodeName&&r.pop()}}}return"string"==typeof o?o.length>0&&(i[t.textNodeName]=o):void 0!==o&&(i[t.textNodeName]=o),i}function he(e){const t=Object.keys(e);for(let e=0;e<t.length;e++){const r=t[e];if(":@"!==r)return r}}function fe(e,t,r,n){if(t){const o=Object.keys(t),i=o.length;for(let s=0;s<i;s++){const i=o[s],a=i.startsWith(n.attributeNamePrefix)?i.substring(n.attributeNamePrefix.length):i,c=n.jPath?r.toString()+"."+a:r;n.isArray(i,c,!0,!0)?e[i]=[t[i]]:e[i]=t[i]}}}function ge(e,t){const{textNodeName:r}=t,n=Object.keys(e).length;return 0===n||!(1!==n||!e[r]&&"boolean"!=typeof e[r]&&0!==e[r])}class me{constructor(e){this.externalEntities={},this.options=N(e)}parse(e,t){if("string"!=typeof e&&e.toString)e=e.toString();else if("string"!=typeof e)throw new Error("XML data is accepted in String or Bytes[] form.");if(t){!0===t&&(t={});const r=u(e,t);if(!0!==r)throw Error(`${r.err.msg}:${r.err.line}:${r.err.col}`)}const r=new z(this.options);r.addExternalEntities(this.externalEntities);const n=r.parseXml(e);return this.options.preserveOrder||void 0===n?n:de(n,this.options,r.matcher,r.readonlyMatcher)}addEntity(e,t){if(-1!==t.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==e.indexOf("&")||-1!==e.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if("&"===t)throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=t}static getMetaDataSymbol(){return A.getMetaDataSymbol()}}function ve(e,t){let r="";t.format&&t.indentBy.length>0&&(r="\n");const n=[];if(t.stopNodes&&Array.isArray(t.stopNodes))for(let e=0;e<t.stopNodes.length;e++){const r=t.stopNodes[e];"string"==typeof r?n.push(new V(r)):r instanceof V&&n.push(r)}return ye(e,t,r,new B,n)}function ye(e,t,r,n,o){let i="",s=!1;if(t.maxNestedTags&&n.getDepth()>t.maxNestedTags)throw new Error("Maximum nested tags exceeded");if(!Array.isArray(e)){if(null!=e){let r=e.toString();return r=Te(r,t),r}return""}for(let a=0;a<e.length;a++){const c=e[a],l=_e(c);if(void 0===l)continue;const u=Se(c[":@"],t);n.push(l,u);const d=Pe(n,o);if(l===t.textNodeName){let e=c[l];d||(e=t.tagValueProcessor(l,e),e=Te(e,t)),s&&(i+=r),i+=e,s=!1,n.pop();continue}if(l===t.cdataPropName){s&&(i+=r),i+=`<![CDATA[${c[l][0][t.textNodeName]}]]>`,s=!1,n.pop();continue}if(l===t.commentPropName){i+=r+`\x3c!--${c[l][0][t.textNodeName]}--\x3e`,s=!0,n.pop();continue}if("?"===l[0]){const e=be(c[":@"],t,d),o="?xml"===l?"":r;let a=c[l][0][t.textNodeName];a=0!==a.length?" "+a:"",i+=o+`<${l}${a}${e}?>`,s=!0,n.pop();continue}let p=r;""!==p&&(p+=t.indentBy);const h=r+`<${l}${be(c[":@"],t,d)}`;let f;f=d?we(c[l],t):ye(c[l],t,p,n,o),-1!==t.unpairedTags.indexOf(l)?t.suppressUnpairedNode?i+=h+">":i+=h+"/>":f&&0!==f.length||!t.suppressEmptyNode?f&&f.endsWith(">")?i+=h+`>${f}${r}</${l}>`:(i+=h+">",f&&""!==r&&(f.includes("/>")||f.includes("</"))?i+=r+t.indentBy+f+r:i+=f,i+=`</${l}>`):i+=h+"/>",s=!0,n.pop()}return i}function Se(e,t){if(!e||t.ignoreAttributes)return null;const r={};let n=!1;for(let o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o.startsWith(t.attributeNamePrefix)?o.substr(t.attributeNamePrefix.length):o]=e[o],n=!0);return n?r:null}function we(e,t){if(!Array.isArray(e))return null!=e?e.toString():"";let r="";for(let n=0;n<e.length;n++){const o=e[n],i=_e(o);if(i===t.textNodeName)r+=o[i];else if(i===t.cdataPropName)r+=o[i][0][t.textNodeName];else if(i===t.commentPropName)r+=o[i][0][t.textNodeName];else{if(i&&"?"===i[0])continue;if(i){const e=Ee(o[":@"],t),n=we(o[i],t);n&&0!==n.length?r+=`<${i}${e}>${n}</${i}>`:r+=`<${i}${e}/>`}}}return r}function Ee(e,t){let r="";if(e&&!t.ignoreAttributes)for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;let o=e[n];!0===o&&t.suppressBooleanAttributes?r+=` ${n.substr(t.attributeNamePrefix.length)}`:r+=` ${n.substr(t.attributeNamePrefix.length)}="${o}"`}return r}function _e(e){const t=Object.keys(e);for(let r=0;r<t.length;r++){const n=t[r];if(Object.prototype.hasOwnProperty.call(e,n)&&":@"!==n)return n}}function be(e,t,r){let n="";if(e&&!t.ignoreAttributes)for(let o in e){if(!Object.prototype.hasOwnProperty.call(e,o))continue;let i;r?i=e[o]:(i=t.attributeValueProcessor(o,e[o]),i=Te(i,t)),!0===i&&t.suppressBooleanAttributes?n+=` ${o.substr(t.attributeNamePrefix.length)}`:n+=` ${o.substr(t.attributeNamePrefix.length)}="${i}"`}return n}function Pe(e,t){if(!t||0===t.length)return!1;for(let r=0;r<t.length;r++)if(e.matches(t[r]))return!0;return!1}function Te(e,t){if(e&&e.length>0&&t.processEntities)for(let r=0;r<t.entities.length;r++){const n=t.entities[r];e=e.replace(n.regex,n.val)}return e}const Ce={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1,maxNestedTags:100,jPath:!0};function Ie(e){if(this.options=Object.assign({},Ce,e),this.options.stopNodes&&Array.isArray(this.options.stopNodes)&&(this.options.stopNodes=this.options.stopNodes.map(e=>"string"==typeof e&&e.startsWith("*.")?".."+e.substring(2):e)),this.stopNodeExpressions=[],this.options.stopNodes&&Array.isArray(this.options.stopNodes))for(let e=0;e<this.options.stopNodes.length;e++){const t=this.options.stopNodes[e];"string"==typeof t?this.stopNodeExpressions.push(new V(t)):t instanceof V&&this.stopNodeExpressions.push(t)}var t;!0===this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn="function"==typeof(t=this.options.ignoreAttributes)?t:Array.isArray(t)?e=>{for(const r of t){if("string"==typeof r&&e===r)return!0;if(r instanceof RegExp&&r.test(e))return!0}}:()=>!1,this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Re),this.processTextOrObjNode=Oe,this.options.format?(this.indentate=Ne,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function Oe(e,t,r,n){const o=this.extractAttributes(e);if(n.push(t,o),this.checkStopNode(n)){const o=this.buildRawContent(e),i=this.buildAttributesForStopNode(e);return n.pop(),this.buildObjectNode(o,t,i,r)}const i=this.j2x(e,r+1,n);return n.pop(),void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextValNode(e[this.options.textNodeName],t,i.attrStr,r,n):this.buildObjectNode(i.val,t,i.attrStr,r)}function Ne(e){return this.options.indentBy.repeat(e)}function Re(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}Ie.prototype.build=function(e){if(this.options.preserveOrder)return ve(e,this.options);{Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e});const t=new B;return this.j2x(e,0,t).val}},Ie.prototype.j2x=function(e,t,r){let n="",o="";if(this.options.maxNestedTags&&r.getDepth()>=this.options.maxNestedTags)throw new Error("Maximum nested tags exceeded");const i=this.options.jPath?r.toString():r,s=this.checkStopNode(r);for(let a in e)if(Object.prototype.hasOwnProperty.call(e,a))if(void 0===e[a])this.isAttribute(a)&&(o+="");else if(null===e[a])this.isAttribute(a)||a===this.options.cdataPropName?o+="":"?"===a[0]?o+=this.indentate(t)+"<"+a+"?"+this.tagEndChar:o+=this.indentate(t)+"<"+a+"/"+this.tagEndChar;else if(e[a]instanceof Date)o+=this.buildTextValNode(e[a],a,"",t,r);else if("object"!=typeof e[a]){const c=this.isAttribute(a);if(c&&!this.ignoreAttributesFn(c,i))n+=this.buildAttrPairStr(c,""+e[a],s);else if(!c)if(a===this.options.textNodeName){let t=this.options.tagValueProcessor(a,""+e[a]);o+=this.replaceEntitiesValue(t)}else{r.push(a);const n=this.checkStopNode(r);if(r.pop(),n){const r=""+e[a];o+=""===r?this.indentate(t)+"<"+a+this.closeTag(a)+this.tagEndChar:this.indentate(t)+"<"+a+">"+r+"</"+a+this.tagEndChar}else o+=this.buildTextValNode(e[a],a,"",t,r)}}else if(Array.isArray(e[a])){const n=e[a].length;let i="",s="";for(let c=0;c<n;c++){const n=e[a][c];if(void 0===n);else if(null===n)"?"===a[0]?o+=this.indentate(t)+"<"+a+"?"+this.tagEndChar:o+=this.indentate(t)+"<"+a+"/"+this.tagEndChar;else if("object"==typeof n)if(this.options.oneListGroup){r.push(a);const e=this.j2x(n,t+1,r);r.pop(),i+=e.val,this.options.attributesGroupName&&n.hasOwnProperty(this.options.attributesGroupName)&&(s+=e.attrStr)}else i+=this.processTextOrObjNode(n,a,t,r);else if(this.options.oneListGroup){let e=this.options.tagValueProcessor(a,n);e=this.replaceEntitiesValue(e),i+=e}else{r.push(a);const e=this.checkStopNode(r);if(r.pop(),e){const e=""+n;i+=""===e?this.indentate(t)+"<"+a+this.closeTag(a)+this.tagEndChar:this.indentate(t)+"<"+a+">"+e+"</"+a+this.tagEndChar}else i+=this.buildTextValNode(n,a,"",t,r)}}this.options.oneListGroup&&(i=this.buildObjectNode(i,a,s,t)),o+=i}else if(this.options.attributesGroupName&&a===this.options.attributesGroupName){const t=Object.keys(e[a]),r=t.length;for(let o=0;o<r;o++)n+=this.buildAttrPairStr(t[o],""+e[a][t[o]],s)}else o+=this.processTextOrObjNode(e[a],a,t,r);return{attrStr:n,val:o}},Ie.prototype.buildAttrPairStr=function(e,t,r){return r||(t=this.options.attributeValueProcessor(e,""+t),t=this.replaceEntitiesValue(t)),this.options.suppressBooleanAttributes&&"true"===t?" "+e:" "+e+'="'+t+'"'},Ie.prototype.extractAttributes=function(e){if(!e||"object"!=typeof e)return null;const t={};let r=!1;if(this.options.attributesGroupName&&e[this.options.attributesGroupName]){const n=e[this.options.attributesGroupName];for(let e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e.startsWith(this.options.attributeNamePrefix)?e.substring(this.options.attributeNamePrefix.length):e]=n[e],r=!0)}else for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;const o=this.isAttribute(n);o&&(t[o]=e[n],r=!0)}return r?t:null},Ie.prototype.buildRawContent=function(e){if("string"==typeof e)return e;if("object"!=typeof e||null===e)return String(e);if(void 0!==e[this.options.textNodeName])return e[this.options.textNodeName];let t="";for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;if(this.isAttribute(r))continue;if(this.options.attributesGroupName&&r===this.options.attributesGroupName)continue;const n=e[r];if(r===this.options.textNodeName)t+=n;else if(Array.isArray(n)){for(let e of n)if("string"==typeof e||"number"==typeof e)t+=`<${r}>${e}</${r}>`;else if("object"==typeof e&&null!==e){const n=this.buildRawContent(e),o=this.buildAttributesForStopNode(e);t+=""===n?`<${r}${o}/>`:`<${r}${o}>${n}</${r}>`}}else if("object"==typeof n&&null!==n){const e=this.buildRawContent(n),o=this.buildAttributesForStopNode(n);t+=""===e?`<${r}${o}/>`:`<${r}${o}>${e}</${r}>`}else t+=`<${r}>${n}</${r}>`}return t},Ie.prototype.buildAttributesForStopNode=function(e){if(!e||"object"!=typeof e)return"";let t="";if(this.options.attributesGroupName&&e[this.options.attributesGroupName]){const r=e[this.options.attributesGroupName];for(let e in r){if(!Object.prototype.hasOwnProperty.call(r,e))continue;const n=e.startsWith(this.options.attributeNamePrefix)?e.substring(this.options.attributeNamePrefix.length):e,o=r[e];!0===o&&this.options.suppressBooleanAttributes?t+=" "+n:t+=" "+n+'="'+o+'"'}}else for(let r in e){if(!Object.prototype.hasOwnProperty.call(e,r))continue;const n=this.isAttribute(r);if(n){const o=e[r];!0===o&&this.options.suppressBooleanAttributes?t+=" "+n:t+=" "+n+'="'+o+'"'}}return t},Ie.prototype.buildObjectNode=function(e,t,r,n){if(""===e)return"?"===t[0]?this.indentate(n)+"<"+t+r+"?"+this.tagEndChar:this.indentate(n)+"<"+t+r+this.closeTag(t)+this.tagEndChar;{let o="</"+t+this.tagEndChar,i="";return"?"===t[0]&&(i="?",o=""),!r&&""!==r||-1!==e.indexOf("<")?!1!==this.options.commentPropName&&t===this.options.commentPropName&&0===i.length?this.indentate(n)+`\x3c!--${e}--\x3e`+this.newLine:this.indentate(n)+"<"+t+r+i+this.tagEndChar+e+this.indentate(n)+o:this.indentate(n)+"<"+t+r+i+">"+e+o}},Ie.prototype.closeTag=function(e){let t="";return-1!==this.options.unpairedTags.indexOf(e)?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`></${e}`,t},Ie.prototype.checkStopNode=function(e){if(!this.stopNodeExpressions||0===this.stopNodeExpressions.length)return!1;for(let t=0;t<this.stopNodeExpressions.length;t++)if(e.matches(this.stopNodeExpressions[t]))return!0;return!1},Ie.prototype.buildTextValNode=function(e,t,r,n,o){if(!1!==this.options.cdataPropName&&t===this.options.cdataPropName)return this.indentate(n)+`<![CDATA[${e}]]>`+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(n)+`\x3c!--${e}--\x3e`+this.newLine;if("?"===t[0])return this.indentate(n)+"<"+t+r+"?"+this.tagEndChar;{let o=this.options.tagValueProcessor(t,e);return o=this.replaceEntitiesValue(o),""===o?this.indentate(n)+"<"+t+r+this.closeTag(t)+this.tagEndChar:this.indentate(n)+"<"+t+r+">"+o+"</"+t+this.tagEndChar}},Ie.prototype.replaceEntitiesValue=function(e){if(e&&e.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){const r=this.options.entities[t];e=e.replace(r.regex,r.val)}return e};const Ae=Ie,De={validate:u};e.exports=r})()}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var i=r[e]={exports:{}};return t[e].call(i.exports,i,i.exports,n),i.exports}n.m=t,n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce((t,r)=>(n.f[r](e,t),t),[])),n.u=e=>e+".extension.js",n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},e={792:1},n.f.require=(t,r)=>{if(!e[t]){var o=require("./"+n.u(t));e[t]||(t=>{var r=t.modules,o=t.ids,i=t.runtime;for(var s in r)n.o(r,s)&&(n.m[s]=r[s]);i&&i(n);for(var a=0;a<o.length;a++)e[o[a]]=1})(o)}};var o=n(680);module.exports=o})();
// SIG // Begin signature block
// SIG // MIIpkAYJKoZIhvcNAQcCoIIpgTCCKX0CAQExDzANBglg
// SIG // hkgBZQMEAgEFADB3BgorBgEEAYI3AgEEoGkwZzAyBgor
// SIG // BgEEAYI3AgEeMCQCAQEEEBDgyQbOONQRoqMAEEvTUJAC
// SIG // AQACAQACAQACAQACAQAwMTANBglghkgBZQMEAgEFAAQg
// SIG // UOCLpTtgRAiDruCwd+cfHyQUvNU+fW9LafJPH/Jr7Aag
// SIG // gg3lMIIGvTCCBKWgAwIBAgITMwAAABxIn4HfobC3dwAA
// SIG // AAAAHDANBgkqhkiG9w0BAQwFADCBiDELMAkGA1UEBhMC
// SIG // VVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcT
// SIG // B1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jw
// SIG // b3JhdGlvbjEyMDAGA1UEAxMpTWljcm9zb2Z0IFJvb3Qg
// SIG // Q2VydGlmaWNhdGUgQXV0aG9yaXR5IDIwMTAwHhcNMjQw
// SIG // ODA4MjEzNjIzWhcNMzUwNjIzMjIwNDAxWjBfMQswCQYD
// SIG // VQQGEwJVUzEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBv
// SIG // cmF0aW9uMTAwLgYDVQQDEydNaWNyb3NvZnQgV2luZG93
// SIG // cyBDb2RlIFNpZ25pbmcgUENBIDIwMjQwggIiMA0GCSqG
// SIG // SIb3DQEBAQUAA4ICDwAwggIKAoICAQCafWt9J8F2Ki6u
// SIG // 49U0/8wrbe78VPggo/uwZIn0vwdoFyhlOzlfUl0SRj9c
// SIG // hbOaeo6bGIuHGMxeegFdABJphI1fME9pbz1OQYTd8Fd9
// SIG // B6mDyGBI+T91l39JFw/X741H9RgLVxK4ifMOwCzWlRJv
// SIG // UbOHjwNGbGB2gm1OZAVCUA17++oWnznEIHRQgNyN82LX
// SIG // 819rzsMfO7gzmgrsijkWYofXN803/kywuUGC8oVTAZw1
// SIG // xBwzq72sPdg0siKqXYEVqbn86gxctXoFY5KF2YW/vaWf
// SIG // YXlMzV014TqF83sYemMwC+H5QVpvgXNYUMhEnpxLwSc5
// SIG // 1ftubt4e+444DFGOOPll0OLvanXQ3v1OUngGikb74m5o
// SIG // uM+0EaS72bJWtAj4jlBs9NA6ObH5AtBMJbEs3zN/vAPa
// SIG // 7MhVToFg1T87ffDiT9hKGhDqvBhPRgqDdou/+AthQsH3
// SIG // 9QUgkyVmTtVnK9jLXiROlMRlfooQPJzedWDyg9nWBqHs
// SIG // K170cwv9R6FHkr5WX9Jn/RhxLb75GyVUUaOjwX9Jnebf
// SIG // O1W9ZjP3yKdXsqcmsZl5IKXAcLspbDqtpElTiecAT6Gh
// SIG // LLCZHjHCpxLrrvvlCnQx5UtA7bGIzdEJzrnL03UrHb4c
// SIG // yjkoyRd11aq/X9gveOS10+a8SiB1CBAwXDWFOgSgwx+q
// SIG // 36SjjgkopQIDAQABo4IBRjCCAUIwDgYDVR0PAQH/BAQD
// SIG // AgGGMBAGCSsGAQQBgjcVAQQDAgEAMB0GA1UdDgQWBBQe
// SIG // gt8O14yz1wI0gw7aq61lua+47DAZBgkrBgEEAYI3FAIE
// SIG // DB4KAFMAdQBiAEMAQTAPBgNVHRMBAf8EBTADAQH/MB8G
// SIG // A1UdIwQYMBaAFNX2VsuP6KJcYmjRPZSQW9fOmhjEMFYG
// SIG // A1UdHwRPME0wS6BJoEeGRWh0dHA6Ly9jcmwubWljcm9z
// SIG // b2Z0LmNvbS9wa2kvY3JsL3Byb2R1Y3RzL01pY1Jvb0Nl
// SIG // ckF1dF8yMDEwLTA2LTIzLmNybDBaBggrBgEFBQcBAQRO
// SIG // MEwwSgYIKwYBBQUHMAKGPmh0dHA6Ly93d3cubWljcm9z
// SIG // b2Z0LmNvbS9wa2kvY2VydHMvTWljUm9vQ2VyQXV0XzIw
// SIG // MTAtMDYtMjMuY3J0MA0GCSqGSIb3DQEBDAUAA4ICAQBD
// SIG // X/jfP7vplIw7XPW7aAOdkQXNF1Q0gTEATKsbueoVxwcL
// SIG // nLVFrNVwagwzCBQh7vXOmP1BfkzfBCII57owKSmJhz+H
// SIG // +BDNwEUppc66ReaMzicdAQORVL9Y5qXX/9mW6qbwsZcb
// SIG // /xtUeCo60ppqjx87OooMN2+0U24+wcSEvHziJMGFkIQd
// SIG // ny45YPtx0qwxjxSIaSCVlWpjCEe2u9jhqJ43X+Oa7KcK
// SIG // iB7sp2VOGr8va7gf0YYW8JvnzG/ATHnCGk5pKIcfxGWe
// SIG // RjVnDeqE2FtxtgTNwd2M51pJfbeLIT+tHzLnvtpLHRxl
// SIG // khPBFU3UphlHY9I61HOOpRlRSSEhd/zMXMZ5TXj9Socq
// SIG // /mc0+BLbPyO5rn6Wi5y2pczEdsyLoRjgFlrMHrG47Rc5
// SIG // FVBYA0dklvdNyNFypWzxAOqvHqRxifa6MYfOZ7BCnATV
// SIG // MOEnKevCgqkqRQWiosldbJHfpfFOdFjXjzG/Qc89DnwE
// SIG // mpfL+bEBvg1tNZDfiPkSlCGzOSOdMCY4h8pkBTQ7G6Gx
// SIG // cfSPeZghBD1O31Gd1U/xzlFW5Jl+5bSAv3kALuRjvH7v
// SIG // nHhEzMm726MVDOHWDQvj86KFMX5gtA7ikcAdtW1/fmnL
// SIG // iAZMSJuBHdztfcNVS6AO1DTlLie8+jUNlv/qu3J3zj5d
// SIG // kFS+KpYAm5VE9r5kKZZVdzCCByAwggUIoAMCAQICEzMA
// SIG // AAEibAYzo9FStt0AAAAAASIwDQYJKoZIhvcNAQEMBQAw
// SIG // XzELMAkGA1UEBhMCVVMxHjAcBgNVBAoTFU1pY3Jvc29m
// SIG // dCBDb3Jwb3JhdGlvbjEwMC4GA1UEAxMnTWljcm9zb2Z0
// SIG // IFdpbmRvd3MgQ29kZSBTaWduaW5nIFBDQSAyMDI0MB4X
// SIG // DTI2MDMwNTE5NTgyNFoXDTI3MDMwMzE5NTgyNFowdDEL
// SIG // MAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24x
// SIG // EDAOBgNVBAcTB1JlZG1vbmQxHjAcBgNVBAoTFU1pY3Jv
// SIG // c29mdCBDb3Jwb3JhdGlvbjEeMBwGA1UEAxMVTWljcm9z
// SIG // b2Z0IENvcnBvcmF0aW9uMIICIjANBgkqhkiG9w0BAQEF
// SIG // AAOCAg8AMIICCgKCAgEAnhZbtyCbTJtA3AlBeRCh1Cof
// SIG // y9OmtScr8V9mlWmqcgAccAyDcMZkktDEeTm6r1+EyoWF
// SIG // 9iHO/hzYTY8WYO1CVEzGpkQ3Jp0t0B2DnqKrIL3i9Zhk
// SIG // LLwalkThItrQXvD68Ca2HeLXn5XfNZGkNXJ287lLqLt3
// SIG // 7gBzbnSZwAluUqj5mRxeeuSI+48DHiT8VOSR7DwLP2Nd
// SIG // Wlj8SPOZFRFHnI3zjKSMeaE15zYvVJ8OwUr/0kq135Mg
// SIG // MhcqrvjzfcpiFi5jgD2gJyfkMRkWfQ+4ycuH2StEcTtR
// SIG // pT02o4fcYG8+0g0ngu9M/EaPJoDtyJqwg7+CnSc7U+XZ
// SIG // wonlVyzEsQqlopHys55qAmgKhubJHcpS+QhYvE0FSgEm
// SIG // 9kEdDI0tX6l9BaTpIIm7u/pthD846d+kpIGdU11XwDt4
// SIG // +QY0WU/1V2lktGZPnjZ/P0kH/FPy0UaZ7iV4ZDllQTSB
// SIG // quXsOhLCiEJuQ7Xq+TU0iifIFJaosAymdR7mkxFp9T5o
// SIG // DdGGBfWr/Hw03lWxD0HtOMr+O6PJWKZXRTNAfZFjnJCH
// SIG // NFPoVzQv/qZw1VIdn4zfibTGiyk0znIlzNhdLbdwm3Sj
// SIG // vnAppQs0roTfWnkNphhJ0GN791d1tebmlKWBC02Dk3k8
// SIG // A1ZGCVwmSv8zUV8VN/K0Pi8MSznkVTbxGIdibNJ7l9EC
// SIG // AwEAAaOCAb4wggG6MA4GA1UdDwEB/wQEAwIHgDAfBgNV
// SIG // HSUEGDAWBgorBgEEAYI3PQYBBggrBgEFBQcDAzAMBgNV
// SIG // HRMBAf8EAjAAMB0GA1UdDgQWBBSfMrW3QLbYu4n2imys
// SIG // bT8G75SYkjBUBgNVHREETTBLpEkwRzEtMCsGA1UECxMk
// SIG // TWljcm9zb2Z0IElyZWxhbmQgT3BlcmF0aW9ucyBMaW1p
// SIG // dGVkMRYwFAYDVQQFEw0yMzA4NjUrNTA2OTY1MB8GA1Ud
// SIG // IwQYMBaAFB6C3w7XjLPXAjSDDtqrrWW5r7jsMGoGA1Ud
// SIG // HwRjMGEwX6BdoFuGWWh0dHA6Ly93d3cubWljcm9zb2Z0
// SIG // LmNvbS9wa2lvcHMvY3JsL01pY3Jvc29mdCUyMFdpbmRv
// SIG // d3MlMjBDb2RlJTIwU2lnbmluZyUyMFBDQSUyMDIwMjQu
// SIG // Y3JsMHcGCCsGAQUFBwEBBGswaTBnBggrBgEFBQcwAoZb
// SIG // aHR0cDovL3d3dy5taWNyb3NvZnQuY29tL3BraW9wcy9j
// SIG // ZXJ0cy9NaWNyb3NvZnQlMjBXaW5kb3dzJTIwQ29kZSUy
// SIG // MFNpZ25pbmclMjBQQ0ElMjAyMDI0LmNydDANBgkqhkiG
// SIG // 9w0BAQwFAAOCAgEAmFhSMo035OTrzq8QPKAEto20uvz9
// SIG // Awyy4qmbMsunWPb34nfj9rmsLsoHqFcJLxqjDtFA1rrq
// SIG // bMvFUP+RcPhl38e5/QH76FYN9Kx5vPN7IlkPfxmmsgod
// SIG // tfZW3mq5Uc4sqk2aM+0obwNt30aCrNyPS5V1ljh9XeQn
// SIG // hbbsl9A+KEQVNaUEvoow0r/OPGYi8Ko4oEO1wWmIjzVU
// SIG // CPMTJJFXiHOgee+a1bMaixea0BTLl2YcFPgVxG1WuLZl
// SIG // QM2PYHj913Tj/i/zsFkFfN2eqaE/0VukDKpDaYH+z3N6
// SIG // Ehihk6a99gMByLrcJlmhGo/GrMg1IxQAcyQRugB/KboE
// SIG // 3+ONK+tbjZcOpg16aXzmVcrh7h/d7jc2iDb7lv2P8hGE
// SIG // g3U78ukp+RsFqxyjQNt1EdfAG7uwdrjng4Yk6uvaHj5i
// SIG // hAD44xzE0Aa2VF/lQcL/r+zCQa/ANLOM4PwGPgPy5jeb
// SIG // 3kKXAI04/R/tpihEKG0U1BygQ1tU9X12EG9SXVkFwyvS
// SIG // J+i8fBGljhMWJLQHHhn88QvTaAo8QVG/G2ukDkFzWqq8
// SIG // 0JQ8xsKsS7IgpTfh+oefKQXxRdjqEmi5YKYodFkX6e7E
// SIG // xnXbKemo2wAF+1UiP1t9qNhuymgyHNY4qJOuAZwUaHsL
// SIG // SpzZtzctLpZieiICGQOQzgMU/bT7RLTYcB5obIcxghsD
// SIG // MIIa/wIBATB2MF8xCzAJBgNVBAYTAlVTMR4wHAYDVQQK
// SIG // ExVNaWNyb3NvZnQgQ29ycG9yYXRpb24xMDAuBgNVBAMT
// SIG // J01pY3Jvc29mdCBXaW5kb3dzIENvZGUgU2lnbmluZyBQ
// SIG // Q0EgMjAyNAITMwAAASJsBjOj0VK23QAAAAABIjANBglg
// SIG // hkgBZQMEAgEFAKCBrjAZBgkqhkiG9w0BCQMxDAYKKwYB
// SIG // BAGCNwIBBDAcBgorBgEEAYI3AgELMQ4wDAYKKwYBBAGC
// SIG // NwIBFTAvBgkqhkiG9w0BCQQxIgQgtBHu4tLh5jMf6meW
// SIG // RELN+EmiTGeRWdHxyjbjDqxsOMMwQgYKKwYBBAGCNwIB
// SIG // DDE0MDKgFIASAE0AaQBjAHIAbwBzAG8AZgB0oRqAGGh0
// SIG // dHA6Ly93d3cubWljcm9zb2Z0LmNvbTANBgkqhkiG9w0B
// SIG // AQEFAASCAgCLuA001mpA1AjAS2BhbLQSJM5mPjR/xO1a
// SIG // BzH+y4j3+qY5PtEOHZpP0Kjt5QZeF42J72YQA36I4lh3
// SIG // Km7zpGJAyR/pDHCFDyLpeik2wrlgTx+R/zFamPXROwbV
// SIG // MXy604jwl8O2c4JQR+BDk/gDpH+N6EQQnJndk8niZt8D
// SIG // hZZU1ayxMhzgWKFl6epI/n5Ad5/rejl0df8gscnlqfj6
// SIG // RlbHDRO0KHELBFRbRn601aU7Asn0VZJvvTwWez8N/7on
// SIG // xI4kddJnUpWLW75eDT6xXfHT94CM5KTLAvWCnZCFavLV
// SIG // jdrJOOGmgZMOCDxcuJ+QzVD3eSNr6z7Q8kSU1V2WL8gh
// SIG // 1frYIAyqlG3R8as6uiNezuyHvAofRo26Qm4QQtJxxXx2
// SIG // dFCh2pej3vlIW749xfJEGD2AkDErogq3aU+zLGQ+eZtl
// SIG // dgiU1cbjPgYUI0IYt3jDVN67cveSqR5I2oZMusXD+QaP
// SIG // LltS+Ix6u4J1Im75TdpUy3XzNQjCmlxj8arcJO8j5d3d
// SIG // WXiTqwfYaF6za5YzAntxHHuD1TGtFGmsbl60/Qqs86Ij
// SIG // uZM4ebHEna2hszGuQpfCQkP+dcwwjeNz6LrMri7jLuPB
// SIG // igk2k+mJEOJQFIYfrH8TMHyKdUJsIiY7yjTSLyCXIhNF
// SIG // l+XsXHGbLdxfuyJmoCS+Ily+sCngsAkdHaGCF60wghep
// SIG // BgorBgEEAYI3AwMBMYIXmTCCF5UGCSqGSIb3DQEHAqCC
// SIG // F4YwgheCAgEDMQ8wDQYJYIZIAWUDBAIBBQAwggFaBgsq
// SIG // hkiG9w0BCRABBKCCAUkEggFFMIIBQQIBAQYKKwYBBAGE
// SIG // WQoDATAxMA0GCWCGSAFlAwQCAQUABCDUO7RAFWdijuP+
// SIG // dQN20/6qzVakRljmuKSn2NyhUfrPDgIGaev5+ty0GBMy
// SIG // MDI2MDUyMjIyNDkwOC44OTJaMASAAgH0oIHZpIHWMIHT
// SIG // MQswCQYDVQQGEwJVUzETMBEGA1UECBMKV2FzaGluZ3Rv
// SIG // bjEQMA4GA1UEBxMHUmVkbW9uZDEeMBwGA1UEChMVTWlj
// SIG // cm9zb2Z0IENvcnBvcmF0aW9uMS0wKwYDVQQLEyRNaWNy
// SIG // b3NvZnQgSXJlbGFuZCBPcGVyYXRpb25zIExpbWl0ZWQx
// SIG // JzAlBgNVBAsTHm5TaGllbGQgVFNTIEVTTjo0MzFBLTA1
// SIG // RTAtRDk0NzElMCMGA1UEAxMcTWljcm9zb2Z0IFRpbWUt
// SIG // U3RhbXAgU2VydmljZaCCEfswggcoMIIFEKADAgECAhMz
// SIG // AAACHUvAkoc4hX45AAEAAAIdMA0GCSqGSIb3DQEBCwUA
// SIG // MHwxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5n
// SIG // dG9uMRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVN
// SIG // aWNyb3NvZnQgQ29ycG9yYXRpb24xJjAkBgNVBAMTHU1p
// SIG // Y3Jvc29mdCBUaW1lLVN0YW1wIFBDQSAyMDEwMB4XDTI1
// SIG // MDgxNDE4NDgzM1oXDTI2MTExMzE4NDgzM1owgdMxCzAJ
// SIG // BgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAw
// SIG // DgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNyb3Nv
// SIG // ZnQgQ29ycG9yYXRpb24xLTArBgNVBAsTJE1pY3Jvc29m
// SIG // dCBJcmVsYW5kIE9wZXJhdGlvbnMgTGltaXRlZDEnMCUG
// SIG // A1UECxMeblNoaWVsZCBUU1MgRVNOOjQzMUEtMDVFMC1E
// SIG // OTQ3MSUwIwYDVQQDExxNaWNyb3NvZnQgVGltZS1TdGFt
// SIG // cCBTZXJ2aWNlMIICIjANBgkqhkiG9w0BAQEFAAOCAg8A
// SIG // MIICCgKCAgEAorSgaAA8oOl4ph574zw29egUN8DDepRH
// SIG // LX8FM1zHNJmXG6KrSqUKwzcKafopuYdPTETTCvb9aJfE
// SIG // SuAU0iGNUFI/D6R0kvdfpe2oPX+E3sbTQvGi4JPH5qdI
// SIG // YUaJ45V/4bqe8eNvbWzpC+ZKjH193DeiI1XAI918JoQm
// SIG // BhlEXo/Ton1721luZJgincsf5LjMY3jX84WyXUSX3dsS
// SIG // 7h/7xVI+w1yjg7pa+0y3o/me2Tsv6UJUdSTQap5ORGSf
// SIG // CnclnP1z3IiiWIWr3Vo7aIPWsgJzq3m5GxpxUHCQk8qz
// SIG // Uhk50y/uB+LGE3WIK2C77iy9iFsSfSLUnyMEzGRDW9mX
// SIG // HT4PH7Ozz6CHqQEiNvwcHqlvlCh1pHQh1NXQSAqOoVBs
// SIG // 5mi6easf6yxWTfe5DrR79503r8pU6VqC2Y9XMRU4wH9Q
// SIG // bYXYsIUZ33Jmndy22W1LBDAbxBPQHCBlncGDU3BgdhVU
// SIG // VLe80mggFO98FdkWho67w4kPdCTRkvdvkY8PrQYE/nQj
// SIG // HXCa0g7LcMttZb6ejMHfQ+tUWXv6+nZ4Ynkr2OkaxclF
// SIG // Cw4RIYNMWD26AWbQj/WEdzga18fKtw66L5gzXPza6jFB
// SIG // fPJeKE3H8QAuwpirmH4ms+5nUjNNQOmNgqJn0U1+3Yn7
// SIG // ClswD79YN0r3fdbYBMDApBZJpNlK7q7HXRsCAwEAAaOC
// SIG // AUkwggFFMB0GA1UdDgQWBBSEWfBxNEamZtXm8gl92Yq8
// SIG // 0jfxXTAfBgNVHSMEGDAWgBSfpxVdAF5iXYP05dJlpxtT
// SIG // NRnpcjBfBgNVHR8EWDBWMFSgUqBQhk5odHRwOi8vd3d3
// SIG // Lm1pY3Jvc29mdC5jb20vcGtpb3BzL2NybC9NaWNyb3Nv
// SIG // ZnQlMjBUaW1lLVN0YW1wJTIwUENBJTIwMjAxMCgxKS5j
// SIG // cmwwbAYIKwYBBQUHAQEEYDBeMFwGCCsGAQUFBzAChlBo
// SIG // dHRwOi8vd3d3Lm1pY3Jvc29mdC5jb20vcGtpb3BzL2Nl
// SIG // cnRzL01pY3Jvc29mdCUyMFRpbWUtU3RhbXAlMjBQQ0El
// SIG // MjAyMDEwKDEpLmNydDAMBgNVHRMBAf8EAjAAMBYGA1Ud
// SIG // JQEB/wQMMAoGCCsGAQUFBwMIMA4GA1UdDwEB/wQEAwIH
// SIG // gDANBgkqhkiG9w0BAQsFAAOCAgEAkdweB4yxvLspLKq0
// SIG // D+miyD4Q0EcxVFpNZuJxiR54gWRkeTDDuymNeB03Jhls
// SIG // BpbwSYJ5uZSgDBCvwHED2VL8lJpFlOprJzxsXWC2NTfA
// SIG // +O+PO5Fk5jw6LHh6jeBADDEdQAx3Hqi7Zm0JwvQ93z5f
// SIG // 6dtxkm29WqOcHYXRXfAQwy1hSrLXyfeblqR66jpP/9n0
// SIG // fCkWU4ggsUjQpQ2Ngj1DV09J4Y3y7p9Nd81+Xs6qYo++
// SIG // 7RKm8qiB/5NDeigOLjlAeFgiEXIRUJW+mJyqpQw+OORl
// SIG // aqcFjR8Hu0G+/7bMdek68YX+kPpDBk7Ue+I/xgiYJ1xc
// SIG // DRBn/vczLtN72+RIlD4UgXYLuBSCk//pDEPX5z39Cr+r
// SIG // kc6E4Y28FPk4BhloAyvp628P4xfElQY8TcxraUbZShyp
// SIG // ocE6ny95D1K1BkltZmrHVKCxmglnuOlM15NKIrXFlXCz
// SIG // dqpCtIwQ417wNAVF/QDPvzzbumPdTi6fb0tLbScYobV6
// SIG // zvbBsMsKEME4Tj1b9oIXC8dybJq4nbboEXYpRwi1QAbp
// SIG // SNrn+PxGW9uf1q63FnMJu4gm3Oh63njW/iVf723quzyH
// SIG // rSijWMgY0HiRiHQi0Jyu0h8MdhRUp7mxbmLQckPiOFwA
// SIG // lIaUN/k725y/aLWpkRU6fqmLlEOyH5WpyLd23AYy9r8v
// SIG // +Qoba6swggdxMIIFWaADAgECAhMzAAAAFcXna54Cm0mZ
// SIG // AAAAAAAVMA0GCSqGSIb3DQEBCwUAMIGIMQswCQYDVQQG
// SIG // EwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UE
// SIG // BxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENv
// SIG // cnBvcmF0aW9uMTIwMAYDVQQDEylNaWNyb3NvZnQgUm9v
// SIG // dCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgMjAxMDAeFw0y
// SIG // MTA5MzAxODIyMjVaFw0zMDA5MzAxODMyMjVaMHwxCzAJ
// SIG // BgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9uMRAw
// SIG // DgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNyb3Nv
// SIG // ZnQgQ29ycG9yYXRpb24xJjAkBgNVBAMTHU1pY3Jvc29m
// SIG // dCBUaW1lLVN0YW1wIFBDQSAyMDEwMIICIjANBgkqhkiG
// SIG // 9w0BAQEFAAOCAg8AMIICCgKCAgEA5OGmTOe0ciELeaLL
// SIG // 1yR5vQ7VgtP97pwHB9KpbE51yMo1V/YBf2xK4OK9uT4X
// SIG // YDP/XE/HZveVU3Fa4n5KWv64NmeFRiMMtY0Tz3cywBAY
// SIG // 6GB9alKDRLemjkZrBxTzxXb1hlDcwUTIcVxRMTegCjhu
// SIG // je3XD9gmU3w5YQJ6xKr9cmmvHaus9ja+NSZk2pg7uhp7
// SIG // M62AW36MEBydUv626GIl3GoPz130/o5Tz9bshVZN7928
// SIG // jaTjkY+yOSxRnOlwaQ3KNi1wjjHINSi947SHJMPgyY9+
// SIG // tVSP3PoFVZhtaDuaRr3tpK56KTesy+uDRedGbsoy1cCG
// SIG // MFxPLOJiss254o2I5JasAUq7vnGpF1tnYN74kpEeHT39
// SIG // IM9zfUGaRnXNxF803RKJ1v2lIH1+/NmeRd+2ci/bfV+A
// SIG // utuqfjbsNkz2K26oElHovwUDo9Fzpk03dJQcNIIP8BDy
// SIG // t0cY7afomXw/TNuvXsLz1dhzPUNOwTM5TI4CvEJoLhDq
// SIG // hFFG4tG9ahhaYQFzymeiXtcodgLiMxhy16cg8ML6EgrX
// SIG // Y28MyTZki1ugpoMhXV8wdJGUlNi5UPkLiWHzNgY1GIRH
// SIG // 29wb0f2y1BzFa/ZcUlFdEtsluq9QBXpsxREdcu+N+VLE
// SIG // hReTwDwV2xo3xwgVGD94q0W29R6HXtqPnhZyacaue7e3
// SIG // PmriLq0CAwEAAaOCAd0wggHZMBIGCSsGAQQBgjcVAQQF
// SIG // AgMBAAEwIwYJKwYBBAGCNxUCBBYEFCqnUv5kxJq+gpE8
// SIG // RjUpzxD/LwTuMB0GA1UdDgQWBBSfpxVdAF5iXYP05dJl
// SIG // pxtTNRnpcjBcBgNVHSAEVTBTMFEGDCsGAQQBgjdMg30B
// SIG // ATBBMD8GCCsGAQUFBwIBFjNodHRwOi8vd3d3Lm1pY3Jv
// SIG // c29mdC5jb20vcGtpb3BzL0RvY3MvUmVwb3NpdG9yeS5o
// SIG // dG0wEwYDVR0lBAwwCgYIKwYBBQUHAwgwGQYJKwYBBAGC
// SIG // NxQCBAweCgBTAHUAYgBDAEEwCwYDVR0PBAQDAgGGMA8G
// SIG // A1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAU1fZWy4/o
// SIG // olxiaNE9lJBb186aGMQwVgYDVR0fBE8wTTBLoEmgR4ZF
// SIG // aHR0cDovL2NybC5taWNyb3NvZnQuY29tL3BraS9jcmwv
// SIG // cHJvZHVjdHMvTWljUm9vQ2VyQXV0XzIwMTAtMDYtMjMu
// SIG // Y3JsMFoGCCsGAQUFBwEBBE4wTDBKBggrBgEFBQcwAoY+
// SIG // aHR0cDovL3d3dy5taWNyb3NvZnQuY29tL3BraS9jZXJ0
// SIG // cy9NaWNSb29DZXJBdXRfMjAxMC0wNi0yMy5jcnQwDQYJ
// SIG // KoZIhvcNAQELBQADggIBAJ1VffwqreEsH2cBMSRb4Z5y
// SIG // S/ypb+pcFLY+TkdkeLEGk5c9MTO1OdfCcTY/2mRsfNB1
// SIG // OW27DzHkwo/7bNGhlBgi7ulmZzpTTd2YurYeeNg2Lpyp
// SIG // glYAA7AFvonoaeC6Ce5732pvvinLbtg/SHUB2RjebYIM
// SIG // 9W0jVOR4U3UkV7ndn/OOPcbzaN9l9qRWqveVtihVJ9Ak
// SIG // vUCgvxm2EhIRXT0n4ECWOKz3+SmJw7wXsFSFQrP8DJ6L
// SIG // GYnn8AtqgcKBGUIZUnWKNsIdw2FzLixre24/LAl4FOmR
// SIG // sqlb30mjdAy87JGA0j3mSj5mO0+7hvoyGtmW9I/2kQH2
// SIG // zsZ0/fZMcm8Qq3UwxTSwethQ/gpY3UA8x1RtnWN0SCyx
// SIG // TkctwRQEcb9k+SS+c23Kjgm9swFXSVRk2XPXfx5bRAGO
// SIG // WhmRaw2fpCjcZxkoJLo4S5pu+yFUa2pFEUep8beuyOiJ
// SIG // Xk+d0tBMdrVXVAmxaQFEfnyhYWxz/gq77EFmPWn9y8FB
// SIG // SX5+k77L+DvktxW/tM4+pTFRhLy/AsGConsXHRWJjXD+
// SIG // 57XQKBqJC4822rpM+Zv/Cuk0+CQ1ZyvgDbjmjJnW4SLq
// SIG // 8CdCPSWU5nR0W2rRnj7tfqAxM328y+l7vzhwRNGQ8cir
// SIG // Ooo6CGJ/2XBjU02N7oJtpQUQwXEGahC0HVUzWLOhcGby
// SIG // oYIDVjCCAj4CAQEwggEBoYHZpIHWMIHTMQswCQYDVQQG
// SIG // EwJVUzETMBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UE
// SIG // BxMHUmVkbW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENv
// SIG // cnBvcmF0aW9uMS0wKwYDVQQLEyRNaWNyb3NvZnQgSXJl
// SIG // bGFuZCBPcGVyYXRpb25zIExpbWl0ZWQxJzAlBgNVBAsT
// SIG // Hm5TaGllbGQgVFNTIEVTTjo0MzFBLTA1RTAtRDk0NzEl
// SIG // MCMGA1UEAxMcTWljcm9zb2Z0IFRpbWUtU3RhbXAgU2Vy
// SIG // dmljZaIjCgEBMAcGBSsOAwIaAxUAuoO+BKbfXzqyfi9G
// SIG // LEdWHkCLeT+ggYMwgYCkfjB8MQswCQYDVQQGEwJVUzET
// SIG // MBEGA1UECBMKV2FzaGluZ3RvbjEQMA4GA1UEBxMHUmVk
// SIG // bW9uZDEeMBwGA1UEChMVTWljcm9zb2Z0IENvcnBvcmF0
// SIG // aW9uMSYwJAYDVQQDEx1NaWNyb3NvZnQgVGltZS1TdGFt
// SIG // cCBQQ0EgMjAxMDANBgkqhkiG9w0BAQsFAAIFAO26t7Ew
// SIG // IhgPMjAyNjA1MjIxMTA4MzNaGA8yMDI2MDUyMzExMDgz
// SIG // M1owdDA6BgorBgEEAYRZCgQBMSwwKjAKAgUA7bq3sQIB
// SIG // ADAHAgEAAgIE2zAHAgEAAgISUzAKAgUA7bwJMQIBADA2
// SIG // BgorBgEEAYRZCgQCMSgwJjAMBgorBgEEAYRZCgMCoAow
// SIG // CAIBAAIDB6EgoQowCAIBAAIDAYagMA0GCSqGSIb3DQEB
// SIG // CwUAA4IBAQCtgkqoN2ZLlOFEZ7tuvpcT45bDpNT5gWVa
// SIG // eXlSlAUPa8yfyC5iL+hZPk12tMS83TMQ+38hNyw7N/AF
// SIG // NRkVoSwpecYiPUiV4qyKxO1gx0MBGrfxP5ECAyQHSED+
// SIG // K+imqTJqMwh2JAeaBzYZoPTgUycB1Ekyh7TI05Tr/Ei+
// SIG // bMpdybjgl9lY1f5F1NvpFJWSN3DxKH89XCLrC1F6hbcF
// SIG // wmHYkRQZuKfhfVFXPoKYYlzjhmPUV/j2rNIeyhMUgH/Y
// SIG // jf285pw8XFDW0/KbGvSGC0HX4rsuEJKN7CUkDomzthqu
// SIG // YeAgIt/PO5klezE0aTfKlt0h8/fnFpwtmpyi79DCBXbB
// SIG // MYIEDTCCBAkCAQEwgZMwfDELMAkGA1UEBhMCVVMxEzAR
// SIG // BgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1JlZG1v
// SIG // bmQxHjAcBgNVBAoTFU1pY3Jvc29mdCBDb3Jwb3JhdGlv
// SIG // bjEmMCQGA1UEAxMdTWljcm9zb2Z0IFRpbWUtU3RhbXAg
// SIG // UENBIDIwMTACEzMAAAIdS8CShziFfjkAAQAAAh0wDQYJ
// SIG // YIZIAWUDBAIBBQCgggFKMBoGCSqGSIb3DQEJAzENBgsq
// SIG // hkiG9w0BCRABBDAvBgkqhkiG9w0BCQQxIgQgSQoyNpiO
// SIG // uwKJBBUGNC1sdhnT0pygfbcpXZYzoTMUATQwgfoGCyqG
// SIG // SIb3DQEJEAIvMYHqMIHnMIHkMIG9BCCxtpXMXEiLJzrq
// SIG // M77ep4rTNwrMOj6gpWN9hZvpj5QFUTCBmDCBgKR+MHwx
// SIG // CzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpXYXNoaW5ndG9u
// SIG // MRAwDgYDVQQHEwdSZWRtb25kMR4wHAYDVQQKExVNaWNy
// SIG // b3NvZnQgQ29ycG9yYXRpb24xJjAkBgNVBAMTHU1pY3Jv
// SIG // c29mdCBUaW1lLVN0YW1wIFBDQSAyMDEwAhMzAAACHUvA
// SIG // koc4hX45AAEAAAIdMCIEIPnekflDIgxK8Po4TMbzwqmp
// SIG // GVwRSOfaE+nf5hDSSLk1MA0GCSqGSIb3DQEBCwUABIIC
// SIG // AFHNs+rSEbEoeCLJZveYaQdj+P8YtWxAnoIoblXelTWa
// SIG // MDrmLGp6qnsIo6cjyCl1BAaRRR542HmA5nt/1/SRVwEG
// SIG // H27FiErd32M6nqrRaudZWRStrMEe4u4Naec5hzxspru8
// SIG // Glqu0WebYoHTt1xXsaffnR3IvAG9wuOx72ISnUVd7i6x
// SIG // ApbfUXoLG48kjxzlsu0xU+LhcMGVM2vG39uG8T3HIA3R
// SIG // EXuMvSnieT8Y2NaCe0kQfM4GpSqt0ZBX1QT2Tjcz1eES
// SIG // BRnsu4G9pU3dwNvK0A9+iF8qi8eGtJQTtMvrMg5m8tsG
// SIG // XR99R/ynui+nc5BV/z3Cy/r0xdTm5MtRVAQmSI17pykd
// SIG // V9UTDT+bQPrWjbnd2f1nRzN8UsJZTP4mmNdUBlithHGO
// SIG // qdw8Z6jP7IEo/doZIX+sWocCm3xedeO6IcPz4OTqFO59
// SIG // plPBH9whftOnW5nvLsqXXTax/lCB1EI+vxIszDHplOYu
// SIG // kWdrxTFg3nmkC2KE4rBo9NJxbfpGucAsTVVIqMxViqW/
// SIG // kuLvHGpLFZqMzlShm9Cgqizhe+L6LSO/M31ENsMopyQf
// SIG // jp7rWuWLhvU2WuOz8i0xAtjI8hTEk84B1t81Ru0KOtBs
// SIG // ID3cta1HIFnCJFpGZ/qJ0NnUPKqkRB13LJqKyWZ46mM8
// SIG // 90v6gYDjImfo1I3s8bmNshZt
// SIG // End signature block