/*! For license information please see main.js.LICENSE.txt */ (()=>{var e={9082:(e,t,n)=>{var r={};e.exports=r,r.themes={};var o=n(9023),i=r.styles=n(7404),s=Object.defineProperties,a=new RegExp(/[\r\n]+/g);r.supportsColor=n(9411).supportsColor,void 0===r.enabled&&(r.enabled=!1!==r.supportsColor()),r.enable=function(){r.enabled=!0},r.disable=function(){r.enabled=!1},r.stripColors=r.strip=function(e){return(""+e).replace(/\x1B\[\d+m/g,"")},r.stylize=function(e,t){if(!r.enabled)return e+"";var n=i[t];return!n&&t in r?r[t](e):n.open+e+n.close};var l=/[|\\{}()[\]^$+*?.]/g;function u(e){var t=function e(){return f.apply(e,arguments)};return t._styles=e,t.__proto__=d,t}var c,h=(c={},i.grey=i.gray,Object.keys(i).forEach((function(e){i[e].closeRe=new RegExp(function(e){if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(l,"\\$&")}(i[e].close),"g"),c[e]={get:function(){return u(this._styles.concat(e))}}})),c),d=s((function(){}),h);function f(){var e=Array.prototype.slice.call(arguments).map((function(e){return null!=e&&e.constructor===String?e:o.inspect(e)})).join(" ");if(!r.enabled||!e)return e;for(var t=-1!=e.indexOf("\n"),n=this._styles,s=n.length;s--;){var l=i[n[s]];e=l.open+e.replace(l.closeRe,l.open)+l.close,t&&(e=e.replace(a,(function(e){return l.close+e+l.open})))}return e}r.setTheme=function(e){if("string"!=typeof e)for(var t in e)!function(t){r[t]=function(n){if("object"==typeof e[t]){var o=n;for(var i in e[t])o=r[e[t][i]](o);return o}return r[e[t]](n)}}(t);else console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));")};var p=function(e,t){var n=t.split("");return(n=n.map(e)).join("")};for(var g in r.trap=n(4715),r.zalgo=n(9891),r.maps={},r.maps.america=n(6606)(r),r.maps.zebra=n(2678)(r),r.maps.rainbow=n(4860)(r),r.maps.random=n(4131)(r),r.maps)!function(e){r[e]=function(t){return p(r.maps[e],t)}}(g);s(r,function(){var e={};return Object.keys(h).forEach((function(t){e[t]={get:function(){return u([t])}}})),e}())},4715:e=>{e.exports=function(e,t){var n="";e=(e=e||"Run the trap, drop the bass").split("");var r={a:["@","Ą","Ⱥ","Ʌ","Δ","Λ","Д"],b:["ß","Ɓ","Ƀ","ɮ","β","฿"],c:["©","Ȼ","Ͼ"],d:["Ð","Ɗ","Ԁ","ԁ","Ԃ","ԃ"],e:["Ë","ĕ","Ǝ","ɘ","Σ","ξ","Ҽ","੬"],f:["Ӻ"],g:["ɢ"],h:["Ħ","ƕ","Ң","Һ","Ӈ","Ԋ"],i:["༏"],j:["Ĵ"],k:["ĸ","Ҡ","Ӄ","Ԟ"],l:["Ĺ"],m:["ʍ","Ӎ","ӎ","Ԡ","ԡ","൩"],n:["Ñ","ŋ","Ɲ","Ͷ","Π","Ҋ"],o:["Ø","õ","ø","Ǿ","ʘ","Ѻ","ם","۝","๏"],p:["Ƿ","Ҏ"],q:["্"],r:["®","Ʀ","Ȑ","Ɍ","ʀ","Я"],s:["§","Ϟ","ϟ","Ϩ"],t:["Ł","Ŧ","ͳ"],u:["Ʊ","Ս"],v:["ט"],w:["Ш","Ѡ","Ѽ","൰"],x:["Ҳ","Ӿ","Ӽ","ӽ"],y:["¥","Ұ","Ӌ"],z:["Ƶ","ɀ"]};return e.forEach((function(e){e=e.toLowerCase();var t=r[e]||[" "],o=Math.floor(Math.random()*t.length);n+=void 0!==r[e]?r[e][o]:e})),n}},9891:e=>{e.exports=function(e,t){e=e||" he is here ";var n={up:["̍","̎","̄","̅","̿","̑","̆","̐","͒","͗","͑","̇","̈","̊","͂","̓","̈","͊","͋","͌","̃","̂","̌","͐","̀","́","̋","̏","̒","̓","̔","̽","̉","ͣ","ͤ","ͥ","ͦ","ͧ","ͨ","ͩ","ͪ","ͫ","ͬ","ͭ","ͮ","ͯ","̾","͛","͆","̚"],down:["̖","̗","̘","̙","̜","̝","̞","̟","̠","̤","̥","̦","̩","̪","̫","̬","̭","̮","̯","̰","̱","̲","̳","̹","̺","̻","̼","ͅ","͇","͈","͉","͍","͎","͓","͔","͕","͖","͙","͚","̣"],mid:["̕","̛","̀","́","͘","̡","̢","̧","̨","̴","̵","̶","͜","͝","͞","͟","͠","͢","̸","̷","͡"," ҉"]},r=[].concat(n.up,n.down,n.mid);function o(e){return Math.floor(Math.random()*e)}function i(e){var t=!1;return r.filter((function(n){t=n===e})),t}return function(e,t){var r,s,a="";for(s in(t=t||{}).up=void 0===t.up||t.up,t.mid=void 0===t.mid||t.mid,t.down=void 0===t.down||t.down,t.size=void 0!==t.size?t.size:"maxi",e=e.split(""))if(!i(s)){switch(a+=e[s],r={up:0,down:0,mid:0},t.size){case"mini":r.up=o(8),r.mid=o(2),r.down=o(8);break;case"maxi":r.up=o(16)+3,r.mid=o(4)+1,r.down=o(64)+3;break;default:r.up=o(8)+1,r.mid=o(6)/2,r.down=o(8)+1}var l=["up","mid","down"];for(var u in l)for(var c=l[u],h=0;h<=r[c];h++)t[c]&&(a+=n[c][o(n[c].length)])}return a}(e,t)}},6606:e=>{e.exports=function(e){return function(t,n,r){if(" "===t)return t;switch(n%3){case 0:return e.red(t);case 1:return e.white(t);case 2:return e.blue(t)}}}},4860:e=>{e.exports=function(e){var t=["red","yellow","green","blue","magenta"];return function(n,r,o){return" "===n?n:e[t[r++%t.length]](n)}}},4131:e=>{e.exports=function(e){var t=["underline","inverse","grey","yellow","red","green","blue","white","cyan","magenta","brightYellow","brightRed","brightGreen","brightBlue","brightWhite","brightCyan","brightMagenta"];return function(n,r,o){return" "===n?n:e[t[Math.round(Math.random()*(t.length-2))]](n)}}},2678:e=>{e.exports=function(e){return function(t,n,r){return n%2==0?t:e.inverse(t)}}},7404:e=>{var t={};e.exports=t;var n={reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],grey:[90,39],brightRed:[91,39],brightGreen:[92,39],brightYellow:[93,39],brightBlue:[94,39],brightMagenta:[95,39],brightCyan:[96,39],brightWhite:[97,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgGray:[100,49],bgGrey:[100,49],bgBrightRed:[101,49],bgBrightGreen:[102,49],bgBrightYellow:[103,49],bgBrightBlue:[104,49],bgBrightMagenta:[105,49],bgBrightCyan:[106,49],bgBrightWhite:[107,49],blackBG:[40,49],redBG:[41,49],greenBG:[42,49],yellowBG:[43,49],blueBG:[44,49],magentaBG:[45,49],cyanBG:[46,49],whiteBG:[47,49]};Object.keys(n).forEach((function(e){var r=n[e],o=t[e]=[];o.open="["+r[0]+"m",o.close="["+r[1]+"m"}))},9111:e=>{"use strict";e.exports=function(e,t){var n=(t=t||process.argv).indexOf("--"),r=/^-{1,2}/.test(e)?"":"--",o=t.indexOf(r+e);return-1!==o&&(-1===n||o{"use strict";var r=n(857),o=n(9111),i=process.env,s=void 0;function a(e){var t=function(e){if(!1===s)return 0;if(o("color=16m")||o("color=full")||o("color=truecolor"))return 3;if(o("color=256"))return 2;if(e&&!e.isTTY&&!0!==s)return 0;var t=r.release().split(".");return Number(process.versions.node.split(".")[0])>=8&&Number(t[0])>=10&&Number(t[2])>=10586?Number(t[2])>=14931?3:2:1}(e);return function(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}(t)}o("no-color")||o("no-colors")||o("color=false")?s=!1:(o("color")||o("colors")||o("color=true")||o("color=always"))&&(s=!0),"FORCE_COLOR"in i&&(s=0===i.FORCE_COLOR.length||0!==parseInt(i.FORCE_COLOR,10)),e.exports={supportsColor:a,stdout:a(process.stdout),stderr:a(process.stderr)}},1555:(e,t,n)=>{var r=n(9082);e.exports=r},8561:e=>{var t=[],n=[],r=function(){};function o(e){return!~t.indexOf(e)&&(t.push(e),!0)}function i(e){r=e}function s(e){for(var n=[],r=0;r{e.exports=n(6127)},6127:(e,t,n)=>{var r=n(8561)((function e(t,n){return(n=n||{}).namespace=t,n.prod=!0,n.dev=!1,n.force||e.force?e.yep(n):e.nope(n)}));e.exports=r},3273:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(0,i.isAsync)(e)?function(...t){const n=t.pop();return a(e.apply(this,t),n)}:(0,r.default)((function(t,n){var r;try{r=e.apply(this,t)}catch(e){return n(e)}if(r&&"function"==typeof r.then)return a(r,n);n(null,r)}))};var r=s(n(787)),o=s(n(7080)),i=n(4933);function s(e){return e&&e.__esModule?e:{default:e}}function a(e,t){return e.then((e=>{l(t,null,e)}),(e=>{l(t,e&&e.message?e:new Error(e))}))}function l(e,t,n){try{e(t,n)}catch(e){(0,o.default)((e=>{throw e}),e)}}e.exports=t.default},9243:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=c(n(7307)),o=c(n(1484)),i=c(n(3124)),s=c(n(8668)),a=c(n(638)),l=c(n(4933)),u=c(n(673));function c(e){return e&&e.__esModule?e:{default:e}}function h(e,t,n){n=(0,s.default)(n);var r=0,i=0,{length:l}=e,u=!1;function c(e,t){!1===e&&(u=!0),!0!==u&&(e?n(e):++i!==l&&t!==o.default||n(null))}for(0===l&&n(null);r{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=s(n(6610)),o=s(n(4933)),i=s(n(673));function s(e){return e&&e.__esModule?e:{default:e}}t.default=(0,i.default)((function(e,t,n,i){return(0,r.default)(t)(e,(0,o.default)(n),i)}),4),e.exports=t.default},1018:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(n(3124)),o=i(n(673));function i(e){return e&&e.__esModule?e:{default:e}}t.default=(0,o.default)((function(e,t,n){return(0,r.default)(e,1,t,n)}),3),e.exports=t.default},1265:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a(n(9243)),o=a(n(7089)),i=a(n(4933)),s=a(n(673));function a(e){return e&&e.__esModule?e:{default:e}}t.default=(0,s.default)((function(e,t,n){return(0,r.default)(e,(0,o.default)((0,i.default)(t)),n)}),3),e.exports=t.default},4038:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,r){let i=!1,s=!1,a=!1,l=0,u=0;function c(){l>=t||a||i||(a=!0,e.next().then((({value:e,done:t})=>{if(!s&&!i){if(a=!1,t)return i=!0,void(l<=0&&r(null));l++,n(e,u,h),u++,c()}})).catch(d))}function h(e,t){if(l-=1,!s)return e?d(e):!1===e?(i=!0,void(s=!0)):t===o.default||i&&l<=0?(i=!0,r(null)):void c()}function d(e){s||(a=!1,i=!0,r(e))}c()};var r,o=(r=n(1484))&&r.__esModule?r:{default:r};e.exports=t.default},673:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t=e.length){if(!t)throw new Error("arity is undefined");return function(...n){return"function"==typeof n[t-1]?e.apply(this,n):new Promise(((r,o)=>{n[t-1]=(e,...t)=>{if(e)return o(e);r(t.length>1?t:t[0])},e.apply(this,n)}))}},e.exports=t.default},1484:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={},e.exports=t.default},6610:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=u(n(8668)),o=u(n(6471)),i=u(n(638)),s=n(4933),a=u(n(4038)),l=u(n(1484));function u(e){return e&&e.__esModule?e:{default:e}}t.default=e=>(t,n,u)=>{if(u=(0,r.default)(u),e<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!t)return u(null);if((0,s.isAsyncGenerator)(t))return(0,a.default)(t,e,n,u);if((0,s.isAsyncIterable)(t))return(0,a.default)(t[Symbol.asyncIterator](),e,n,u);var c=(0,o.default)(t),h=!1,d=!1,f=0,p=!1;function g(e,t){if(!d)if(f-=1,e)h=!0,u(e);else if(!1===e)h=!0,d=!0;else{if(t===l.default||h&&f<=0)return h=!0,u(null);p||m()}}function m(){for(p=!0;f{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e[Symbol.iterator]&&e[Symbol.iterator]()},e.exports=t.default},787:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(...t){var n=t.pop();return e.call(this,t,n)}},e.exports=t.default},7307:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e&&"number"==typeof e.length&&e.length>=0&&e.length%1==0},e.exports=t.default},6471:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if((0,r.default)(e))return function(e){var t=-1,n=e.length;return function(){return++t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){function t(...t){if(null!==e){var n=e;e=null,n.apply(this,t)}}return Object.assign(t,e),t},e.exports=t.default},638:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(...t){if(null===e)throw new Error("Callback was already called.");var n=e;e=null,n.apply(this,t)}},e.exports=t.default},8926:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=s(n(7307)),o=s(n(4933)),i=s(n(673));function s(e){return e&&e.__esModule?e:{default:e}}t.default=(0,i.default)(((e,t,n)=>{var i=(0,r.default)(t)?[]:{};e(t,((e,t,n)=>{(0,o.default)(e)(((e,...r)=>{r.length<2&&([r]=r),i[t]=r,n(e)}))}),(e=>n(e,i)))}),3),e.exports=t.default},7080:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fallback=s,t.wrap=a;var n,r=t.hasQueueMicrotask="function"==typeof queueMicrotask&&queueMicrotask,o=t.hasSetImmediate="function"==typeof setImmediate&&setImmediate,i=t.hasNextTick="object"==typeof process&&"function"==typeof process.nextTick;function s(e){setTimeout(e,0)}function a(e){return(t,...n)=>e((()=>t(...n)))}n=r?queueMicrotask:o?setImmediate:i?process.nextTick:s,t.default=a(n)},7089:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return(t,n,r)=>e(t,r)},e.exports=t.default},4933:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAsyncIterable=t.isAsyncGenerator=t.isAsync=void 0;var r,o=(r=n(3273))&&r.__esModule?r:{default:r};function i(e){return"AsyncFunction"===e[Symbol.toStringTag]}t.default=function(e){if("function"!=typeof e)throw new Error("expected a function");return i(e)?(0,o.default)(e):e},t.isAsync=i,t.isAsyncGenerator=function(e){return"AsyncGenerator"===e[Symbol.toStringTag]},t.isAsyncIterable=function(e){return"function"==typeof e[Symbol.asyncIterator]}},2382:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){return(0,r.default)(o.default,e,t)};var r=i(n(8926)),o=i(n(1018));function i(e){return e&&e.__esModule?e:{default:e}}e.exports=t.default},2334:function(e,t){var n,r;void 0===(r="function"==typeof(n=function(){var e=/^v?(?:\d+)(\.(?:[x*]|\d+)(\.(?:[x*]|\d+)(\.(?:[x*]|\d+))?(?:-[\da-z\-]+(?:\.[\da-z\-]+)*)?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i;function t(e){var t,n,r=e.replace(/^v/,"").replace(/\+.*$/,""),o=(n="-",-1===(t=r).indexOf(n)?t.length:t.indexOf(n)),i=r.substring(0,o).split(".");return i.push(r.substring(o+1)),i}function n(e){return isNaN(Number(e))?e:Number(e)}function r(t){if("string"!=typeof t)throw new TypeError("Invalid argument expected string");if(!e.test(t))throw new Error("Invalid argument not valid semver ('"+t+"' received)")}function o(e,o){[e,o].forEach(r);for(var i=t(e),s=t(o),a=0;au)return 1;if(u>l)return-1}var c=i[i.length-1],h=s[s.length-1];if(c&&h){var d=c.split(".").map(n),f=h.split(".").map(n);for(a=0;af[a])return 1;if(f[a]>d[a])return-1}}else if(c||h)return c?-1:1;return 0}var i=[">",">=","=","<","<="],s={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1]};return o.validate=function(t){return"string"==typeof t&&e.test(t)},o.compare=function(e,t,n){!function(e){if("string"!=typeof e)throw new TypeError("Invalid operator type, expected string but got "+typeof e);if(-1===i.indexOf(e))throw new TypeError("Invalid operator, expected one of "+i.join("|"))}(n);var r=o(e,t);return s[n].indexOf(r)>-1},o})?n.apply(t,[]):n)||(e.exports=r)},3575:(e,t,n)=>{"use strict";t.bz=t.tC=t.Ym=t.op=t.Ds=t.XT=void 0;var r=n(2909);Object.defineProperty(t,"XT",{enumerable:!0,get:function(){return r.initializeNotifications}}),Object.defineProperty(t,"Ds",{enumerable:!0,get:function(){return r.showNotification}}),Object.defineProperty(t,"op",{enumerable:!0,get:function(){return r.terminateNotifications}}),Object.defineProperty(t,"Ym",{enumerable:!0,get:function(){return r.getNotificationsPermission}}),Object.defineProperty(t,"tC",{enumerable:!0,get:function(){return r.requestNotificationsPermission}});n(8026),n(1196);var o=n(6646);Object.defineProperty(t,"bz",{enumerable:!0,get:function(){return o.onNotificationEvent}})},2909:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.closeNotification=t.showNotification=t.requestNotificationsPermission=t.getNotificationsPermission=t.terminateNotifications=t.initializeNotifications=void 0;const r=n(8026),o=n(6646),i=n(1962);let s;function a(){return void 0!==s||(s=(0,r.supportsNotifications)()?n(2385):null),s}t.initializeNotifications=e=>a()?.initializeNotifications(o.notificationCallback,e),t.terminateNotifications=()=>a()?.terminateNotifications(),t.getNotificationsPermission=()=>a()?.getNotificationsPermission(),t.requestNotificationsPermission=()=>a()?.requestNotificationsPermission(),t.showNotification=async(...e)=>{const t=(0,i.v4)();try{await(a()?.showNotification(t,...e))}catch(e){return null}return t},t.closeNotification=(...e)=>a()?.closeNotification(...e)},6646:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.onNotificationEvent=t.notificationCallback=void 0;let n=null;t.notificationCallback=(...e)=>n?.(...e),t.onNotificationEvent=e=>{n=e}},1196:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getNotificationSettingsUrl=function(){return(0,r.supportsNotifications)()?"ms-settings:notifications":null};const r=n(8026)},8026:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.supportsNotifications=function(){return function(){const e=r.release().split("."),t=parseInt(e[0],10),n=e.length>=3?parseInt(e[2],10):15063;return t>10||10===t&&n>=15063}()},t.supportsNotificationsPermissionRequest=function(){return!1};const r=n(9671).__importStar(n(857))},1962:(e,t,n)=>{"use strict";n.r(t),n.d(t,{NIL:()=>E,parse:()=>y,stringify:()=>h,v1:()=>m,v3:()=>v,v4:()=>w,v5:()=>_,validate:()=>u,version:()=>S});var r=n(6982),o=n.n(r);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 l=/^(?:[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,u=function(e){return"string"==typeof e&&l.test(e)},c=[];for(let e=0;e<256;++e)c.push((e+256).toString(16).substr(1));const h=function(e,t=0){const n=(c[e[t+0]]+c[e[t+1]]+c[e[t+2]]+c[e[t+3]]+"-"+c[e[t+4]]+c[e[t+5]]+"-"+c[e[t+6]]+c[e[t+7]]+"-"+c[e[t+8]]+c[e[t+9]]+"-"+c[e[t+10]]+c[e[t+11]]+c[e[t+12]]+c[e[t+13]]+c[e[t+14]]+c[e[t+15]]).toLowerCase();if(!u(n))throw TypeError("Stringified UUID is invalid");return n};let d,f,p=0,g=0;const m=function(e,t,n){let r=t&&n||0;const o=t||new Array(16);let i=(e=e||{}).node||d,s=void 0!==e.clockseq?e.clockseq:f;if(null==i||null==s){const t=e.random||(e.rng||a)();null==i&&(i=d=[1|t[0],t[1],t[2],t[3],t[4],t[5]]),null==s&&(s=f=16383&(t[6]<<8|t[7]))}let l=void 0!==e.msecs?e.msecs:Date.now(),u=void 0!==e.nsecs?e.nsecs:g+1;const c=l-p+(u-g)/1e4;if(c<0&&void 0===e.clockseq&&(s=s+1&16383),(c<0||l>p)&&void 0===e.nsecs&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");p=l,g=u,f=s,l+=122192928e5;const m=(1e4*(268435455&l)+u)%4294967296;o[r++]=m>>>24&255,o[r++]=m>>>16&255,o[r++]=m>>>8&255,o[r++]=255&m;const y=l/4294967296*1e4&268435455;o[r++]=y>>>8&255,o[r++]=255&y,o[r++]=y>>>24&15|16,o[r++]=y>>>16&255,o[r++]=s>>>8|128,o[r++]=255&s;for(let e=0;e<6;++e)o[r+e]=i[e];return t||h(o)},y=function(e){if(!u(e))throw TypeError("Invalid UUID");let t;const n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n};function b(e,t,n){function r(e,r,o,i){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));const t=[];for(let n=0;n{"use strict";const r=n(6928),o=n(4157),i=n(1125),s=n(4672);e.exports=function(e){const t=o.app||o.remote.app,n=o.screen||o.remote.screen;let a,l,u;const c=100,h=Object.assign({file:"window-state.json",path:t.getPath("userData"),maximize:!0,fullScreen:!0},e),d=r.join(h.path,h.file);function f(){return a&&Number.isInteger(a.x)&&Number.isInteger(a.y)&&Number.isInteger(a.width)&&a.width>0&&Number.isInteger(a.height)&&a.height>0}function p(){const e=n.getPrimaryDisplay().bounds;a={width:h.defaultWidth||800,height:h.defaultHeight||600,x:0,y:0,displayBounds:e}}function g(e){if(e=e||l)try{const t=e.getBounds();(function(e){return!e.isMaximized()&&!e.isMinimized()&&!e.isFullScreen()})(e)&&(a.x=t.x,a.y=t.y,a.width=t.width,a.height=t.height),a.isMaximized=e.isMaximized(),a.isFullScreen=e.isFullScreen(),a.displayBounds=n.getDisplayMatching(t).bounds}catch(e){}}function m(e){e&&g(e);try{s.sync(r.dirname(d)),i.writeFileSync(d,a)}catch(e){}}function y(){clearTimeout(u),u=setTimeout(g,c)}function b(){g()}function v(){w(),m()}function w(){l&&(l.removeListener("resize",y),l.removeListener("move",y),clearTimeout(u),l.removeListener("close",b),l.removeListener("closed",v),l=null)}try{a=i.readFileSync(d)}catch(e){}return a&&(f()||a.isMaximized||a.isFullScreen)?f()&&a.displayBounds&&function(){if(!n.getAllDisplays().some((e=>{return t=e.bounds,a.x>=t.x&&a.y>=t.y&&a.x+a.width<=t.x+t.width&&a.y+a.height<=t.y+t.height;var t})))p()}():a=null,a=Object.assign({width:h.defaultWidth||800,height:h.defaultHeight||600},a),{get x(){return a.x},get y(){return a.y},get width(){return a.width},get height(){return a.height},get displayBounds(){return a.displayBounds},get isMaximized(){return a.isMaximized},get isFullScreen(){return a.isFullScreen},saveState:m,unmanage:w,manage:function(e){h.maximize&&a.isMaximized&&e.maximize(),h.fullScreen&&a.isFullScreen&&e.setFullScreen(!0),e.on("resize",y),e.on("move",y),e.on("close",b),e.on("closed",v),l=e},resetStateToDefault:p}}},4548:function(e,t,n){(function(){var t,r;t=null,e.exports=function(){function e(){var e,t,n;for(this.disposables=new Set,t=0,n=arguments.length;t0?this.handlersByEventName[e]=r:delete this.handlersByEventName[e]}},e.prototype.emit=function(e,t){var n,r,o,i,s;if(r=null!=(s=this.handlersByEventName)?s[e]:void 0)for(o=0,i=r.length;o{"use strict";n.r(t),n.d(t,{assign:()=>c,default:()=>A,defaultI18n:()=>p,format:()=>M,parse:()=>k,setGlobalDateI18n:()=>m,setGlobalDateMasks:()=>R});var r=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,o="[1-9]\\d?",i="\\d\\d",s="[^\\s]+",a=/\[([^]*?)\]/gm;function l(e,t){for(var n=[],r=0,o=e.length;r-1?o:null}};function c(e){for(var t=[],n=1;n3?0:(e-e%10!=10?1:0)*e%10]}},g=c({},p),m=function(e){return g=c(g,e)},y=function(e){return e.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},b=function(e,t){for(void 0===t&&(t=2),e=String(e);e.length0?"-":"+")+b(100*Math.floor(Math.abs(t)/60)+Math.abs(t)%60,4)},Z:function(e){var t=e.getTimezoneOffset();return(t>0?"-":"+")+b(Math.floor(Math.abs(t)/60),2)+":"+b(Math.abs(t)%60,2)}},w=function(e){return+e-1},_=[null,o],E=[null,s],S=["isPm",s,function(e,t){var n=e.toLowerCase();return n===t.amPm[0]?0:n===t.amPm[1]?1:null}],O=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(e){var t=(e+"").match(/([+-]|\d\d)/gi);if(t){var n=60*+t[1]+parseInt(t[2],10);return"+"===t[0]?n:-n}return 0}],C={D:["day",o],DD:["day",i],Do:["day",o+s,function(e){return parseInt(e,10)}],M:["month",o,w],MM:["month",i,w],YY:["year",i,function(e){var t=+(""+(new Date).getFullYear()).substr(0,2);return+(""+(+e>68?t-1:t)+e)}],h:["hour",o,void 0,"isPm"],hh:["hour",i,void 0,"isPm"],H:["hour",o],HH:["hour",i],m:["minute",o],mm:["minute",i],s:["second",o],ss:["second",i],YYYY:["year","\\d{4}"],S:["millisecond","\\d",function(e){return 100*+e}],SS:["millisecond",i,function(e){return 10*+e}],SSS:["millisecond","\\d{3}"],d:_,dd:_,ddd:E,dddd:E,MMM:["month",s,u("monthNamesShort")],MMMM:["month",s,u("monthNames")],a:S,A:S,ZZ:O,Z:O},x={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},R=function(e){return c(x,e)},M=function(e,t,n){if(void 0===t&&(t=x.default),void 0===n&&(n={}),"number"==typeof e&&(e=new Date(e)),"[object Date]"!==Object.prototype.toString.call(e)||isNaN(e.getTime()))throw new Error("Invalid Date pass to format");t=x[t]||t;var o=[];t=t.replace(a,(function(e,t){return o.push(t),"@@@"}));var i=c(c({},g),n);return(t=t.replace(r,(function(t){return v[t](e,i)}))).replace(/@@@/g,(function(){return o.shift()}))};function k(e,t,n){if(void 0===n&&(n={}),"string"!=typeof t)throw new Error("Invalid format in fecha parse");if(t=x[t]||t,e.length>1e3)return null;var o={year:(new Date).getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},i=[],s=[],l=t.replace(a,(function(e,t){return s.push(y(t)),"@@@"})),u={},h={};l=y(l).replace(r,(function(e){var t=C[e],n=t[0],r=t[1],o=t[3];if(u[n])throw new Error("Invalid format. "+n+" specified twice in format");return u[n]=!0,o&&(h[o]=!0),i.push(t),"("+r+")"})),Object.keys(h).forEach((function(e){if(!u[e])throw new Error("Invalid format. "+e+" is required in specified format")})),l=l.replace(/@@@/g,(function(){return s.shift()}));var d=e.match(new RegExp(l,"i"));if(!d)return null;for(var f=c(c({},g),n),p=1;p{"use strict";var t=Object.prototype.toString;e.exports=function(e){if("string"==typeof e.displayName&&e.constructor.name)return e.displayName;if("string"==typeof e.name&&e.name)return e.name;if("object"==typeof e&&e.constructor&&"string"==typeof e.constructor.name)return e.constructor.name;var n=e.toString(),r=t.call(e).slice(8,-1);return(n="Function"===r?n.substring(n.indexOf("(")+1,n.indexOf(")")):r)||"anonymous"}},4943:(e,t,n)=>{"use strict";var r=n(9896);e.exports=function(e){if(null===e||"object"!=typeof e)return e;if(e instanceof Object)var t={__proto__:e.__proto__};else t=Object.create(null);return Object.getOwnPropertyNames(e).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))})),t}(r)},8111:(e,t,n)=>{var r,o,i=n(9896),s=n(2714),a=n(9539),l=[],u=n(9023),c=function(){};function h(e){s(e),e.gracefulify=h,e.FileReadStream=p,e.FileWriteStream=g,e.createReadStream=function(e,t){return new p(e,t)},e.createWriteStream=function(e,t){return new g(e,t)};var t=e.readFile;e.readFile=function(e,n,r){return"function"==typeof n&&(r=n,n=null),function e(n,r,o){return t(n,r,(function(t){!t||"EMFILE"!==t.code&&"ENFILE"!==t.code?("function"==typeof o&&o.apply(this,arguments),f()):d([e,[n,r,o]])}))}(e,n,r)};var n=e.writeFile;e.writeFile=function(e,t,r,o){return"function"==typeof r&&(o=r,r=null),function e(t,r,o,i){return n(t,r,o,(function(n){!n||"EMFILE"!==n.code&&"ENFILE"!==n.code?("function"==typeof i&&i.apply(this,arguments),f()):d([e,[t,r,o,i]])}))}(e,t,r,o)};var r=e.appendFile;r&&(e.appendFile=function(e,t,n,o){return"function"==typeof n&&(o=n,n=null),function e(t,n,o,i){return r(t,n,o,(function(r){!r||"EMFILE"!==r.code&&"ENFILE"!==r.code?("function"==typeof i&&i.apply(this,arguments),f()):d([e,[t,n,o,i]])}))}(e,t,n,o)});var o=e.readdir;function i(t){return o.apply(e,t)}if(e.readdir=function(e,t,n){var r=[e];return"function"!=typeof t?r.push(t):n=t,r.push((function(e,t){t&&t.sort&&t.sort(),!e||"EMFILE"!==e.code&&"ENFILE"!==e.code?("function"==typeof n&&n.apply(this,arguments),f()):d([i,[r]])})),i(r)},"v0.8"===process.version.substr(0,4)){var l=a(e);p=l.ReadStream,g=l.WriteStream}var u=e.ReadStream;p.prototype=Object.create(u.prototype),p.prototype.open=function(){var e=this;y(e.path,e.flags,e.mode,(function(t,n){t?(e.autoClose&&e.destroy(),e.emit("error",t)):(e.fd=n,e.emit("open",n),e.read())}))};var c=e.WriteStream;function p(e,t){return this instanceof p?(u.apply(this,arguments),this):p.apply(Object.create(p.prototype),arguments)}function g(e,t){return this instanceof g?(c.apply(this,arguments),this):g.apply(Object.create(g.prototype),arguments)}g.prototype=Object.create(c.prototype),g.prototype.open=function(){var e=this;y(e.path,e.flags,e.mode,(function(t,n){t?(e.destroy(),e.emit("error",t)):(e.fd=n,e.emit("open",n))}))},e.ReadStream=p,e.WriteStream=g;var m=e.open;function y(e,t,n,r){return"function"==typeof n&&(r=n,n=null),function e(t,n,r,o){return m(t,n,r,(function(i,s){!i||"EMFILE"!==i.code&&"ENFILE"!==i.code?("function"==typeof o&&o.apply(this,arguments),f()):d([e,[t,n,r,o]])}))}(e,t,n,r)}return e.open=y,e}function d(e){c("ENQUEUE",e[0].name,e[1]),l.push(e)}function f(){var e=l.shift();e&&(c("RETRY",e[0].name,e[1]),e[0].apply(null,e[1]))}u.debuglog?c=u.debuglog("gfs4"):/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&(c=function(){var e=u.format.apply(u,arguments);e="GFS4: "+e.split(/\n/).join("\nGFS4: "),console.error(e)}),/\bgfs4\b/i.test(process.env.NODE_DEBUG||"")&&process.on("exit",(function(){c(l),n(2613).equal(l.length,0)})),e.exports=h(n(4943)),process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH&&(e.exports=h(i)),e.exports.close=i.close=(r=i.close,function(e,t){return r.call(i,e,(function(e){e||f(),"function"==typeof t&&t.apply(this,arguments)}))}),e.exports.closeSync=i.closeSync=(o=i.closeSync,function(e){var t=o.apply(i,arguments);return f(),t})},9539:(e,t,n)=>{var r=n(2203).Stream;e.exports=function(e){return{ReadStream:function t(n,o){if(!(this instanceof t))return new t(n,o);r.call(this);var i=this;this.path=n,this.fd=null,this.readable=!0,this.paused=!1,this.flags="r",this.mode=438,this.bufferSize=65536,o=o||{};for(var s=Object.keys(o),a=0,l=s.length;athis.end)throw new Error("start must be <= end");this.pos=this.start}null===this.fd?e.open(this.path,this.flags,this.mode,(function(e,t){if(e)return i.emit("error",e),void(i.readable=!1);i.fd=t,i.emit("open",t),i._read()})):process.nextTick((function(){i._read()}))},WriteStream:function t(n,o){if(!(this instanceof t))return new t(n,o);r.call(this),this.path=n,this.fd=null,this.writable=!0,this.flags="w",this.encoding="binary",this.mode=438,this.bytesWritten=0,o=o||{};for(var i=Object.keys(o),s=0,a=i.length;s= zero");this.pos=this.start}this.busy=!1,this._queue=[],null===this.fd&&(this._open=e.open,this._queue.push([this._open,this.path,this.flags,this.mode,void 0]),this.flush())}}}},2714:(e,t,n)=>{var r=n(4943),o=n(9140),i=process.cwd,s=null,a=process.env.GRACEFUL_FS_PLATFORM||"win32";process.cwd=function(){return s||(s=i.call(process)),s};try{process.cwd()}catch(e){}var l=process.chdir;function u(e){return e?function(t,n,o){return e.call(r,t,n,(function(e){g(e)&&(e=null),o&&o.apply(this,arguments)}))}:e}function c(e){return e?function(t,n){try{return e.call(r,t,n)}catch(e){if(!g(e))throw e}}:e}function h(e){return e?function(t,n,o,i){return e.call(r,t,n,o,(function(e){g(e)&&(e=null),i&&i.apply(this,arguments)}))}:e}function d(e){return e?function(t,n,o){try{return e.call(r,t,n,o)}catch(e){if(!g(e))throw e}}:e}function f(e){return e?function(t,n){return e.call(r,t,(function(e,t){if(!t)return n.apply(this,arguments);t.uid<0&&(t.uid+=4294967296),t.gid<0&&(t.gid+=4294967296),n&&n.apply(this,arguments)}))}:e}function p(e){return e?function(t){var n=e.call(r,t);return n.uid<0&&(n.uid+=4294967296),n.gid<0&&(n.gid+=4294967296),n}:e}function g(e){return!e||"ENOSYS"===e.code||!(process.getuid&&0===process.getuid()||"EINVAL"!==e.code&&"EPERM"!==e.code)}process.chdir=function(e){s=null,l.call(process,e)},e.exports=function(e){var t,n,r;o.hasOwnProperty("O_SYMLINK")&&process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)&&function(e){e.lchmod=function(t,n,r){e.open(t,o.O_WRONLY|o.O_SYMLINK,n,(function(t,o){t?r&&r(t):e.fchmod(o,n,(function(t){e.close(o,(function(e){r&&r(t||e)}))}))}))},e.lchmodSync=function(t,n){var r,i=e.openSync(t,o.O_WRONLY|o.O_SYMLINK,n),s=!0;try{r=e.fchmodSync(i,n),s=!1}finally{if(s)try{e.closeSync(i)}catch(e){}else e.closeSync(i)}return r}}(e),e.lutimes||function(e){o.hasOwnProperty("O_SYMLINK")?(e.lutimes=function(t,n,r,i){e.open(t,o.O_SYMLINK,(function(t,o){t?i&&i(t):e.futimes(o,n,r,(function(t){e.close(o,(function(e){i&&i(t||e)}))}))}))},e.lutimesSync=function(t,n,r){var i,s=e.openSync(t,o.O_SYMLINK),a=!0;try{i=e.futimesSync(s,n,r),a=!1}finally{if(a)try{e.closeSync(s)}catch(e){}else e.closeSync(s)}return i}):(e.lutimes=function(e,t,n,r){r&&process.nextTick(r)},e.lutimesSync=function(){})}(e),e.chown=h(e.chown),e.fchown=h(e.fchown),e.lchown=h(e.lchown),e.chmod=u(e.chmod),e.fchmod=u(e.fchmod),e.lchmod=u(e.lchmod),e.chownSync=d(e.chownSync),e.fchownSync=d(e.fchownSync),e.lchownSync=d(e.lchownSync),e.chmodSync=c(e.chmodSync),e.fchmodSync=c(e.fchmodSync),e.lchmodSync=c(e.lchmodSync),e.stat=f(e.stat),e.fstat=f(e.fstat),e.lstat=f(e.lstat),e.statSync=p(e.statSync),e.fstatSync=p(e.fstatSync),e.lstatSync=p(e.lstatSync),e.lchmod||(e.lchmod=function(e,t,n){n&&process.nextTick(n)},e.lchmodSync=function(){}),e.lchown||(e.lchown=function(e,t,n,r){r&&process.nextTick(r)},e.lchownSync=function(){}),"win32"===a&&(e.rename=(t=e.rename,function(n,r,o){var i=Date.now(),s=0;t(n,r,(function a(l){if(l&&("EACCES"===l.code||"EPERM"===l.code)&&Date.now()-i<6e4)return setTimeout((function(){e.stat(r,(function(e,i){e&&"ENOENT"===e.code?t(n,r,a):o(l)}))}),s),void(s<100&&(s+=10));o&&o(l)}))})),e.read=(r=e.read,function(t,n,o,i,s,a){var l;if(a&&"function"==typeof a){var u=0;l=function(c,h,d){if(c&&"EAGAIN"===c.code&&u<10)return u++,r.call(e,t,n,o,i,s,l);a.apply(this,arguments)}}return r.call(e,t,n,o,i,s,l)}),e.readSync=(n=e.readSync,function(t,r,o,i,s){for(var a=0;;)try{return n.call(e,t,r,o,i,s)}catch(e){if("EAGAIN"===e.code&&a<10){a++;continue}throw e}})}},8361:(e,t,n)=>{try{var r=n(9023);if("function"!=typeof r.inherits)throw"";e.exports=r.inherits}catch(t){e.exports=n(4562)}},4562:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},7752:e=>{"use strict";const t=e=>null!==e&&"object"==typeof e&&"function"==typeof e.pipe;t.writable=e=>t(e)&&!1!==e.writable&&"function"==typeof e._write&&"object"==typeof e._writableState,t.readable=e=>t(e)&&!1!==e.readable&&"function"==typeof e._read&&"object"==typeof e._readableState,t.duplex=e=>t.writable(e)&&t.readable(e),t.transform=e=>t.duplex(e)&&"function"==typeof e._transform,e.exports=t},1125:(e,t,n)=>{var r;try{r=n(8111)}catch(e){r=n(9896)}function o(e,t){var n,r="\n";return"object"==typeof t&&null!==t&&(t.spaces&&(n=t.spaces),t.EOL&&(r=t.EOL)),JSON.stringify(e,t?t.replacer:null,n).replace(/\n/g,r)+r}function i(e){return Buffer.isBuffer(e)&&(e=e.toString("utf8")),e.replace(/^\uFEFF/,"")}var s={readFile:function(e,t,n){null==n&&(n=t,t={}),"string"==typeof t&&(t={encoding:t});var o=(t=t||{}).fs||r,s=!0;"throws"in t&&(s=t.throws),o.readFile(e,t,(function(r,o){if(r)return n(r);var a;o=i(o);try{a=JSON.parse(o,t?t.reviver:null)}catch(t){return s?(t.message=e+": "+t.message,n(t)):n(null,null)}n(null,a)}))},readFileSync:function(e,t){"string"==typeof(t=t||{})&&(t={encoding:t});var n=t.fs||r,o=!0;"throws"in t&&(o=t.throws);try{var s=n.readFileSync(e,t);return s=i(s),JSON.parse(s,t.reviver)}catch(t){if(o)throw t.message=e+": "+t.message,t;return null}},writeFile:function(e,t,n,i){null==i&&(i=n,n={});var s=(n=n||{}).fs||r,a="";try{a=o(t,n)}catch(e){return void(i&&i(e,null))}s.writeFile(e,a,n,i)},writeFileSync:function(e,t,n){var i=(n=n||{}).fs||r,s=o(t,n);return i.writeFileSync(e,s,n)}};e.exports=s},6185:(e,t,n)=>{var r=n(5957).Symbol;e.exports=r},6188:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n{var r=n(6185),o=n(491),i=n(7422),s=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?o(e):i(e)}},2479:(e,t,n)=>{var r=n(6185),o=n(6188),i=n(1113),s=n(2162),a=r?r.prototype:void 0,l=a?a.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(i(t))return o(t,e)+"";if(s(t))return l?l.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},5760:e=>{var t="object"==typeof global&&global&&global.Object===Object&&global;e.exports=t},491:(e,t,n)=>{var r=n(6185),o=Object.prototype,i=o.hasOwnProperty,s=o.toString,a=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,a),n=e[a];try{e[a]=void 0;var r=!0}catch(e){}var o=s.call(e);return r&&(t?e[a]=n:delete e[a]),o}},7422:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5957:(e,t,n)=>{var r=n(5760),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},1630:e=>{e.exports=function(e){return function(){return e}}},5248:(e,t,n)=>{var r=n(2350),o=/[\\^$.*+?()[\]{}|]/g,i=RegExp(o.source);e.exports=function(e){return(e=r(e))&&i.test(e)?e.replace(o,"\\$&"):e}},1113:e=>{var t=Array.isArray;e.exports=t},658:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},2162:(e,t,n)=>{var r=n(3296),o=n(658);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},294:e=>{e.exports=function(){}},2350:(e,t,n)=>{var r=n(2479);e.exports=function(e){return null==e?"":r(e)}},9162:(e,t,n)=>{"use strict";const r=n(7604);e.exports=r((e=>(e.message=`\t${e.message}`,e)))},2945:(e,t,n)=>{"use strict";const{Colorizer:r}=n(1624),{Padder:o}=n(768),{configs:i,MESSAGE:s}=n(835);class a{constructor(e={}){e.levels||(e.levels=i.cli.levels),this.colorizer=new r(e),this.padder=new o(e),this.options=e}transform(e,t){return this.colorizer.transform(this.padder.transform(e,t),t),e[s]=`${e.level}:${e.message}`,e}}e.exports=e=>new a(e),e.exports.Format=a},1624:(e,t,n)=>{"use strict";const r=n(1555),{LEVEL:o,MESSAGE:i}=n(835);r.enabled=!0;const s=/\s+/;class a{constructor(e={}){e.colors&&this.addColors(e.colors),this.options=e}static addColors(e){const t=Object.keys(e).reduce(((t,n)=>(t[n]=s.test(e[n])?e[n].split(s):e[n],t)),{});return a.allColors=Object.assign({},a.allColors||{},t),a.allColors}addColors(e){return a.addColors(e)}colorize(e,t,n){if(void 0===n&&(n=t),!Array.isArray(a.allColors[e]))return r[a.allColors[e]](n);for(let t=0,o=a.allColors[e].length;tnew a(e),e.exports.Colorizer=e.exports.Format=a},2526:(e,t,n)=>{"use strict";const r=n(7604);function o(e){if(e.every(i))return t=>{let n=t;for(let t=0;t{const t=r(o(e)),n=t();return n.Format=t.Format,n},e.exports.cascade=o},1752:(e,t,n)=>{"use strict";const r=n(7604),{LEVEL:o,MESSAGE:i}=n(835);e.exports=r(((e,{stack:t})=>{if(e instanceof Error){const n=Object.assign({},e,{level:e.level,[o]:e[o]||e.level,message:e.message,[i]:e[i]||e.message});return t&&(n.stack=e.stack),n}if(!(e.message instanceof Error))return e;const n=e.message;return Object.assign(e,n),e.message=n.message,e[i]=n.message,t&&(e.stack=n.stack),e}))},7604:e=>{"use strict";class t extends Error{constructor(e){super(`Format functions must be synchronous taking a two arguments: (info, opts)\nFound: ${e.toString().split("\n")[0]}\n`),Error.captureStackTrace(this,t)}}e.exports=e=>{if(e.length>2)throw new t(e);function n(e={}){this.options=e}function r(e){return new n(e)}return n.prototype.transform=e,r.Format=n,r}},2671:(e,t,n)=>{"use strict";const r=t.format=n(7604);function o(e,t){Object.defineProperty(r,e,{get:()=>t(),configurable:!0})}t.levels=n(5400),o("align",(function(){return n(9162)})),o("errors",(function(){return n(1752)})),o("cli",(function(){return n(2945)})),o("combine",(function(){return n(2526)})),o("colorize",(function(){return n(1624)})),o("json",(function(){return n(1345)})),o("label",(function(){return n(1797)})),o("logstash",(function(){return n(648)})),o("metadata",(function(){return n(3874)})),o("ms",(function(){return n(8223)})),o("padLevels",(function(){return n(768)})),o("prettyPrint",(function(){return n(4293)})),o("printf",(function(){return n(9572)})),o("simple",(function(){return n(9577)})),o("splat",(function(){return n(6115)})),o("timestamp",(function(){return n(459)})),o("uncolorize",(function(){return n(927)}))},1345:(e,t,n)=>{"use strict";const r=n(7604),{MESSAGE:o}=n(835),i=n(8588);function s(e,t){return"bigint"==typeof t?t.toString():t}e.exports=r(((e,t)=>{const n=i.configure(t);return e[o]=n(e,t.replacer||s,t.space),e}))},1797:(e,t,n)=>{"use strict";const r=n(7604);e.exports=r(((e,t)=>t.message?(e.message=`[${t.label}] ${e.message}`,e):(e.label=t.label,e)))},5400:(e,t,n)=>{"use strict";const{Colorizer:r}=n(1624);e.exports=e=>(r.addColors(e.colors||e),e)},648:(e,t,n)=>{"use strict";const r=n(7604),{MESSAGE:o}=n(835),i=n(8588);e.exports=r((e=>{const t={};return e.message&&(t["@message"]=e.message,delete e.message),e.timestamp&&(t["@timestamp"]=e.timestamp,delete e.timestamp),t["@fields"]=e,e[o]=i(t),e}))},3874:(e,t,n)=>{"use strict";const r=n(7604);e.exports=r(((e,t={})=>{let n="metadata";t.key&&(n=t.key);let r=[];return t.fillExcept||t.fillWith||(r.push("level"),r.push("message")),t.fillExcept&&(r=t.fillExcept),r.length>0?function(e,t,n){const r=t.reduce(((t,n)=>(t[n]=e[n],delete e[n],t)),{}),o=Object.keys(e).reduce(((t,n)=>(t[n]=e[n],delete e[n],t)),{});return Object.assign(e,r,{[n]:o}),e}(e,r,n):t.fillWith?function(e,t,n){return e[n]=t.reduce(((t,n)=>(t[n]=e[n],delete e[n],t)),{}),e}(e,t.fillWith,n):e}))},8223:function(e,t,n){"use strict";const r=n(7604),o=n(273);e.exports=r((e=>{const t=+new Date;return this.diff=t-(this.prevTime||t),this.prevTime=t,e.ms=`+${o(this.diff)}`,e}))},768:(e,t,n)=>{"use strict";const{configs:r,LEVEL:o,MESSAGE:i}=n(835);class s{constructor(e={levels:r.npm.levels}){this.paddings=s.paddingForLevels(e.levels,e.filler),this.options=e}static getLongestLevel(e){const t=Object.keys(e).map((e=>e.length));return Math.max(...t)}static paddingForLevel(e,t,n){const r=n+1-e.length,o=Math.floor(r/t.length);return`${t}${t.repeat(o)}`.slice(0,r)}static paddingForLevels(e,t=" "){const n=s.getLongestLevel(e);return Object.keys(e).reduce(((e,r)=>(e[r]=s.paddingForLevel(r,t,n),e)),{})}transform(e,t){return e.message=`${this.paddings[e[o]]}${e.message}`,e[i]&&(e[i]=`${this.paddings[e[o]]}${e[i]}`),e}}e.exports=e=>new s(e),e.exports.Padder=e.exports.Format=s},4293:(e,t,n)=>{"use strict";const r=n(9023).inspect,o=n(7604),{LEVEL:i,MESSAGE:s,SPLAT:a}=n(835);e.exports=o(((e,t={})=>{const n=Object.assign({},e);return delete n[i],delete n[s],delete n[a],e[s]=r(n,!1,t.depth||null,t.colorize),e}))},9572:(e,t,n)=>{"use strict";const{MESSAGE:r}=n(835);class o{constructor(e){this.template=e}transform(e){return e[r]=this.template(e),e}}e.exports=e=>new o(e),e.exports.Printf=e.exports.Format=o},9577:(e,t,n)=>{"use strict";const r=n(7604),{MESSAGE:o}=n(835),i=n(8588);e.exports=r((e=>{const t=i(Object.assign({},e,{level:void 0,message:void 0,splat:void 0})),n=e.padding&&e.padding[e.level]||"";return e[o]="{}"!==t?`${e.level}:${n} ${e.message} ${t}`:`${e.level}:${n} ${e.message}`,e}))},6115:(e,t,n)=>{"use strict";const r=n(9023),{SPLAT:o}=n(835),i=/%[scdjifoO%]/g,s=/%%/g;class a{constructor(e){this.options=e}_splat(e,t){const n=e.message,i=e[o]||e.splat||[],a=n.match(s),l=a&&a.length||0,u=t.length-l-i.length,c=u<0?i.splice(u,-1*u):[],h=c.length;if(h)for(let t=0;t1?n.splice(0):n,r=t.length;if(r)for(let n=0;nnew a(e)},459:(e,t,n)=>{"use strict";const r=n(1003),o=n(7604);e.exports=o(((e,t={})=>(t.format&&(e.timestamp="function"==typeof t.format?t.format():r.format(new Date,t.format)),e.timestamp||(e.timestamp=(new Date).toISOString()),t.alias&&(e[t.alias]=e.timestamp),e)))},927:(e,t,n)=>{"use strict";const r=n(1555),o=n(7604),{MESSAGE:i}=n(835);e.exports=o(((e,t)=>(!1!==t.level&&(e.level=r.strip(e.level)),!1!==t.message&&(e.message=r.strip(e.message)),!1!==t.raw&&e[i]&&(e[i]=r.strip(e[i])),e)))},9919:e=>{"use strict";function t(e){return"number"==typeof e||!!/^0x[0-9a-f]+$/i.test(e)||/^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(e)}function n(e,t){return"constructor"===t&&"function"==typeof e[t]||"__proto__"===t}e.exports=function(e,r){r||(r={});var o={bools:{},strings:{},unknownFn:null};"function"==typeof r.unknown&&(o.unknownFn=r.unknown),"boolean"==typeof r.boolean&&r.boolean?o.allBools=!0:[].concat(r.boolean).filter(Boolean).forEach((function(e){o.bools[e]=!0}));var i={};function s(e){return i[e].some((function(e){return o.bools[e]}))}Object.keys(r.alias||{}).forEach((function(e){i[e]=[].concat(r.alias[e]),i[e].forEach((function(t){i[t]=[e].concat(i[e].filter((function(e){return t!==e})))}))})),[].concat(r.string).filter(Boolean).forEach((function(e){o.strings[e]=!0,i[e]&&[].concat(i[e]).forEach((function(e){o.strings[e]=!0}))}));var a=r.default||{},l={_:[]};function u(e,t,r){for(var i=e,s=0;s{var r=n(6928),o=n(9896),i=parseInt("0777",8);function s(e,t,n,a){"function"==typeof t?(n=t,t={}):t&&"object"==typeof t||(t={mode:t});var l=t.mode,u=t.fs||o;void 0===l&&(l=i),a||(a=null);var c=n||function(){};e=r.resolve(e),u.mkdir(e,l,(function(n){if(!n)return c(null,a=a||e);if("ENOENT"===n.code){if(r.dirname(e)===e)return c(n);s(r.dirname(e),t,(function(n,r){n?c(n,r):s(e,t,c,r)}))}else u.stat(e,(function(e,t){e||!t.isDirectory()?c(n,a):c(null,a)}))}))}e.exports=s.mkdirp=s.mkdirP=s,s.sync=function e(t,n,s){n&&"object"==typeof n||(n={mode:n});var a=n.mode,l=n.fs||o;void 0===a&&(a=i),s||(s=null),t=r.resolve(t);try{l.mkdirSync(t,a),s=s||t}catch(o){if("ENOENT"===o.code)s=e(r.dirname(t),n,s),e(t,n,s);else{var u;try{u=l.statSync(t)}catch(e){throw o}if(!u.isDirectory())throw o}}return s}},273:e=>{var t=1e3,n=60*t,r=60*n,o=24*r,i=7*o;function s(e,t,n,r){var o=t>=1.5*n;return Math.round(e/n)+" "+r+(o?"s":"")}e.exports=function(e,a){a=a||{};var l,u,c=typeof e;if("string"===c&&e.length>0)return function(e){if(!((e=String(e)).length>100)){var s=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(s){var a=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*a;case"weeks":case"week":case"w":return a*i;case"days":case"day":case"d":return a*o;case"hours":case"hour":case"hrs":case"hr":case"h":return a*r;case"minutes":case"minute":case"mins":case"min":case"m":return a*n;case"seconds":case"second":case"secs":case"sec":case"s":return a*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return a;default:return}}}}(e);if("number"===c&&isFinite(e))return a.long?(l=e,(u=Math.abs(l))>=o?s(l,u,o,"day"):u>=r?s(l,u,r,"hour"):u>=n?s(l,u,n,"minute"):u>=t?s(l,u,t,"second"):l+" ms"):function(e){var i=Math.abs(e);return i>=o?Math.round(e/o)+"d":i>=r?Math.round(e/r)+"h":i>=n?Math.round(e/n)+"m":i>=t?Math.round(e/t)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},4283:(e,t,n)=>{"use strict";var r=n(5598);e.exports=function(e){var t,n=0;function o(){return n||(n=1,t=e.apply(this,arguments),e=null),t}return o.displayName=r(e),o}},393:e=>{"use strict";const t={};function n(e,n,r){r||(r=Error);class o extends r{constructor(e,t,r){super(function(e,t,r){return"string"==typeof n?n:n(e,t,r)}(e,t,r))}}o.prototype.name=r.name,o.prototype.code=e,t[e]=o}function r(e,t){if(Array.isArray(e)){const n=e.length;return e=e.map((e=>String(e))),n>2?`one of ${t} ${e.slice(0,n-1).join(", ")}, or `+e[n-1]:2===n?`one of ${t} ${e[0]} or ${e[1]}`:`of ${t} ${e[0]}`}return`of ${t} ${String(e)}`}n("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),n("ERR_INVALID_ARG_TYPE",(function(e,t,n){let o;var i;let s;if("string"==typeof t&&(i="not ",t.substr(0,4)===i)?(o="must not be",t=t.replace(/^not /,"")):o="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-9,n)===t}(e," argument"))s=`The ${e} ${o} ${r(t,"type")}`;else{s=`The "${e}" ${"number"!=typeof l&&(l=0),l+1>(a=e).length||-1===a.indexOf(".",l)?"argument":"property"} ${o} ${r(t,"type")}`}var a,l;return s+=". Received type "+typeof n,s}),TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.F=t},2750:(e,t,n)=>{"use strict";var r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=u;var o=n(1820),i=n(9276);n(8361)(u,o);for(var s=r(i.prototype),a=0;a{"use strict";e.exports=o;var r=n(266);function o(e){if(!(this instanceof o))return new o(e);r.call(this,e)}n(8361)(o,r),o.prototype._transform=function(e,t,n){n(null,e)}},1820:(e,t,n)=>{"use strict";var r;e.exports=O,O.ReadableState=S,n(4434).EventEmitter;var o,i=function(e,t){return e.listeners(t).length},s=n(7088),a=n(181).Buffer,l=global.Uint8Array||function(){},u=n(9023);o=u&&u.debuglog?u.debuglog("stream"):function(){};var c,h,d,f=n(1281),p=n(7472),g=n(3459).getHighWaterMark,m=n(393).F,y=m.ERR_INVALID_ARG_TYPE,b=m.ERR_STREAM_PUSH_AFTER_EOF,v=m.ERR_METHOD_NOT_IMPLEMENTED,w=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;n(8361)(O,s);var _=p.errorOrDestroy,E=["error","close","destroy","pause","resume"];function S(e,t,o){r=r||n(2750),e=e||{},"boolean"!=typeof o&&(o=t instanceof r),this.objectMode=!!e.objectMode,o&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=g(this,e,"readableHighWaterMark",o),this.buffer=new f,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(c||(c=n(7117).I),this.decoder=new c(e.encoding),this.encoding=e.encoding)}function O(e){if(r=r||n(2750),!(this instanceof O))return new O(e);var t=this instanceof r;this._readableState=new S(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),s.call(this)}function C(e,t,n,r,i){o("readableAddChunk",t);var s,u=e._readableState;if(null===t)u.reading=!1,function(e,t){if(o("onEofChunk"),!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.sync?k(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,A(e)))}}(e,u);else if(i||(s=function(e,t){var n,r;return r=t,a.isBuffer(r)||r instanceof l||"string"==typeof t||void 0===t||e.objectMode||(n=new y("chunk",["string","Buffer","Uint8Array"],t)),n}(u,t)),s)_(e,s);else if(u.objectMode||t&&t.length>0)if("string"==typeof t||u.objectMode||Object.getPrototypeOf(t)===a.prototype||(t=function(e){return a.from(e)}(t)),r)u.endEmitted?_(e,new w):x(e,u,t,!0);else if(u.ended)_(e,new b);else{if(u.destroyed)return!1;u.reading=!1,u.decoder&&!n?(t=u.decoder.write(t),u.objectMode||0!==t.length?x(e,u,t,!1):j(e,u)):x(e,u,t,!1)}else r||(u.reading=!1,j(e,u));return!u.ended&&(u.lengtht.highWaterMark&&(t.highWaterMark=function(e){return e>=R?e=R:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function k(e){var t=e._readableState;o("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(o("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(A,e))}function A(e){var t=e._readableState;o("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,D(e)}function j(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(T,e,t))}function T(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function N(e){o("readable nexttick read 0"),e.read(0)}function P(e,t){o("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),D(e),t.flowing&&!t.reading&&e.read(0)}function D(e){var t=e._readableState;for(o("flow",t.flowing);t.flowing&&null!==e.read(););}function $(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function F(e){var t=e._readableState;o("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(I,t,e))}function I(e,t){if(o("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function U(e,t){for(var n=0,r=e.length;n=t.highWaterMark:t.length>0)||t.ended))return o("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?F(this):k(this),null;if(0===(e=M(e,t))&&t.ended)return 0===t.length&&F(this),null;var r,i=t.needReadable;return o("need readable",i),(0===t.length||t.length-e0?$(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&F(this)),null!==r&&this.emit("data",r),r},O.prototype._read=function(e){_(this,new v("_read()"))},O.prototype.pipe=function(e,t){var n=this,r=this._readableState;switch(r.pipesCount){case 0:r.pipes=e;break;case 1:r.pipes=[r.pipes,e];break;default:r.pipes.push(e)}r.pipesCount+=1,o("pipe count=%d opts=%j",r.pipesCount,t);var s=t&&!1===t.end||e===process.stdout||e===process.stderr?p:a;function a(){o("onend"),e.end()}r.endEmitted?process.nextTick(s):n.once("end",s),e.on("unpipe",(function t(i,s){o("onunpipe"),i===n&&s&&!1===s.hasUnpiped&&(s.hasUnpiped=!0,o("cleanup"),e.removeListener("close",d),e.removeListener("finish",f),e.removeListener("drain",l),e.removeListener("error",h),e.removeListener("unpipe",t),n.removeListener("end",a),n.removeListener("end",p),n.removeListener("data",c),u=!0,!r.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}));var l=function(e){return function(){var t=e._readableState;o("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&i(e,"data")&&(t.flowing=!0,D(e))}}(n);e.on("drain",l);var u=!1;function c(t){o("ondata");var i=e.write(t);o("dest.write",i),!1===i&&((1===r.pipesCount&&r.pipes===e||r.pipesCount>1&&-1!==U(r.pipes,e))&&!u&&(o("false write response, pause",r.awaitDrain),r.awaitDrain++),n.pause())}function h(t){o("onerror",t),p(),e.removeListener("error",h),0===i(e,"error")&&_(e,t)}function d(){e.removeListener("finish",f),p()}function f(){o("onfinish"),e.removeListener("close",d),p()}function p(){o("unpipe"),n.unpipe(e)}return n.on("data",c),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",h),e.once("close",d),e.once("finish",f),e.emit("pipe",n),r.flowing||(o("pipe resume"),n.resume()),e},O.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i0,!1!==r.flowing&&this.resume()):"readable"===e&&(r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.flowing=!1,r.emittedReadable=!1,o("on readable",r.length,r.reading),r.length?k(this):r.reading||process.nextTick(N,this))),n},O.prototype.addListener=O.prototype.on,O.prototype.removeListener=function(e,t){var n=s.prototype.removeListener.call(this,e,t);return"readable"===e&&process.nextTick(L,this),n},O.prototype.removeAllListeners=function(e){var t=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||process.nextTick(L,this),t},O.prototype.resume=function(){var e=this._readableState;return e.flowing||(o("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(P,e,t))}(this,e)),e.paused=!1,this},O.prototype.pause=function(){return o("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(o("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},O.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",(function(){if(o("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){o("wrapped data"),n.decoder&&(i=n.decoder.write(i)),n.objectMode&&null==i||(n.objectMode||i&&i.length)&&(t.push(i)||(r=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var s=0;s{"use strict";e.exports=c;var r=n(393).F,o=r.ERR_METHOD_NOT_IMPLEMENTED,i=r.ERR_MULTIPLE_CALLBACK,s=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=r.ERR_TRANSFORM_WITH_LENGTH_0,l=n(2750);function u(e,t){var n=this._transformState;n.transforming=!1;var r=n.writecb;if(null===r)return this.emit("error",new i);n.writechunk=null,n.writecb=null,null!=t&&this.push(t),r(e);var o=this._readableState;o.reading=!1,(o.needReadable||o.length{"use strict";function r(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t){var n=e.entry;for(e.entry=null;n;){var r=n.callback;t.pendingcb--,r(undefined),n=n.next}t.corkedRequestsFree.next=e}(t,e)}}var o;e.exports=O,O.WritableState=S;var i,s={deprecate:n(3303)},a=n(7088),l=n(181).Buffer,u=global.Uint8Array||function(){},c=n(7472),h=n(3459).getHighWaterMark,d=n(393).F,f=d.ERR_INVALID_ARG_TYPE,p=d.ERR_METHOD_NOT_IMPLEMENTED,g=d.ERR_MULTIPLE_CALLBACK,m=d.ERR_STREAM_CANNOT_PIPE,y=d.ERR_STREAM_DESTROYED,b=d.ERR_STREAM_NULL_VALUES,v=d.ERR_STREAM_WRITE_AFTER_END,w=d.ERR_UNKNOWN_ENCODING,_=c.errorOrDestroy;function E(){}function S(e,t,i){o=o||n(2750),e=e||{},"boolean"!=typeof i&&(i=t instanceof o),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=h(this,e,"writableHighWaterMark",i),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var s=!1===e.decodeStrings;this.decodeStrings=!s,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,r=n.sync,o=n.writecb;if("function"!=typeof o)throw new g;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,r,o){--t.pendingcb,n?(process.nextTick(o,r),process.nextTick(A,e,t),e._writableState.errorEmitted=!0,_(e,r)):(o(r),e._writableState.errorEmitted=!0,_(e,r),A(e,t))}(e,n,r,t,o);else{var i=M(n)||e.destroyed;i||n.corked||n.bufferProcessing||!n.bufferedRequest||R(e,n),r?process.nextTick(x,e,n,i,o):x(e,n,i,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new r(this)}function O(e){var t=this instanceof(o=o||n(2750));if(!t&&!i.call(O,this))return new O(e);this._writableState=new S(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),a.call(this)}function C(e,t,n,r,o,i,s){t.writelen=r,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new y("write")):n?e._writev(o,t.onwrite):e._write(o,i,t.onwrite),t.sync=!1}function x(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),A(e,t)}function R(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var o=t.bufferedRequestCount,i=new Array(o),s=t.corkedRequestsFree;s.entry=n;for(var a=0,l=!0;n;)i[a]=n,n.isBuf||(l=!1),n=n.next,a+=1;i.allBuffers=l,C(e,t,!0,t.length,i,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next?(t.corkedRequestsFree=s.next,s.next=null):t.corkedRequestsFree=new r(t),t.bufferedRequestCount=0}else{for(;n;){var u=n.chunk,c=n.encoding,h=n.callback;if(C(e,t,!1,t.objectMode?1:u.length,u,c,h),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function M(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function k(e,t){e._final((function(n){t.pendingcb--,n&&_(e,n),t.prefinished=!0,e.emit("prefinish"),A(e,t)}))}function A(e,t){var n=M(t);if(n&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,process.nextTick(k,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var r=e._readableState;(!r||r.autoDestroy&&r.endEmitted)&&e.destroy()}return n}n(8361)(O,a),S.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(S.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(i=Function.prototype[Symbol.hasInstance],Object.defineProperty(O,Symbol.hasInstance,{value:function(e){return!!i.call(this,e)||this===O&&e&&e._writableState instanceof S}})):i=function(e){return e instanceof this},O.prototype.pipe=function(){_(this,new m)},O.prototype.write=function(e,t,n){var r,o=this._writableState,i=!1,s=!o.objectMode&&(r=e,l.isBuffer(r)||r instanceof u);return s&&!l.isBuffer(e)&&(e=function(e){return l.from(e)}(e)),"function"==typeof t&&(n=t,t=null),s?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof n&&(n=E),o.ending?function(e,t){var n=new v;_(e,n),process.nextTick(t,n)}(this,n):(s||function(e,t,n,r){var o;return null===n?o=new b:"string"==typeof n||t.objectMode||(o=new f("chunk",["string","Buffer"],n)),!o||(_(e,o),process.nextTick(r,o),!1)}(this,o,e,n))&&(o.pendingcb++,i=function(e,t,n,r,o,i){if(!n){var s=function(e,t,n){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=l.from(t,n)),t}(t,r,o);r!==s&&(n=!0,o="buffer",r=s)}var a=t.objectMode?1:r.length;t.length+=a;var u=t.length-1))throw new w(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(O.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(O.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),O.prototype._write=function(e,t,n){n(new p("_write()"))},O.prototype._writev=null,O.prototype.end=function(e,t,n){var r=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||function(e,t,n){t.ending=!0,A(e,t),n&&(t.finished?process.nextTick(n):e.once("finish",n)),t.ended=!0,e.writable=!1}(this,r,n),this},Object.defineProperty(O.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(O.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),O.prototype.destroy=c.destroy,O.prototype._undestroy=c.undestroy,O.prototype._destroy=function(e,t){t(e)}},9923:(e,t,n)=>{"use strict";var r;function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var i=n(4214),s=Symbol("lastResolve"),a=Symbol("lastReject"),l=Symbol("error"),u=Symbol("ended"),c=Symbol("lastPromise"),h=Symbol("handlePromise"),d=Symbol("stream");function f(e,t){return{value:e,done:t}}function p(e){var t=e[s];if(null!==t){var n=e[d].read();null!==n&&(e[c]=null,e[s]=null,e[a]=null,t(f(n,!1)))}}function g(e){process.nextTick(p,e)}var m=Object.getPrototypeOf((function(){})),y=Object.setPrototypeOf((o(r={get stream(){return this[d]},next:function(){var e=this,t=this[l];if(null!==t)return Promise.reject(t);if(this[u])return Promise.resolve(f(void 0,!0));if(this[d].destroyed)return new Promise((function(t,n){process.nextTick((function(){e[l]?n(e[l]):t(f(void 0,!0))}))}));var n,r=this[c];if(r)n=new Promise(function(e,t){return function(n,r){e.then((function(){t[u]?n(f(void 0,!0)):t[h](n,r)}),r)}}(r,this));else{var o=this[d].read();if(null!==o)return Promise.resolve(f(o,!1));n=new Promise(this[h])}return this[c]=n,n}},Symbol.asyncIterator,(function(){return this})),o(r,"return",(function(){var e=this;return new Promise((function(t,n){e[d].destroy(null,(function(e){e?n(e):t(f(void 0,!0))}))}))})),r),m);e.exports=function(e){var t,n=Object.create(y,(o(t={},d,{value:e,writable:!0}),o(t,s,{value:null,writable:!0}),o(t,a,{value:null,writable:!0}),o(t,l,{value:null,writable:!0}),o(t,u,{value:e._readableState.endEmitted,writable:!0}),o(t,h,{value:function(e,t){var r=n[d].read();r?(n[c]=null,n[s]=null,n[a]=null,e(f(r,!1))):(n[s]=e,n[a]=t)},writable:!0}),t));return n[c]=null,i(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=n[a];return null!==t&&(n[c]=null,n[s]=null,n[a]=null,t(e)),void(n[l]=e)}var r=n[s];null!==r&&(n[c]=null,n[s]=null,n[a]=null,r(f(void 0,!0))),n[u]=!0})),e.on("readable",g.bind(null,n)),n}},1281:(e,t,n)=>{"use strict";function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){for(var n=0;n0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return s.alloc(0);for(var t,n,r,o=s.allocUnsafe(e>>>0),i=this.head,a=0;i;)t=i.data,n=o,r=a,s.prototype.copy.call(t,n,r),a+=i.data.length,i=i.next;return o}},{key:"consume",value:function(e,t){var n;return eo.length?o.length:e;if(i===o.length?r+=o:r+=o.slice(0,e),0==(e-=i)){i===o.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=o.slice(i));break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(e){var t=s.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var o=n.data,i=e>o.length?o.length:e;if(o.copy(t,t.length-e,0,i),0==(e-=i)){i===o.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(i));break}++r}return this.length-=r,t}},{key:l,value:function(e,t){return a(this,function(e){for(var t=1;t{"use strict";function t(e,t){r(e,t),n(e)}function n(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function r(e,t){e.emit("error",t)}e.exports={destroy:function(e,o){var i=this,s=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return s||a?(o?o(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(r,this,e)):process.nextTick(r,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!o&&e?i._writableState?i._writableState.errorEmitted?process.nextTick(n,i):(i._writableState.errorEmitted=!0,process.nextTick(t,i,e)):process.nextTick(t,i,e):o?(process.nextTick(n,i),o(e)):process.nextTick(n,i)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var n=e._readableState,r=e._writableState;n&&n.autoDestroy||r&&r.autoDestroy?e.destroy(t):e.emit("error",t)}}},4214:(e,t,n)=>{"use strict";var r=n(393).F.ERR_STREAM_PREMATURE_CLOSE;function o(){}e.exports=function e(t,n,i){if("function"==typeof n)return e(t,null,n);n||(n={}),i=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),o=0;o{"use strict";function r(e,t,n,r,o,i,s){try{var a=e[i](s),l=a.value}catch(e){return void n(e)}a.done?t(l):Promise.resolve(l).then(r,o)}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var s=n(393).F.ERR_INVALID_ARG_TYPE;e.exports=function(e,t,n){var a;if(t&&"function"==typeof t.next)a=t;else if(t&&t[Symbol.asyncIterator])a=t[Symbol.asyncIterator]();else{if(!t||!t[Symbol.iterator])throw new s("iterable",["Iterable"],t);a=t[Symbol.iterator]()}var l=new e(function(e){for(var t=1;t{"use strict";var r,o=n(393).F,i=o.ERR_MISSING_ARGS,s=o.ERR_STREAM_DESTROYED;function a(e){if(e)throw e}function l(e){e()}function u(e,t){return e.pipe(t)}e.exports=function(){for(var e=arguments.length,t=new Array(e),o=0;o0,(function(e){c||(c=e),e&&d.forEach(l),i||(d.forEach(l),h(c))}))}));return t.reduce(u)}},3459:(e,t,n)=>{"use strict";var r=n(393).F.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,n,o){var i=function(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}(t,o,n);if(null!=i){if(!isFinite(i)||Math.floor(i)!==i||i<0)throw new r(o?n:"highWaterMark",i);return Math.floor(i)}return e.objectMode?16:16384}}},7088:(e,t,n)=>{e.exports=n(2203)},1534:(e,t,n)=>{var r=n(2203);"disable"===process.env.READABLE_STREAM&&r?(e.exports=r.Readable,Object.assign(e.exports,r),e.exports.Stream=r):((t=e.exports=n(1820)).Stream=r||t,t.Readable=t,t.Writable=n(9276),t.Duplex=n(2750),t.Transform=n(266),t.PassThrough=n(616),t.finished=n(4214),t.pipeline=n(3494))},5303:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),o(n(8168),t)},8168:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.setValueSafe=t.setValue=t.createKeySafe=t.createKey=t.enumerateKeysSafe=t.enumerateKeys=t.enumerateValuesSafe=t.enumerateValues=t.HKEY=t.RegistryValueType=void 0;const r=n(1951);var o,i;function s(e){return e===i.HKEY_CLASSES_ROOT?2147483648:e===i.HKEY_CURRENT_USER?2147483649:e===i.HKEY_LOCAL_MACHINE?2147483650:e===i.HKEY_USERS?2147483651:e===i.HKEY_PERFORMANCE_DATA?2147483652:e===i.HKEY_CURRENT_CONFIG?2147483653:e===i.HKEY_DYN_DATA?2147483654:e===i.HKEY_CURRENT_USER_LOCAL_SETTINGS?2147483655:e===i.HKEY_PERFORMANCE_TEXT?2147483728:e===i.HKEY_PERFORMANCE_NLSTEXT?2147483744:function(){throw new Error("The key does not map to an expected number value")}()}function a(e,t){if(!r)return[];const n=s(e);return r.readValues(n,t)}function l(e,t){if(!r)return[];const n=s(e);return r.enumKeys(n,t)}function u(e,t){if(!r)return!1;const n=s(e);return r.createKey(n,t)}function c(e,t,n,i,a){if(!r)return!1;if(i!=o.REG_SZ&&i!=o.REG_EXPAND_SZ&&i!=o.REG_DWORD)return!1;const l=s(e);return r.setValue(l,t,n,i,a)}!function(e){e.REG_BINARY="REG_BINARY",e.REG_DWORD="REG_DWORD",e.REG_DWORD_LITTLE_ENDIAN="REG_DWORD_LITTLE_ENDIAN",e.REG_DWORD_BIG_ENDIAN="REG_DWORD_BIG_ENDIAN",e.REG_EXPAND_SZ="REG_EXPAND_SZ",e.REG_LINK="REG_LINK",e.REG_MULTI_SZ="REG_MULTI_SZ",e.REG_NONE="REG_NONE",e.REG_QWORD="REG_QWORD",e.REG_QWORD_LITTLE_ENDIAN="REG_QWORD_LITTLE_ENDIAN",e.REG_SZ="REG_SZ"}(o=t.RegistryValueType||(t.RegistryValueType={})),function(e){e.HKEY_CLASSES_ROOT="HKEY_CLASSES_ROOT",e.HKEY_CURRENT_CONFIG="HKEY_CURRENT_CONFIG",e.HKEY_DYN_DATA="HKEY_DYN_DATA",e.HKEY_CURRENT_USER_LOCAL_SETTINGS="HKEY_CURRENT_USER_LOCAL_SETTINGS",e.HKEY_CURRENT_USER="HKEY_CURRENT_USER",e.HKEY_LOCAL_MACHINE="HKEY_LOCAL_MACHINE",e.HKEY_PERFORMANCE_DATA="HKEY_PERFORMANCE_DATA",e.HKEY_PERFORMANCE_TEXT="HKEY_PERFORMANCE_TEXT",e.HKEY_PERFORMANCE_NLSTEXT="HKEY_PERFORMANCE_NLSTEXT",e.HKEY_USERS="HKEY_USERS"}(i=t.HKEY||(t.HKEY={})),t.enumerateValues=a,t.enumerateValuesSafe=function(e,t){try{return a(e,t)}catch(e){return[]}},t.enumerateKeys=l,t.enumerateKeysSafe=function(e,t){try{return l(e,t)}catch(e){return[]}},t.createKey=u,t.createKeySafe=function(e,t){try{return u(e,t)}catch(e){return!1}},t.setValue=c,t.setValueSafe=function(e,t,n,r,o){try{return c(e,t,n,r,o)}catch(e){return!1}}},8588:(e,t)=>{"use strict";const n=g();n.configure=g,n.stringify=n,n.default=n,t.stringify=n,t.configure=g,e.exports=n;const r=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?:[^\ud800-\udbff]|^)[\udc00-\udfff]/,o=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?:[^\ud800-\udbff]|^)[\udc00-\udfff]/g,i=["\\u0000","\\u0001","\\u0002","\\u0003","\\u0004","\\u0005","\\u0006","\\u0007","\\b","\\t","\\n","\\u000b","\\f","\\r","\\u000e","\\u000f","\\u0010","\\u0011","\\u0012","\\u0013","\\u0014","\\u0015","\\u0016","\\u0017","\\u0018","\\u0019","\\u001a","\\u001b","\\u001c","\\u001d","\\u001e","\\u001f","","",'\\"',"","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","\\\\"];function s(e){if(2===e.length){const t=e.charCodeAt(1);return`${e[0]}\\u${t.toString(16)}`}const t=e.charCodeAt(0);return i.length>t?i[t]:`\\u${t.toString(16)}`}function a(e){if(e.length<5e3&&!r.test(e))return e;if(e.length>100)return e.replace(o,s);let t="",n=0;for(let r=0;r=55296&&o<=57343){if(o<=56319&&r+1=56320&&t<=57343){r++;continue}}t+=`${e.slice(n,r)}\\u${o.toString(16)}`,n=r+1}}return t+=e.slice(n),t}function l(e){if(e.length>200)return e.sort();for(let t=1;tn;)e[r]=e[r-1],r--;e[r]=n}return e}const u=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Uint8Array)),Symbol.toStringTag).get;function c(e){return void 0!==u.call(e)&&0!==e.length}function h(e,t,n){e.length= 1`)}return void 0===n?1/0:n}function p(e){return 1===e?"1 item":`${e} items`}function g(e){const t=function(e){if(e&&Object.prototype.hasOwnProperty.call(e,"circularValue")){var t=e.circularValue;if("string"==typeof t)return`"${t}"`;if(null==t)return t;if(t===Error||t===TypeError)return{toString(){throw new TypeError("Converting circular structure to JSON")}};throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined')}return'"[Circular]"'}(e),n=d(e,"bigint"),r=d(e,"deterministic"),o=f(e,"maximumDepth"),i=f(e,"maximumBreadth");function s(e,u,d,f,g,m){let y=u[e];switch("object"==typeof y&&null!==y&&"function"==typeof y.toJSON&&(y=y.toJSON(e)),y=f.call(u,e,y),typeof y){case"string":return`"${a(y)}"`;case"object":{if(null===y)return"null";if(-1!==d.indexOf(y))return t;let e="",n=",";const u=m;if(Array.isArray(y)){if(0===y.length)return"[]";if(oi&&(e+=`${n}"... ${p(y.length-i-1)} not stringified"`),""!==g&&(e+=`\n${u}`),d.pop(),`[${e}]`}let b=Object.keys(y);const v=b.length;if(0===v)return"{}";if(oi&&(e+=`${_}"...":${w}"${p(v-i)} not stringified"`,_=n),""!==g&&_.length>1&&(e=`\n${m}${e}\n${u}`),d.pop(),`{${e}}`}case"number":return isFinite(y)?String(y):"null";case"boolean":return!0===y?"true":"false";case"bigint":return n?String(y):void 0}}function u(e,r,s,l,c,h){switch("object"==typeof r&&null!==r&&"function"==typeof r.toJSON&&(r=r.toJSON(e)),typeof r){case"string":return`"${a(r)}"`;case"object":{if(null===r)return"null";if(-1!==s.indexOf(r))return t;const e=h;let n="",d=",";if(Array.isArray(r)){if(0===r.length)return"[]";if(oi&&(n+=`${d}"... ${p(r.length-i-1)} not stringified"`),""!==c&&(n+=`\n${e}`),s.pop(),`[${n}]`}if(0===l.size)return"{}";s.push(r);let f="";""!==c&&(d=`,\n${h+=c}`,f=" ");let g="";for(const e of l){const t=u(e,r[e],s,l,c,h);void 0!==t&&(n+=`${g}"${a(e)}":${f}${t}`,g=d)}return""!==c&&g.length>1&&(n=`\n${h}${n}\n${e}`),s.pop(),`{${n}}`}case"number":return isFinite(r)?String(r):"null";case"boolean":return!0===r?"true":"false";case"bigint":return n?String(r):void 0}}function g(e,s,u,d,f){switch(typeof s){case"string":return`"${a(s)}"`;case"object":{if(null===s)return"null";if("function"==typeof s.toJSON){if("object"!=typeof(s=s.toJSON(e)))return g(e,s,u,d,f);if(null===s)return"null"}if(-1!==u.indexOf(s))return t;const n=f;if(Array.isArray(s)){if(0===s.length)return"[]";if(oi&&(e+=`${t}"... ${p(s.length-i-1)} not stringified"`),e+=`\n${n}`,u.pop(),`[${e}]`}let m=Object.keys(s);const y=m.length;if(0===y)return"{}";if(oi&&(v+=`${w}"...": "${p(y-i)} not stringified"`,w=b),""!==w&&(v=`\n${f}${v}\n${n}`),u.pop(),`{${v}}`}case"number":return isFinite(s)?String(s):"null";case"boolean":return!0===s?"true":"false";case"bigint":return n?String(s):void 0}}function m(e,s,u){switch(typeof s){case"string":return`"${a(s)}"`;case"object":{if(null===s)return"null";if("function"==typeof s.toJSON){if("object"!=typeof(s=s.toJSON(e)))return m(e,s,u);if(null===s)return"null"}if(-1!==u.indexOf(s))return t;let n="";if(Array.isArray(s)){if(0===s.length)return"[]";if(oi&&(n+=`,"... ${p(s.length-i-1)} not stringified"`),u.pop(),`[${n}]`}let d=Object.keys(s);const f=d.length;if(0===f)return"{}";if(oi&&(n+=`${g}"...":"${p(f-i)} not stringified"`),u.pop(),`{${n}}`}case"number":return isFinite(s)?String(s):"null";case"boolean":return!0===s?"true":"false";case"bigint":return n?String(s):void 0}}return function(e,t,n){if(arguments.length>1){let r="";if("number"==typeof n?r=" ".repeat(Math.min(n,10)):"string"==typeof n&&(r=n.slice(0,10)),null!=t){if("function"==typeof t)return s("",{"":e},[],t,r,"");if(Array.isArray(t))return u("",e,[],function(e){const t=new Set;for(const n of e)"string"==typeof n?t.add(n):"number"==typeof n&&t.add(String(n));return t}(t),r,"")}if(0!==r.length)return g("",e,[],r,"")}return m("",e,[])}}},3657:(e,t)=>{var n;t=e.exports=X,n="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(){},t.SEMVER_SPEC_VERSION="2.0.0";var r=256,o=Number.MAX_SAFE_INTEGER||9007199254740991,i=r-6,s=t.re=[],a=t.safeRe=[],l=t.src=[],u=0,c="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",r],[c,i]];function d(e){for(var t=0;t)?=?)";var k=u++;l[k]=l[p]+"|x|X|\\*";var A=u++;l[A]=l[f]+"|x|X|\\*";var j=u++;l[j]="[v=\\s]*("+l[A]+")(?:\\.("+l[A]+")(?:\\.("+l[A]+")(?:"+l[w]+")?"+l[S]+"?)?)?";var T=u++;l[T]="[v=\\s]*("+l[k]+")(?:\\.("+l[k]+")(?:\\.("+l[k]+")(?:"+l[_]+")?"+l[S]+"?)?)?";var L=u++;l[L]="^"+l[M]+"\\s*"+l[j]+"$";var N=u++;l[N]="^"+l[M]+"\\s*"+l[T]+"$";var P=u++;l[P]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var D=u++;l[D]="(?:~>?)";var $=u++;l[$]="(\\s*)"+l[D]+"\\s+",s[$]=new RegExp(l[$],"g"),a[$]=new RegExp(d(l[$]),"g");var F=u++;l[F]="^"+l[D]+l[j]+"$";var I=u++;l[I]="^"+l[D]+l[T]+"$";var U=u++;l[U]="(?:\\^)";var H=u++;l[H]="(\\s*)"+l[U]+"\\s+",s[H]=new RegExp(l[H],"g"),a[H]=new RegExp(d(l[H]),"g");var B=u++;l[B]="^"+l[U]+l[j]+"$";var q=u++;l[q]="^"+l[U]+l[T]+"$";var z=u++;l[z]="^"+l[M]+"\\s*("+x+")$|^$";var G=u++;l[G]="^"+l[M]+"\\s*("+C+")$|^$";var W=u++;l[W]="(\\s*)"+l[M]+"\\s*("+x+"|"+l[j]+")",s[W]=new RegExp(l[W],"g"),a[W]=new RegExp(d(l[W]),"g");var Y=u++;l[Y]="^\\s*("+l[j]+")\\s+-\\s+("+l[j]+")\\s*$";var V=u++;l[V]="^\\s*("+l[T]+")\\s+-\\s+("+l[T]+")\\s*$";var K=u++;l[K]="(<|>)?=?\\s*\\*";for(var Z=0;Z<35;Z++)n(Z,l[Z]),s[Z]||(s[Z]=new RegExp(l[Z]),a[Z]=new RegExp(d(l[Z])));function J(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof X)return e;if("string"!=typeof e)return null;if(e.length>r)return null;if(!(t.loose?a[R]:a[O]).test(e))return null;try{return new X(e,t)}catch(e){return null}}function X(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof X){if(e.loose===t.loose)return e;e=e.version}else if("string"!=typeof e)throw new TypeError("Invalid Version: "+e);if(e.length>r)throw new TypeError("version is longer than "+r+" characters");if(!(this instanceof X))return new X(e,t);n("SemVer",e,t),this.options=t,this.loose=!!t.loose;var i=e.trim().match(t.loose?a[R]:a[O]);if(!i)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+i[1],this.minor=+i[2],this.patch=+i[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");i[4]?this.prerelease=i[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);-1===n&&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},t.inc=function(e,t,n,r){"string"==typeof n&&(r=n,n=void 0);try{return new X(e,n).inc(t,r).version}catch(e){return null}},t.diff=function(e,t){if(oe(e,t))return null;var n=J(e),r=J(t),o="";if(n.prerelease.length||r.prerelease.length){o="pre";var i="prerelease"}for(var s in n)if(("major"===s||"minor"===s||"patch"===s)&&n[s]!==r[s])return o+s;return i},t.compareIdentifiers=ee;var Q=/^[0-9]+$/;function ee(e,t){var n=Q.test(e),r=Q.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e0}function re(e,t,n){return te(e,t,n)<0}function oe(e,t,n){return 0===te(e,t,n)}function ie(e,t,n){return 0!==te(e,t,n)}function se(e,t,n){return te(e,t,n)>=0}function ae(e,t,n){return te(e,t,n)<=0}function le(e,t,n,r){switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e===n;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof n&&(n=n.version),e!==n;case"":case"=":case"==":return oe(e,n,r);case"!=":return ie(e,n,r);case">":return ne(e,n,r);case">=":return se(e,n,r);case"<":return re(e,n,r);case"<=":return ae(e,n,r);default:throw new TypeError("Invalid operator: "+t)}}function ue(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof ue){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof ue))return new ue(e,t);e=e.trim().split(/\s+/).join(" "),n("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===ce?this.value="":this.value=this.operator+this.semver.version,n("comp",this)}t.rcompareIdentifiers=function(e,t){return ee(t,e)},t.major=function(e,t){return new X(e,t).major},t.minor=function(e,t){return new X(e,t).minor},t.patch=function(e,t){return new X(e,t).patch},t.compare=te,t.compareLoose=function(e,t){return te(e,t,!0)},t.rcompare=function(e,t,n){return te(t,e,n)},t.sort=function(e,n){return e.sort((function(e,r){return t.compare(e,r,n)}))},t.rsort=function(e,n){return e.sort((function(e,r){return t.rcompare(e,r,n)}))},t.gt=ne,t.lt=re,t.eq=oe,t.neq=ie,t.gte=se,t.lte=ae,t.cmp=le,t.Comparator=ue;var ce={};function he(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof he)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new he(e.raw,t);if(e instanceof ue)return new he(e.value,t);if(!(this instanceof he))return new he(e,t);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((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+this.raw);this.format()}function de(e){return!e||"x"===e.toLowerCase()||"*"===e}function fe(e,t,n,r,o,i,s,a,l,u,c,h,d){return((t=de(n)?"":de(r)?">="+n+".0.0":de(o)?">="+n+"."+r+".0":">="+t)+" "+(a=de(l)?"":de(u)?"<"+(+l+1)+".0.0":de(c)?"<"+l+"."+(+u+1)+".0":h?"<="+l+"."+u+"."+c+"-"+h:"<="+a)).trim()}function pe(e,t,r){for(var o=0;o0){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 ge(e,t,n){try{t=new he(t,n)}catch(e){return!1}return t.test(e)}function me(e,t,n,r){var o,i,s,a,l;switch(e=new X(e,r),t=new he(t,r),n){case">":o=ne,i=ae,s=re,a=">",l=">=";break;case"<":o=re,i=se,s=ne,a="<",l="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(ge(e,t,r))return!1;for(var u=0;u=0.0.0")),h=h||e,d=d||e,o(e.semver,h.semver,r)?h=e:s(e.semver,d.semver,r)&&(d=e)})),h.operator===a||h.operator===l)return!1;if((!d.operator||d.operator===a)&&i(e,d.semver))return!1;if(d.operator===l&&s(e,d.semver))return!1}return!0}ue.prototype.parse=function(e){var t=this.options.loose?a[z]:a[G],n=e.match(t);if(!n)throw new TypeError("Invalid comparator: "+e);this.operator=n[1],"="===this.operator&&(this.operator=""),n[2]?this.semver=new X(n[2],this.options.loose):this.semver=ce},ue.prototype.toString=function(){return this.value},ue.prototype.test=function(e){return n("Comparator.test",e,this.options.loose),this.semver===ce||("string"==typeof e&&(e=new X(e,this.options)),le(e,this.operator,this.semver,this.options))},ue.prototype.intersects=function(e,t){if(!(e instanceof ue))throw new TypeError("a Comparator is required");var n;if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return n=new he(e.value,t),ge(this.value,n,t);if(""===e.operator)return n=new he(this.value,t),ge(e.semver,n,t);var r=!(">="!==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=le(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),l=le(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||o||i&&s||a||l},t.Range=he,he.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},he.prototype.toString=function(){return this.range},he.prototype.parseRange=function(e){var t=this.options.loose,r=t?a[V]:a[Y];e=e.replace(r,fe),n("hyphen replace",e),e=e.replace(a[W],"$1$2$3"),n("comparator trim",e,a[W]),e=(e=e.replace(a[$],"$1~")).replace(a[H],"$1^");var o=t?a[z]:a[G],i=e.split(" ").map((function(e){return function(e,t){return n("comp",e,t),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){n("caret",e,t);var r=t.loose?a[q]:a[B];return e.replace(r,(function(t,r,o,i,s){var a;return n("caret",e,t,r,o,i,s),de(r)?a="":de(o)?a=">="+r+".0.0 <"+(+r+1)+".0.0":de(i)?a="0"===r?">="+r+"."+o+".0 <"+r+"."+(+o+1)+".0":">="+r+"."+o+".0 <"+(+r+1)+".0.0":s?(n("replaceCaret pr",s),a="0"===r?"0"===o?">="+r+"."+o+"."+i+"-"+s+" <"+r+"."+o+"."+(+i+1):">="+r+"."+o+"."+i+"-"+s+" <"+r+"."+(+o+1)+".0":">="+r+"."+o+"."+i+"-"+s+" <"+(+r+1)+".0.0"):(n("no pr"),a="0"===r?"0"===o?">="+r+"."+o+"."+i+" <"+r+"."+o+"."+(+i+1):">="+r+"."+o+"."+i+" <"+r+"."+(+o+1)+".0":">="+r+"."+o+"."+i+" <"+(+r+1)+".0.0"),n("caret return",a),a}))}(e,t)})).join(" ")}(e,t),n("caret",e),e=function(e,t){return e.trim().split(/\s+/).map((function(e){return function(e,t){var r=t.loose?a[I]:a[F];return e.replace(r,(function(t,r,o,i,s){var a;return n("tilde",e,t,r,o,i,s),de(r)?a="":de(o)?a=">="+r+".0.0 <"+(+r+1)+".0.0":de(i)?a=">="+r+"."+o+".0 <"+r+"."+(+o+1)+".0":s?(n("replaceTilde pr",s),a=">="+r+"."+o+"."+i+"-"+s+" <"+r+"."+(+o+1)+".0"):a=">="+r+"."+o+"."+i+" <"+r+"."+(+o+1)+".0",n("tilde return",a),a}))}(e,t)})).join(" ")}(e,t),n("tildes",e),e=function(e,t){return n("replaceXRanges",e,t),e.split(/\s+/).map((function(e){return function(e,t){e=e.trim();var r=t.loose?a[N]:a[L];return e.replace(r,(function(t,r,o,i,s,a){n("xRange",e,t,r,o,i,s,a);var l=de(o),u=l||de(i),c=u||de(s);return"="===r&&c&&(r=""),l?t=">"===r||"<"===r?"<0.0.0":"*":r&&c?(u&&(i=0),s=0,">"===r?(r=">=",u?(o=+o+1,i=0,s=0):(i=+i+1,s=0)):"<="===r&&(r="<",u?o=+o+1:i=+i+1),t=r+o+"."+i+"."+s):u?t=">="+o+".0.0 <"+(+o+1)+".0.0":c&&(t=">="+o+"."+i+".0 <"+o+"."+(+i+1)+".0"),n("xRange return",t),t}))}(e,t)})).join(" ")}(e,t),n("xrange",e),e=function(e,t){return n("replaceStars",e,t),e.trim().replace(a[K],"")}(e,t),n("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(i=i.filter((function(e){return!!e.match(o)}))),i.map((function(e){return new ue(e,this.options)}),this)},he.prototype.intersects=function(e,t){if(!(e instanceof he))throw new TypeError("a Range is required");return this.set.some((function(n){return n.every((function(n){return e.set.some((function(e){return e.every((function(e){return n.intersects(e,t)}))}))}))}))},t.toComparators=function(e,t){return new he(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},he.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new X(e,this.options));for(var t=0;t":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":n&&!ne(n,t)||(n=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}));return n&&e.test(n)?n:null},t.validRange=function(e,t){try{return new he(e,t).range||"*"}catch(e){return null}},t.ltr=function(e,t,n){return me(e,t,"<",n)},t.gtr=function(e,t,n){return me(e,t,">",n)},t.outside=me,t.prerelease=function(e,t){var n=J(e,t);return n&&n.prerelease.length?n.prerelease:null},t.intersects=function(e,t,n){return e=new he(e,n),t=new he(t,n),e.intersects(t)},t.coerce=function(e){if(e instanceof X)return e;if("string"!=typeof e)return null;var t=e.match(a[P]);return null==t?null:J(t[1]+"."+(t[2]||"0")+"."+(t[3]||"0"))}},2593:(e,t,n)=>{var r,o=n(8089).SourceMapConsumer,i=n(6928);try{(r=n(9896)).existsSync&&r.readFileSync||(r=null)}catch(e){}var s=!1,a=!1,l=!1,u="auto",c={},h={},d=/^data:application\/json[^,]+base64,/,f=[],p=[];function g(){return"browser"===u||"node"!==u&&"undefined"!=typeof window&&"function"==typeof XMLHttpRequest&&!(window.require&&window.module&&window.process&&"renderer"===window.process.type)}function m(e){return function(t){for(var n=0;n";var n=this.getLineNumber();if(null!=n){t+=":"+n;var r=this.getColumnNumber();r&&(t+=":"+r)}}var o="",i=this.getFunctionName(),s=!0,a=this.isConstructor();if(this.isToplevel()||a)a?o+="new "+(i||""):i?o+=i:(o+=t,s=!1);else{var l=this.getTypeName();"[object Object]"===l&&(l="null");var u=this.getMethodName();i?(l&&0!=i.indexOf(l)&&(o+=l+"."),o+=i,u&&i.indexOf("."+u)!=i.length-u.length-1&&(o+=" [as "+u+"]")):o+=l+"."+(u||"")}return s&&(o+=" ("+t+")"),o}function S(e){var t={};return Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((function(n){t[n]=/^(?:is|get)/.test(n)?function(){return e[n].call(e)}:e[n]})),t.toString=E,t}function O(e){if(e.isNative())return e;var t=e.getFileName()||e.getScriptNameOrSourceURL();if(t){var n=e.getLineNumber(),r=e.getColumnNumber()-1;1===n&&r>62&&!g()&&!e.isEval()&&(r-=62);var o=w({source:t,line:n,column:r});return(e=S(e)).getFileName=function(){return o.source},e.getLineNumber=function(){return o.line},e.getColumnNumber=function(){return o.column+1},e.getScriptNameOrSourceURL=function(){return o.source},e}var i=e.isEval()&&e.getEvalOrigin();return i?(i=_(i),(e=S(e)).getEvalOrigin=function(){return i},e):e}function C(e,t){return l&&(c={},h={}),e+t.map((function(e){return"\n at "+O(e)})).join("")}function x(e){var t=/\n at [^(]+ \((.*):(\d+):(\d+)\)/.exec(e.stack);if(t){var n=t[1],o=+t[2],i=+t[3],s=c[n];if(!s&&r&&r.existsSync(n))try{s=r.readFileSync(n,"utf8")}catch(e){s=""}if(s){var a=s.split(/(?:\r\n|\r|\n)/)[o-1];if(a)return n+":"+o+"\n"+a+"\n"+new Array(i).join(" ")+"^"}}return null}p.push((function(e){var t,n=function(e){var t;if(g())try{var n=new XMLHttpRequest;n.open("GET",e,!1),n.send(null),t=4===n.readyState?n.responseText:null;var r=n.getResponseHeader("SourceMap")||n.getResponseHeader("X-SourceMap");if(r)return r}catch(e){}t=y(e);for(var o,i,s=/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/)[ \t]*$)/gm;i=s.exec(t);)o=i;return o?o[1]:null}(e);if(!n)return null;if(d.test(n)){var r=n.slice(n.indexOf(",")+1);t=new Buffer(r,"base64").toString(),n=e}else n=b(e,n),t=y(n);return t?{url:n,map:t}:null})),t.wrapCallSite=O,t.getErrorSource=x,t.mapSourcePosition=w,t.retrieveSourceMap=v,t.install=function(e){if((e=e||{}).environment&&(u=e.environment,-1===["node","browser","auto"].indexOf(u)))throw new Error("environment "+u+" was unknown. Available options are {auto, browser, node}");if(e.retrieveFile&&(e.overrideRetrieveFile&&(f.length=0),f.unshift(e.retrieveFile)),e.retrieveSourceMap&&(e.overrideRetrieveSourceMap&&(p.length=0),p.unshift(e.retrieveSourceMap)),e.hookRequire&&!g()){var t;try{t=n(3339)}catch(e){}var r=t.prototype._compile;r.__sourceMapSupport||(t.prototype._compile=function(e,t){return c[t]=e,h[t]=void 0,r.call(this,e,t)},t.prototype._compile.__sourceMapSupport=!0)}var o;l||(l="emptyCacheBetweenOperations"in e&&e.emptyCacheBetweenOperations),s||(s=!0,Error.prepareStackTrace=C),a||(!("handleUncaughtExceptions"in e)||e.handleUncaughtExceptions)&&"object"==typeof process&&null!==process&&"function"==typeof process.on&&(a=!0,o=process.emit,process.emit=function(e){if("uncaughtException"===e){var t=arguments[1]&&arguments[1].stack,n=this.listeners(e).length>0;if(t&&!n)return(i=x(r=arguments[1]))&&(console.error(),console.error(i)),console.error(r.stack),void process.exit(1)}var r,i;return o.apply(this,arguments)})}},4407:(e,t,n)=>{var r=n(5251),o=Object.prototype.hasOwnProperty,i="undefined"!=typeof Map;function s(){this._array=[],this._set=i?new Map:Object.create(null)}s.fromArray=function(e,t){for(var n=new s,r=0,o=e.length;r=0)return t}else{var n=r.toSetString(e);if(o.call(this._set,n))return this._set[n]}throw new Error('"'+e+'" is not in the set.')},s.prototype.at=function(e){if(e>=0&&e{var r=n(5220);t.encode=function(e){var t,n="",o=function(e){return e<0?1+(-e<<1):0+(e<<1)}(e);do{t=31&o,(o>>>=5)>0&&(t|=32),n+=r.encode(t)}while(o>0);return n},t.decode=function(e,t,n){var o,i,s,a,l=e.length,u=0,c=0;do{if(t>=l)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(i=r.decode(e.charCodeAt(t++))))throw new Error("Invalid base64 digit: "+e.charAt(t-1));o=!!(32&i),u+=(i&=31)<>1,1&~s?a:-a),n.rest=t}},5220:(e,t)=>{var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");t.encode=function(e){if(0<=e&&e{function n(e,r,o,i,s,a){var l=Math.floor((r-e)/2)+e,u=s(o,i[l],!0);return 0===u?l:u>0?r-l>1?n(l,r,o,i,s,a):a==t.LEAST_UPPER_BOUND?r1?n(e,l,o,i,s,a):a==t.LEAST_UPPER_BOUND?l:e<0?-1:e}t.GREATEST_LOWER_BOUND=1,t.LEAST_UPPER_BOUND=2,t.search=function(e,r,o,i){if(0===r.length)return-1;var s=n(-1,r.length,e,r,o,i||t.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&0===o(r[s],r[s-1],!0);)--s;return s}},8846:(e,t,n)=>{var r=n(5251);function o(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}o.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},o.prototype.add=function(e){var t,n,o,i,s,a;n=e,o=(t=this._last).generatedLine,i=n.generatedLine,s=t.generatedColumn,a=n.generatedColumn,i>o||i==o&&a>=s||r.compareByGeneratedPositionsInflated(t,n)<=0?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))},o.prototype.toArray=function(){return this._sorted||(this._array.sort(r.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},t.P=o},8817:(e,t)=>{function n(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function r(e,t,o,i){if(o{var r=n(5251),o=n(2272),i=n(4407).C,s=n(6044),a=n(8817).g;function l(e){var t=e;return"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,""))),null!=t.sections?new h(t):new u(t)}function u(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var n=r.getArg(t,"version"),o=r.getArg(t,"sources"),s=r.getArg(t,"names",[]),a=r.getArg(t,"sourceRoot",null),l=r.getArg(t,"sourcesContent",null),u=r.getArg(t,"mappings"),c=r.getArg(t,"file",null);if(n!=this._version)throw new Error("Unsupported version: "+n);o=o.map(String).map(r.normalize).map((function(e){return a&&r.isAbsolute(a)&&r.isAbsolute(e)?r.relative(a,e):e})),this._names=i.fromArray(s.map(String),!0),this._sources=i.fromArray(o,!0),this.sourceRoot=a,this.sourcesContent=l,this._mappings=u,this.file=c}function c(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function h(e){var t=e;"string"==typeof e&&(t=JSON.parse(e.replace(/^\)\]\}'/,"")));var n=r.getArg(t,"version"),o=r.getArg(t,"sections");if(n!=this._version)throw new Error("Unsupported version: "+n);this._sources=new i,this._names=new i;var s={line:-1,column:0};this._sections=o.map((function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var t=r.getArg(e,"offset"),n=r.getArg(t,"line"),o=r.getArg(t,"column");if(n=0){var a=this._originalMappings[s];if(void 0===e.column)for(var l=a.originalLine;a&&a.originalLine===l;)i.push({line:r.getArg(a,"generatedLine",null),column:r.getArg(a,"generatedColumn",null),lastColumn:r.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++s];else for(var u=a.originalColumn;a&&a.originalLine===t&&a.originalColumn==u;)i.push({line:r.getArg(a,"generatedLine",null),column:r.getArg(a,"generatedColumn",null),lastColumn:r.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++s]}return i},t.SourceMapConsumer=l,u.prototype=Object.create(l.prototype),u.prototype.consumer=l,u.fromSourceMap=function(e){var t=Object.create(u.prototype),n=t._names=i.fromArray(e._names.toArray(),!0),o=t._sources=i.fromArray(e._sources.toArray(),!0);t.sourceRoot=e._sourceRoot,t.sourcesContent=e._generateSourcesContent(t._sources.toArray(),t.sourceRoot),t.file=e._file;for(var s=e._mappings.toArray().slice(),l=t.__generatedMappings=[],h=t.__originalMappings=[],d=0,f=s.length;d1&&(n.source=g+i[1],g+=i[1],n.originalLine=f+i[2],f=n.originalLine,n.originalLine+=1,n.originalColumn=p+i[3],p=n.originalColumn,i.length>4&&(n.name=m+i[4],m+=i[4])),E.push(n),"number"==typeof n.originalLine&&_.push(n)}a(E,r.compareByGeneratedPositionsDeflated),this.__generatedMappings=E,a(_,r.compareByOriginalPositions),this.__originalMappings=_},u.prototype._findMapping=function(e,t,n,r,i,s){if(e[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[n]);if(e[r]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[r]);return o.search(e,t,i,s)},u.prototype.computeColumnSpans=function(){for(var e=0;e=0){var o=this._generatedMappings[n];if(o.generatedLine===t.generatedLine){var i=r.getArg(o,"source",null);null!==i&&(i=this._sources.at(i),null!=this.sourceRoot&&(i=r.join(this.sourceRoot,i)));var s=r.getArg(o,"name",null);return null!==s&&(s=this._names.at(s)),{source:i,line:r.getArg(o,"originalLine",null),column:r.getArg(o,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}},u.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some((function(e){return null==e}))},u.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;if(null!=this.sourceRoot&&(e=r.relative(this.sourceRoot,e)),this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];var n;if(null!=this.sourceRoot&&(n=r.urlParse(this.sourceRoot))){var o=e.replace(/^file:\/\//,"");if("file"==n.scheme&&this._sources.has(o))return this.sourcesContent[this._sources.indexOf(o)];if((!n.path||"/"==n.path)&&this._sources.has("/"+e))return this.sourcesContent[this._sources.indexOf("/"+e)]}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},u.prototype.generatedPositionFor=function(e){var t=r.getArg(e,"source");if(null!=this.sourceRoot&&(t=r.relative(this.sourceRoot,t)),!this._sources.has(t))return{line:null,column:null,lastColumn:null};var n={source:t=this._sources.indexOf(t),originalLine:r.getArg(e,"line"),originalColumn:r.getArg(e,"column")},o=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",r.compareByOriginalPositions,r.getArg(e,"bias",l.GREATEST_LOWER_BOUND));if(o>=0){var i=this._originalMappings[o];if(i.source===n.source)return{line:r.getArg(i,"generatedLine",null),column:r.getArg(i,"generatedColumn",null),lastColumn:r.getArg(i,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},h.prototype=Object.create(l.prototype),h.prototype.constructor=l,h.prototype._version=3,Object.defineProperty(h.prototype,"sources",{get:function(){for(var e=[],t=0;t{var r=n(6044),o=n(5251),i=n(4407).C,s=n(8846).P;function a(e){e||(e={}),this._file=o.getArg(e,"file",null),this._sourceRoot=o.getArg(e,"sourceRoot",null),this._skipValidation=o.getArg(e,"skipValidation",!1),this._sources=new i,this._names=new i,this._mappings=new s,this._sourcesContents=null}a.prototype._version=3,a.fromSourceMap=function(e){var t=e.sourceRoot,n=new a({file:e.file,sourceRoot:t});return e.eachMapping((function(e){var r={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(r.source=e.source,null!=t&&(r.source=o.relative(t,r.source)),r.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(r.name=e.name)),n.addMapping(r)})),e.sources.forEach((function(t){var r=e.sourceContentFor(t);null!=r&&n.setSourceContent(t,r)})),n},a.prototype.addMapping=function(e){var t=o.getArg(e,"generated"),n=o.getArg(e,"original",null),r=o.getArg(e,"source",null),i=o.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,n,r,i),null!=r&&(r=String(r),this._sources.has(r)||this._sources.add(r)),null!=i&&(i=String(i),this._names.has(i)||this._names.add(i)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=n&&n.line,originalColumn:null!=n&&n.column,source:r,name:i})},a.prototype.setSourceContent=function(e,t){var n=e;null!=this._sourceRoot&&(n=o.relative(this._sourceRoot,n)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[o.toSetString(n)]=t):this._sourcesContents&&(delete this._sourcesContents[o.toSetString(n)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},a.prototype.applySourceMap=function(e,t,n){var r=t;if(null==t){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');r=e.file}var s=this._sourceRoot;null!=s&&(r=o.relative(s,r));var a=new i,l=new i;this._mappings.unsortedForEach((function(t){if(t.source===r&&null!=t.originalLine){var i=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=i.source&&(t.source=i.source,null!=n&&(t.source=o.join(n,t.source)),null!=s&&(t.source=o.relative(s,t.source)),t.originalLine=i.line,t.originalColumn=i.column,null!=i.name&&(t.name=i.name))}var u=t.source;null==u||a.has(u)||a.add(u);var c=t.name;null==c||l.has(c)||l.add(c)}),this),this._sources=a,this._names=l,e.sources.forEach((function(t){var r=e.sourceContentFor(t);null!=r&&(null!=n&&(t=o.join(n,t)),null!=s&&(t=o.relative(s,t)),this.setSourceContent(t,r))}),this)},a.prototype._validateMapping=function(e,t,n,r){if(t&&"number"!=typeof t.line&&"number"!=typeof t.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if((!(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0)||t||n||r)&&!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&n))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:t,name:r}))},a.prototype._serializeMappings=function(){for(var e,t,n,i,s=0,a=1,l=0,u=0,c=0,h=0,d="",f=this._mappings.toArray(),p=0,g=f.length;p0){if(!o.compareByGeneratedPositionsInflated(t,f[p-1]))continue;e+=","}e+=r.encode(t.generatedColumn-s),s=t.generatedColumn,null!=t.source&&(i=this._sources.indexOf(t.source),e+=r.encode(i-h),h=i,e+=r.encode(t.originalLine-1-u),u=t.originalLine-1,e+=r.encode(t.originalColumn-l),l=t.originalColumn,null!=t.name&&(n=this._names.indexOf(t.name),e+=r.encode(n-c),c=n)),d+=e}return d},a.prototype._generateSourcesContent=function(e,t){return e.map((function(e){if(!this._sourcesContents)return null;null!=t&&(e=o.relative(t,e));var n=o.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,n)?this._sourcesContents[n]:null}),this)},a.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},a.prototype.toString=function(){return JSON.stringify(this.toJSON())},t.x=a},8299:(e,t,n)=>{var r=n(6545).x,o=n(5251),i=/(\r?\n)/,s="$$$isSourceNode$$$";function a(e,t,n,r,o){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==t?null:t,this.source=null==n?null:n,this.name=null==o?null:o,this[s]=!0,null!=r&&this.add(r)}a.fromStringWithSourceMap=function(e,t,n){var r=new a,s=e.split(i),l=0,u=function(){return e()+(e()||"");function e(){return l=0;t--)this.prepend(e[t]);else{if(!e[s]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},a.prototype.walk=function(e){for(var t,n=0,r=this.children.length;n0){for(t=[],n=0;n{t.getArg=function(e,t,n){if(t in e)return e[t];if(3===arguments.length)return n;throw new Error('"'+t+'" is a required argument.')};var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/,r=/^data:.+\,.+$/;function o(e){var t=e.match(n);return t?{scheme:t[1],auth:t[2],host:t[3],port:t[4],path:t[5]}:null}function i(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}function s(e){var n=e,r=o(e);if(r){if(!r.path)return e;n=r.path}for(var s,a=t.isAbsolute(n),l=n.split(/\/+/),u=0,c=l.length-1;c>=0;c--)"."===(s=l[c])?l.splice(c,1):".."===s?u++:u>0&&(""===s?(l.splice(c+1,u),u=0):(l.splice(c,2),u--));return""===(n=l.join("/"))&&(n=a?"/":"."),r?(r.path=n,i(r)):n}t.urlParse=o,t.urlGenerate=i,t.normalize=s,t.join=function(e,t){""===e&&(e="."),""===t&&(t=".");var n=o(t),a=o(e);if(a&&(e=a.path||"/"),n&&!n.scheme)return a&&(n.scheme=a.scheme),i(n);if(n||t.match(r))return t;if(a&&!a.host&&!a.path)return a.host=t,i(a);var l="/"===t.charAt(0)?t:s(e.replace(/\/+$/,"")+"/"+t);return a?(a.path=l,i(a)):l},t.isAbsolute=function(e){return"/"===e.charAt(0)||!!e.match(n)},t.relative=function(e,t){""===e&&(e="."),e=e.replace(/\/$/,"");for(var n=0;0!==t.indexOf(e+"/");){var r=e.lastIndexOf("/");if(r<0)return t;if((e=e.slice(0,r)).match(/^([^\/]+:\/)?\/*$/))return t;++n}return Array(n+1).join("../")+t.substr(e.length+1)};var a=!("__proto__"in Object.create(null));function l(e){return e}function u(e){if(!e)return!1;var t=e.length;if(t<9)return!1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(var n=t-10;n>=0;n--)if(36!==e.charCodeAt(n))return!1;return!0}function c(e,t){return e===t?0:e>t?1:-1}t.toSetString=a?l:function(e){return u(e)?"$"+e:e},t.fromSetString=a?l:function(e){return u(e)?e.slice(1):e},t.compareByOriginalPositions=function(e,t,n){var r=e.source-t.source;return 0!==r||0!=(r=e.originalLine-t.originalLine)||0!=(r=e.originalColumn-t.originalColumn)||n||0!=(r=e.generatedColumn-t.generatedColumn)||0!=(r=e.generatedLine-t.generatedLine)?r:e.name-t.name},t.compareByGeneratedPositionsDeflated=function(e,t,n){var r=e.generatedLine-t.generatedLine;return 0!==r||0!=(r=e.generatedColumn-t.generatedColumn)||n||0!=(r=e.source-t.source)||0!=(r=e.originalLine-t.originalLine)||0!=(r=e.originalColumn-t.originalColumn)?r:e.name-t.name},t.compareByGeneratedPositionsInflated=function(e,t){var n=e.generatedLine-t.generatedLine;return 0!==n||0!=(n=e.generatedColumn-t.generatedColumn)||0!==(n=c(e.source,t.source))||0!=(n=e.originalLine-t.originalLine)||0!=(n=e.originalColumn-t.originalColumn)?n:c(e.name,t.name)}},8089:(e,t,n)=>{n(6545).x,t.SourceMapConsumer=n(9710).SourceMapConsumer,n(8299)},575:(e,t)=>{function n(e){for(var t in e)this[t]=e[t]}t.get=function(e){var n=Error.stackTraceLimit;Error.stackTraceLimit=1/0;var r={},o=Error.prepareStackTrace;Error.prepareStackTrace=function(e,t){return t},Error.captureStackTrace(r,e||t.get);var i=r.stack;return Error.prepareStackTrace=o,Error.stackTraceLimit=n,i},t.parse=function(e){if(!e.stack)return[];var t=this;return e.stack.split("\n").slice(1).map((function(e){if(e.match(/^\s*[-]{4,}$/))return t._createParsedCallSite({fileName:e,lineNumber:null,functionName:null,typeName:null,methodName:null,columnNumber:null,native:null});var n=e.match(/at (?:(.+)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/);if(n){var r=null,o=null,i=null,s=null,a=null,l="native"===n[5];if(n[1]){var u=(i=n[1]).lastIndexOf(".");if("."==i[u-1]&&u--,u>0){r=i.substr(0,u),o=i.substr(u+1);var c=r.indexOf(".Module");c>0&&(i=i.substr(c+1),r=r.substr(0,c))}s=null}o&&(s=r,a=o),""===o&&(a=null,i=null);var h={fileName:n[2]||null,lineNumber:parseInt(n[3],10)||null,functionName:i,typeName:s,methodName:a,columnNumber:parseInt(n[4],10)||null,native:l};return t._createParsedCallSite(h)}})).filter((function(e){return!!e}))},["this","typeName","functionName","methodName","fileName","lineNumber","columnNumber","function","evalOrigin"].forEach((function(e){n.prototype[e]=null,n.prototype["get"+e[0].toUpperCase()+e.substr(1)]=function(){return this[e]}})),["topLevel","eval","native","constructor"].forEach((function(e){n.prototype[e]=!1,n.prototype["is"+e[0].toUpperCase()+e.substr(1)]=function(){return this[e]}})),t._createParsedCallSite=function(e){return new n(e)}},7117:(e,t,n)=>{"use strict";var r=n(5283).Buffer,o=r.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function i(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(r.isEncoding===o||!o(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=l,this.end=u,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=c,this.end=h,t=3;break;default:return this.write=d,void(this.end=f)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,n=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==n?n:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function l(e,t){if((e.length-t)%2==0){var n=e.toString("utf16le",t);if(n){var r=n.charCodeAt(n.length-1);if(r>=55296&&r<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],n.slice(0,-1)}return n}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function u(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function c(e,t){var n=(e.length-t)%3;return 0===n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1===n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function h(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function d(e){return e.toString(this.encoding)}function f(e){return e&&e.length?this.write(e):""}t.I=i,i.prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n=0?(o>0&&(e.lastNeed=o-1),o):--r=0?(o>0&&(e.lastNeed=o-2),o):--r=0?(o>0&&(2===o?o=0:e.lastNeed=o-3),o):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=n;var r=e.length-(n-this.lastNeed);return e.copy(this.lastChar,0,r),e.toString("utf8",t,r)},i.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},5283:(e,t,n)=>{var r=n(181),o=r.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function s(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=s),s.prototype=Object.create(o.prototype),i(o,s),s.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},s.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=o(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},2196:(e,t)=>{"use strict";t.levels={error:0,warn:1,help:2,data:3,info:4,debug:5,prompt:6,verbose:7,input:8,silly:9},t.colors={error:"red",warn:"yellow",help:"cyan",data:"grey",info:"green",debug:"blue",prompt:"grey",verbose:"cyan",input:"grey",silly:"magenta"}},7906:(e,t,n)=>{"use strict";Object.defineProperty(t,"cli",{value:n(2196)}),Object.defineProperty(t,"npm",{value:n(5375)}),Object.defineProperty(t,"syslog",{value:n(1493)})},5375:(e,t)=>{"use strict";t.levels={error:0,warn:1,info:2,http:3,verbose:4,debug:5,silly:6},t.colors={error:"red",warn:"yellow",info:"green",http:"green",verbose:"cyan",debug:"blue",silly:"magenta"}},1493:(e,t)=>{"use strict";t.levels={emerg:0,alert:1,crit:2,error:3,warning:4,notice:5,info:6,debug:7},t.colors={emerg:"red",alert:"yellow",crit:"red",error:"red",warning:"red",notice:"yellow",info:"green",debug:"blue"}},835:(e,t,n)=>{"use strict";Object.defineProperty(t,"LEVEL",{value:Symbol.for("level")}),Object.defineProperty(t,"MESSAGE",{value:Symbol.for("message")}),Object.defineProperty(t,"SPLAT",{value:Symbol.for("splat")}),Object.defineProperty(t,"configs",{value:n(7906)})},9671:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__assign:()=>i,__asyncDelegator:()=>w,__asyncGenerator:()=>v,__asyncValues:()=>_,__await:()=>b,__awaiter:()=>c,__classPrivateFieldGet:()=>x,__classPrivateFieldSet:()=>R,__createBinding:()=>d,__decorate:()=>a,__exportStar:()=>f,__extends:()=>o,__generator:()=>h,__importDefault:()=>C,__importStar:()=>O,__makeTemplateObject:()=>E,__metadata:()=>u,__param:()=>l,__read:()=>g,__rest:()=>s,__spread:()=>m,__spreadArrays:()=>y,__values:()=>p});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},r(e,t)};function o(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0;a--)(o=e[a])&&(s=(i<3?o(s):i>3?o(t,n,s):o(t,n))||s);return i>3&&s&&Object.defineProperty(t,n,s),s}function l(e,t){return function(n,r){t(n,r,e)}}function u(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function c(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(e){i(e)}}function a(e){try{l(r.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))}function h(e,t){var n,r,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(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=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++,r=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]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)s.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return s}function m(){for(var e=[],t=0;t1||a(e,t)}))})}function a(e,t){try{(n=o[e](t)).value instanceof b?Promise.resolve(n.value.v).then(l,u):c(i[0][2],n)}catch(e){c(i[0][3],e)}var n}function l(e){a("next",e)}function u(e){a("throw",e)}function c(e,t){e(t),i.shift(),i.length&&a(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:b(e[r](t)),done:"return"===r}:o?o(t):t}:o}}function _(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=p(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,o,(t=e[n](t)).done,t.value)}))}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var S=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function O(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&d(t,e,n);return S(t,e),t}function C(e){return e&&e.__esModule?e:{default:e}}function x(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function R(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},3303:(e,t,n)=>{e.exports=n(9023).deprecate},8751:e=>{for(var t=[],n=0;n<256;++n)t[n]=(n+256).toString(16).substr(1);e.exports=function(e,n){var r=n||0,o=t;return o[e[r++]]+o[e[r++]]+o[e[r++]]+o[e[r++]]+"-"+o[e[r++]]+o[e[r++]]+"-"+o[e[r++]]+o[e[r++]]+"-"+o[e[r++]]+o[e[r++]]+"-"+o[e[r++]]+o[e[r++]]+o[e[r++]]+o[e[r++]]+o[e[r++]]+o[e[r++]]}},6431:(e,t,n)=>{var r=n(6982).randomBytes;e.exports=function(){return r(16)}},8030:(e,t,n)=>{var r=n(6431),o=n(8751);e.exports=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"==e?new Array(16):null,e=null);var s=(e=e||{}).random||(e.rng||r)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,t)for(var a=0;a<16;++a)t[i+a]=s[a];return t||o(s)}},6351:(e,t,n)=>{"use strict";const r=n(9023),o=n(9276),{LEVEL:i}=n(835),s=e.exports=function(e={}){o.call(this,{objectMode:!0,highWaterMark:e.highWaterMark}),this.format=e.format,this.level=e.level,this.handleExceptions=e.handleExceptions,this.handleRejections=e.handleRejections,this.silent=e.silent,e.log&&(this.log=e.log),e.logv&&(this.logv=e.logv),e.close&&(this.close=e.close),this.once("pipe",(e=>{this.levels=e.levels,this.parent=e})),this.once("unpipe",(e=>{e===this.parent&&(this.parent=null,this.close&&this.close())}))};r.inherits(s,o),s.prototype._write=function(e,t,n){if(this.silent||!0===e.exception&&!this.handleExceptions)return n(null);const r=this.level||this.parent&&this.parent.level;if(!r||this.levels[r]>=this.levels[e[i]]){if(e&&!this.format)return this.log(e,n);let t,r;try{r=this.format.transform(Object.assign({},e),this.format.options)}catch(e){t=e}if(t||!r){if(n(),t)throw t;return}return this.log(r,n)}return this._writableState.sync=!1,n(null)},s.prototype._writev=function(e,t){if(this.logv){const n=e.filter(this._accept,this);return n.length?this.logv(n,t):t(null)}for(let n=0;n=this.levels[t[i]])||!this.handleExceptions&&!0===t.exception)},s.prototype._nop=function(){},e.exports.LegacyTransportStream=n(4760)},4760:(e,t,n)=>{"use strict";const r=n(9023),{LEVEL:o}=n(835),i=n(6351),s=e.exports=function(e={}){if(i.call(this,e),!e.transport||"function"!=typeof e.transport.log)throw new Error("Invalid transport, must be an object with a log method.");this.transport=e.transport,this.level=this.level||e.transport.level,this.handleExceptions=this.handleExceptions||e.transport.handleExceptions,this._deprecated(),this.transport.__winstonError||(this.transport.__winstonError=function(e){this.emit("error",e,this.transport)}.bind(this),this.transport.on("error",this.transport.__winstonError))};r.inherits(s,i),s.prototype._write=function(e,t,n){if(this.silent||!0===e.exception&&!this.handleExceptions)return n(null);(!this.level||this.levels[this.level]>=this.levels[e[o]])&&this.transport.log(e[o],e.message,e,this._nop),n(null)},s.prototype._writev=function(e,t){for(let t=0;t{"use strict";const r=n(2671),{warn:o}=n(3639);t.version=n(296).version,t.transports=n(2171),t.config=n(4279),t.addColors=r.levels,t.format=r.format,t.createLogger=n(7351),t.ExceptionHandler=n(8096),t.RejectionHandler=n(8318),t.Container=n(5811),t.Transport=n(6351),t.loggers=new t.Container;const i=t.createLogger();Object.keys(t.config.npm.levels).concat(["log","query","stream","add","remove","clear","profile","startTimer","handleExceptions","unhandleExceptions","handleRejections","unhandleRejections","configure","child"]).forEach((e=>t[e]=(...t)=>i[e](...t))),Object.defineProperty(t,"level",{get:()=>i.level,set(e){i.level=e}}),Object.defineProperty(t,"exceptions",{get:()=>i.exceptions}),["exitOnError"].forEach((e=>{Object.defineProperty(t,e,{get:()=>i[e],set(t){i[e]=t}})})),Object.defineProperty(t,"default",{get:()=>({exceptionHandlers:i.exceptionHandlers,rejectionHandlers:i.rejectionHandlers,transports:i.transports})}),o.deprecated(t,"setLevels"),o.forFunctions(t,"useFormat",["cli"]),o.forProperties(t,"useFormat",["padLevels","stripColors"]),o.forFunctions(t,"deprecated",["addRewriter","addFilter","clone","extend"]),o.forProperties(t,"deprecated",["emitErrs","levelLength"]),o.moved(t,"createLogger","Logger")},3639:(e,t,n)=>{"use strict";const{format:r}=n(9023);t.warn={deprecated:e=>()=>{throw new Error(r("{ %s } was removed in winston@3.0.0.",e))},useFormat:e=>()=>{throw new Error([r("{ %s } was removed in winston@3.0.0.",e),"Use a custom winston.format = winston.format(function) instead."].join("\n"))},forFunctions(e,n,r){r.forEach((r=>{e[r]=t.warn[n](r)}))},moved(e,t,n){function o(){return()=>{throw new Error([r("winston.%s was moved in winston@3.0.0.",n),r("Use a winston.%s instead.",t)].join("\n"))}}Object.defineProperty(e,n,{get:o,set:o})},forProperties(e,n,r){r.forEach((r=>{const o=t.warn[n](r);Object.defineProperty(e,r,{get:o,set:o})}))}}},4279:(e,t,n)=>{"use strict";const r=n(2671),{configs:o}=n(835);t.cli=r.levels(o.cli),t.npm=r.levels(o.npm),t.syslog=r.levels(o.syslog),t.addColors=r.levels},5811:(e,t,n)=>{"use strict";const r=n(7351);e.exports=class{constructor(e={}){this.loggers=new Map,this.options=e}add(e,t){if(!this.loggers.has(e)){const n=(t=Object.assign({},t||this.options)).transports||this.options.transports;t.transports=n?n.slice():[];const o=r(t);o.on("close",(()=>this._delete(e))),this.loggers.set(e,o)}return this.loggers.get(e)}get(e,t){return this.add(e,t)}has(e){return!!this.loggers.has(e)}close(e){if(e)return this._removeLogger(e);this.loggers.forEach(((e,t)=>this._removeLogger(t)))}_removeLogger(e){this.loggers.has(e)&&(this.loggers.get(e).close(),this._delete(e))}_delete(e){this.loggers.delete(e)}}},7351:(e,t,n)=>{"use strict";const{LEVEL:r}=n(835),o=n(4279),i=n(418),s=n(7206)("winston:create-logger");e.exports=function(e={}){e.levels=e.levels||o.npm.levels;class t extends i{constructor(e){super(e)}}const n=new t(e);return Object.keys(e.levels).forEach((function(e){s('Define prototype method for "%s"',e),"log"!==e?(t.prototype[e]=function(...t){const o=this||n;if(1===t.length){const[i]=t,s=i&&i.message&&i||{message:i};return s.level=s[r]=e,o._addDefaultMeta(s),o.write(s),this||n}return 0===t.length?(o.log(e,""),o):o.log(e,...t)},t.prototype[function(e){return"is"+e.charAt(0).toUpperCase()+e.slice(1)+"Enabled"}(e)]=function(){return(this||n).isLevelEnabled(e)}):console.warn('Level "log" not defined: conflicts with the method "log". Use a different level name.')})),n}},8096:(e,t,n)=>{"use strict";const r=n(857),o=n(1265),i=n(7206)("winston:exception"),s=n(4283),a=n(575),l=n(1934);e.exports=class{constructor(e){if(!e)throw new Error("Logger is required to handle exceptions");this.logger=e,this.handlers=new Map}handle(...e){e.forEach((e=>{if(Array.isArray(e))return e.forEach((e=>this._addHandler(e)));this._addHandler(e)})),this.catcher||(this.catcher=this._uncaughtException.bind(this),process.on("uncaughtException",this.catcher))}unhandle(){this.catcher&&(process.removeListener("uncaughtException",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach((e=>this.logger.unpipe(e))))}getAllInfo(e){let{message:t}=e;return t||"string"!=typeof e||(t=e),{error:e,level:"error",message:[`uncaughtException: ${t||"(no error message)"}`,e.stack||" No stack trace"].join("\n"),stack:e.stack,exception:!0,date:(new Date).toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(e)}}getProcessInfo(){return{pid:process.pid,uid:process.getuid?process.getuid():null,gid:process.getgid?process.getgid():null,cwd:process.cwd(),execPath:process.execPath,version:process.version,argv:process.argv,memoryUsage:process.memoryUsage()}}getOsInfo(){return{loadavg:r.loadavg(),uptime:r.uptime()}}getTrace(e){return(e?a.parse(e):a.get()).map((e=>({column:e.getColumnNumber(),file:e.getFileName(),function:e.getFunctionName(),line:e.getLineNumber(),method:e.getMethodName(),native:e.isNative()})))}_addHandler(e){if(!this.handlers.has(e)){e.handleExceptions=!0;const t=new l(e);this.handlers.set(e,t),this.logger.pipe(t)}}_uncaughtException(e){const t=this.getAllInfo(e),n=this._getExceptionHandlers();let r,a="function"==typeof this.logger.exitOnError?this.logger.exitOnError(e):this.logger.exitOnError;function l(){i("doExit",a),i("process._exiting",process._exiting),a&&!process._exiting&&(r&&clearTimeout(r),process.exit(1))}if(!n.length&&a&&(console.warn("winston: exitOnError cannot be true with no exception handlers."),console.warn("winston: not exiting process."),a=!1),!n||0===n.length)return process.nextTick(l);o(n,((e,t)=>{const n=s(t),r=e.transport||e;function o(e){return()=>{i(e),n()}}r._ending=!0,r.once("finish",o("finished")),r.once("error",o("error"))}),(()=>a&&l())),this.logger.log(t),a&&(r=setTimeout(l,3e3))}_getExceptionHandlers(){return this.logger.transports.filter((e=>(e.transport||e).handleExceptions))}}},1934:(e,t,n)=>{"use strict";const{Writable:r}=n(1534);e.exports=class extends r{constructor(e){if(super({objectMode:!0}),!e)throw new Error("ExceptionStream requires a TransportStream instance.");this.handleExceptions=!0,this.transport=e}_write(e,t,n){return e.exception?this.transport.log(e,n):(n(),!0)}}},418:(e,t,n)=>{"use strict";const{Stream:r,Transform:o}=n(1534),i=n(1265),{LEVEL:s,SPLAT:a}=n(835),l=n(7752),u=n(8096),c=n(8318),h=n(4760),d=n(6919),{warn:f}=n(3639),p=n(4279),g=/%[scdjifoO%]/g;class m extends o{constructor(e){super({objectMode:!0}),this.configure(e)}child(e){const t=this;return Object.create(t,{write:{value:function(n){const r=Object.assign({},e,n);n instanceof Error&&(r.stack=n.stack,r.message=n.message),t.write(r)}}})}configure({silent:e,format:t,defaultMeta:r,levels:o,level:i="info",exitOnError:s=!0,transports:a,colors:l,emitErrs:h,formatters:d,padLevels:f,rewriters:g,stripColors:m,exceptionHandlers:y,rejectionHandlers:b}={}){if(this.transports.length&&this.clear(),this.silent=e,this.format=t||this.format||n(1345)(),this.defaultMeta=r||null,this.levels=o||this.levels||p.npm.levels,this.level=i,this.exceptions&&this.exceptions.unhandle(),this.rejections&&this.rejections.unhandle(),this.exceptions=new u(this),this.rejections=new c(this),this.profilers={},this.exitOnError=s,a&&(a=Array.isArray(a)?a:[a]).forEach((e=>this.add(e))),l||h||d||f||g||m)throw new Error(["{ colors, emitErrs, formatters, padLevels, rewriters, stripColors } were removed in winston@3.0.0.","Use a custom winston.format(function) instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join("\n"));y&&this.exceptions.handle(y),b&&this.rejections.handle(b)}isLevelEnabled(e){const t=y(this.levels,e);if(null===t)return!1;const n=y(this.levels,this.level);return null!==n&&(this.transports&&0!==this.transports.length?-1!==this.transports.findIndex((e=>{let r=y(this.levels,e.level);return null===r&&(r=n),r>=t})):n>=t)}log(e,t,...n){if(1===arguments.length)return e[s]=e.level,this._addDefaultMeta(e),this.write(e),this;if(2===arguments.length)return t&&"object"==typeof t?(t[s]=t.level=e,this._addDefaultMeta(t),this.write(t),this):(t={[s]:e,level:e,message:t},this._addDefaultMeta(t),this.write(t),this);const[r]=n;if("object"==typeof r&&null!==r&&!(t&&t.match&&t.match(g))){const o=Object.assign({},this.defaultMeta,r,{[s]:e,[a]:n,level:e,message:t});return r.message&&(o.message=`${o.message} ${r.message}`),r.stack&&(o.stack=r.stack),this.write(o),this}return this.write(Object.assign({},this.defaultMeta,{[s]:e,[a]:n,level:e,message:t})),this}_transform(e,t,n){if(this.silent)return n();e[s]||(e[s]=e.level),this.levels[e[s]]||0===this.levels[e[s]]||console.error("[winston] Unknown logger level: %s",e[s]),this._readableState.pipes||console.error("[winston] Attempt to write logs with no transports %j",e);try{this.push(this.format.transform(e,this.format.options))}finally{this._writableState.sync=!1,n()}}_final(e){const t=this.transports.slice();i(t,((e,t)=>{if(!e||e.finished)return setImmediate(t);e.once("finish",t),e.end()}),e)}add(e){const t=!l(e)||e.log.length>2?new h({transport:e}):e;if(!t._writableState||!t._writableState.objectMode)throw new Error("Transports must WritableStreams in objectMode. Set { objectMode: true }.");return this._onEvent("error",t),this._onEvent("warn",t),this.pipe(t),e.handleExceptions&&this.exceptions.handle(),e.handleRejections&&this.rejections.handle(),this}remove(e){if(!e)return this;let t=e;return(!l(e)||e.log.length>2)&&(t=this.transports.filter((t=>t.transport===e))[0]),t&&this.unpipe(t),this}clear(){return this.unpipe(),this}close(){return this.exceptions.unhandle(),this.rejections.unhandle(),this.clear(),this.emit("close"),this}setLevels(){f.deprecated("setLevels")}query(e,t){"function"==typeof e&&(t=e,e={}),e=e||{};const n={},r=Object.assign({},e.query||{});i(this.transports.filter((e=>!!e.query)),(function(t,o){!function(t,n){e.query&&"function"==typeof t.formatQuery&&(e.query=t.formatQuery(r)),t.query(e,((r,o)=>{if(r)return n(r);"function"==typeof t.formatResults&&(o=t.formatResults(o,e.format)),n(null,o)}))}(t,((e,r)=>{o&&((r=e||r)&&(n[t.name]=r),o()),o=null}))}),(()=>t(null,n)))}stream(e={}){const t=new r,n=[];return t._streams=n,t.destroy=()=>{let e=n.length;for(;e--;)n[e].destroy()},this.transports.filter((e=>!!e.stream)).forEach((r=>{const o=r.stream(e);o&&(n.push(o),o.on("log",(e=>{e.transport=e.transport||[],e.transport.push(r.name),t.emit("log",e)})),o.on("error",(e=>{e.transport=e.transport||[],e.transport.push(r.name),t.emit("error",e)})))})),t}startTimer(){return new d(this)}profile(e,...t){const n=Date.now();if(this.profilers[e]){const r=this.profilers[e];delete this.profilers[e],"function"==typeof t[t.length-2]&&(console.warn("Callback function no longer supported as of winston@3.0.0"),t.pop());const o="object"==typeof t[t.length-1]?t.pop():{};return o.level=o.level||"info",o.durationMs=n-r,o.message=o.message||e,this.write(o)}return this.profilers[e]=n,this}handleExceptions(...e){console.warn("Deprecated: .handleExceptions() will be removed in winston@4. Use .exceptions.handle()"),this.exceptions.handle(...e)}unhandleExceptions(...e){console.warn("Deprecated: .unhandleExceptions() will be removed in winston@4. Use .exceptions.unhandle()"),this.exceptions.unhandle(...e)}cli(){throw new Error(["Logger.cli() was removed in winston@3.0.0","Use a custom winston.formats.cli() instead.","See: https://github.com/winstonjs/winston/tree/master/UPGRADE-3.0.md"].join("\n"))}_onEvent(e,t){t["__winston"+e]||(t["__winston"+e]=function(n){"error"!==e||this.transports.includes(t)||this.add(t),this.emit(e,n,t)}.bind(this),t.on(e,t["__winston"+e]))}_addDefaultMeta(e){this.defaultMeta&&Object.assign(e,this.defaultMeta)}}function y(e,t){const n=e[t];return n||0===n?n:null}Object.defineProperty(m.prototype,"transports",{configurable:!1,enumerable:!0,get(){const{pipes:e}=this._readableState;return Array.isArray(e)?e:[e].filter(Boolean)}}),e.exports=m},6919:e=>{"use strict";e.exports=class{constructor(e){if(!e)throw new Error("Logger is required for profiling.");this.logger=e,this.start=Date.now()}done(...e){"function"==typeof e[e.length-1]&&(console.warn("Callback function no longer supported as of winston@3.0.0"),e.pop());const t="object"==typeof e[e.length-1]?e.pop():{};return t.level=t.level||"info",t.durationMs=Date.now()-this.start,this.logger.write(t)}}},8318:(e,t,n)=>{"use strict";const r=n(857),o=n(1265),i=n(7206)("winston:rejection"),s=n(4283),a=n(575),l=n(1934);e.exports=class{constructor(e){if(!e)throw new Error("Logger is required to handle rejections");this.logger=e,this.handlers=new Map}handle(...e){e.forEach((e=>{if(Array.isArray(e))return e.forEach((e=>this._addHandler(e)));this._addHandler(e)})),this.catcher||(this.catcher=this._unhandledRejection.bind(this),process.on("unhandledRejection",this.catcher))}unhandle(){this.catcher&&(process.removeListener("unhandledRejection",this.catcher),this.catcher=!1,Array.from(this.handlers.values()).forEach((e=>this.logger.unpipe(e))))}getAllInfo(e){let t=null;return e&&(t="string"==typeof e?e:e.message),{error:e,level:"error",message:[`unhandledRejection: ${t||"(no error message)"}`,e&&e.stack||" No stack trace"].join("\n"),stack:e&&e.stack,exception:!0,date:(new Date).toString(),process:this.getProcessInfo(),os:this.getOsInfo(),trace:this.getTrace(e)}}getProcessInfo(){return{pid:process.pid,uid:process.getuid?process.getuid():null,gid:process.getgid?process.getgid():null,cwd:process.cwd(),execPath:process.execPath,version:process.version,argv:process.argv,memoryUsage:process.memoryUsage()}}getOsInfo(){return{loadavg:r.loadavg(),uptime:r.uptime()}}getTrace(e){return(e?a.parse(e):a.get()).map((e=>({column:e.getColumnNumber(),file:e.getFileName(),function:e.getFunctionName(),line:e.getLineNumber(),method:e.getMethodName(),native:e.isNative()})))}_addHandler(e){if(!this.handlers.has(e)){e.handleRejections=!0;const t=new l(e);this.handlers.set(e,t),this.logger.pipe(t)}}_unhandledRejection(e){const t=this.getAllInfo(e),n=this._getRejectionHandlers();let r,a="function"==typeof this.logger.exitOnError?this.logger.exitOnError(e):this.logger.exitOnError;function l(){i("doExit",a),i("process._exiting",process._exiting),a&&!process._exiting&&(r&&clearTimeout(r),process.exit(1))}if(!n.length&&a&&(console.warn("winston: exitOnError cannot be true with no rejection handlers."),console.warn("winston: not exiting process."),a=!1),!n||0===n.length)return process.nextTick(l);o(n,((e,t)=>{const n=s(t),r=e.transport||e;function o(e){return()=>{i(e),n()}}r._ending=!0,r.once("finish",o("finished")),r.once("error",o("error"))}),(()=>a&&l())),this.logger.log(t),a&&(r=setTimeout(l,3e3))}_getRejectionHandlers(){return this.logger.transports.filter((e=>(e.transport||e).handleRejections))}}},1615:(e,t,n)=>{"use strict";const r=n(9896),{StringDecoder:o}=n(3193),{Stream:i}=n(1534);function s(){}e.exports=(e,t)=>{const n=Buffer.alloc(65536),a=new o("utf8"),l=new i;let u="",c=0,h=0;return-1===e.start&&delete e.start,l.readable=!0,l.destroy=()=>{l.destroyed=!0,l.emit("end"),l.emit("close")},r.open(e.file,"a+","0644",((o,i)=>{if(o)return t?t(o):l.emit("error",o),void l.destroy();!function o(){if(!l.destroyed)return r.read(i,n,0,n.length,c,((r,i)=>{if(r)return t?t(r):l.emit("error",r),void l.destroy();if(!i)return u&&((null==e.start||h>e.start)&&(t?t(null,u):l.emit("line",u)),h++,u=""),setTimeout(o,1e3);let s=a.write(n.slice(0,i));t||l.emit("data",s),s=(u+s).split(/\n+/);const d=s.length-1;let f=0;for(;fe.start)&&(t?t(null,s[f]):l.emit("line",s[f])),h++;return u=s[d],c+=i,o()}));r.close(i,s)}()})),t?l.destroy:l}},9354:(e,t,n)=>{"use strict";const r=n(857),{LEVEL:o,MESSAGE:i}=n(835),s=n(6351);e.exports=class extends s{constructor(e={}){super(e),this.name=e.name||"console",this.stderrLevels=this._stringArrayToSet(e.stderrLevels),this.consoleWarnLevels=this._stringArrayToSet(e.consoleWarnLevels),this.eol="string"==typeof e.eol?e.eol:r.EOL,this.setMaxListeners(30)}log(e,t){return setImmediate((()=>this.emit("logged",e))),this.stderrLevels[e[o]]?(console._stderr?console._stderr.write(`${e[i]}${this.eol}`):console.error(e[i]),void(t&&t())):this.consoleWarnLevels[e[o]]?(console._stderr?console._stderr.write(`${e[i]}${this.eol}`):console.warn(e[i]),void(t&&t())):(console._stdout?console._stdout.write(`${e[i]}${this.eol}`):console.log(e[i]),void(t&&t()))}_stringArrayToSet(e,t){if(!e)return{};if(t=t||"Cannot make set from type other than Array of string elements",!Array.isArray(e))throw new Error(t);return e.reduce(((e,n)=>{if("string"!=typeof n)throw new Error(t);return e[n]=!0,e}),{})}}},8033:(e,t,n)=>{"use strict";const r=n(9896),o=n(6928),i=n(2382),s=n(3106),{MESSAGE:a}=n(835),{Stream:l,PassThrough:u}=n(1534),c=n(6351),h=n(7206)("winston:file"),d=n(857),f=n(1615);e.exports=class extends c{constructor(e={}){function t(t,...n){n.slice(1).forEach((n=>{if(e[n])throw new Error(`Cannot set ${n} and ${t} together`)}))}if(super(e),this.name=e.name||"file",this._stream=new u,this._stream.setMaxListeners(30),this._onError=this._onError.bind(this),e.filename||e.dirname)t("filename or dirname","stream"),this._basename=this.filename=e.filename?o.basename(e.filename):"winston.log",this.dirname=e.dirname||o.dirname(e.filename),this.options=e.options||{flags:"a"};else{if(!e.stream)throw new Error("Cannot log to file without filename or stream.");console.warn("options.stream will be removed in winston@4. Use winston.transports.Stream"),t("stream","filename","maxsize"),this._dest=this._stream.pipe(this._setupStream(e.stream)),this.dirname=o.dirname(this._dest.path)}this.maxsize=e.maxsize||null,this.rotationFormat=e.rotationFormat||!1,this.zippedArchive=e.zippedArchive||!1,this.maxFiles=e.maxFiles||null,this.eol="string"==typeof e.eol?e.eol:d.EOL,this.tailable=e.tailable||!1,this._size=0,this._pendingSize=0,this._created=0,this._drain=!1,this._opening=!1,this._ending=!1,this.dirname&&this._createLogDirIfNotExist(this.dirname),this.open()}finishIfEnding(){this._ending&&(this._opening?this.once("open",(()=>{this._stream.once("finish",(()=>this.emit("finish"))),setImmediate((()=>this._stream.end()))})):(this._stream.once("finish",(()=>this.emit("finish"))),setImmediate((()=>this._stream.end()))))}log(e,t=()=>{}){if(this.silent)return t(),!0;if(this._drain)return void this._stream.once("drain",(()=>{this._drain=!1,this.log(e,t)}));if(this._rotate)return void this._stream.once("rotate",(()=>{this._rotate=!1,this.log(e,t)}));const n=`${e[a]}${this.eol}`,r=Buffer.byteLength(n);this._pendingSize+=r,this._opening&&!this.rotatedWhileOpening&&this._needsNewFile(this._size+this._pendingSize)&&(this.rotatedWhileOpening=!0);const o=this._stream.write(n,function(){this._size+=r,this._pendingSize-=r,h("logged %s %s",this._size,n),this.emit("logged",e),this._opening||this._needsNewFile()&&(this._rotate=!0,this._endStream((()=>this._rotateFile())))}.bind(this));return o?t():(this._drain=!0,this._stream.once("drain",(()=>{this._drain=!1,t()}))),h("written",o,this._drain),this.finishIfEnding(),o}query(e,t){"function"==typeof e&&(t=e,e={}),e=function(e){return(e=e||{}).rows=e.rows||e.limit||10,e.start=e.start||0,e.until=e.until||new Date,"object"!=typeof e.until&&(e.until=new Date(e.until)),e.from=e.from||e.until-864e5,"object"!=typeof e.from&&(e.from=new Date(e.from)),e.order=e.order||"desc",e}(e);const n=o.join(this.dirname,this.filename);let i="",s=[],a=0;const l=r.createReadStream(n,{encoding:"utf8"});function u(t,n){try{const n=JSON.parse(t);(function(t){if(!t)return;if("object"!=typeof t)return;const n=new Date(t.timestamp);return!(e.from&&ne.until||e.level&&e.level!==t.level)||void 0})(n)&&function(t){e.rows&&s.length>=e.rows&&"desc"!==e.order?l.readable&&l.destroy():(e.fields&&(t=e.fields.reduce(((e,n)=>(e[n]=t[n],e)),{})),"desc"===e.order&&s.length>=e.rows&&s.shift(),s.push(t))}(n)}catch(e){n||l.emit("error",e)}}l.on("error",(e=>{if(l.readable&&l.destroy(),t)return"ENOENT"!==e.code?t(e):t(null,s)})),l.on("data",(t=>{const n=(t=(i+t).split(/\n+/)).length-1;let r=0;for(;r=e.start)&&u(t[r]),a++;i=t[n]})),l.on("close",(()=>{i&&u(i,!0),"desc"===e.order&&(s=s.reverse()),t&&t(null,s)}))}stream(e={}){const t=o.join(this.dirname,this.filename),n=new l,r={file:t,start:e.start};return n.destroy=f(r,((e,t)=>{if(e)return n.emit("error",e);try{n.emit("data",t),t=JSON.parse(t),n.emit("log",t)}catch(e){n.emit("error",e)}})),n}open(){this.filename&&(this._opening||(this._opening=!0,this.stat(((e,t)=>{if(e)return this.emit("error",e);h("stat done: %s { size: %s }",this.filename,t),this._size=t,this._dest=this._createStream(this._stream),this._opening=!1,this.once("open",(()=>{this._stream.eventNames().includes("rotate")?this._stream.emit("rotate"):this._rotate=!1}))}))))}stat(e){const t=this._getFile(),n=o.join(this.dirname,t);r.stat(n,((r,o)=>r&&"ENOENT"===r.code?(h("ENOENT ok",n),this.filename=t,e(null,0)):r?(h(`err ${r.code} ${n}`),e(r)):!o||this._needsNewFile(o.size)?this._incFile((()=>this.stat(e))):(this.filename=t,void e(null,o.size))))}close(e){this._stream&&this._stream.end((()=>{e&&e(),this.emit("flush"),this.emit("closed")}))}_needsNewFile(e){return e=e||this._size,this.maxsize&&e>=this.maxsize}_onError(e){this.emit("error",e)}_setupStream(e){return e.on("error",this._onError),e}_cleanupStream(e){return e.removeListener("error",this._onError),e}_rotateFile(){this._incFile((()=>this.open()))}_endStream(e=()=>{}){this._dest?(this._stream.unpipe(this._dest),this._dest.end((()=>{this._cleanupStream(this._dest),e()}))):e()}_createStream(e){const t=o.join(this.dirname,this.filename);h("create stream start",t,this.options);const n=r.createWriteStream(t,this.options).on("error",(e=>h(e))).on("close",(()=>h("close",n.path,n.bytesWritten))).on("open",(()=>{h("file open ok",t),this.emit("open",t),e.pipe(n),this.rotatedWhileOpening&&(this._stream=new u,this._stream.setMaxListeners(30),this._rotateFile(),this.rotatedWhileOpening=!1,this._cleanupStream(n),e.end())}));if(h("create stream ok",t),this.zippedArchive){const e=s.createGzip();return e.pipe(n),e}return n}_incFile(e){h("_incFile",this.filename);const t=o.extname(this._basename),n=o.basename(this._basename,t);this.tailable?this._checkMaxFilesTailable(t,n,e):(this._created+=1,this._checkMaxFilesIncrementing(t,n,e))}_getFile(){const e=o.extname(this._basename),t=o.basename(this._basename,e),n=this.rotationFormat?this.rotationFormat():this._created,r=!this.tailable&&this._created?`${t}${n}${e}`:`${t}${e}`;return this.zippedArchive&&!this.tailable?`${r}.gz`:r}_checkMaxFilesIncrementing(e,t,n){if(!this.maxFiles||this._created1;n--)s.push(function(n,i){let s=`${t}${n-1}${e}${a}`;const l=o.join(this.dirname,s);r.exists(l,(u=>{if(!u)return i(null);s=`${t}${n}${e}${a}`,r.rename(l,o.join(this.dirname,s),i)}))}.bind(this,n));i(s,(()=>{r.rename(o.join(this.dirname,`${t}${e}`),o.join(this.dirname,`${t}1${e}${a}`),n)}))}_createLogDirIfNotExist(e){r.existsSync(e)||r.mkdirSync(e,{recursive:!0})}}},2247:(e,t,n)=>{"use strict";const r=n(8611),o=n(5692),{Stream:i}=n(1534),s=n(6351),a=n(8588);e.exports=class extends s{constructor(e={}){super(e),this.options=e,this.name=e.name||"http",this.ssl=!!e.ssl,this.host=e.host||"localhost",this.port=e.port,this.auth=e.auth,this.path=e.path||"",this.agent=e.agent,this.headers=e.headers||{},this.headers["content-type"]="application/json",this.batch=e.batch||!1,this.batchInterval=e.batchInterval||5e3,this.batchCount=e.batchCount||10,this.batchOptions=[],this.batchTimeoutID=-1,this.batchCallback={},this.port||(this.port=this.ssl?443:80)}log(e,t){this._request(e,((t,n)=>{n&&200!==n.statusCode&&(t=new Error(`Invalid HTTP Status Code: ${n.statusCode}`)),t?this.emit("warn",t):this.emit("logged",e)})),t&&setImmediate(t)}query(e,t){"function"==typeof e&&(t=e,e={}),(e={method:"query",params:this.normalizeQuery(e)}).params.path&&(e.path=e.params.path,delete e.params.path),e.params.auth&&(e.auth=e.params.auth,delete e.params.auth),this._request(e,((e,n,r)=>{if(n&&200!==n.statusCode&&(e=new Error(`Invalid HTTP Status Code: ${n.statusCode}`)),e)return t(e);if("string"==typeof r)try{r=JSON.parse(r)}catch(e){return t(e)}t(null,r)}))}stream(e={}){const t=new i;(e={method:"stream",params:e}).params.path&&(e.path=e.params.path,delete e.params.path),e.params.auth&&(e.auth=e.params.auth,delete e.params.auth);let n="";const r=this._request(e);return t.destroy=()=>r.destroy(),r.on("data",(e=>{const r=(e=(n+e).split(/\n+/)).length-1;let o=0;for(;ot.emit("error",e))),t}_request(e,t){const n=(e=e||{}).auth||this.auth,r=e.path||this.path||"";delete e.auth,delete e.path,this.batch?this._doBatch(e,t,n,r):this._doRequest(e,t,n,r)}_doBatch(e,t,n,r){if(this.batchOptions.push(e),1===this.batchOptions.length){const e=this;this.batchCallback=t,this.batchTimeoutID=setTimeout((function(){e.batchTimeoutID=-1,e._doBatchRequest(e.batchCallback,n,r)}),this.batchInterval)}this.batchOptions.length===this.batchCount&&this._doBatchRequest(this.batchCallback,n,r)}_doBatchRequest(e,t,n){this.batchTimeoutID>0&&(clearTimeout(this.batchTimeoutID),this.batchTimeoutID=-1);const r=this.batchOptions.slice();this.batchOptions=[],this._doRequest(r,e,t,n)}_doRequest(e,t,n,i){const s=Object.assign({},this.headers);n&&n.bearer&&(s.Authorization=`Bearer ${n.bearer}`);const l=(this.ssl?o:r).request({...this.options,method:"POST",host:this.host,port:this.port,path:`/${i.replace(/^\//,"")}`,headers:s,auth:n&&n.username&&n.password?`${n.username}:${n.password}`:"",agent:this.agent});l.on("error",t),l.on("response",(e=>e.on("end",(()=>t(null,e))).resume())),l.end(Buffer.from(a(e),"utf8"))}}},2171:(e,t,n)=>{"use strict";Object.defineProperty(t,"Console",{configurable:!0,enumerable:!0,get:()=>n(9354)}),Object.defineProperty(t,"File",{configurable:!0,enumerable:!0,get:()=>n(8033)}),Object.defineProperty(t,"Http",{configurable:!0,enumerable:!0,get:()=>n(2247)}),Object.defineProperty(t,"Stream",{configurable:!0,enumerable:!0,get:()=>n(2031)})},2031:(e,t,n)=>{"use strict";const r=n(7752),{MESSAGE:o}=n(835),i=n(857),s=n(6351);e.exports=class extends s{constructor(e={}){if(super(e),!e.stream||!r(e.stream))throw new Error("options.stream is required.");this._stream=e.stream,this._stream.setMaxListeners(1/0),this.isObjectMode=e.stream._writableState.objectMode,this.eol="string"==typeof e.eol?e.eol:i.EOL}log(e,t){if(setImmediate((()=>this.emit("logged",e))),this.isObjectMode)return this._stream.write(e),void(t&&t());this._stream.write(`${e[o]}${this.eol}`),t&&t()}}},2385:(e,t,n)=>{e=n.nmd(e);const r=n(6928).join(__dirname,"desktop-notifications.node");try{global.process.dlopen(e,r)}catch(e){throw new Error("Cannot open "+r+": "+e)}},1951:(e,t,n)=>{e=n.nmd(e);const r=n(6928).join(__dirname,"registry.node");try{global.process.dlopen(e,r)}catch(e){throw new Error("Cannot open "+r+": "+e)}},2613:e=>{"use strict";e.exports=require("assert")},181:e=>{"use strict";e.exports=require("buffer")},9140:e=>{"use strict";e.exports=require("constants")},6982:e=>{"use strict";e.exports=require("crypto")},4157:e=>{"use strict";e.exports=require("electron")},4434:e=>{"use strict";e.exports=require("events")},9896:e=>{"use strict";e.exports=require("fs")},8611:e=>{"use strict";e.exports=require("http")},5692:e=>{"use strict";e.exports=require("https")},3339:e=>{"use strict";e.exports=require("module")},857:e=>{"use strict";e.exports=require("os")},6928:e=>{"use strict";e.exports=require("path")},2203:e=>{"use strict";e.exports=require("stream")},3193:e=>{"use strict";e.exports=require("string_decoder")},9023:e=>{"use strict";e.exports=require("util")},3106:e=>{"use strict";e.exports=require("zlib")},296:e=>{"use strict";e.exports={version:"3.6.0"}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}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.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})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{"use strict";var e=n(2275),t=n(6928),r=n(4157);let o=null;function i(){if(!o){const e=r.app.getPath("userData");o=t.join(e,"logs")}return o}var s=n(294),a=n.n(s),l=n(6351),u=n.n(l),c=n(835);const h={error:console.error,warn:console.warn,info:console.info,debug:console.debug};class d extends(u()){log(e,t){setImmediate((()=>this.emit("logged",e)));const n=h[e[c.LEVEL]]??console.log;try{n(e[c.MESSAGE])}catch{}t?.()}}var f=function(e,t){return e===t};const p=function(e,t){var n;void 0===t&&(t=f);var r,o=[],i=!1,s=function(e,n){return t(e,o[n])};return function(){for(var t=arguments.length,a=new Array(t),l=0;l{})),await(0,b.promisify)(this.stream.close).call(this.stream).catch((e=>{})));const e=this.stream=(0,m.createWriteStream)(n,{flags:"a"});await new Promise(((t,n)=>{e.on("open",t),e.on("error",n)})).catch((e=>{})),await C(this.logDirectory).catch((e=>{}))}void 0!==this.stream&&(await S(this.stream,`${e[c.MESSAGE]}${y.EOL}`).catch((e=>{})),this.emit("logged",e)),t?.()}close(e){this.stream?.end(e),this.stream=void 0}}const S=(0,b.promisify)(((e,t,n)=>e.write(t,n))),O=e=>(0,t.join)(e,`${((e=new Date)=>e.toISOString().split("T",1)[0])()}${w}`),C=async e=>{const n=await(e=>(0,g.readdir)(e,{withFileTypes:!0}).then((e=>e.filter((e=>e.isFile()&&_.test(e.name))))).catch((e=>{})))(e);if(n&&n.length>14){const r=n.length-14+1,o=n.sort().slice(0,r);for(const n of o)await(0,g.unlink)((0,t.join)(e,n.name)).catch((e=>{}))}};const x=p((async()=>{const t=i();return await(0,g.mkdir)(t,{recursive:!0}),function(t){const n=new E({logDirectory:t,level:"info",format:e.format.printf((({level:e,message:t})=>`${(new Date).toISOString()} - ${e}: ${t}`))});n.on("error",a());const r=new d({level:"error"});return e.configure({transports:[r,n],format:e.format.simple()}),e.log}(t)}));async function R(e,t){try{const n=await x();await new Promise(((r,o)=>{n(e,t,(e=>{e?o(e):r()}))}))}catch(e){}}var M=n(2593);const k=require("url"),A=["renderer.js","main.js"];function j(e){if(!A.some((t=>e.endsWith(t))))return null;e.startsWith("file://")&&(e=(0,k.fileURLToPath)(e));const n=`${e}.map`;if(!m.existsSync(n))return null;try{const e=m.readFileSync(n,"utf8");return{url:t.basename(n),map:e}}catch(e){return null}}const T=new WeakMap;let L;function N(e,t){return T.set(e,t),e+t.map((e=>`\n at ${e}`)).join("")}function P(e){if("string"==typeof e)return{name:"StringError",message:e};let t;return t=e&&"object"==typeof e&&"message"in e?null===e.message?"null":void 0===e.message?"undefined":"string"==typeof e.message?e.message:"object"==typeof e.message?JSON.stringify(e.message,Object.getOwnPropertyNames(e.message)):`${e.message}`:"[Unknown]",{name:e&&"object"==typeof e&&"name"in e&&"string"==typeof e.name?e.name:"[Unknown]",message:t,stack:e instanceof Error?D(e):void 0}}function D(e){let t=T.get(e);return t||((e.stack||"").toString(),t=T.get(e)),t?L(e,t):e.stack}function $(e,t){return(e=P(e)).stack?t?`${t}\n${e.stack}`:e.stack.trim():t?`${t}\n${e.name}: ${e.message}`:`${e.name}: ${e.message}`}function F(e,t){return t?$(t,e):e}global.log={error(e,t){R("error","[main] "+F(e,t))},warn(e,t){R("warn","[main] "+F(e,t))},info(e,t){R("info","[main] "+F(e,t))},debug(e,t){R("debug","[main] "+F(e,t))}};const I=require("child_process");(0,b.promisify)(I.execFile);var U=n(1630),H=n.n(U);function B(e,t){return(...n)=>(n=n.length!==t?n.slice(0,t):n,function(e,...t){return r.ipcRenderer.invoke(e,...t)}(e,...n))}function q(e,t){return(...n)=>{n=n.length!==t?n.slice(0,t):n,function(e,...t){r.ipcRenderer.send(e,...t)}(e,...n)}}q("select-all-window-contents",0),q("update-menu-state",1),q("renderer-ready",1),q("execute-menu-item-by-id",1),B("is-window-focused",0),q("focus-window",0),B("show-item-in-folder",1),q("unsafe-open-directory",1),B("open-external",1),B("move-to-trash",1),B("get-current-window-state",0),B("get-current-window-zoom-factor",0),q("dialog-did-open",0),q("set-window-zoom-factor",1),B("check-for-updates",1),q("quit-and-install-updates",0),q("quit-app",0),q("set-native-theme-source",1),B("should-use-dark-colors",0),q("minimize-window",0),q("maximize-window",0),q("unmaximize-window",0),q("close-window",0),B("is-window-maximized",0),B("get-apple-action-on-double-click",0),q("show-certificate-trust-dialog",2),B("get-path",1),B("get-app-architecture",0),B("get-app-path",0),B("is-running-under-arm64-translation",0),B("move-to-applications-folder",0),q("get-app-menu",0),B("show-contextual-menu",2),q("update-preferred-app-menu-item-labels",1),q("uncaught-exception",1),q("send-error-report",3),q("update-accounts",1),B("resolve-proxy",1),B("is-in-application-folder",0),B("show-save-dialog",1),B("show-open-dialog",1),B("save-guid",1),B("get-guid",0),B("show-notification",3),B("get-notifications-permission",0),B("request-notifications-permission",0),q("install-windows-cli",0),q("uninstall-windows-cli",0),r.shell.beep,r.shell.openPath;var z=n(5327);function G(e,t,...n){if(e.isDestroyed()){const e=`failed to send on ${t}, webContents was destroyed`;log.error(e)}else e.send(t,...n)}function W(e){return e.isFullScreen()?"full-screen":e.isMaximized()?"maximized":e.isMinimized()?"minimized":e.isVisible()?"normal":"hidden"}function Y(e){e.on("enter-full-screen",(()=>V(e,"full-screen"))),e.on("leave-full-screen",(()=>V(e,"normal"))),e.on("maximize",(()=>V(e,"maximized"))),e.on("minimize",(()=>V(e,"minimized"))),e.on("unmaximize",(()=>V(e,"normal"))),e.on("restore",(()=>V(e,"normal"))),e.on("hide",(()=>V(e,"hidden"))),e.on("show",(()=>{V(e,W(e))}))}function V(e,t){G(e.webContents,"window-state-changed",t)}function K(e){throw new Error(e)}function Z(e){const t=e.id;if(!t)throw new Error(`menuItem must specify id: ${e.label}`);const n=e.enabled,r=e.visible,o=e.label,i=e.checked,s=function(e){if(e.accelerator)return e.accelerator;if(e.role){const t=e.getDefaultRoleAccelerator;if("function"==typeof t)try{const n=t.call(e);if("string"==typeof n)return n}catch(e){console.error("Could not retrieve default accelerator",e)}}return null}(e),a=function(e){const t=e.match(/&([^&])/);return t?t[1]:null}(e.label),l=function(e){switch(e){case"normal":case"separator":case"submenu":case"checkbox":case"radio":return e;default:throw new Error(`Unable to parse string ${e} to a valid menu item type`)}}(e.type);switch(l){case"normal":return{id:t,type:"menuItem",label:o,enabled:n,visible:r,accelerator:s,accessKey:a};case"separator":return{id:t,type:"separator",visible:r};case"submenu":return{id:t,type:"submenuItem",label:o,enabled:n,visible:r,menu:J(e.submenu,t),accessKey:a};case"checkbox":return{id:t,type:"checkbox",label:o,enabled:n,visible:r,accelerator:s,checked:i,accessKey:a};case"radio":return{id:t,type:"radio",label:o,enabled:n,visible:r,accelerator:s,checked:i,accessKey:a};default:return function(e,t){throw new Error(t)}(0,`Unknown menu item type ${l}`)}}function J(e,t){return{id:t,type:"menu",items:e.items.map(Z)}}function X(){const e=process.hrtime();return 1e3*e[0]+e[1]/1e6}var Q=n(9734),ee=n.n(Q);const te=new Set,ne=e=>{te.add(e.id),e.on("destroyed",(()=>te.delete(e.id)))},re=e=>te.has(e.id);function oe(e,t){r.ipcMain.on(e,se(t))}function ie(e,t){r.ipcMain.handle(e,se(t))}function se(e){return(t,...n)=>{if(re(t.sender))return e(t,...n);log.error(`IPC message received from invalid sender: ${t.senderFrame?.url}`)}}var ae=n(3575);function le(e){try{const t=r.shell.readShortcutLink(e);if(void 0===t.toastActivatorClsid||""===t.toastActivatorClsid)return;return t.toastActivatorClsid}catch(t){return void log.error(`Error looking for toast activator CLSID in shortcut ${e}`,t)}}let ue;var ce=n(6982),he=n(8030),de=n.n(he);function fe(e){if("undefined"!=typeof window&&window.crypto){const t=new Uint8Array(e);return crypto.getRandomValues(t),t}return(0,ce.randomBytes)(e)}function pe(){return de()({random:fe(16)})}let ge;const me=()=>(0,t.join)(r.app.getPath("userData"),".update-id"),ye=e=>(0,g.writeFile)(me(),e).then((()=>e));class be{window;emitter=new z.Emitter;_loadTime=null;_rendererReadyTime=null;isDownloadingUpdate=!1;minWidth=960;minHeight=660;shouldMaximizeOnShow=!1;constructor(){const e=ee()({defaultWidth:this.minWidth,defaultHeight:this.minHeight,maximize:!1}),t={x:e.x,y:e.y,width:e.width,height:e.height,minWidth:this.minWidth,minHeight:this.minHeight,show:!1,backgroundColor:"#fff",webPreferences:{disableBlinkFeatures:"Auxclick",nodeIntegration:!0,spellcheck:!0,contextIsolation:!1},acceptFirstMouse:!0,frame:!1};this.window=new r.BrowserWindow(t),ne(this.window.webContents),function(e){(0,ae.bz)(((t,n,r)=>{G(e.webContents,"notification-event",t,n,r)}))}(this.window),e.manage(this.window),this.shouldMaximizeOnShow=e.isMaximized;let n=!1,o=!1;r.app.on("before-quit",(()=>{n=!0})),oe("will-quit",(e=>{n=!0,e.returnValue=!0})),oe("will-quit-even-if-updating",(e=>{n=!0,o=!0,e.returnValue=!0})),oe("cancel-quitting",(e=>{n=!1,o=!1,e.returnValue=!0})),this.window.on("close",(e=>{if(!o&&this.isDownloadingUpdate)return e.preventDefault(),G(this.window.webContents,"show-installing-update"),void this.show();r.nativeTheme.removeAllListeners(),r.autoUpdater.removeAllListeners(),(0,ae.op)()}))}load(){let e=0;var n;this.window.webContents.once("did-start-loading",(()=>{this._rendererReadyTime=null,this._loadTime=null,e=X()})),this.window.webContents.once("did-finish-load",(()=>{this._loadTime=X()-e,this.maybeEmitDidLoad()})),this.window.webContents.on("did-finish-load",(()=>{this.window.webContents.setVisualZoomLevelLimits(1,1)})),this.window.webContents.on("did-fail-load",(()=>{this.window.webContents.openDevTools(),this.window.show()})),n=(e,t)=>{this._rendererReadyTime=t,this.maybeEmitDidLoad()},r.ipcMain.once("renderer-ready",se(n)),this.window.on("focus",(()=>G(this.window.webContents,"focus"))),this.window.on("blur",(()=>G(this.window.webContents,"blur"))),Y(this.window),this.window.loadURL(((...e)=>(0,k.pathToFileURL)(t.resolve(...e)).toString())(__dirname,"index.html")),r.nativeTheme.addListener("updated",(()=>{G(this.window.webContents,"native-theme-updated")})),this.setupAutoUpdater()}maybeEmitDidLoad(){this.rendererLoaded&&this.emitter.emit("did-load",null)}get rendererLoaded(){return!!this.loadTime&&!!this.rendererReadyTime}onClosed(e){this.window.on("closed",e)}onDidLoad(e){return this.emitter.on("did-load",e)}isMinimized(){return this.window.isMinimized()}isVisible(){return this.window.isVisible()}restore(){this.window.restore()}isFocused(){return this.window.isFocused()}focus(){this.window.focus()}selectAllWindowContents(){this.window.webContents.selectAll()}show(){this.window.show(),this.shouldMaximizeOnShow&&(this.shouldMaximizeOnShow=!1,this.window.maximize())}sendMenuEvent(e){this.show(),G(this.window.webContents,"menu-event",e)}sendURLAction(e){this.show(),G(this.window.webContents,"url-action",e)}sendCLIAction(e){this.show(),G(this.window.webContents,"cli-action",e)}sendLaunchTimingStats(e){G(this.window.webContents,"launch-timing-stats",e)}sendAppMenu(){const e=r.Menu.getApplicationMenu();if(e){const t=J(e);G(this.window.webContents,"app-menu",t)}}dialogDidOpen(){this.window.isFocused()||(this.window.once("focus",(()=>this.window.flashFrame(!1))),this.window.flashFrame(!0))}sendCertificateError(e,t,n){G(this.window.webContents,"certificate-error",e,t,n)}showCertificateTrustDialog(e,t){r.dialog.showCertificateTrustDialog(this.window,{certificate:e,message:t},(()=>{}))}get loadTime(){return this._loadTime}get rendererReadyTime(){return this._rendererReadyTime}destroy(){this.window.destroy()}setupAutoUpdater(){r.autoUpdater.on("error",(e=>{this.isDownloadingUpdate=!1,G(this.window.webContents,"auto-updater-error",e)})),r.autoUpdater.on("checking-for-update",(()=>{this.isDownloadingUpdate=!1,G(this.window.webContents,"auto-updater-checking-for-update")})),r.autoUpdater.on("update-available",(()=>{this.isDownloadingUpdate=!0,G(this.window.webContents,"auto-updater-update-available")})),r.autoUpdater.on("update-not-available",(()=>{this.isDownloadingUpdate=!1,G(this.window.webContents,"auto-updater-update-not-available")})),r.autoUpdater.on("update-downloaded",(()=>{this.isDownloadingUpdate=!1,G(this.window.webContents,"auto-updater-update-downloaded")}))}async checkForUpdates(e){try{r.autoUpdater.setFeedURL({url:await ve(e)}),r.autoUpdater.checkForUpdates()}catch(e){return e}}quitAndInstallUpdate(){r.autoUpdater.quitAndInstall()}minimizeWindow(){this.window.minimize()}maximizeWindow(){this.window.maximize()}unmaximizeWindow(){this.window.unmaximize()}closeWindow(){this.window.close()}isMaximized(){return this.window.isMaximized()}getCurrentWindowState(){return W(this.window)}getCurrentWindowZoomFactor(){return this.window.webContents.zoomFactor}setWindowZoomFactor(e){this.window.webContents.zoomFactor=e}async showSaveDialog(e){const{canceled:t,filePath:n}=await r.dialog.showSaveDialog(this.window,e);return t||void 0===n?null:n}async showOpenDialog(e){const{filePaths:t}=await r.dialog.showOpenDialog(this.window,e);return t.length>0?t[0]:null}}const ve=async e=>{try{const t=await(async()=>ge??(0,g.readFile)(me(),"utf8").then((e=>e.trim())).then((e=>36===e.length?e:ye(pe()))).catch((()=>ye(pe()))).catch((e=>{log.error("Could not read update id",e)})).then((e=>ge=e)))();if(!t)return e;const n=new URL(e);return n.searchParams.set("guid",t),n.toString()}catch(t){return e}};function we(e){return e.id||e.label||e.role||"unknown"}function _e(e,t="@",n=new Set){for(const r of e){let e=0,o=r.id;if(!o)do{o=`${t}.${we(r)}${e++||""}`}while(n.has(o));r.id=o,n.add(o),r.submenu&&_e(r.submenu,r.id,n)}}function Ee(e){const t=e.endsWith("\\")?e:`${e}\\`;r.shell.openPath(t).then((t=>{""!==t&&log.error(`Failed to open directory (${e}): ${t}`)}))}const Se=()=>"1"===process.env.GITHUB_DESKTOP_PREVIEW_FEATURES||!1;var Oe;!function(e){e[e.Reset=0]="Reset",e[e.In=1]="In",e[e.Out=2]="Out"}(Oe||(Oe={}));const Ce={type:"separator"};function xe({selectedExternalEditor:e,selectedShell:t,askForConfirmationOnForcePush:n,askForConfirmationOnRepositoryRemoval:o,hasCurrentPullRequest:s=!1,contributionTargetDefaultBranch:a="default branch",isForcePushForCurrentRepository:l=!1,isStashedChangesVisible:u=!1,askForConfirmationWhenStashingAllChanges:c=!0,isChangesFilterVisible:h=!0}){a=function(e){if(e.length<=25)return e;const t=[...e];if(t.length<=25)return e;const n=t.reduce(((e,t)=>(t>="︀"&&t<="️"?e.length&&e.push(`${e.pop()}${t}`):e.push(t),e)),[]);return n.length<=25?e:`${n.slice(0,25).join("")}…`}(a);const d=o?"删除":"&Remove",f=s?"在 GitHub 上查看Pull(拉取)请求":"创建拉取(Pull)请求",p=new Array,m={label:"文件",submenu:[{label:"新建存储库",id:"new-repository",click:Me("create-repository"),accelerator:"CmdOrCtrl+N"},Ce,{label:"添加存储库",id:"add-local-repository",accelerator:"CmdOrCtrl+O",click:Me("add-local-repository")},{label:"克隆存储库",id:"clone-repository",accelerator:"CmdOrCtrl+Shift+O",click:Me("clone-repository")}]};{const e="Alt+F4";m.submenu.push(Ce,{label:"选项",id:"preferences",accelerator:"CmdOrCtrl+,",click:Me("show-preferences")},Ce,{role:"quit",label:"退出",accelerator:e})}p.push(m),p.push({label:"编辑",submenu:[{role:"undo",label:"撤消"},{role:"redo",label:"恢复"},Ce,{role:"cut",label:"剪切"},{role:"copy",label:"复制"},{role:"paste",label:"粘贴"},{label:"全选",accelerator:"CmdOrCtrl+A",click:Me("select-all")},Ce,{id:"find",label:"查找",accelerator:"CmdOrCtrl+F",click:Me("find-text")}]}),p.push({label:"视图",submenu:[{label:"更改",id:"show-changes",accelerator:"CmdOrCtrl+1",click:Me("show-changes")},{label:"历史",id:"show-history",accelerator:"CmdOrCtrl+2",click:Me("show-history")},{label:"存储库列表",id:"show-repository-list",accelerator:"CmdOrCtrl+T",click:Me("choose-repository")},{label:"分支列表",id:"show-branches-list",accelerator:"CmdOrCtrl+B",click:Me("show-branches")},Ce,{label:"填写摘要",id:"go-to-commit-message",accelerator:"CmdOrCtrl+G",click:Me("go-to-commit-message")},{label:Re(u),id:"toggle-stashed-changes",accelerator:"Ctrl+H",click:Me(u?"hide-stashed-changes":"show-stashed-changes")},{label:(h?"Hide":"Show")+" Toggle Chan&ges Filter",id:"toggle-changes-filter",accelerator:"CmdOrCtrl+L",click:Me("toggle-changes-filter")},{label:"全屏",role:"togglefullscreen"},Ce,{label:"重置缩放",accelerator:"CmdOrCtrl+0",click:je(Oe.Reset)},{label:"放大",accelerator:"CmdOrCtrl+=",click:je(Oe.In)},{label:"缩小",accelerator:"CmdOrCtrl+-",click:je(Oe.Out)},{label:"展开选中",id:"increase-active-resizable-width",accelerator:"CmdOrCtrl+9",click:Me("increase-active-resizable-width")},{label:"收起选中",id:"decrease-active-resizable-width",accelerator:"CmdOrCtrl+8",click:Me("decrease-active-resizable-width")},Ce,{label:"重新加载",id:"reload-window",accelerator:"CmdOrCtrl+Alt+R",click(e,t){t instanceof r.BrowserWindow&&t.reload()},visible:!1},{id:"show-devtools",label:"开发者工具",accelerator:"Ctrl+Shift+I",click(e,t){t instanceof r.BrowserWindow&&t.webContents.toggleDevTools()}}]});const y=function(e,t){return e?t?"强制推送…":"强制推送":"推送"}(l,n),b=l?"force-push":"push";p.push({label:"存储库",id:"repository",submenu:[{id:"push",label:y,accelerator:"CmdOrCtrl+P",click:Me(b)},{id:"pull",label:"拉取",accelerator:"CmdOrCtrl+Shift+P",click:Me("pull")},{id:"fetch",label:"同步",accelerator:"CmdOrCtrl+Shift+T",click:Me("fetch")},{label:d,id:"remove-repository",accelerator:"CmdOrCtrl+Backspace",click:Me("remove-repository")},Ce,{id:"view-repository-on-github",label:"在GitHub上查看",accelerator:"CmdOrCtrl+Shift+G",click:Me("view-repository-on-github")},{label:`在${t ?? ""}中打开`,id:"open-in-shell",accelerator:"Ctrl+`",click:Me("open-in-shell")},{label:"在资源管理器中显示",id:"open-working-directory",accelerator:"CmdOrCtrl+Shift+F",click:Me("open-working-directory")},{label:`在 ${e ?? ""}中打开`,id:"open-external-editor",accelerator:"CmdOrCtrl+Shift+A",click:Me("open-external-editor")},Ce,{id:"create-issue-in-repository-on-github",label:"在GitHub上创建问题(issue)",accelerator:"CmdOrCtrl+I",click:Me("create-issue-in-repository-on-github")},Ce,{label:"存储库设置",id:"show-repository-settings",click:Me("show-repository-settings")}]});const v=[{label:"新建",id:"create-branch",accelerator:"CmdOrCtrl+Shift+N",click:Me("create-branch")},{label:"重命名",id:"rename-branch",accelerator:"CmdOrCtrl+Shift+R",click:Me("rename-branch")},{label:"删除",id:"delete-branch",accelerator:"CmdOrCtrl+Shift+D",click:Me("delete-branch")},Ce,{label:"放弃所有更改",id:"discard-all-changes",accelerator:"CmdOrCtrl+Shift+Backspace",click:Me("discard-all-changes")},{label:c?"暂存所有更改(stash)":"暂存所有更改(stash)",id:"stash-all-changes",accelerator:"CmdOrCtrl+Shift+S",click:Me("stash-all-changes")},Ce,{label:`从${a}更新`,id:"update-branch-with-contribution-target-branch",accelerator:"CmdOrCtrl+Shift+U",click:Me("update-branch-with-contribution-target-branch")},{label:"与其他分支比较",id:"compare-to-branch",accelerator:"CmdOrCtrl+Shift+B",click:Me("compare-to-branch")},{label:"合并到当前分支",id:"merge-branch",accelerator:"CmdOrCtrl+Shift+M",click:Me("merge-branch")},{label:"压缩合并到当前分支",id:"squash-and-merge-branch",accelerator:"CmdOrCtrl+Shift+H",click:Me("squash-and-merge-branch")},{label:"变基当前分支(Rebase)",id:"rebase-branch",accelerator:"CmdOrCtrl+Shift+E",click:Me("rebase-branch")},Ce,{label:"在GitHub上比较",id:"compare-on-github",accelerator:"CmdOrCtrl+Shift+C",click:Me("compare-on-github")},{label:"在GitHub上查看",id:"branch-on-github",accelerator:"CmdOrCtrl+Alt+B",click:Me("branch-on-github")}];v.push({label:"预览拉取请求",id:"preview-pull-request",accelerator:"CmdOrCtrl+Alt+P",click:Me("preview-pull-request")}),v.push({label:f,id:"create-pull-request",accelerator:"CmdOrCtrl+R",click:Me("open-pull-request")}),p.push({label:"分支",id:"branch",submenu:v});const w=[{label:"问题反馈",click(){r.shell.openExternal("https://github.com/desktop/desktop/issues/new/choose").catch((e=>log.error("Failed opening issue creation page",e)))}},{label:"联系GitHub支持",click(){r.shell.openExternal(`https://github.com/contact?from_desktop_app=1&app_version=${r.app.getVersion()}`).catch((e=>log.error("Failed opening contact support page",e)))}},{label:"用户指南",click(){r.shell.openExternal("https://docs.github.com/en/desktop").catch((e=>log.error("Failed opening user guides page",e)))}},{label:"键盘快捷键",click(){r.shell.openExternal("https://docs.github.com/en/desktop/installing-and-configuring-github-desktop/overview/keyboard-shortcuts").catch((e=>log.error("Failed opening keyboard shortcuts page",e)))}},{label:"日志",click(){const e=i();(0,g.mkdir)(e,{recursive:!0}).then((()=>Ee(e))).catch((e=>log.error("无法打开日志目录",e)))}}];return w.push(...function(){if(!Se())return[];const e=[];e.push(Ce,{label:"Command Line Tool",submenu:[{label:"Install",click:Me("install-windows-cli")},{label:"Uninstall",click:Me("uninstall-windows-cli")}]});const t=[{label:"Confirm Committing Conflicted Files",click:Me("test-confirm-committing-conflicted-files")},{label:"Discarded Changes Will Be Unrecoverable",click:Me("test-discarded-changes-will-be-unrecoverable")},{label:"Do you want to fork this repository?",click:Me("test-do-you-want-fork-this-repository")},{label:"Newer Commits On Remote",click:Me("test-newer-commits-on-remote")},{label:"Files Too Large",click:Me("test-files-too-large")},{label:"Generic Git Authentication",click:Me("test-generic-git-authentication")},{label:"Invalidated Account Token",click:Me("test-invalidated-account-token")}];return t.push({label:"Push Rejected",click:Me("test-push-rejected")},{label:"Re-Authorization Required",click:Me("test-re-authorization-required")},{label:"Unable to Locate Git",click:Me("test-unable-to-locate-git")},{label:"Unable to Open External Editor",click:Me("test-no-external-editor")},{label:"Unable to Open Shell",click:Me("test-unable-to-open-shell")},{label:"Untrusted Server",click:Me("test-untrusted-server")},{label:"Update Existing Git LFS Filters?",click:Me("test-update-existing-git-lfs-filters")},{label:"Upstream Already Exists",click:Me("test-upstream-already-exists")}),e.push(Ce,{label:"Crash main process…",click(){throw new Error("Boomtown!")}},{label:"Crash renderer process…",click:Me("boomtown")},{label:"Prune branches",click:Me("test-prune-branches")},{label:"Show notification",click:Me("test-notification")},{label:"Show popup",submenu:[{label:"Release notes",click:Me("test-release-notes-popup")},{label:"Thank you",click:Me("test-thank-you-popup")},{label:"Show App Error",click:Me("test-app-error")},{label:"Octicons",click:Me("test-icons")},{label:"About dialog (test mode)",click:Me("test-about-dialog")}]},{label:"Show banner",submenu:[{label:"Update banner",click:Me("test-update-banner")},{label:"Update banner (priority)",click:Me("test-prioritized-update-banner")},{label:"Showcase Update banner",click:Me("test-showcase-update-banner")},{label:"Arm64 banner",click:Me("test-arm64-banner")},{label:"Thank you",click:Me("test-thank-you-banner")},{label:"Reorder Successful",click:Me("test-reorder-banner")},{label:"Reorder Undone",click:Me("test-undone-banner")},{label:"Cherry Pick Conflicts",click:Me("test-cherry-pick-conflicts-banner")},{label:"Merge Successful",click:Me("test-merge-successful-banner")},{label:"OS Version No Longer Supported",click:Me("test-os-version-no-longer-supported")}]},{label:"Show Error Dialogs",submenu:t}),e}()),p.push({label:"帮助",submenu:[...w,Ce,{label:"关于",click:Me("show-about"),id:"about"}]}),_e(p),r.Menu.buildFromTemplate(p)}function Re(e){return e?"隐藏暂存更改":"显示暂存更改"}function Me(e){return(t,n)=>{const o=n instanceof r.BrowserWindow?n:r.BrowserWindow.getAllWindows()[0];void 0!==o&&G(o.webContents,"menu-event",e)}}const ke=[.67,.75,.8,.9,1,1.1,1.25,1.5,1.75,2],Ae=ke.slice().reverse();function je(e){return(t,n)=>{if(!(n instanceof r.BrowserWindow))return;const{webContents:o}=n;if(e===Oe.Reset)o.zoomFactor=1,G(o,"zoom-factor-changed",1);else{const t=o.zoomFactor,n=e===Oe.In?ke:Ae,r=(i=t,n.reduce(((e,t)=>Math.abs(t-i)e===Oe.In?t>r:t!1)),p((()=>!1)),p((()=>!1)),p((()=>!1));const De=p((()=>!1)),$e=(p((()=>!1)),p((()=>!1)),p((()=>function(){const e=Pe();return void 0!==e&&(0,Ne.compare)(e,"10.0.17666",">=")}())),p((()=>function(){const e=Pe();return void 0!==e&&(0,Ne.compare)(e,"10","<")}()))),Fe=p((()=>!1));p((()=>Fe()||$e())),new Set(["LOCAL_GIT_DIRECTORY"]);const Ie=/[\x00-\x20\x7F~^:?*\[\\|""<>]+|@{|\.\.+|^\.|\.$|\.lock$|\/$/g;function Ue(e,t){const n=e[t];return null==n?null:Array.isArray(n)?n[0]:n}var He=n(5303);function Be(){for(const t of(0,He.enumerateValues)(He.HKEY.HKEY_CURRENT_USER,"Environment"))if("Path"===t.name&&((e=t).type===He.RegistryValueType.REG_SZ||e.type===He.RegistryValueType.REG_EXPAND_SZ))return t;var e;return null}function qe(){const e=Be();if(null===e)throw new Error("Could not find PATH environment variable");return e.data.split(";").filter((e=>e.length>0))}async function ze(e){const t=Be();if(null===t)throw new Error("Could not find PATH environment variable");try{(0,He.setValue)(He.HKEY.HKEY_CURRENT_USER,"Environment","Path",t.type,e.join(";"))}catch(e){throw log.error("Failed setting PATH environment variable",e),new Error("Could not set the PATH environment variable")}}const Ge=t.resolve(process.execPath,".."),We=t.resolve(Ge,".."),Ye=t.resolve(t.join(We,"Update.exe")),Ve=t.basename(process.execPath);async function Ke(){const e=Je();await(0,g.mkdir)(e,{recursive:!0}),await function(e){const n=`@echo off\n"%~dp0\\${Xe(e,"resources/app/static/github.bat")}" %*`,r=t.join(e,"github.bat");return(0,g.writeFile)(r,n)}(e),await function(e){const n=`#!/usr/bin/env bash\n DIR="$( cd "$( dirname "\${BASH_SOURCE[0]}" )" && pwd )"\n sh "$DIR/${Xe(e,"resources/app/static/github.sh").replace(/\\/g,"/")}" "$@"`,r=t.join(e,"github");return(0,g.writeFile)(r,n,{encoding:"utf8",mode:755})}(e);try{const t=qe();t.indexOf(e)<0&&await ze([...t,e])}catch(e){log.error("Failed inserting bin path into PATH environment variable",e)}}async function Ze(){try{const e=qe(),t=Je();return ze(e.filter((e=>e!==t)))}catch(e){log.error("Failed removing bin path from PATH environment variable",e)}}function Je(){return t.resolve(process.execPath,"../../bin")}function Xe(e,n){const r=t.resolve(process.execPath,"..");return t.relative(e,t.join(r,n))}async function Qe(e){await function(e,t){try{const n=(0,I.spawn)(e,t);return new Promise(((r,o)=>{let i="";n.stdout&&n.stdout.on("data",(e=>{i+=e})),n.on("close",(n=>{0===n?r(i):o(new Error(`Command "${e} ${t}" failed: "${i}"`))})),n.on("error",(e=>{o(e)})),n.stdin&&n.stdin.end()}))}catch(e){return Promise.reject(e)}}(Ye,e)}function et(e){return Qe(["--createShortcut",Ve,"-l",e.join(",")])}function tt(e){return nt(e)?"x64-emulated":"arm64"===process.arch?"arm64":"x64"}function nt(e){return"x64"===process.arch&&!0===e.runningUnderARM64Translation}let rt=null;async function ot(){if(!rt){let e=await async function(){let e;try{e=(await(0,g.readFile)(st(),"utf8")).trim(),36!==e.length&&(e=void 0)}catch(e){}return e}();void 0===e&&(e=pe(),await it(e).catch((e=>{log.error(e)}))),rt=e}return rt}async function it(e){rt=e,await(0,g.writeFile)(st(),e,"utf8")}const st=()=>(0,t.join)(r.app.getPath("userData"),".guid");let at=!1;async function lt(e,t,n){if(!0!==n){if(at)return;at=!0}const o=new Map;if(o.set("name",e.name),o.set("message",e.message),e.stack&&o.set("stack",e.stack),o.set("platform","win32"),o.set("architecture",tt(r.app)),o.set("sha","849ad0174b8e568ed342c7e5f6bada062230b838"),o.set("version",r.app.getVersion()),o.set("guid",await ot()),t)for(const e of Object.keys(t))o.set(e,t[e]);const i=[...o.entries()].map((([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(t)}`)).join("&");try{await new Promise(((e,t)=>{const o=n?"https://central.github.com/api/desktop-non-fatal/exception":"https://central.github.com/api/desktop/exception",s=r.net.request({method:"POST",url:o});s.setHeader("Content-Type","application/x-www-form-urlencoded"),s.on("response",(n=>{200===n.statusCode?e():t(`Got ${n.statusCode} - ${n.statusMessage} from central`)})),s.on("error",t),s.end(i)})),log.info("Error report submitted")}catch(t){log.error("Failed submitting error report",e)}}class ut{window;emitter=new z.Emitter;errorType;error;hasFinishedLoading=!1;hasSentReadyEvent=!1;constructor(e,t){this.window=new r.BrowserWindow({width:600,height:500,minWidth:600,minHeight:500,show:!1,backgroundColor:"#fff",webPreferences:{disableBlinkFeatures:"Auxclick",nodeIntegration:!0,spellcheck:!1,contextIsolation:!1},frame:!1}),ne(this.window.webContents),this.error=t,this.errorType=e}load(){log.debug("Starting crash process"),this.window.webContents.once("did-start-loading",(()=>{log.debug("Crash process in startup")})),this.window.webContents.once("did-finish-load",(()=>{log.debug("Crash process started"),this.hasFinishedLoading=!0,this.maybeEmitDidLoad()})),this.window.webContents.on("did-finish-load",(()=>{this.window.webContents.setVisualZoomLevelLimits(1,1)})),this.window.webContents.on("did-fail-load",(()=>{log.error("Crash process failed to load"),this.emitter.emit("did-fail-load",null)})),oe("crash-ready",(()=>{log.debug("Crash process is ready"),this.hasSentReadyEvent=!0,this.sendError(),this.maybeEmitDidLoad()})),oe("crash-quit",(()=>{log.debug("Got quit signal from crash process"),this.window.close()})),Y(this.window),this.window.loadURL(`file://${__dirname}/crash.html`)}maybeEmitDidLoad(){this.hasFinishedLoading&&this.hasSentReadyEvent&&this.emitter.emit("did-load",null)}onClose(e){this.window.on("closed",e)}onFailedToLoad(e){this.emitter.on("did-fail-load",e)}onDidLoad(e){return this.emitter.on("did-load",e)}focus(){this.window.focus()}show(){log.debug("Showing crash process window"),this.window.show()}sendError(){const e={stack:this.error.stack,message:this.error.message,name:this.error.name},t={type:this.errorType,error:e};G(this.window.webContents,"error",t)}destroy(){this.window.destroy()}}let ct=!1;function ht(e,t){return(e?e.toLowerCase():e)===(t?t.toLowerCase():t)}function dt(){const e=r.Menu.buildFromTemplate([{role:"editMenu"}]).items[0];return(e&&e.submenu?e.submenu.items:[]).filter((e=>!ht(e.role,"pasteandmatchstyle")))}function ft(e,t,n){const r=pt(e,t);if(void 0===n)return r;for(const e of n)r.append(e);return r}function pt(e,t,n=[]){const o=new r.Menu;for(const[i,s]of e.entries())if(ht(s.role,"editmenu"))for(const e of dt())o.append(e);else{const e=[...n,i];o.append(new r.MenuItem({label:s.label,type:s.type,enabled:s.enabled,role:s.role,click:()=>t(e),submenu:s.submenu?pt(s.submenu,t,e):void 0}))}return o}class gt{subscribe;listeners=new Set;constructor(e){this.subscribe=e}addEventListener(e){const t=0===this.listeners.size;this.listeners.add(e),t&&this.subscribe((e=>this.listeners.forEach((t=>t(e)))))}removeEventListener(e){this.listeners.delete(e),0===this.listeners.size&&this.subscribe(null)}}class mt{subscribe;eventHandler;listeners=new Set;constructor(e,t){this.subscribe=e,this.eventHandler=t}addEventListener(e){const t=0===this.listeners.size;this.listeners.add(e),t&&this.subscribe((async(e,t)=>{t(await this.eventHandler([...this.listeners],e))}))}removeEventListener(e){this.listeners.delete(e),0===this.listeners.size&&this.subscribe(null)}}class yt{onBeforeRedirect;onBeforeRequest;onBeforeSendHeaders;onCompleted;onErrorOccurred;onHeadersReceived;onResponseStarted;onSendHeaders;constructor(e){this.onBeforeRedirect=new gt(e.onBeforeRedirect.bind(e)),this.onBeforeRequest=new mt(e.onBeforeRequest.bind(e),(async(e,t)=>{let n={};for(const r of e)if(n=await r(t),!0===n.cancel||void 0!==n.redirectURL)break;return n})),this.onBeforeSendHeaders=new mt(e.onBeforeSendHeaders.bind(e),(async(e,t)=>{let n=t,r={};for(const t of e){if(r=await t(n),!0===r.cancel)break;if(void 0!==r.requestHeaders){const e=bt(r.requestHeaders);n={...n,requestHeaders:e}}}return n})),this.onCompleted=new gt(e.onCompleted.bind(e)),this.onErrorOccurred=new gt(e.onErrorOccurred.bind(e)),this.onHeadersReceived=new mt(e.onHeadersReceived.bind(e),(async(e,t)=>{let n=t,r={};for(const t of e){if(r=await t(n),!0===r.cancel)break;if(void 0!==r.responseHeaders){const e=vt(r.responseHeaders);n={...n,responseHeaders:e}}if(void 0!==r.statusLine){const{statusLine:e}=r,t=parseInt(e.split(" ",2)[1],10);n={...n,statusLine:e,statusCode:t}}}return n})),this.onResponseStarted=new gt(e.onResponseStarted.bind(e)),this.onSendHeaders=new gt(e.onSendHeaders.bind(e))}}const bt=e=>Object.entries(e).reduce(((e,[t,n])=>(e[t]=Array.isArray(n)?n.join(","):n,e)),{}),vt=e=>Object.entries(e).reduce(((e,[t,n])=>(e[t]=Array.isArray(n)?n:n.split(","),e)),{});Error;var wt=n(3657);const _t=new wt.SemVer("3.1.0"),Et=(new Map,new Map),St=e=>{if(e===Dt())return!0;const{hostname:t}=new URL(e);return"api.github.com"===t||"github.com"===t},Ot=e=>new URL(e).hostname.endsWith(".ghe.com");function Ct(e){const t=`endpoint-version:${e}`,n=Et.get(t);if(void 0!==n)return n;const r=localStorage.getItem(t),o=null===r?null:wt.parse(r);return null!==o&&Et.set(t,o),o}function xt(e,t,n){return void 0!==e&&!1!==e&&(!0===e?t:(null==n&&K("Need to provide a version to compare against"),t&&wt.satisfies(n,e)))}const Rt=({dotcom:e,ghe:t,es:n},r=Ct)=>o=>xt(e,St(o))||xt(t??e,Ot(o))||xt(n,(e=>!St(e)&&!Ot(e))(o),r(o)??_t);var Mt;Rt({es:">= 3.0.0"}),Rt({dotcom:!0,es:">= 3.4.0"}),Rt({dotcom:!0}),Rt({dotcom:!0}),Rt({dotcom:!0}),Rt({dotcom:!0}),new Set,function(e){e[e.NotModified=304]="NotModified",e[e.BadRequest=400]="BadRequest",e[e.Unauthorized=401]="Unauthorized",e[e.PaymentRequired=402]="PaymentRequired",e[e.Forbidden=403]="Forbidden",e[e.NotFound=404]="NotFound",e[e.TooManyRequests=429]="TooManyRequests"}(Mt||(Mt={})),Error;const kt=process.env.DESKTOP_GITHUB_DOTCOM_API_ENDPOINT,At=process.env.DESKTOP_GITHUB_DOTCOM_HTML_URL,jt=process.env.DESKTOP_GITHUB_DOTCOM_ADDITIONAL_COOKIES;var Tt,Lt,Nt,Pt;function Dt(){return kt&&kt.length>0?kt:"https://api.github.com"}void 0!==jt&&(document.cookie+="; "+jt),Error,function(e){e.Queued="queued",e.InProgress="in_progress",e.Completed="completed"}(Tt||(Tt={})),function(e){e.ActionRequired="action_required",e.Canceled="cancelled",e.TimedOut="timed_out",e.Failure="failure",e.Neutral="neutral",e.Success="success",e.Skipped="skipped",e.Stale="stale"}(Lt||(Lt={})),function(e){e.Creation="creation",e.Update="update",e.RequiredDeployments="required_deployments",e.RequiredSignatures="required_signatures",e.RequiredStatusChecks="required_status_checks",e.PullRequest="pull_request",e.CommitMessagePattern="commit_message_pattern",e.CommitAuthorEmailPattern="commit_author_email_pattern",e.CommitterEmailPattern="committer_email_pattern",e.BranchNamePattern="branch_name_pattern"}(Nt||(Nt={})),function(e){e.StartsWith="starts_with",e.EndsWith="ends_with",e.Contains="contains",e.RegexMatch="regex"}(Pt||(Pt={})),new Set,new Set(["dev.azure.com","gitlab.com","bitbucket.org","amazonaws.com","visualstudio.com"]);const $t="Set spellcheck to English",Ft="Set spellcheck to system language";var It=n(9919),Ut=n.n(It);r.app.setAppLogsPath(),function(){M.install({environment:"node",handleUncaughtExceptions:!1,retrieveSourceMap:j});const e=Error;L=e.prepareStackTrace,e.prepareStackTrace=N}();let Ht=null;const Bt=X();let qt=!1,zt=null,Gt=[];function Wt(e){qt=!0;const t=null===Ht;Ht&&(Ht.destroy(),Ht=null),function(e,t){if(log.error($(t)),ct)return;ct=!0,function(){const e=r.Menu.getApplicationMenu();if(e)for(const t of e.items)Te(t)}();const n=new ut(e?"launch":"generic",t);n.onDidLoad((()=>{n.show()})),n.onFailedToLoad((async()=>{await r.dialog.showMessageBox({type:"error",title:"Unrecoverable error",message:`GitHub Desktop has encountered an unrecoverable error and will need to restart.\n\nThis has been reported to the team, but if you encounter this repeatedly please report this issue to the GitHub Desktop issue tracker.\n\n${t.stack||t.message}`}),r.app.relaunch(),r.app.quit()})),n.onClose((()=>{r.app.relaunch(),r.app.quit()})),n.load()}(t,e)}function Yt(){return{uptime:((X()-Bt)/1e3).toFixed(3),time:(new Date).toString()}}const Vt=new Set(["x-github-client"]);Vt.add("x-github-desktop-auth"),Vt.add("github-windows"),r.app.on("window-all-closed",(()=>{})),process.on("uncaughtException",(e=>{lt(e=P(e),Yt()),Wt(e)}));let Kt=!1;if(process.argv.length>1){const e=process.argv[1],n=function(e){switch(e){case"--squirrel-install":return async function(){await et(["StartMenu","Desktop"]),await Ke()}();case"--squirrel-updated":return async function(){await async function(){const e=y.homedir();if(e){const r=t.join(e,"Desktop","GitHub Desktop.lnk");return et(await(n=r,(0,g.access)(n).then(H()(!0),H()(!1)))?["StartMenu","Desktop"]:["StartMenu"])}var n;return et(["StartMenu","Desktop"])}(),await Ke()}();case"--squirrel-uninstall":return async function(){return await Qe(["--removeShortcut",Ve]),Ze()}();case"--squirrel-obsolete":return Promise.resolve()}return null}(e);n&&(Kt=!0,n.catch((t=>log.error(`Failed handling Squirrel event: ${e}`,t))).then((()=>r.app.quit())))}function Zt(e){log.info("Processing protocol url");const t=function(e){const t=k.parse(e,!0),n=t.hostname,r={name:"unknown",url:e};if(!n)return r;const o=t.query,i=n.toLowerCase();if("oauth"===i){const e=Ue(o,"code"),t=Ue(o,"state");return null!=e&&null!=t?{name:"oauth",code:e,state:t}:r}const s=t.pathname;if(!s||s.length<=1)return r;const a=s.substring(1);if("openrepo"===i){const e=Ue(o,"pr"),t=Ue(o,"branch"),n=Ue(o,"filepath");if(null!=e){if(!/^\d+$/.test(e))return r;if(null!=t&&!/^pr\/\d+$/.test(t))return r}return null!=t&&(l=t,Ie.test(l))?r:{name:"open-repository-from-url",url:a,branch:t,pr:e,filepath:n}}var l;return r}(e);en((e=>{e.focus(),e.sendURLAction(t)}))}Kt||Xt(process.argv),void 0===ue&&(ue=function(){const e=[t.join(y.homedir(),"AppData","Roaming","Microsoft","Windows","Start Menu","Programs","GitHub, Inc","GitHub Desktop.lnk"),t.join(y.homedir(),"Desktop","GitHub Desktop.lnk")];for(const t of e){const e=le(t);if(void 0!==e)return e}}(),void 0===ue&&(log.error("Toast activator CLSID not found in any of the shortcuts. Falling back to known CLSIDs."),ue="{27D44D0C-A542-5B90-BCDB-AC3126048BA2}"),log.info(`Using toast activator CLSID ${ue}`),(0,ae.XT)({toastActivatorClsid:ue}));let Jt=!1;if(!Kt){const e=r.app.requestSingleInstanceLock();Jt=!e,r.app.on("second-instance",((e,t,n)=>{Ht&&(Ht.isMinimized()&&Ht.restore(),Ht.isVisible()||Ht.show(),Ht.focus()),Xt(t)})),Jt&&r.app.quit()}async function Xt(e){const t=Ut()(e,{boolean:["protocol-launcher"]});if(!0!==t["protocol-launcher"])"string"==typeof t["cli-open"]?Qt({kind:"open-repository",path:t["cli-open"]}):"string"==typeof t["cli-clone"]&&Qt({kind:"clone-url",url:t["cli-clone"],branch:"string"==typeof t["cli-branch"]?t["cli-branch"]:void 0});else{const t=Array.from(Vt,(e=>`${e}://`)),n=e.find((e=>{if(t.some((t=>e.startsWith(t))))try{return new URL(e),!0}catch(t){log.error(`Unable to parse argument as URL: ${e}`)}return!1}));n?Zt(n):log.error("Encountered --protocol-launcher without app url")}}function Qt(e){en((t=>{t.focus(),t.sendCLIAction(e)}))}function en(e){Gt?Gt.push(e):Ht&&e(Ht)}(function(e){return"browser"===e.type&&De(),!1})(process)&&async function(){}(),r.app.on("will-finish-launching",(()=>{r.app.on("open-url",((e,t)=>{e.preventDefault(),Zt(t)}))})),process.env.GITHUB_DESKTOP_DISABLE_HARDWARE_ACCELERATION&&(log.info("GITHUB_DESKTOP_DISABLE_HARDWARE_ACCELERATION environment variable set, disabling hardware acceleration"),r.app.disableHardwareAcceleration()),r.app.on("ready",(()=>{if(Jt||Kt)return;zt=X()-Bt,Vt.forEach((e=>function(e){r.app.setAsDefaultProtocolClient(e,process.execPath,["--protocol-launcher"])}(e))),function(){const e=new be;e.onClosed((()=>{Ht=null,qt||r.app.quit()})),e.onDidLoad((()=>{e.show(),e.sendLaunchTimingStats({mainReadyTime:zt,loadTime:e.loadTime,rendererReadyTime:e.rendererReadyTime});const t=Gt;Gt=null;for(const n of t)n(e)})),e.load(),Ht=e}();const e=new yt(r.session.defaultSession.webRequest);!function(e){const t=new Map,n=new Set(["devtools:","file:","chrome-extension:"]),r=new Set(["authentication","authorization","cookie"]);e.onBeforeRequest.addEventListener((async e=>{const{protocol:r,origin:o}=new URL(e.url);return n.has(r)||t.has(e.id)||t.set(e.id,o),{}})),e.onBeforeSendHeaders.addEventListener((async e=>{const n=t.get(e.id),{origin:o}=new URL(e.url);if(void 0===n||n===o)return{requestHeaders:e.requestHeaders};const i={};for(const[t,n]of Object.entries(e.requestHeaders))r.has(t.toLowerCase())||(i[t]=n);return log.debug(`Sanitizing cross-origin redirect to ${o}`),{requestHeaders:i}})),e.onCompleted.addEventListener((e=>t.delete(e.id)))}(e),function(e){e.onBeforeSendHeaders.addEventListener((async e=>{const{protocol:t,host:n}=new URL(e.url);return"wss:"!==t?{}:/^alive\.github\.com$/.test(n)||/^alive\.(.*)\.ghe\.com$/.test(n)?{requestHeaders:{...e.requestHeaders,Origin:`https://${n.replace("alive.","desktop.")}`}}:{}}))}(e);const t=function(e){let t=new Map;return e.onBeforeSendHeaders.addEventListener((async e=>{const{origin:n,pathname:r}=new URL(e.url),o=t.get(n);return o&&(function(e){return e.startsWith("/api/v3/enterprise/avatars/")}(r)||function(e){return/^\/[^/]+\/[^/]+\/assets\/[^/]+\/[^/]+\/?$/.test(e)||/^\/user-attachments\/assets\/[^/]+\/?$/.test(e)}(r))?{requestHeaders:{...e.requestHeaders,Authorization:`token ${o}`}}:{}})),e=>{t=new Map(e.map((({endpoint:e,token:t})=>[new URL(e).origin,t])));const n=Dt(),r=t.get(n);r&&t.set(function(e){if(void 0!==At)return At;if(e!==Dt()||kt){if(Ot(e)){const t=new window.URL(e);return t.pathname="/",t.hostname.startsWith("api.")&&(t.hostname=t.hostname.replace(/^api\./,"")),t.toString()}const t=k.parse(e);return`${t.protocol}//${t.hostname}`}return"https://github.com"}(n),r)}}(e);r.Menu.setApplicationMenu(xe({selectedShell:null,selectedExternalEditor:null,askForConfirmationOnRepositoryRemoval:!1,askForConfirmationOnForcePush:!1})),oe("update-accounts",((e,n)=>t(n))),oe("update-preferred-app-menu-item-labels",((e,t)=>{const n=xe(t),o=r.Menu.getApplicationMenu();if(null===o)return r.Menu.setApplicationMenu(n),void(null!==Ht&&Ht.sendAppMenu());let i=!1;for(const e of Le(n)){const t=e.id;if(!t)continue;const n=o.getMenuItemById(t);n?(n.label!==e.label&&(i=!0),n.enabled!==e.enabled&&(e.enabled=n.enabled,i=!0)):i=!0}i&&Ht&&(r.Menu.setApplicationMenu(n),Ht.sendAppMenu())})),oe("execute-menu-item-by-id",((e,t)=>{const n=r.Menu.getApplicationMenu();if(null===n)return;const o=n.getMenuItemById(t);if(o){const t=r.BrowserWindow.fromWebContents(e.sender)||void 0,n={preventDefault:()=>{},sender:e.sender};o.click(n,t,e.sender)}})),oe("update-menu-state",((e,t)=>{let n=!1;const o=r.Menu.getApplicationMenu();if(null!==o){for(const e of t){const{id:t,state:r}=e,i=o.getMenuItemById(t);i?void 0!==r.enabled&&i.enabled!==r.enabled&&(i.enabled=r.enabled,n=!0):K(`Unknown menu id: ${t}`)}n&&Ht&&(r.Menu.setApplicationMenu(o),Ht.sendAppMenu())}else log.debug("unable to get current menu, bailing out...")})),ie("show-contextual-menu",((e,t,n)=>new Promise((async o=>{const i=r.BrowserWindow.fromWebContents(e.sender)||void 0,s=n?await async function(e){if(void 0!==e)return new Promise((t=>{const n=setTimeout((()=>{t(void 0),log.error("Unable to get spell check menu items - no electron context-menu event")}),100);e.webContents.once("context-menu",((o,i)=>{clearTimeout(n),t(function(e,t,n){const{misspelledWord:o,dictionarySuggestions:i}=t;if(!o&&0===i.length)return;const s=new Array;s.push(new r.MenuItem({type:"separator"}));for(const e of i)s.push(new r.MenuItem({label:e,click:()=>n.replaceMisspelling(e)}));o&&s.push(new r.MenuItem({label:"Add to dictionary",click:()=>n.session.addWordToSpellCheckerDictionary(o)}));{const{session:e}=n,t=function(e,t,n){const r="en-US";if(e===r&&t.includes(r)||!n.includes(e))return null;const o=t.includes(r)&&!t.includes(e)?e:r;return{label:o===r?$t:Ft,languages:[o]}}(r.app.getLocale(),e.getSpellCheckerLanguages(),e.availableSpellCheckerLanguages);null!==t&&s.push(new r.MenuItem({label:t.label,click:()=>e.setSpellCheckerLanguages(t.languages)}))}return s}(0,i,e.webContents))}))}))}(i):void 0;ft(t,(e=>o(e)),s).popup({window:i,callback:()=>o(null)})})))),ie("check-for-updates",(async(e,t)=>Ht?.checkForUpdates(t))),oe("quit-and-install-updates",(()=>Ht?.quitAndInstallUpdate())),oe("quit-app",(()=>r.app.quit())),oe("minimize-window",(()=>Ht?.minimizeWindow())),oe("maximize-window",(()=>Ht?.maximizeWindow())),oe("unmaximize-window",(()=>Ht?.unmaximizeWindow())),oe("close-window",(()=>Ht?.closeWindow())),ie("is-window-maximized",(async()=>Ht?.isMaximized()??!1)),ie("get-apple-action-on-double-click",(async()=>r.systemPreferences.getUserDefault("AppleActionOnDoubleClick","string"))),ie("get-current-window-state",(async()=>Ht?.getCurrentWindowState())),ie("get-current-window-zoom-factor",(async()=>Ht?.getCurrentWindowZoomFactor())),oe("set-window-zoom-factor",((e,t)=>Ht?.setWindowZoomFactor(t))),oe("install-windows-cli",Ke),oe("uninstall-windows-cli",Ze),oe("get-app-menu",(()=>Ht?.sendAppMenu())),oe("show-certificate-trust-dialog",((e,t,n)=>{en((e=>{e.showCertificateTrustDialog(t,n)}))})),oe("log",((e,t,n)=>R(t,n))),oe("uncaught-exception",((e,t)=>Wt(t))),oe("send-error-report",((e,t,n,r)=>{lt(t,{...Yt(),...n},r)})),ie("open-external",(async(e,t)=>{const n=t.toLowerCase();(n.startsWith("http://")||n.startsWith("https://"))&&log.info(`opening in browser: ${t}`);try{return await r.shell.openExternal(t),!0}catch(e){return log.error(`Call to openExternal failed: '${e}'`),!1}})),ie("get-path",(async(e,t)=>r.app.getPath(t))),ie("get-app-architecture",(async()=>tt(r.app))),ie("get-app-path",(async()=>r.app.getAppPath())),ie("is-running-under-arm64-translation",(async()=>nt(r.app))),ie("move-to-applications-folder",(async()=>{r.app.moveToApplicationsFolder?.()})),ie("move-to-trash",((e,t)=>r.shell.trashItem(t))),ie("show-item-in-folder",(async(e,t)=>r.shell.showItemInFolder(t))),oe("unsafe-open-directory",(async(e,t)=>Ee(t))),oe("select-all-window-contents",(()=>Ht?.selectAllWindowContents())),oe("dialog-did-open",(()=>Ht?.dialogDidOpen())),ie("is-in-application-folder",(async()=>r.app.isInApplicationsFolder?.()??null)),ie("resolve-proxy",(async(e,t)=>r.session.defaultSession.resolveProxy(t))),ie("show-save-dialog",(async(e,t)=>Ht?.showSaveDialog(t)??null)),ie("show-open-dialog",(async(e,t)=>Ht?.showOpenDialog(t)??null)),ie("is-window-focused",(async()=>Ht?.isFocused()??!1)),oe("focus-window",(()=>{Ht?.focus()})),oe("set-native-theme-source",((e,t)=>{r.nativeTheme.themeSource=t})),ie("should-use-dark-colors",(async()=>r.nativeTheme.shouldUseDarkColors)),ie("get-guid",(()=>ot())),ie("save-guid",((e,t)=>it(t))),ie("show-notification",(async(e,t,n,r)=>(0,ae.Ds)(t,n,r))),ie("get-notifications-permission",(async()=>(0,ae.Ym)())),ie("request-notifications-permission",(async()=>(0,ae.tC)()))})),r.app.on("activate",(()=>{en((e=>{e.show()}))})),r.app.on("web-contents-created",((e,t)=>{t.setWindowOpenHandler((({url:e})=>(log.warn(`Prevented new window to: ${e}`),{action:"deny"}))),t.on("will-navigate",((e,t)=>{e.preventDefault(),log.warn(`Prevented navigation to: ${t}`)}))})),r.app.on("certificate-error",((e,t,n,r,o,i)=>{i(!1),en((e=>{e.sendCertificateError(o,r,n)}))}))})(),module.exports.main={}})(); //# sourceMappingURL=main.js.map