????

Your IP : 18.119.248.54


Current Path : C:/Program Files/Azure Data Studio/resources/app/extensions/mssql/dist/
Upload File :
Current File : C:/Program Files/Azure Data Studio/resources/app/extensions/mssql/dist/main.js

/*! For license information please see main.js.LICENSE.txt */
(()=>{var e={5456:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AwsCrc32=void 0;var r=n(1478),i=n(5388),o=n(3465),s=function(){function e(){this.crc32=new o.Crc32}return e.prototype.update=function(e){(0,i.isEmptyData)(e)||this.crc32.update((0,i.convertToBuffer)(e))},e.prototype.digest=function(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,(0,i.numToUint8)(this.crc32.digest())]}))}))},e.prototype.reset=function(){this.crc32=new o.Crc32},e}();t.AwsCrc32=s},3465:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AwsCrc32=t.Crc32=t.crc32=void 0;var r=n(1478),i=n(5388);t.crc32=function(e){return(new o).update(e).digest()};var o=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,n;try{for(var i=r.__values(e),o=i.next();!o.done;o=i.next()){var a=o.value;this.checksum=this.checksum>>>8^s[255&(this.checksum^a)]}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return this},e.prototype.digest=function(){return(4294967295^this.checksum)>>>0},e}();t.Crc32=o;var s=(0,i.uint32ArrayFrom)([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]),a=n(5456);Object.defineProperty(t,"AwsCrc32",{enumerable:!0,get:function(){return a.AwsCrc32}})},1478:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__assign:()=>o,__asyncDelegator:()=>S,__asyncGenerator:()=>v,__asyncValues:()=>w,__await:()=>b,__awaiter:()=>u,__classPrivateFieldGet:()=>_,__classPrivateFieldSet:()=>x,__createBinding:()=>p,__decorate:()=>a,__exportStar:()=>h,__extends:()=>i,__generator:()=>d,__importDefault:()=>E,__importStar:()=>T,__makeTemplateObject:()=>C,__metadata:()=>l,__param:()=>c,__read:()=>m,__rest:()=>s,__spread:()=>g,__spreadArrays:()=>y,__values:()=>f});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 i(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)};function s(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function a(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s}function c(e,t){return function(n,r){t(n,r,e)}}function l(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))}function d(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}function p(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function h(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function f(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=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 m(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function g(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(m(arguments[t]));return e}function y(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r}function b(e){return this instanceof b?(this.v=e,this):new b(e)}function v(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r;function s(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||a(e,t)}))})}function a(e,t){try{(n=i[e](t)).value instanceof b?Promise.resolve(n.value.v).then(c,l):u(o[0][2],n)}catch(e){u(o[0][3],e)}var n}function c(e){a("next",e)}function l(e){a("throw",e)}function u(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function S(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,i){t[r]=e[r]?function(t){return(n=!n)?{value:b(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function w(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=f(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,i){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,i,(t=e[n](t)).done,t.value)}))}}}function C(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function T(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function E(e){return e&&e.__esModule?e:{default:e}}function _(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function x(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},5776:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AwsCrc32c=void 0;var r=n(1525),i=n(5388),o=n(9728),s=function(){function e(){this.crc32c=new o.Crc32c}return e.prototype.update=function(e){(0,i.isEmptyData)(e)||this.crc32c.update((0,i.convertToBuffer)(e))},e.prototype.digest=function(){return r.__awaiter(this,void 0,void 0,(function(){return r.__generator(this,(function(e){return[2,(0,i.numToUint8)(this.crc32c.digest())]}))}))},e.prototype.reset=function(){this.crc32c=new o.Crc32c},e}();t.AwsCrc32c=s},9728:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AwsCrc32c=t.Crc32c=t.crc32c=void 0;var r=n(1525),i=n(5388);t.crc32c=function(e){return(new o).update(e).digest()};var o=function(){function e(){this.checksum=4294967295}return e.prototype.update=function(e){var t,n;try{for(var i=r.__values(e),o=i.next();!o.done;o=i.next()){var a=o.value;this.checksum=this.checksum>>>8^s[255&(this.checksum^a)]}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return this},e.prototype.digest=function(){return(4294967295^this.checksum)>>>0},e}();t.Crc32c=o;var s=(0,i.uint32ArrayFrom)([0,4067132163,3778769143,324072436,3348797215,904991772,648144872,3570033899,2329499855,2024987596,1809983544,2575936315,1296289744,3207089363,2893594407,1578318884,274646895,3795141740,4049975192,51262619,3619967088,632279923,922689671,3298075524,2592579488,1760304291,2075979607,2312596564,1562183871,2943781820,3156637768,1313733451,549293790,3537243613,3246849577,871202090,3878099393,357341890,102525238,4101499445,2858735121,1477399826,1264559846,3107202533,1845379342,2677391885,2361733625,2125378298,820201905,3263744690,3520608582,598981189,4151959214,85089709,373468761,3827903834,3124367742,1213305469,1526817161,2842354314,2107672161,2412447074,2627466902,1861252501,1098587580,3004210879,2688576843,1378610760,2262928035,1955203488,1742404180,2511436119,3416409459,969524848,714683780,3639785095,205050476,4266873199,3976438427,526918040,1361435347,2739821008,2954799652,1114974503,2529119692,1691668175,2005155131,2247081528,3690758684,697762079,986182379,3366744552,476452099,3993867776,4250756596,255256311,1640403810,2477592673,2164122517,1922457750,2791048317,1412925310,1197962378,3037525897,3944729517,427051182,170179418,4165941337,746937522,3740196785,3451792453,1070968646,1905808397,2213795598,2426610938,1657317369,3053634322,1147748369,1463399397,2773627110,4215344322,153784257,444234805,3893493558,1021025245,3467647198,3722505002,797665321,2197175160,1889384571,1674398607,2443626636,1164749927,3070701412,2757221520,1446797203,137323447,4198817972,3910406976,461344835,3484808360,1037989803,781091935,3705997148,2460548119,1623424788,1939049696,2180517859,1429367560,2807687179,3020495871,1180866812,410100952,3927582683,4182430767,186734380,3756733383,763408580,1053836080,3434856499,2722870694,1344288421,1131464017,2971354706,1708204729,2545590714,2229949006,1988219213,680717673,3673779818,3383336350,1002577565,4010310262,493091189,238226049,4233660802,2987750089,1082061258,1395524158,2705686845,1972364758,2279892693,2494862625,1725896226,952904198,3399985413,3656866545,731699698,4283874585,222117402,510512622,3959836397,3280807620,837199303,582374963,3504198960,68661723,4135334616,3844915500,390545967,1230274059,3141532936,2825850620,1510247935,2395924756,2091215383,1878366691,2644384480,3553878443,565732008,854102364,3229815391,340358836,3861050807,4117890627,119113024,1493875044,2875275879,3090270611,1247431312,2660249211,1828433272,2141937292,2378227087,3811616794,291187481,34330861,4032846830,615137029,3603020806,3314634738,939183345,1776939221,2609017814,2295496738,2058945313,2926798794,1545135305,1330124605,3173225534,4084100981,17165430,307568514,3762199681,888469610,3332340585,3587147933,665062302,2042050490,2346497209,2559330125,1793573966,3190661285,1279665062,1595330642,2910671697]),a=n(5776);Object.defineProperty(t,"AwsCrc32c",{enumerable:!0,get:function(){return a.AwsCrc32c}})},1525:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__assign:()=>o,__asyncDelegator:()=>S,__asyncGenerator:()=>v,__asyncValues:()=>w,__await:()=>b,__awaiter:()=>u,__classPrivateFieldGet:()=>_,__classPrivateFieldSet:()=>x,__createBinding:()=>p,__decorate:()=>a,__exportStar:()=>h,__extends:()=>i,__generator:()=>d,__importDefault:()=>E,__importStar:()=>T,__makeTemplateObject:()=>C,__metadata:()=>l,__param:()=>c,__read:()=>m,__rest:()=>s,__spread:()=>g,__spreadArrays:()=>y,__values:()=>f});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 i(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)};function s(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function a(e,t,n,r){var i,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s}function c(e,t){return function(n,r){t(n,r,e)}}function l(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function u(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))}function d(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}function p(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function h(e,t){for(var n in e)"default"===n||t.hasOwnProperty(n)||(t[n]=e[n])}function f(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=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 m(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s}function g(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(m(arguments[t]));return e}function y(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r}function b(e){return this instanceof b?(this.v=e,this):new b(e)}function v(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,i=n.apply(e,t||[]),o=[];return r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r;function s(e){i[e]&&(r[e]=function(t){return new Promise((function(n,r){o.push([e,t,n,r])>1||a(e,t)}))})}function a(e,t){try{(n=i[e](t)).value instanceof b?Promise.resolve(n.value.v).then(c,l):u(o[0][2],n)}catch(e){u(o[0][3],e)}var n}function c(e){a("next",e)}function l(e){a("throw",e)}function u(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function S(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,i){t[r]=e[r]?function(t){return(n=!n)?{value:b(e[r](t)),done:"return"===r}:i?i(t):t}:i}}function w(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=f(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,i){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,i,(t=e[n](t)).done,t.value)}))}}}function C(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function T(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function E(e){return e&&e.__esModule?e:{default:e}}function _(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function x(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},1024:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.convertToBuffer=void 0;var r=n(4006),i="undefined"!=typeof Buffer&&Buffer.from?function(e){return Buffer.from(e,"utf8")}:r.fromUtf8;t.convertToBuffer=function(e){return e instanceof Uint8Array?e:"string"==typeof e?i(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e)}},5388:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=t.numToUint8=t.isEmptyData=t.convertToBuffer=void 0;var r=n(1024);Object.defineProperty(t,"convertToBuffer",{enumerable:!0,get:function(){return r.convertToBuffer}});var i=n(165);Object.defineProperty(t,"isEmptyData",{enumerable:!0,get:function(){return i.isEmptyData}});var o=n(5413);Object.defineProperty(t,"numToUint8",{enumerable:!0,get:function(){return o.numToUint8}});var s=n(2110);Object.defineProperty(t,"uint32ArrayFrom",{enumerable:!0,get:function(){return s.uint32ArrayFrom}})},165:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmptyData=void 0,t.isEmptyData=function(e){return"string"==typeof e?0===e.length:0===e.byteLength}},5413:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.numToUint8=void 0,t.numToUint8=function(e){return new Uint8Array([(4278190080&e)>>24,(16711680&e)>>16,(65280&e)>>8,255&e])}},2110:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uint32ArrayFrom=void 0,t.uint32ArrayFrom=function(e){if(!Uint32Array.from){for(var t=new Uint32Array(e.length),n=0;n<e.length;)t[n]=e[n],n+=1;return t}return Uint32Array.from(e)}},7170:(e,t,n)=>{"use strict";n.r(t),n.d(t,{$Command:()=>ie,AbortMultipartUploadCommand:()=>JM,AnalyticsFilter:()=>Do,AnalyticsS3ExportFileFormat:()=>Ao,ArchiveStatus:()=>fs,BucketAccelerateStatus:()=>ao,BucketAlreadyExists:()=>wo,BucketAlreadyOwnedByYou:()=>Co,BucketCannedACL:()=>To,BucketLocationConstraint:()=>Ro,BucketLogsPermission:()=>Go,BucketType:()=>_o,BucketVersioningStatus:()=>is,ChecksumAlgorithm:()=>fo,ChecksumMode:()=>as,CompleteMultipartUploadCommand:()=>tF,CompleteMultipartUploadOutputFilterSensitiveLog:()=>vs,CompleteMultipartUploadRequestFilterSensitiveLog:()=>Ss,CompressionType:()=>ha,CopyObjectCommand:()=>nF,CopyObjectOutputFilterSensitiveLog:()=>ws,CopyObjectRequestFilterSensitiveLog:()=>Cs,CreateBucketCommand:()=>oF,CreateMultipartUploadCommand:()=>sF,CreateMultipartUploadOutputFilterSensitiveLog:()=>Ts,CreateMultipartUploadRequestFilterSensitiveLog:()=>Es,CreateSessionCommand:()=>xI,CreateSessionOutputFilterSensitiveLog:()=>xs,DataRedundancy:()=>Eo,DeleteBucketAnalyticsConfigurationCommand:()=>aF,DeleteBucketCommand:()=>cF,DeleteBucketCorsCommand:()=>lF,DeleteBucketEncryptionCommand:()=>uF,DeleteBucketIntelligentTieringConfigurationCommand:()=>dF,DeleteBucketInventoryConfigurationCommand:()=>pF,DeleteBucketLifecycleCommand:()=>hF,DeleteBucketMetricsConfigurationCommand:()=>fF,DeleteBucketOwnershipControlsCommand:()=>mF,DeleteBucketPolicyCommand:()=>gF,DeleteBucketReplicationCommand:()=>yF,DeleteBucketTaggingCommand:()=>bF,DeleteBucketWebsiteCommand:()=>vF,DeleteMarkerReplicationStatus:()=>Ko,DeleteObjectCommand:()=>SF,DeleteObjectTaggingCommand:()=>qF,DeleteObjectsCommand:()=>FF,DeletePublicAccessBlockCommand:()=>BF,EncodingType:()=>ms,EncryptionFilterSensitiveLog:()=>wa,Event:()=>$o,ExistingObjectReplicationStatus:()=>Yo,ExpirationStatus:()=>zo,ExpressionType:()=>pa,FileHeaderInfo:()=>fa,FilterRuleName:()=>Wo,GetBucketAccelerateConfigurationCommand:()=>UF,GetBucketAclCommand:()=>zF,GetBucketAnalyticsConfigurationCommand:()=>GF,GetBucketCorsCommand:()=>HF,GetBucketEncryptionCommand:()=>VF,GetBucketEncryptionOutputFilterSensitiveLog:()=>Os,GetBucketIntelligentTieringConfigurationCommand:()=>$F,GetBucketInventoryConfigurationCommand:()=>WF,GetBucketInventoryConfigurationOutputFilterSensitiveLog:()=>js,GetBucketLifecycleConfigurationCommand:()=>KF,GetBucketLocationCommand:()=>QF,GetBucketLoggingCommand:()=>XF,GetBucketMetricsConfigurationCommand:()=>YF,GetBucketNotificationConfigurationCommand:()=>JF,GetBucketOwnershipControlsCommand:()=>ZF,GetBucketPolicyCommand:()=>eq,GetBucketPolicyStatusCommand:()=>tq,GetBucketReplicationCommand:()=>nq,GetBucketRequestPaymentCommand:()=>rq,GetBucketTaggingCommand:()=>iq,GetBucketVersioningCommand:()=>oq,GetBucketWebsiteCommand:()=>sq,GetObjectAclCommand:()=>aq,GetObjectAttributesCommand:()=>cq,GetObjectAttributesRequestFilterSensitiveLog:()=>qs,GetObjectCommand:()=>lq,GetObjectLegalHoldCommand:()=>uq,GetObjectLockConfigurationCommand:()=>dq,GetObjectOutputFilterSensitiveLog:()=>Ms,GetObjectRequestFilterSensitiveLog:()=>Fs,GetObjectRetentionCommand:()=>pq,GetObjectTaggingCommand:()=>hq,GetObjectTorrentCommand:()=>fq,GetObjectTorrentOutputFilterSensitiveLog:()=>Bs,GetPublicAccessBlockCommand:()=>mq,HeadBucketCommand:()=>gq,HeadObjectCommand:()=>yq,HeadObjectOutputFilterSensitiveLog:()=>Us,HeadObjectRequestFilterSensitiveLog:()=>zs,IntelligentTieringAccessTier:()=>Lo,IntelligentTieringStatus:()=>No,InvalidObjectState:()=>cs,InventoryConfigurationFilterSensitiveLog:()=>Ls,InventoryDestinationFilterSensitiveLog:()=>Ns,InventoryEncryptionFilterSensitiveLog:()=>As,InventoryFormat:()=>jo,InventoryFrequency:()=>qo,InventoryIncludedObjectVersions:()=>Mo,InventoryOptionalField:()=>Fo,InventoryS3BucketDestinationFilterSensitiveLog:()=>ks,JSONType:()=>ma,LifecycleRuleFilter:()=>Bo,ListBucketAnalyticsConfigurationsCommand:()=>bq,ListBucketIntelligentTieringConfigurationsCommand:()=>vq,ListBucketInventoryConfigurationsCommand:()=>Sq,ListBucketInventoryConfigurationsOutputFilterSensitiveLog:()=>Gs,ListBucketMetricsConfigurationsCommand:()=>wq,ListBucketsCommand:()=>Cq,ListDirectoryBucketsCommand:()=>Tq,ListMultipartUploadsCommand:()=>Eq,ListObjectVersionsCommand:()=>Rq,ListObjectsCommand:()=>_q,ListObjectsV2Command:()=>xq,ListPartsCommand:()=>Iq,ListPartsRequestFilterSensitiveLog:()=>Hs,LocationType:()=>xo,MFADelete:()=>la,MFADeleteStatus:()=>rs,MetadataDirective:()=>mo,MetricsFilter:()=>Vo,MetricsStatus:()=>Qo,NoSuchBucket:()=>Oo,NoSuchKey:()=>ls,NoSuchUpload:()=>so,NotFound:()=>hs,ObjectAlreadyInActiveTierError:()=>ua,ObjectAttributes:()=>us,ObjectCannedACL:()=>ho,ObjectLockEnabled:()=>ds,ObjectLockLegalHoldStatus:()=>go,ObjectLockMode:()=>yo,ObjectLockRetentionMode:()=>ps,ObjectNotInActiveTierError:()=>So,ObjectOwnership:()=>Io,ObjectStorageClass:()=>gs,ObjectVersionStorageClass:()=>bs,OptionalObjectAttributes:()=>ys,OutputLocationFilterSensitiveLog:()=>Ta,OwnerOverride:()=>uo,PartitionDateSource:()=>Ho,Payer:()=>ns,Permission:()=>lo,Protocol:()=>os,PutBucketAccelerateConfigurationCommand:()=>Pq,PutBucketAclCommand:()=>Oq,PutBucketAnalyticsConfigurationCommand:()=>Dq,PutBucketCorsCommand:()=>Aq,PutBucketEncryptionCommand:()=>kq,PutBucketEncryptionRequestFilterSensitiveLog:()=>Vs,PutBucketIntelligentTieringConfigurationCommand:()=>Nq,PutBucketInventoryConfigurationCommand:()=>Lq,PutBucketInventoryConfigurationRequestFilterSensitiveLog:()=>$s,PutBucketLifecycleConfigurationCommand:()=>jq,PutBucketLoggingCommand:()=>Mq,PutBucketMetricsConfigurationCommand:()=>Fq,PutBucketNotificationConfigurationCommand:()=>qq,PutBucketOwnershipControlsCommand:()=>Bq,PutBucketPolicyCommand:()=>Uq,PutBucketReplicationCommand:()=>zq,PutBucketRequestPaymentCommand:()=>Gq,PutBucketTaggingCommand:()=>Hq,PutBucketVersioningCommand:()=>Vq,PutBucketWebsiteCommand:()=>$q,PutObjectAclCommand:()=>Wq,PutObjectCommand:()=>Kq,PutObjectLegalHoldCommand:()=>Qq,PutObjectLockConfigurationCommand:()=>Xq,PutObjectOutputFilterSensitiveLog:()=>va,PutObjectRequestFilterSensitiveLog:()=>Sa,PutObjectRetentionCommand:()=>Yq,PutObjectTaggingCommand:()=>Jq,PutPublicAccessBlockCommand:()=>Zq,QuoteFields:()=>ga,ReplicaModificationsStatus:()=>Zo,ReplicationRuleFilter:()=>Jo,ReplicationRuleStatus:()=>ts,ReplicationStatus:()=>ss,ReplicationTimeStatus:()=>Xo,RequestCharged:()=>io,RequestPayer:()=>oo,RestoreObjectCommand:()=>eB,RestoreObjectRequestFilterSensitiveLog:()=>_a,RestoreRequestFilterSensitiveLog:()=>Ea,RestoreRequestType:()=>ya,S3:()=>sB,S3Client:()=>YM,S3LocationFilterSensitiveLog:()=>Ca,S3ServiceException:()=>ro,SSEKMSFilterSensitiveLog:()=>Ds,SelectObjectContentCommand:()=>tB,SelectObjectContentEventStream:()=>ba,SelectObjectContentEventStreamFilterSensitiveLog:()=>xa,SelectObjectContentOutputFilterSensitiveLog:()=>Ra,SelectObjectContentRequestFilterSensitiveLog:()=>Ia,ServerSideEncryption:()=>po,ServerSideEncryptionByDefaultFilterSensitiveLog:()=>Rs,ServerSideEncryptionConfigurationFilterSensitiveLog:()=>Ps,ServerSideEncryptionRuleFilterSensitiveLog:()=>Is,SessionCredentialsFilterSensitiveLog:()=>_s,SessionMode:()=>Po,SseKmsEncryptedObjectsStatus:()=>es,StorageClass:()=>bo,StorageClassAnalysisSchemaVersion:()=>ko,TaggingDirective:()=>vo,Tier:()=>da,TransitionStorageClass:()=>Uo,Type:()=>co,UploadPartCommand:()=>nB,UploadPartCopyCommand:()=>rB,UploadPartCopyOutputFilterSensitiveLog:()=>Da,UploadPartCopyRequestFilterSensitiveLog:()=>Aa,UploadPartOutputFilterSensitiveLog:()=>Pa,UploadPartRequestFilterSensitiveLog:()=>Oa,WriteGetObjectResponseCommand:()=>iB,WriteGetObjectResponseRequestFilterSensitiveLog:()=>ka,__Client:()=>D,paginateListDirectoryBuckets:()=>aB,paginateListObjectsV2:()=>cB,paginateListParts:()=>lB,waitForBucketExists:()=>SB,waitForBucketNotExists:()=>TB,waitForObjectExists:()=>xB,waitForObjectNotExists:()=>PB,waitUntilBucketExists:()=>wB,waitUntilBucketNotExists:()=>EB,waitUntilObjectExists:()=>RB,waitUntilObjectNotExists:()=>OB});const r=e=>{let t=e.httpHandler;return{setHttpHandler(e){t=e},httpHandler:()=>t,updateHttpClientConfig(e,n){t.updateHttpClientConfig(e,n)},httpHandlerConfigs:()=>t.httpHandlerConfigs()}},i=e=>({httpHandler:e.httpHandler()});var o,s,a,c,l,u,d;!function(e){e.HEADER="header",e.QUERY="query"}(o||(o={})),(l=s||(s={})).HEADER="header",l.QUERY="query",function(e){e.HTTP="http",e.HTTPS="https"}(a||(a={})),function(e){e.MD5="md5",e.CRC32="crc32",e.CRC32C="crc32c",e.SHA1="sha1",e.SHA256="sha256"}(c||(c={})),(d=u||(u={}))[d.HEADER=0]="HEADER",d[d.TRAILER=1]="TRAILER";const p="__smithy_context";var h,f;!function(e){e.PROFILE="profile",e.SSO_SESSION="sso-session",e.SERVICES="services"}(h||(h={})),function(e){e.HTTP_0_9="http/0.9",e.HTTP_1_0="http/1.0",e.TDS_8_0="tds/8.0"}(f||(f={}));class m{constructor(e){this.method=e.method||"GET",this.hostname=e.hostname||"localhost",this.port=e.port,this.query=e.query||{},this.headers=e.headers||{},this.body=e.body,this.protocol=e.protocol?":"!==e.protocol.slice(-1)?`${e.protocol}:`:e.protocol:"https:",this.path=e.path?"/"!==e.path.charAt(0)?`/${e.path}`:e.path:"/",this.username=e.username,this.password=e.password,this.fragment=e.fragment}static isInstance(e){if(!e)return!1;const t=e;return"method"in t&&"protocol"in t&&"hostname"in t&&"path"in t&&"object"==typeof t.query&&"object"==typeof t.headers}clone(){const e=new m({...this,headers:{...this.headers}});var t;return e.query&&(e.query=(t=e.query,Object.keys(t).reduce(((e,n)=>{const r=t[n];return{...e,[n]:Array.isArray(r)?[...r]:r}}),{}))),e}}class g{constructor(e){this.statusCode=e.statusCode,this.reason=e.reason,this.headers=e.headers||{},this.body=e.body}static isInstance(e){if(!e)return!1;const t=e;return"number"==typeof t.statusCode&&"object"==typeof t.headers}}const y={step:"build",tags:["SET_EXPECT_HEADER","EXPECT_HEADER"],name:"addExpectContinueMiddleware",override:!0},b={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0},v=e=>({applyToStack:t=>{t.add((e=>t=>async n=>{if(!m.isInstance(n.request))return t(n);const{request:r}=n,{handlerProtocol:i=""}=e.requestHandler.metadata||{};if(i.indexOf("h2")>=0&&!r.headers[":authority"])delete r.headers.host,r.headers[":authority"]=r.hostname+(r.port?":"+r.port:"");else if(!r.headers.host){let e=r.hostname;null!=r.port&&(e+=`:${r.port}`),r.headers.host=e}return t(n)})(e),b)}}),S={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0},w=e=>({applyToStack:e=>{e.add(((e,t)=>async n=>{try{const r=await e(n),{clientName:i,commandName:o,logger:s,dynamoDbDocumentClientOptions:a={}}=t,{overrideInputFilterSensitiveLog:c,overrideOutputFilterSensitiveLog:l}=a,u=c??t.inputFilterSensitiveLog,d=l??t.outputFilterSensitiveLog,{$metadata:p,...h}=r.output;return s?.info?.({clientName:i,commandName:o,input:u(n.input),output:d(h),metadata:p}),r}catch(e){const{clientName:r,commandName:i,logger:o,dynamoDbDocumentClientOptions:s={}}=t,{overrideInputFilterSensitiveLog:a}=s,c=a??t.inputFilterSensitiveLog;throw o?.error?.({clientName:r,commandName:i,input:c(n.input),error:e,metadata:e.$metadata}),e}}),S)}}),C="X-Amzn-Trace-Id",T={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"},E=e=>({applyToStack:t=>{t.add((e=>t=>async n=>{const{request:r}=n;if(!m.isInstance(r)||"node"!==e.runtime||r.headers.hasOwnProperty(C))return t(n);const i=process.env.AWS_LAMBDA_FUNCTION_NAME,o=process.env._X_AMZN_TRACE_ID,s=e=>"string"==typeof e&&e.length>0;return s(i)&&s(o)&&(r.headers[C]=o),t({...n,request:r})})(e),T)}});class _{trace(){}debug(){}info(){}warn(){}error(){}}const x=(e,t)=>{const n=[];if(e&&n.push(e),t)for(const e of t)n.push(e);return n},R=(e,t)=>`${e||"anonymous"}${t&&t.length>0?` (a.k.a. ${t.join(",")})`:""}`,I=()=>{let e=[],t=[],n=!1;const r=new Set,i=n=>(e.forEach((e=>{n.add(e.middleware,{...e})})),t.forEach((e=>{n.addRelativeTo(e.middleware,{...e})})),n.identifyOnResolve?.(a.identifyOnResolve()),n),o=e=>{const t=[];return e.before.forEach((e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...o(e))})),t.push(e),e.after.reverse().forEach((e=>{0===e.before.length&&0===e.after.length?t.push(e):t.push(...o(e))})),t},s=(n=!1)=>{const r=[],i=[],s={};e.forEach((e=>{const t={...e,before:[],after:[]};for(const e of x(t.name,t.aliases))s[e]=t;r.push(t)})),t.forEach((e=>{const t={...e,before:[],after:[]};for(const e of x(t.name,t.aliases))s[e]=t;i.push(t)})),i.forEach((e=>{if(e.toMiddleware){const t=s[e.toMiddleware];if(void 0===t){if(n)return;throw new Error(`${e.toMiddleware} is not found when adding ${R(e.name,e.aliases)} middleware ${e.relation} ${e.toMiddleware}`)}"after"===e.relation&&t.after.push(e),"before"===e.relation&&t.before.push(e)}}));const a=(c=r,c.sort(((e,t)=>P[t.step]-P[e.step]||O[t.priority||"normal"]-O[e.priority||"normal"]))).map(o).reduce(((e,t)=>(e.push(...t),e)),[]);var c;return a},a={add:(t,n={})=>{const{name:i,override:o,aliases:s}=n,a={step:"initialize",priority:"normal",middleware:t,...n},c=x(i,s);if(c.length>0){if(c.some((e=>r.has(e)))){if(!o)throw new Error(`Duplicate middleware name '${R(i,s)}'`);for(const t of c){const n=e.findIndex((e=>e.name===t||e.aliases?.some((e=>e===t))));if(-1===n)continue;const r=e[n];if(r.step!==a.step||a.priority!==r.priority)throw new Error(`"${R(r.name,r.aliases)}" middleware with ${r.priority} priority in ${r.step} step cannot be overridden by "${R(i,s)}" middleware with ${a.priority} priority in ${a.step} step.`);e.splice(n,1)}}for(const e of c)r.add(e)}e.push(a)},addRelativeTo:(e,n)=>{const{name:i,override:o,aliases:s}=n,a={middleware:e,...n},c=x(i,s);if(c.length>0){if(c.some((e=>r.has(e)))){if(!o)throw new Error(`Duplicate middleware name '${R(i,s)}'`);for(const e of c){const n=t.findIndex((t=>t.name===e||t.aliases?.some((t=>t===e))));if(-1===n)continue;const r=t[n];if(r.toMiddleware!==a.toMiddleware||r.relation!==a.relation)throw new Error(`"${R(r.name,r.aliases)}" middleware ${r.relation} "${r.toMiddleware}" middleware cannot be overridden by "${R(i,s)}" middleware ${a.relation} "${a.toMiddleware}" middleware.`);t.splice(n,1)}}for(const e of c)r.add(e)}t.push(a)},clone:()=>i(I()),use:e=>{e.applyToStack(a)},remove:n=>"string"==typeof n?(n=>{let i=!1;const o=e=>{const t=x(e.name,e.aliases);if(t.includes(n)){i=!0;for(const e of t)r.delete(e);return!1}return!0};return e=e.filter(o),t=t.filter(o),i})(n):(n=>{let i=!1;const o=e=>{if(e.middleware===n){i=!0;for(const t of x(e.name,e.aliases))r.delete(t);return!1}return!0};return e=e.filter(o),t=t.filter(o),i})(n),removeByTag:n=>{let i=!1;const o=e=>{const{tags:t,name:o,aliases:s}=e;if(t&&t.includes(n)){const e=x(o,s);for(const t of e)r.delete(t);return i=!0,!1}return!0};return e=e.filter(o),t=t.filter(o),i},concat:e=>{const t=i(I());return t.use(e),t.identifyOnResolve(n||t.identifyOnResolve()||(e.identifyOnResolve?.()??!1)),t},applyToStack:i,identify:()=>s(!0).map((e=>{const t=e.step??e.relation+" "+e.toMiddleware;return R(e.name,e.aliases)+" - "+t})),identifyOnResolve:e=>("boolean"==typeof e&&(n=e),n),resolve:(e,t)=>{for(const n of s().map((e=>e.middleware)).reverse())e=n(e,t);return n&&console.log(a.identify()),e}};return a},P={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},O={high:3,normal:2,low:1};class D{constructor(e){this.middlewareStack=I(),this.config=e}send(e,t,n){const r="function"!=typeof t?t:void 0,i="function"==typeof t?t:n,o=e.resolveMiddleware(this.middlewareStack,this.config,r);if(!i)return o(e).then((e=>e.output));o(e).then((e=>i(null,e.output)),(e=>i(e))).catch((()=>{}))}destroy(){this.config.requestHandler.destroy&&this.config.requestHandler.destroy()}}const A=e=>"function"==typeof ArrayBuffer&&e instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(e);var k=n(181);const N=(e,t=0,n=e.byteLength-t)=>{if(!A(e))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof e} (${e})`);return k.Buffer.from(e,t,n)},L=(e,t)=>{if("string"!=typeof e)throw new TypeError(`The "input" argument must be of type string. Received type ${typeof e} (${e})`);return t?k.Buffer.from(e,t):k.Buffer.from(e)},j=/^[A-Za-z0-9+/]*={0,2}$/,M=e=>{if(3*e.length%4!=0)throw new TypeError("Incorrect padding on base64 string.");if(!j.exec(e))throw new TypeError("Invalid base64 string.");const t=L(e,"base64");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength)},F=e=>N(e.buffer,e.byteOffset,e.byteLength).toString("base64"),q=e=>{const t=L(e,"utf8");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT)},B=e=>"string"==typeof e?q(e):ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength/Uint8Array.BYTES_PER_ELEMENT):new Uint8Array(e),U=e=>N(e.buffer,e.byteOffset,e.byteLength).toString("utf8");class z extends Uint8Array{static fromString(e,t="utf-8"){if("string"==typeof e)return function(e,t){return"base64"===t?z.mutate(M(e)):z.mutate(q(e))}(e,t);throw new Error(`Unsupported conversion from ${typeof e} to Uint8ArrayBlobAdapter.`)}static mutate(e){return Object.setPrototypeOf(e,z.prototype),e}transformToString(e="utf-8"){return function(e,t="utf-8"){return"base64"===t?F(e):U(e)}(this,e)}}var G=n(2203);const H=(e,t)=>{const{base64Encoder:n,bodyLengthChecker:r,checksumAlgorithmFn:i,checksumLocationName:o,streamHasher:s}=t,a=void 0!==n&&void 0!==i&&void 0!==o&&void 0!==s,c=a?s(i,e):void 0,l=new G.Readable({read:()=>{}});return e.on("data",(e=>{const t=r(e)||0;l.push(`${t.toString(16)}\r\n`),l.push(e),l.push("\r\n")})),e.on("end",(async()=>{if(l.push("0\r\n"),a){const e=n(await c);l.push(`${o}:${e}\r\n`),l.push("\r\n")}l.push(null)})),l},V=e=>encodeURIComponent(e).replace(/[!'()*]/g,$),$=e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`;var W=n(8611),K=n(5692);const Q=["ECONNRESET","EPIPE","ETIMEDOUT"],X=e=>{const t={};for(const n of Object.keys(e)){const r=e[n];t[n]=Array.isArray(r)?r.join(","):r}return t};class Y{static create(e){return"function"==typeof e?.handle?e:new Y(e)}constructor(e){this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise(((t,n)=>{"function"==typeof e?e().then((e=>{t(this.resolveDefaultConfig(e))})).catch(n):t(this.resolveDefaultConfig(e))}))}resolveDefaultConfig(e){const{requestTimeout:t,connectionTimeout:n,socketTimeout:r,httpAgent:i,httpsAgent:o}=e||{},s=!0;return{connectionTimeout:n,requestTimeout:t??r,httpAgent:i||new W.Agent({keepAlive:s,maxSockets:50}),httpsAgent:o||new K.Agent({keepAlive:s,maxSockets:50})}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(e,{abortSignal:t}={}){return this.config||(this.config=await this.configProvider),new Promise(((n,r)=>{let i;const o=async e=>{await i,r(e)};if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(t?.aborted){const e=new Error("Request aborted");return e.name="AbortError",void o(e)}const s="https:"===e.protocol,a=function(e){const t=[];for(let n of Object.keys(e).sort()){const r=e[n];if(n=V(n),Array.isArray(r))for(let e=0,i=r.length;e<i;e++)t.push(`${n}=${V(r[e])}`);else{let e=n;(r||"string"==typeof r)&&(e+=`=${V(r)}`),t.push(e)}}return t.join("&")}(e.query||{});let c;null==e.username&&null==e.password||(c=`${e.username??""}:${e.password??""}`);let l=e.path;a&&(l+=`?${a}`),e.fragment&&(l+=`#${e.fragment}`);const u={headers:e.headers,host:e.hostname,method:e.method,path:l,port:e.port,agent:s?this.config.httpsAgent:this.config.httpAgent,auth:c},d=(s?K.request:W.request)(u,(e=>{(async e=>{await i,n(e)})({response:new g({statusCode:e.statusCode||-1,reason:e.statusMessage,headers:X(e.headers),body:e})})}));d.on("error",(e=>{Q.includes(e.code)?o(Object.assign(e,{name:"TimeoutError"})):o(e)})),((e,t,n=0)=>{if(!n)return;const r=setTimeout((()=>{e.destroy(),t(Object.assign(new Error(`Socket timed out without establishing a connection within ${n} ms`),{name:"TimeoutError"}))}),n);e.on("socket",(e=>{e.connecting?e.on("connect",(()=>{clearTimeout(r)})):clearTimeout(r)}))})(d,o,this.config.connectionTimeout),((e,t,n=0)=>{e.setTimeout(n,(()=>{e.destroy(),t(Object.assign(new Error(`Connection timed out after ${n} ms`),{name:"TimeoutError"}))}))})(d,o,this.config.requestTimeout),t&&(t.onabort=()=>{d.abort();const e=new Error("Request aborted");e.name="AbortError",o(e)});const p=u.agent;"object"==typeof p&&"keepAlive"in p&&((e,{keepAlive:t,keepAliveMsecs:n})=>{!0===t&&e.on("socket",(e=>{e.setKeepAlive(t,n||0)}))})(d,{keepAlive:p.keepAlive,keepAliveMsecs:p.keepAliveMsecs}),i=async function(e,t,n=1e3){const r=t.headers??{},i=r.Expect||r.expect;let o=-1,s=!1;"100-continue"===i&&await Promise.race([new Promise((e=>{o=Number(setTimeout(e,Math.max(1e3,n)))})),new Promise((t=>{e.on("continue",(()=>{clearTimeout(o),t()})),e.on("error",(()=>{s=!0,clearTimeout(o),t()}))}))]),s||function(e,t){t instanceof G.Readable?t.pipe(e):t?e.end(Buffer.from(t)):e.end()}(e,t.body)}(d,e,this.config.requestTimeout).catch(r)}))}updateHttpClientConfig(e,t){this.config=void 0,this.configProvider=this.configProvider.then((n=>({...n,[e]:t})))}httpHandlerConfigs(){return this.config??{}}}require("http2"),Symbol.iterator;class J extends G.Writable{constructor(){super(...arguments),this.bufferedBytes=[]}_write(e,t,n){this.bufferedBytes.push(e),n()}}const Z=e=>new Promise(((t,n)=>{const r=new J;e.pipe(r),e.on("error",(e=>{r.end(),n(e)})),r.on("error",n),r.on("finish",(function(){const e=new Uint8Array(Buffer.concat(this.bufferedBytes));t(e)}))}));var ee=n(9023);const te="The stream has already been transformed.",ne=e=>{if(!(e instanceof G.Readable))throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${e?.__proto__?.constructor?.name||e}`);let t=!1;const n=async()=>{if(t)throw new Error(te);return t=!0,await Z(e)};return Object.assign(e,{transformToByteArray:n,transformToString:async e=>{const t=await n();return void 0===e||Buffer.isEncoding(e)?N(t.buffer,t.byteOffset,t.byteLength).toString(e):new ee.TextDecoder(e).decode(t)},transformToWebStream:()=>{if(t)throw new Error(te);if(null!==e.readableFlowing)throw new Error("The stream has been consumed by other callbacks.");if("function"!=typeof G.Readable.toWeb)throw new Error("Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available.");return t=!0,G.Readable.toWeb(e)}})},re=async(e=new Uint8Array,t)=>{if(e instanceof Uint8Array)return z.mutate(e);if(!e)return z.mutate(new Uint8Array);const n=t.streamCollector(e);return z.mutate(await n)};class ie{constructor(){this.middlewareStack=I()}static classBuilder(){return new oe}resolveMiddlewareWithContext(e,t,n,{middlewareFn:r,clientName:i,commandName:o,inputFilterSensitiveLog:s,outputFilterSensitiveLog:a,smithyContext:c,additionalContext:l,CommandCtor:u}){for(const i of r.bind(this)(u,e,t,n))this.middlewareStack.use(i);const d=e.concat(this.middlewareStack),{logger:h}=t,f={logger:h,clientName:i,commandName:o,inputFilterSensitiveLog:s,outputFilterSensitiveLog:a,[p]:{...c},...l},{requestHandler:m}=t;return d.resolve((e=>m.handle(e.request,n||{})),f)}}class oe{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=e=>e,this._outputFilterSensitiveLog=e=>e,this._serializer=null,this._deserializer=null}init(e){this._init=e}ep(e){return this._ep=e,this}m(e){return this._middlewareFn=e,this}s(e,t,n={}){return this._smithyContext={service:e,operation:t,...n},this}c(e={}){return this._additionalContext=e,this}n(e,t){return this._clientName=e,this._commandName=t,this}f(e=e=>e,t=e=>e){return this._inputFilterSensitiveLog=e,this._outputFilterSensitiveLog=t,this}ser(e){return this._serializer=e,this}de(e){return this._deserializer=e,this}build(){const e=this;let t;return t=class extends ie{static getEndpointParameterInstructions(){return e._ep}constructor(t){super(),this.input=t,this.serialize=e._serializer,this.deserialize=e._deserializer,e._init(this)}resolveMiddleware(n,r,i){return this.resolveMiddlewareWithContext(n,r,i,{CommandCtor:t,middlewareFn:e._middlewareFn,clientName:e._clientName,commandName:e._commandName,inputFilterSensitiveLog:e._inputFilterSensitiveLog,outputFilterSensitiveLog:e._outputFilterSensitiveLog,smithyContext:e._smithyContext,additionalContext:e._additionalContext})}}}}const se="***SensitiveInformation***",ae=(e,t)=>{for(const n of Object.keys(e)){const r=e[n],i=async function(e,t,n){const i=new r(e);if("function"==typeof t)this.send(i,t);else{if("function"!=typeof n)return this.send(i,t);if("object"!=typeof t)throw new Error("Expected http options but got "+typeof t);this.send(i,t||{},n)}},o=(n[0].toLowerCase()+n.slice(1)).replace(/Command$/,"");t.prototype[o]=i}},ce=e=>{switch(e){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${e}"`)}},le=Math.ceil(2**127*(2-2**-23)),ue=e=>{const t=(e=>{if(null!=e){if("string"==typeof e){const t=parseFloat(e);if(!Number.isNaN(t))return String(t)!==String(e)&&_e.warn(Ee(`Expected number but observed string: ${e}`)),t}if("number"==typeof e)return e;throw new TypeError(`Expected number, got ${typeof e}: ${e}`)}})(e);if(void 0!==t&&!Number.isNaN(t)&&t!==1/0&&t!==-1/0&&Math.abs(t)>le)throw new TypeError(`Expected 32-bit float, got ${e}`);return t},de=e=>{if(null!=e){if(Number.isInteger(e)&&!Number.isNaN(e))return e;throw new TypeError(`Expected integer, got ${typeof e}: ${e}`)}},pe=e=>he(e,32),he=(e,t)=>{const n=de(e);if(void 0!==n&&fe(n,t)!==n)throw new TypeError(`Expected ${t}-bit integer, got ${e}`);return n},fe=(e,t)=>{switch(t){case 32:return Int32Array.of(e)[0];case 16:return Int16Array.of(e)[0];case 8:return Int8Array.of(e)[0]}},me=(e,t)=>{if(null==e){if(t)throw new TypeError(`Expected a non-null value for ${t}`);throw new TypeError("Expected a non-null value")}return e},ge=e=>{if(null==e)return;if("object"==typeof e&&!Array.isArray(e))return e;const t=Array.isArray(e)?"array":typeof e;throw new TypeError(`Expected object, got ${t}: ${e}`)},ye=e=>{if(null!=e){if("string"==typeof e)return e;if(["boolean","number","bigint"].includes(typeof e))return _e.warn(Ee(`Expected string, got ${typeof e}: ${e}`)),String(e);throw new TypeError(`Expected string, got ${typeof e}: ${e}`)}},be=e=>{if(null==e)return;const t=ge(e),n=Object.entries(t).filter((([,e])=>null!=e)).map((([e])=>e));if(0===n.length)throw new TypeError("Unions must have exactly one non-null member. None were found.");if(n.length>1)throw new TypeError(`Unions must have exactly one non-null member. Keys ${n} were not null.`);return t},ve=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,Se=e=>{const t=e.match(ve);if(null===t||t[0].length!==e.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(e)},we=e=>de("string"==typeof e?Se(e):e),Ce=e=>pe("string"==typeof e?Se(e):e),Te=e=>(e=>he(e,16))("string"==typeof e?Se(e):e),Ee=e=>String(new TypeError(e).stack||e).split("\n").slice(0,5).filter((e=>!e.includes("stackTraceWarning"))).join("\n"),_e={warn:console.warn},xe=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],Re=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Ie(e){const t=e.getUTCFullYear(),n=e.getUTCMonth(),r=e.getUTCDay(),i=e.getUTCDate(),o=e.getUTCHours(),s=e.getUTCMinutes(),a=e.getUTCSeconds(),c=o<10?`0${o}`:`${o}`,l=s<10?`0${s}`:`${s}`,u=a<10?`0${a}`:`${a}`;return`${xe[r]}, ${i<10?`0${i}`:`${i}`} ${Re[n]} ${t} ${c}:${l}:${u} GMT`}const Pe=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),Oe=e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC-3339 date-times must be expressed as strings");const t=Pe.exec(e);if(!t)throw new TypeError("Invalid RFC-3339 date-time value");const[n,r,i,o,s,a,c,l,u]=t,d=Te(Ve(r)),p=ze(i,"month",1,12),h=ze(o,"day",1,31),f=Le(d,p,h,{hours:s,minutes:a,seconds:c,fractionalMilliseconds:l});return"Z"!=u.toUpperCase()&&f.setTime(f.getTime()-He(u)),f},De=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),Ae=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),ke=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),Ne=e=>{if(null==e)return;if("string"!=typeof e)throw new TypeError("RFC-7231 date-times must be expressed as strings");let t=De.exec(e);if(t){const[e,n,r,i,o,s,a,c]=t;return Le(Te(Ve(i)),Fe(r),ze(n,"day",1,31),{hours:o,minutes:s,seconds:a,fractionalMilliseconds:c})}if(t=Ae.exec(e),t){const[e,n,r,i,o,s,a,c]=t;return Me(Le(je(i),Fe(r),ze(n,"day",1,31),{hours:o,minutes:s,seconds:a,fractionalMilliseconds:c}))}if(t=ke.exec(e),t){const[e,n,r,i,o,s,a,c]=t;return Le(Te(Ve(c)),Fe(n),ze(r.trimLeft(),"day",1,31),{hours:i,minutes:o,seconds:s,fractionalMilliseconds:a})}throw new TypeError("Invalid RFC-7231 date-time value")},Le=(e,t,n,r)=>{const i=t-1;return Be(e,i,n),new Date(Date.UTC(e,i,n,ze(r.hours,"hour",0,23),ze(r.minutes,"minute",0,59),ze(r.seconds,"seconds",0,60),Ge(r.fractionalMilliseconds)))},je=e=>{const t=(new Date).getUTCFullYear(),n=100*Math.floor(t/100)+Te(Ve(e));return n<t?n+100:n},Me=e=>e.getTime()-(new Date).getTime()>15768e8?new Date(Date.UTC(e.getUTCFullYear()-100,e.getUTCMonth(),e.getUTCDate(),e.getUTCHours(),e.getUTCMinutes(),e.getUTCSeconds(),e.getUTCMilliseconds())):e,Fe=e=>{const t=Re.indexOf(e);if(t<0)throw new TypeError(`Invalid month: ${e}`);return t+1},qe=[31,28,31,30,31,30,31,31,30,31,30,31],Be=(e,t,n)=>{let r=qe[t];if(1===t&&Ue(e)&&(r=29),n>r)throw new TypeError(`Invalid day for ${Re[t]} in ${e}: ${n}`)},Ue=e=>e%4==0&&(e%100!=0||e%400==0),ze=(e,t,n,r)=>{const i=(e=>(e=>he(e,8))("string"==typeof e?Se(e):e))(Ve(e));if(i<n||i>r)throw new TypeError(`${t} must be between ${n} and ${r}, inclusive`);return i},Ge=e=>null==e?0:1e3*(e=>ue("string"==typeof e?Se(e):e))("0."+e),He=e=>{const t=e[0];let n=1;if("+"==t)n=1;else{if("-"!=t)throw new TypeError(`Offset direction, ${t}, must be "+" or "-"`);n=-1}return n*(60*Number(e.substring(1,3))+Number(e.substring(4,6)))*60*1e3},Ve=e=>{let t=0;for(;t<e.length-1&&"0"===e.charAt(t);)t++;return 0===t?e:e.slice(t)};class $e extends Error{constructor(e){super(e.message),Object.setPrototypeOf(this,$e.prototype),this.name=e.name,this.$fault=e.$fault,this.$metadata=e.$metadata}}const We=(e,t={})=>{Object.entries(t).filter((([,e])=>void 0!==e)).forEach((([t,n])=>{null!=e[t]&&""!==e[t]||(e[t]=n)}));const n=e.message||e.Message||"UnknownError";return e.message=n,delete e.Message,e},Ke=e=>({output:t,parsedBody:n,errorCode:r})=>{(({output:e,parsedBody:t,exceptionCtor:n,errorCode:r})=>{const i=Qe(e),o=i.httpStatusCode?i.httpStatusCode+"":void 0,s=new n({name:t?.code||t?.Code||r||o||"UnknownError",$fault:"client",$metadata:i});throw We(s,t)})({output:t,parsedBody:n,exceptionCtor:e,errorCode:r})},Qe=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),Xe=e=>{switch(e){case"standard":case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"mobile":return{retryMode:"standard",connectionTimeout:3e4};default:return{}}};let Ye=!1;const Je=e=>{e&&!Ye&&parseInt(e.substring(1,e.indexOf(".")))<14&&(Ye=!0)},Ze=e=>{const t=[];for(const n in c){const r=c[n];void 0!==e[r]&&t.push({algorithmId:()=>r,checksumConstructor:()=>e[r]})}return{_checksumAlgorithms:t,addChecksumAlgorithm(e){this._checksumAlgorithms.push(e)},checksumAlgorithms(){return this._checksumAlgorithms}}},et=e=>{const t={};return e.checksumAlgorithms().forEach((e=>{t[e.algorithmId()]=e.checksumConstructor()})),t},tt=e=>{let t=e.retryStrategy;return{setRetryStrategy(e){t=e},retryStrategy:()=>t}},nt=e=>{const t={};return t.retryStrategy=e.retryStrategy(),t},rt=e=>({...Ze(e),...tt(e)}),it=e=>({...et(e),...nt(e)});function ot(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}const st=e=>Array.isArray(e)?e:[e],at=e=>{const t="#text";for(const n in e)e.hasOwnProperty(n)&&void 0!==e[n][t]?e[n]=e[n][t]:"object"==typeof e[n]&&null!==e[n]&&(e[n]=at(e[n]));return e},ct=function(){const e=Object.getPrototypeOf(this).constructor,t=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(t,e.prototype),t};function lt(e,t,n){let r,i,o;if(void 0===t&&void 0===n)r={},o=e;else{if(r=e,"function"==typeof t)return i=t,o=n,dt(r,i,o);o=t}for(const e of Object.keys(o))Array.isArray(o[e])?pt(r,null,o,e):r[e]=o[e];return r}ct.prototype=Object.create(String.prototype,{constructor:{value:ct,enumerable:!1,writable:!0,configurable:!0}}),Object.setPrototypeOf(ct,String);const ut=(e,t)=>{const n={};for(const r in t)pt(n,e,t,r);return n},dt=(e,t,n)=>lt(e,Object.entries(n).reduce(((e,[n,r])=>(Array.isArray(r)?e[n]=r:e[n]="function"==typeof r?[t,r()]:[t,r],e)),{})),pt=(e,t,n,r)=>{if(null!==t){let i=n[r];"function"==typeof i&&(i=[,i]);const[o=ht,s=ft,a=r]=i;return void(("function"==typeof o&&o(t[a])||"function"!=typeof o&&o)&&(e[r]=s(t[a])))}let[i,o]=n[r];if("function"==typeof o){let t;const n=void 0===i&&null!=(t=o()),s="function"==typeof i&&!!i(void 0)||"function"!=typeof i&&!!i;n?e[r]=t:s&&(e[r]=o())}else{const t=void 0===i&&null!=o,n="function"==typeof i&&!!i(o)||"function"!=typeof i&&!!i;(t||n)&&(e[r]=o)}},ht=e=>null!=e,ft=e=>e,mt=e=>{if(null==e)return{};if(Array.isArray(e))return e.filter((e=>null!=e)).map(mt);if("object"==typeof e){const t={};for(const n of Object.keys(e))null!=e[n]&&(t[n]=mt(e[n]));return t}return e},gt={step:"finalizeRequest",tags:["CHECK_CONTENT_LENGTH_HEADER"],name:"getCheckContentLengthHeaderPlugin",override:!0},yt={tags:["REGION_REDIRECT","S3"],name:"regionRedirectEndpointMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"},bt={step:"initialize",tags:["REGION_REDIRECT","S3"],name:"regionRedirectMiddleware",override:!0};class vt{constructor(e={}){this.data=e,this.lastPurgeTime=Date.now()}get(e){const t=this.data[e];if(t)return t}set(e,t){return this.data[e]=t,t}delete(e){delete this.data[e]}async purgeExpired(){const e=Date.now();if(!(this.lastPurgeTime+vt.EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS>e))for(const t in this.data){const n=this.data[t];if(!n.isRefreshing){const r=await n.identity;r.expiration&&r.expiration.getTime()<e&&delete this.data[t]}}}}vt.EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS=3e4;class St{constructor(e,t=!1,n=Date.now()){this._identity=e,this.isRefreshing=t,this.accessed=n}get identity(){return this.accessed=Date.now(),this._identity}}class wt{constructor(e,t=new vt){this.createSessionFn=e,this.cache=t}async getS3ExpressIdentity(e,t){const n=t.Bucket,{cache:r}=this,i=r.get(n);return i?i.identity.then((e=>(e.expiration?.getTime()??0)<Date.now()?r.set(n,new St(this.getIdentity(n))).identity:((e.expiration?.getTime()??0)<Date.now()+wt.REFRESH_WINDOW_MS&&!i.isRefreshing&&(i.isRefreshing=!0,this.getIdentity(n).then((e=>{r.set(n,new St(Promise.resolve(e)))}))),e))):r.set(n,new St(this.getIdentity(n))).identity}async getIdentity(e){await this.cache.purgeExpired().catch((e=>{console.warn("Error while clearing expired entries in S3ExpressIdentityCache: \n"+e)}));const t=await this.createSessionFn(e);if(!t.Credentials?.AccessKeyId||!t.Credentials?.SecretAccessKey)throw new Error("s3#createSession response credential missing AccessKeyId or SecretAccessKey.");return{accessKeyId:t.Credentials.AccessKeyId,secretAccessKey:t.Credentials.SecretAccessKey,sessionToken:t.Credentials.SessionToken,expiration:t.Credentials.Expiration?new Date(t.Credentials.Expiration):void 0}}}wt.REFRESH_WINDOW_MS=6e4;var Ct=n(3465);const Tt={},Et={};for(let e=0;e<256;e++){let t=e.toString(16).toLowerCase();1===t.length&&(t=`0${t}`),Tt[e]=t,Et[t]=e}function _t(e){let t="";for(let n=0;n<e.byteLength;n++)t+=Tt[e[n]];return t}class xt{constructor(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(`${e} is too large (or, if negative, too small) to represent as an Int64`);const t=new Uint8Array(8);for(let n=7,r=Math.abs(Math.round(e));n>-1&&r>0;n--,r/=256)t[n]=r;return e<0&&Rt(t),new xt(t)}valueOf(){const e=this.bytes.slice(0),t=128&e[0];return t&&Rt(e),parseInt(_t(e),16)*(t?-1:1)}toString(){return String(this.valueOf())}}function Rt(e){for(let t=0;t<8;t++)e[t]^=255;for(let t=7;t>-1&&(e[t]++,0===e[t]);t--);}class It{constructor(e,t){this.toUtf8=e,this.fromUtf8=t}format(e){const t=[];for(const n of Object.keys(e)){const r=this.fromUtf8(n);t.push(Uint8Array.from([r.byteLength]),r,this.formatHeaderValue(e[n]))}const n=new Uint8Array(t.reduce(((e,t)=>e+t.byteLength),0));let r=0;for(const e of t)n.set(e,r),r+=e.byteLength;return n}formatHeaderValue(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":const t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":const n=new DataView(new ArrayBuffer(5));return n.setUint8(0,4),n.setInt32(1,e.value,!1),new Uint8Array(n.buffer);case"long":const r=new Uint8Array(9);return r[0]=5,r.set(e.value.bytes,1),r;case"binary":const i=new DataView(new ArrayBuffer(3+e.value.byteLength));i.setUint8(0,6),i.setUint16(1,e.value.byteLength,!1);const o=new Uint8Array(i.buffer);return o.set(e.value,3),o;case"string":const s=this.fromUtf8(e.value),a=new DataView(new ArrayBuffer(3+s.byteLength));a.setUint8(0,7),a.setUint16(1,s.byteLength,!1);const c=new Uint8Array(a.buffer);return c.set(s,3),c;case"timestamp":const l=new Uint8Array(9);return l[0]=8,l.set(xt.fromNumber(e.value.valueOf()).bytes,1),l;case"uuid":if(!qt.test(e.value))throw new Error(`Invalid UUID received: ${e.value}`);const u=new Uint8Array(17);return u[0]=9,u.set(function(e){if(e.length%2!=0)throw new Error("Hex encoded strings must have an even number length");const t=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2){const r=e.slice(n,n+2).toLowerCase();if(!(r in Et))throw new Error(`Cannot decode unrecognized sequence ${r} as hexadecimal`);t[n/2]=Et[r]}return t}(e.value.replace(/\-/g,"")),1),u}}parse(e){const t={};let n=0;for(;n<e.byteLength;){const r=e.getUint8(n++),i=this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,r));switch(n+=r,e.getUint8(n++)){case 0:t[i]={type:Ot,value:!0};break;case 1:t[i]={type:Ot,value:!1};break;case 2:t[i]={type:Dt,value:e.getInt8(n++)};break;case 3:t[i]={type:At,value:e.getInt16(n,!1)},n+=2;break;case 4:t[i]={type:kt,value:e.getInt32(n,!1)},n+=4;break;case 5:t[i]={type:Nt,value:new xt(new Uint8Array(e.buffer,e.byteOffset+n,8))},n+=8;break;case 6:const r=e.getUint16(n,!1);n+=2,t[i]={type:Lt,value:new Uint8Array(e.buffer,e.byteOffset+n,r)},n+=r;break;case 7:const o=e.getUint16(n,!1);n+=2,t[i]={type:jt,value:this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+n,o))},n+=o;break;case 8:t[i]={type:Mt,value:new Date(new xt(new Uint8Array(e.buffer,e.byteOffset+n,8)).valueOf())},n+=8;break;case 9:const s=new Uint8Array(e.buffer,e.byteOffset+n,16);n+=16,t[i]={type:Ft,value:`${_t(s.subarray(0,4))}-${_t(s.subarray(4,6))}-${_t(s.subarray(6,8))}-${_t(s.subarray(8,10))}-${_t(s.subarray(10))}`};break;default:throw new Error("Unrecognized header type tag")}}return t}}var Pt;!function(e){e[e.boolTrue=0]="boolTrue",e[e.boolFalse=1]="boolFalse",e[e.byte=2]="byte",e[e.short=3]="short",e[e.integer=4]="integer",e[e.long=5]="long",e[e.byteArray=6]="byteArray",e[e.string=7]="string",e[e.timestamp=8]="timestamp",e[e.uuid=9]="uuid"}(Pt||(Pt={}));const Ot="boolean",Dt="byte",At="short",kt="integer",Nt="long",Lt="binary",jt="string",Mt="timestamp",Ft="uuid",qt=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class Bt{constructor(e,t){this.headerMarshaller=new It(e,t),this.messageBuffer=[],this.isEndOfStream=!1}feed(e){this.messageBuffer.push(this.decode(e))}endOfStream(){this.isEndOfStream=!0}getMessage(){const e=this.messageBuffer.pop(),t=this.isEndOfStream;return{getMessage:()=>e,isEndOfStream:()=>t}}getAvailableMessages(){const e=this.messageBuffer;this.messageBuffer=[];const t=this.isEndOfStream;return{getMessages:()=>e,isEndOfStream:()=>t}}encode({headers:e,body:t}){const n=this.headerMarshaller.format(e),r=n.byteLength+t.byteLength+16,i=new Uint8Array(r),o=new DataView(i.buffer,i.byteOffset,i.byteLength),s=new Ct.Crc32;return o.setUint32(0,r,!1),o.setUint32(4,n.byteLength,!1),o.setUint32(8,s.update(i.subarray(0,8)).digest(),!1),i.set(n,12),i.set(t,n.byteLength+12),o.setUint32(r-4,s.update(i.subarray(8,r-4)).digest(),!1),i}decode(e){const{headers:t,body:n}=function({byteLength:e,byteOffset:t,buffer:n}){if(e<16)throw new Error("Provided message too short to accommodate event stream message overhead");const r=new DataView(n,t,e),i=r.getUint32(0,!1);if(e!==i)throw new Error("Reported message length does not match received message length");const o=r.getUint32(4,!1),s=r.getUint32(8,!1),a=r.getUint32(e-4,!1),c=(new Ct.Crc32).update(new Uint8Array(n,t,8));if(s!==c.digest())throw new Error(`The prelude checksum specified in the message (${s}) does not match the calculated CRC32 checksum (${c.digest()})`);if(c.update(new Uint8Array(n,t+8,e-12)),a!==c.digest())throw new Error(`The message checksum (${c.digest()}) did not match the expected value of ${a}`);return{headers:new DataView(n,t+8+4,o),body:new Uint8Array(n,t+8+4+o,i-o-16)}}(e);return{headers:this.headerMarshaller.parse(t),body:n}}formatHeaders(e){return this.headerMarshaller.format(e)}}class Ut{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream){const t=this.options.decoder.decode(e);yield t}}}class zt{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream){const t=this.options.encoder.encode(e);yield t}this.options.includeEndFrame&&(yield new Uint8Array(0))}}class Gt{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.messageStream){const t=await this.options.deserializer(e);void 0!==t&&(yield t)}}}class Ht{constructor(e){this.options=e}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(const e of this.options.inputStream){const t=this.options.serializer(e);yield t}}}const Vt=e=>e[p]||(e[p]={}),$t=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t},Wt="X-Amz-Date",Kt="X-Amz-Signature",Qt="X-Amz-Security-Token",Xt="authorization",Yt=Wt.toLowerCase(),Jt=[Xt,Yt,"date"],Zt=Kt.toLowerCase(),en="x-amz-content-sha256",tn=Qt.toLowerCase(),nn={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},rn=/^proxy-/,on=/^sec-/,sn="AWS4-HMAC-SHA256",an="AWS4-HMAC-SHA256-PAYLOAD",cn="aws4_request",ln={},un=[],dn=(e,t,n)=>`${e}/${t}/${n}/${cn}`,pn=(e,t,n)=>{const r=new e(t);return r.update(B(n)),r.digest()},hn=({headers:e},t,n)=>{const r={};for(const i of Object.keys(e).sort()){if(null==e[i])continue;const o=i.toLowerCase();(o in nn||t?.has(o)||rn.test(o)||on.test(o))&&(!n||n&&!n.has(o))||(r[o]=e[i].trim().replace(/\s+/g," "))}return r},fn=async({headers:e,body:t},n)=>{for(const t of Object.keys(e))if(t.toLowerCase()===en)return e[t];if(null==t)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";if("string"==typeof t||ArrayBuffer.isView(t)||A(t)){const e=new n;return e.update(B(t)),_t(await e.digest())}return"UNSIGNED-PAYLOAD"},mn=({headers:e,query:t,...n})=>({...n,headers:{...e},query:t?gn(t):void 0}),gn=e=>Object.keys(e).reduce(((t,n)=>{const r=e[n];return{...t,[n]:Array.isArray(r)?[...r]:r}}),{}),yn=e=>{e="function"==typeof e.clone?e.clone():mn(e);for(const t of Object.keys(e.headers))Jt.indexOf(t.toLowerCase())>-1&&delete e.headers[t];return e};class bn{constructor({applyChecksum:e,credentials:t,region:n,service:r,sha256:i,uriEscapePath:o=!0}){this.headerMarshaller=new It(U,q),this.service=r,this.sha256=i,this.uriEscapePath=o,this.applyChecksum="boolean"!=typeof e||e,this.regionProvider=$t(n),this.credentialProvider=$t(t)}async presign(e,t={}){const{signingDate:n=new Date,expiresIn:r=3600,unsignableHeaders:i,unhoistableHeaders:o,signableHeaders:s,signingRegion:a,signingService:c}=t,l=await this.credentialProvider();this.validateResolvedCredentials(l);const u=a??await this.regionProvider(),{longDate:d,shortDate:p}=vn(n);if(r>604800)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const h=dn(p,u,c??this.service),f=((e,t={})=>{const{headers:n,query:r={}}="function"==typeof e.clone?e.clone():mn(e);for(const e of Object.keys(n)){const i=e.toLowerCase();"x-amz-"!==i.slice(0,6)||t.unhoistableHeaders?.has(i)||(r[e]=n[e],delete n[e])}return{...e,headers:n,query:r}})(yn(e),{unhoistableHeaders:o});l.sessionToken&&(f.query[Qt]=l.sessionToken),f.query["X-Amz-Algorithm"]=sn,f.query["X-Amz-Credential"]=`${l.accessKeyId}/${h}`,f.query[Wt]=d,f.query["X-Amz-Expires"]=r.toString(10);const m=hn(f,i,s);return f.query["X-Amz-SignedHeaders"]=Sn(m),f.query[Kt]=await this.getSignature(d,h,this.getSigningKey(l,u,p,c),this.createCanonicalRequest(f,m,await fn(e,this.sha256))),f}async sign(e,t){return"string"==typeof e?this.signString(e,t):e.headers&&e.payload?this.signEvent(e,t):e.message?this.signMessage(e,t):this.signRequest(e,t)}async signEvent({headers:e,payload:t},{signingDate:n=new Date,priorSignature:r,signingRegion:i,signingService:o}){const s=i??await this.regionProvider(),{shortDate:a,longDate:c}=vn(n),l=dn(a,s,o??this.service),u=await fn({headers:{},body:t},this.sha256),d=new this.sha256;d.update(e);const p=_t(await d.digest()),h=[an,c,l,r,p,u].join("\n");return this.signString(h,{signingDate:n,signingRegion:s,signingService:o})}async signMessage(e,{signingDate:t=new Date,signingRegion:n,signingService:r}){return this.signEvent({headers:this.headerMarshaller.format(e.message.headers),payload:e.message.body},{signingDate:t,signingRegion:n,signingService:r,priorSignature:e.priorSignature}).then((t=>({message:e.message,signature:t})))}async signString(e,{signingDate:t=new Date,signingRegion:n,signingService:r}={}){const i=await this.credentialProvider();this.validateResolvedCredentials(i);const o=n??await this.regionProvider(),{shortDate:s}=vn(t),a=new this.sha256(await this.getSigningKey(i,o,s,r));return a.update(B(e)),_t(await a.digest())}async signRequest(e,{signingDate:t=new Date,signableHeaders:n,unsignableHeaders:r,signingRegion:i,signingService:o}={}){const s=await this.credentialProvider();this.validateResolvedCredentials(s);const a=i??await this.regionProvider(),c=yn(e),{longDate:l,shortDate:u}=vn(t),d=dn(u,a,o??this.service);c.headers[Yt]=l,s.sessionToken&&(c.headers[tn]=s.sessionToken);const p=await fn(c,this.sha256);!((e,t)=>{e=e.toLowerCase();for(const n of Object.keys(t))if(e===n.toLowerCase())return!0;return!1})(en,c.headers)&&this.applyChecksum&&(c.headers[en]=p);const h=hn(c,r,n),f=await this.getSignature(l,d,this.getSigningKey(s,a,u,o),this.createCanonicalRequest(c,h,p));return c.headers[Xt]=`${sn} Credential=${s.accessKeyId}/${d}, SignedHeaders=${Sn(h)}, Signature=${f}`,c}createCanonicalRequest(e,t,n){const r=Object.keys(t).sort();return`${e.method}\n${this.getCanonicalPath(e)}\n${(({query:e={}})=>{const t=[],n={};for(const r of Object.keys(e).sort()){if(r.toLowerCase()===Zt)continue;t.push(r);const i=e[r];"string"==typeof i?n[r]=`${V(r)}=${V(i)}`:Array.isArray(i)&&(n[r]=i.slice(0).reduce(((e,t)=>e.concat([`${V(r)}=${V(t)}`])),[]).sort().join("&"))}return t.map((e=>n[e])).filter((e=>e)).join("&")})(e)}\n${r.map((e=>`${e}:${t[e]}`)).join("\n")}\n\n${r.join(";")}\n${n}`}async createStringToSign(e,t,n){const r=new this.sha256;r.update(B(n));const i=await r.digest();return`${sn}\n${e}\n${t}\n${_t(i)}`}getCanonicalPath({path:e}){if(this.uriEscapePath){const t=[];for(const n of e.split("/"))0!==n?.length&&"."!==n&&(".."===n?t.pop():t.push(n));const n=`${e?.startsWith("/")?"/":""}${t.join("/")}${t.length>0&&e?.endsWith("/")?"/":""}`;return encodeURIComponent(n).replace(/%2F/g,"/")}return e}async getSignature(e,t,n,r){const i=await this.createStringToSign(e,t,r),o=new this.sha256(await n);return o.update(B(i)),_t(await o.digest())}getSigningKey(e,t,n,r){return(async(e,t,n,r,i)=>{const o=`${n}:${r}:${i}:${_t(await pn(e,t.secretAccessKey,t.accessKeyId))}:${t.sessionToken}`;if(o in ln)return ln[o];for(un.push(o);un.length>50;)delete ln[un.shift()];let s=`AWS4${t.secretAccessKey}`;for(const t of[n,r,i,cn])s=await pn(e,s,t);return ln[o]=s})(this.sha256,e,n,t,r||this.service)}validateResolvedCredentials(e){if("object"!=typeof e||"string"!=typeof e.accessKeyId||"string"!=typeof e.secretAccessKey)throw new Error("Resolved credential object is not valid")}}const vn=e=>{const t=(n=e,(e=>"number"==typeof e?new Date(1e3*e):"string"==typeof e?Number(e)?new Date(1e3*Number(e)):new Date(e):e)(n).toISOString().replace(/\.\d{3}Z$/,"Z")).replace(/[\-:]/g,"");var n;return{longDate:t,shortDate:t.slice(0,8)}},Sn=e=>Object.keys(e).sort().join(";"),wn=(e,t,n)=>{if(t in e){if("true"===e[t])return!0;if("false"===e[t])return!1;throw new Error(`Cannot load ${n} "${t}". Expected "true" or "false", got ${e[t]}.`)}};var Cn;!function(e){e.ENV="env",e.CONFIG="shared config entry"}(Cn||(Cn={}));const Tn="X-Amz-S3session-Token",En=Tn.toLowerCase(),_n={environmentVariableSelector:e=>wn(e,"AWS_S3_DISABLE_EXPRESS_SESSION_AUTH",Cn.ENV),configFileSelector:e=>wn(e,"s3_disable_express_session_auth",Cn.CONFIG),default:!1};class xn extends bn{async signWithCredentials(e,t,n){const r=Rn(t);return e.headers[En]=t.sessionToken,In(this,r),this.signRequest(e,n??{})}async presignWithCredentials(e,t,n){const r=Rn(t);return delete e.headers[En],e.headers[Tn]=t.sessionToken,e.query=e.query??{},e.query[Tn]=t.sessionToken,In(this,r),this.presign(e,n)}}function Rn(e){return{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey,expiration:e.expiration}}function In(e,t){const n=setTimeout((()=>{throw new Error("SignatureV4S3Express credential override was created but not called.")}),10),r=e.credentialProvider;e.credentialProvider=()=>(clearTimeout(n),e.credentialProvider=r,Promise.resolve(t))}const Pn={name:"s3ExpressMiddleware",step:"build",tags:["S3","S3_EXPRESS"],override:!0},On=(e=new Uint8Array,t)=>e instanceof Uint8Array?Promise.resolve(e):t.streamCollector(e)||Promise.resolve(new Uint8Array),Dn={relation:"after",toMiddleware:"deserializerMiddleware",tags:["THROW_200_EXCEPTIONS","S3"],name:"throw200ExceptionsMiddleware",override:!0},An=e=>({applyToStack:t=>{t.addRelativeTo((e=>t=>async n=>{const r=await t(n),{response:i}=r;if(!g.isInstance(i))return r;const{statusCode:o,body:s}=i;if(o<200||o>=300)return r;const a=await On(s,e),c=await(l=a,u=e,On(l,u).then((e=>u.utf8Encoder(e))));var l,u;if(0===a.length){const e=new Error("S3 aborted request");throw e.name="InternalError",e}return c&&c.match("<Error>")&&(i.statusCode=400),i.body=a,r})(e),Dn)}}),kn={step:"initialize",tags:["VALIDATE_BUCKET_NAME"],name:"validateBucketNameMiddleware",override:!0};class Nn extends Error{constructor(e,t=!0){super(e),this.tryNextLink=t,this.name="ProviderError",Object.setPrototypeOf(this,Nn.prototype)}static from(e,t=!0){return Object.assign(new this(e.message,t),e)}}class Ln extends Nn{constructor(e,t=!0){super(e,t),this.tryNextLink=t,this.name="CredentialsProviderError",Object.setPrototypeOf(this,Ln.prototype)}}class jn extends Nn{constructor(e,t=!0){super(e,t),this.tryNextLink=t,this.name="TokenProviderError",Object.setPrototypeOf(this,jn.prototype)}}const Mn=(...e)=>async()=>{if(0===e.length)throw new Nn("No providers in chain");let t;for(const n of e)try{return await n()}catch(e){if(t=e,e?.tryNextLink)continue;throw e}throw t},Fn=(e,t,n)=>{let r,i,o,s=!1;const a=async()=>{i||(i=e());try{r=await i,o=!0,s=!1}finally{i=void 0}return r};return void 0===t?async e=>(o&&!e?.forceRefresh||(r=await a()),r):async e=>(o&&!e?.forceRefresh||(r=await a()),s?r:n&&!n(r)?(s=!0,r):t(r)?(await a(),r):r)},qn=e=>new Date(Date.now()+e),Bn=(e,t)=>{const n=Date.parse(e);return((e,t)=>Math.abs(qn(t).getTime()-e)>=3e5)(n,t)?n-Date.now():t},Un=e=>g.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,zn={name:"awsAuthMiddleware",tags:["SIGNATURE","AWSAUTH"],relation:"after",toMiddleware:"retryMiddleware",override:!0};function Gn(e){return{...e,customUserAgent:"string"==typeof e.customUserAgent?[[e.customUserAgent]]:e.customUserAgent}}const Hn=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$"),Vn=e=>Hn.test(e)||e.startsWith("[")&&e.endsWith("]"),$n=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$"),Wn=(e,t=!1)=>{if(!t)return $n.test(e);const n=e.split(".");for(const e of n)if(!Wn(e))return!1;return!0},Kn={},Qn="endpoints";function Xn(e){return"object"!=typeof e||null==e?e:"ref"in e?`$${Xn(e.ref)}`:"fn"in e?`${e.fn}(${(e.argv||[]).map(Xn).join(", ")})`:JSON.stringify(e,null,2)}class Yn extends Error{constructor(e){super(e),this.name="EndpointError"}}const Jn=(e,t)=>(e=>{const t=e.split("."),n=[];for(const r of t){const t=r.indexOf("[");if(-1!==t){if(r.indexOf("]")!==r.length-1)throw new Yn(`Path: '${e}' does not end with ']'`);const i=r.slice(t+1,-1);if(Number.isNaN(parseInt(i)))throw new Yn(`Invalid array index: '${i}' in path: '${e}'`);0!==t&&n.push(r.slice(0,t)),n.push(i)}else n.push(r)}return n})(t).reduce(((n,r)=>{if("object"!=typeof n)throw new Yn(`Index '${r}' in '${t}' not found in '${JSON.stringify(e)}'`);return Array.isArray(n)?n[parseInt(r)]:n[r]}),e),Zn={[a.HTTP]:80,[a.HTTPS]:443},er={booleanEquals:(e,t)=>e===t,getAttr:Jn,isSet:e=>null!=e,isValidHostLabel:Wn,not:e=>!e,parseURL:e=>{const t=(()=>{try{if(e instanceof URL)return e;if("object"==typeof e&&"hostname"in e){const{hostname:t,port:n,protocol:r="",path:i="",query:o={}}=e,s=new URL(`${r}//${t}${n?`:${n}`:""}${i}`);return s.search=Object.entries(o).map((([e,t])=>`${e}=${t}`)).join("&"),s}return new URL(e)}catch(e){return null}})();if(!t)return console.error(`Unable to parse ${JSON.stringify(e)} as a whatwg URL.`),null;const n=t.href,{host:r,hostname:i,pathname:o,protocol:s,search:c}=t;if(c)return null;const l=s.slice(0,-1);if(!Object.values(a).includes(l))return null;const u=Vn(i);return{scheme:l,authority:`${r}${n.includes(`${r}:${Zn[l]}`)||"string"==typeof e&&e.includes(`${r}:${Zn[l]}`)?`:${Zn[l]}`:""}`,path:o,normalizedPath:o.endsWith("/")?o:`${o}/`,isIp:u}},stringEquals:(e,t)=>e===t,substring:(e,t,n,r)=>t>=n||e.length<n?null:r?e.substring(e.length-n,e.length-t):e.substring(t,n),uriEncode:e=>encodeURIComponent(e).replace(/[!*'()]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`))},tr=(e,t)=>{const n=[],r={...t.endpointParams,...t.referenceRecord};let i=0;for(;i<e.length;){const t=e.indexOf("{",i);if(-1===t){n.push(e.slice(i));break}n.push(e.slice(i,t));const o=e.indexOf("}",t);if(-1===o){n.push(e.slice(t));break}"{"===e[t+1]&&"}"===e[o+1]&&(n.push(e.slice(t+1,o)),i=o+2);const s=e.substring(t+1,o);if(s.includes("#")){const[e,t]=s.split("#");n.push(Jn(r[e],t))}else n.push(r[s]);i=o+1}return n.join("")},nr=(e,t,n)=>{if("string"==typeof e)return tr(e,n);if(e.fn)return rr(e,n);if(e.ref)return(({ref:e},t)=>({...t.endpointParams,...t.referenceRecord}[e]))(e,n);throw new Yn(`'${t}': ${String(e)} is not a string, function or reference.`)},rr=({fn:e,argv:t},n)=>{const r=t.map((e=>["boolean","number"].includes(typeof e)?e:nr(e,"arg",n))),i=e.split(".");return i[0]in Kn&&null!=i[1]?Kn[i[0]][i[1]](...r):er[e](...r)},ir=({assign:e,...t},n)=>{if(e&&e in n.referenceRecord)throw new Yn(`'${e}' is already defined in Reference Record.`);const r=rr(t,n);return n.logger?.debug?.(Qn,`evaluateCondition: ${Xn(t)} = ${Xn(r)}`),{result:""===r||!!r,...null!=e&&{toAssign:{name:e,value:r}}}},or=(e=[],t)=>{const n={};for(const r of e){const{result:e,toAssign:i}=ir(r,{...t,referenceRecord:{...t.referenceRecord,...n}});if(!e)return{result:e};i&&(n[i.name]=i.value,t.logger?.debug?.(Qn,`assign: ${i.name} := ${Xn(i.value)}`))}return{result:!0,referenceRecord:n}},sr=(e,t)=>Object.entries(e).reduce(((e,[n,r])=>({...e,[n]:r.map((e=>{const r=nr(e,"Header value entry",t);if("string"!=typeof r)throw new Yn(`Header '${n}' value '${r}' is not a string`);return r}))})),{}),ar=(e,t)=>{if(Array.isArray(e))return e.map((e=>ar(e,t)));switch(typeof e){case"string":return tr(e,t);case"object":if(null===e)throw new Yn(`Unexpected endpoint property: ${e}`);return cr(e,t);case"boolean":return e;default:throw new Yn("Unexpected endpoint property type: "+typeof e)}},cr=(e,t)=>Object.entries(e).reduce(((e,[n,r])=>({...e,[n]:ar(r,t)})),{}),lr=(e,t)=>{const n=nr(e,"Endpoint URL",t);if("string"==typeof n)try{return new URL(n)}catch(e){throw console.error(`Failed to construct URL with ${n}`,e),e}throw new Yn("Endpoint URL must be a string, got "+typeof n)},ur=(e,t)=>{const{conditions:n,endpoint:r}=e,{result:i,referenceRecord:o}=or(n,t);if(!i)return;const s={...t,referenceRecord:{...t.referenceRecord,...o}},{url:a,properties:c,headers:l}=r;return t.logger?.debug?.(Qn,`Resolving endpoint from template: ${Xn(r)}`),{...null!=l&&{headers:sr(l,s)},...null!=c&&{properties:cr(c,s)},url:lr(a,s)}},dr=(e,t)=>{const{conditions:n,error:r}=e,{result:i,referenceRecord:o}=or(n,t);if(i)throw new Yn(nr(r,"Error",{...t,referenceRecord:{...t.referenceRecord,...o}}))},pr=(e,t)=>{const{conditions:n,rules:r}=e,{result:i,referenceRecord:o}=or(n,t);if(i)return hr(r,{...t,referenceRecord:{...t.referenceRecord,...o}})},hr=(e,t)=>{for(const n of e)if("endpoint"===n.type){const e=ur(n,t);if(e)return e}else if("error"===n.type)dr(n,t);else{if("tree"!==n.type)throw new Yn(`Unknown endpoint rule: ${n}`);{const e=pr(n,t);if(e)return e}}throw new Yn("Rules evaluation failed")},fr=(e,t)=>{const{endpointParams:n,logger:r}=t,{parameters:i,rules:o}=e;t.logger?.debug?.(`${Qn} Initial EndpointParams: ${Xn(n)}`);const s=Object.entries(i).filter((([,e])=>null!=e.default)).map((([e,t])=>[e,t.default]));if(s.length>0)for(const[e,t]of s)n[e]=n[e]??t;const a=Object.entries(i).filter((([,e])=>e.required)).map((([e])=>e));for(const e of a)if(null==n[e])throw new Yn(`Missing required parameter: '${e}'`);const c=hr(o,{endpointParams:n,logger:r,referenceRecord:{}});if(t.endpointParams?.Endpoint)try{const e=new URL(t.endpointParams.Endpoint),{protocol:n,port:r}=e;c.url.protocol=n,c.url.port=r}catch(e){}return t.logger?.debug?.(`${Qn} Resolved endpoint: ${Xn(c)}`),c},mr=(e,t=!1)=>{if(t){for(const t of e.split("."))if(!mr(t))return!1;return!0}return!(!Wn(e)||e.length<3||e.length>63||e!==e.toLowerCase()||Vn(e))};let gr=JSON.parse('{"partitions":[{"id":"aws","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-east-1","name":"aws","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^(us|eu|ap|sa|ca|me|af|il)\\\\-\\\\w+\\\\-\\\\d+$","regions":{"af-south-1":{"description":"Africa (Cape Town)"},"ap-east-1":{"description":"Asia Pacific (Hong Kong)"},"ap-northeast-1":{"description":"Asia Pacific (Tokyo)"},"ap-northeast-2":{"description":"Asia Pacific (Seoul)"},"ap-northeast-3":{"description":"Asia Pacific (Osaka)"},"ap-south-1":{"description":"Asia Pacific (Mumbai)"},"ap-south-2":{"description":"Asia Pacific (Hyderabad)"},"ap-southeast-1":{"description":"Asia Pacific (Singapore)"},"ap-southeast-2":{"description":"Asia Pacific (Sydney)"},"ap-southeast-3":{"description":"Asia Pacific (Jakarta)"},"ap-southeast-4":{"description":"Asia Pacific (Melbourne)"},"aws-global":{"description":"AWS Standard global region"},"ca-central-1":{"description":"Canada (Central)"},"ca-west-1":{"description":"Canada West (Calgary)"},"eu-central-1":{"description":"Europe (Frankfurt)"},"eu-central-2":{"description":"Europe (Zurich)"},"eu-north-1":{"description":"Europe (Stockholm)"},"eu-south-1":{"description":"Europe (Milan)"},"eu-south-2":{"description":"Europe (Spain)"},"eu-west-1":{"description":"Europe (Ireland)"},"eu-west-2":{"description":"Europe (London)"},"eu-west-3":{"description":"Europe (Paris)"},"il-central-1":{"description":"Israel (Tel Aviv)"},"me-central-1":{"description":"Middle East (UAE)"},"me-south-1":{"description":"Middle East (Bahrain)"},"sa-east-1":{"description":"South America (Sao Paulo)"},"us-east-1":{"description":"US East (N. Virginia)"},"us-east-2":{"description":"US East (Ohio)"},"us-west-1":{"description":"US West (N. California)"},"us-west-2":{"description":"US West (Oregon)"}}},{"id":"aws-cn","outputs":{"dnsSuffix":"amazonaws.com.cn","dualStackDnsSuffix":"api.amazonwebservices.com.cn","implicitGlobalRegion":"cn-northwest-1","name":"aws-cn","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^cn\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-cn-global":{"description":"AWS China global region"},"cn-north-1":{"description":"China (Beijing)"},"cn-northwest-1":{"description":"China (Ningxia)"}}},{"id":"aws-us-gov","outputs":{"dnsSuffix":"amazonaws.com","dualStackDnsSuffix":"api.aws","implicitGlobalRegion":"us-gov-west-1","name":"aws-us-gov","supportsDualStack":true,"supportsFIPS":true},"regionRegex":"^us\\\\-gov\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-us-gov-global":{"description":"AWS GovCloud (US) global region"},"us-gov-east-1":{"description":"AWS GovCloud (US-East)"},"us-gov-west-1":{"description":"AWS GovCloud (US-West)"}}},{"id":"aws-iso","outputs":{"dnsSuffix":"c2s.ic.gov","dualStackDnsSuffix":"c2s.ic.gov","implicitGlobalRegion":"us-iso-east-1","name":"aws-iso","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-iso\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-global":{"description":"AWS ISO (US) global region"},"us-iso-east-1":{"description":"US ISO East"},"us-iso-west-1":{"description":"US ISO WEST"}}},{"id":"aws-iso-b","outputs":{"dnsSuffix":"sc2s.sgov.gov","dualStackDnsSuffix":"sc2s.sgov.gov","implicitGlobalRegion":"us-isob-east-1","name":"aws-iso-b","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-isob\\\\-\\\\w+\\\\-\\\\d+$","regions":{"aws-iso-b-global":{"description":"AWS ISOB (US) global region"},"us-isob-east-1":{"description":"US ISOB East (Ohio)"}}},{"id":"aws-iso-e","outputs":{"dnsSuffix":"cloud.adc-e.uk","dualStackDnsSuffix":"cloud.adc-e.uk","implicitGlobalRegion":"eu-isoe-west-1","name":"aws-iso-e","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^eu\\\\-isoe\\\\-\\\\w+\\\\-\\\\d+$","regions":{}},{"id":"aws-iso-f","outputs":{"dnsSuffix":"csp.hci.ic.gov","dualStackDnsSuffix":"csp.hci.ic.gov","implicitGlobalRegion":"us-isof-south-1","name":"aws-iso-f","supportsDualStack":false,"supportsFIPS":true},"regionRegex":"^us\\\\-isof\\\\-\\\\w+\\\\-\\\\d+$","regions":{}}],"version":"1.1"}');const yr={isVirtualHostableS3Bucket:mr,parseArn:e=>{const t=e.split(":");if(t.length<6)return null;const[n,r,i,o,s,...a]=t;return"arn"!==n||""===r||""===i||""===a[0]?null:{partition:r,service:i,region:o,accountId:s,resourceId:a[0].includes("/")?a[0].split("/"):a}},partition:e=>{const{partitions:t}=gr;for(const n of t){const{regions:t,outputs:r}=n;for(const[n,i]of Object.entries(t))if(n===e)return{...r,...i}}for(const n of t){const{regionRegex:t,outputs:r}=n;if(new RegExp(t).test(e))return{...r}}const n=t.find((e=>"aws"===e.id));if(!n)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...n.outputs}}};Kn.aws=yr;const br="user-agent",vr="x-amz-user-agent",Sr=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,wr=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g,Cr=e=>{const t=e[0].split("/").map((e=>e.replace(Sr,"-"))).join("/"),n=e[1]?.replace(wr,"-"),r=t.indexOf("/"),i=t.substring(0,r);let o=t.substring(r+1);return"api"===i&&(o=o.toLowerCase()),[i,o,n].filter((e=>e&&e.length>0)).reduce(((e,t,n)=>{switch(n){case 0:return t;case 1:return`${e}/${t}`;default:return`${e}#${t}`}}),"")},Tr={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0},Er=e=>({applyToStack:t=>{var n;t.add((n=e,(e,t)=>async r=>{const{request:i}=r;if(!m.isInstance(i))return e(r);const{headers:o}=i,s=t?.userAgent?.map(Cr)||[],a=(await n.defaultUserAgentProvider()).map(Cr),c=n?.customUserAgent?.map(Cr)||[],l=[].concat([...a,...s,...c]).join(" "),u=[...a.filter((e=>e.startsWith("aws-sdk-"))),...c].join(" ");return"browser"!==n.runtime?(u&&(o[vr]=o[vr]?`${o[br]} ${u}`:u),o[br]=l):o[vr]=l,e({...r,request:i})}),Tr)}}),_r={environmentVariableSelector:e=>wn(e,"AWS_USE_DUALSTACK_ENDPOINT",Cn.ENV),configFileSelector:e=>wn(e,"use_dualstack_endpoint",Cn.CONFIG),default:!1},xr={environmentVariableSelector:e=>wn(e,"AWS_USE_FIPS_ENDPOINT",Cn.ENV),configFileSelector:e=>wn(e,"use_fips_endpoint",Cn.CONFIG),default:!1},Rr={environmentVariableSelector:e=>e.AWS_REGION,configFileSelector:e=>e.region,default:()=>{throw new Error("Region is missing")}},Ir={preferredFile:"credentials"},Pr=e=>"string"==typeof e&&(e.startsWith("fips-")||e.endsWith("-fips")),Or=e=>Pr(e)?["fips-aws-global","aws-fips"].includes(e)?"us-east-1":e.replace(/fips-(dkr-|prod-)?|-fips/,""):e,Dr=e=>{const{region:t,useFipsEndpoint:n}=e;if(!t)throw new Error("Region is missing");return{...e,region:async()=>{if("string"==typeof t)return Or(t);const e=await t();return Or(e)},useFipsEndpoint:async()=>{const e="string"==typeof t?t:await t();return!!Pr(e)||("function"!=typeof n?Promise.resolve(!!n):n())}}},Ar="content-length",kr={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0},Nr=e=>({applyToStack:t=>{var n;t.add((n=e.bodyLengthChecker,e=>async t=>{const r=t.request;if(m.isInstance(r)){const{body:e,headers:t}=r;if(e&&-1===Object.keys(t).map((e=>e.toLowerCase())).indexOf(Ar))try{const t=n(e);r.headers={...r.headers,[Ar]:String(t)}}catch(e){}}return e({...t,request:r})}),kr)}}),Lr=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,jr=/(\d+\.){3}\d+/,Mr=/\.\./,Fr=(e,t,n)=>{const r=async()=>{const r=n[e]??n[t];return"function"==typeof r?r():r};return"credentialScope"===e||"CredentialScope"===t?async()=>{const e="function"==typeof n.credentials?await n.credentials():n.credentials;return e?.credentialScope??e?.CredentialScope}:"endpoint"===e||"endpoint"===t?async()=>{const e=await r();if(e&&"object"==typeof e){if("url"in e)return e.url.href;if("hostname"in e){const{protocol:t,hostname:n,port:r,path:i}=e;return`${t}//${n}${r?":"+r:""}${i}`}}return e}:r};var qr=n(857),Br=n(6928);const Ur={},zr=()=>{const{HOME:e,USERPROFILE:t,HOMEPATH:n,HOMEDRIVE:r=`C:${Br.sep}`}=process.env;if(e)return e;if(t)return t;if(n)return`${r}${n}`;const i=process&&process.geteuid?`${process.geteuid()}`:"DEFAULT";return Ur[i]||(Ur[i]=(0,qr.homedir)()),Ur[i]},Gr="AWS_PROFILE",Hr=e=>e.profile||process.env[Gr]||"default";var Vr=n(6982),$r=n.n(Vr);const Wr=e=>{const t=(0,Vr.createHash)("sha1").update(e).digest("hex");return(0,Br.join)(zr(),".aws","sso","cache",`${t}.json`)};var Kr=n(9896);const{readFile:Qr}=Kr.promises,Xr=async e=>{const t=Wr(e),n=await Qr(t,"utf8");return JSON.parse(n)},Yr=e=>Object.entries(e).filter((([e])=>{const t=e.indexOf(ai);return-1!==t&&Object.values(h).includes(e.substring(0,t))})).reduce(((e,[t,n])=>{const r=t.indexOf(ai);return e[t.substring(0,r)===h.PROFILE?t.substring(r+1):t]=n,e}),{...e.default&&{default:e.default}}),Jr=()=>process.env.AWS_CONFIG_FILE||(0,Br.join)(zr(),".aws","config"),Zr=()=>process.env.AWS_SHARED_CREDENTIALS_FILE||(0,Br.join)(zr(),".aws","credentials"),ei=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,ti=["__proto__","profile __proto__"],ni=e=>{const t={};let n,r;for(const i of e.split(/\r?\n/)){const e=i.split(/(^|\s)[;#]/)[0].trim();if("["===e[0]&&"]"===e[e.length-1]){n=void 0,r=void 0;const t=e.substring(1,e.length-1),i=ei.exec(t);if(i){const[,e,,t]=i;Object.values(h).includes(e)&&(n=[e,t].join(ai))}else n=t;if(ti.includes(t))throw new Error(`Found invalid profile name "${t}"`)}else if(n){const o=e.indexOf("=");if(![0,-1].includes(o)){const[s,a]=[e.substring(0,o).trim(),e.substring(o+1).trim()];if(""===a)r=s;else{r&&i.trimStart()===i&&(r=void 0),t[n]=t[n]||{};const e=r?[r,s].join(ai):s;t[n][e]=a}}}}return t},{readFile:ri}=Kr.promises,ii={},oi=(e,t)=>(ii[e]&&!t?.ignoreCache||(ii[e]=ri(e,"utf8")),ii[e]),si=()=>({}),ai=".",ci=async(e={})=>{const{filepath:t=Zr(),configFilepath:n=Jr()}=e,r=await Promise.all([oi(n,{ignoreCache:e.ignoreCache}).then(ni).then(Yr).catch(si),oi(t,{ignoreCache:e.ignoreCache}).then(ni).catch(si)]);return{configFile:r[0],credentialsFile:r[1]}},li=e=>Object.entries(e).filter((([e])=>e.startsWith(h.SSO_SESSION+ai))).reduce(((e,[t,n])=>({...e,[t.split(ai)[1]]:n})),{}),ui=()=>({}),di=async(e={})=>oi(e.configFilepath??Jr()).then(ni).then(li).catch(ui),pi=async e=>{const t=await ci(e);return((...e)=>{const t={};for(const n of e)for(const[e,r]of Object.entries(n))void 0!==t[e]?Object.assign(t[e],r):t[e]=r;return t})(t.configFile,t.credentialsFile)},hi=({environmentVariableSelector:e,configFileSelector:t,default:n},r={})=>{return Fn(Mn((i=e,async()=>{try{const e=i(process.env);if(void 0===e)throw new Error;return e}catch(e){throw new Ln(e.message||`Cannot load config from environment variables with getter: ${i}`)}}),((e,{preferredFile:t="config",...n}={})=>async()=>{const r=Hr(n),{configFile:i,credentialsFile:o}=await ci(n),s=o[r]||{},a=i[r]||{},c="config"===t?{...s,...a}:{...a,...s};try{const n=e(c,"config"===t?i:o);if(void 0===n)throw new Error;return n}catch(t){throw new Ln(t.message||`Cannot load config for profile ${r} in SDK configuration files with getter: ${e}`)}})(t,r),(e=>{return"function"==typeof e?async()=>await e():(t=e,()=>Promise.resolve(t));var t})(n)));var i},fi="AWS_ENDPOINT_URL",mi="endpoint_url",gi=e=>{if("string"==typeof e)return gi(new URL(e));const{hostname:t,pathname:n,port:r,protocol:i,search:o}=e;let s;return o&&(s=function(e){const t={};if(e=e.replace(/^\?/,""))for(const n of e.split("&")){let[e,r=null]=n.split("=");e=decodeURIComponent(e),r&&(r=decodeURIComponent(r)),e in t?Array.isArray(t[e])?t[e].push(r):t[e]=[t[e],r]:t[e]=r}return t}(o)),{hostname:t,port:r?parseInt(r):void 0,protocol:i,path:n,query:s}},yi=e=>"object"==typeof e?"url"in e?gi(e.url):e:gi(e),bi=async(e,t,n)=>{const r={},i=t?.getEndpointParameterInstructions?.()||{};for(const[t,o]of Object.entries(i))switch(o.type){case"staticContextParams":r[t]=o.value;break;case"contextParams":r[t]=e[o.name];break;case"clientContextParams":case"builtInParams":r[t]=await Fr(o.name,t,n)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(o))}return 0===Object.keys(i).length&&Object.assign(r,n),"s3"===String(n.serviceId).toLowerCase()&&await(async e=>{const t=e?.Bucket||"";if("string"==typeof e.Bucket&&(e.Bucket=t.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"))),(e=>{const[t,n,r,i,o,s]=e.split(":"),a="arn"===t&&e.split(":").length>=6,c=5===[t,n,r,o,s].filter(Boolean).length;if(a&&!c)throw new Error(`Invalid ARN: ${e} was an invalid ARN.`);return!!("arn"===t&&n&&r&&o&&s)})(t)){if(!0===e.ForcePathStyle)throw new Error("Path-style addressing cannot be used with ARN buckets")}else n=t,(!Lr.test(n)||jr.test(n)||Mr.test(n)||-1!==t.indexOf(".")&&!String(e.Endpoint).startsWith("http:")||t.toLowerCase()!==t||t.length<3)&&(e.ForcePathStyle=!0);var n;return e.DisableMultiRegionAccessPoints&&(e.disableMultiRegionAccessPoints=!0,e.DisableMRAP=!0),e})(r),r},vi=({config:e,instructions:t})=>(n,r)=>async i=>{const o=await(async(e,t,n,r)=>{if(!n.endpoint){const e=await(async e=>hi((e=>({environmentVariableSelector:t=>{const n=e.split(" ").map((e=>e.toUpperCase()));return t[[fi,...n].join("_")]||t[fi]||void 0},configFileSelector:(t,n)=>{if(n&&t.services){const r=n[["services",t.services].join(ai)];if(r){const t=e.split(" ").map((e=>e.toLowerCase())),n=r[[t.join("_"),mi].join(ai)];if(n)return n}}const r=t[mi];if(r)return r},default:void 0}))(e))())(n.serviceId||"");e&&(n.endpoint=()=>Promise.resolve(yi(e)))}const i=await bi(e,t,n);if("function"!=typeof n.endpointProvider)throw new Error("config.endpointProvider is not set.");return n.endpointProvider(i,r)})(i.input,{getEndpointParameterInstructions:()=>t},{...e},r);r.endpointV2=o,r.authSchemes=o.properties?.authSchemes;const s=r.authSchemes?.[0];if(s){r.signing_region=s.signingRegion,r.signing_service=s.signingName;const e=Vt(r),t=e?.selectedHttpAuthScheme?.httpAuthOption;t&&(t.signingProperties=Object.assign(t.signingProperties||{},{signing_region:s.signingRegion,signingRegion:s.signingRegion,signing_service:s.signingName,signingName:s.signingName,signingRegionSet:s.signingRegionSet},s.properties))}return n({...i})},Si={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},wi={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};function Ci(e,t,n){return{applyToStack:r=>{r.add(((e,t)=>(n,r)=>async r=>{const{response:i}=await n(r);try{return{response:i,output:await t(i,e)}}catch(e){if(Object.defineProperty(e,"$response",{value:i}),!("$metadata"in e)){const t="Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.";e.message+="\n  "+t}throw e}})(e,n),Si),r.add(((e,t)=>(n,r)=>async i=>{const o=r.endpointV2?.url&&e.urlParser?async()=>e.urlParser(r.endpointV2.url):e.endpoint;if(!o)throw new Error("No valid endpoint provider available.");const s=await t(i.input,{...e,endpoint:o});return n({...i,request:s})})(e,t),wi)}}}const Ti={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:wi.name},Ei=(e,t)=>({applyToStack:n=>{n.addRelativeTo(vi({config:e,instructions:t}),Ti)}}),_i=e=>{const t=e.tls??!0,{endpoint:n}=e,r=null!=n?async()=>yi(await $t(n)()):void 0,i=!!n;return{...e,endpoint:r,tls:t,isCustomEndpoint:i,useDualstackEndpoint:$t(e.useDualstackEndpoint??!1),useFipsEndpoint:$t(e.useFipsEndpoint??!1)}};var xi;!function(e){e.STANDARD="standard",e.ADAPTIVE="adaptive"}(xi||(xi={}));const Ri=xi.STANDARD,Ii=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],Pi=["TimeoutError","RequestTimeout","RequestTimeoutException"],Oi=[500,502,503,504],Di=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],Ai=e=>429===e.$metadata?.httpStatusCode||Ii.includes(e.name)||1==e.$retryable?.throttling,ki=e=>Pi.includes(e.name)||Di.includes(e?.code||"")||Oi.includes(e.$metadata?.httpStatusCode||0);class Ni{constructor(e){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=e?.beta??.7,this.minCapacity=e?.minCapacity??1,this.minFillRate=e?.minFillRate??.5,this.scaleConstant=e?.scaleConstant??.4,this.smooth=e?.smooth??.8;const t=this.getCurrentTimeInSeconds();this.lastThrottleTime=t,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1e3}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(e){if(this.enabled){if(this.refillTokenBucket(),e>this.currentCapacity){const t=(e-this.currentCapacity)/this.fillRate*1e3;await new Promise((e=>setTimeout(e,t)))}this.currentCapacity=this.currentCapacity-e}}refillTokenBucket(){const e=this.getCurrentTimeInSeconds();if(!this.lastTimestamp)return void(this.lastTimestamp=e);const t=(e-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+t),this.lastTimestamp=e}updateClientSendingRate(e){let t;if(this.updateMeasuredRate(),Ai(e)){const e=this.enabled?Math.min(this.measuredTxRate,this.fillRate):this.measuredTxRate;this.lastMaxRate=e,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),t=this.cubicThrottle(e),this.enableTokenBucket()}else this.calculateTimeWindow(),t=this.cubicSuccess(this.getCurrentTimeInSeconds());const n=Math.min(t,2*this.measuredTxRate);this.updateTokenBucketRate(n)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,1/3))}cubicThrottle(e){return this.getPrecise(e*this.beta)}cubicSuccess(e){return this.getPrecise(this.scaleConstant*Math.pow(e-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(e){this.refillTokenBucket(),this.fillRate=Math.max(e,this.minFillRate),this.maxCapacity=Math.max(e,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const e=this.getCurrentTimeInSeconds(),t=Math.floor(2*e)/2;if(this.requestCount++,t>this.lastTxRateBucket){const e=this.requestCount/(t-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(e*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=t}}getPrecise(e){return parseFloat(e.toFixed(8))}}const Li=({retryDelay:e,retryCount:t,retryCost:n})=>({getRetryCount:()=>t,getRetryDelay:()=>Math.min(2e4,e),getRetryCost:()=>n});class ji{constructor(e){this.maxAttempts=e,this.mode=xi.STANDARD,this.capacity=500,this.retryBackoffStrategy=(()=>{let e=100;return{computeNextBackoffDelay:t=>Math.floor(Math.min(2e4,Math.random()*2**t*e)),setDelayBase:t=>{e=t}}})(),this.maxAttemptsProvider="function"==typeof e?e:async()=>e}async acquireInitialRetryToken(e){return Li({retryDelay:100,retryCount:0})}async refreshRetryTokenForRetry(e,t){const n=await this.getMaxAttempts();if(this.shouldRetry(e,t,n)){const n=t.errorType;this.retryBackoffStrategy.setDelayBase("THROTTLING"===n?500:100);const r=this.retryBackoffStrategy.computeNextBackoffDelay(e.getRetryCount()),i=t.retryAfterHint?Math.max(t.retryAfterHint.getTime()-Date.now()||0,r):r,o=this.getCapacityCost(n);return this.capacity-=o,Li({retryDelay:i,retryCount:e.getRetryCount()+1,retryCost:o})}throw new Error("No retry token available")}recordSuccess(e){this.capacity=Math.max(500,this.capacity+(e.getRetryCost()??1))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(e){return console.warn("Max attempts provider could not resolve. Using default of 3"),3}}shouldRetry(e,t,n){return e.getRetryCount()+1<n&&this.capacity>=this.getCapacityCost(t.errorType)&&this.isRetryableError(t.errorType)}getCapacityCost(e){return"TRANSIENT"===e?10:5}isRetryableError(e){return"THROTTLING"===e||"TRANSIENT"===e}}class Mi{constructor(e,t){this.maxAttemptsProvider=e,this.mode=xi.ADAPTIVE;const{rateLimiter:n}=t??{};this.rateLimiter=n??new Ni,this.standardRetryStrategy=new ji(e)}async acquireInitialRetryToken(e){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(e)}async refreshRetryTokenForRetry(e,t){return this.rateLimiter.updateClientSendingRate(t),this.standardRetryStrategy.refreshRetryTokenForRetry(e,t)}recordSuccess(e){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(e)}}const Fi=new Uint8Array(256);let qi=Fi.length;function Bi(){return qi>Fi.length-16&&($r().randomFillSync(Fi),qi=0),Fi.slice(qi,qi+=16)}const Ui=/^(?:[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,zi=[];for(let e=0;e<256;++e)zi.push((e+256).toString(16).substr(1));const Gi=function(e,t=0){const n=(zi[e[t+0]]+zi[e[t+1]]+zi[e[t+2]]+zi[e[t+3]]+"-"+zi[e[t+4]]+zi[e[t+5]]+"-"+zi[e[t+6]]+zi[e[t+7]]+"-"+zi[e[t+8]]+zi[e[t+9]]+"-"+zi[e[t+10]]+zi[e[t+11]]+zi[e[t+12]]+zi[e[t+13]]+zi[e[t+14]]+zi[e[t+15]]).toLowerCase();if(!function(e){return"string"==typeof e&&Ui.test(e)}(n))throw TypeError("Stringified UUID is invalid");return n},Hi=function(e,t,n){const r=(e=e||{}).random||(e.rng||Bi)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return Gi(r)},Vi="AWS_MAX_ATTEMPTS",$i="max_attempts",Wi={environmentVariableSelector:e=>{const t=e[Vi];if(!t)return;const n=parseInt(t);if(Number.isNaN(n))throw new Error(`Environment variable ${Vi} mast be a number, got "${t}"`);return n},configFileSelector:e=>{const t=e[$i];if(!t)return;const n=parseInt(t);if(Number.isNaN(n))throw new Error(`Shared config file entry ${$i} mast be a number, got "${t}"`);return n},default:3},Ki=e=>{const{retryStrategy:t}=e,n=$t(e.maxAttempts??3);return{...e,maxAttempts:n,retryStrategy:async()=>t||(await $t(e.retryMode)()===xi.ADAPTIVE?new Mi(n):new ji(n))}},Qi={environmentVariableSelector:e=>e.AWS_RETRY_MODE,configFileSelector:e=>e.retry_mode,default:Ri},Xi=e=>e?.body instanceof G.Readable||"undefined"!=typeof ReadableStream&&e?.body instanceof ReadableStream,Yi=e=>{const t={errorType:Ji(e)},n=to(e.$response);return n&&(t.retryAfterHint=n),t},Ji=e=>Ai(e)?"THROTTLING":ki(e)?"TRANSIENT":(e=>{if(void 0!==e.$metadata?.httpStatusCode){const t=e.$metadata.httpStatusCode;return 500<=t&&t<=599&&!ki(e)}return!1})(e)?"SERVER_ERROR":"CLIENT_ERROR",Zi={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},eo=e=>({applyToStack:t=>{t.add((e=>(t,n)=>async r=>{let i=await e.retryStrategy();const o=await e.maxAttempts();if(!(e=>void 0!==e.acquireInitialRetryToken&&void 0!==e.refreshRetryTokenForRetry&&void 0!==e.recordSuccess)(i))return i?.mode&&(n.userAgent=[...n.userAgent||[],["cfg/retry-mode",i.mode]]),i.retry(t,r);{let e=await i.acquireInitialRetryToken(n.partition_id),a=new Error,c=0,l=0;const{request:u}=r,d=m.isInstance(u);for(d&&(u.headers["amz-sdk-invocation-id"]=Hi());;)try{d&&(u.headers["amz-sdk-request"]=`attempt=${c+1}; max=${o}`);const{response:n,output:s}=await t(r);return i.recordSuccess(e),s.$metadata.attempts=c+1,s.$metadata.totalRetryDelay=l,{response:n,output:s}}catch(t){const r=Yi(t);if(a=(s=t)instanceof Error?s:s instanceof Object?Object.assign(new Error,s):"string"==typeof s?new Error(s):new Error(`AWS SDK error wrapper for ${s}`),d&&Xi(u))throw(n.logger instanceof _?console:n.logger)?.warn("An error was encountered in a non-retryable streaming request."),a;try{e=await i.refreshRetryTokenForRetry(e,r)}catch(e){throw a.$metadata||(a.$metadata={}),a.$metadata.attempts=c+1,a.$metadata.totalRetryDelay=l,a}c=e.getRetryCount();const o=e.getRetryDelay();l+=o,await new Promise((e=>setTimeout(e,o)))}}var s})(e),Zi)}}),to=e=>{if(!g.isInstance(e))return;const t=Object.keys(e.headers).find((e=>"retry-after"===e.toLowerCase()));if(!t)return;const n=e.headers[t],r=Number(n);return Number.isNaN(r)?new Date(n):new Date(1e3*r)},no={ForcePathStyle:{type:"clientContextParams",name:"forcePathStyle"},UseArnRegion:{type:"clientContextParams",name:"useArnRegion"},DisableMultiRegionAccessPoints:{type:"clientContextParams",name:"disableMultiregionAccessPoints"},Accelerate:{type:"clientContextParams",name:"useAccelerateEndpoint"},DisableS3ExpressSessionAuth:{type:"clientContextParams",name:"disableS3ExpressSessionAuth"},UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};class ro extends $e{constructor(e){super(e),Object.setPrototypeOf(this,ro.prototype)}}const io={requester:"requester"},oo={requester:"requester"};class so extends ro{constructor(e){super({name:"NoSuchUpload",$fault:"client",...e}),this.name="NoSuchUpload",this.$fault="client",Object.setPrototypeOf(this,so.prototype)}}const ao={Enabled:"Enabled",Suspended:"Suspended"},co={AmazonCustomerByEmail:"AmazonCustomerByEmail",CanonicalUser:"CanonicalUser",Group:"Group"},lo={FULL_CONTROL:"FULL_CONTROL",READ:"READ",READ_ACP:"READ_ACP",WRITE:"WRITE",WRITE_ACP:"WRITE_ACP"},uo={Destination:"Destination"},po={AES256:"AES256",aws_kms:"aws:kms",aws_kms_dsse:"aws:kms:dsse"},ho={authenticated_read:"authenticated-read",aws_exec_read:"aws-exec-read",bucket_owner_full_control:"bucket-owner-full-control",bucket_owner_read:"bucket-owner-read",private:"private",public_read:"public-read",public_read_write:"public-read-write"},fo={CRC32:"CRC32",CRC32C:"CRC32C",SHA1:"SHA1",SHA256:"SHA256"},mo={COPY:"COPY",REPLACE:"REPLACE"},go={OFF:"OFF",ON:"ON"},yo={COMPLIANCE:"COMPLIANCE",GOVERNANCE:"GOVERNANCE"},bo={DEEP_ARCHIVE:"DEEP_ARCHIVE",EXPRESS_ONEZONE:"EXPRESS_ONEZONE",GLACIER:"GLACIER",GLACIER_IR:"GLACIER_IR",INTELLIGENT_TIERING:"INTELLIGENT_TIERING",ONEZONE_IA:"ONEZONE_IA",OUTPOSTS:"OUTPOSTS",REDUCED_REDUNDANCY:"REDUCED_REDUNDANCY",SNOW:"SNOW",STANDARD:"STANDARD",STANDARD_IA:"STANDARD_IA"},vo={COPY:"COPY",REPLACE:"REPLACE"};class So extends ro{constructor(e){super({name:"ObjectNotInActiveTierError",$fault:"client",...e}),this.name="ObjectNotInActiveTierError",this.$fault="client",Object.setPrototypeOf(this,So.prototype)}}class wo extends ro{constructor(e){super({name:"BucketAlreadyExists",$fault:"client",...e}),this.name="BucketAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,wo.prototype)}}class Co extends ro{constructor(e){super({name:"BucketAlreadyOwnedByYou",$fault:"client",...e}),this.name="BucketAlreadyOwnedByYou",this.$fault="client",Object.setPrototypeOf(this,Co.prototype)}}const To={authenticated_read:"authenticated-read",private:"private",public_read:"public-read",public_read_write:"public-read-write"},Eo={SingleAvailabilityZone:"SingleAvailabilityZone"},_o={Directory:"Directory"},xo={AvailabilityZone:"AvailabilityZone"},Ro={EU:"EU",af_south_1:"af-south-1",ap_east_1:"ap-east-1",ap_northeast_1:"ap-northeast-1",ap_northeast_2:"ap-northeast-2",ap_northeast_3:"ap-northeast-3",ap_south_1:"ap-south-1",ap_south_2:"ap-south-2",ap_southeast_1:"ap-southeast-1",ap_southeast_2:"ap-southeast-2",ap_southeast_3:"ap-southeast-3",ca_central_1:"ca-central-1",cn_north_1:"cn-north-1",cn_northwest_1:"cn-northwest-1",eu_central_1:"eu-central-1",eu_north_1:"eu-north-1",eu_south_1:"eu-south-1",eu_south_2:"eu-south-2",eu_west_1:"eu-west-1",eu_west_2:"eu-west-2",eu_west_3:"eu-west-3",me_south_1:"me-south-1",sa_east_1:"sa-east-1",us_east_2:"us-east-2",us_gov_east_1:"us-gov-east-1",us_gov_west_1:"us-gov-west-1",us_west_1:"us-west-1",us_west_2:"us-west-2"},Io={BucketOwnerEnforced:"BucketOwnerEnforced",BucketOwnerPreferred:"BucketOwnerPreferred",ObjectWriter:"ObjectWriter"},Po={ReadOnly:"ReadOnly",ReadWrite:"ReadWrite"};class Oo extends ro{constructor(e){super({name:"NoSuchBucket",$fault:"client",...e}),this.name="NoSuchBucket",this.$fault="client",Object.setPrototypeOf(this,Oo.prototype)}}var Do;!function(e){e.visit=(e,t)=>void 0!==e.Prefix?t.Prefix(e.Prefix):void 0!==e.Tag?t.Tag(e.Tag):void 0!==e.And?t.And(e.And):t._(e.$unknown[0],e.$unknown[1])}(Do||(Do={}));const Ao={CSV:"CSV"},ko={V_1:"V_1"},No={Disabled:"Disabled",Enabled:"Enabled"},Lo={ARCHIVE_ACCESS:"ARCHIVE_ACCESS",DEEP_ARCHIVE_ACCESS:"DEEP_ARCHIVE_ACCESS"},jo={CSV:"CSV",ORC:"ORC",Parquet:"Parquet"},Mo={All:"All",Current:"Current"},Fo={BucketKeyStatus:"BucketKeyStatus",ChecksumAlgorithm:"ChecksumAlgorithm",ETag:"ETag",EncryptionStatus:"EncryptionStatus",IntelligentTieringAccessTier:"IntelligentTieringAccessTier",IsMultipartUploaded:"IsMultipartUploaded",LastModifiedDate:"LastModifiedDate",ObjectAccessControlList:"ObjectAccessControlList",ObjectLockLegalHoldStatus:"ObjectLockLegalHoldStatus",ObjectLockMode:"ObjectLockMode",ObjectLockRetainUntilDate:"ObjectLockRetainUntilDate",ObjectOwner:"ObjectOwner",ReplicationStatus:"ReplicationStatus",Size:"Size",StorageClass:"StorageClass"},qo={Daily:"Daily",Weekly:"Weekly"};var Bo;!function(e){e.visit=(e,t)=>void 0!==e.Prefix?t.Prefix(e.Prefix):void 0!==e.Tag?t.Tag(e.Tag):void 0!==e.ObjectSizeGreaterThan?t.ObjectSizeGreaterThan(e.ObjectSizeGreaterThan):void 0!==e.ObjectSizeLessThan?t.ObjectSizeLessThan(e.ObjectSizeLessThan):void 0!==e.And?t.And(e.And):t._(e.$unknown[0],e.$unknown[1])}(Bo||(Bo={}));const Uo={DEEP_ARCHIVE:"DEEP_ARCHIVE",GLACIER:"GLACIER",GLACIER_IR:"GLACIER_IR",INTELLIGENT_TIERING:"INTELLIGENT_TIERING",ONEZONE_IA:"ONEZONE_IA",STANDARD_IA:"STANDARD_IA"},zo={Disabled:"Disabled",Enabled:"Enabled"},Go={FULL_CONTROL:"FULL_CONTROL",READ:"READ",WRITE:"WRITE"},Ho={DeliveryTime:"DeliveryTime",EventTime:"EventTime"};var Vo;!function(e){e.visit=(e,t)=>void 0!==e.Prefix?t.Prefix(e.Prefix):void 0!==e.Tag?t.Tag(e.Tag):void 0!==e.AccessPointArn?t.AccessPointArn(e.AccessPointArn):void 0!==e.And?t.And(e.And):t._(e.$unknown[0],e.$unknown[1])}(Vo||(Vo={}));const $o={s3_IntelligentTiering:"s3:IntelligentTiering",s3_LifecycleExpiration_:"s3:LifecycleExpiration:*",s3_LifecycleExpiration_Delete:"s3:LifecycleExpiration:Delete",s3_LifecycleExpiration_DeleteMarkerCreated:"s3:LifecycleExpiration:DeleteMarkerCreated",s3_LifecycleTransition:"s3:LifecycleTransition",s3_ObjectAcl_Put:"s3:ObjectAcl:Put",s3_ObjectCreated_:"s3:ObjectCreated:*",s3_ObjectCreated_CompleteMultipartUpload:"s3:ObjectCreated:CompleteMultipartUpload",s3_ObjectCreated_Copy:"s3:ObjectCreated:Copy",s3_ObjectCreated_Post:"s3:ObjectCreated:Post",s3_ObjectCreated_Put:"s3:ObjectCreated:Put",s3_ObjectRemoved_:"s3:ObjectRemoved:*",s3_ObjectRemoved_Delete:"s3:ObjectRemoved:Delete",s3_ObjectRemoved_DeleteMarkerCreated:"s3:ObjectRemoved:DeleteMarkerCreated",s3_ObjectRestore_:"s3:ObjectRestore:*",s3_ObjectRestore_Completed:"s3:ObjectRestore:Completed",s3_ObjectRestore_Delete:"s3:ObjectRestore:Delete",s3_ObjectRestore_Post:"s3:ObjectRestore:Post",s3_ObjectTagging_:"s3:ObjectTagging:*",s3_ObjectTagging_Delete:"s3:ObjectTagging:Delete",s3_ObjectTagging_Put:"s3:ObjectTagging:Put",s3_ReducedRedundancyLostObject:"s3:ReducedRedundancyLostObject",s3_Replication_:"s3:Replication:*",s3_Replication_OperationFailedReplication:"s3:Replication:OperationFailedReplication",s3_Replication_OperationMissedThreshold:"s3:Replication:OperationMissedThreshold",s3_Replication_OperationNotTracked:"s3:Replication:OperationNotTracked",s3_Replication_OperationReplicatedAfterThreshold:"s3:Replication:OperationReplicatedAfterThreshold"},Wo={prefix:"prefix",suffix:"suffix"},Ko={Disabled:"Disabled",Enabled:"Enabled"},Qo={Disabled:"Disabled",Enabled:"Enabled"},Xo={Disabled:"Disabled",Enabled:"Enabled"},Yo={Disabled:"Disabled",Enabled:"Enabled"};var Jo;!function(e){e.visit=(e,t)=>void 0!==e.Prefix?t.Prefix(e.Prefix):void 0!==e.Tag?t.Tag(e.Tag):void 0!==e.And?t.And(e.And):t._(e.$unknown[0],e.$unknown[1])}(Jo||(Jo={}));const Zo={Disabled:"Disabled",Enabled:"Enabled"},es={Disabled:"Disabled",Enabled:"Enabled"},ts={Disabled:"Disabled",Enabled:"Enabled"},ns={BucketOwner:"BucketOwner",Requester:"Requester"},rs={Disabled:"Disabled",Enabled:"Enabled"},is={Enabled:"Enabled",Suspended:"Suspended"},os={http:"http",https:"https"},ss={COMPLETE:"COMPLETE",COMPLETED:"COMPLETED",FAILED:"FAILED",PENDING:"PENDING",REPLICA:"REPLICA"},as={ENABLED:"ENABLED"};class cs extends ro{constructor(e){super({name:"InvalidObjectState",$fault:"client",...e}),this.name="InvalidObjectState",this.$fault="client",Object.setPrototypeOf(this,cs.prototype),this.StorageClass=e.StorageClass,this.AccessTier=e.AccessTier}}class ls extends ro{constructor(e){super({name:"NoSuchKey",$fault:"client",...e}),this.name="NoSuchKey",this.$fault="client",Object.setPrototypeOf(this,ls.prototype)}}const us={CHECKSUM:"Checksum",ETAG:"ETag",OBJECT_PARTS:"ObjectParts",OBJECT_SIZE:"ObjectSize",STORAGE_CLASS:"StorageClass"},ds={Enabled:"Enabled"},ps={COMPLIANCE:"COMPLIANCE",GOVERNANCE:"GOVERNANCE"};class hs extends ro{constructor(e){super({name:"NotFound",$fault:"client",...e}),this.name="NotFound",this.$fault="client",Object.setPrototypeOf(this,hs.prototype)}}const fs={ARCHIVE_ACCESS:"ARCHIVE_ACCESS",DEEP_ARCHIVE_ACCESS:"DEEP_ARCHIVE_ACCESS"},ms={url:"url"},gs={DEEP_ARCHIVE:"DEEP_ARCHIVE",EXPRESS_ONEZONE:"EXPRESS_ONEZONE",GLACIER:"GLACIER",GLACIER_IR:"GLACIER_IR",INTELLIGENT_TIERING:"INTELLIGENT_TIERING",ONEZONE_IA:"ONEZONE_IA",OUTPOSTS:"OUTPOSTS",REDUCED_REDUNDANCY:"REDUCED_REDUNDANCY",SNOW:"SNOW",STANDARD:"STANDARD",STANDARD_IA:"STANDARD_IA"},ys={RESTORE_STATUS:"RestoreStatus"},bs={STANDARD:"STANDARD"},vs=e=>({...e,...e.SSEKMSKeyId&&{SSEKMSKeyId:se}}),Ss=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:se}}),ws=e=>({...e,...e.SSEKMSKeyId&&{SSEKMSKeyId:se},...e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:se}}),Cs=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:se},...e.SSEKMSKeyId&&{SSEKMSKeyId:se},...e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:se},...e.CopySourceSSECustomerKey&&{CopySourceSSECustomerKey:se}}),Ts=e=>({...e,...e.SSEKMSKeyId&&{SSEKMSKeyId:se},...e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:se}}),Es=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:se},...e.SSEKMSKeyId&&{SSEKMSKeyId:se},...e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:se}}),_s=e=>({...e,...e.SecretAccessKey&&{SecretAccessKey:se},...e.SessionToken&&{SessionToken:se}}),xs=e=>({...e,...e.Credentials&&{Credentials:_s(e.Credentials)}}),Rs=e=>({...e,...e.KMSMasterKeyID&&{KMSMasterKeyID:se}}),Is=e=>({...e,...e.ApplyServerSideEncryptionByDefault&&{ApplyServerSideEncryptionByDefault:Rs(e.ApplyServerSideEncryptionByDefault)}}),Ps=e=>({...e,...e.Rules&&{Rules:e.Rules.map((e=>Is(e)))}}),Os=e=>({...e,...e.ServerSideEncryptionConfiguration&&{ServerSideEncryptionConfiguration:Ps(e.ServerSideEncryptionConfiguration)}}),Ds=e=>({...e,...e.KeyId&&{KeyId:se}}),As=e=>({...e,...e.SSEKMS&&{SSEKMS:Ds(e.SSEKMS)}}),ks=e=>({...e,...e.Encryption&&{Encryption:As(e.Encryption)}}),Ns=e=>({...e,...e.S3BucketDestination&&{S3BucketDestination:ks(e.S3BucketDestination)}}),Ls=e=>({...e,...e.Destination&&{Destination:Ns(e.Destination)}}),js=e=>({...e,...e.InventoryConfiguration&&{InventoryConfiguration:Ls(e.InventoryConfiguration)}}),Ms=e=>({...e,...e.SSEKMSKeyId&&{SSEKMSKeyId:se}}),Fs=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:se}}),qs=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:se}}),Bs=e=>({...e}),Us=e=>({...e,...e.SSEKMSKeyId&&{SSEKMSKeyId:se}}),zs=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:se}}),Gs=e=>({...e,...e.InventoryConfigurationList&&{InventoryConfigurationList:e.InventoryConfigurationList.map((e=>Ls(e)))}}),Hs=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:se}}),Vs=e=>({...e,...e.ServerSideEncryptionConfiguration&&{ServerSideEncryptionConfiguration:Ps(e.ServerSideEncryptionConfiguration)}}),$s=e=>({...e,...e.InventoryConfiguration&&{InventoryConfiguration:Ls(e.InventoryConfiguration)}});class Ws{constructor(e){this.value=e}toString(){return(""+this.value).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#x0D;").replace(/\n/g,"&#x0A;").replace(/\u0085/g,"&#x85;").replace(/\u2028/,"&#x2028;")}}class Ks{static of(e,t,n){const r=new Ks(e);return void 0!==t&&r.addChildNode(new Ws(t)),void 0!==n&&r.withName(n),r}constructor(e,t=[]){this.name=e,this.children=t,this.attributes={}}withName(e){return this.name=e,this}addAttribute(e,t){return this.attributes[e]=t,this}addChildNode(e){return this.children.push(e),this}removeAttribute(e){return delete this.attributes[e],this}n(e){return this.name=e,this}c(e){return this.children.push(e),this}a(e,t){return null!=t&&(this.attributes[e]=t),this}cc(e,t,n=t){if(null!=e[t]){const r=Ks.of(t,e[t]).withName(n);this.c(r)}}l(e,t,n,r){null!=e[t]&&r().map((e=>{e.withName(n),this.c(e)}))}lc(e,t,n,r){if(null!=e[t]){const e=r(),t=new Ks(n);e.map((e=>{t.c(e)})),this.c(t)}}toString(){const e=Boolean(this.children.length);let t=`<${this.name}`;const n=this.attributes;for(const e of Object.keys(n)){const i=n[e];null!=i&&(t+=` ${e}="${r=""+i,r.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}"`)}var r;return t+(e?`>${this.children.map((e=>e.toString())).join("")}</${this.name}>`:"/>")}}const Qs={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:Ti.name},Xs=e=>e=>{throw e},Ys=(e,t)=>{},Js={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:Zi.name};class Zs{constructor(e){this.authSchemes=new Map;for(const[t,n]of Object.entries(e))void 0!==n&&this.authSchemes.set(t,n)}getIdentityProvider(e){return this.authSchemes.get(e)}}class ea{async sign(e,t,n){return e}}const ta=e=>na(e)&&e.expiration.getTime()-Date.now()<3e5;const na=e=>void 0!==e.expiration,ra=e=>{if("function"==typeof e)return e;const t=Promise.resolve(e);return()=>t};function ia(e,t){return new oa(e,t)}class oa{constructor(e,t){this.input=e,this.context=t,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:e,protocol:t="https",port:n,path:r}=await this.context.endpoint();this.path=r;for(const e of this.resolvePathStack)e(this.path);return new m({protocol:t,hostname:this.hostname||e,port:n,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(e){return this.hostname=e,this}bp(e){return this.resolvePathStack.push((t=>{this.path=`${t?.endsWith("/")?t.slice(0,-1):t||""}`+e})),this}p(e,t,n,r){return this.resolvePathStack.push((i=>{this.path=((e,t,n,r,i,o)=>{if(null==t||void 0===t[n])throw new Error("No value provided for input HTTP label: "+n+".");{const t=r();if(t.length<=0)throw new Error("Empty value provided for input HTTP label: "+n+".");e=e.replace(i,o?t.split("/").map((e=>ot(e))).join("/"):ot(t))}return e})(i,this.input,e,t,n,r)})),this}h(e){return this.headers=e,this}q(e){return this.query=e,this}b(e){return this.body=e,this}m(e){return this.method=e,this}}const sa=async(e,t,n,...r)=>await t.send(new e(n),...r);function aa(e,t,n,r,i){return async function*(o,s,...a){let c,l=o.startingToken||void 0,u=!0;for(;u;){if(s[n]=l,i&&(s[i]=s[i]??o.pageSize),!(o.client instanceof e))throw new Error(`Invalid client, expected instance of ${e.name}`);c=await sa(t,o.client,s,...a),yield c;const d=l;l=c[r],u=!(!l||o.stopOnSameToken&&l===d)}}}var ca=n(6454);const la={Disabled:"Disabled",Enabled:"Enabled"};class ua extends ro{constructor(e){super({name:"ObjectAlreadyInActiveTierError",$fault:"client",...e}),this.name="ObjectAlreadyInActiveTierError",this.$fault="client",Object.setPrototypeOf(this,ua.prototype)}}const da={Bulk:"Bulk",Expedited:"Expedited",Standard:"Standard"},pa={SQL:"SQL"},ha={BZIP2:"BZIP2",GZIP:"GZIP",NONE:"NONE"},fa={IGNORE:"IGNORE",NONE:"NONE",USE:"USE"},ma={DOCUMENT:"DOCUMENT",LINES:"LINES"},ga={ALWAYS:"ALWAYS",ASNEEDED:"ASNEEDED"},ya={SELECT:"SELECT"};var ba;!function(e){e.visit=(e,t)=>void 0!==e.Records?t.Records(e.Records):void 0!==e.Stats?t.Stats(e.Stats):void 0!==e.Progress?t.Progress(e.Progress):void 0!==e.Cont?t.Cont(e.Cont):void 0!==e.End?t.End(e.End):t._(e.$unknown[0],e.$unknown[1])}(ba||(ba={}));const va=e=>({...e,...e.SSEKMSKeyId&&{SSEKMSKeyId:se},...e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:se}}),Sa=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:se},...e.SSEKMSKeyId&&{SSEKMSKeyId:se},...e.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:se}}),wa=e=>({...e,...e.KMSKeyId&&{KMSKeyId:se}}),Ca=e=>({...e,...e.Encryption&&{Encryption:wa(e.Encryption)}}),Ta=e=>({...e,...e.S3&&{S3:Ca(e.S3)}}),Ea=e=>({...e,...e.OutputLocation&&{OutputLocation:Ta(e.OutputLocation)}}),_a=e=>({...e,...e.RestoreRequest&&{RestoreRequest:Ea(e.RestoreRequest)}}),xa=e=>void 0!==e.Records?{Records:e.Records}:void 0!==e.Stats?{Stats:e.Stats}:void 0!==e.Progress?{Progress:e.Progress}:void 0!==e.Cont?{Cont:e.Cont}:void 0!==e.End?{End:e.End}:void 0!==e.$unknown?{[e.$unknown[0]]:"UNKNOWN"}:void 0,Ra=e=>({...e,...e.Payload&&{Payload:"STREAMING_CONTENT"}}),Ia=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:se}}),Pa=e=>({...e,...e.SSEKMSKeyId&&{SSEKMSKeyId:se}}),Oa=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:se}}),Da=e=>({...e,...e.SSEKMSKeyId&&{SSEKMSKeyId:se}}),Aa=e=>({...e,...e.SSECustomerKey&&{SSECustomerKey:se},...e.CopySourceSSECustomerKey&&{CopySourceSSECustomerKey:se}}),ka=e=>({...e,...e.SSEKMSKeyId&&{SSEKMSKeyId:se}}),Na=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[nI]:e[JC],[eR]:e[zb]});n.bp("/{Key+}"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1),n.p("Key",(()=>e.Key),"{Key+}",!0);const i=lt({[CI]:[,"AbortMultipartUpload"],[fx]:[,me(e[ME],"UploadId")]});return n.m("DELETE").h(r).q(i).b(void 0),n.build()},La=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{"content-type":"application/xml",[Lx]:e[Ny],[jx]:e[Ly],[qx]:e[eb],[Bx]:e[tb],[nI]:e[JC],[eR]:e[zb],[fI]:e[XT],[mI]:e[YT],[gI]:e[JT]});n.bp("/{Key+}"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1),n.p("Key",(()=>e.Key),"{Key+}",!0);const i=lt({[CI]:[,"CompleteMultipartUpload"],[fx]:[,me(e[ME],"UploadId")]});let o,s;return void 0!==e.MultipartUpload&&(s=yh(e.MultipartUpload,t),s=s.n("CompleteMultipartUpload"),o=bx,s.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),o+=s.toString()),n.m("POST").h(r).q(i).b(o),n.build()},ja=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[Tx]:e[Dg],[i_]:e[ky],[Nx]:e[Oy],[o_]:e[jy],[s_]:e[Fy],[a_]:e[Uy],[d_]:e[fb],[Ux]:e[Zy],[zx]:e[nb],[Gx]:[()=>Rg(e[rb]),()=>Ie(e[rb]).toString()],[Hx]:e[ib],[Vx]:[()=>Rg(e[ob]),()=>Ie(e[ob]).toString()],[m_]:[()=>Rg(e[qb]),()=>Ie(e[qb]).toString()],[jR]:e[Rv],[MR]:e[Pv],[FR]:e[Ov],[BR]:e[Av],[zR]:e[ZS],[vI]:e[yE],[uI]:e[$T],[sI]:e[RT],[wI]:e[XE],[fI]:e[XT],[mI]:e[YT],[gI]:e[JT],[dI]:e[tE],[hI]:e[eE],[pI]:[()=>Rg(e[py]),()=>e[py].toString()],[Kx]:e[ab],[Qx]:e[cb],[Xx]:e[lb],[nI]:e[JC],[yI]:e[dE],[KR]:e[Ww],[QR]:[()=>Rg(e[Xw]),()=>(e[Xw].toISOString().split(".")[0]+"Z").toString()],[WR]:e[$w],[eR]:e[zb],[lI]:e[ev],...void 0!==e.Metadata&&Object.keys(e.Metadata).reduce(((t,n)=>(t[`x-amz-meta-${n.toLowerCase()}`]=e.Metadata[n],t)),{})});n.bp("/{Key+}"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1),n.p("Key",(()=>e.Key),"{Key+}",!0);const i=lt({[CI]:[,"CopyObject"]});return n.m("PUT").h(r).q(i).b(void 0),n.build()},Ma=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{"content-type":"application/xml",[Tx]:e[Dg],[jR]:e[Rv],[MR]:e[Pv],[FR]:e[Ov],[qR]:e[Dv],[BR]:e[Av],[Dx]:[()=>Rg(e[Hw]),()=>e[Hw].toString()],[XR]:e[Jw]});let i,o;return n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1),void 0!==e.CreateBucketConfiguration&&(o=wh(e.CreateBucketConfiguration,t),i=bx,o.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),i+=o.toString()),n.m("PUT").h(r).b(i),n.build()},Fa=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[Tx]:e[Dg],[i_]:e[ky],[o_]:e[jy],[s_]:e[Fy],[a_]:e[Uy],[d_]:e[fb],[m_]:[()=>Rg(e[qb]),()=>Ie(e[qb]).toString()],[jR]:e[Rv],[MR]:e[Pv],[FR]:e[Ov],[BR]:e[Av],[uI]:e[$T],[sI]:e[RT],[wI]:e[XE],[fI]:e[XT],[mI]:e[YT],[gI]:e[JT],[dI]:e[tE],[hI]:e[eE],[pI]:[()=>Rg(e[py]),()=>e[py].toString()],[nI]:e[JC],[yI]:e[dE],[KR]:e[Ww],[QR]:[()=>Rg(e[Xw]),()=>(e[Xw].toISOString().split(".")[0]+"Z").toString()],[WR]:e[$w],[eR]:e[zb],[Nx]:e[Oy],...void 0!==e.Metadata&&Object.keys(e.Metadata).reduce(((t,n)=>(t[`x-amz-meta-${n.toLowerCase()}`]=e.Metadata[n],t)),{})});n.bp("/{Key+}"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1),n.p("Key",(()=>e.Key),"{Key+}",!0);const i=lt({[hx]:[,""],[CI]:[,"CreateMultipartUpload"]});return n.m("POST").h(r).q(i).b(void 0),n.build()},qa=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[$x]:e[qT]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[ax]:[,""]});return n.m("GET").h(r).q(i).b(void 0),n.build()},Ba=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[eR]:e[zb]});return n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1),n.m("DELETE").h(r).b(void 0),n.build()},Ua=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[JE]:[,""],[S_]:[,me(e[Fv],"Id")]});return n.m("DELETE").h(r).q(i).b(void 0),n.build()},za=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[r_]:[,""]});return n.m("DELETE").h(r).q(i).b(void 0),n.build()},Ga=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[g_]:[,""]});return n.m("DELETE").h(r).q(i).b(void 0),n.build()},Ha=async(e,t)=>{const n=ia(e,t);n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const r=lt({[__]:[,""],[S_]:[,me(e[Fv],"Id")]});return n.m("DELETE").h({}).q(r).b(void 0),n.build()},Va=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[T_]:[,""],[S_]:[,me(e[Fv],"Id")]});return n.m("DELETE").h(r).q(i).b(void 0),n.build()},$a=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[I_]:[,""]});return n.m("DELETE").h(r).q(i).b(void 0),n.build()},Wa=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[N_]:[,""],[S_]:[,me(e[Fv],"Id")]});return n.m("DELETE").h(r).q(i).b(void 0),n.build()},Ka=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[z_]:[,""]});return n.m("DELETE").h(r).q(i).b(void 0),n.build()},Qa=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[H_]:[,""]});return n.m("DELETE").h(r).q(i).b(void 0),n.build()},Xa=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[X_]:[,""]});return n.m("DELETE").h(r).q(i).b(void 0),n.build()},Ya=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[dx]:[,""]});return n.m("DELETE").h(r).q(i).b(void 0),n.build()},Ja=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[wx]:[,""]});return n.m("DELETE").h(r).q(i).b(void 0),n.build()},Za=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[UR]:e[iw],[nI]:e[JC],[Ix]:[()=>Rg(e[uy]),()=>e[uy].toString()],[eR]:e[zb]});n.bp("/{Key+}"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1),n.p("Key",(()=>e.Key),"{Key+}",!0);const i=lt({[CI]:[,"DeleteObject"],[yx]:[,e[VE]]});return n.m("DELETE").h(r).q(i).b(void 0),n.build()},ec=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{"content-type":"application/xml",[UR]:e[iw],[nI]:e[JC],[Ix]:[()=>Rg(e[uy]),()=>e[uy].toString()],[eR]:e[zb],[aI]:e[Oy]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[h_]:[,""],[CI]:[,"DeleteObjects"]});let o,s;return void 0!==e.Delete&&(s=Ch(e.Delete,t),o=bx,s.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),o+=s.toString()),n.m("POST").h(r).q(i).b(o),n.build()},tc=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[eR]:e[zb]});n.bp("/{Key+}"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1),n.p("Key",(()=>e.Key),"{Key+}",!0);const i=lt({[dx]:[,""],[yx]:[,e[VE]]});return n.m("DELETE").h(r).q(i).b(void 0),n.build()},nc=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[V_]:[,""]});return n.m("DELETE").h(r).q(i).b(void 0),n.build()},rc=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[eR]:e[zb],[nI]:e[JC]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[ZE]:[,""]});return n.m("GET").h(r).q(i).b(void 0),n.build()},ic=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[e_]:[,""]});return n.m("GET").h(r).q(i).b(void 0),n.build()},oc=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[JE]:[,""],[CI]:[,"GetBucketAnalyticsConfiguration"],[S_]:[,me(e[Fv],"Id")]});return n.m("GET").h(r).q(i).b(void 0),n.build()},sc=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[r_]:[,""]});return n.m("GET").h(r).q(i).b(void 0),n.build()},ac=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[g_]:[,""]});return n.m("GET").h(r).q(i).b(void 0),n.build()},cc=async(e,t)=>{const n=ia(e,t);n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const r=lt({[__]:[,""],[CI]:[,"GetBucketIntelligentTieringConfiguration"],[S_]:[,me(e[Fv],"Id")]});return n.m("GET").h({}).q(r).b(void 0),n.build()},lc=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[T_]:[,""],[CI]:[,"GetBucketInventoryConfiguration"],[S_]:[,me(e[Fv],"Id")]});return n.m("GET").h(r).q(i).b(void 0),n.build()},uc=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[I_]:[,""]});return n.m("GET").h(r).q(i).b(void 0),n.build()},dc=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[D_]:[,""]});return n.m("GET").h(r).q(i).b(void 0),n.build()},pc=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[A_]:[,""]});return n.m("GET").h(r).q(i).b(void 0),n.build()},hc=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[N_]:[,""],[CI]:[,"GetBucketMetricsConfiguration"],[S_]:[,me(e[Fv],"Id")]});return n.m("GET").h(r).q(i).b(void 0),n.build()},fc=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[U_]:[,""]});return n.m("GET").h(r).q(i).b(void 0),n.build()},mc=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[z_]:[,""]});return n.m("GET").h(r).q(i).b(void 0),n.build()},gc=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[H_]:[,""]});return n.m("GET").h(r).q(i).b(void 0),n.build()},yc=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[W_]:[,""]});return n.m("GET").h(r).q(i).b(void 0),n.build()},bc=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[X_]:[,""]});return n.m("GET").h(r).q(i).b(void 0),n.build()},vc=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[Y_]:[,""]});return n.m("GET").h(r).q(i).b(void 0),n.build()},Sc=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[dx]:[,""]});return n.m("GET").h(r).q(i).b(void 0),n.build()},wc=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[gx]:[,""]});return n.m("GET").h(r).q(i).b(void 0),n.build()},Cc=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[wx]:[,""]});return n.m("GET").h(r).q(i).b(void 0),n.build()},Tc=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[w_]:e[Jv],[C_]:[()=>Rg(e[Zv]),()=>Ie(e[Zv]).toString()],[E_]:e[eS],[x_]:[()=>Rg(e[bS]),()=>Ie(e[bS]).toString()],[J_]:e[NC],[fI]:e[XT],[mI]:e[YT],[gI]:e[JT],[nI]:e[JC],[eR]:e[zb],[Mx]:e[Gy]});n.bp("/{Key+}"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1),n.p("Key",(()=>e.Key),"{Key+}",!0);const i=lt({[CI]:[,"GetObject"],[Z_]:[,e[MC]],[ex]:[,e[FC]],[tx]:[,e[qC]],[nx]:[,e[BC]],[rx]:[,e[UC]],[ix]:[()=>void 0!==e.ResponseExpires,()=>Ie(e[HC]).toString()],[yx]:[,e[VE]],[$_]:[()=>void 0!==e.PartNumber,()=>e[gC].toString()]});return n.m("GET").h(r).q(i).b(void 0),n.build()},Ec=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[nI]:e[JC],[eR]:e[zb]});n.bp("/{Key+}"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1),n.p("Key",(()=>e.Key),"{Key+}",!0);const i=lt({[e_]:[,""],[yx]:[,e[VE]]});return n.m("GET").h(r).q(i).b(void 0),n.build()},_c=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[HR]:[()=>Rg(e[uw]),()=>e[uw].toString()],[JR]:e[yC],[fI]:e[XT],[mI]:e[YT],[gI]:e[JT],[nI]:e[JC],[eR]:e[zb],[$R]:[()=>Rg(e[Nw]),()=>(e[Nw]||[]).map((e=>e)).join(", ")]});n.bp("/{Key+}"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1),n.p("Key",(()=>e.Key),"{Key+}",!0);const i=lt({[n_]:[,""],[yx]:[,e[VE]]});return n.m("GET").h(r).q(i).b(void 0),n.build()},xc=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[nI]:e[JC],[eR]:e[zb]});n.bp("/{Key+}"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1),n.p("Key",(()=>e.Key),"{Key+}",!0);const i=lt({[P_]:[,""],[yx]:[,e[VE]]});return n.m("GET").h(r).q(i).b(void 0),n.build()},Rc=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[G_]:[,""]});return n.m("GET").h(r).q(i).b(void 0),n.build()},Ic=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[nI]:e[JC],[eR]:e[zb]});n.bp("/{Key+}"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1),n.p("Key",(()=>e.Key),"{Key+}",!0);const i=lt({[sx]:[,""],[yx]:[,e[VE]]});return n.m("GET").h(r).q(i).b(void 0),n.build()},Pc=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[eR]:e[zb],[nI]:e[JC]});n.bp("/{Key+}"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1),n.p("Key",(()=>e.Key),"{Key+}",!0);const i=lt({[dx]:[,""],[yx]:[,e[VE]]});return n.m("GET").h(r).q(i).b(void 0),n.build()},Oc=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[nI]:e[JC],[eR]:e[zb]});n.bp("/{Key+}"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1),n.p("Key",(()=>e.Key),"{Key+}",!0);const i=lt({[px]:[,""]});return n.m("GET").h(r).q(i).b(void 0),n.build()},Dc=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[V_]:[,""]});return n.m("GET").h(r).q(i).b(void 0),n.build()},Ac=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[eR]:e[zb]});return n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1),n.m("HEAD").h(r).b(void 0),n.build()},kc=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[w_]:e[Jv],[C_]:[()=>Rg(e[Zv]),()=>Ie(e[Zv]).toString()],[E_]:e[eS],[x_]:[()=>Rg(e[bS]),()=>Ie(e[bS]).toString()],[J_]:e[NC],[fI]:e[XT],[mI]:e[YT],[gI]:e[JT],[nI]:e[JC],[eR]:e[zb],[Mx]:e[Gy]});n.bp("/{Key+}"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1),n.p("Key",(()=>e.Key),"{Key+}",!0);const i=lt({[yx]:[,e[VE]],[$_]:[()=>void 0!==e.PartNumber,()=>e[gC].toString()]});return n.m("HEAD").h(r).q(i).b(void 0),n.build()},Nc=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[JE]:[,""],[CI]:[,"ListBucketAnalyticsConfigurations"],[p_]:[,e[mb]]});return n.m("GET").h(r).q(i).b(void 0),n.build()},Lc=async(e,t)=>{const n=ia(e,t);n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const r=lt({[__]:[,""],[CI]:[,"ListBucketIntelligentTieringConfigurations"],[p_]:[,e[mb]]});return n.m("GET").h({}).q(r).b(void 0),n.build()},jc=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[T_]:[,""],[CI]:[,"ListBucketInventoryConfigurations"],[p_]:[,e[mb]]});return n.m("GET").h(r).q(i).b(void 0),n.build()},Mc=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[N_]:[,""],[CI]:[,"ListBucketMetricsConfigurations"],[p_]:[,e[mb]]});return n.m("GET").h(r).q(i).b(void 0),n.build()},Fc=async(e,t)=>{const n=ia(e,t);n.bp("/");const r=lt({[CI]:[,"ListBuckets"]});let i;return i="",n.m("GET").h({"content-type":"application/xml"}).q(r).b(""),n.build()},qc=async(e,t)=>{const n=ia(e,t);n.bp("/");const r=lt({[CI]:[,"ListDirectoryBuckets"],[p_]:[,e[mb]],[j_]:[()=>void 0!==e.MaxDirectoryBuckets,()=>e[ew].toString()]});return n.m("GET").h({}).q(r).b(void 0),n.build()},Bc=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[eR]:e[zb],[nI]:e[JC]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[hx]:[,""],[f_]:[,e[Cb]],[y_]:[,e[tv]],[R_]:[,e[IS]],[B_]:[()=>void 0!==e.MaxUploads,()=>e[pw].toString()],[Q_]:[,e[dC]],[mx]:[,e[FE]]});return n.m("GET").h(r).q(i).b(void 0),n.build()},Uc=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[nI]:e[JC],[eR]:e[zb],[YR]:[()=>Rg(e[Zw]),()=>(e[Zw]||[]).map((e=>e)).join(", ")]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[f_]:[,e[Cb]],[y_]:[,e[tv]],[L_]:[,e[KS]],[F_]:[()=>void 0!==e.MaxKeys,()=>e[aw].toString()],[Q_]:[,e[dC]]});return n.m("GET").h(r).q(i).b(void 0),n.build()},zc=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[nI]:e[JC],[eR]:e[zb],[YR]:[()=>Rg(e[Zw]),()=>(e[Zw]||[]).map((e=>e)).join(", ")]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[k_]:[,"2"],[f_]:[,e[Cb]],[y_]:[,e[tv]],[F_]:[()=>void 0!==e.MaxKeys,()=>e[aw].toString()],[Q_]:[,e[dC]],[p_]:[,e[mb]],[v_]:[()=>void 0!==e.FetchOwner,()=>e[bv].toString()],[cx]:[,e[ET]]});return n.m("GET").h(r).q(i).b(void 0),n.build()},Gc=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[eR]:e[zb],[nI]:e[JC],[YR]:[()=>Rg(e[Zw]),()=>(e[Zw]||[]).map((e=>e)).join(", ")]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[vx]:[,""],[f_]:[,e[Cb]],[y_]:[,e[tv]],[R_]:[,e[IS]],[F_]:[()=>void 0!==e.MaxKeys,()=>e[aw].toString()],[Q_]:[,e[dC]],[Sx]:[,e[$E]]});return n.m("GET").h(r).q(i).b(void 0),n.build()},Hc=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[nI]:e[JC],[eR]:e[zb],[fI]:e[XT],[mI]:e[YT],[gI]:e[JT]});n.bp("/{Key+}"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1),n.p("Key",(()=>e.Key),"{Key+}",!0);const i=lt({[CI]:[,"ListParts"],[q_]:[()=>void 0!==e.MaxParts,()=>e[uw].toString()],[K_]:[,e[yC]],[fx]:[,me(e[ME],"UploadId")]});return n.m("GET").h(r).q(i).b(void 0),n.build()},Vc=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{"content-type":"application/xml",[eR]:e[zb],[aI]:e[Oy]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[ZE]:[,""]});let o,s;return void 0!==e.AccelerateConfiguration&&(s=dh(e.AccelerateConfiguration,t),o=bx,s.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),o+=s.toString()),n.m("PUT").h(r).q(i).b(o),n.build()},$c=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{"content-type":"application/xml",[Tx]:e[Dg],[l_]:e[Hy],[aI]:e[Oy],[jR]:e[Rv],[MR]:e[Pv],[FR]:e[Ov],[qR]:e[Dv],[BR]:e[Av],[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[e_]:[,""]});let o,s;return void 0!==e.AccessControlPolicy&&(s=ph(e.AccessControlPolicy,t),o=bx,s.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),o+=s.toString()),n.m("PUT").h(r).q(i).b(o),n.build()},Wc=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{"content-type":"application/xml",[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[JE]:[,""],[S_]:[,me(e[Fv],"Id")]});let o,s;return void 0!==e.AnalyticsConfiguration&&(s=hh(e.AnalyticsConfiguration,t),o=bx,s.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),o+=s.toString()),n.m("PUT").h(r).q(i).b(o),n.build()},Kc=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{"content-type":"application/xml",[l_]:e[Hy],[aI]:e[Oy],[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[r_]:[,""]});let o,s;return void 0!==e.CORSConfiguration&&(s=vh(e.CORSConfiguration,t),o=bx,s.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),o+=s.toString()),n.m("PUT").h(r).q(i).b(o),n.build()},Qc=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{"content-type":"application/xml",[l_]:e[Hy],[aI]:e[Oy],[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[g_]:[,""]});let o,s;return void 0!==e.ServerSideEncryptionConfiguration&&(s=wf(e.ServerSideEncryptionConfiguration,t),o=bx,s.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),o+=s.toString()),n.m("PUT").h(r).q(i).b(o),n.build()},Xc=async(e,t)=>{const n=ia(e,t);n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const r=lt({[__]:[,""],[S_]:[,me(e[Fv],"Id")]});let i,o;return void 0!==e.IntelligentTieringConfiguration&&(o=Ph(e.IntelligentTieringConfiguration,t),i=bx,o.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),i+=o.toString()),n.m("PUT").h({"content-type":"application/xml"}).q(r).b(i),n.build()},Yc=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{"content-type":"application/xml",[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[T_]:[,""],[S_]:[,me(e[Fv],"Id")]});let o,s;return void 0!==e.InventoryConfiguration&&(s=Dh(e.InventoryConfiguration,t),o=bx,s.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),o+=s.toString()),n.m("PUT").h(r).q(i).b(o),n.build()},Jc=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{"content-type":"application/xml",[aI]:e[Oy],[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[I_]:[,""]});let o,s;return void 0!==e.LifecycleConfiguration&&(s=mh(e.LifecycleConfiguration,t),s=s.n("LifecycleConfiguration"),o=bx,s.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),o+=s.toString()),n.m("PUT").h(r).q(i).b(o),n.build()},Zc=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{"content-type":"application/xml",[l_]:e[Hy],[aI]:e[Oy],[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[A_]:[,""]});let o,s;return void 0!==e.BucketLoggingStatus&&(s=gh(e.BucketLoggingStatus,t),o=bx,s.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),o+=s.toString()),n.m("PUT").h(r).q(i).b(o),n.build()},el=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{"content-type":"application/xml",[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[N_]:[,""],[S_]:[,me(e[Fv],"Id")]});let o,s;return void 0!==e.MetricsConfiguration&&(s=Gh(e.MetricsConfiguration,t),o=bx,s.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),o+=s.toString()),n.m("PUT").h(r).q(i).b(o),n.build()},tl=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{"content-type":"application/xml",[eR]:e[zb],[cI]:[()=>Rg(e[AT]),()=>e[AT].toString()]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[U_]:[,""]});let o,s;return void 0!==e.NotificationConfiguration&&(s=Wh(e.NotificationConfiguration,t),o=bx,s.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),o+=s.toString()),n.m("PUT").h(r).q(i).b(o),n.build()},nl=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{"content-type":"application/xml",[l_]:e[Hy],[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[z_]:[,""]});let o,s;return void 0!==e.OwnershipControls&&(s=nf(e.OwnershipControls,t),o=bx,s.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),o+=s.toString()),n.m("PUT").h(r).q(i).b(o),n.build()},rl=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{"content-type":"text/plain",[l_]:e[Hy],[aI]:e[Oy],[Fx]:[()=>Rg(e[Jy]),()=>e[Jy].toString()],[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[H_]:[,""]});let o,s;return void 0!==e.Policy&&(s=e.Policy,o=s),n.m("PUT").h(r).q(i).b(o),n.build()},il=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{"content-type":"application/xml",[l_]:e[Hy],[aI]:e[Oy],[Ax]:e[DE],[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[X_]:[,""]});let o,s;return void 0!==e.ReplicationConfiguration&&(s=cf(e.ReplicationConfiguration,t),o=bx,s.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),o+=s.toString()),n.m("PUT").h(r).q(i).b(o),n.build()},ol=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{"content-type":"application/xml",[l_]:e[Hy],[aI]:e[Oy],[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[Y_]:[,""]});let o,s;return void 0!==e.RequestPaymentConfiguration&&(s=ff(e.RequestPaymentConfiguration,t),o=bx,s.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),o+=s.toString()),n.m("PUT").h(r).q(i).b(o),n.build()},sl=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{"content-type":"application/xml",[l_]:e[Hy],[aI]:e[Oy],[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[dx]:[,""]});let o,s;return void 0!==e.Tagging&&(s=Of(e.Tagging,t),o=bx,s.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),o+=s.toString()),n.m("PUT").h(r).q(i).b(o),n.build()},al=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{"content-type":"application/xml",[l_]:e[Hy],[aI]:e[Oy],[UR]:e[iw],[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[gx]:[,""]});let o,s;return void 0!==e.VersioningConfiguration&&(s=Ff(e.VersioningConfiguration,t),o=bx,s.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),o+=s.toString()),n.m("PUT").h(r).q(i).b(o),n.build()},cl=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{"content-type":"application/xml",[l_]:e[Hy],[aI]:e[Oy],[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[wx]:[,""]});let o,s;return void 0!==e.WebsiteConfiguration&&(s=qf(e.WebsiteConfiguration,t),o=bx,s.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),o+=s.toString()),n.m("PUT").h(r).q(i).b(o),n.build()},ll=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[d_]:e[fb]||"application/octet-stream",[Tx]:e[Dg],[i_]:e[ky],[o_]:e[jy],[s_]:e[Fy],[a_]:e[Uy],[c_]:[()=>Rg(e[zy]),()=>e[zy].toString()],[l_]:e[Hy],[aI]:e[Oy],[Lx]:e[Ny],[jx]:e[Ly],[qx]:e[eb],[Bx]:e[tb],[m_]:[()=>Rg(e[qb]),()=>Ie(e[qb]).toString()],[jR]:e[Rv],[MR]:e[Pv],[FR]:e[Ov],[BR]:e[Av],[uI]:e[$T],[sI]:e[RT],[wI]:e[XE],[fI]:e[XT],[mI]:e[YT],[gI]:e[JT],[dI]:e[tE],[hI]:e[eE],[pI]:[()=>Rg(e[py]),()=>e[py].toString()],[nI]:e[JC],[yI]:e[dE],[KR]:e[Ww],[QR]:[()=>Rg(e[Xw]),()=>(e[Xw].toISOString().split(".")[0]+"Z").toString()],[WR]:e[$w],[eR]:e[zb],...void 0!==e.Metadata&&Object.keys(e.Metadata).reduce(((t,n)=>(t[`x-amz-meta-${n.toLowerCase()}`]=e.Metadata[n],t)),{})});n.bp("/{Key+}"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1),n.p("Key",(()=>e.Key),"{Key+}",!0);const i=lt({[CI]:[,"PutObject"]});let o,s;return void 0!==e.Body&&(s=e.Body,o=s),n.m("PUT").h(r).q(i).b(o),n.build()},ul=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{"content-type":"application/xml",[Tx]:e[Dg],[l_]:e[Hy],[aI]:e[Oy],[jR]:e[Rv],[MR]:e[Pv],[FR]:e[Ov],[qR]:e[Dv],[BR]:e[Av],[nI]:e[JC],[eR]:e[zb]});n.bp("/{Key+}"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1),n.p("Key",(()=>e.Key),"{Key+}",!0);const i=lt({[e_]:[,""],[yx]:[,e[VE]]});let o,s;return void 0!==e.AccessControlPolicy&&(s=ph(e.AccessControlPolicy,t),o=bx,s.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),o+=s.toString()),n.m("PUT").h(r).q(i).b(o),n.build()},dl=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{"content-type":"application/xml",[nI]:e[JC],[l_]:e[Hy],[aI]:e[Oy],[eR]:e[zb]});n.bp("/{Key+}"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1),n.p("Key",(()=>e.Key),"{Key+}",!0);const i=lt({[P_]:[,""],[yx]:[,e[VE]]});let o,s;return void 0!==e.LegalHold&&(s=Yh(e.LegalHold,t),s=s.n("LegalHold"),o=bx,s.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),o+=s.toString()),n.m("PUT").h(r).q(i).b(o),n.build()},pl=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{"content-type":"application/xml",[nI]:e[JC],[Ax]:e[DE],[l_]:e[Hy],[aI]:e[Oy],[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[G_]:[,""]});let o,s;return void 0!==e.ObjectLockConfiguration&&(s=Xh(e.ObjectLockConfiguration,t),o=bx,s.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),o+=s.toString()),n.m("PUT").h(r).q(i).b(o),n.build()},hl=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{"content-type":"application/xml",[nI]:e[JC],[Ix]:[()=>Rg(e[uy]),()=>e[uy].toString()],[l_]:e[Hy],[aI]:e[Oy],[eR]:e[zb]});n.bp("/{Key+}"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1),n.p("Key",(()=>e.Key),"{Key+}",!0);const i=lt({[sx]:[,""],[yx]:[,e[VE]]});let o,s;return void 0!==e.Retention&&(s=Jh(e.Retention,t),s=s.n("Retention"),o=bx,s.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),o+=s.toString()),n.m("PUT").h(r).q(i).b(o),n.build()},fl=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{"content-type":"application/xml",[l_]:e[Hy],[aI]:e[Oy],[eR]:e[zb],[nI]:e[JC]});n.bp("/{Key+}"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1),n.p("Key",(()=>e.Key),"{Key+}",!0);const i=lt({[dx]:[,""],[yx]:[,e[VE]]});let o,s;return void 0!==e.Tagging&&(s=Of(e.Tagging,t),o=bx,s.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),o+=s.toString()),n.m("PUT").h(r).q(i).b(o),n.build()},ml=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{"content-type":"application/xml",[l_]:e[Hy],[aI]:e[Oy],[eR]:e[zb]});n.bp("/"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1);const i=lt({[V_]:[,""]});let o,s;return void 0!==e.PublicAccessBlockConfiguration&&(s=sf(e.PublicAccessBlockConfiguration,t),o=bx,s.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),o+=s.toString()),n.m("PUT").h(r).q(i).b(o),n.build()},gl=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{"content-type":"application/xml",[nI]:e[JC],[aI]:e[Oy],[eR]:e[zb]});n.bp("/{Key+}"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1),n.p("Key",(()=>e.Key),"{Key+}",!0);const i=lt({[ox]:[,""],[CI]:[,"RestoreObject"],[yx]:[,e[VE]]});let o,s;return void 0!==e.RestoreRequest&&(s=gf(e.RestoreRequest,t),o=bx,s.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),o+=s.toString()),n.m("POST").h(r).q(i).b(o),n.build()},yl=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{"content-type":"application/xml",[fI]:e[XT],[mI]:e[YT],[gI]:e[JT],[eR]:e[zb]});n.bp("/{Key+}"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1),n.p("Key",(()=>e.Key),"{Key+}",!0);const i=lt({[lx]:[,""],[ux]:[,"2"],[CI]:[,"SelectObjectContent"]});let o;o=bx;const s=new Ks(BT);return s.a("xmlns","http://s3.amazonaws.com/doc/2006-03-01/"),s.cc(e,hv),s.cc(e,ov),null!=e[sS]&&s.c(Ih(e[sS],t).n(sS)),null!=e[nC]&&s.c(ef(e[nC],t).n(nC)),null!=e[tT]&&s.c(mf(e[tT],t).n(tT)),null!=e[GT]&&s.c(vf(e[GT],t).n(GT)),o+=s.toString(),n.m("POST").h(r).q(i).b(o),n.build()},bl=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{"content-type":"application/octet-stream",[c_]:[()=>Rg(e[zy]),()=>e[zy].toString()],[l_]:e[Hy],[aI]:e[Oy],[Lx]:e[Ny],[jx]:e[Ly],[qx]:e[eb],[Bx]:e[tb],[fI]:e[XT],[mI]:e[YT],[gI]:e[JT],[nI]:e[JC],[eR]:e[zb]});n.bp("/{Key+}"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1),n.p("Key",(()=>e.Key),"{Key+}",!0);const i=lt({[CI]:[,"UploadPart"],[$_]:[null!=me(e.PartNumber,"PartNumber"),()=>e[gC].toString()],[fx]:[,me(e[ME],"UploadId")]});let o,s;return void 0!==e.Body&&(s=e.Body,o=s),n.m("PUT").h(r).q(i).b(o),n.build()},vl=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{[Ux]:e[Zy],[zx]:e[nb],[Gx]:[()=>Rg(e[rb]),()=>Ie(e[rb]).toString()],[Hx]:e[ib],[Vx]:[()=>Rg(e[ob]),()=>Ie(e[ob]).toString()],[Wx]:e[sb],[fI]:e[XT],[mI]:e[YT],[gI]:e[JT],[Kx]:e[ab],[Qx]:e[cb],[Xx]:e[lb],[nI]:e[JC],[eR]:e[zb],[lI]:e[ev]});n.bp("/{Key+}"),n.p("Bucket",(()=>e.Bucket),"{Bucket}",!1),n.p("Key",(()=>e.Key),"{Key+}",!0);const i=lt({[CI]:[,"UploadPartCopy"],[$_]:[null!=me(e.PartNumber,"PartNumber"),()=>e[gC].toString()],[fx]:[,me(e[ME],"UploadId")]});return n.m("PUT").h(r).q(i).b(void 0),n.build()},Sl=async(e,t)=>{const n=ia(e,t),r=lt({},Rg,{"x-amz-content-sha256":"UNSIGNED-PAYLOAD","content-type":"application/octet-stream",[rI]:e[nT],[oI]:e[hT],[LR]:[()=>Rg(e[DT]),()=>e[DT].toString()],[tR]:e[Gb],[nR]:e[Kb],[rR]:e[Zg],[iR]:e[ky],[oR]:e[jy],[sR]:e[Fy],[aR]:e[Uy],[c_]:[()=>Rg(e[zy]),()=>e[zy].toString()],[cR]:e[Yy],[lR]:e[fb],[hR]:e[Ny],[fR]:e[Ly],[mR]:e[eb],[gR]:e[tb],[yR]:[()=>Rg(e[_b]),()=>e[_b].toString()],[uR]:e[nv],[dR]:[()=>Rg(e[qb]),()=>Ie(e[qb]).toString()],[bR]:e[fv],[pR]:[()=>Rg(e[US]),()=>Ie(e[US]).toString()],[vR]:[()=>Rg(e[lw]),()=>e[lw].toString()],[CR]:e[Ww],[wR]:e[$w],[TR]:[()=>Rg(e[Xw]),()=>(e[Xw].toISOString().split(".")[0]+"Z").toString()],[SR]:[()=>Rg(e[hC]),()=>e[hC].toString()],[xR]:e[dT],[_R]:e[jC],[ER]:e[bT],[IR]:e[$T],[DR]:e[XT],[PR]:e[tE],[AR]:e[JT],[RR]:e[RT],[kR]:[()=>Rg(e[fE]),()=>e[fE].toString()],[NR]:e[VE],[OR]:[()=>Rg(e[py]),()=>e[py].toString()],...void 0!==e.Metadata&&Object.keys(e.Metadata).reduce(((t,n)=>(t[`x-amz-meta-${n.toLowerCase()}`]=e.Metadata[n],t)),{})});n.bp("/WriteGetObjectResponse");const i=lt({[CI]:[,"WriteGetObjectResponse"]});let o,s;void 0!==e.Body&&(s=e.Body,o=s);let{hostname:a}=await t.endpoint();if(!0!==t.disableHostPrefix){if(a="{RequestRoute}."+a,void 0===e.RequestRoute)throw new Error("Empty value provided for input host prefix: RequestRoute.");if(a=a.replace("{RequestRoute}",e.RequestRoute),!/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(a))throw new Error("ValidationError: prefixed hostname must be hostname compatible.")}return n.hn(a),n.m("POST").h(r).q(i).b(o),n.build()},wl=async(e,t)=>{if(204!==e.statusCode&&e.statusCode>=300)return Cl(e,t);const n=lt({$metadata:_g(e),[jC]:[,e.headers[eI]]});return await re(e.body,t),n},Cl=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body);switch(r){case"NoSuchUpload":case"com.amazonaws.s3#NoSuchUpload":throw await th(n,t);default:const i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})}},Tl=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return El(e,t);const n=lt({$metadata:_g(e),[fv]:[,e.headers[Zx]],[$T]:[,e.headers[uI]],[VE]:[,e.headers[SI]],[tE]:[,e.headers[dI]],[py]:[()=>void 0!==e.headers[pI],()=>ce(e.headers[pI])],[jC]:[,e.headers[eI]]}),r=me(ge(await TI(e.body,t)),"body");return null!=r[ay]&&(n[ay]=ye(r[ay])),null!=r[Ny]&&(n[Ny]=ye(r[Ny])),null!=r[Ly]&&(n[Ly]=ye(r[Ly])),null!=r[eb]&&(n[eb]=ye(r[eb])),null!=r[tb]&&(n[tb]=ye(r[tb])),null!=r[nv]&&(n[nv]=ye(r[nv])),null!=r[_S]&&(n[_S]=ye(r[_S])),null!=r[kS]&&(n[kS]=ye(r[kS])),n},El=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},_l=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return xl(e,t);const n=lt({$metadata:_g(e),[fv]:[,e.headers[Zx]],[db]:[,e.headers[Yx]],[VE]:[,e.headers[SI]],[$T]:[,e.headers[uI]],[XT]:[,e.headers[fI]],[JT]:[,e.headers[gI]],[tE]:[,e.headers[dI]],[eE]:[,e.headers[hI]],[py]:[()=>void 0!==e.headers[pI],()=>ce(e.headers[pI])],[jC]:[,e.headers[eI]]}),r=ge(await TI(e.body,t));return n.CopyObjectResult=Qf(r,t),n},xl=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body);switch(r){case"ObjectNotInActiveTierError":case"com.amazonaws.s3#ObjectNotInActiveTierError":throw await ih(n,t);default:const i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})}},Rl=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Il(e,t);const n=lt({$metadata:_g(e),[kS]:[,e.headers[D_]]});return await re(e.body,t),n},Il=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body);switch(r){case"BucketAlreadyExists":case"com.amazonaws.s3#BucketAlreadyExists":throw await Xp(n,t);case"BucketAlreadyOwnedByYou":case"com.amazonaws.s3#BucketAlreadyOwnedByYou":throw await Yp(n,t);default:const i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})}},Pl=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Ol(e,t);const n=lt({$metadata:_g(e),[Mg]:[()=>void 0!==e.headers[Ex],()=>me(Ne(e.headers[Ex]))],[ey]:[,e.headers[xx]],[$T]:[,e.headers[uI]],[XT]:[,e.headers[fI]],[JT]:[,e.headers[gI]],[tE]:[,e.headers[dI]],[eE]:[,e.headers[hI]],[py]:[()=>void 0!==e.headers[pI],()=>ce(e.headers[pI])],[jC]:[,e.headers[eI]],[Oy]:[,e.headers[Nx]]}),r=me(ge(await TI(e.body,t)),"body");return null!=r[ay]&&(n[ay]=ye(r[ay])),null!=r[_S]&&(n[_S]=ye(r[_S])),null!=r[ME]&&(n[ME]=ye(r[ME])),n},Ol=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},Dl=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Al(e,t);const n=lt({$metadata:_g(e)}),r=me(ge(await TI(e.body,t)),"body");return null!=r[Py]&&(n[Py]=ug(r[Py],t)),n},Al=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body);switch(r){case"NoSuchBucket":case"com.amazonaws.s3#NoSuchBucket":throw await Zp(n,t);default:const i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})}},kl=async(e,t)=>{if(204!==e.statusCode&&e.statusCode>=300)return Nl(e,t);const n=lt({$metadata:_g(e)});return await re(e.body,t),n},Nl=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},Ll=async(e,t)=>{if(204!==e.statusCode&&e.statusCode>=300)return jl(e,t);const n=lt({$metadata:_g(e)});return await re(e.body,t),n},jl=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},Ml=async(e,t)=>{if(204!==e.statusCode&&e.statusCode>=300)return Fl(e,t);const n=lt({$metadata:_g(e)});return await re(e.body,t),n},Fl=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},ql=async(e,t)=>{if(204!==e.statusCode&&e.statusCode>=300)return Bl(e,t);const n=lt({$metadata:_g(e)});return await re(e.body,t),n},Bl=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},Ul=async(e,t)=>{if(204!==e.statusCode&&e.statusCode>=300)return zl(e,t);const n=lt({$metadata:_g(e)});return await re(e.body,t),n},zl=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},Gl=async(e,t)=>{if(204!==e.statusCode&&e.statusCode>=300)return Hl(e,t);const n=lt({$metadata:_g(e)});return await re(e.body,t),n},Hl=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},Vl=async(e,t)=>{if(204!==e.statusCode&&e.statusCode>=300)return $l(e,t);const n=lt({$metadata:_g(e)});return await re(e.body,t),n},$l=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},Wl=async(e,t)=>{if(204!==e.statusCode&&e.statusCode>=300)return Kl(e,t);const n=lt({$metadata:_g(e)});return await re(e.body,t),n},Kl=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},Ql=async(e,t)=>{if(204!==e.statusCode&&e.statusCode>=300)return Xl(e,t);const n=lt({$metadata:_g(e)});return await re(e.body,t),n},Xl=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},Yl=async(e,t)=>{if(204!==e.statusCode&&e.statusCode>=300)return Jl(e,t);const n=lt({$metadata:_g(e)});return await re(e.body,t),n},Jl=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},Zl=async(e,t)=>{if(204!==e.statusCode&&e.statusCode>=300)return eu(e,t);const n=lt({$metadata:_g(e)});return await re(e.body,t),n},eu=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},tu=async(e,t)=>{if(204!==e.statusCode&&e.statusCode>=300)return nu(e,t);const n=lt({$metadata:_g(e)});return await re(e.body,t),n},nu=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},ru=async(e,t)=>{if(204!==e.statusCode&&e.statusCode>=300)return iu(e,t);const n=lt({$metadata:_g(e)});return await re(e.body,t),n},iu=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},ou=async(e,t)=>{if(204!==e.statusCode&&e.statusCode>=300)return su(e,t);const n=lt({$metadata:_g(e),[_b]:[()=>void 0!==e.headers[Jx],()=>ce(e.headers[Jx])],[VE]:[,e.headers[SI]],[jC]:[,e.headers[eI]]});return await re(e.body,t),n},su=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},au=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return cu(e,t);const n=lt({$metadata:_g(e),[jC]:[,e.headers[eI]]}),r=me(ge(await TI(e.body,t)),"body");return""===r.Deleted?n[Lb]=[]:null!=r[Lb]&&(n[Lb]=Jf(st(r[Lb]),t)),""===r.Error?n[uv]=[]:null!=r[lv]&&(n[uv]=rm(st(r[lv]),t)),n},cu=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},lu=async(e,t)=>{if(204!==e.statusCode&&e.statusCode>=300)return uu(e,t);const n=lt({$metadata:_g(e),[VE]:[,e.headers[SI]]});return await re(e.body,t),n},uu=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},du=async(e,t)=>{if(204!==e.statusCode&&e.statusCode>=300)return pu(e,t);const n=lt({$metadata:_g(e)});return await re(e.body,t),n},pu=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},hu=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return fu(e,t);const n=lt({$metadata:_g(e),[jC]:[,e.headers[eI]]}),r=me(ge(await TI(e.body,t)),"body");return null!=r[TT]&&(n[TT]=ye(r[TT])),n},fu=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},mu=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return gu(e,t);const n=lt({$metadata:_g(e)}),r=me(ge(await TI(e.body,t)),"body");return""===r.AccessControlList?n[kv]=[]:null!=r[Ag]&&null!=r[Ag][xv]&&(n[kv]=lm(st(r[Ag][xv]),t)),null!=r[kw]&&(n[kw]=zm(r[kw],t)),n},gu=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},yu=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return bu(e,t);const n=lt({$metadata:_g(e)}),r=ge(await TI(e.body,t));return n.AnalyticsConfiguration=Uf(r,t),n},bu=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},vu=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Su(e,t);const n=lt({$metadata:_g(e)}),r=me(ge(await TI(e.body,t)),"body");return""===r.CORSRule?n[Ky]=[]:null!=r[Wy]&&(n[Ky]=Yf(st(r[Wy]),t)),n},Su=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},wu=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Cu(e,t);const n=lt({$metadata:_g(e)}),r=ge(await TI(e.body,t));return n.ServerSideEncryptionConfiguration=cg(r,t),n},Cu=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},Tu=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Eu(e,t);const n=lt({$metadata:_g(e)}),r=ge(await TI(e.body,t));return n.IntelligentTieringConfiguration=pm(r,t),n},Eu=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},_u=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return xu(e,t);const n=lt({$metadata:_g(e)}),r=ge(await TI(e.body,t));return n.InventoryConfiguration=mm(r,t),n},xu=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},Ru=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Iu(e,t);const n=lt({$metadata:_g(e)}),r=me(ge(await TI(e.body,t)),"body");return""===r.Rule?n[CT]=[]:null!=r[wT]&&(n[CT]=_m(st(r[wT]),t)),n},Iu=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},Pu=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Ou(e,t);const n=lt({$metadata:_g(e)}),r=me(ge(await TI(e.body,t)),"body");return null!=r[NS]&&(n[NS]=ye(r[NS])),n},Ou=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},Du=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Au(e,t);const n=lt({$metadata:_g(e)}),r=me(ge(await TI(e.body,t)),"body");return null!=r[LS]&&(n[LS]=xm(r[LS],t)),n},Au=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},ku=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Nu(e,t);const n=lt({$metadata:_g(e)}),r=ge(await TI(e.body,t));return n.MetricsConfiguration=Pm(r,t),n},Nu=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},Lu=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ju(e,t);const n=lt({$metadata:_g(e)}),r=me(ge(await TI(e.body,t)),"body");return null!=r[Ub]&&(n[Ub]=im(r[Ub],t)),""===r.CloudFunctionConfiguration?n[FS]=[]:null!=r[By]&&(n[FS]=Cm(st(r[By]),t)),""===r.QueueConfiguration?n[PC]=[]:null!=r[IC]&&(n[PC]=Xm(st(r[IC]),t)),""===r.TopicConfiguration?n[gE]=[]:null!=r[mE]&&(n[gE]=Tg(st(r[mE]),t)),n},ju=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},Mu=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Fu(e,t);const n=lt({$metadata:_g(e)}),r=ge(await TI(e.body,t));return n.OwnershipControls=Gm(r,t),n},Fu=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},qu=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Bu(e,t);const n=lt({$metadata:_g(e)}),r=await xg(e.body,t);return n.Policy=ye(r),n},Bu=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},Uu=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return zu(e,t);const n=lt({$metadata:_g(e)}),r=ge(await TI(e.body,t));return n.PolicyStatus=Wm(r,t),n},zu=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},Gu=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Hu(e,t);const n=lt({$metadata:_g(e)}),r=ge(await TI(e.body,t));return n.ReplicationConfiguration=Jm(r,t),n},Hu=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},Vu=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return $u(e,t);const n=lt({$metadata:_g(e)}),r=me(ge(await TI(e.body,t)),"body");return null!=r[vC]&&(n[vC]=ye(r[vC])),n},$u=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},Wu=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Ku(e,t);const n=lt({$metadata:_g(e)}),r=me(ge(await TI(e.body,t)),"body");return""===r.TagSet?n[TE]=[]:null!=r[TE]&&null!=r[TE][_E]&&(n[TE]=vg(st(r[TE][_E]),t)),n},Ku=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},Qu=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Xu(e,t);const n=lt({$metadata:_g(e)}),r=me(ge(await TI(e.body,t)),"body");return null!=r[tw]&&(n[ow]=ye(r[tw])),null!=r[TT]&&(n[TT]=ye(r[TT])),n},Xu=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},Yu=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Ju(e,t);const n=lt({$metadata:_g(e)}),r=me(ge(await TI(e.body,t)),"body");return null!=r[Vb]&&(n[Vb]=nm(r[Vb],t)),null!=r[Uv]&&(n[Uv]=um(r[Uv],t)),null!=r[LC]&&(n[LC]=Ym(r[LC],t)),""===r.RoutingRules?n[lT]=[]:null!=r[lT]&&null!=r[lT][uT]&&(n[lT]=sg(st(r[lT][uT]),t)),n},Ju=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},Zu=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ed(e,t);const n=lt({$metadata:_g(e),[_b]:[()=>void 0!==e.headers[Jx],()=>ce(e.headers[Jx])],[Zg]:[,e.headers[t_]],[fv]:[,e.headers[Zx]],[bT]:[,e.headers[ZR]],[US]:[()=>void 0!==e.headers[O_],()=>me(Ne(e.headers[O_]))],[zy]:[()=>void 0!==e.headers[c_],()=>we(e.headers[c_])],[nv]:[,e.headers[b_]],[Ny]:[,e.headers[Lx]],[Ly]:[,e.headers[jx]],[eb]:[,e.headers[qx]],[tb]:[,e.headers[Bx]],[lw]:[()=>void 0!==e.headers[GR],()=>Ce(e.headers[GR])],[VE]:[,e.headers[SI]],[ky]:[,e.headers[i_]],[jy]:[,e.headers[o_]],[Fy]:[,e.headers[s_]],[Uy]:[,e.headers[a_]],[Yy]:[,e.headers[u_]],[fb]:[,e.headers[d_]],[qb]:[()=>void 0!==e.headers[m_],()=>me(Ne(e.headers[m_]))],[XE]:[,e.headers[wI]],[$T]:[,e.headers[uI]],[XT]:[,e.headers[fI]],[JT]:[,e.headers[gI]],[tE]:[,e.headers[dI]],[py]:[()=>void 0!==e.headers[pI],()=>ce(e.headers[pI])],[RT]:[,e.headers[sI]],[jC]:[,e.headers[eI]],[dT]:[,e.headers[iI]],[hC]:[()=>void 0!==e.headers[VR],()=>Ce(e.headers[VR])],[fE]:[()=>void 0!==e.headers[bI],()=>Ce(e.headers[bI])],[Ww]:[,e.headers[KR]],[Xw]:[()=>void 0!==e.headers[QR],()=>me(Oe(e.headers[QR]))],[$w]:[,e.headers[WR]],Metadata:[,Object.keys(e.headers).filter((e=>e.startsWith("x-amz-meta-"))).reduce(((t,n)=>(t[n.substring(11)]=e.headers[n],t)),{})]}),r=e.body;return t.sdkStreamMixin(r),n.Body=r,n},ed=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body);switch(r){case"InvalidObjectState":case"com.amazonaws.s3#InvalidObjectState":throw await Jp(n,t);case"NoSuchKey":case"com.amazonaws.s3#NoSuchKey":throw await eh(n,t);default:const i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})}},td=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return nd(e,t);const n=lt({$metadata:_g(e),[jC]:[,e.headers[eI]]}),r=me(ge(await TI(e.body,t)),"body");return""===r.AccessControlList?n[kv]=[]:null!=r[Ag]&&null!=r[Ag][xv]&&(n[kv]=lm(st(r[Ag][xv]),t)),null!=r[kw]&&(n[kw]=zm(r[kw],t)),n},nd=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body);switch(r){case"NoSuchKey":case"com.amazonaws.s3#NoSuchKey":throw await eh(n,t);default:const i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})}},rd=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return id(e,t);const n=lt({$metadata:_g(e),[_b]:[()=>void 0!==e.headers[Jx],()=>ce(e.headers[Jx])],[US]:[()=>void 0!==e.headers[O_],()=>me(Ne(e.headers[O_]))],[VE]:[,e.headers[SI]],[jC]:[,e.headers[eI]]}),r=me(ge(await TI(e.body,t)),"body");return null!=r[yb]&&(n[yb]=Vf(r[yb],t)),null!=r[nv]&&(n[nv]=ye(r[nv])),null!=r[tC]&&(n[tC]=am(r[tC],t)),null!=r[cC]&&(n[cC]=we(r[cC])),null!=r[RT]&&(n[RT]=ye(r[RT])),n},id=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body);switch(r){case"NoSuchKey":case"com.amazonaws.s3#NoSuchKey":throw await eh(n,t);default:const i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})}},od=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return sd(e,t);const n=lt({$metadata:_g(e)}),r=ge(await TI(e.body,t));return n.LegalHold=Fm(r,t),n},sd=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},ad=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return cd(e,t);const n=lt({$metadata:_g(e)}),r=ge(await TI(e.body,t));return n.ObjectLockConfiguration=Mm(r,t),n},cd=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},ld=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ud(e,t);const n=lt({$metadata:_g(e)}),r=ge(await TI(e.body,t));return n.Retention=qm(r,t),n},ud=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},dd=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return pd(e,t);const n=lt({$metadata:_g(e),[VE]:[,e.headers[SI]]}),r=me(ge(await TI(e.body,t)),"body");return""===r.TagSet?n[TE]=[]:null!=r[TE]&&null!=r[TE][_E]&&(n[TE]=vg(st(r[TE][_E]),t)),n},pd=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},hd=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return fd(e,t);const n=lt({$metadata:_g(e),[jC]:[,e.headers[eI]]}),r=e.body;return t.sdkStreamMixin(r),n.Body=r,n},fd=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},md=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return gd(e,t);const n=lt({$metadata:_g(e)}),r=ge(await TI(e.body,t));return n.PublicAccessBlockConfiguration=Qm(r,t),n},gd=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},yd=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return bd(e,t);const n=lt({$metadata:_g(e),[by]:[,e.headers[Ox]],[my]:[,e.headers[Px]],[Ty]:[,e.headers[kx]],[Xg]:[()=>void 0!==e.headers[_x],()=>ce(e.headers[_x])]});return await re(e.body,t),n},bd=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body);switch(r){case"NotFound":case"com.amazonaws.s3#NotFound":throw await nh(n,t);default:const i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})}},vd=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Sd(e,t);const n=lt({$metadata:_g(e),[_b]:[()=>void 0!==e.headers[Jx],()=>ce(e.headers[Jx])],[Zg]:[,e.headers[t_]],[fv]:[,e.headers[Zx]],[bT]:[,e.headers[ZR]],[ty]:[,e.headers[Rx]],[US]:[()=>void 0!==e.headers[O_],()=>me(Ne(e.headers[O_]))],[zy]:[()=>void 0!==e.headers[c_],()=>we(e.headers[c_])],[Ny]:[,e.headers[Lx]],[Ly]:[,e.headers[jx]],[eb]:[,e.headers[qx]],[tb]:[,e.headers[Bx]],[nv]:[,e.headers[b_]],[lw]:[()=>void 0!==e.headers[GR],()=>Ce(e.headers[GR])],[VE]:[,e.headers[SI]],[ky]:[,e.headers[i_]],[jy]:[,e.headers[o_]],[Fy]:[,e.headers[s_]],[Uy]:[,e.headers[a_]],[fb]:[,e.headers[d_]],[qb]:[()=>void 0!==e.headers[m_],()=>me(Ne(e.headers[m_]))],[XE]:[,e.headers[wI]],[$T]:[,e.headers[uI]],[XT]:[,e.headers[fI]],[JT]:[,e.headers[gI]],[tE]:[,e.headers[dI]],[py]:[()=>void 0!==e.headers[pI],()=>ce(e.headers[pI])],[RT]:[,e.headers[sI]],[jC]:[,e.headers[eI]],[dT]:[,e.headers[iI]],[hC]:[()=>void 0!==e.headers[VR],()=>Ce(e.headers[VR])],[Ww]:[,e.headers[KR]],[Xw]:[()=>void 0!==e.headers[QR],()=>me(Oe(e.headers[QR]))],[$w]:[,e.headers[WR]],Metadata:[,Object.keys(e.headers).filter((e=>e.startsWith("x-amz-meta-"))).reduce(((t,n)=>(t[n.substring(11)]=e.headers[n],t)),{})]});return await re(e.body,t),n},Sd=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body);switch(r){case"NotFound":case"com.amazonaws.s3#NotFound":throw await nh(n,t);default:const i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})}},wd=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Cd(e,t);const n=lt({$metadata:_g(e)}),r=me(ge(await TI(e.body,t)),"body");return""===r.AnalyticsConfiguration?n[kg]=[]:null!=r[Og]&&(n[kg]=zf(st(r[Og]),t)),null!=r[mb]&&(n[mb]=ye(r[mb])),null!=r[lS]&&(n[lS]=ce(r[lS])),null!=r[ww]&&(n[ww]=ye(r[ww])),n},Cd=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},Td=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Ed(e,t);const n=lt({$metadata:_g(e)}),r=me(ge(await TI(e.body,t)),"body");return null!=r[mb]&&(n[mb]=ye(r[mb])),""===r.IntelligentTieringConfiguration?n[hS]=[]:null!=r[pS]&&(n[hS]=hm(st(r[pS]),t)),null!=r[lS]&&(n[lS]=ce(r[lS])),null!=r[ww]&&(n[ww]=ye(r[ww])),n},Ed=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},_d=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return xd(e,t);const n=lt({$metadata:_g(e)}),r=me(ge(await TI(e.body,t)),"body");return null!=r[mb]&&(n[mb]=ye(r[mb])),""===r.InventoryConfiguration?n[Bv]=[]:null!=r[qv]&&(n[Bv]=gm(st(r[qv]),t)),null!=r[lS]&&(n[lS]=ce(r[lS])),null!=r[ww]&&(n[ww]=ye(r[ww])),n},xd=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},Rd=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Id(e,t);const n=lt({$metadata:_g(e)}),r=me(ge(await TI(e.body,t)),"body");return null!=r[mb]&&(n[mb]=ye(r[mb])),null!=r[lS]&&(n[lS]=ce(r[lS])),""===r.MetricsConfiguration?n[JS]=[]:null!=r[YS]&&(n[JS]=Om(st(r[YS]),t)),null!=r[ww]&&(n[ww]=ye(r[ww])),n},Id=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},Pd=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Od(e,t);const n=lt({$metadata:_g(e)}),r=me(ge(await TI(e.body,t)),"body");return""===r.Buckets?n[Iy]=[]:null!=r[Iy]&&null!=r[Iy][ay]&&(n[Iy]=Hf(st(r[Iy][ay]),t)),null!=r[kw]&&(n[kw]=zm(r[kw],t)),n},Od=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},Dd=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Ad(e,t);const n=lt({$metadata:_g(e)}),r=me(ge(await TI(e.body,t)),"body");return""===r.Buckets?n[Iy]=[]:null!=r[Iy]&&null!=r[Iy][ay]&&(n[Iy]=Hf(st(r[Iy][ay]),t)),null!=r[mb]&&(n[mb]=ye(r[mb])),n},Ad=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},kd=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Nd(e,t);const n=lt({$metadata:_g(e),[jC]:[,e.headers[eI]]}),r=me(ge(await TI(e.body,t)),"body");return null!=r[ay]&&(n[ay]=ye(r[ay])),""===r.CommonPrefixes?n[Qy]=[]:null!=r[Qy]&&(n[Qy]=Wf(st(r[Qy]),t)),null!=r[Cb]&&(n[Cb]=ye(r[Cb])),null!=r[tv]&&(n[tv]=ye(r[tv])),null!=r[lS]&&(n[lS]=ce(r[lS])),null!=r[IS]&&(n[IS]=ye(r[IS])),null!=r[pw]&&(n[pw]=Ce(r[pw])),null!=r[Ew]&&(n[Ew]=ye(r[Ew])),null!=r[Iw]&&(n[Iw]=ye(r[Iw])),null!=r[dC]&&(n[dC]=ye(r[dC])),null!=r[FE]&&(n[FE]=ye(r[FE])),""===r.Upload?n[UE]=[]:null!=r[jE]&&(n[UE]=Am(st(r[jE]),t)),n},Nd=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},Ld=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return jd(e,t);const n=lt({$metadata:_g(e),[jC]:[,e.headers[eI]]}),r=me(ge(await TI(e.body,t)),"body");return""===r.CommonPrefixes?n[Qy]=[]:null!=r[Qy]&&(n[Qy]=Wf(st(r[Qy]),t)),""===r.Contents?n[bb]=[]:null!=r[bb]&&(n[bb]=jm(st(r[bb]),t)),null!=r[Cb]&&(n[Cb]=ye(r[Cb])),null!=r[tv]&&(n[tv]=ye(r[tv])),null!=r[lS]&&(n[lS]=ce(r[lS])),null!=r[KS]&&(n[KS]=ye(r[KS])),null!=r[aw]&&(n[aw]=Ce(r[aw])),null!=r[bw]&&(n[bw]=ye(r[bw])),null!=r[_w]&&(n[_w]=ye(r[_w])),null!=r[dC]&&(n[dC]=ye(r[dC])),n},jd=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body);switch(r){case"NoSuchBucket":case"com.amazonaws.s3#NoSuchBucket":throw await Zp(n,t);default:const i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})}},Md=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Fd(e,t);const n=lt({$metadata:_g(e),[jC]:[,e.headers[eI]]}),r=me(ge(await TI(e.body,t)),"body");return""===r.CommonPrefixes?n[Qy]=[]:null!=r[Qy]&&(n[Qy]=Wf(st(r[Qy]),t)),""===r.Contents?n[bb]=[]:null!=r[bb]&&(n[bb]=jm(st(r[bb]),t)),null!=r[mb]&&(n[mb]=ye(r[mb])),null!=r[Cb]&&(n[Cb]=ye(r[Cb])),null!=r[tv]&&(n[tv]=ye(r[tv])),null!=r[lS]&&(n[lS]=ce(r[lS])),null!=r[xS]&&(n[xS]=Ce(r[xS])),null!=r[aw]&&(n[aw]=Ce(r[aw])),null!=r[bw]&&(n[bw]=ye(r[bw])),null!=r[ww]&&(n[ww]=ye(r[ww])),null!=r[dC]&&(n[dC]=ye(r[dC])),null!=r[ET]&&(n[ET]=ye(r[ET])),n},Fd=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body);switch(r){case"NoSuchBucket":case"com.amazonaws.s3#NoSuchBucket":throw await Zp(n,t);default:const i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})}},qd=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Bd(e,t);const n=lt({$metadata:_g(e),[jC]:[,e.headers[eI]]}),r=me(ge(await TI(e.body,t)),"body");return""===r.CommonPrefixes?n[Qy]=[]:null!=r[Qy]&&(n[Qy]=Wf(st(r[Qy]),t)),""===r.DeleteMarker?n[Pb]=[]:null!=r[_b]&&(n[Pb]=Zf(st(r[_b]),t)),null!=r[Cb]&&(n[Cb]=ye(r[Cb])),null!=r[tv]&&(n[tv]=ye(r[tv])),null!=r[lS]&&(n[lS]=ce(r[lS])),null!=r[IS]&&(n[IS]=ye(r[IS])),null!=r[aw]&&(n[aw]=Ce(r[aw])),null!=r[bw]&&(n[bw]=ye(r[bw])),null!=r[Ew]&&(n[Ew]=ye(r[Ew])),null!=r[Ow]&&(n[Ow]=ye(r[Ow])),null!=r[dC]&&(n[dC]=ye(r[dC])),null!=r[$E]&&(n[$E]=ye(r[$E])),""===r.Version?n[KE]=[]:null!=r[zE]&&(n[KE]=Um(st(r[zE]),t)),n},Bd=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},Ud=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return zd(e,t);const n=lt({$metadata:_g(e),[Mg]:[()=>void 0!==e.headers[Ex],()=>me(Ne(e.headers[Ex]))],[ey]:[,e.headers[xx]],[jC]:[,e.headers[eI]]}),r=me(ge(await TI(e.body,t)),"body");return null!=r[ay]&&(n[ay]=ye(r[ay])),null!=r[Oy]&&(n[Oy]=ye(r[Oy])),null!=r[vS]&&(n[vS]=dm(r[vS],t)),null!=r[lS]&&(n[lS]=ce(r[lS])),null!=r[_S]&&(n[_S]=ye(r[_S])),null!=r[uw]&&(n[uw]=Ce(r[uw])),null!=r[Rw]&&(n[Rw]=ye(r[Rw])),null!=r[kw]&&(n[kw]=zm(r[kw],t)),null!=r[yC]&&(n[yC]=ye(r[yC])),""===r.Part?n[CC]=[]:null!=r[SC]&&(n[CC]=Vm(st(r[SC]),t)),null!=r[RT]&&(n[RT]=ye(r[RT])),null!=r[ME]&&(n[ME]=ye(r[ME])),n},zd=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},Gd=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Hd(e,t);const n=lt({$metadata:_g(e)});return await re(e.body,t),n},Hd=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},Vd=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return $d(e,t);const n=lt({$metadata:_g(e)});return await re(e.body,t),n},$d=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},Wd=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Kd(e,t);const n=lt({$metadata:_g(e)});return await re(e.body,t),n},Kd=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},Qd=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Xd(e,t);const n=lt({$metadata:_g(e)});return await re(e.body,t),n},Xd=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},Yd=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Jd(e,t);const n=lt({$metadata:_g(e)});return await re(e.body,t),n},Jd=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},Zd=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ep(e,t);const n=lt({$metadata:_g(e)});return await re(e.body,t),n},ep=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},tp=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return np(e,t);const n=lt({$metadata:_g(e)});return await re(e.body,t),n},np=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},rp=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return ip(e,t);const n=lt({$metadata:_g(e)});return await re(e.body,t),n},ip=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},op=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return sp(e,t);const n=lt({$metadata:_g(e)});return await re(e.body,t),n},sp=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},ap=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return cp(e,t);const n=lt({$metadata:_g(e)});return await re(e.body,t),n},cp=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},lp=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return up(e,t);const n=lt({$metadata:_g(e)});return await re(e.body,t),n},up=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},dp=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return pp(e,t);const n=lt({$metadata:_g(e)});return await re(e.body,t),n},pp=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},hp=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return fp(e,t);const n=lt({$metadata:_g(e)});return await re(e.body,t),n},fp=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},mp=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return gp(e,t);const n=lt({$metadata:_g(e)});return await re(e.body,t),n},gp=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},yp=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return bp(e,t);const n=lt({$metadata:_g(e)});return await re(e.body,t),n},bp=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},vp=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Sp(e,t);const n=lt({$metadata:_g(e)});return await re(e.body,t),n},Sp=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},wp=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Cp(e,t);const n=lt({$metadata:_g(e)});return await re(e.body,t),n},Cp=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},Tp=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Ep(e,t);const n=lt({$metadata:_g(e)});return await re(e.body,t),n},Ep=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},_p=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return xp(e,t);const n=lt({$metadata:_g(e),[fv]:[,e.headers[Zx]],[nv]:[,e.headers[b_]],[Ny]:[,e.headers[Lx]],[Ly]:[,e.headers[jx]],[eb]:[,e.headers[qx]],[tb]:[,e.headers[Bx]],[$T]:[,e.headers[uI]],[VE]:[,e.headers[SI]],[XT]:[,e.headers[fI]],[JT]:[,e.headers[gI]],[tE]:[,e.headers[dI]],[eE]:[,e.headers[hI]],[py]:[()=>void 0!==e.headers[pI],()=>ce(e.headers[pI])],[jC]:[,e.headers[eI]]});return await re(e.body,t),n},xp=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},Rp=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Ip(e,t);const n=lt({$metadata:_g(e),[jC]:[,e.headers[eI]]});return await re(e.body,t),n},Ip=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body);switch(r){case"NoSuchKey":case"com.amazonaws.s3#NoSuchKey":throw await eh(n,t);default:const i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})}},Pp=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Op(e,t);const n=lt({$metadata:_g(e),[jC]:[,e.headers[eI]]});return await re(e.body,t),n},Op=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},Dp=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Ap(e,t);const n=lt({$metadata:_g(e),[jC]:[,e.headers[eI]]});return await re(e.body,t),n},Ap=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},kp=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Np(e,t);const n=lt({$metadata:_g(e),[jC]:[,e.headers[eI]]});return await re(e.body,t),n},Np=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},Lp=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return jp(e,t);const n=lt({$metadata:_g(e),[VE]:[,e.headers[SI]]});return await re(e.body,t),n},jp=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},Mp=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Fp(e,t);const n=lt({$metadata:_g(e)});return await re(e.body,t),n},Fp=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},qp=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Bp(e,t);const n=lt({$metadata:_g(e),[jC]:[,e.headers[eI]],[YC]:[,e.headers[tI]]});return await re(e.body,t),n},Bp=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body);switch(r){case"ObjectAlreadyInActiveTierError":case"com.amazonaws.s3#ObjectAlreadyInActiveTierError":throw await rh(n,t);default:const i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})}},Up=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return zp(e,t);const n=lt({$metadata:_g(e)}),r=e.body;return n.Payload=oh(r,t),n},zp=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},Gp=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Hp(e,t);const n=lt({$metadata:_g(e),[$T]:[,e.headers[uI]],[nv]:[,e.headers[b_]],[Ny]:[,e.headers[Lx]],[Ly]:[,e.headers[jx]],[eb]:[,e.headers[qx]],[tb]:[,e.headers[Bx]],[XT]:[,e.headers[fI]],[JT]:[,e.headers[gI]],[tE]:[,e.headers[dI]],[py]:[()=>void 0!==e.headers[pI],()=>ce(e.headers[pI])],[jC]:[,e.headers[eI]]});return await re(e.body,t),n},Hp=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},Vp=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return $p(e,t);const n=lt({$metadata:_g(e),[db]:[,e.headers[Yx]],[$T]:[,e.headers[uI]],[XT]:[,e.headers[fI]],[JT]:[,e.headers[gI]],[tE]:[,e.headers[dI]],[py]:[()=>void 0!==e.headers[pI],()=>ce(e.headers[pI])],[jC]:[,e.headers[eI]]}),r=ge(await TI(e.body,t));return n.CopyPartResult=Xf(r,t),n},$p=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},Wp=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return Kp(e,t);const n=lt({$metadata:_g(e)});return await re(e.body,t),n},Kp=async(e,t)=>{const n={...e,body:await EI(e.body,t)},r=_I(e,n.body),i=n.body;return Qp({output:e,parsedBody:i,errorCode:r})},Qp=Ke(ro),Xp=async(e,t)=>{const n=lt({}),r=(e.body,new wo({$metadata:_g(e),...n}));return We(r,e.body)},Yp=async(e,t)=>{const n=lt({}),r=(e.body,new Co({$metadata:_g(e),...n}));return We(r,e.body)},Jp=async(e,t)=>{const n=lt({}),r=e.body;null!=r[oy]&&(n[oy]=ye(r[oy])),null!=r[RT]&&(n[RT]=ye(r[RT]));const i=new cs({$metadata:_g(e),...n});return We(i,e.body)},Zp=async(e,t)=>{const n=lt({}),r=(e.body,new Oo({$metadata:_g(e),...n}));return We(r,e.body)},eh=async(e,t)=>{const n=lt({}),r=(e.body,new ls({$metadata:_g(e),...n}));return We(r,e.body)},th=async(e,t)=>{const n=lt({}),r=(e.body,new so({$metadata:_g(e),...n}));return We(r,e.body)},nh=async(e,t)=>{const n=lt({}),r=(e.body,new hs({$metadata:_g(e),...n}));return We(r,e.body)},rh=async(e,t)=>{const n=lt({}),r=(e.body,new ua({$metadata:_g(e),...n}));return We(r,e.body)},ih=async(e,t)=>{const n=lt({}),r=(e.body,new So({$metadata:_g(e),...n}));return We(r,e.body)},oh=(e,t)=>t.eventStreamMarshaller.deserialize(e,(async n=>null!=n.Records?{Records:await lh(n.Records,t)}:null!=n.Stats?{Stats:await uh(n.Stats,t)}:null!=n.Progress?{Progress:await ch(n.Progress,t)}:null!=n.Cont?{Cont:await sh(n.Cont,t)}:null!=n.End?{End:await ah(n.End,t)}:{$unknown:e})),sh=async(e,t)=>{const n={},r=await TI(e.body,t);return Object.assign(n,Kf(r,t)),n},ah=async(e,t)=>{const n={},r=await TI(e.body,t);return Object.assign(n,tm(r,t)),n},ch=async(e,t)=>{const n={},r=await TI(e.body,t);return n.Details=Km(r,t),n},lh=async(e,t)=>{const n={};return n.Payload=e.body,n},uh=async(e,t)=>{const n={},r=await TI(e.body,t);return n.Details=mg(r,t),n},dh=(e,t)=>{const n=new Ks(jg);return null!=e[TT]&&n.c(Ks.of(ly,e[TT]).n(TT)),n},ph=(e,t)=>{const n=new Ks(Ng);return n.lc(e,"Grants","AccessControlList",(()=>Rh(e[kv],t))),null!=e[kw]&&n.c(tf(e[kw],t).n(kw)),n},hh=(e,t)=>{const n=new Ks(Og);return null!=e[Fv]&&n.c(Ks.of(zg,e[Fv]).n(Fv)),null!=e[mv]&&n.c(fh(e[mv],t).n(mv)),null!=e[IT]&&n.c(Rf(e[IT],t).n(IT)),n},fh=(e,t)=>{const n=new Ks(qg);return Do.visit(e,{Prefix:t=>{null!=e[dC]&&n.c(Ks.of(dC,t).n(dC))},Tag:r=>{null!=e[_E]&&n.c(Pf(r,t).n(_E))},And:r=>{null!=e[Ig]&&n.c(((e,t)=>{const n=new Ks(Pg);return n.cc(e,dC),n.l(e,"Tags","Tag",(()=>Df(e[xE],t))),n})(r,t).n(Ig))},_:(e,t)=>{if(!(t instanceof Ks||t instanceof Ws))throw new Error("Unable to serialize unknown union members in XML.");n.c(new Ks(e).c(t))}}),n},mh=(e,t)=>{const n=new Ks(hy);return n.l(e,"Rules","Rule",(()=>qh(e[CT],t))),n},gh=(e,t)=>{const n=new Ks(yy);return null!=e[LS]&&n.c(Uh(e[LS],t).n(LS)),n},yh=(e,t)=>{const n=new Ks(Vy);return n.l(e,"Parts","Part",(()=>bh(e[CC],t))),n},bh=(e,t)=>e.filter((e=>null!=e)).map((e=>{const t=(e=>{const t=new Ks(Xy);return t.cc(e,nv),t.cc(e,Ny),t.cc(e,Ly),t.cc(e,eb),t.cc(e,tb),null!=e[gC]&&t.c(Ks.of(gC,String(e[gC])).n(gC)),t})(e);return t.n(M_)})),vh=(e,t)=>{const n=new Ks($y);return n.l(e,"CORSRules","CORSRule",(()=>Sh(e[Ky],t))),n},Sh=(e,t)=>e.filter((e=>null!=e)).map((e=>((e,t)=>{const n=new Ks(Wy);return n.cc(e,zv),n.l(e,"AllowedHeaders","AllowedHeader",(()=>(e=>e.filter((e=>null!=e)).map((e=>Ks.of(Bg,e).n(M_))))(e[Ug]))),n.l(e,"AllowedMethods","AllowedMethod",(()=>(e=>e.filter((e=>null!=e)).map((e=>Ks.of($g,e).n(M_))))(e[Wg]))),n.l(e,"AllowedOrigins","AllowedOrigin",(()=>(e=>e.filter((e=>null!=e)).map((e=>Ks.of(Kg,e).n(M_))))(e[Qg]))),n.l(e,"ExposeHeaders","ExposeHeader",(()=>_h(e[$b],t))),null!=e[XS]&&n.c(Ks.of(XS,String(e[XS])).n(XS)),n})(e,t).n(M_))),wh=(e,t)=>{const n=new Ks(Ay);return null!=e[NS]&&n.c(Ks.of(fy,e[NS]).n(NS)),null!=e[kS]&&n.c(Bh(e[kS],t).n(kS)),null!=e[ay]&&n.c((e=>{const t=new Ks(dy);return t.cc(e,Db),null!=e[LE]&&t.c(Ks.of(xy,e[LE]).n(LE)),t})(e[ay]).n(ay)),n},Ch=(e,t)=>{const n=new Ks(jb);return n.l(e,"Objects","Object",(()=>Qh(e[uC],t))),null!=e[xC]&&n.c(Ks.of(xC,String(e[xC])).n(xC)),n},Th=(e,t)=>{const n=new Ks(Hb);return n.cc(e,$C),n},Eh=(e,t)=>e.filter((e=>null!=e)).map((e=>Ks.of(dv,e).n(M_))),_h=(e,t)=>e.filter((e=>null!=e)).map((e=>Ks.of(Wb,e).n(M_))),xh=(e,t)=>{const n=new Ks(Nv);return n.cc(e,Ob),n.cc(e,Bb),n.cc(e,zv),n.cc(e,BE),n.a("xsi:type",e[LE]),n},Rh=(e,t)=>e.filter((e=>null!=e)).map((e=>{const t=(e=>{const t=new Ks(xv);if(null!=e[Nv]){const n=xh(e[Nv]).n(Nv);n.a("xmlns:xsi","http://www.w3.org/2001/XMLSchema-instance"),t.c(n)}return t.cc(e,TC),t})(e);return t.n(xv)})),Ih=(e,t)=>{const n=new Ks(sS);return null!=e[ub]&&n.c((e=>{const t=new Ks(pb);return t.cc(e,yv),t.cc(e,Sb),t.cc(e,DC),t.cc(e,GC),t.cc(e,gv),t.cc(e,OC),null!=e[Jg]&&t.c(Ks.of(Jg,String(e[Jg])).n(Jg)),t})(e[ub]).n(ub)),n.cc(e,gb),null!=e[wS]&&n.c(Mh(e[wS],t).n(wS)),null!=e[wC]&&n.c(of(e[wC],t).n(wC)),n},Ph=(e,t)=>{const n=new Ks(pS);return null!=e[Fv]&&n.c(Ks.of(gS,e[Fv]).n(Fv)),null!=e[mv]&&n.c(Oh(e[mv],t).n(mv)),null!=e[TT]&&n.c(Ks.of(yS,e[TT]).n(TT)),n.l(e,"Tierings","Tiering",(()=>Nf(e[IE],t))),n},Oh=(e,t)=>{const n=new Ks(mS);return n.cc(e,dC),null!=e[_E]&&n.c(Pf(e[_E],t).n(_E)),null!=e[Ig]&&n.c(((e,t)=>{const n=new Ks(uS);return n.cc(e,dC),n.l(e,"Tags","Tag",(()=>Df(e[xE],t))),n})(e[Ig],t).n(Ig)),n},Dh=(e,t)=>{const n=new Ks(qv);return null!=e[Mb]&&n.c(Ah(e[Mb],t).n(Mb)),null!=e[Hv]&&n.c(Ks.of(Hv,String(e[Hv])).n(Hv)),null!=e[mv]&&n.c(kh(e[mv],t).n(mv)),null!=e[Fv]&&n.c(Ks.of(Qv,e[Fv]).n(Fv)),null!=e[nS]&&n.c(Ks.of(Xv,e[nS]).n(nS)),n.lc(e,"OptionalFields","OptionalFields",(()=>Nh(e[Fw],t))),null!=e[sE]&&n.c(jh(e[sE],t).n(sE)),n},Ah=(e,t)=>{const n=new Ks(Gv);return null!=e[xT]&&n.c(Lh(e[xT],t).n(xT)),n},kh=(e,t)=>{const n=new Ks($v);return n.cc(e,dC),n},Nh=(e,t)=>e.filter((e=>null!=e)).map((e=>Ks.of(tS,e).n(Tv))),Lh=(e,t)=>{const n=new Ks(aS);return n.cc(e,Hg),null!=e[ay]&&n.c(Ks.of(vy,e[ay]).n(ay)),null!=e[Ev]&&n.c(Ks.of(Wv,e[Ev]).n(Ev)),n.cc(e,dC),null!=e[sv]&&n.c(((e,t)=>{const n=new Ks(Vv);return null!=e[rE]&&n.c(xf(e[rE],t).n(HT)),null!=e[ZT]&&n.c(Ef(e[ZT],t).n(kT)),n})(e[sv],t).n(sv)),n},jh=(e,t)=>{const n=new Ks(cS);return null!=e[_v]&&n.c(Ks.of(Kv,e[_v]).n(_v)),n},Mh=(e,t)=>{const n=new Ks(CS);return null!=e[LE]&&n.c(Ks.of(ES,e[LE]).n(LE)),n},Fh=(e,t)=>{const n=new Ks($S);return Bo.visit(e,{Prefix:t=>{null!=e[dC]&&n.c(Ks.of(dC,t).n(dC))},Tag:r=>{null!=e[_E]&&n.c(Pf(r,t).n(_E))},ObjectSizeGreaterThan:t=>{null!=e[rC]&&n.c(Ks.of(iC,String(t)).n(rC))},ObjectSizeLessThan:t=>{null!=e[oC]&&n.c(Ks.of(sC,String(t)).n(oC))},And:r=>{null!=e[Ig]&&n.c(((e,t)=>{const n=new Ks(VS);return n.cc(e,dC),n.l(e,"Tags","Tag",(()=>Df(e[xE],t))),null!=e[rC]&&n.c(Ks.of(iC,String(e[rC])).n(rC)),null!=e[oC]&&n.c(Ks.of(sC,String(e[oC])).n(oC)),n})(r,t).n(Ig))},_:(e,t)=>{if(!(t instanceof Ks||t instanceof Ws))throw new Error("Unable to serialize unknown union members in XML.");n.c(new Ks(e).c(t))}}),n},qh=(e,t)=>e.filter((e=>null!=e)).map((e=>((e,t)=>{const n=new Ks(HS);return null!=e[fv]&&n.c((e=>{const t=new Ks(jS);return null!=e[Nb]&&t.c(Ks.of(Nb,(e[Nb].toISOString().split(".")[0]+"Z").toString()).n(Nb)),null!=e[kb]&&t.c(Ks.of(kb,String(e[kb])).n(kb)),null!=e[Qb]&&t.c(Ks.of(Qb,String(e[Qb])).n(Qb)),t})(e[fv]).n(fv)),n.cc(e,zv),n.cc(e,dC),null!=e[mv]&&n.c(Fh(e[mv],t).n(mv)),null!=e[TT]&&n.c(Ks.of(Zb,e[TT]).n(TT)),n.l(e,"Transitions","Transition",(()=>jf(e[kE],t))),n.l(e,"NoncurrentVersionTransitions","NoncurrentVersionTransition",(()=>$h(e[Dw],t))),null!=e[Pw]&&n.c(Vh(e[Pw],t).n(Pw)),null!=e[Gg]&&n.c((e=>{const t=new Ks(Gg);return null!=e[Tb]&&t.c(Ks.of(Tb,String(e[Tb])).n(Tb)),t})(e[Gg]).n(Gg)),n})(e,t).n(M_))),Bh=(e,t)=>{const n=new Ks(BS);return null!=e[LE]&&n.c(Ks.of(WS,e[LE]).n(LE)),null!=e[bw]&&n.c(Ks.of(zS,e[bw]).n(bw)),n},Uh=(e,t)=>{const n=new Ks(LS);return n.cc(e,hE),n.lc(e,"TargetGrants","TargetGrants",(()=>Af(e[bE],t))),n.cc(e,wE),null!=e[SE]&&n.c(kf(e[SE],t).n(SE)),n},zh=(e,t)=>{const n=new Ks(fw);return null!=e[TT]&&n.c(Ks.of(dw,e[TT]).n(TT)),null!=e[iv]&&n.c(hf(e[iv],t).n(iv)),n},Gh=(e,t)=>{const n=new Ks(YS);return null!=e[Fv]&&n.c(Ks.of(sw,e[Fv]).n(Fv)),null!=e[mv]&&n.c(Hh(e[mv],t).n(mv)),n},Hh=(e,t)=>{const n=new Ks(rw);return Vo.visit(e,{Prefix:t=>{null!=e[dC]&&n.c(Ks.of(dC,t).n(dC))},Tag:r=>{null!=e[_E]&&n.c(Pf(r,t).n(_E))},AccessPointArn:t=>{null!=e[Yg]&&n.c(Ks.of(Yg,t).n(Yg))},And:r=>{null!=e[Ig]&&n.c(((e,t)=>{const n=new Ks(QS);return n.cc(e,dC),n.l(e,"Tags","Tag",(()=>Df(e[xE],t))),n.cc(e,Yg),n})(r,t).n(Ig))},_:(e,t)=>{if(!(t instanceof Ks||t instanceof Ws))throw new Error("Unable to serialize unknown union members in XML.");n.c(new Ks(e).c(t))}}),n},Vh=(e,t)=>{const n=new Ks(Pw);return null!=e[Cw]&&n.c(Ks.of(kb,String(e[Cw])).n(Cw)),null!=e[xw]&&n.c(Ks.of(GE,String(e[xw])).n(xw)),n},$h=(e,t)=>e.filter((e=>null!=e)).map((e=>{const t=(e=>{const t=new Ks(Aw);return null!=e[Cw]&&t.c(Ks.of(kb,String(e[Cw])).n(Cw)),null!=e[RT]&&t.c(Ks.of(EE,e[RT]).n(RT)),null!=e[xw]&&t.c(Ks.of(GE,String(e[xw])).n(xw)),t})(e);return t.n(M_)})),Wh=(e,t)=>{const n=new Ks(vw);return n.l(e,"TopicConfigurations","TopicConfiguration",(()=>Lf(e[gE],t))),n.l(e,"QueueConfigurations","QueueConfiguration",(()=>af(e[PC],t))),n.l(e,"LambdaFunctionConfigurations","CloudFunctionConfiguration",(()=>((e,t)=>e.filter((e=>null!=e)).map((e=>{const n=((e,t)=>{const n=new Ks(qS);return null!=e[Fv]&&n.c(Ks.of(Tw,e[Fv]).n(Fv)),null!=e[MS]&&n.c(Ks.of(MS,e[MS]).n(qy)),n.l(e,"Events","Event",(()=>Eh(e[pv]))),null!=e[mv]&&n.c(Kh(e[mv],t).n(mv)),n})(e,t);return n.n(M_)})))(e[FS],t))),null!=e[Ub]&&n.c((e[Ub],new Ks(Ub)).n(Ub)),n},Kh=(e,t)=>{const n=new Ks(Sw);return null!=e[_S]&&n.c(yf(e[_S],t).n(MT)),n},Qh=(e,t)=>e.filter((e=>null!=e)).map((e=>{const t=(e=>{const t=new Ks(qw);return null!=e[_S]&&t.c(Ks.of(Bw,e[_S]).n(_S)),null!=e[VE]&&t.c(Ks.of(lC,e[VE]).n(VE)),t})(e);return t.n(M_)})),Xh=(e,t)=>{const n=new Ks(zw);return n.cc(e,Gw),null!=e[wT]&&n.c(Zh(e[wT],t).n(wT)),n},Yh=(e,t)=>{const n=new Ks(Vw);return null!=e[TT]&&n.c(Ks.of($w,e[TT]).n(TT)),n},Jh=(e,t)=>{const n=new Ks(Kw);return null!=e[yw]&&n.c(Ks.of(Qw,e[yw]).n(yw)),null!=e[yT]&&n.c(Ks.of(Nb,(e[yT].toISOString().split(".")[0]+"Z").toString()).n(yT)),n},Zh=(e,t)=>{const n=new Ks(Yw);return null!=e[Ab]&&n.c((e=>{const t=new Ks(Ab);return null!=e[yw]&&t.c(Ks.of(Qw,e[yw]).n(yw)),null!=e[kb]&&t.c(Ks.of(kb,String(e[kb])).n(kb)),null!=e[YE]&&t.c(Ks.of(YE,String(e[YE])).n(YE)),t})(e[Ab]).n(Ab)),n},ef=(e,t)=>{const n=new Ks(nC);return null!=e[ub]&&n.c((e=>{const t=new Ks(hb);return t.cc(e,AC),t.cc(e,DC),t.cc(e,GC),t.cc(e,gv),t.cc(e,OC),t})(e[ub]).n(ub)),null!=e[wS]&&n.c((e=>{const t=new Ks(TS);return t.cc(e,GC),t})(e[wS]).n(wS)),n},tf=(e,t)=>{const n=new Ks(kw);return n.cc(e,Ob),n.cc(e,zv),n},nf=(e,t)=>{const n=new Ks(Lw);return n.l(e,"Rules","Rule",(()=>rf(e[CT],t))),n},rf=(e,t)=>e.filter((e=>null!=e)).map((e=>{const t=(e=>{const t=new Ks(Mw);return t.cc(e,Jw),t})(e);return t.n(M_)})),of=(e,t)=>new Ks(mC),sf=(e,t)=>{const n=new Ks(pC);return null!=e[wy]&&n.c(Ks.of(aE,String(e[wy])).n(wy)),null!=e[iS]&&n.c(Ks.of(aE,String(e[iS])).n(iS)),null!=e[Cy]&&n.c(Ks.of(aE,String(e[Cy])).n(Cy)),null!=e[ZC]&&n.c(Ks.of(aE,String(e[ZC])).n(ZC)),n},af=(e,t)=>e.filter((e=>null!=e)).map((e=>{const n=((e,t)=>{const n=new Ks(IC);return null!=e[Fv]&&n.c(Ks.of(Tw,e[Fv]).n(Fv)),null!=e[RC]&&n.c(Ks.of(RC,e[RC]).n(kC)),n.l(e,"Events","Event",(()=>Eh(e[pv]))),null!=e[mv]&&n.c(Kh(e[mv],t).n(mv)),n})(e,t);return n.n(M_)})),cf=(e,t)=>{const n=new Ks(zC);return n.cc(e,ST),n.l(e,"Rules","Rule",(()=>df(e[CT],t))),n},lf=(e,t)=>{const n=new Ks(aT);return n.cc(e,zv),null!=e[_C]&&n.c(Ks.of(_C,String(e[_C])).n(_C)),n.cc(e,dC),null!=e[mv]&&n.c(uf(e[mv],t).n(mv)),null!=e[TT]&&n.c(Ks.of(oT,e[TT]).n(TT)),null!=e[VT]&&n.c(Tf(e[VT],t).n(VT)),null!=e[Xb]&&n.c((e=>{const t=new Ks(Xb);return null!=e[TT]&&t.c(Ks.of(Yb,e[TT]).n(TT)),t})(e[Xb]).n(Xb)),null!=e[Mb]&&n.c(((e,t)=>{const n=new Ks(Mb);return null!=e[ay]&&n.c(Ks.of(vy,e[ay]).n(ay)),null!=e[sy]&&n.c(Ks.of(Hg,e[sy]).n(sy)),n.cc(e,RT),null!=e[Lg]&&n.c((e=>{const t=new Ks(Lg);return null!=e[kw]&&t.c(Ks.of(eC,e[kw]).n(kw)),t})(e[Lg]).n(Lg)),null!=e[Hb]&&n.c(Th(e[Hb],t).n(Hb)),null!=e[gT]&&n.c(pf(e[gT],t).n(gT)),null!=e[fw]&&n.c(zh(e[fw],t).n(fw)),n})(e[Mb],t).n(Mb)),null!=e[xb]&&n.c((e=>{const t=new Ks(xb);return null!=e[TT]&&t.c(Ks.of(Rb,e[TT]).n(TT)),t})(e[xb]).n(xb)),n},uf=(e,t)=>{const n=new Ks(iT);return Jo.visit(e,{Prefix:t=>{null!=e[dC]&&n.c(Ks.of(dC,t).n(dC))},Tag:r=>{null!=e[_E]&&n.c(Pf(r,t).n(_E))},And:r=>{null!=e[Ig]&&n.c(((e,t)=>{const n=new Ks(rT);return n.cc(e,dC),n.l(e,"Tags","Tag",(()=>Df(e[xE],t))),n})(r,t).n(Ig))},_:(e,t)=>{if(!(t instanceof Ks||t instanceof Ws))throw new Error("Unable to serialize unknown union members in XML.");n.c(new Ks(e).c(t))}}),n},df=(e,t)=>e.filter((e=>null!=e)).map((e=>lf(e,t).n(M_))),pf=(e,t)=>{const n=new Ks(gT);return null!=e[TT]&&n.c(Ks.of(fT,e[TT]).n(TT)),null!=e[OE]&&n.c(hf(e[OE],t).n(OE)),n},hf=(e,t)=>{const n=new Ks(mT);return null!=e[gw]&&n.c(Ks.of(gw,String(e[gw])).n(gw)),n},ff=(e,t)=>{const n=new Ks(eT);return n.cc(e,vC),n},mf=(e,t)=>{const n=new Ks(tT);return null!=e[av]&&n.c(Ks.of(Jb,String(e[av])).n(av)),n},gf=(e,t)=>{const n=new Ks(cT);return null!=e[kb]&&n.c(Ks.of(kb,String(e[kb])).n(kb)),null!=e[Iv]&&n.c((e=>{const t=new Ks(Iv);return t.cc(e,RE),t})(e[Iv]).n(Iv)),null!=e[LE]&&n.c(Ks.of(sT,e[LE]).n(LE)),n.cc(e,RE),n.cc(e,Fb),null!=e[UT]&&n.c(Sf(e[UT],t).n(UT)),null!=e[Uw]&&n.c(((e,t)=>{const n=new Ks(Uw);return null!=e[oE]&&n.c(bf(e[oE],t).n(oE)),n})(e[Uw],t).n(Uw)),n},yf=(e,t)=>{const n=new Ks(jT);return n.l(e,"FilterRules","FilterRule",(()=>(e=>e.filter((e=>null!=e)).map((e=>{const t=(e=>{const t=new Ks(vv);return null!=e[bw]&&t.c(Ks.of(Sv,e[bw]).n(bw)),null!=e[WE]&&t.c(Ks.of(wv,e[WE]).n(WE)),t})(e);return t.n(M_)})))(e[Cv]))),n},bf=(e,t)=>{const n=new Ks(FT);return n.cc(e,vy),null!=e[dC]&&n.c(Ks.of(GS,e[dC]).n(dC)),null!=e[sv]&&n.c((e=>{const t=new Ks(sv);return null!=e[rv]&&t.c(Ks.of($T,e[rv]).n(rv)),null!=e[OS]&&t.c(Ks.of(tE,e[OS]).n(OS)),t.cc(e,PS),t})(e[sv]).n(sv)),null!=e[Dy]&&n.c(Ks.of(jw,e[Dy]).n(Dy)),n.lc(e,"AccessControlList","AccessControlList",(()=>Rh(e[Ag],t))),null!=e[dE]&&n.c(Of(e[dE],t).n(dE)),n.lc(e,"UserMetadata","UserMetadata",(()=>Mf(e[qE],t))),n.cc(e,RT),n},vf=(e,t)=>{const n=new Ks(GT);return null!=e[lE]&&n.c(Ks.of(lE,String(e[lE])).n(lE)),null!=e[cv]&&n.c(Ks.of(cv,String(e[cv])).n(cv)),n},Sf=(e,t)=>{const n=new Ks(UT);return null!=e[sS]&&n.c(Ih(e[sS],t).n(sS)),n.cc(e,ov),n.cc(e,hv),null!=e[nC]&&n.c(ef(e[nC],t).n(nC)),n},wf=(e,t)=>{const n=new Ks(QT);return n.l(e,"Rules","Rule",(()=>Cf(e[CT],t))),n},Cf=(e,t)=>e.filter((e=>null!=e)).map((e=>(e=>{const t=new Ks(nE);return null!=e[iy]&&t.c((e=>{const t=new Ks(KT);return null!=e[WT]&&t.c(Ks.of($T,e[WT]).n(WT)),null!=e[DS]&&t.c(Ks.of(tE,e[DS]).n(DS)),t})(e[iy]).n(iy)),null!=e[py]&&t.c(Ks.of(py,String(e[py])).n(py)),t})(e).n(M_))),Tf=(e,t)=>{const n=new Ks(VT);return null!=e[NT]&&n.c(_f(e[NT],t).n(NT)),null!=e[QC]&&n.c((e=>{const t=new Ks(QC);return null!=e[TT]&&t.c(Ks.of(XC,e[TT]).n(TT)),t})(e[QC]).n(QC)),n},Ef=(e,t)=>{const n=new Ks(kT);return null!=e[RS]&&n.c(Ks.of(tE,e[RS]).n(RS)),n},_f=(e,t)=>{const n=new Ks(NT);return null!=e[TT]&&n.c(Ks.of(LT,e[TT]).n(TT)),n},xf=(e,t)=>new Ks(HT),Rf=(e,t)=>{const n=new Ks(IT);return null!=e[Eb]&&n.c(If(e[Eb],t).n(Eb)),n},If=(e,t)=>{const n=new Ks(PT);return null!=e[aC]&&n.c(Ks.of(OT,e[aC]).n(aC)),null!=e[Mb]&&n.c((e=>{const t=new Ks(Fg);return null!=e[xT]&&t.c((e=>{const t=new Ks(ny);return null!=e[Ev]&&t.c(Ks.of(ry,e[Ev]).n(Ev)),null!=e[cy]&&t.c(Ks.of(Hg,e[cy]).n(cy)),null!=e[ay]&&t.c(Ks.of(vy,e[ay]).n(ay)),t.cc(e,dC),t})(e[xT]).n(xT)),t})(e[Mb]).n(Mb)),n},Pf=(e,t)=>{const n=new Ks(_E);return null!=e[_S]&&n.c(Ks.of(Bw,e[_S]).n(_S)),n.cc(e,WE),n},Of=(e,t)=>{const n=new Ks(dE);return n.lc(e,"TagSet","TagSet",(()=>Df(e[TE],t))),n},Df=(e,t)=>e.filter((e=>null!=e)).map((e=>Pf(e,t).n(_E))),Af=(e,t)=>e.filter((e=>null!=e)).map((e=>{const t=(e=>{const t=new Ks(vE);if(null!=e[Nv]){const n=xh(e[Nv]).n(Nv);n.a("xmlns:xsi","http://www.w3.org/2001/XMLSchema-instance"),t.c(n)}return null!=e[TC]&&t.c(Ks.of(gy,e[TC]).n(TC)),t})(e);return t.n(xv)})),kf=(e,t)=>{const n=new Ks(SE);return null!=e[zT]&&n.c((e[zT],new Ks(zT)).n(zT)),null!=e[bC]&&n.c((e=>{const t=new Ks(bC);return t.cc(e,fC),t})(e[bC]).n(bC)),n},Nf=(e,t)=>e.filter((e=>null!=e)).map((e=>{const t=(e=>{const t=new Ks(PE);return null!=e[kb]&&t.c(Ks.of(fS,String(e[kb])).n(kb)),null!=e[oy]&&t.c(Ks.of(dS,e[oy]).n(oy)),t})(e);return t.n(M_)})),Lf=(e,t)=>e.filter((e=>null!=e)).map((e=>{const n=((e,t)=>{const n=new Ks(mE);return null!=e[Fv]&&n.c(Ks.of(Tw,e[Fv]).n(Fv)),null!=e[pE]&&n.c(Ks.of(pE,e[pE]).n(AE)),n.l(e,"Events","Event",(()=>Eh(e[pv]))),null!=e[mv]&&n.c(Kh(e[mv],t).n(mv)),n})(e,t);return n.n(M_)})),jf=(e,t)=>e.filter((e=>null!=e)).map((e=>{const t=(e=>{const t=new Ks(NE);return null!=e[Nb]&&t.c(Ks.of(Nb,(e[Nb].toISOString().split(".")[0]+"Z").toString()).n(Nb)),null!=e[kb]&&t.c(Ks.of(kb,String(e[kb])).n(kb)),null!=e[RT]&&t.c(Ks.of(EE,e[RT]).n(RT)),t})(e);return t.n(M_)})),Mf=(e,t)=>e.filter((e=>null!=e)).map((e=>{const t=(e=>{const t=new Ks(nw);return null!=e[bw]&&t.c(Ks.of(cw,e[bw]).n(bw)),null!=e[WE]&&t.c(Ks.of(hw,e[WE]).n(WE)),t})(e);return t.n(nw)})),Ff=(e,t)=>{const n=new Ks(HE);return null!=e[ow]&&n.c(Ks.of(ow,e[ow]).n(tw)),null!=e[TT]&&n.c(Ks.of(Ry,e[TT]).n(TT)),n},qf=(e,t)=>{const n=new Ks(QE);return null!=e[Vb]&&n.c((e=>{const t=new Ks(Vb);return null!=e[_S]&&t.c(Ks.of(Bw,e[_S]).n(_S)),t})(e[Vb]).n(Vb)),null!=e[Uv]&&n.c((e=>{const t=new Ks(Uv);return t.cc(e,uE),t})(e[Uv]).n(Uv)),null!=e[LC]&&n.c((e=>{const t=new Ks(LC);return t.cc(e,jv),t.cc(e,EC),t})(e[LC]).n(LC)),n.lc(e,"RoutingRules","RoutingRules",(()=>(e=>e.filter((e=>null!=e)).map((e=>(e=>{const t=new Ks(uT);return null!=e[wb]&&t.c((e=>{const t=new Ks(wb);return t.cc(e,Lv),t.cc(e,AS),t})(e[wb]).n(wb)),null!=e[vT]&&t.c((e=>{const t=new Ks(vT);return t.cc(e,jv),t.cc(e,Mv),t.cc(e,EC),t.cc(e,WC),t.cc(e,KC),t})(e[vT]).n(vT)),t})(e).n(uT))))(e[lT]))),n},Bf=(e,t)=>{const n={};return null!=e[dC]&&(n[dC]=ye(e[dC])),""===e.Tag?n[xE]=[]:null!=e[_E]&&(n[xE]=vg(st(e[_E]),t)),n},Uf=(e,t)=>{const n={};return null!=e[Fv]&&(n[Fv]=ye(e[Fv])),""===e.Filter||null!=e[mv]&&(n[mv]=Gf(be(e[mv]),t)),null!=e[IT]&&(n[IT]=gg(e[IT],t)),n},zf=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>Uf(e,t))),Gf=(e,t)=>null!=e[dC]?{Prefix:ye(e[dC])}:null!=e[_E]?{Tag:bg(e[_E],t)}:null!=e[Ig]?{And:Bf(e[Ig],t)}:{$unknown:Object.entries(e)[0]},Hf=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>(e=>{const t={};return null!=e[bw]&&(t[bw]=ye(e[bw])),null!=e[My]&&(t[My]=me(Oe(e[My]))),t})(e))),Vf=(e,t)=>{const n={};return null!=e[Ny]&&(n[Ny]=ye(e[Ny])),null!=e[Ly]&&(n[Ly]=ye(e[Ly])),null!=e[eb]&&(n[eb]=ye(e[eb])),null!=e[tb]&&(n[tb]=ye(e[tb])),n},$f=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>ye(e))),Wf=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>(e=>{const t={};return null!=e[dC]&&(t[dC]=ye(e[dC])),t})(e))),Kf=(e,t)=>({}),Qf=(e,t)=>{const n={};return null!=e[nv]&&(n[nv]=ye(e[nv])),null!=e[US]&&(n[US]=me(Oe(e[US]))),null!=e[Ny]&&(n[Ny]=ye(e[Ny])),null!=e[Ly]&&(n[Ly]=ye(e[Ly])),null!=e[eb]&&(n[eb]=ye(e[eb])),null!=e[tb]&&(n[tb]=ye(e[tb])),n},Xf=(e,t)=>{const n={};return null!=e[nv]&&(n[nv]=ye(e[nv])),null!=e[US]&&(n[US]=me(Oe(e[US]))),null!=e[Ny]&&(n[Ny]=ye(e[Ny])),null!=e[Ly]&&(n[Ly]=ye(e[Ly])),null!=e[eb]&&(n[eb]=ye(e[eb])),null!=e[tb]&&(n[tb]=ye(e[tb])),n},Yf=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>((e,t)=>{const n={};return null!=e[zv]&&(n[zv]=ye(e[zv])),""===e.AllowedHeader?n[Ug]=[]:null!=e[Bg]&&(n[Ug]=(e=>(e||[]).filter((e=>null!=e)).map((e=>ye(e))))(st(e[Bg]))),""===e.AllowedMethod?n[Wg]=[]:null!=e[$g]&&(n[Wg]=(e=>(e||[]).filter((e=>null!=e)).map((e=>ye(e))))(st(e[$g]))),""===e.AllowedOrigin?n[Qg]=[]:null!=e[Kg]&&(n[Qg]=(e=>(e||[]).filter((e=>null!=e)).map((e=>ye(e))))(st(e[Kg]))),""===e.ExposeHeader?n[$b]=[]:null!=e[Wb]&&(n[$b]=sm(st(e[Wb]),t)),null!=e[XS]&&(n[XS]=Ce(e[XS])),n})(e,t))),Jf=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>(e=>{const t={};return null!=e[_S]&&(t[_S]=ye(e[_S])),null!=e[VE]&&(t[VE]=ye(e[VE])),null!=e[_b]&&(t[_b]=ce(e[_b])),null!=e[Ib]&&(t[Ib]=ye(e[Ib])),t})(e))),Zf=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>((e,t)=>{const n={};return null!=e[kw]&&(n[kw]=zm(e[kw],t)),null!=e[_S]&&(n[_S]=ye(e[_S])),null!=e[VE]&&(n[VE]=ye(e[VE])),null!=e[Yv]&&(n[Yv]=ce(e[Yv])),null!=e[US]&&(n[US]=me(Oe(e[US]))),n})(e,t))),em=(e,t)=>{const n={};return null!=e[$C]&&(n[$C]=ye(e[$C])),n},tm=(e,t)=>({}),nm=(e,t)=>{const n={};return null!=e[_S]&&(n[_S]=ye(e[_S])),n},rm=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>(e=>{const t={};return null!=e[_S]&&(t[_S]=ye(e[_S])),null!=e[VE]&&(t[VE]=ye(e[VE])),null!=e[vb]&&(t[vb]=ye(e[vb])),null!=e[mw]&&(t[mw]=ye(e[mw])),t})(e))),im=(e,t)=>({}),om=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>ye(e))),sm=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>ye(e))),am=(e,t)=>{const n={};return null!=e[hC]&&(n[CE]=Ce(e[hC])),null!=e[yC]&&(n[yC]=ye(e[yC])),null!=e[Rw]&&(n[Rw]=ye(e[Rw])),null!=e[uw]&&(n[uw]=Ce(e[uw])),null!=e[lS]&&(n[lS]=ce(e[lS])),""===e.Part?n[CC]=[]:null!=e[SC]&&(n[CC]=$m(st(e[SC]),t)),n},cm=(e,t)=>{const n={};return null!=e[Ob]&&(n[Ob]=ye(e[Ob])),null!=e[Bb]&&(n[Bb]=ye(e[Bb])),null!=e[zv]&&(n[zv]=ye(e[zv])),null!=e[BE]&&(n[BE]=ye(e[BE])),null!=e[Cx]&&(n[LE]=ye(e[Cx])),n},lm=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>(e=>{const t={};return null!=e[Nv]&&(t[Nv]=cm(e[Nv])),null!=e[TC]&&(t[TC]=ye(e[TC])),t})(e))),um=(e,t)=>{const n={};return null!=e[uE]&&(n[uE]=ye(e[uE])),n},dm=(e,t)=>{const n={};return null!=e[zv]&&(n[zv]=ye(e[zv])),null!=e[Ob]&&(n[Ob]=ye(e[Ob])),n},pm=(e,t)=>{const n={};return null!=e[Fv]&&(n[Fv]=ye(e[Fv])),null!=e[mv]&&(n[mv]=fm(e[mv],t)),null!=e[TT]&&(n[TT]=ye(e[TT])),""===e.Tiering?n[IE]=[]:null!=e[PE]&&(n[IE]=Cg(st(e[PE]),t)),n},hm=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>pm(e,t))),fm=(e,t)=>{const n={};return null!=e[dC]&&(n[dC]=ye(e[dC])),null!=e[_E]&&(n[_E]=bg(e[_E],t)),null!=e[Ig]&&(n[Ig]=((e,t)=>{const n={};return null!=e[dC]&&(n[dC]=ye(e[dC])),""===e.Tag?n[xE]=[]:null!=e[_E]&&(n[xE]=vg(st(e[_E]),t)),n})(e[Ig],t)),n},mm=(e,t)=>{const n={};return null!=e[Mb]&&(n[Mb]=ym(e[Mb],t)),null!=e[Hv]&&(n[Hv]=ce(e[Hv])),null!=e[mv]&&(n[mv]=bm(e[mv],t)),null!=e[Fv]&&(n[Fv]=ye(e[Fv])),null!=e[nS]&&(n[nS]=ye(e[nS])),""===e.OptionalFields?n[Fw]=[]:null!=e[Fw]&&null!=e[Fw][Tv]&&(n[Fw]=vm(st(e[Fw][Tv]),t)),null!=e[sE]&&(n[sE]=wm(e[sE],t)),n},gm=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>mm(e,t))),ym=(e,t)=>{const n={};return null!=e[xT]&&(n[xT]=Sm(e[xT],t)),n},bm=(e,t)=>{const n={};return null!=e[dC]&&(n[dC]=ye(e[dC])),n},vm=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>ye(e))),Sm=(e,t)=>{const n={};return null!=e[Hg]&&(n[Hg]=ye(e[Hg])),null!=e[ay]&&(n[ay]=ye(e[ay])),null!=e[Ev]&&(n[Ev]=ye(e[Ev])),null!=e[dC]&&(n[dC]=ye(e[dC])),null!=e[sv]&&(n[sv]=((e,t)=>{const n={};return null!=e[HT]&&(n[rE]=fg(e[HT],t)),null!=e[kT]&&(n[ZT]=pg(e[kT],t)),n})(e[sv],t)),n},wm=(e,t)=>{const n={};return null!=e[_v]&&(n[_v]=ye(e[_v])),n},Cm=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>((e,t)=>{const n={};return null!=e[Fv]&&(n[Fv]=ye(e[Fv])),null!=e[qy]&&(n[MS]=ye(e[qy])),""===e.Event?n[pv]=[]:null!=e[dv]&&(n[pv]=om(st(e[dv]))),null!=e[mv]&&(n[mv]=Lm(e[mv],t)),n})(e,t))),Tm=(e,t)=>{const n={};return null!=e[dC]&&(n[dC]=ye(e[dC])),""===e.Tag?n[xE]=[]:null!=e[_E]&&(n[xE]=vg(st(e[_E]),t)),null!=e[rC]&&(n[rC]=we(e[rC])),null!=e[oC]&&(n[oC]=we(e[oC])),n},Em=(e,t)=>null!=e[dC]?{Prefix:ye(e[dC])}:null!=e[_E]?{Tag:bg(e[_E],t)}:null!=e[rC]?{ObjectSizeGreaterThan:we(e[rC])}:null!=e[oC]?{ObjectSizeLessThan:we(e[oC])}:null!=e[Ig]?{And:Tm(e[Ig],t)}:{$unknown:Object.entries(e)[0]},_m=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>((e,t)=>{const n={};return null!=e[fv]&&(n[fv]=(e=>{const t={};return null!=e[Nb]&&(t[Nb]=me(Oe(e[Nb]))),null!=e[kb]&&(t[kb]=Ce(e[kb])),null!=e[Qb]&&(t[Qb]=ce(e[Qb])),t})(e[fv])),null!=e[zv]&&(n[zv]=ye(e[zv])),null!=e[dC]&&(n[dC]=ye(e[dC])),""===e.Filter||null!=e[mv]&&(n[mv]=Em(be(e[mv]),t)),null!=e[TT]&&(n[TT]=ye(e[TT])),""===e.Transition?n[kE]=[]:null!=e[NE]&&(n[kE]=Eg(st(e[NE]),t)),""===e.NoncurrentVersionTransition?n[Dw]=[]:null!=e[Aw]&&(n[Dw]=Nm(st(e[Aw]),t)),null!=e[Pw]&&(n[Pw]=km(e[Pw],t)),null!=e[Gg]&&(n[Gg]=(e=>{const t={};return null!=e[Tb]&&(t[Tb]=Ce(e[Tb])),t})(e[Gg])),n})(e,t))),xm=(e,t)=>{const n={};return null!=e[hE]&&(n[hE]=ye(e[hE])),""===e.TargetGrants?n[bE]=[]:null!=e[bE]&&null!=e[bE][xv]&&(n[bE]=Sg(st(e[bE][xv]),t)),null!=e[wE]&&(n[wE]=ye(e[wE])),null!=e[SE]&&(n[SE]=wg(e[SE],t)),n},Rm=(e,t)=>{const n={};return null!=e[TT]&&(n[TT]=ye(e[TT])),null!=e[iv]&&(n[iv]=ig(e[iv],t)),n},Im=(e,t)=>{const n={};return null!=e[dC]&&(n[dC]=ye(e[dC])),""===e.Tag?n[xE]=[]:null!=e[_E]&&(n[xE]=vg(st(e[_E]),t)),null!=e[Yg]&&(n[Yg]=ye(e[Yg])),n},Pm=(e,t)=>{const n={};return null!=e[Fv]&&(n[Fv]=ye(e[Fv])),""===e.Filter||null!=e[mv]&&(n[mv]=Dm(be(e[mv]),t)),n},Om=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>Pm(e,t))),Dm=(e,t)=>null!=e[dC]?{Prefix:ye(e[dC])}:null!=e[_E]?{Tag:bg(e[_E],t)}:null!=e[Yg]?{AccessPointArn:ye(e[Yg])}:null!=e[Ig]?{And:Im(e[Ig],t)}:{$unknown:Object.entries(e)[0]},Am=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>((e,t)=>{const n={};return null!=e[ME]&&(n[ME]=ye(e[ME])),null!=e[_S]&&(n[_S]=ye(e[_S])),null!=e[SS]&&(n[SS]=me(Oe(e[SS]))),null!=e[RT]&&(n[RT]=ye(e[RT])),null!=e[kw]&&(n[kw]=zm(e[kw],t)),null!=e[vS]&&(n[vS]=dm(e[vS],t)),null!=e[Oy]&&(n[Oy]=ye(e[Oy])),n})(e,t))),km=(e,t)=>{const n={};return null!=e[Cw]&&(n[Cw]=Ce(e[Cw])),null!=e[xw]&&(n[xw]=Ce(e[xw])),n},Nm=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>(e=>{const t={};return null!=e[Cw]&&(t[Cw]=Ce(e[Cw])),null!=e[RT]&&(t[RT]=ye(e[RT])),null!=e[xw]&&(t[xw]=Ce(e[xw])),t})(e))),Lm=(e,t)=>{const n={};return null!=e[MT]&&(n[_S]=ag(e[MT],t)),n},jm=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>((e,t)=>{const n={};return null!=e[_S]&&(n[_S]=ye(e[_S])),null!=e[US]&&(n[US]=me(Oe(e[US]))),null!=e[nv]&&(n[nv]=ye(e[nv])),""===e.ChecksumAlgorithm?n[Oy]=[]:null!=e[Oy]&&(n[Oy]=$f(st(e[Oy]))),null!=e[cE]&&(n[cE]=we(e[cE])),null!=e[RT]&&(n[RT]=ye(e[RT])),null!=e[kw]&&(n[kw]=zm(e[kw],t)),null!=e[pT]&&(n[pT]=og(e[pT],t)),n})(e,t))),Mm=(e,t)=>{const n={};return null!=e[Gw]&&(n[Gw]=ye(e[Gw])),null!=e[wT]&&(n[wT]=Bm(e[wT],t)),n},Fm=(e,t)=>{const n={};return null!=e[TT]&&(n[TT]=ye(e[TT])),n},qm=(e,t)=>{const n={};return null!=e[yw]&&(n[yw]=ye(e[yw])),null!=e[yT]&&(n[yT]=me(Oe(e[yT]))),n},Bm=(e,t)=>{const n={};return null!=e[Ab]&&(n[Ab]=(e=>{const t={};return null!=e[yw]&&(t[yw]=ye(e[yw])),null!=e[kb]&&(t[kb]=Ce(e[kb])),null!=e[YE]&&(t[YE]=Ce(e[YE])),t})(e[Ab])),n},Um=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>((e,t)=>{const n={};return null!=e[nv]&&(n[nv]=ye(e[nv])),""===e.ChecksumAlgorithm?n[Oy]=[]:null!=e[Oy]&&(n[Oy]=$f(st(e[Oy]))),null!=e[cE]&&(n[cE]=we(e[cE])),null!=e[RT]&&(n[RT]=ye(e[RT])),null!=e[_S]&&(n[_S]=ye(e[_S])),null!=e[VE]&&(n[VE]=ye(e[VE])),null!=e[Yv]&&(n[Yv]=ce(e[Yv])),null!=e[US]&&(n[US]=me(Oe(e[US]))),null!=e[kw]&&(n[kw]=zm(e[kw],t)),null!=e[pT]&&(n[pT]=og(e[pT],t)),n})(e,t))),zm=(e,t)=>{const n={};return null!=e[Ob]&&(n[Ob]=ye(e[Ob])),null!=e[zv]&&(n[zv]=ye(e[zv])),n},Gm=(e,t)=>{const n={};return""===e.Rule?n[CT]=[]:null!=e[wT]&&(n[CT]=Hm(st(e[wT]),t)),n},Hm=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>(e=>{const t={};return null!=e[Jw]&&(t[Jw]=ye(e[Jw])),t})(e))),Vm=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>(e=>{const t={};return null!=e[gC]&&(t[gC]=Ce(e[gC])),null!=e[US]&&(t[US]=me(Oe(e[US]))),null!=e[nv]&&(t[nv]=ye(e[nv])),null!=e[cE]&&(t[cE]=we(e[cE])),null!=e[Ny]&&(t[Ny]=ye(e[Ny])),null!=e[Ly]&&(t[Ly]=ye(e[Ly])),null!=e[eb]&&(t[eb]=ye(e[eb])),null!=e[tb]&&(t[tb]=ye(e[tb])),t})(e))),$m=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>(e=>{const t={};return null!=e[gC]&&(t[gC]=Ce(e[gC])),null!=e[cE]&&(t[cE]=we(e[cE])),null!=e[Ny]&&(t[Ny]=ye(e[Ny])),null!=e[Ly]&&(t[Ly]=ye(e[Ly])),null!=e[eb]&&(t[eb]=ye(e[eb])),null!=e[tb]&&(t[tb]=ye(e[tb])),t})(e))),Wm=(e,t)=>{const n={};return null!=e[rS]&&(n[rS]=ce(e[rS])),n},Km=(e,t)=>{const n={};return null!=e[_y]&&(n[_y]=we(e[_y])),null!=e[Sy]&&(n[Sy]=we(e[Sy])),null!=e[Ey]&&(n[Ey]=we(e[Ey])),n},Qm=(e,t)=>{const n={};return null!=e[wy]&&(n[wy]=ce(e[wy])),null!=e[iS]&&(n[iS]=ce(e[iS])),null!=e[Cy]&&(n[Cy]=ce(e[Cy])),null!=e[ZC]&&(n[ZC]=ce(e[ZC])),n},Xm=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>((e,t)=>{const n={};return null!=e[Fv]&&(n[Fv]=ye(e[Fv])),null!=e[kC]&&(n[RC]=ye(e[kC])),""===e.Event?n[pv]=[]:null!=e[dv]&&(n[pv]=om(st(e[dv]))),null!=e[mv]&&(n[mv]=Lm(e[mv],t)),n})(e,t))),Ym=(e,t)=>{const n={};return null!=e[jv]&&(n[jv]=ye(e[jv])),null!=e[EC]&&(n[EC]=ye(e[EC])),n},Jm=(e,t)=>{const n={};return null!=e[ST]&&(n[ST]=ye(e[ST])),""===e.Rule?n[CT]=[]:null!=e[wT]&&(n[CT]=ng(st(e[wT]),t)),n},Zm=(e,t)=>{const n={};return null!=e[zv]&&(n[zv]=ye(e[zv])),null!=e[_C]&&(n[_C]=Ce(e[_C])),null!=e[dC]&&(n[dC]=ye(e[dC])),""===e.Filter||null!=e[mv]&&(n[mv]=tg(be(e[mv]),t)),null!=e[TT]&&(n[TT]=ye(e[TT])),null!=e[VT]&&(n[VT]=dg(e[VT],t)),null!=e[Xb]&&(n[Xb]=(e=>{const t={};return null!=e[TT]&&(t[TT]=ye(e[TT])),t})(e[Xb])),null!=e[Mb]&&(n[Mb]=((e,t)=>{const n={};return null!=e[ay]&&(n[ay]=ye(e[ay])),null!=e[sy]&&(n[sy]=ye(e[sy])),null!=e[RT]&&(n[RT]=ye(e[RT])),null!=e[Lg]&&(n[Lg]=(e=>{const t={};return null!=e[kw]&&(t[kw]=ye(e[kw])),t})(e[Lg])),null!=e[Hb]&&(n[Hb]=em(e[Hb],t)),null!=e[gT]&&(n[gT]=rg(e[gT],t)),null!=e[fw]&&(n[fw]=Rm(e[fw],t)),n})(e[Mb],t)),null!=e[xb]&&(n[xb]=(e=>{const t={};return null!=e[TT]&&(t[TT]=ye(e[TT])),t})(e[xb])),n},eg=(e,t)=>{const n={};return null!=e[dC]&&(n[dC]=ye(e[dC])),""===e.Tag?n[xE]=[]:null!=e[_E]&&(n[xE]=vg(st(e[_E]),t)),n},tg=(e,t)=>null!=e[dC]?{Prefix:ye(e[dC])}:null!=e[_E]?{Tag:bg(e[_E],t)}:null!=e[Ig]?{And:eg(e[Ig],t)}:{$unknown:Object.entries(e)[0]},ng=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>Zm(e,t))),rg=(e,t)=>{const n={};return null!=e[TT]&&(n[TT]=ye(e[TT])),null!=e[OE]&&(n[OE]=ig(e[OE],t)),n},ig=(e,t)=>{const n={};return null!=e[gw]&&(n[gw]=Ce(e[gw])),n},og=(e,t)=>{const n={};return null!=e[oS]&&(n[oS]=ce(e[oS])),null!=e[VC]&&(n[VC]=me(Oe(e[VC]))),n},sg=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>(e=>{const t={};return null!=e[wb]&&(t[wb]=(e=>{const t={};return null!=e[Lv]&&(t[Lv]=ye(e[Lv])),null!=e[AS]&&(t[AS]=ye(e[AS])),t})(e[wb])),null!=e[vT]&&(t[vT]=(e=>{const t={};return null!=e[jv]&&(t[jv]=ye(e[jv])),null!=e[Mv]&&(t[Mv]=ye(e[Mv])),null!=e[EC]&&(t[EC]=ye(e[EC])),null!=e[WC]&&(t[WC]=ye(e[WC])),null!=e[KC]&&(t[KC]=ye(e[KC])),t})(e[vT])),t})(e))),ag=(e,t)=>{const n={};return""===e.FilterRule?n[Cv]=[]:null!=e[vv]&&(n[Cv]=(e=>(e||[]).filter((e=>null!=e)).map((e=>(e=>{const t={};return null!=e[bw]&&(t[bw]=ye(e[bw])),null!=e[WE]&&(t[WE]=ye(e[WE])),t})(e))))(st(e[vv]))),n},cg=(e,t)=>{const n={};return""===e.Rule?n[CT]=[]:null!=e[wT]&&(n[CT]=lg(st(e[wT]),t)),n},lg=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>(e=>{const t={};return null!=e[iy]&&(t[iy]=(e=>{const t={};return null!=e[WT]&&(t[WT]=ye(e[WT])),null!=e[DS]&&(t[DS]=ye(e[DS])),t})(e[iy])),null!=e[py]&&(t[py]=ce(e[py])),t})(e))),ug=(e,t)=>{const n={};return null!=e[Vg]&&(n[Vg]=ye(e[Vg])),null!=e[_T]&&(n[_T]=ye(e[_T])),null!=e[iE]&&(n[iE]=ye(e[iE])),null!=e[fv]&&(n[fv]=me(Oe(e[fv]))),n},dg=(e,t)=>{const n={};return null!=e[NT]&&(n[NT]=hg(e[NT],t)),null!=e[QC]&&(n[QC]=(e=>{const t={};return null!=e[TT]&&(t[TT]=ye(e[TT])),t})(e[QC])),n},pg=(e,t)=>{const n={};return null!=e[RS]&&(n[RS]=ye(e[RS])),n},hg=(e,t)=>{const n={};return null!=e[TT]&&(n[TT]=ye(e[TT])),n},fg=(e,t)=>({}),mg=(e,t)=>{const n={};return null!=e[_y]&&(n[_y]=we(e[_y])),null!=e[Sy]&&(n[Sy]=we(e[Sy])),null!=e[Ey]&&(n[Ey]=we(e[Ey])),n},gg=(e,t)=>{const n={};return null!=e[Eb]&&(n[Eb]=yg(e[Eb],t)),n},yg=(e,t)=>{const n={};return null!=e[aC]&&(n[aC]=ye(e[aC])),null!=e[Mb]&&(n[Mb]=(e=>{const t={};return null!=e[xT]&&(t[xT]=(e=>{const t={};return null!=e[Ev]&&(t[Ev]=ye(e[Ev])),null!=e[cy]&&(t[cy]=ye(e[cy])),null!=e[ay]&&(t[ay]=ye(e[ay])),null!=e[dC]&&(t[dC]=ye(e[dC])),t})(e[xT])),t})(e[Mb])),n},bg=(e,t)=>{const n={};return null!=e[_S]&&(n[_S]=ye(e[_S])),null!=e[WE]&&(n[WE]=ye(e[WE])),n},vg=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>bg(e,t))),Sg=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>(e=>{const t={};return null!=e[Nv]&&(t[Nv]=cm(e[Nv])),null!=e[TC]&&(t[TC]=ye(e[TC])),t})(e))),wg=(e,t)=>{const n={};return null!=e[zT]&&(n[zT]=(e[zT],{})),null!=e[bC]&&(n[bC]=(e=>{const t={};return null!=e[fC]&&(t[fC]=ye(e[fC])),t})(e[bC])),n},Cg=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>(e=>{const t={};return null!=e[kb]&&(t[kb]=Ce(e[kb])),null!=e[oy]&&(t[oy]=ye(e[oy])),t})(e))),Tg=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>((e,t)=>{const n={};return null!=e[Fv]&&(n[Fv]=ye(e[Fv])),null!=e[AE]&&(n[pE]=ye(e[AE])),""===e.Event?n[pv]=[]:null!=e[dv]&&(n[pv]=om(st(e[dv]))),null!=e[mv]&&(n[mv]=Lm(e[mv],t)),n})(e,t))),Eg=(e,t)=>(e||[]).filter((e=>null!=e)).map((e=>(e=>{const t={};return null!=e[Nb]&&(t[Nb]=me(Oe(e[Nb]))),null!=e[kb]&&(t[kb]=Ce(e[kb])),null!=e[RT]&&(t[RT]=ye(e[RT])),t})(e))),_g=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),xg=(e,t)=>re(e,t).then((e=>t.utf8Encoder(e))),Rg=e=>!(null==e||""===e||Object.getOwnPropertyNames(e).includes("length")&&0==e.length||Object.getOwnPropertyNames(e).includes("size")&&0==e.size),Ig="And",Pg="AnalyticsAndOperator",Og="AnalyticsConfiguration",Dg="ACL",Ag="AccessControlList",kg="AnalyticsConfigurationList",Ng="AccessControlPolicy",Lg="AccessControlTranslation",jg="AccelerateConfiguration",Mg="AbortDate",Fg="AnalyticsExportDestination",qg="AnalyticsFilter",Bg="AllowedHeader",Ug="AllowedHeaders",zg="AnalyticsId",Gg="AbortIncompleteMultipartUpload",Hg="AccountId",Vg="AccessKeyId",$g="AllowedMethod",Wg="AllowedMethods",Kg="AllowedOrigin",Qg="AllowedOrigins",Xg="AccessPointAlias",Yg="AccessPointArn",Jg="AllowQuotedRecordDelimiter",Zg="AcceptRanges",ey="AbortRuleId",ty="ArchiveStatus",ny="AnalyticsS3BucketDestination",ry="AnalyticsS3ExportFileFormat",iy="ApplyServerSideEncryptionByDefault",oy="AccessTier",sy="Account",ay="Bucket",cy="BucketAccountId",ly="BucketAccelerateStatus",uy="BypassGovernanceRetention",dy="BucketInfo",py="BucketKeyEnabled",hy="BucketLifecycleConfiguration",fy="BucketLocationConstraint",my="BucketLocationName",gy="BucketLogsPermission",yy="BucketLoggingStatus",by="BucketLocationType",vy="BucketName",Sy="BytesProcessed",wy="BlockPublicAcls",Cy="BlockPublicPolicy",Ty="BucketRegion",Ey="BytesReturned",_y="BytesScanned",xy="BucketType",Ry="BucketVersioningStatus",Iy="Buckets",Py="Credentials",Oy="ChecksumAlgorithm",Dy="CannedACL",Ay="CreateBucketConfiguration",ky="CacheControl",Ny="ChecksumCRC32",Ly="ChecksumCRC32C",jy="ContentDisposition",My="CreationDate",Fy="ContentEncoding",qy="CloudFunction",By="CloudFunctionConfiguration",Uy="ContentLanguage",zy="ContentLength",Gy="ChecksumMode",Hy="ContentMD5",Vy="CompletedMultipartUpload",$y="CORSConfiguration",Wy="CORSRule",Ky="CORSRules",Qy="CommonPrefixes",Xy="CompletedPart",Yy="ContentRange",Jy="ConfirmRemoveSelfBucketAccess",Zy="CopySource",eb="ChecksumSHA1",tb="ChecksumSHA256",nb="CopySourceIfMatch",rb="CopySourceIfModifiedSince",ib="CopySourceIfNoneMatch",ob="CopySourceIfUnmodifiedSince",sb="CopySourceRange",ab="CopySourceSSECustomerAlgorithm",cb="CopySourceSSECustomerKey",lb="CopySourceSSECustomerKeyMD5",ub="CSV",db="CopySourceVersionId",pb="CSVInput",hb="CSVOutput",fb="ContentType",mb="ContinuationToken",gb="CompressionType",yb="Checksum",bb="Contents",vb="Code",Sb="Comments",wb="Condition",Cb="Delimiter",Tb="DaysAfterInitiation",Eb="DataExport",_b="DeleteMarker",xb="DeleteMarkerReplication",Rb="DeleteMarkerReplicationStatus",Ib="DeleteMarkerVersionId",Pb="DeleteMarkers",Ob="DisplayName",Db="DataRedundancy",Ab="DefaultRetention",kb="Days",Nb="Date",Lb="Deleted",jb="Delete",Mb="Destination",Fb="Description",qb="Expires",Bb="EmailAddress",Ub="EventBridgeConfiguration",zb="ExpectedBucketOwner",Gb="ErrorCode",Hb="EncryptionConfiguration",Vb="ErrorDocument",$b="ExposeHeaders",Wb="ExposeHeader",Kb="ErrorMessage",Qb="ExpiredObjectDeleteMarker",Xb="ExistingObjectReplication",Yb="ExistingObjectReplicationStatus",Jb="EnableRequestProgress",Zb="ExpirationStatus",ev="ExpectedSourceBucketOwner",tv="EncodingType",nv="ETag",rv="EncryptionType",iv="EventThreshold",ov="ExpressionType",sv="Encryption",av="Enabled",cv="End",lv="Error",uv="Errors",dv="Event",pv="Events",hv="Expression",fv="Expiration",mv="Filter",gv="FieldDelimiter",yv="FileHeaderInfo",bv="FetchOwner",vv="FilterRule",Sv="FilterRuleName",wv="FilterRuleValue",Cv="FilterRules",Tv="Field",Ev="Format",_v="Frequency",xv="Grant",Rv="GrantFullControl",Iv="GlacierJobParameters",Pv="GrantRead",Ov="GrantReadACP",Dv="GrantWrite",Av="GrantWriteACP",kv="Grants",Nv="Grantee",Lv="HttpErrorCodeReturnedEquals",jv="HostName",Mv="HttpRedirectCode",Fv="Id",qv="InventoryConfiguration",Bv="InventoryConfigurationList",Uv="IndexDocument",zv="ID",Gv="InventoryDestination",Hv="IsEnabled",Vv="InventoryEncryption",$v="InventoryFilter",Wv="InventoryFormat",Kv="InventoryFrequency",Qv="InventoryId",Xv="InventoryIncludedObjectVersions",Yv="IsLatest",Jv="IfMatch",Zv="IfModifiedSince",eS="IfNoneMatch",tS="InventoryOptionalField",nS="IncludedObjectVersions",rS="IsPublic",iS="IgnorePublicAcls",oS="IsRestoreInProgress",sS="InputSerialization",aS="InventoryS3BucketDestination",cS="InventorySchedule",lS="IsTruncated",uS="IntelligentTieringAndOperator",dS="IntelligentTieringAccessTier",pS="IntelligentTieringConfiguration",hS="IntelligentTieringConfigurationList",fS="IntelligentTieringDays",mS="IntelligentTieringFilter",gS="IntelligentTieringId",yS="IntelligentTieringStatus",bS="IfUnmodifiedSince",vS="Initiator",SS="Initiated",wS="JSON",CS="JSONInput",TS="JSONOutput",ES="JSONType",_S="Key",xS="KeyCount",RS="KeyId",IS="KeyMarker",PS="KMSContext",OS="KMSKeyId",DS="KMSMasterKeyID",AS="KeyPrefixEquals",kS="Location",NS="LocationConstraint",LS="LoggingEnabled",jS="LifecycleExpiration",MS="LambdaFunctionArn",FS="LambdaFunctionConfigurations",qS="LambdaFunctionConfiguration",BS="LocationInfo",US="LastModified",zS="LocationNameAsString",GS="LocationPrefix",HS="LifecycleRule",VS="LifecycleRuleAndOperator",$S="LifecycleRuleFilter",WS="LocationType",KS="Marker",QS="MetricsAndOperator",XS="MaxAgeSeconds",YS="MetricsConfiguration",JS="MetricsConfigurationList",ZS="MetadataDirective",ew="MaxDirectoryBuckets",tw="MfaDelete",nw="MetadataEntry",rw="MetricsFilter",iw="MFA",ow="MFADelete",sw="MetricsId",aw="MaxKeys",cw="MetadataKey",lw="MissingMeta",uw="MaxParts",dw="MetricsStatus",pw="MaxUploads",hw="MetadataValue",fw="Metrics",mw="Message",gw="Minutes",yw="Mode",bw="Name",vw="NotificationConfiguration",Sw="NotificationConfigurationFilter",ww="NextContinuationToken",Cw="NoncurrentDays",Tw="NotificationId",Ew="NextKeyMarker",_w="NextMarker",xw="NewerNoncurrentVersions",Rw="NextPartNumberMarker",Iw="NextUploadIdMarker",Pw="NoncurrentVersionExpiration",Ow="NextVersionIdMarker",Dw="NoncurrentVersionTransitions",Aw="NoncurrentVersionTransition",kw="Owner",Nw="ObjectAttributes",Lw="OwnershipControls",jw="ObjectCannedACL",Mw="OwnershipControlsRule",Fw="OptionalFields",qw="ObjectIdentifier",Bw="ObjectKey",Uw="OutputLocation",zw="ObjectLockConfiguration",Gw="ObjectLockEnabled",Hw="ObjectLockEnabledForBucket",Vw="ObjectLockLegalHold",$w="ObjectLockLegalHoldStatus",Ww="ObjectLockMode",Kw="ObjectLockRetention",Qw="ObjectLockRetentionMode",Xw="ObjectLockRetainUntilDate",Yw="ObjectLockRule",Jw="ObjectOwnership",Zw="OptionalObjectAttributes",eC="OwnerOverride",tC="ObjectParts",nC="OutputSerialization",rC="ObjectSizeGreaterThan",iC="ObjectSizeGreaterThanBytes",oC="ObjectSizeLessThan",sC="ObjectSizeLessThanBytes",aC="OutputSchemaVersion",cC="ObjectSize",lC="ObjectVersionId",uC="Objects",dC="Prefix",pC="PublicAccessBlockConfiguration",hC="PartsCount",fC="PartitionDateSource",mC="ParquetInput",gC="PartNumber",yC="PartNumberMarker",bC="PartitionedPrefix",vC="Payer",SC="Part",wC="Parquet",CC="Parts",TC="Permission",EC="Protocol",_C="Priority",xC="Quiet",RC="QueueArn",IC="QueueConfiguration",PC="QueueConfigurations",OC="QuoteCharacter",DC="QuoteEscapeCharacter",AC="QuoteFields",kC="Queue",NC="Range",LC="RedirectAllRequestsTo",jC="RequestCharged",MC="ResponseCacheControl",FC="ResponseContentDisposition",qC="ResponseContentEncoding",BC="ResponseContentLanguage",UC="ResponseContentType",zC="ReplicationConfiguration",GC="RecordDelimiter",HC="ResponseExpires",VC="RestoreExpiryDate",$C="ReplicaKmsKeyID",WC="ReplaceKeyPrefixWith",KC="ReplaceKeyWith",QC="ReplicaModifications",XC="ReplicaModificationsStatus",YC="RestoreOutputPath",JC="RequestPayer",ZC="RestrictPublicBuckets",eT="RequestPaymentConfiguration",tT="RequestProgress",nT="RequestRoute",rT="ReplicationRuleAndOperator",iT="ReplicationRuleFilter",oT="ReplicationRuleStatus",sT="RestoreRequestType",aT="ReplicationRule",cT="RestoreRequest",lT="RoutingRules",uT="RoutingRule",dT="ReplicationStatus",pT="RestoreStatus",hT="RequestToken",fT="ReplicationTimeStatus",mT="ReplicationTimeValue",gT="ReplicationTime",yT="RetainUntilDate",bT="Restore",vT="Redirect",ST="Role",wT="Rule",CT="Rules",TT="Status",ET="StartAfter",_T="SecretAccessKey",xT="S3BucketDestination",RT="StorageClass",IT="StorageClassAnalysis",PT="StorageClassAnalysisDataExport",OT="StorageClassAnalysisSchemaVersion",DT="StatusCode",AT="SkipDestinationValidation",kT="SSE-KMS",NT="SseKmsEncryptedObjects",LT="SseKmsEncryptedObjectsStatus",jT="S3KeyFilter",MT="S3Key",FT="S3Location",qT="SessionMode",BT="SelectObjectContentRequest",UT="SelectParameters",zT="SimplePrefix",GT="ScanRange",HT="SSE-S3",VT="SourceSelectionCriteria",$T="ServerSideEncryption",WT="SSEAlgorithm",KT="ServerSideEncryptionByDefault",QT="ServerSideEncryptionConfiguration",XT="SSECustomerAlgorithm",YT="SSECustomerKey",JT="SSECustomerKeyMD5",ZT="SSEKMS",eE="SSEKMSEncryptionContext",tE="SSEKMSKeyId",nE="ServerSideEncryptionRule",rE="SSES3",iE="SessionToken",oE="S3",sE="Schedule",aE="Setting",cE="Size",lE="Start",uE="Suffix",dE="Tagging",pE="TopicArn",hE="TargetBucket",fE="TagCount",mE="TopicConfiguration",gE="TopicConfigurations",yE="TaggingDirective",bE="TargetGrants",vE="TargetGrant",SE="TargetObjectKeyFormat",wE="TargetPrefix",CE="TotalPartsCount",TE="TagSet",EE="TransitionStorageClass",_E="Tag",xE="Tags",RE="Tier",IE="Tierings",PE="Tiering",OE="Time",DE="Token",AE="Topic",kE="Transitions",NE="Transition",LE="Type",jE="Upload",ME="UploadId",FE="UploadIdMarker",qE="UserMetadata",BE="URI",UE="Uploads",zE="Version",GE="VersionCount",HE="VersioningConfiguration",VE="VersionId",$E="VersionIdMarker",WE="Value",KE="Versions",QE="WebsiteConfiguration",XE="WebsiteRedirectLocation",YE="Years",JE="analytics",ZE="accelerate",e_="acl",t_="accept-ranges",n_="attributes",r_="cors",i_="cache-control",o_="content-disposition",s_="content-encoding",a_="content-language",c_="content-length",l_="content-md5",u_="content-range",d_="content-type",p_="continuation-token",h_="delete",f_="delimiter",m_="expires",g_="encryption",y_="encoding-type",b_="etag",v_="fetch-owner",S_="id",w_="if-match",C_="if-modified-since",T_="inventory",E_="if-none-match",__="intelligent-tiering",x_="if-unmodified-since",R_="key-marker",I_="lifecycle",P_="legal-hold",O_="last-modified",D_="location",A_="logging",k_="list-type",N_="metrics",L_="marker",j_="max-directory-buckets",M_="member",F_="max-keys",q_="max-parts",B_="max-uploads",U_="notification",z_="ownershipControls",G_="object-lock",H_="policy",V_="publicAccessBlock",$_="partNumber",W_="policyStatus",K_="part-number-marker",Q_="prefix",X_="replication",Y_="requestPayment",J_="range",Z_="response-cache-control",ex="response-content-disposition",tx="response-content-encoding",nx="response-content-language",rx="response-content-type",ix="response-expires",ox="restore",sx="retention",ax="session",cx="start-after",lx="select",ux="select-type",dx="tagging",px="torrent",hx="uploads",fx="uploadId",mx="upload-id-marker",gx="versioning",yx="versionId",bx='<?xml version="1.0" encoding="UTF-8"?>',vx="versions",Sx="version-id-marker",wx="website",Cx="xsi:type",Tx="x-amz-acl",Ex="x-amz-abort-date",_x="x-amz-access-point-alias",xx="x-amz-abort-rule-id",Rx="x-amz-archive-status",Ix="x-amz-bypass-governance-retention",Px="x-amz-bucket-location-name",Ox="x-amz-bucket-location-type",Dx="x-amz-bucket-object-lock-enabled",Ax="x-amz-bucket-object-lock-token",kx="x-amz-bucket-region",Nx="x-amz-checksum-algorithm",Lx="x-amz-checksum-crc32",jx="x-amz-checksum-crc32c",Mx="x-amz-checksum-mode",Fx="x-amz-confirm-remove-self-bucket-access",qx="x-amz-checksum-sha1",Bx="x-amz-checksum-sha256",Ux="x-amz-copy-source",zx="x-amz-copy-source-if-match",Gx="x-amz-copy-source-if-modified-since",Hx="x-amz-copy-source-if-none-match",Vx="x-amz-copy-source-if-unmodified-since",$x="x-amz-create-session-mode",Wx="x-amz-copy-source-range",Kx="x-amz-copy-source-server-side-encryption-customer-algorithm",Qx="x-amz-copy-source-server-side-encryption-customer-key",Xx="x-amz-copy-source-server-side-encryption-customer-key-md5",Yx="x-amz-copy-source-version-id",Jx="x-amz-delete-marker",Zx="x-amz-expiration",eR="x-amz-expected-bucket-owner",tR="x-amz-fwd-error-code",nR="x-amz-fwd-error-message",rR="x-amz-fwd-header-accept-ranges",iR="x-amz-fwd-header-cache-control",oR="x-amz-fwd-header-content-disposition",sR="x-amz-fwd-header-content-encoding",aR="x-amz-fwd-header-content-language",cR="x-amz-fwd-header-content-range",lR="x-amz-fwd-header-content-type",uR="x-amz-fwd-header-etag",dR="x-amz-fwd-header-expires",pR="x-amz-fwd-header-last-modified",hR="x-amz-fwd-header-x-amz-checksum-crc32",fR="x-amz-fwd-header-x-amz-checksum-crc32c",mR="x-amz-fwd-header-x-amz-checksum-sha1",gR="x-amz-fwd-header-x-amz-checksum-sha256",yR="x-amz-fwd-header-x-amz-delete-marker",bR="x-amz-fwd-header-x-amz-expiration",vR="x-amz-fwd-header-x-amz-missing-meta",SR="x-amz-fwd-header-x-amz-mp-parts-count",wR="x-amz-fwd-header-x-amz-object-lock-legal-hold",CR="x-amz-fwd-header-x-amz-object-lock-mode",TR="x-amz-fwd-header-x-amz-object-lock-retain-until-date",ER="x-amz-fwd-header-x-amz-restore",_R="x-amz-fwd-header-x-amz-request-charged",xR="x-amz-fwd-header-x-amz-replication-status",RR="x-amz-fwd-header-x-amz-storage-class",IR="x-amz-fwd-header-x-amz-server-side-encryption",PR="x-amz-fwd-header-x-amz-server-side-encryption-aws-kms-key-id",OR="x-amz-fwd-header-x-amz-server-side-encryption-bucket-key-enabled",DR="x-amz-fwd-header-x-amz-server-side-encryption-customer-algorithm",AR="x-amz-fwd-header-x-amz-server-side-encryption-customer-key-md5",kR="x-amz-fwd-header-x-amz-tagging-count",NR="x-amz-fwd-header-x-amz-version-id",LR="x-amz-fwd-status",jR="x-amz-grant-full-control",MR="x-amz-grant-read",FR="x-amz-grant-read-acp",qR="x-amz-grant-write",BR="x-amz-grant-write-acp",UR="x-amz-mfa",zR="x-amz-metadata-directive",GR="x-amz-missing-meta",HR="x-amz-max-parts",VR="x-amz-mp-parts-count",$R="x-amz-object-attributes",WR="x-amz-object-lock-legal-hold",KR="x-amz-object-lock-mode",QR="x-amz-object-lock-retain-until-date",XR="x-amz-object-ownership",YR="x-amz-optional-object-attributes",JR="x-amz-part-number-marker",ZR="x-amz-restore",eI="x-amz-request-charged",tI="x-amz-restore-output-path",nI="x-amz-request-payer",rI="x-amz-request-route",iI="x-amz-replication-status",oI="x-amz-request-token",sI="x-amz-storage-class",aI="x-amz-sdk-checksum-algorithm",cI="x-amz-skip-destination-validation",lI="x-amz-source-expected-bucket-owner",uI="x-amz-server-side-encryption",dI="x-amz-server-side-encryption-aws-kms-key-id",pI="x-amz-server-side-encryption-bucket-key-enabled",hI="x-amz-server-side-encryption-context",fI="x-amz-server-side-encryption-customer-algorithm",mI="x-amz-server-side-encryption-customer-key",gI="x-amz-server-side-encryption-customer-key-md5",yI="x-amz-tagging",bI="x-amz-tagging-count",vI="x-amz-tagging-directive",SI="x-amz-version-id",wI="x-amz-website-redirect-location",CI="x-id",TI=(e,t)=>xg(e,t).then((e=>{if(e.length){const t=new ca.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(e,t)=>""===t.trim()&&t.includes("\n")?"":void 0});t.addEntity("#xD","\r"),t.addEntity("#10","\n");const n=t.parse(e),r="#text",i=Object.keys(n)[0],o=n[i];return o[r]&&(o[i]=o[r],delete o[r]),at(o)}return{}})),EI=async(e,t)=>{const n=await TI(e,t);return n.Error&&(n.Error.message=n.Error.message??n.Error.Message),n},_I=(e,t)=>void 0!==t?.Code?t.Code:404==e.statusCode?"NotFound":void 0;class xI extends(ie.classBuilder().ep({...no,DisableS3ExpressSessionAuth:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","CreateSession",{}).n("S3Client","CreateSessionCommand").f(void 0,xs).ser(qa).de(Dl).build()){}const RI={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};class II extends $e{constructor(e){super(e),Object.setPrototypeOf(this,II.prototype)}}class PI extends II{constructor(e){super({name:"ExpiredTokenException",$fault:"client",...e}),this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,PI.prototype)}}class OI extends II{constructor(e){super({name:"MalformedPolicyDocumentException",$fault:"client",...e}),this.name="MalformedPolicyDocumentException",this.$fault="client",Object.setPrototypeOf(this,OI.prototype)}}class DI extends II{constructor(e){super({name:"PackedPolicyTooLargeException",$fault:"client",...e}),this.name="PackedPolicyTooLargeException",this.$fault="client",Object.setPrototypeOf(this,DI.prototype)}}class AI extends II{constructor(e){super({name:"RegionDisabledException",$fault:"client",...e}),this.name="RegionDisabledException",this.$fault="client",Object.setPrototypeOf(this,AI.prototype)}}class kI extends II{constructor(e){super({name:"IDPRejectedClaimException",$fault:"client",...e}),this.name="IDPRejectedClaimException",this.$fault="client",Object.setPrototypeOf(this,kI.prototype)}}class NI extends II{constructor(e){super({name:"InvalidIdentityTokenException",$fault:"client",...e}),this.name="InvalidIdentityTokenException",this.$fault="client",Object.setPrototypeOf(this,NI.prototype)}}class LI extends II{constructor(e){super({name:"IDPCommunicationErrorException",$fault:"client",...e}),this.name="IDPCommunicationErrorException",this.$fault="client",Object.setPrototypeOf(this,LI.prototype)}}const jI=e=>({...e,...e.SecretAccessKey&&{SecretAccessKey:se}}),MI=e=>({...e,...e.Credentials&&{Credentials:jI(e.Credentials)}}),FI=e=>({...e,...e.WebIdentityToken&&{WebIdentityToken:se}}),qI=e=>({...e,...e.Credentials&&{Credentials:jI(e.Credentials)}}),BI=async(e,t)=>{const n=CP;let r;return r=cO({...ZI(e,t),[EP]:xP,[tO]:TP}),wP(t,n,"/",void 0,r)},UI=async(e,t)=>{const n=CP;let r;return r=cO({...eP(e,t),[EP]:PP,[tO]:TP}),wP(t,n,"/",void 0,r)},zI=async(e,t)=>{if(e.statusCode>=300)return GI(e,t);const n=await sO(e.body,t);let r={};return r=lP(n.AssumeRoleResult,t),{$metadata:vP(e),...r}},GI=async(e,t)=>{const n={...e,body:await aO(e.body,t)},r=lO(e,n.body);switch(r){case"ExpiredTokenException":case"com.amazonaws.sts#ExpiredTokenException":throw await $I(n,t);case"MalformedPolicyDocument":case"com.amazonaws.sts#MalformedPolicyDocumentException":throw await XI(n,t);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await YI(n,t);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await JI(n,t);default:const i=n.body;return SP({output:e,parsedBody:i.Error,errorCode:r})}},HI=async(e,t)=>{if(e.statusCode>=300)return VI(e,t);const n=await sO(e.body,t);let r={};return r=uP(n.AssumeRoleWithWebIdentityResult,t),{$metadata:vP(e),...r}},VI=async(e,t)=>{const n={...e,body:await aO(e.body,t)},r=lO(e,n.body);switch(r){case"ExpiredTokenException":case"com.amazonaws.sts#ExpiredTokenException":throw await $I(n,t);case"IDPCommunicationError":case"com.amazonaws.sts#IDPCommunicationErrorException":throw await WI(n,t);case"IDPRejectedClaim":case"com.amazonaws.sts#IDPRejectedClaimException":throw await KI(n,t);case"InvalidIdentityToken":case"com.amazonaws.sts#InvalidIdentityTokenException":throw await QI(n,t);case"MalformedPolicyDocument":case"com.amazonaws.sts#MalformedPolicyDocumentException":throw await XI(n,t);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await YI(n,t);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await JI(n,t);default:const i=n.body;return SP({output:e,parsedBody:i.Error,errorCode:r})}},$I=async(e,t)=>{const n=e.body,r=pP(n.Error,t),i=new PI({$metadata:vP(e),...r});return We(i,n)},WI=async(e,t)=>{const n=e.body,r=hP(n.Error,t),i=new LI({$metadata:vP(e),...r});return We(i,n)},KI=async(e,t)=>{const n=e.body,r=fP(n.Error,t),i=new kI({$metadata:vP(e),...r});return We(i,n)},QI=async(e,t)=>{const n=e.body,r=mP(n.Error,t),i=new NI({$metadata:vP(e),...r});return We(i,n)},XI=async(e,t)=>{const n=e.body,r=gP(n.Error,t),i=new OI({$metadata:vP(e),...r});return We(i,n)},YI=async(e,t)=>{const n=e.body,r=yP(n.Error,t),i=new DI({$metadata:vP(e),...r});return We(i,n)},JI=async(e,t)=>{const n=e.body,r=bP(n.Error,t),i=new AI({$metadata:vP(e),...r});return We(i,n)},ZI=(e,t)=>{const n={};if(null!=e[VP]&&(n[VP]=e[VP]),null!=e[$P]&&(n[$P]=e[$P]),null!=e[qP]){const r=tP(e[qP],t);0===e[qP]?.length&&(n.PolicyArns=[]),Object.entries(r).forEach((([e,t])=>{n[`PolicyArns.${e}`]=t}))}if(null!=e[FP]&&(n[FP]=e[FP]),null!=e[NP]&&(n[NP]=e[NP]),null!=e[JP]){const r=aP(e[JP],t);0===e[JP]?.length&&(n.Tags=[]),Object.entries(r).forEach((([e,t])=>{n[`Tags.${e}`]=t}))}if(null!=e[eO]){const r=sP(e[eO],t);0===e[eO]?.length&&(n.TransitiveTagKeys=[]),Object.entries(r).forEach((([e,t])=>{n[`TransitiveTagKeys.${e}`]=t}))}if(null!=e[jP]&&(n[jP]=e[jP]),null!=e[XP]&&(n[XP]=e[XP]),null!=e[ZP]&&(n[ZP]=e[ZP]),null!=e[QP]&&(n[QP]=e[QP]),null!=e[UP]){const r=iP(e[UP],t);0===e[UP]?.length&&(n.ProvidedContexts=[]),Object.entries(r).forEach((([e,t])=>{n[`ProvidedContexts.${e}`]=t}))}return n},eP=(e,t)=>{const n={};if(null!=e[VP]&&(n[VP]=e[VP]),null!=e[$P]&&(n[$P]=e[$P]),null!=e[rO]&&(n[rO]=e[rO]),null!=e[zP]&&(n[zP]=e[zP]),null!=e[qP]){const r=tP(e[qP],t);0===e[qP]?.length&&(n.PolicyArns=[]),Object.entries(r).forEach((([e,t])=>{n[`PolicyArns.${e}`]=t}))}return null!=e[FP]&&(n[FP]=e[FP]),null!=e[NP]&&(n[NP]=e[NP]),n},tP=(e,t)=>{const n={};let r=1;for(const i of e){if(null===i)continue;const e=nP(i,t);Object.entries(e).forEach((([e,t])=>{n[`member.${r}.${e}`]=t})),r++}return n},nP=(e,t)=>{const n={};return null!=e[iO]&&(n[iO]=e[iO]),n},rP=(e,t)=>{const n={};return null!=e[BP]&&(n[BP]=e[BP]),null!=e[kP]&&(n[kP]=e[kP]),n},iP=(e,t)=>{const n={};let r=1;for(const t of e){if(null===t)continue;const e=rP(t);Object.entries(e).forEach((([e,t])=>{n[`member.${r}.${e}`]=t})),r++}return n},oP=(e,t)=>{const n={};return null!=e[MP]&&(n[MP]=e[MP]),null!=e[nO]&&(n[nO]=e[nO]),n},sP=(e,t)=>{const n={};let r=1;for(const t of e)null!==t&&(n[`member.${r}`]=t,r++);return n},aP=(e,t)=>{const n={};let r=1;for(const t of e){if(null===t)continue;const e=oP(t);Object.entries(e).forEach((([e,t])=>{n[`member.${r}.${e}`]=t})),r++}return n},cP=(e,t)=>{const n={};return null!=e[RP]&&(n[RP]=ye(e[RP])),null!=e[OP]&&(n[OP]=ye(e[OP])),n},lP=(e,t)=>{const n={};return null!=e[AP]&&(n[AP]=dP(e[AP],t)),null!=e[IP]&&(n[IP]=cP(e[IP])),null!=e[GP]&&(n[GP]=Ce(e[GP])),null!=e[QP]&&(n[QP]=ye(e[QP])),n},uP=(e,t)=>{const n={};return null!=e[AP]&&(n[AP]=dP(e[AP],t)),null!=e[KP]&&(n[KP]=ye(e[KP])),null!=e[IP]&&(n[IP]=cP(e[IP])),null!=e[GP]&&(n[GP]=Ce(e[GP])),null!=e[HP]&&(n[HP]=ye(e[HP])),null!=e[DP]&&(n[DP]=ye(e[DP])),null!=e[QP]&&(n[QP]=ye(e[QP])),n},dP=(e,t)=>{const n={};return null!=e[_P]&&(n[_P]=ye(e[_P])),null!=e[WP]&&(n[WP]=ye(e[WP])),null!=e[YP]&&(n[YP]=ye(e[YP])),null!=e[LP]&&(n[LP]=me(Oe(e[LP]))),n},pP=(e,t)=>{const n={};return null!=e[oO]&&(n[oO]=ye(e[oO])),n},hP=(e,t)=>{const n={};return null!=e[oO]&&(n[oO]=ye(e[oO])),n},fP=(e,t)=>{const n={};return null!=e[oO]&&(n[oO]=ye(e[oO])),n},mP=(e,t)=>{const n={};return null!=e[oO]&&(n[oO]=ye(e[oO])),n},gP=(e,t)=>{const n={};return null!=e[oO]&&(n[oO]=ye(e[oO])),n},yP=(e,t)=>{const n={};return null!=e[oO]&&(n[oO]=ye(e[oO])),n},bP=(e,t)=>{const n={};return null!=e[oO]&&(n[oO]=ye(e[oO])),n},vP=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),SP=Ke(II),wP=async(e,t,n,r,i)=>{const{hostname:o,protocol:s="https",port:a,path:c}=await e.endpoint(),l={protocol:s,hostname:o,port:a,method:"POST",path:c.endsWith("/")?c.slice(0,-1)+n:c+n,headers:t};return void 0!==r&&(l.hostname=r),void 0!==i&&(l.body=i),new m(l)},CP={"content-type":"application/x-www-form-urlencoded"},TP="2011-06-15",EP="Action",_P="AccessKeyId",xP="AssumeRole",RP="AssumedRoleId",IP="AssumedRoleUser",PP="AssumeRoleWithWebIdentity",OP="Arn",DP="Audience",AP="Credentials",kP="ContextAssertion",NP="DurationSeconds",LP="Expiration",jP="ExternalId",MP="Key",FP="Policy",qP="PolicyArns",BP="ProviderArn",UP="ProvidedContexts",zP="ProviderId",GP="PackedPolicySize",HP="Provider",VP="RoleArn",$P="RoleSessionName",WP="SecretAccessKey",KP="SubjectFromWebIdentityToken",QP="SourceIdentity",XP="SerialNumber",YP="SessionToken",JP="Tags",ZP="TokenCode",eO="TransitiveTagKeys",tO="Version",nO="Value",rO="WebIdentityToken",iO="arn",oO="message",sO=(e,t)=>((e,t)=>re(e,t).then((e=>t.utf8Encoder(e))))(e,t).then((e=>{if(e.length){const t=new ca.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(e,t)=>""===t.trim()&&t.includes("\n")?"":void 0});t.addEntity("#xD","\r"),t.addEntity("#10","\n");const n=t.parse(e),r="#text",i=Object.keys(n)[0],o=n[i];return o[r]&&(o[i]=o[r],delete o[r]),at(o)}return{}})),aO=async(e,t)=>{const n=await sO(e,t);return n.Error&&(n.Error.message=n.Error.message??n.Error.Message),n},cO=e=>Object.entries(e).map((([e,t])=>ot(e)+"="+ot(t))).join("&"),lO=(e,t)=>void 0!==t.Error?.Code?t.Error.Code:404==e.statusCode?"NotFound":void 0;class uO extends(ie.classBuilder().ep({...RI}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").f(void 0,MI).ser(BI).de(zI).build()){}class dO extends(ie.classBuilder().ep({...RI}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").f(FI,qI).ser(UI).de(HI).build()){}const pO="us-east-1",hO=e=>"function"!=typeof e?void 0===e?pO:e:async()=>{try{return await e()}catch(e){return pO}},fO=(e,t)=>{let n,r;return async(i,o)=>{if(r=i,!n){const{logger:i,region:o,requestHandler:s}=e;n=new t({logger:i,credentialDefaultProvider:()=>async()=>r,region:hO(o||e.region),...s?{requestHandler:s}:{}})}const{Credentials:s}=await n.send(new uO(o));if(!s||!s.AccessKeyId||!s.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${o.RoleArn}`);return{accessKeyId:s.AccessKeyId,secretAccessKey:s.SecretAccessKey,sessionToken:s.SessionToken,expiration:s.Expiration,credentialScope:s.CredentialScope}}},mO=(e,t)=>{let n;return async r=>{if(!n){const{logger:r,region:i,requestHandler:o}=e;n=new t({logger:r,region:hO(i||e.region),...o?{requestHandler:o}:{}})}const{Credentials:i}=await n.send(new dO(r));if(!i||!i.AccessKeyId||!i.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${r.RoleArn}`);return{accessKeyId:i.AccessKeyId,secretAccessKey:i.SecretAccessKey,sessionToken:i.SessionToken,expiration:i.Expiration,credentialScope:i.CredentialScope}}},gO=e=>t=>e({roleAssumer:fO(t,t.stsClientCtor),roleAssumerWithWebIdentity:mO(t,t.stsClientCtor),...t}),yO=e=>{let t;e.credentials&&(t=((e,t,n)=>{if(void 0===e)return;const r="function"!=typeof e?async()=>Promise.resolve(e):e;let i,o,s,a=!1;const c=async e=>{o||(o=r(e));try{i=await o,s=!0,a=!1}finally{o=void 0}return i};return void 0===t?async e=>(s&&!e?.forceRefresh||(i=await c(e)),i):async e=>(s&&!e?.forceRefresh||(i=await c(e)),a?i:n(i)?t(i)?(await c(e),i):i:(a=!0,i))})(e.credentials,ta,na)),t||(t=e.credentialDefaultProvider?ra(e.credentialDefaultProvider(e)):async()=>{throw new Error("`credentials` is missing")});const{signingEscapePath:n=!0,systemClockOffset:r=e.systemClockOffset||0,sha256:i}=e;let o;return o=e.signer?ra(e.signer):e.regionInfoProvider?()=>ra(e.region)().then((async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t])).then((([r,o])=>{const{signingRegion:s,signingService:a}=r;e.signingRegion=e.signingRegion||s||o,e.signingName=e.signingName||a||e.serviceId;const c={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:i,uriEscapePath:n};return new(e.signerConstructor||bn)(c)})):async r=>{const o=(r=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await ra(e.region)(),properties:{}},r)).signingRegion,s=r.signingName;e.signingRegion=e.signingRegion||o,e.signingName=e.signingName||s||e.serviceId;const a={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:i,uriEscapePath:n};return new(e.signerConstructor||bn)(a)},{...e,systemClockOffset:r,signingEscapePath:n,credentials:t,signer:o}},bO=async(e,t,n)=>({operation:Vt(t).operation,region:await $t(e.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),vO=e=>{const t=[];switch(e.operation){case"AssumeRoleWithSAML":case"AssumeRoleWithWebIdentity":t.push({schemeId:"smithy.api#noAuth"});break;default:t.push(function(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}(e))}return t};let SO=!1;const wO=e=>{e&&!SO&&parseInt(e.substring(1,e.indexOf(".")))<16&&(SO=!0,process.emitWarning("NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will\nno longer support Node.js 14.x on May 1, 2024.\n\nTo continue receiving updates to AWS services, bug fixes, and security\nupdates please upgrade to an active Node.js LTS version.\n\nMore information can be found at: https://a.co/dzr2AJd"))},CO=e=>new Date(Date.now()+e),TO=e=>g.isInstance(e)?e.headers?.date??e.headers?.Date:void 0,EO=(e,t)=>{const n=Date.parse(e);return((e,t)=>Math.abs(CO(t).getTime()-e)>=3e5)(n,t)?n-Date.now():t},_O=(e,t)=>{if(!t)throw new Error(`Property \`${e}\` is not resolved for AWS SDK SigV4Auth`);return t};class xO{async sign(e,t,n){if(!m.isInstance(e))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:r,signer:i,signingRegion:o,signingName:s}=await(async e=>{const t=_O("context",e.context),n=_O("config",e.config),r=t.endpointV2?.properties?.authSchemes?.[0],i=_O("signer",n.signer),o=await i(r),s=e?.signingRegion,a=e?.signingName;return{config:n,signer:o,signingRegion:s,signingName:a}})(n);return await i.sign(e,{signingDate:CO(r.systemClockOffset),signingRegion:o,signingService:s})}errorHandler(e){return t=>{const n=t.ServerTime??TO(t.$response);if(n){const t=_O("config",e.config);t.systemClockOffset=EO(n,t.systemClockOffset)}throw t}}successHandler(e,t){const n=TO(e);if(n){const e=_O("config",t.config);e.systemClockOffset=EO(n,e.systemClockOffset)}}}const RO=()=>async()=>{const e=process.env.AWS_ACCESS_KEY_ID,t=process.env.AWS_SECRET_ACCESS_KEY,n=process.env.AWS_SESSION_TOKEN,r=process.env.AWS_CREDENTIAL_EXPIRATION,i=process.env.AWS_CREDENTIAL_SCOPE;if(e&&t)return{accessKeyId:e,secretAccessKey:t,...n&&{sessionToken:n},...r&&{expiration:new Date(r)},...i&&{credentialScope:i}};throw new Ln("Unable to find environment variable credentials.")};var IO=n(7016);function PO(e){return new Promise(((t,n)=>{const r=(0,W.request)({method:"GET",...e,hostname:e.hostname?.replace(/^\[(.+)\]$/,"$1")});r.on("error",(e=>{n(Object.assign(new Nn("Unable to connect to instance metadata service"),e)),r.destroy()})),r.on("timeout",(()=>{n(new Nn("TimeoutError from instance metadata service")),r.destroy()})),r.on("response",(e=>{const{statusCode:i=400}=e;(i<200||300<=i)&&(n(Object.assign(new Nn("Error response received from instance metadata service"),{statusCode:i})),r.destroy());const o=[];e.on("data",(e=>{o.push(e)})),e.on("end",(()=>{t(k.Buffer.concat(o)),r.destroy()}))})),r.end()}))}const OO=e=>Boolean(e)&&"object"==typeof e&&"string"==typeof e.AccessKeyId&&"string"==typeof e.SecretAccessKey&&"string"==typeof e.Token&&"string"==typeof e.Expiration,DO=e=>({accessKeyId:e.AccessKeyId,secretAccessKey:e.SecretAccessKey,sessionToken:e.Token,expiration:new Date(e.Expiration)}),AO=({maxRetries:e=0,timeout:t=1e3})=>({maxRetries:e,timeout:t}),kO=(e,t)=>{let n=e();for(let r=0;r<t;r++)n=n.catch(e);return n},NO="AWS_CONTAINER_CREDENTIALS_FULL_URI",LO="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",jO="AWS_CONTAINER_AUTHORIZATION_TOKEN",MO=(e={})=>{const{timeout:t,maxRetries:n}=AO(e);return()=>kO((async()=>{const e=await UO(),n=JSON.parse(await FO(t,e));if(!OO(n))throw new Ln("Invalid response received from instance metadata service.");return DO(n)}),n)},FO=async(e,t)=>(process.env[jO]&&(t.headers={...t.headers,Authorization:process.env[jO]}),(await PO({...t,timeout:e})).toString()),qO={localhost:!0,"127.0.0.1":!0},BO={"http:":!0,"https:":!0},UO=async()=>{if(process.env[LO])return{hostname:"169.254.170.2",path:process.env[LO]};if(process.env[NO]){const e=(0,IO.parse)(process.env[NO]);if(!e.hostname||!(e.hostname in qO))throw new Ln(`${e.hostname} is not a valid container metadata service hostname`,!1);if(!e.protocol||!(e.protocol in BO))throw new Ln(`${e.protocol} is not a valid container metadata service protocol`,!1);return{...e,port:e.port?parseInt(e.port,10):void 0}}throw new Ln(`The container metadata credential provider cannot be used unless the ${LO} or ${NO} environment variable is set`,!1)};class zO extends Ln{constructor(e,t=!0){super(e,t),this.tryNextLink=t,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,zO.prototype)}}var GO;!function(e){e.IPv4="http://169.254.169.254",e.IPv6="http://[fd00:ec2::254]"}(GO||(GO={}));const HO={environmentVariableSelector:e=>e.AWS_EC2_METADATA_SERVICE_ENDPOINT,configFileSelector:e=>e.ec2_metadata_service_endpoint,default:void 0};var VO;!function(e){e.IPv4="IPv4",e.IPv6="IPv6"}(VO||(VO={}));const $O={environmentVariableSelector:e=>e.AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE,configFileSelector:e=>e.ec2_metadata_service_endpoint_mode,default:VO.IPv4},WO=async()=>gi(await KO()||await QO()),KO=async()=>hi(HO)(),QO=async()=>{const e=await hi($O)();switch(e){case VO.IPv4:return GO.IPv4;case VO.IPv6:return GO.IPv6;default:throw new Error(`Unsupported endpoint mode: ${e}. Select from ${Object.values(VO)}`)}},XO=(e,t)=>{const n=300+Math.floor(300*Math.random()),r=new Date(Date.now()+1e3*n);t.warn("Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(newExpiration)}.\nFor more information, please visit: https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html");const i=e.originalExpiration??e.expiration;return{...e,...i?{originalExpiration:i}:{},expiration:r}},YO="/latest/meta-data/iam/security-credentials/",JO="AWS_EC2_METADATA_V1_DISABLED",ZO="ec2_metadata_v1_disabled",eD="x-aws-ec2-metadata-token",tD=(e={})=>((e,t={})=>{const n=t?.logger||console;let r;return async()=>{let t;try{t=await e(),t.expiration&&t.expiration.getTime()<Date.now()&&(t=XO(t,n))}catch(e){if(!r)throw e;n.warn("Credential renew failed: ",e),t=XO(r,n)}return r=t,t}})(nD(e),{logger:e.logger}),nD=e=>{let t=!1;const{logger:n,profile:r}=e,{timeout:i,maxRetries:o}=AO(e),s=async(n,i)=>{if(t||null==i.headers?.[eD]){let t=!1,n=!1;const i=await hi({environmentVariableSelector:e=>{const t=e[JO];if(n=!!t&&"false"!==t,void 0===t)throw new Ln(`${JO} not set in env, checking config file next.`);return n},configFileSelector:e=>{const n=e[ZO];return t=!!n&&"false"!==n,t},default:!1},{profile:r})();if(e.ec2MetadataV1Disabled||i){const r=[];throw e.ec2MetadataV1Disabled&&r.push("credential provider initialization (runtime option ec2MetadataV1Disabled)"),t&&r.push(`config file profile (${ZO})`),n&&r.push(`process environment variable (${JO})`),new zO(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${r.join(", ")}].`)}}const o=(await kO((async()=>{let e;try{e=await iD(i)}catch(e){throw 401===e.statusCode&&(t=!1),e}return e}),n)).trim();return kO((async()=>{let e;try{e=await oD(o,i)}catch(e){throw 401===e.statusCode&&(t=!1),e}return e}),n)};return async()=>{const e=await WO();if(t)return n?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),s(o,{...e,timeout:i});{let r;try{r=(await rD({...e,timeout:i})).toString()}catch(r){if(400===r?.statusCode)throw Object.assign(r,{message:"EC2 Metadata token request returned error"});return("TimeoutError"===r.message||[403,404,405].includes(r.statusCode))&&(t=!0),n?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),s(o,{...e,timeout:i})}return s(o,{...e,headers:{[eD]:r},timeout:i})}}},rD=async e=>PO({...e,path:"/latest/api/token",method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),iD=async e=>(await PO({...e,path:YO})).toString(),oD=async(e,t)=>{const n=JSON.parse((await PO({...t,path:YO+e})).toString());if(!OO(n))throw new Ln("Invalid response received from instance metadata service.");return DO(n)};var sD=n(5317);const aD=(e={})=>async()=>{const t=await pi(e);return(async(e,t)=>{const n=t[e];if(!t[e])throw new Ln(`Profile ${e} could not be found in shared credentials file.`);{const t=n.credential_process;if(void 0===t)throw new Ln(`Profile ${e} did not contain credential_process.`);{const n=(0,ee.promisify)(sD.exec);try{const{stdout:r}=await n(t);let i;try{i=JSON.parse(r.trim())}catch{throw Error(`Profile ${e} credential_process returned invalid JSON.`)}return((e,t)=>{if(1!==t.Version)throw Error(`Profile ${e} credential_process did not return Version 1.`);if(void 0===t.AccessKeyId||void 0===t.SecretAccessKey)throw Error(`Profile ${e} credential_process returned invalid credentials.`);if(t.Expiration){const n=new Date;if(new Date(t.Expiration)<n)throw Error(`Profile ${e} credential_process returned expired credentials.`)}return{accessKeyId:t.AccessKeyId,secretAccessKey:t.SecretAccessKey,...t.SessionToken&&{sessionToken:t.SessionToken},...t.Expiration&&{expiration:new Date(t.Expiration)},...t.CredentialScope&&{credentialScope:t.CredentialScope}}})(e,i)}catch(e){throw new Ln(e.message)}}}})(Hr(e),t)},cD=e=>e&&("string"==typeof e.sso_start_url||"string"==typeof e.sso_account_id||"string"==typeof e.sso_session||"string"==typeof e.sso_region||"string"==typeof e.sso_role_name),lD={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var uD=n(932);const dD=({serviceId:e,clientVersion:t})=>{const n=[["aws-sdk-js",t],["ua","2.0"],[`os/${(0,qr.platform)()}`,(0,qr.release)()],["lang/js"],["md/nodejs",`${uD.versions.node}`]];e&&n.push([`api/${e}`,t]),uD.env.AWS_EXECUTION_ENV&&n.push([`exec-env/${uD.env.AWS_EXECUTION_ENV}`]);const r=hi({environmentVariableSelector:e=>e.AWS_SDK_UA_APP_ID,configFileSelector:e=>e["sdk-ua-app-id"],default:void 0})();let i;return async()=>{if(!i){const e=await r;i=e?[...n,[`app/${e}`]]:[...n]}return i}};class pD{constructor(e,t){this.algorithmIdentifier=e,this.secret=t,this.reset()}update(e,t){this.hash.update(B(hD(e,t)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?(0,Vr.createHmac)(this.algorithmIdentifier,hD(this.secret)):(0,Vr.createHash)(this.algorithmIdentifier)}}function hD(e,t){return k.Buffer.isBuffer(e)?e:"string"==typeof e?L(e,t):ArrayBuffer.isView(e)?N(e.buffer,e.byteOffset,e.byteLength):N(e)}const fD=e=>{if(!e)return 0;if("string"==typeof e)return Buffer.from(e).length;if("number"==typeof e.byteLength)return e.byteLength;if("number"==typeof e.size)return e.size;if("number"==typeof e.start&&"number"==typeof e.end)return e.end+1-e.start;if("string"==typeof e.path||Buffer.isBuffer(e.path))return(0,Kr.lstatSync)(e.path).size;if("number"==typeof e.fd)return(0,Kr.fstatSync)(e.fd).size;throw new Error(`Body Length computation failed for ${e}`)},mD="required",gD="fn",yD="argv",bD="ref",vD=!0,SD="isSet",wD="booleanEquals",CD="error",TD="endpoint",ED="tree",_D="PartitionResult",xD="getAttr",RD={[mD]:!1,type:"String"},ID={[mD]:!0,default:!1,type:"Boolean"},PD={[bD]:"Endpoint"},OD={[gD]:wD,[yD]:[{[bD]:"UseFIPS"},!0]},DD={[gD]:wD,[yD]:[{[bD]:"UseDualStack"},!0]},AD={},kD={[gD]:xD,[yD]:[{[bD]:_D},"supportsFIPS"]},ND={[bD]:_D},LD={[gD]:wD,[yD]:[!0,{[gD]:xD,[yD]:[ND,"supportsDualStack"]}]},jD=[OD],MD=[DD],FD=[{[bD]:"Region"}],qD={version:"1.0",parameters:{Region:RD,UseDualStack:ID,UseFIPS:ID,Endpoint:RD},rules:[{conditions:[{[gD]:SD,[yD]:[PD]}],rules:[{conditions:jD,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:CD},{conditions:MD,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:CD},{endpoint:{url:PD,properties:AD,headers:AD},type:TD}],type:ED},{conditions:[{[gD]:SD,[yD]:FD}],rules:[{conditions:[{[gD]:"aws.partition",[yD]:FD,assign:_D}],rules:[{conditions:[OD,DD],rules:[{conditions:[{[gD]:wD,[yD]:[vD,kD]},LD],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:AD,headers:AD},type:TD}],type:ED},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:CD}],type:ED},{conditions:jD,rules:[{conditions:[{[gD]:wD,[yD]:[kD,vD]}],rules:[{conditions:[{[gD]:"stringEquals",[yD]:[{[gD]:xD,[yD]:[ND,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:AD,headers:AD},type:TD},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:AD,headers:AD},type:TD}],type:ED},{error:"FIPS is enabled but this partition does not support FIPS",type:CD}],type:ED},{conditions:MD,rules:[{conditions:[LD],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:AD,headers:AD},type:TD}],type:ED},{error:"DualStack is enabled but this partition does not support DualStack",type:CD}],type:ED},{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",properties:AD,headers:AD},type:TD}],type:ED}],type:ED},{error:"Invalid Configuration: Missing Region",type:CD}]},BD=(e,t={})=>fr(qD,{endpointParams:e,logger:t.logger}),UD="AWS_REGION",zD="AWS_DEFAULT_REGION",GD=["in-region","cross-region","mobile","standard","legacy"],HD={environmentVariableSelector:e=>e.AWS_DEFAULTS_MODE,configFileSelector:e=>e.defaults_mode,default:"legacy"},VD=({region:e=hi(Rr),defaultsMode:t=hi(HD)}={})=>Fn((async()=>{const n="function"==typeof t?await t():t;switch(n?.toLowerCase()){case"auto":return $D(e);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(n?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${GD.join(", ")}, got ${n}`)}})),$D=async e=>{if(e){const t="function"==typeof e?await e():e,n=await WD();return n?t===n?"in-region":"cross-region":"standard"}return"standard"},WD=async()=>{if(process.env.AWS_EXECUTION_ENV&&(process.env[UD]||process.env[zD]))return process.env[UD]??process.env[zD];if(!process.env.AWS_EC2_METADATA_DISABLED)try{const e=await WO();return(await PO({...e,path:"/latest/meta-data/placement/region"})).toString()}catch(e){}},KD=e=>{let t=async()=>{if(void 0===e.region)throw new Error("Region is missing from runtimeConfig");const t=e.region;return"string"==typeof t?t:t()};return{setRegion(e){t=e},region:()=>t}},QD=e=>({region:e.region()});class XD extends D{constructor(...[e]){const t=(n=(e=>{Je(process.version);const t=VD(e),n=()=>t().then(Xe),r=(e=>({apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??M,base64Encoder:e?.base64Encoder??F,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??BD,extensions:e?.extensions??[],logger:e?.logger??new _,serviceId:e?.serviceId??"SSO",urlParser:e?.urlParser??gi,utf8Decoder:e?.utf8Decoder??q,utf8Encoder:e?.utf8Encoder??U}))(e);return wO(process.version),{...r,...e,runtime:"node",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??fD,defaultUserAgentProvider:e?.defaultUserAgentProvider??dD({serviceId:r.serviceId,clientVersion:"3.490.0"}),maxAttempts:e?.maxAttempts??hi(Wi),region:e?.region??hi(Rr,Ir),requestHandler:e?.requestHandler??new Y(n),retryMode:e?.retryMode??hi({...Qi,default:async()=>(await n()).retryMode||Ri}),sha256:e?.sha256??pD.bind(null,"sha256"),streamCollector:e?.streamCollector??Z,useDualstackEndpoint:e?.useDualstackEndpoint??hi(_r),useFipsEndpoint:e?.useFipsEndpoint??hi(xr)}})(e||{}),{...n,useDualstackEndpoint:n.useDualstackEndpoint??!1,useFipsEndpoint:n.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"});var n;const o=Dr(t),s=_i(o),a=((e,t)=>{const n={...KD(e),...rt(e),...r(e)};return t.forEach((e=>e.configure(n))),{...e,...QD(n),...it(n),...i(n)}})(Gn(Ki(s)),e?.extensions||[]);super(a),this.config=a,this.middlewareStack.use(eo(this.config)),this.middlewareStack.use(Nr(this.config)),this.middlewareStack.use(v(this.config)),this.middlewareStack.use(w(this.config)),this.middlewareStack.use(E(this.config)),this.middlewareStack.use(Er(this.config))}destroy(){super.destroy()}}class YD extends $e{constructor(e){super(e),Object.setPrototypeOf(this,YD.prototype)}}class JD extends YD{constructor(e){super({name:"InvalidRequestException",$fault:"client",...e}),this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,JD.prototype)}}class ZD extends YD{constructor(e){super({name:"ResourceNotFoundException",$fault:"client",...e}),this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,ZD.prototype)}}class eA extends YD{constructor(e){super({name:"TooManyRequestsException",$fault:"client",...e}),this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,eA.prototype)}}class tA extends YD{constructor(e){super({name:"UnauthorizedException",$fault:"client",...e}),this.name="UnauthorizedException",this.$fault="client",Object.setPrototypeOf(this,tA.prototype)}}const nA=e=>({...e,...e.accessToken&&{accessToken:se}}),rA=e=>({...e,...e.secretAccessKey&&{secretAccessKey:se},...e.sessionToken&&{sessionToken:se}}),iA=e=>({...e,...e.roleCredentials&&{roleCredentials:rA(e.roleCredentials)}}),oA=async(e,t)=>{const n=ia(e,t),r=lt({},fA,{[SA]:e[gA]});n.bp("/federation/credentials");const i=lt({[vA]:[,me(e[bA],"roleName")],[yA]:[,me(e[mA],"accountId")]});return n.m("GET").h(r).q(i).b(void 0),n.build()},sA=async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return aA(e,t);const n=lt({$metadata:hA(e)}),r=me(ge(await wA(e.body,t)),"body"),i=ut(r,{roleCredentials:mt});return Object.assign(n,i),n},aA=async(e,t)=>{const n={...e,body:await CA(e.body,t)},r=TA(e,n.body);switch(r){case"InvalidRequestException":case"com.amazonaws.sso#InvalidRequestException":throw await lA(n,t);case"ResourceNotFoundException":case"com.amazonaws.sso#ResourceNotFoundException":throw await uA(n,t);case"TooManyRequestsException":case"com.amazonaws.sso#TooManyRequestsException":throw await dA(n,t);case"UnauthorizedException":case"com.amazonaws.sso#UnauthorizedException":throw await pA(n,t);default:const i=n.body;return cA({output:e,parsedBody:i,errorCode:r})}},cA=Ke(YD),lA=async(e,t)=>{const n=lt({}),r=e.body,i=ut(r,{message:ye});Object.assign(n,i);const o=new JD({$metadata:hA(e),...n});return We(o,e.body)},uA=async(e,t)=>{const n=lt({}),r=e.body,i=ut(r,{message:ye});Object.assign(n,i);const o=new ZD({$metadata:hA(e),...n});return We(o,e.body)},dA=async(e,t)=>{const n=lt({}),r=e.body,i=ut(r,{message:ye});Object.assign(n,i);const o=new eA({$metadata:hA(e),...n});return We(o,e.body)},pA=async(e,t)=>{const n=lt({}),r=e.body,i=ut(r,{message:ye});Object.assign(n,i);const o=new tA({$metadata:hA(e),...n});return We(o,e.body)},hA=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),fA=e=>!(null==e||""===e||Object.getOwnPropertyNames(e).includes("length")&&0==e.length||Object.getOwnPropertyNames(e).includes("size")&&0==e.size),mA="accountId",gA="accessToken",yA="account_id",bA="roleName",vA="role_name",SA="x-amz-sso_bearer_token",wA=(e,t)=>((e,t)=>re(e,t).then((e=>t.utf8Encoder(e))))(e,t).then((e=>e.length?JSON.parse(e):{})),CA=async(e,t)=>{const n=await wA(e,t);return n.message=n.message??n.Message,n},TA=(e,t)=>{const n=e=>{let t=e;return"number"==typeof t&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},r=(i=e.headers,Object.keys(i).find((e=>e.toLowerCase()==="x-amzn-errortype".toLowerCase())));var i;return void 0!==r?n(e.headers[r]):void 0!==t.code?n(t.code):void 0!==t.__type?n(t.__type):void 0};class EA extends(ie.classBuilder().ep({...lD}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").f(nA,iA).ser(oA).de(sA).build()){}const _A="To refresh this SSO session run 'aws sso login' with the corresponding profile.";var xA="required",RA="fn",IA="argv",PA="ref",OA="isSet",DA="tree",AA="error",kA="endpoint",NA="PartitionResult",LA="getAttr",jA={[xA]:!1,type:"String"},MA={[xA]:!0,default:!1,type:"Boolean"},FA={[PA]:"Endpoint"},qA={[RA]:"booleanEquals",[IA]:[{[PA]:"UseFIPS"},!0]},BA={[RA]:"booleanEquals",[IA]:[{[PA]:"UseDualStack"},!0]},UA={},zA={[RA]:"booleanEquals",[IA]:[!0,{[RA]:LA,[IA]:[{[PA]:NA},"supportsFIPS"]}]},GA={[PA]:NA},HA={[RA]:"booleanEquals",[IA]:[!0,{[RA]:LA,[IA]:[GA,"supportsDualStack"]}]},VA=[qA],$A=[BA],WA=[{[PA]:"Region"}],KA={version:"1.0",parameters:{Region:jA,UseDualStack:MA,UseFIPS:MA,Endpoint:jA},rules:[{conditions:[{[RA]:OA,[IA]:[FA]}],type:DA,rules:[{conditions:VA,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:AA},{conditions:$A,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:AA},{endpoint:{url:FA,properties:UA,headers:UA},type:kA}]},{conditions:[{[RA]:OA,[IA]:WA}],type:DA,rules:[{conditions:[{[RA]:"aws.partition",[IA]:WA,assign:NA}],type:DA,rules:[{conditions:[qA,BA],type:DA,rules:[{conditions:[zA,HA],type:DA,rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:UA,headers:UA},type:kA}]},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:AA}]},{conditions:VA,type:DA,rules:[{conditions:[zA],type:DA,rules:[{conditions:[{[RA]:"stringEquals",[IA]:["aws-us-gov",{[RA]:LA,[IA]:[GA,"name"]}]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:UA,headers:UA},type:kA},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:UA,headers:UA},type:kA}]},{error:"FIPS is enabled but this partition does not support FIPS",type:AA}]},{conditions:$A,type:DA,rules:[{conditions:[HA],type:DA,rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:UA,headers:UA},type:kA}]},{error:"DualStack is enabled but this partition does not support DualStack",type:AA}]},{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dnsSuffix}",properties:UA,headers:UA},type:kA}]}]},{error:"Invalid Configuration: Missing Region",type:AA}]},QA=(e,t={})=>fr(KA,{endpointParams:e,logger:t.logger}),XA=class extends D{constructor(...[e]){const t=(n=(e=>{Je(process.version);const t=VD(e),n=()=>t().then(Xe),r=(e=>({apiVersion:"2019-06-10",base64Decoder:e?.base64Decoder??M,base64Encoder:e?.base64Encoder??F,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??QA,extensions:e?.extensions??[],logger:e?.logger??new _,serviceId:e?.serviceId??"SSO OIDC",urlParser:e?.urlParser??gi,utf8Decoder:e?.utf8Decoder??q,utf8Encoder:e?.utf8Encoder??U}))(e);return{...r,...e,runtime:"node",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??fD,defaultUserAgentProvider:e?.defaultUserAgentProvider??dD({serviceId:r.serviceId,clientVersion:"3.429.0"}),maxAttempts:e?.maxAttempts??hi(Wi),region:e?.region??hi(Rr,Ir),requestHandler:e?.requestHandler??new Y(n),retryMode:e?.retryMode??hi({...Qi,default:async()=>(await n()).retryMode||Ri}),sha256:e?.sha256??pD.bind(null,"sha256"),streamCollector:e?.streamCollector??Z,useDualstackEndpoint:e?.useDualstackEndpoint??hi(_r),useFipsEndpoint:e?.useFipsEndpoint??hi(xr)}})(e||{}),{...n,useDualstackEndpoint:n.useDualstackEndpoint??!1,useFipsEndpoint:n.useFipsEndpoint??!1,defaultSigningName:"awsssooidc"});var n;const o=Dr(t),s=_i(o),a=((e,t)=>{const n={...KD(e),...rt(e),...r(e)};return t.forEach((e=>e.configure(n))),{...e,...QD(n),...it(n),...i(n)}})(Gn(Ki(s)),e?.extensions||[]);super(a),this.config=a,this.middlewareStack.use(eo(this.config)),this.middlewareStack.use(Nr(this.config)),this.middlewareStack.use(v(this.config)),this.middlewareStack.use(w(this.config)),this.middlewareStack.use(E(this.config)),this.middlewareStack.use(Er(this.config))}destroy(){super.destroy()}},YA=class e extends $e{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}},JA=class e extends YA{constructor(t){super({name:"AccessDeniedException",$fault:"client",...t}),this.name="AccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},ZA=class e extends YA{constructor(t){super({name:"AuthorizationPendingException",$fault:"client",...t}),this.name="AuthorizationPendingException",this.$fault="client",Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},ek=class e extends YA{constructor(t){super({name:"ExpiredTokenException",$fault:"client",...t}),this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},tk=class e extends YA{constructor(t){super({name:"InternalServerException",$fault:"server",...t}),this.name="InternalServerException",this.$fault="server",Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},nk=class e extends YA{constructor(t){super({name:"InvalidClientException",$fault:"client",...t}),this.name="InvalidClientException",this.$fault="client",Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},rk=class e extends YA{constructor(t){super({name:"InvalidGrantException",$fault:"client",...t}),this.name="InvalidGrantException",this.$fault="client",Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},ik=class e extends YA{constructor(t){super({name:"InvalidRequestException",$fault:"client",...t}),this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},ok=class e extends YA{constructor(t){super({name:"InvalidScopeException",$fault:"client",...t}),this.name="InvalidScopeException",this.$fault="client",Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},sk=class e extends YA{constructor(t){super({name:"SlowDownException",$fault:"client",...t}),this.name="SlowDownException",this.$fault="client",Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},ak=class e extends YA{constructor(t){super({name:"UnauthorizedClientException",$fault:"client",...t}),this.name="UnauthorizedClientException",this.$fault="client",Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},ck=class e extends YA{constructor(t){super({name:"UnsupportedGrantTypeException",$fault:"client",...t}),this.name="UnsupportedGrantTypeException",this.$fault="client",Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},lk=class e extends YA{constructor(t){super({name:"InvalidClientMetadataException",$fault:"client",...t}),this.name="InvalidClientMetadataException",this.$fault="client",Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},uk=Ke(YA),dk=async(e,t)=>{const n=lt({}),r=e.body,i=ut(r,{error:ye,error_description:ye});Object.assign(n,i);const o=new JA({$metadata:Tk(e),...n});return We(o,e.body)},pk=async(e,t)=>{const n=lt({}),r=e.body,i=ut(r,{error:ye,error_description:ye});Object.assign(n,i);const o=new ZA({$metadata:Tk(e),...n});return We(o,e.body)},hk=async(e,t)=>{const n=lt({}),r=e.body,i=ut(r,{error:ye,error_description:ye});Object.assign(n,i);const o=new ek({$metadata:Tk(e),...n});return We(o,e.body)},fk=async(e,t)=>{const n=lt({}),r=e.body,i=ut(r,{error:ye,error_description:ye});Object.assign(n,i);const o=new tk({$metadata:Tk(e),...n});return We(o,e.body)},mk=async(e,t)=>{const n=lt({}),r=e.body,i=ut(r,{error:ye,error_description:ye});Object.assign(n,i);const o=new nk({$metadata:Tk(e),...n});return We(o,e.body)},gk=async(e,t)=>{const n=lt({}),r=e.body,i=ut(r,{error:ye,error_description:ye});Object.assign(n,i);const o=new lk({$metadata:Tk(e),...n});return We(o,e.body)},yk=async(e,t)=>{const n=lt({}),r=e.body,i=ut(r,{error:ye,error_description:ye});Object.assign(n,i);const o=new rk({$metadata:Tk(e),...n});return We(o,e.body)},bk=async(e,t)=>{const n=lt({}),r=e.body,i=ut(r,{error:ye,error_description:ye});Object.assign(n,i);const o=new ik({$metadata:Tk(e),...n});return We(o,e.body)},vk=async(e,t)=>{const n=lt({}),r=e.body,i=ut(r,{error:ye,error_description:ye});Object.assign(n,i);const o=new ok({$metadata:Tk(e),...n});return We(o,e.body)},Sk=async(e,t)=>{const n=lt({}),r=e.body,i=ut(r,{error:ye,error_description:ye});Object.assign(n,i);const o=new sk({$metadata:Tk(e),...n});return We(o,e.body)},wk=async(e,t)=>{const n=lt({}),r=e.body,i=ut(r,{error:ye,error_description:ye});Object.assign(n,i);const o=new ak({$metadata:Tk(e),...n});return We(o,e.body)},Ck=async(e,t)=>{const n=lt({}),r=e.body,i=ut(r,{error:ye,error_description:ye});Object.assign(n,i);const o=new ck({$metadata:Tk(e),...n});return We(o,e.body)},Tk=e=>({httpStatusCode:e.statusCode,requestId:e.headers["x-amzn-requestid"]??e.headers["x-amzn-request-id"]??e.headers["x-amz-request-id"],extendedRequestId:e.headers["x-amz-id-2"],cfId:e.headers["x-amz-cf-id"]}),Ek=(e,t)=>((e,t)=>re(e,t).then((e=>t.utf8Encoder(e))))(e,t).then((e=>e.length?JSON.parse(e):{})),_k=async(e,t)=>{const n=await Ek(e,t);return n.message=n.message??n.Message,n},xk=(e,t)=>{const n=e=>{let t=e;return"number"==typeof t&&(t=t.toString()),t.indexOf(",")>=0&&(t=t.split(",")[0]),t.indexOf(":")>=0&&(t=t.split(":")[0]),t.indexOf("#")>=0&&(t=t.split("#")[1]),t},r=(i=e.headers,Object.keys(i).find((e=>e.toLowerCase()==="x-amzn-errortype".toLowerCase())));var i;return void 0!==r?n(e.headers[r]):void 0!==t.code?n(t.code):void 0!==t.__type?n(t.__type):void 0};class Rk extends ie{constructor(e){super(),this.input=e}static getEndpointParameterInstructions(){return{UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}}resolveMiddleware(e,t,n){this.middlewareStack.use(Ci(t,this.serialize,this.deserialize)),this.middlewareStack.use(Ei(t,_CreateTokenCommand.getEndpointParameterInstructions()));const r=e.concat(this.middlewareStack),{logger:i}=t,o={logger:i,clientName:"SSOOIDCClient",commandName:"CreateTokenCommand",inputFilterSensitiveLog:e=>e,outputFilterSensitiveLog:e=>e,[p]:{service:"AWSSSOOIDCService",operation:"CreateToken"}},{requestHandler:s}=t;return r.resolve((e=>s.handle(e.request,n||{})),o)}serialize(e,t){return(async(e,t)=>{const{hostname:n,protocol:r="https",port:i,path:o}=await t.endpoint(),s=`${o?.endsWith("/")?o.slice(0,-1):o||""}/token`;let a;return a=JSON.stringify(ut(e,{clientId:[],clientSecret:[],code:[],deviceCode:[],grantType:[],redirectUri:[],refreshToken:[],scope:e=>mt(e)})),new m({protocol:r,hostname:n,port:i,method:"POST",headers:{"content-type":"application/json"},path:s,body:a})})(e,t)}deserialize(e,t){return(async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return(async(e,t)=>{const n={...e,body:await _k(e.body,t)},r=xk(e,n.body);switch(r){case"AccessDeniedException":case"com.amazonaws.ssooidc#AccessDeniedException":throw await dk(n,t);case"AuthorizationPendingException":case"com.amazonaws.ssooidc#AuthorizationPendingException":throw await pk(n,t);case"ExpiredTokenException":case"com.amazonaws.ssooidc#ExpiredTokenException":throw await hk(n,t);case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await fk(n,t);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await mk(n,t);case"InvalidGrantException":case"com.amazonaws.ssooidc#InvalidGrantException":throw await yk(n,t);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await bk(n,t);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await vk(n,t);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await Sk(n,t);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await wk(n,t);case"UnsupportedGrantTypeException":case"com.amazonaws.ssooidc#UnsupportedGrantTypeException":throw await Ck(n,t);default:const i=n.body;return uk({output:e,parsedBody:i,errorCode:r})}})(e,t);const n=lt({$metadata:Tk(e)}),r=me(ge(await Ek(e.body,t)),"body"),i=ut(r,{accessToken:ye,expiresIn:pe,idToken:ye,refreshToken:ye,tokenType:ye});return Object.assign(n,i),n})(e,t)}}var Ik={CreateTokenCommand:Rk,RegisterClientCommand:class extends ie{constructor(e){super(),this.input=e}static getEndpointParameterInstructions(){return{UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}}resolveMiddleware(e,t,n){this.middlewareStack.use(Ci(t,this.serialize,this.deserialize)),this.middlewareStack.use(Ei(t,_RegisterClientCommand.getEndpointParameterInstructions()));const r=e.concat(this.middlewareStack),{logger:i}=t,o={logger:i,clientName:"SSOOIDCClient",commandName:"RegisterClientCommand",inputFilterSensitiveLog:e=>e,outputFilterSensitiveLog:e=>e,[p]:{service:"AWSSSOOIDCService",operation:"RegisterClient"}},{requestHandler:s}=t;return r.resolve((e=>s.handle(e.request,n||{})),o)}serialize(e,t){return(async(e,t)=>{const{hostname:n,protocol:r="https",port:i,path:o}=await t.endpoint(),s=`${o?.endsWith("/")?o.slice(0,-1):o||""}/client/register`;let a;return a=JSON.stringify(ut(e,{clientName:[],clientType:[],scopes:e=>mt(e)})),new m({protocol:r,hostname:n,port:i,method:"POST",headers:{"content-type":"application/json"},path:s,body:a})})(e,t)}deserialize(e,t){return(async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return(async(e,t)=>{const n={...e,body:await _k(e.body,t)},r=xk(e,n.body);switch(r){case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await fk(n,t);case"InvalidClientMetadataException":case"com.amazonaws.ssooidc#InvalidClientMetadataException":throw await gk(n,t);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await bk(n,t);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await vk(n,t);default:const i=n.body;return uk({output:e,parsedBody:i,errorCode:r})}})(e,t);const n=lt({$metadata:Tk(e)}),r=me(ge(await Ek(e.body,t)),"body"),i=ut(r,{authorizationEndpoint:ye,clientId:ye,clientIdIssuedAt:de,clientSecret:ye,clientSecretExpiresAt:de,tokenEndpoint:ye});return Object.assign(n,i),n})(e,t)}},StartDeviceAuthorizationCommand:class extends ie{constructor(e){super(),this.input=e}static getEndpointParameterInstructions(){return{UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}}resolveMiddleware(e,t,n){this.middlewareStack.use(Ci(t,this.serialize,this.deserialize)),this.middlewareStack.use(Ei(t,_StartDeviceAuthorizationCommand.getEndpointParameterInstructions()));const r=e.concat(this.middlewareStack),{logger:i}=t,o={logger:i,clientName:"SSOOIDCClient",commandName:"StartDeviceAuthorizationCommand",inputFilterSensitiveLog:e=>e,outputFilterSensitiveLog:e=>e,[p]:{service:"AWSSSOOIDCService",operation:"StartDeviceAuthorization"}},{requestHandler:s}=t;return r.resolve((e=>s.handle(e.request,n||{})),o)}serialize(e,t){return(async(e,t)=>{const{hostname:n,protocol:r="https",port:i,path:o}=await t.endpoint(),s=`${o?.endsWith("/")?o.slice(0,-1):o||""}/device_authorization`;let a;return a=JSON.stringify(ut(e,{clientId:[],clientSecret:[],startUrl:[]})),new m({protocol:r,hostname:n,port:i,method:"POST",headers:{"content-type":"application/json"},path:s,body:a})})(e,t)}deserialize(e,t){return(async(e,t)=>{if(200!==e.statusCode&&e.statusCode>=300)return(async(e,t)=>{const n={...e,body:await _k(e.body,t)},r=xk(e,n.body);switch(r){case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await fk(n,t);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await mk(n,t);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await bk(n,t);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await Sk(n,t);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await wk(n,t);default:const i=n.body;return uk({output:e,parsedBody:i,errorCode:r})}})(e,t);const n=lt({$metadata:Tk(e)}),r=me(ge(await Ek(e.body,t)),"body"),i=ut(r,{deviceCode:ye,expiresIn:pe,interval:pe,userCode:ye,verificationUri:ye,verificationUriComplete:ye});return Object.assign(n,i),n})(e,t)}}};ae(Ik,class extends XA{});const Pk={},Ok=e=>{if(e.expiration&&e.expiration.getTime()<Date.now())throw new jn(`Token is expired. ${_A}`,!1)},Dk=(e,t,n=!1)=>{if(void 0===t)throw new jn(`Value not present for '${e}' in SSO Token${n?". Cannot refresh":""}. ${_A}`,!1)},{writeFile:Ak}=Kr.promises,kk=new Date(0),Nk=(e={})=>async()=>{const t=await pi(e),n=Hr(e),r=t[n];if(!r)throw new jn(`Profile '${n}' could not be found in shared credentials file.`,!1);if(!r.sso_session)throw new jn(`Profile '${n}' is missing required property 'sso_session'.`);const i=r.sso_session,o=(await di(e))[i];if(!o)throw new jn(`Sso session '${i}' could not be found in shared credentials file.`,!1);for(const e of["sso_start_url","sso_region"])if(!o[e])throw new jn(`Sso session '${i}' is missing required property '${e}'.`,!1);o.sso_start_url;const s=o.sso_region;let a;try{a=await Xr(i)}catch(e){throw new jn(`The SSO session token associated with profile=${n} was not found or is invalid. ${_A}`,!1)}Dk("accessToken",a.accessToken),Dk("expiresAt",a.expiresAt);const{accessToken:c,expiresAt:l}=a,u={token:c,expiration:new Date(l)};if(u.expiration.getTime()-Date.now()>3e5)return u;if(Date.now()-kk.getTime()<3e4)return Ok(u),u;Dk("clientId",a.clientId,!0),Dk("clientSecret",a.clientSecret,!0),Dk("refreshToken",a.refreshToken,!0);try{kk.setTime(Date.now());const e=await((e,t)=>{const n=(e=>{if(Pk[e])return Pk[e];const t=new XA({region:e});return Pk[e]=t,t})(t);return n.send(new Rk({clientId:e.clientId,clientSecret:e.clientSecret,refreshToken:e.refreshToken,grantType:"refresh_token"}))})(a,s);Dk("accessToken",e.accessToken),Dk("expiresIn",e.expiresIn);const t=new Date(Date.now()+1e3*e.expiresIn);try{await((e,t)=>{const n=Wr(e),r=JSON.stringify(t,null,2);return Ak(n,r)})(i,{...a,accessToken:e.accessToken,expiresAt:t.toISOString(),refreshToken:e.refreshToken})}catch(e){}return{token:e.accessToken,expiration:t}}catch(e){return Ok(u),u}},Lk=!1,jk=async({ssoStartUrl:e,ssoSession:t,ssoAccountId:n,ssoRegion:r,ssoRoleName:i,ssoClient:o,profile:s})=>{let a;const c="To refresh this SSO session run aws sso login with the corresponding profile.";if(t)try{const e=await Nk({profile:s})();a={accessToken:e.token,expiresAt:new Date(e.expiration).toISOString()}}catch(e){throw new Ln(e.message,Lk)}else try{a=await Xr(e)}catch(e){throw new Ln(`The SSO session associated with this profile is invalid. ${c}`,Lk)}if(new Date(a.expiresAt).getTime()-Date.now()<=0)throw new Ln(`The SSO session associated with this profile has expired. ${c}`,Lk);const{accessToken:l}=a,u=o||new XD({region:r});let d;try{d=await u.send(new EA({accountId:n,roleName:i,accessToken:l}))}catch(e){throw Ln.from(e,Lk)}const{roleCredentials:{accessKeyId:p,secretAccessKey:h,sessionToken:f,expiration:m}={}}=d,g=d?.roleCredentials?.credentialScope;if(!(p&&h&&f&&m))throw new Ln("SSO returns an invalid temporary credential.",Lk);return{accessKeyId:p,secretAccessKey:h,sessionToken:f,expiration:new Date(m),credentialScope:g}},Mk=e=>{const{sso_start_url:t,sso_account_id:n,sso_region:r,sso_role_name:i}=e;if(!(t&&n&&r&&i))throw new Ln(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(e).join(", ")}\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,!1);return e},Fk=(e={})=>async()=>{const{ssoStartUrl:t,ssoAccountId:n,ssoRegion:r,ssoRoleName:i,ssoClient:o,ssoSession:s}=e,a=Hr(e);if(t||n||r||i||s){if(t&&n&&r&&i)return jk({ssoStartUrl:t,ssoSession:s,ssoAccountId:n,ssoRegion:r,ssoRoleName:i,ssoClient:o,profile:a});throw new Ln('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"')}{const n=(await pi(e))[a];if(!n)throw new Ln(`Profile ${a} was not found.`);if(!cD(n))throw new Ln(`Profile ${a} is not configured with SSO credentials.`);if(n?.sso_session){const i=(await di(e))[n.sso_session],o=` configurations in profile ${a} and sso-session ${n.sso_session}`;if(r&&r!==i.sso_region)throw new Ln("Conflicting SSO region"+o,!1);if(t&&t!==i.sso_start_url)throw new Ln("Conflicting SSO start_url"+o,!1);n.sso_region=i.sso_region,n.sso_start_url=i.sso_start_url}const{sso_start_url:i,sso_account_id:s,sso_region:c,sso_role_name:l,sso_session:u}=Mk(n);return jk({ssoStartUrl:i,ssoSession:u,ssoAccountId:s,ssoRegion:c,ssoRoleName:l,ssoClient:o,profile:a})}},qk=e=>Boolean(e)&&"object"==typeof e&&"string"==typeof e.aws_access_key_id&&"string"==typeof e.aws_secret_access_key&&["undefined","string"].indexOf(typeof e.aws_session_token)>-1,Bk=e=>Promise.resolve({accessKeyId:e.aws_access_key_id,secretAccessKey:e.aws_secret_access_key,sessionToken:e.aws_session_token,credentialScope:e.aws_credential_scope}),Uk=(e={})=>async()=>{const t=e?.webIdentityTokenFile??process.env.AWS_WEB_IDENTITY_TOKEN_FILE,n=e?.roleArn??process.env.AWS_ROLE_ARN,r=e?.roleSessionName??process.env.AWS_ROLE_SESSION_NAME;if(!t||!n)throw new Ln("Web identity configuration not specified");return(e=>()=>{const{roleArn:t,roleSessionName:n,webIdentityToken:r,providerId:i,policyArns:o,policy:s,durationSeconds:a,roleAssumerWithWebIdentity:c}=e;if(!c)throw new Ln(`Role Arn '${t}' needs to be assumed with web identity, but no role assumption callback was provided.`,!1);return c({RoleArn:t,RoleSessionName:n??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:r,ProviderId:i,PolicyArns:o,Policy:s,DurationSeconds:a})})({...e,webIdentityToken:(0,Kr.readFileSync)(t,{encoding:"ascii"}),roleArn:n,roleSessionName:r})()},zk=async(e,t,n,r={})=>{const i=t[e];if(Object.keys(r).length>0&&qk(i))return Bk(i);if(o=i,Boolean(o)&&"object"==typeof o&&"string"==typeof o.role_arn&&["undefined","string"].indexOf(typeof o.role_session_name)>-1&&["undefined","string"].indexOf(typeof o.external_id)>-1&&["undefined","string"].indexOf(typeof o.mfa_serial)>-1&&((e=>"string"==typeof e.source_profile&&void 0===e.credential_source)(o)||(e=>"string"==typeof e.credential_source&&void 0===e.source_profile)(o)))return(async(e,t,n,r={})=>{const i=t[e];if(!n.roleAssumer)throw new Ln(`Profile ${e} requires a role to be assumed, but no role assumption callback was provided.`,!1);const{source_profile:o}=i;if(o&&o in r)throw new Ln(`Detected a cycle attempting to resolve credentials for profile ${Hr(n)}. Profiles visited: `+Object.keys(r).join(", "),!1);const s=o?zk(o,t,n,{...r,[o]:!0}):((e,t)=>{const n={EcsContainer:MO,Ec2InstanceMetadata:tD,Environment:RO};if(e in n)return n[e]();throw new Ln(`Unsupported credential source in profile ${t}. Got ${e}, expected EcsContainer or Ec2InstanceMetadata or Environment.`)})(i.credential_source,e)(),a={RoleArn:i.role_arn,RoleSessionName:i.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:i.external_id,DurationSeconds:parseInt(i.duration_seconds||"3600",10)},{mfa_serial:c}=i;if(c){if(!n.mfaCodeProvider)throw new Ln(`Profile ${e} requires multi-factor authentication, but no MFA code callback was provided.`,!1);a.SerialNumber=c,a.TokenCode=await n.mfaCodeProvider(c)}const l=await s;return n.roleAssumer(l,a)})(e,t,n,r);var o;if(qk(i))return Bk(i);if((e=>Boolean(e)&&"object"==typeof e&&"string"==typeof e.web_identity_token_file&&"string"==typeof e.role_arn&&["undefined","string"].indexOf(typeof e.role_session_name)>-1)(i))return(async(e,t)=>Uk({webIdentityTokenFile:e.web_identity_token_file,roleArn:e.role_arn,roleSessionName:e.role_session_name,roleAssumerWithWebIdentity:t.roleAssumerWithWebIdentity})())(i,n);if((e=>Boolean(e)&&"object"==typeof e&&"string"==typeof e.credential_process)(i))return(async(e,t)=>aD({...e,profile:t})())(n,e);if(cD(i))return(e=>{const{sso_start_url:t,sso_account_id:n,sso_session:r,sso_region:i,sso_role_name:o}=Mk(e);return Fk({ssoStartUrl:t,ssoAccountId:n,ssoSession:r,ssoRegion:i,ssoRoleName:o})()})(i);throw new Ln(`Profile ${e} could not be found or parsed in shared credentials file.`)},Gk=(e={})=>Fn(Mn(...e.profile||process.env[Gr]?[]:[RO()],Fk(e),((e={})=>async()=>{const t=await pi(e);return zk(Hr(e),t,e)})(e),aD(e),Uk(e),(e=>process.env[LO]||process.env[NO]?MO(e):process.env.AWS_EC2_METADATA_DISABLED?async()=>{throw new Ln("EC2 Instance Metadata Service access disabled")}:tD(e))(e),(async()=>{throw new Ln("Could not load credentials from any providers",!1)})),(e=>void 0!==e.expiration&&e.expiration.getTime()-Date.now()<3e5),(e=>void 0!==e.expiration)),Hk="required",Vk="type",$k="fn",Wk="argv",Kk="ref",Qk=!1,Xk=!0,Yk="booleanEquals",Jk="stringEquals",Zk="sigv4",eN="us-east-1",tN="endpoint",nN="https://sts.{Region}.{PartitionResult#dnsSuffix}",rN="tree",iN="error",oN="getAttr",sN={[Hk]:!1,[Vk]:"String"},aN={[Hk]:!0,default:!1,[Vk]:"Boolean"},cN={[Kk]:"Endpoint"},lN={[$k]:"isSet",[Wk]:[{[Kk]:"Region"}]},uN={[Kk]:"Region"},dN={[$k]:"aws.partition",[Wk]:[uN],assign:"PartitionResult"},pN={[Kk]:"UseFIPS"},hN={[Kk]:"UseDualStack"},fN={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:Zk,signingName:"sts",signingRegion:eN}]},headers:{}},mN={},gN={conditions:[{[$k]:Jk,[Wk]:[uN,"aws-global"]}],[tN]:fN,[Vk]:tN},yN={[$k]:Yk,[Wk]:[pN,!0]},bN={[$k]:Yk,[Wk]:[hN,!0]},vN={[$k]:oN,[Wk]:[{[Kk]:"PartitionResult"},"supportsFIPS"]},SN={[Kk]:"PartitionResult"},wN={[$k]:Yk,[Wk]:[!0,{[$k]:oN,[Wk]:[SN,"supportsDualStack"]}]},CN=[{[$k]:"isSet",[Wk]:[cN]}],TN=[yN],EN=[bN],_N={version:"1.0",parameters:{Region:sN,UseDualStack:aN,UseFIPS:aN,Endpoint:sN,UseGlobalEndpoint:aN},rules:[{conditions:[{[$k]:Yk,[Wk]:[{[Kk]:"UseGlobalEndpoint"},Xk]},{[$k]:"not",[Wk]:CN},lN,dN,{[$k]:Yk,[Wk]:[pN,Qk]},{[$k]:Yk,[Wk]:[hN,Qk]}],rules:[{conditions:[{[$k]:Jk,[Wk]:[uN,"ap-northeast-1"]}],endpoint:fN,[Vk]:tN},{conditions:[{[$k]:Jk,[Wk]:[uN,"ap-south-1"]}],endpoint:fN,[Vk]:tN},{conditions:[{[$k]:Jk,[Wk]:[uN,"ap-southeast-1"]}],endpoint:fN,[Vk]:tN},{conditions:[{[$k]:Jk,[Wk]:[uN,"ap-southeast-2"]}],endpoint:fN,[Vk]:tN},gN,{conditions:[{[$k]:Jk,[Wk]:[uN,"ca-central-1"]}],endpoint:fN,[Vk]:tN},{conditions:[{[$k]:Jk,[Wk]:[uN,"eu-central-1"]}],endpoint:fN,[Vk]:tN},{conditions:[{[$k]:Jk,[Wk]:[uN,"eu-north-1"]}],endpoint:fN,[Vk]:tN},{conditions:[{[$k]:Jk,[Wk]:[uN,"eu-west-1"]}],endpoint:fN,[Vk]:tN},{conditions:[{[$k]:Jk,[Wk]:[uN,"eu-west-2"]}],endpoint:fN,[Vk]:tN},{conditions:[{[$k]:Jk,[Wk]:[uN,"eu-west-3"]}],endpoint:fN,[Vk]:tN},{conditions:[{[$k]:Jk,[Wk]:[uN,"sa-east-1"]}],endpoint:fN,[Vk]:tN},{conditions:[{[$k]:Jk,[Wk]:[uN,eN]}],endpoint:fN,[Vk]:tN},{conditions:[{[$k]:Jk,[Wk]:[uN,"us-east-2"]}],endpoint:fN,[Vk]:tN},{conditions:[{[$k]:Jk,[Wk]:[uN,"us-west-1"]}],endpoint:fN,[Vk]:tN},{conditions:[{[$k]:Jk,[Wk]:[uN,"us-west-2"]}],endpoint:fN,[Vk]:tN},{endpoint:{url:nN,properties:{authSchemes:[{name:Zk,signingName:"sts",signingRegion:"{Region}"}]},headers:mN},[Vk]:tN}],[Vk]:rN},{conditions:CN,rules:[{conditions:TN,error:"Invalid Configuration: FIPS and custom endpoint are not supported",[Vk]:iN},{conditions:EN,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",[Vk]:iN},{endpoint:{url:cN,properties:mN,headers:mN},[Vk]:tN}],[Vk]:rN},{conditions:[lN],rules:[{conditions:[dN],rules:[{conditions:[yN,bN],rules:[{conditions:[{[$k]:Yk,[Wk]:[Xk,vN]},wN],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:mN,headers:mN},[Vk]:tN}],[Vk]:rN},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",[Vk]:iN}],[Vk]:rN},{conditions:TN,rules:[{conditions:[{[$k]:Yk,[Wk]:[vN,Xk]}],rules:[{conditions:[{[$k]:Jk,[Wk]:[{[$k]:oN,[Wk]:[SN,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:mN,headers:mN},[Vk]:tN},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:mN,headers:mN},[Vk]:tN}],[Vk]:rN},{error:"FIPS is enabled but this partition does not support FIPS",[Vk]:iN}],[Vk]:rN},{conditions:EN,rules:[{conditions:[wN],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:mN,headers:mN},[Vk]:tN}],[Vk]:rN},{error:"DualStack is enabled but this partition does not support DualStack",[Vk]:iN}],[Vk]:rN},gN,{endpoint:{url:nN,properties:mN,headers:mN},[Vk]:tN}],[Vk]:rN}],[Vk]:rN},{error:"Invalid Configuration: Missing Region",[Vk]:iN}]},xN=(e,t={})=>fr(_N,{endpointParams:e,logger:t.logger}),RN=e=>{const t=e.httpAuthSchemes;let n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){const n=t.findIndex((t=>t.schemeId===e.schemeId));-1===n?t.push(e):t.splice(n,1,e)},httpAuthSchemes:()=>t,setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider:()=>n,setCredentials(e){r=e},credentials:()=>r}};class IN extends D{constructor(...[e]){const t=(n=(e=>{Je(process.version);const t=VD(e),n=()=>t().then(Xe),r=(e=>({apiVersion:"2011-06-15",base64Decoder:e?.base64Decoder??M,base64Encoder:e?.base64Encoder??F,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??xN,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??vO,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4"),signer:new xO},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new ea}],logger:e?.logger??new _,serviceId:e?.serviceId??"STS",urlParser:e?.urlParser??gi,utf8Decoder:e?.utf8Decoder??q,utf8Encoder:e?.utf8Encoder??U}))(e);return wO(process.version),{...r,...e,runtime:"node",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??fD,credentialDefaultProvider:e?.credentialDefaultProvider??gO(Gk),defaultUserAgentProvider:e?.defaultUserAgentProvider??dD({serviceId:r.serviceId,clientVersion:"3.490.0"}),httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:e=>e.getIdentityProvider("aws.auth#sigv4")||(async e=>await gO(Gk)(e?.__config||{})()),signer:new xO},{schemeId:"smithy.api#noAuth",identityProvider:e=>e.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new ea}],maxAttempts:e?.maxAttempts??hi(Wi),region:e?.region??hi(Rr,Ir),requestHandler:e?.requestHandler??new Y(n),retryMode:e?.retryMode??hi({...Qi,default:async()=>(await n()).retryMode||Ri}),sha256:e?.sha256??pD.bind(null,"sha256"),streamCollector:e?.streamCollector??Z,useDualstackEndpoint:e?.useDualstackEndpoint??hi(_r),useFipsEndpoint:e?.useFipsEndpoint??hi(xr)}})(e||{}),{...n,useDualstackEndpoint:n.useDualstackEndpoint??!1,useFipsEndpoint:n.useFipsEndpoint??!1,useGlobalEndpoint:n.useGlobalEndpoint??!1,defaultSigningName:"sts"});var n;const o=Dr(t),s=_i(o),a=((e,t)=>{const n={...KD(e),...rt(e),...r(e),...RN(e)};return t.forEach((e=>e.configure(n))),{...e,...QD(n),...it(n),...i(n),...(o=n,{httpAuthSchemes:o.httpAuthSchemes(),httpAuthSchemeProvider:o.httpAuthSchemeProvider(),credentials:o.credentials()})};var o})((e=>{const t=(n=e,{...n,stsClientCtor:IN});var n;return{...yO(t)}})(Gn(Ki(s))),e?.extensions||[]);super(a),this.config=a,this.middlewareStack.use(eo(this.config)),this.middlewareStack.use(Nr(this.config)),this.middlewareStack.use(v(this.config)),this.middlewareStack.use(w(this.config)),this.middlewareStack.use(E(this.config)),this.middlewareStack.use(Er(this.config)),this.middlewareStack.use(((e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n})=>({applyToStack:r=>{r.addRelativeTo(((e,t)=>(n,r)=>async i=>{const o=e.httpAuthSchemeProvider(await t.httpAuthSchemeParametersProvider(e,r,i.input)),s=function(e){const t=new Map;for(const n of e)t.set(n.schemeId,n);return t}(e.httpAuthSchemes),a=Vt(r),c=[];for(const n of o){const i=s.get(n.schemeId);if(!i){c.push(`HttpAuthScheme \`${n.schemeId}\` was not enabled for this service.`);continue}const o=i.identityProvider(await t.identityProviderConfigProvider(e));if(!o){c.push(`HttpAuthScheme \`${n.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:l={},signingProperties:u={}}=n.propertiesExtractor?.(e,r)||{};n.identityProperties=Object.assign(n.identityProperties||{},l),n.signingProperties=Object.assign(n.signingProperties||{},u),a.selectedHttpAuthScheme={httpAuthOption:n,identity:await o(n.identityProperties),signer:i.signer};break}if(!a.selectedHttpAuthScheme)throw new Error(c.join("\n"));return n(i)})(e,{httpAuthSchemeParametersProvider:t,identityProviderConfigProvider:n}),Qs)}}))(this.config,{httpAuthSchemeParametersProvider:this.getDefaultHttpAuthSchemeParametersProvider(),identityProviderConfigProvider:this.getIdentityProviderConfigProvider()})),this.middlewareStack.use((this.config,{applyToStack:e=>{e.addRelativeTo(((e,t)=>async n=>{if(!m.isInstance(n.request))return e(n);const r=Vt(t).selectedHttpAuthScheme;if(!r)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:i={}},identity:o,signer:s}=r,a=await e({...n,request:await s.sign(n.request,o,i)}).catch((s.errorHandler||Xs)(i));return(s.successHandler||Ys)(a.response,i),a}),Js)}}))}destroy(){super.destroy()}getDefaultHttpAuthSchemeParametersProvider(){return bO}getIdentityProviderConfigProvider(){return async e=>new Zs({"aws.auth#sigv4":e.credentials})}}const PN=(e,t)=>t?class extends e{constructor(e){super(e);for(const e of t)this.middlewareStack.use(e)}}:e,ON=(e={},t)=>fO(e,PN(IN,t)),DN=(e={},t)=>mO(e,PN(IN,t)),AN={environmentVariableSelector:e=>wn(e,"AWS_S3_USE_ARN_REGION",Cn.ENV),configFileSelector:e=>wn(e,"s3_use_arn_region",Cn.CONFIG),default:!1};function kN(e,t){return async function(n){const{value:r}=n.headers[":message-type"];if("error"===r){const e=new Error(n.headers[":error-message"].value||"UnknownError");throw e.name=n.headers[":error-code"].value,e}if("exception"===r){const r=n.headers[":exception-type"].value,i={[r]:n},o=await e(i);if(o.$unknown){const e=new Error(t(n.body));throw e.name=r,e}throw o[r]}if("event"===r){const t={[n.headers[":event-type"].value]:n},r=await e(t);if(r.$unknown)return;return r}throw Error(`Unrecognizable event type: ${n.headers[":event-type"].value}`)}}class NN{constructor({utf8Encoder:e,utf8Decoder:t}){this.eventStreamCodec=new Bt(e,t),this.utfEncoder=e}deserialize(e,t){const n=function(e){let t=0,n=0,r=null,i=null;const o=e=>{if("number"!=typeof e)throw new Error("Attempted to allocate an event message where size was not a number: "+e);t=e,n=4,r=new Uint8Array(e),new DataView(r.buffer).setUint32(0,e,!1)};return{[Symbol.asyncIterator]:async function*(){const s=e[Symbol.asyncIterator]();for(;;){const{value:e,done:a}=await s.next();if(a){if(!t)return;if(t!==n)throw new Error("Truncated event message received.");return void(yield r)}const c=e.length;let l=0;for(;l<c;){if(!r){const t=c-l;i||(i=new Uint8Array(4));const r=Math.min(4-n,t);if(i.set(e.slice(l,l+r),n),n+=r,l+=r,n<4)break;o(new DataView(i.buffer).getUint32(0,!1)),i=null}const s=Math.min(t-n,c-l);r.set(e.slice(l,l+s),n),n+=s,l+=s,t&&t===n&&(yield r,r=null,t=0,n=0)}}}}}(e);return new Gt({messageStream:new Ut({inputStream:n,decoder:this.eventStreamCodec}),deserializer:kN(t,this.utfEncoder)})}serialize(e,t){return new zt({messageStream:new Ht({inputStream:e,serializer:t}),encoder:this.eventStreamCodec,includeEndFrame:!0})}}class LN{constructor({utf8Encoder:e,utf8Decoder:t}){this.universalMarshaller=new NN({utf8Decoder:t,utf8Encoder:e})}deserialize(e,t){const n="function"==typeof e[Symbol.asyncIterator]?e:async function*(e){let t=!1,n=!1;const r=new Array;for(e.on("error",(e=>{if(t||(t=!0),e)throw e})),e.on("data",(e=>{r.push(e)})),e.on("end",(()=>{t=!0}));!n;){const e=await new Promise((e=>setTimeout((()=>e(r.shift())),0)));e&&(yield e),n=t&&0===r.length}}(e);return this.universalMarshaller.deserialize(n,t)}serialize(e,t){return G.Readable.from(this.universalMarshaller.serialize(e,t))}}const jN=e=>new LN(e);class MN extends G.Writable{constructor(e,t){super(t),this.hash=e}_write(e,t,n){try{this.hash.update(B(e))}catch(e){return n(e)}n()}}const FN=(e,t)=>{if(null!==t.readableFlowing)throw new Error("Unable to calculate hash for flowing readable stream");const n=new e,r=new MN(n);return t.pipe(r),new Promise(((e,i)=>{t.on("error",(e=>{r.end(),i(e)})),r.on("error",i),r.on("finish",(()=>{n.digest().then(e).catch(i)}))}))};class qN{constructor(e){this.sigv4Signer=new xn(e),this.signerOptions=e}async sign(e,t={}){if("*"===t.signingRegion){if("node"!==this.signerOptions.runtime)throw new Error("This request requires signing with SigV4Asymmetric algorithm. It's only available in Node.js");return this.getSigv4aSigner().sign(e,t)}return this.sigv4Signer.sign(e,t)}async signWithCredentials(e,t,n={}){if("*"===n.signingRegion){if("node"!==this.signerOptions.runtime)throw new Error("This request requires signing with SigV4Asymmetric algorithm. It's only available in Node.js");return this.getSigv4aSigner().signWithCredentials(e,t,n)}return this.sigv4Signer.signWithCredentials(e,t,n)}async presign(e,t={}){if("*"===t.signingRegion){if("node"!==this.signerOptions.runtime)throw new Error("This request requires signing with SigV4Asymmetric algorithm. It's only available in Node.js");return this.getSigv4aSigner().presign(e,t)}return this.sigv4Signer.presign(e,t)}async presignWithCredentials(e,t,n={}){if("*"===n.signingRegion)throw new Error("Method presignWithCredentials is not supported for [signingRegion=*].");return this.sigv4Signer.presignWithCredentials(e,t,n)}getSigv4aSigner(){if(!this.sigv4aSigner){let e=null;try{if(e=null,"function"!=typeof e)throw new Error}catch(e){throw e.message=`${e.message}\nPlease check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. \nYou must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. \nFor more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt`,e}this.sigv4aSigner=new e({...this.signerOptions,signingAlgorithm:1})}return this.sigv4aSigner}}const BN="required",UN="type",zN="conditions",GN="fn",HN="argv",VN="ref",$N="assign",WN="url",KN="properties",QN="backend",XN="authSchemes",YN="disableDoubleEncoding",JN="signingName",ZN="signingRegion",eL="headers",tL=!0,nL="isSet",rL="booleanEquals",iL="error",oL="aws.partition",sL="stringEquals",aL="getAttr",cL="name",lL="substring",uL="bucketSuffix",dL="parseURL",pL="{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",hL="endpoint",fL="tree",mL="aws.isVirtualHostableS3Bucket",gL="{url#scheme}://{Bucket}.{url#authority}{url#path}",yL="not",bL="{url#scheme}://{url#authority}{url#path}",vL="hardwareType",SL="regionPrefix",wL="bucketAliasSuffix",CL="outpostId",TL="isValidHostLabel",EL="s3-outposts",_L="s3",xL="{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}",RL="https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}",IL="https://{Bucket}.s3.{partitionResult#dnsSuffix}",PL="aws.parseArn",OL="bucketArn",DL="arnType",AL="s3-object-lambda",kL="accesspoint",NL="accessPointName",LL="{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}",jL="mrapPartition",ML="outpostType",FL="arnPrefix",qL="{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}",BL="https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",UL="https://s3.{partitionResult#dnsSuffix}",zL={[BN]:!1,[UN]:"String"},GL={[BN]:!0,default:!1,[UN]:"Boolean"},HL={[BN]:!1,[UN]:"Boolean"},VL={[GN]:rL,[HN]:[{[VN]:"Accelerate"},!0]},$L={[GN]:rL,[HN]:[{[VN]:"UseFIPS"},!0]},WL={[GN]:rL,[HN]:[{[VN]:"UseDualStack"},!0]},KL={[GN]:nL,[HN]:[{[VN]:"Endpoint"}]},QL={[GN]:oL,[HN]:[{[VN]:"Region"}],[$N]:"partitionResult"},XL={[GN]:sL,[HN]:[{[GN]:aL,[HN]:[{[VN]:"partitionResult"},cL]},"aws-cn"]},YL={[GN]:nL,[HN]:[{[VN]:"Bucket"}]},JL={[VN]:"Bucket"},ZL={[GN]:dL,[HN]:[{[VN]:"Endpoint"}],[$N]:"url"},ej={[GN]:rL,[HN]:[{[GN]:aL,[HN]:[{[VN]:"url"},"isIp"]},!0]},tj={[VN]:"url"},nj={[GN]:"uriEncode",[HN]:[JL],[$N]:"uri_encoded_bucket"},rj={[QN]:"S3Express",[XN]:[{[YN]:!0,[cL]:"sigv4",[JN]:"s3express",[ZN]:"{Region}"}]},ij={},oj={[GN]:mL,[HN]:[JL,!1]},sj={[iL]:"S3Express bucket name is not a valid virtual hostable name.",[UN]:iL},aj={[QN]:"S3Express",[XN]:[{[YN]:!0,[cL]:"sigv4-s3express",[JN]:"s3express",[ZN]:"{Region}"}]},cj={[GN]:nL,[HN]:[{[VN]:"UseS3ExpressControlEndpoint"}]},lj={[GN]:rL,[HN]:[{[VN]:"UseS3ExpressControlEndpoint"},!0]},uj={[GN]:yL,[HN]:[KL]},dj={[iL]:"Unrecognized S3Express bucket name format.",[UN]:iL},pj={[GN]:yL,[HN]:[YL]},hj={[VN]:vL},fj={[zN]:[uj],[iL]:"Expected a endpoint to be specified but no endpoint was found",[UN]:iL},mj={[XN]:[{[YN]:!0,[cL]:"sigv4",[JN]:EL,[ZN]:"{Region}"}]},gj={[GN]:rL,[HN]:[{[VN]:"ForcePathStyle"},!1]},yj={[VN]:"ForcePathStyle"},bj={[GN]:rL,[HN]:[{[VN]:"Accelerate"},!1]},vj={[GN]:sL,[HN]:[{[VN]:"Region"},"aws-global"]},Sj={[XN]:[{[YN]:!0,[cL]:"sigv4",[JN]:_L,[ZN]:"us-east-1"}]},wj={[GN]:yL,[HN]:[vj]},Cj={[GN]:rL,[HN]:[{[VN]:"UseGlobalEndpoint"},!0]},Tj={[WN]:"https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[KN]:{[XN]:[{[YN]:!0,[cL]:"sigv4",[JN]:_L,[ZN]:"{Region}"}]},[eL]:{}},Ej={[XN]:[{[YN]:!0,[cL]:"sigv4",[JN]:_L,[ZN]:"{Region}"}]},_j={[GN]:rL,[HN]:[{[VN]:"UseGlobalEndpoint"},!1]},xj={[GN]:rL,[HN]:[{[VN]:"UseDualStack"},!1]},Rj={[WN]:"https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}",[KN]:Ej,[eL]:{}},Ij={[GN]:rL,[HN]:[{[VN]:"UseFIPS"},!1]},Pj={[WN]:"https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}",[KN]:Ej,[eL]:{}},Oj={[WN]:"https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}",[KN]:Ej,[eL]:{}},Dj={[GN]:rL,[HN]:[{[GN]:aL,[HN]:[tj,"isIp"]},!1]},Aj={[WN]:xL,[KN]:Ej,[eL]:{}},kj={[WN]:gL,[KN]:Ej,[eL]:{}},Nj={[hL]:kj,[UN]:hL},Lj={[WN]:RL,[KN]:Ej,[eL]:{}},jj={[WN]:"https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}",[KN]:Ej,[eL]:{}},Mj={[iL]:"Invalid region: region was not a valid DNS name.",[UN]:iL},Fj={[VN]:OL},qj={[VN]:DL},Bj={[GN]:aL,[HN]:[Fj,"service"]},Uj={[VN]:NL},zj={[zN]:[WL],[iL]:"S3 Object Lambda does not support Dual-stack",[UN]:iL},Gj={[zN]:[VL],[iL]:"S3 Object Lambda does not support S3 Accelerate",[UN]:iL},Hj={[zN]:[{[GN]:nL,[HN]:[{[VN]:"DisableAccessPoints"}]},{[GN]:rL,[HN]:[{[VN]:"DisableAccessPoints"},!0]}],[iL]:"Access points are not supported for this operation",[UN]:iL},Vj={[zN]:[{[GN]:nL,[HN]:[{[VN]:"UseArnRegion"}]},{[GN]:rL,[HN]:[{[VN]:"UseArnRegion"},!1]},{[GN]:yL,[HN]:[{[GN]:sL,[HN]:[{[GN]:aL,[HN]:[Fj,"region"]},"{Region}"]}]}],[iL]:"Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`",[UN]:iL},$j={[GN]:aL,[HN]:[{[VN]:"bucketPartition"},cL]},Wj={[GN]:aL,[HN]:[Fj,"accountId"]},Kj={[XN]:[{[YN]:!0,[cL]:"sigv4",[JN]:AL,[ZN]:"{bucketArn#region}"}]},Qj={[iL]:"Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`",[UN]:iL},Xj={[iL]:"Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`",[UN]:iL},Yj={[iL]:"Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)",[UN]:iL},Jj={[iL]:"Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`",[UN]:iL},Zj={[iL]:"Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.",[UN]:iL},eM={[iL]:"Invalid ARN: Expected a resource of the format `accesspoint:<accesspoint name>` but no name was provided",[UN]:iL},tM={[XN]:[{[YN]:!0,[cL]:"sigv4",[JN]:_L,[ZN]:"{bucketArn#region}"}]},nM={[XN]:[{[YN]:!0,[cL]:"sigv4",[JN]:EL,[ZN]:"{bucketArn#region}"}]},rM={[GN]:PL,[HN]:[JL]},iM={[WN]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[KN]:Ej,[eL]:{}},oM={[WN]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[KN]:Ej,[eL]:{}},sM={[WN]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[KN]:Ej,[eL]:{}},aM={[WN]:qL,[KN]:Ej,[eL]:{}},cM={[WN]:"https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[KN]:Ej,[eL]:{}},lM={[VN]:"UseObjectLambdaEndpoint"},uM={[XN]:[{[YN]:!0,[cL]:"sigv4",[JN]:AL,[ZN]:"{Region}"}]},dM={[WN]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[KN]:Ej,[eL]:{}},pM={[WN]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}",[KN]:Ej,[eL]:{}},hM={[WN]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}",[KN]:Ej,[eL]:{}},fM={[WN]:bL,[KN]:Ej,[eL]:{}},mM={[WN]:"https://s3.{Region}.{partitionResult#dnsSuffix}",[KN]:Ej,[eL]:{}},gM=[{[VN]:"Region"}],yM=[{[VN]:"Endpoint"}],bM=[JL],vM=[WL],SM=[VL],wM=[KL,ZL],CM=[{[GN]:nL,[HN]:[{[VN]:"DisableS3ExpressSessionAuth"}]},{[GN]:rL,[HN]:[{[VN]:"DisableS3ExpressSessionAuth"},!0]}],TM=[ej],EM=[nj],_M=[oj],xM=[$L],RM=[{[GN]:lL,[HN]:[JL,6,14,!0],[$N]:"s3expressAvailabilityZoneId"},{[GN]:lL,[HN]:[JL,14,16,!0],[$N]:"s3expressAvailabilityZoneDelim"},{[GN]:sL,[HN]:[{[VN]:"s3expressAvailabilityZoneDelim"},"--"]}],IM=[{[zN]:[$L],[hL]:{[WN]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com",[KN]:rj,[eL]:{}},[UN]:hL},{[hL]:{[WN]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com",[KN]:rj,[eL]:{}},[UN]:hL}],PM=[{[GN]:lL,[HN]:[JL,6,15,!0],[$N]:"s3expressAvailabilityZoneId"},{[GN]:lL,[HN]:[JL,15,17,!0],[$N]:"s3expressAvailabilityZoneDelim"},{[GN]:sL,[HN]:[{[VN]:"s3expressAvailabilityZoneDelim"},"--"]}],OM=[{[zN]:[$L],[hL]:{[WN]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com",[KN]:aj,[eL]:{}},[UN]:hL},{[hL]:{[WN]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com",[KN]:aj,[eL]:{}},[UN]:hL}],DM=[YL],AM=[{[GN]:TL,[HN]:[{[VN]:CL},!1]}],kM=[{[GN]:sL,[HN]:[{[VN]:SL},"beta"]}],NM=[QL],LM=[{[GN]:TL,[HN]:[{[VN]:"Region"},!1]}],jM=[{[GN]:sL,[HN]:[{[VN]:"Region"},"us-east-1"]}],MM=[{[GN]:sL,[HN]:[qj,kL]}],FM=[{[GN]:aL,[HN]:[Fj,"resourceId[1]"],[$N]:NL},{[GN]:yL,[HN]:[{[GN]:sL,[HN]:[Uj,""]}]}],qM=[Fj,"resourceId[1]"],BM=[{[GN]:yL,[HN]:[{[GN]:sL,[HN]:[{[GN]:aL,[HN]:[Fj,"region"]},""]}]}],UM=[{[GN]:yL,[HN]:[{[GN]:nL,[HN]:[{[GN]:aL,[HN]:[Fj,"resourceId[2]"]}]}]}],zM=[Fj,"resourceId[2]"],GM=[{[GN]:oL,[HN]:[{[GN]:aL,[HN]:[Fj,"region"]}],[$N]:"bucketPartition"}],HM=[{[GN]:sL,[HN]:[$j,{[GN]:aL,[HN]:[{[VN]:"partitionResult"},cL]}]}],VM=[{[GN]:TL,[HN]:[{[GN]:aL,[HN]:[Fj,"region"]},!0]}],$M=[{[GN]:TL,[HN]:[Wj,!1]}],WM=[{[GN]:TL,[HN]:[Uj,!1]}],KM=[{[GN]:TL,[HN]:[{[VN]:"Region"},!0]}],QM={version:"1.0",parameters:{Bucket:zL,Region:zL,UseFIPS:GL,UseDualStack:GL,Endpoint:zL,ForcePathStyle:GL,Accelerate:GL,UseGlobalEndpoint:GL,UseObjectLambdaEndpoint:HL,Key:zL,Prefix:zL,DisableAccessPoints:HL,DisableMultiRegionAccessPoints:GL,UseArnRegion:HL,UseS3ExpressControlEndpoint:HL,DisableS3ExpressSessionAuth:HL},rules:[{[zN]:[{[GN]:nL,[HN]:gM}],rules:[{[zN]:[VL,$L],error:"Accelerate cannot be used with FIPS",[UN]:iL},{[zN]:[WL,KL],error:"Cannot set dual-stack in combination with a custom endpoint.",[UN]:iL},{[zN]:[KL,$L],error:"A custom endpoint cannot be combined with FIPS",[UN]:iL},{[zN]:[KL,VL],error:"A custom endpoint cannot be combined with S3 Accelerate",[UN]:iL},{[zN]:[$L,QL,XL],error:"Partition does not support FIPS",[UN]:iL},{[zN]:[YL,{[GN]:lL,[HN]:[JL,0,6,tL],[$N]:uL},{[GN]:sL,[HN]:[{[VN]:uL},"--x-s3"]}],rules:[{[zN]:vM,error:"S3Express does not support Dual-stack.",[UN]:iL},{[zN]:SM,error:"S3Express does not support S3 Accelerate.",[UN]:iL},{[zN]:wM,rules:[{[zN]:CM,rules:[{[zN]:TM,rules:[{[zN]:EM,rules:[{endpoint:{[WN]:pL,[KN]:rj,[eL]:ij},[UN]:hL}],[UN]:fL}],[UN]:fL},{[zN]:_M,rules:[{endpoint:{[WN]:gL,[KN]:rj,[eL]:ij},[UN]:hL}],[UN]:fL},sj],[UN]:fL},{[zN]:TM,rules:[{[zN]:EM,rules:[{endpoint:{[WN]:pL,[KN]:aj,[eL]:ij},[UN]:hL}],[UN]:fL}],[UN]:fL},{[zN]:_M,rules:[{endpoint:{[WN]:gL,[KN]:aj,[eL]:ij},[UN]:hL}],[UN]:fL},sj],[UN]:fL},{[zN]:[cj,lj],rules:[{[zN]:[nj,uj],rules:[{[zN]:xM,endpoint:{[WN]:"https://s3express-control-fips.{Region}.amazonaws.com/{uri_encoded_bucket}",[KN]:rj,[eL]:ij},[UN]:hL},{endpoint:{[WN]:"https://s3express-control.{Region}.amazonaws.com/{uri_encoded_bucket}",[KN]:rj,[eL]:ij},[UN]:hL}],[UN]:fL}],[UN]:fL},{[zN]:_M,rules:[{[zN]:CM,rules:[{[zN]:RM,rules:IM,[UN]:fL},{[zN]:PM,rules:IM,[UN]:fL},dj],[UN]:fL},{[zN]:RM,rules:OM,[UN]:fL},{[zN]:PM,rules:OM,[UN]:fL},dj],[UN]:fL},sj],[UN]:fL},{[zN]:[pj,cj,lj],rules:[{[zN]:wM,endpoint:{[WN]:bL,[KN]:rj,[eL]:ij},[UN]:hL},{[zN]:xM,endpoint:{[WN]:"https://s3express-control-fips.{Region}.amazonaws.com",[KN]:rj,[eL]:ij},[UN]:hL},{endpoint:{[WN]:"https://s3express-control.{Region}.amazonaws.com",[KN]:rj,[eL]:ij},[UN]:hL}],[UN]:fL},{[zN]:[YL,{[GN]:lL,[HN]:[JL,49,50,tL],[$N]:vL},{[GN]:lL,[HN]:[JL,8,12,tL],[$N]:SL},{[GN]:lL,[HN]:[JL,0,7,tL],[$N]:wL},{[GN]:lL,[HN]:[JL,32,49,tL],[$N]:CL},{[GN]:oL,[HN]:gM,[$N]:"regionPartition"},{[GN]:sL,[HN]:[{[VN]:wL},"--op-s3"]}],rules:[{[zN]:AM,rules:[{[zN]:[{[GN]:sL,[HN]:[hj,"e"]}],rules:[{[zN]:kM,rules:[fj,{[zN]:wM,endpoint:{[WN]:"https://{Bucket}.ec2.{url#authority}",[KN]:mj,[eL]:ij},[UN]:hL}],[UN]:fL},{endpoint:{[WN]:"https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}",[KN]:mj,[eL]:ij},[UN]:hL}],[UN]:fL},{[zN]:[{[GN]:sL,[HN]:[hj,"o"]}],rules:[{[zN]:kM,rules:[fj,{[zN]:wM,endpoint:{[WN]:"https://{Bucket}.op-{outpostId}.{url#authority}",[KN]:mj,[eL]:ij},[UN]:hL}],[UN]:fL},{endpoint:{[WN]:"https://{Bucket}.op-{outpostId}.s3-outposts.{Region}.{regionPartition#dnsSuffix}",[KN]:mj,[eL]:ij},[UN]:hL}],[UN]:fL},{error:'Unrecognized hardware type: "Expected hardware type o or e but got {hardwareType}"',[UN]:iL}],[UN]:fL},{error:"Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.",[UN]:iL}],[UN]:fL},{[zN]:DM,rules:[{[zN]:[KL,{[GN]:yL,[HN]:[{[GN]:nL,[HN]:[{[GN]:dL,[HN]:yM}]}]}],error:"Custom endpoint `{Endpoint}` was not a valid URI",[UN]:iL},{[zN]:[gj,oj],rules:[{[zN]:NM,rules:[{[zN]:LM,rules:[{[zN]:[VL,XL],error:"S3 Accelerate cannot be used in this region",[UN]:iL},{[zN]:[WL,$L,bj,uj,vj],endpoint:{[WN]:"https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",[KN]:Sj,[eL]:ij},[UN]:hL},{[zN]:[WL,$L,bj,uj,wj,Cj],rules:[{endpoint:Tj,[UN]:hL}],[UN]:fL},{[zN]:[WL,$L,bj,uj,wj,_j],endpoint:Tj,[UN]:hL},{[zN]:[xj,$L,bj,uj,vj],endpoint:{[WN]:"https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}",[KN]:Sj,[eL]:ij},[UN]:hL},{[zN]:[xj,$L,bj,uj,wj,Cj],rules:[{endpoint:Rj,[UN]:hL}],[UN]:fL},{[zN]:[xj,$L,bj,uj,wj,_j],endpoint:Rj,[UN]:hL},{[zN]:[WL,Ij,VL,uj,vj],endpoint:{[WN]:"https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}",[KN]:Sj,[eL]:ij},[UN]:hL},{[zN]:[WL,Ij,VL,uj,wj,Cj],rules:[{endpoint:Pj,[UN]:hL}],[UN]:fL},{[zN]:[WL,Ij,VL,uj,wj,_j],endpoint:Pj,[UN]:hL},{[zN]:[WL,Ij,bj,uj,vj],endpoint:{[WN]:"https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",[KN]:Sj,[eL]:ij},[UN]:hL},{[zN]:[WL,Ij,bj,uj,wj,Cj],rules:[{endpoint:Oj,[UN]:hL}],[UN]:fL},{[zN]:[WL,Ij,bj,uj,wj,_j],endpoint:Oj,[UN]:hL},{[zN]:[xj,Ij,bj,KL,ZL,ej,vj],endpoint:{[WN]:xL,[KN]:Sj,[eL]:ij},[UN]:hL},{[zN]:[xj,Ij,bj,KL,ZL,Dj,vj],endpoint:{[WN]:gL,[KN]:Sj,[eL]:ij},[UN]:hL},{[zN]:[xj,Ij,bj,KL,ZL,ej,wj,Cj],rules:[{[zN]:jM,endpoint:Aj,[UN]:hL},{endpoint:Aj,[UN]:hL}],[UN]:fL},{[zN]:[xj,Ij,bj,KL,ZL,Dj,wj,Cj],rules:[{[zN]:jM,endpoint:kj,[UN]:hL},Nj],[UN]:fL},{[zN]:[xj,Ij,bj,KL,ZL,ej,wj,_j],endpoint:Aj,[UN]:hL},{[zN]:[xj,Ij,bj,KL,ZL,Dj,wj,_j],endpoint:kj,[UN]:hL},{[zN]:[xj,Ij,VL,uj,vj],endpoint:{[WN]:RL,[KN]:Sj,[eL]:ij},[UN]:hL},{[zN]:[xj,Ij,VL,uj,wj,Cj],rules:[{[zN]:jM,endpoint:Lj,[UN]:hL},{endpoint:Lj,[UN]:hL}],[UN]:fL},{[zN]:[xj,Ij,VL,uj,wj,_j],endpoint:Lj,[UN]:hL},{[zN]:[xj,Ij,bj,uj,vj],endpoint:{[WN]:IL,[KN]:Sj,[eL]:ij},[UN]:hL},{[zN]:[xj,Ij,bj,uj,wj,Cj],rules:[{[zN]:jM,endpoint:{[WN]:IL,[KN]:Ej,[eL]:ij},[UN]:hL},{endpoint:jj,[UN]:hL}],[UN]:fL},{[zN]:[xj,Ij,bj,uj,wj,_j],endpoint:jj,[UN]:hL}],[UN]:fL},Mj],[UN]:fL}],[UN]:fL},{[zN]:[KL,ZL,{[GN]:sL,[HN]:[{[GN]:aL,[HN]:[tj,"scheme"]},"http"]},{[GN]:mL,[HN]:[JL,tL]},gj,Ij,xj,bj],rules:[{[zN]:NM,rules:[{[zN]:LM,rules:[Nj],[UN]:fL},Mj],[UN]:fL}],[UN]:fL},{[zN]:[gj,{[GN]:PL,[HN]:bM,[$N]:OL}],rules:[{[zN]:[{[GN]:aL,[HN]:[Fj,"resourceId[0]"],[$N]:DL},{[GN]:yL,[HN]:[{[GN]:sL,[HN]:[qj,""]}]}],rules:[{[zN]:[{[GN]:sL,[HN]:[Bj,AL]}],rules:[{[zN]:MM,rules:[{[zN]:FM,rules:[zj,Gj,{[zN]:BM,rules:[Hj,{[zN]:UM,rules:[Vj,{[zN]:GM,rules:[{[zN]:NM,rules:[{[zN]:HM,rules:[{[zN]:VM,rules:[{[zN]:[{[GN]:sL,[HN]:[Wj,""]}],error:"Invalid ARN: Missing account id",[UN]:iL},{[zN]:$M,rules:[{[zN]:WM,rules:[{[zN]:wM,endpoint:{[WN]:LL,[KN]:Kj,[eL]:ij},[UN]:hL},{[zN]:xM,endpoint:{[WN]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",[KN]:Kj,[eL]:ij},[UN]:hL},{endpoint:{[WN]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}",[KN]:Kj,[eL]:ij},[UN]:hL}],[UN]:fL},Qj],[UN]:fL},Xj],[UN]:fL},Yj],[UN]:fL},Jj],[UN]:fL}],[UN]:fL}],[UN]:fL},Zj],[UN]:fL},{error:"Invalid ARN: bucket ARN is missing a region",[UN]:iL}],[UN]:fL},eM],[UN]:fL},{error:"Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`",[UN]:iL}],[UN]:fL},{[zN]:MM,rules:[{[zN]:FM,rules:[{[zN]:BM,rules:[{[zN]:MM,rules:[{[zN]:BM,rules:[Hj,{[zN]:UM,rules:[Vj,{[zN]:GM,rules:[{[zN]:NM,rules:[{[zN]:[{[GN]:sL,[HN]:[$j,"{partitionResult#name}"]}],rules:[{[zN]:VM,rules:[{[zN]:[{[GN]:sL,[HN]:[Bj,_L]}],rules:[{[zN]:$M,rules:[{[zN]:WM,rules:[{[zN]:SM,error:"Access Points do not support S3 Accelerate",[UN]:iL},{[zN]:[$L,WL],endpoint:{[WN]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",[KN]:tM,[eL]:ij},[UN]:hL},{[zN]:[$L,xj],endpoint:{[WN]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",[KN]:tM,[eL]:ij},[UN]:hL},{[zN]:[Ij,WL],endpoint:{[WN]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",[KN]:tM,[eL]:ij},[UN]:hL},{[zN]:[Ij,xj,KL,ZL],endpoint:{[WN]:LL,[KN]:tM,[eL]:ij},[UN]:hL},{[zN]:[Ij,xj],endpoint:{[WN]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}",[KN]:tM,[eL]:ij},[UN]:hL}],[UN]:fL},Qj],[UN]:fL},Xj],[UN]:fL},{error:"Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}",[UN]:iL}],[UN]:fL},Yj],[UN]:fL},Jj],[UN]:fL}],[UN]:fL}],[UN]:fL},Zj],[UN]:fL}],[UN]:fL}],[UN]:fL},{[zN]:[{[GN]:TL,[HN]:[Uj,tL]}],rules:[{[zN]:vM,error:"S3 MRAP does not support dual-stack",[UN]:iL},{[zN]:xM,error:"S3 MRAP does not support FIPS",[UN]:iL},{[zN]:SM,error:"S3 MRAP does not support S3 Accelerate",[UN]:iL},{[zN]:[{[GN]:rL,[HN]:[{[VN]:"DisableMultiRegionAccessPoints"},tL]}],error:"Invalid configuration: Multi-Region Access Point ARNs are disabled.",[UN]:iL},{[zN]:[{[GN]:oL,[HN]:gM,[$N]:jL}],rules:[{[zN]:[{[GN]:sL,[HN]:[{[GN]:aL,[HN]:[{[VN]:jL},cL]},{[GN]:aL,[HN]:[Fj,"partition"]}]}],rules:[{endpoint:{[WN]:"https://{accessPointName}.accesspoint.s3-global.{mrapPartition#dnsSuffix}",[KN]:{[XN]:[{[YN]:tL,name:"sigv4a",[JN]:_L,signingRegionSet:["*"]}]},[eL]:ij},[UN]:hL}],[UN]:fL},{error:"Client was configured for partition `{mrapPartition#name}` but bucket referred to partition `{bucketArn#partition}`",[UN]:iL}],[UN]:fL}],[UN]:fL},{error:"Invalid Access Point Name",[UN]:iL}],[UN]:fL},eM],[UN]:fL},{[zN]:[{[GN]:sL,[HN]:[Bj,EL]}],rules:[{[zN]:vM,error:"S3 Outposts does not support Dual-stack",[UN]:iL},{[zN]:xM,error:"S3 Outposts does not support FIPS",[UN]:iL},{[zN]:SM,error:"S3 Outposts does not support S3 Accelerate",[UN]:iL},{[zN]:[{[GN]:nL,[HN]:[{[GN]:aL,[HN]:[Fj,"resourceId[4]"]}]}],error:"Invalid Arn: Outpost Access Point ARN contains sub resources",[UN]:iL},{[zN]:[{[GN]:aL,[HN]:qM,[$N]:CL}],rules:[{[zN]:AM,rules:[Vj,{[zN]:GM,rules:[{[zN]:NM,rules:[{[zN]:HM,rules:[{[zN]:VM,rules:[{[zN]:$M,rules:[{[zN]:[{[GN]:aL,[HN]:zM,[$N]:ML}],rules:[{[zN]:[{[GN]:aL,[HN]:[Fj,"resourceId[3]"],[$N]:NL}],rules:[{[zN]:[{[GN]:sL,[HN]:[{[VN]:ML},kL]}],rules:[{[zN]:wM,endpoint:{[WN]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.{url#authority}",[KN]:nM,[eL]:ij},[UN]:hL},{endpoint:{[WN]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}",[KN]:nM,[eL]:ij},[UN]:hL}],[UN]:fL},{error:"Expected an outpost type `accesspoint`, found {outpostType}",[UN]:iL}],[UN]:fL},{error:"Invalid ARN: expected an access point name",[UN]:iL}],[UN]:fL},{error:"Invalid ARN: Expected a 4-component resource",[UN]:iL}],[UN]:fL},Xj],[UN]:fL},Yj],[UN]:fL},Jj],[UN]:fL}],[UN]:fL}],[UN]:fL},{error:"Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `{outpostId}`",[UN]:iL}],[UN]:fL},{error:"Invalid ARN: The Outpost Id was not set",[UN]:iL}],[UN]:fL},{error:"Invalid ARN: Unrecognized format: {Bucket} (type: {arnType})",[UN]:iL}],[UN]:fL},{error:"Invalid ARN: No ARN type specified",[UN]:iL}],[UN]:fL},{[zN]:[{[GN]:lL,[HN]:[JL,0,4,!1],[$N]:FL},{[GN]:sL,[HN]:[{[VN]:FL},"arn:"]},{[GN]:yL,[HN]:[{[GN]:nL,[HN]:[rM]}]}],error:"Invalid ARN: `{Bucket}` was not a valid ARN",[UN]:iL},{[zN]:[{[GN]:rL,[HN]:[yj,tL]},rM],error:"Path-style addressing cannot be used with ARN buckets",[UN]:iL},{[zN]:EM,rules:[{[zN]:NM,rules:[{[zN]:[bj],rules:[{[zN]:[WL,uj,$L,vj],endpoint:{[WN]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[KN]:Sj,[eL]:ij},[UN]:hL},{[zN]:[WL,uj,$L,wj,Cj],rules:[{endpoint:iM,[UN]:hL}],[UN]:fL},{[zN]:[WL,uj,$L,wj,_j],endpoint:iM,[UN]:hL},{[zN]:[xj,uj,$L,vj],endpoint:{[WN]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[KN]:Sj,[eL]:ij},[UN]:hL},{[zN]:[xj,uj,$L,wj,Cj],rules:[{endpoint:oM,[UN]:hL}],[UN]:fL},{[zN]:[xj,uj,$L,wj,_j],endpoint:oM,[UN]:hL},{[zN]:[WL,uj,Ij,vj],endpoint:{[WN]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[KN]:Sj,[eL]:ij},[UN]:hL},{[zN]:[WL,uj,Ij,wj,Cj],rules:[{endpoint:sM,[UN]:hL}],[UN]:fL},{[zN]:[WL,uj,Ij,wj,_j],endpoint:sM,[UN]:hL},{[zN]:[xj,KL,ZL,Ij,vj],endpoint:{[WN]:qL,[KN]:Sj,[eL]:ij},[UN]:hL},{[zN]:[xj,KL,ZL,Ij,wj,Cj],rules:[{[zN]:jM,endpoint:aM,[UN]:hL},{endpoint:aM,[UN]:hL}],[UN]:fL},{[zN]:[xj,KL,ZL,Ij,wj,_j],endpoint:aM,[UN]:hL},{[zN]:[xj,uj,Ij,vj],endpoint:{[WN]:BL,[KN]:Sj,[eL]:ij},[UN]:hL},{[zN]:[xj,uj,Ij,wj,Cj],rules:[{[zN]:jM,endpoint:{[WN]:BL,[KN]:Ej,[eL]:ij},[UN]:hL},{endpoint:cM,[UN]:hL}],[UN]:fL},{[zN]:[xj,uj,Ij,wj,_j],endpoint:cM,[UN]:hL}],[UN]:fL},{error:"Path-style addressing cannot be used with S3 Accelerate",[UN]:iL}],[UN]:fL}],[UN]:fL}],[UN]:fL},{[zN]:[{[GN]:nL,[HN]:[lM]},{[GN]:rL,[HN]:[lM,tL]}],rules:[{[zN]:NM,rules:[{[zN]:KM,rules:[zj,Gj,{[zN]:wM,endpoint:{[WN]:bL,[KN]:uM,[eL]:ij},[UN]:hL},{[zN]:xM,endpoint:{[WN]:"https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}",[KN]:uM,[eL]:ij},[UN]:hL},{endpoint:{[WN]:"https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}",[KN]:uM,[eL]:ij},[UN]:hL}],[UN]:fL},Mj],[UN]:fL}],[UN]:fL},{[zN]:[pj],rules:[{[zN]:NM,rules:[{[zN]:KM,rules:[{[zN]:[$L,WL,uj,vj],endpoint:{[WN]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",[KN]:Sj,[eL]:ij},[UN]:hL},{[zN]:[$L,WL,uj,wj,Cj],rules:[{endpoint:dM,[UN]:hL}],[UN]:fL},{[zN]:[$L,WL,uj,wj,_j],endpoint:dM,[UN]:hL},{[zN]:[$L,xj,uj,vj],endpoint:{[WN]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}",[KN]:Sj,[eL]:ij},[UN]:hL},{[zN]:[$L,xj,uj,wj,Cj],rules:[{endpoint:pM,[UN]:hL}],[UN]:fL},{[zN]:[$L,xj,uj,wj,_j],endpoint:pM,[UN]:hL},{[zN]:[Ij,WL,uj,vj],endpoint:{[WN]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",[KN]:Sj,[eL]:ij},[UN]:hL},{[zN]:[Ij,WL,uj,wj,Cj],rules:[{endpoint:hM,[UN]:hL}],[UN]:fL},{[zN]:[Ij,WL,uj,wj,_j],endpoint:hM,[UN]:hL},{[zN]:[Ij,xj,KL,ZL,vj],endpoint:{[WN]:bL,[KN]:Sj,[eL]:ij},[UN]:hL},{[zN]:[Ij,xj,KL,ZL,wj,Cj],rules:[{[zN]:jM,endpoint:fM,[UN]:hL},{endpoint:fM,[UN]:hL}],[UN]:fL},{[zN]:[Ij,xj,KL,ZL,wj,_j],endpoint:fM,[UN]:hL},{[zN]:[Ij,xj,uj,vj],endpoint:{[WN]:UL,[KN]:Sj,[eL]:ij},[UN]:hL},{[zN]:[Ij,xj,uj,wj,Cj],rules:[{[zN]:jM,endpoint:{[WN]:UL,[KN]:Ej,[eL]:ij},[UN]:hL},{endpoint:mM,[UN]:hL}],[UN]:fL},{[zN]:[Ij,xj,uj,wj,_j],endpoint:mM,[UN]:hL}],[UN]:fL},Mj],[UN]:fL}],[UN]:fL}],[UN]:fL},{error:"A region must be set when sending requests to S3.",[UN]:iL}]},XM=(e,t={})=>fr(QM,{endpointParams:e,logger:t.logger});class YM extends D{constructor(...[e]){const t=(e=>{Je(process.version);const t=VD(e),n=()=>t().then(Xe),r=(e=>({apiVersion:"2006-03-01",base64Decoder:e?.base64Decoder??M,base64Encoder:e?.base64Encoder??F,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??XM,extensions:e?.extensions??[],getAwsChunkedEncodingStream:e?.getAwsChunkedEncodingStream??H,logger:e?.logger??new _,sdkStreamMixin:e?.sdkStreamMixin??ne,serviceId:e?.serviceId??"S3",signerConstructor:e?.signerConstructor??qN,signingEscapePath:e?.signingEscapePath??!1,urlParser:e?.urlParser??gi,useArnRegion:e?.useArnRegion??!1,utf8Decoder:e?.utf8Decoder??q,utf8Encoder:e?.utf8Encoder??U}))(e);return wO(process.version),{...r,...e,runtime:"node",defaultsMode:t,bodyLengthChecker:e?.bodyLengthChecker??fD,credentialDefaultProvider:e?.credentialDefaultProvider??(i=Gk,e=>i({roleAssumer:ON(e),roleAssumerWithWebIdentity:DN(e),...e})),defaultUserAgentProvider:e?.defaultUserAgentProvider??dD({serviceId:r.serviceId,clientVersion:"3.490.0"}),disableS3ExpressSessionAuth:e?.disableS3ExpressSessionAuth??hi(_n),eventStreamSerdeProvider:e?.eventStreamSerdeProvider??jN,maxAttempts:e?.maxAttempts??hi(Wi),md5:e?.md5??pD.bind(null,"md5"),region:e?.region??hi(Rr,Ir),requestHandler:e?.requestHandler??new Y(n),retryMode:e?.retryMode??hi({...Qi,default:async()=>(await n()).retryMode||Ri}),sha1:e?.sha1??pD.bind(null,"sha1"),sha256:e?.sha256??pD.bind(null,"sha256"),streamCollector:e?.streamCollector??Z,streamHasher:e?.streamHasher??FN,useArnRegion:e?.useArnRegion??hi(AN),useDualstackEndpoint:e?.useDualstackEndpoint??hi(_r),useFipsEndpoint:e?.useFipsEndpoint??hi(xr)};var i})(e||{}),n=(o=t,{...o,useFipsEndpoint:o.useFipsEndpoint??!1,useDualstackEndpoint:o.useDualstackEndpoint??!1,forcePathStyle:o.forcePathStyle??!1,useAccelerateEndpoint:o.useAccelerateEndpoint??!1,useGlobalEndpoint:o.useGlobalEndpoint??!1,disableMultiregionAccessPoints:o.disableMultiregionAccessPoints??!1,defaultSigningName:"s3"});var o;const s=Dr(n),a=_i(s),c=(e=>{const t=e.credentials?"function"==typeof(o=e.credentials)?Fn(o,(e=>void 0!==e.expiration&&e.expiration.getTime()-Date.now()<3e5),(e=>void 0!==e.expiration)):$t(o):e.credentialDefaultProvider(e),{signingEscapePath:n=!0,systemClockOffset:r=e.systemClockOffset||0,sha256:i}=e;var o;let s;return s=e.signer?$t(e.signer):e.regionInfoProvider?()=>$t(e.region)().then((async t=>[await e.regionInfoProvider(t,{useFipsEndpoint:await e.useFipsEndpoint(),useDualstackEndpoint:await e.useDualstackEndpoint()})||{},t])).then((([r,o])=>{const{signingRegion:s,signingService:a}=r;e.signingRegion=e.signingRegion||s||o,e.signingName=e.signingName||a||e.serviceId;const c={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:i,uriEscapePath:n};return new(e.signerConstructor||bn)(c)})):async r=>{const o=(r=Object.assign({},{name:"sigv4",signingName:e.signingName||e.defaultSigningName,signingRegion:await $t(e.region)(),properties:{}},r)).signingRegion,s=r.signingName;e.signingRegion=e.signingRegion||o,e.signingName=e.signingName||s||e.serviceId;const a={...e,credentials:t,region:e.signingRegion,service:e.signingName,sha256:i,uriEscapePath:n};return new(e.signerConstructor||bn)(a)},{...e,systemClockOffset:r,signingEscapePath:n,credentials:t,signer:s}})(Ki(a)),l=((e,{session:t})=>{const[n,r]=t;return{...e,forcePathStyle:e.forcePathStyle??!1,useAccelerateEndpoint:e.useAccelerateEndpoint??!1,disableMultiregionAccessPoints:e.disableMultiregionAccessPoints??!1,followRegionRedirects:e.followRegionRedirects??!1,s3ExpressIdentityProvider:e.s3ExpressIdentityProvider??new wt((async e=>n().send(new r({Bucket:e,SessionMode:"ReadWrite"}))))}})(c,{session:[()=>this,xI]});var u;const d=((e,t)=>{const n={...KD(e),...rt(e),...r(e)};return t.forEach((e=>e.configure(n))),{...e,...QD(n),...it(n),...i(n)}})((u=Gn(l),{...u,eventStreamMarshaller:u.eventStreamSerdeProvider(u)}),e?.extensions||[]);var p;super(d),this.config=d,this.middlewareStack.use(eo(this.config)),this.middlewareStack.use(Nr(this.config)),this.middlewareStack.use(v(this.config)),this.middlewareStack.use(w(this.config)),this.middlewareStack.use(E(this.config)),this.middlewareStack.use((e=>({applyToStack:t=>{t.addRelativeTo((e=>(t,n)=>async function(r){if(!m.isInstance(r.request))return t(r);const i=n.endpointV2?.properties?.authSchemes?.[0],o="sigv4a"===i?.name?i?.signingRegionSet?.join(","):void 0,s=await e.signer(i);let a;const c={signingDate:qn(e.systemClockOffset),signingRegion:o||n.signing_region,signingService:n.signing_service};if(n.s3ExpressIdentity){const e=s;if(a=await e.signWithCredentials(r.request,n.s3ExpressIdentity,c),a.headers["X-Amz-Security-Token"]||a.headers["x-amz-security-token"])throw new Error("X-Amz-Security-Token must not be set for s3-express requests.")}else a=await s.sign(r.request,c);const l=await t({...r,request:a}).catch((t=>{const n=t.ServerTime??Un(t.$response);throw n&&(e.systemClockOffset=Bn(n,e.systemClockOffset)),t})),u=Un(l.response);return u&&(e.systemClockOffset=Bn(u,e.systemClockOffset)),l})(e),zn)}}))(this.config)),this.middlewareStack.use((this.config,{applyToStack:e=>{e.add((e=>async t=>{const{input:{Bucket:n}}=t;if("string"==typeof n&&!("string"==typeof(r=n)&&0===r.indexOf("arn:")&&r.split(":").length>=6)&&n.indexOf("/")>=0){const e=new Error(`Bucket name shouldn't contain '/', received '${n}'`);throw e.name="InvalidBucketName",e}var r;return e({...t})}),kn)}})),this.middlewareStack.use((e=>({applyToStack:t=>{t.add(function(e){return t=>async n=>{const{request:r}=n;return m.isInstance(r)&&r.body&&"node"===e.runtime&&(r.headers={...r.headers,Expect:"100-continue"}),t({...n,request:r})}}(e),y)}}))(this.config)),this.middlewareStack.use((p=this.config,{applyToStack:e=>{var t;e.add(function(e){return(t,n)=>async r=>{try{return await t(r)}catch(i){if(e.followRegionRedirects&&301===i?.$metadata?.httpStatusCode){try{const t=i.$response.headers["x-amz-bucket-region"];n.logger?.debug(`Redirecting from ${await e.region()} to ${t}`),n.__s3RegionRedirect=t}catch(e){throw new Error("Region redirect failed: "+e)}return t(r)}throw i}}}(p),bt),e.addRelativeTo((t=p,(e,n)=>async r=>{const i=await t.region(),o=t.region;n.__s3RegionRedirect&&(t.region=async()=>(t.region=o,n.__s3RegionRedirect));const s=await e(r);if(n.__s3RegionRedirect&&i!==await t.region())throw new Error("Region was not restored following S3 region redirect.");return s}),yt)}})),this.middlewareStack.use((e=>({applyToStack:t=>{t.add((e=>(t,n)=>async r=>{if(n.endpointV2){const t=n.endpointV2,i="sigv4-s3express"===t.properties?.authSchemes?.[0]?.name;if(("S3Express"===t.properties?.backend||"Directory"===t.properties?.bucketType)&&(n.isS3ExpressBucket=!0),i){const t=r.input.Bucket;if(t){const i=await e.s3ExpressIdentityProvider.getS3ExpressIdentity(await e.credentials(),{Bucket:t});n.s3ExpressIdentity=i,m.isInstance(r.request)&&i.sessionToken&&(r.request.headers[En]=i.sessionToken)}}}return t(r)})(e),Pn)}}))(this.config)),this.middlewareStack.use(Er(this.config))}destroy(){super.destroy()}}class JM extends(ie.classBuilder().ep({...no,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","AbortMultipartUpload",{}).n("S3Client","AbortMultipartUploadCommand").f(void 0,void 0).ser(Na).de(wl).build()){}const ZM={name:"ssecMiddleware",step:"initialize",tags:["SSE"],override:!0},eF=e=>({applyToStack:t=>{var n;t.add((n=e,e=>async t=>{let r={...t.input};const i=[{target:"SSECustomerKey",hash:"SSECustomerKeyMD5"},{target:"CopySourceSSECustomerKey",hash:"CopySourceSSECustomerKeyMD5"}];for(const e of i){const t=r[e.target];if(t){const i=ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):"string"==typeof t?n.utf8Decoder(t):new Uint8Array(t),o=n.base64Encoder(i),s=new n.md5;s.update(i),r={...r,[e.target]:o,[e.hash]:n.base64Encoder(await s.digest())}}}return e({...t,input:r})}),ZM)}});class tF extends(ie.classBuilder().ep({...no,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions()),An(n),eF(n)]})).s("AmazonS3","CompleteMultipartUpload",{}).n("S3Client","CompleteMultipartUploadCommand").f(Ss,vs).ser(La).de(Tl).build()){}class nF extends(ie.classBuilder().ep({...no,DisableS3ExpressSessionAuth:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions()),An(n),eF(n)]})).s("AmazonS3","CopyObject",{}).n("S3Client","CopyObjectCommand").f(Cs,ws).ser(ja).de(_l).build()){}const rF={step:"initialize",tags:["LOCATION_CONSTRAINT","CREATE_BUCKET_CONFIGURATION"],name:"locationConstraintMiddleware",override:!0},iF=e=>({applyToStack:t=>{var n;t.add((n=e,e=>async t=>{const{CreateBucketConfiguration:r}=t.input,i=await n.region();return r?.LocationConstraint||r?.Location||(t={...t,input:{...t.input,CreateBucketConfiguration:"us-east-1"===i?void 0:{LocationConstraint:i}}}),e(t)}),rF)}});class oF extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},DisableAccessPoints:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions()),iF(n)]})).s("AmazonS3","CreateBucket",{}).n("S3Client","CreateBucketCommand").f(void 0,void 0).ser(Ma).de(Rl).build()){}class sF extends(ie.classBuilder().ep({...no,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions()),eF(n)]})).s("AmazonS3","CreateMultipartUpload",{}).n("S3Client","CreateMultipartUploadCommand").f(Es,Ts).ser(Fa).de(Pl).build()){}class aF extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","DeleteBucketAnalyticsConfiguration",{}).n("S3Client","DeleteBucketAnalyticsConfigurationCommand").f(void 0,void 0).ser(Ua).de(Ll).build()){}class cF extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","DeleteBucket",{}).n("S3Client","DeleteBucketCommand").f(void 0,void 0).ser(Ba).de(kl).build()){}class lF extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","DeleteBucketCors",{}).n("S3Client","DeleteBucketCorsCommand").f(void 0,void 0).ser(za).de(Ml).build()){}class uF extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","DeleteBucketEncryption",{}).n("S3Client","DeleteBucketEncryptionCommand").f(void 0,void 0).ser(Ga).de(ql).build()){}class dF extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","DeleteBucketIntelligentTieringConfiguration",{}).n("S3Client","DeleteBucketIntelligentTieringConfigurationCommand").f(void 0,void 0).ser(Ha).de(Ul).build()){}class pF extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","DeleteBucketInventoryConfiguration",{}).n("S3Client","DeleteBucketInventoryConfigurationCommand").f(void 0,void 0).ser(Va).de(Gl).build()){}class hF extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","DeleteBucketLifecycle",{}).n("S3Client","DeleteBucketLifecycleCommand").f(void 0,void 0).ser($a).de(Vl).build()){}class fF extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","DeleteBucketMetricsConfiguration",{}).n("S3Client","DeleteBucketMetricsConfigurationCommand").f(void 0,void 0).ser(Wa).de(Wl).build()){}class mF extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","DeleteBucketOwnershipControls",{}).n("S3Client","DeleteBucketOwnershipControlsCommand").f(void 0,void 0).ser(Ka).de(Ql).build()){}class gF extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","DeleteBucketPolicy",{}).n("S3Client","DeleteBucketPolicyCommand").f(void 0,void 0).ser(Qa).de(Yl).build()){}class yF extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","DeleteBucketReplication",{}).n("S3Client","DeleteBucketReplicationCommand").f(void 0,void 0).ser(Xa).de(Zl).build()){}class bF extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","DeleteBucketTagging",{}).n("S3Client","DeleteBucketTaggingCommand").f(void 0,void 0).ser(Ya).de(tu).build()){}class vF extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","DeleteBucketWebsite",{}).n("S3Client","DeleteBucketWebsiteCommand").f(void 0,void 0).ser(Ja).de(ru).build()){}class SF extends(ie.classBuilder().ep({...no,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","DeleteObject",{}).n("S3Client","DeleteObjectCommand").f(void 0,void 0).ser(Za).de(ou).build()){}var wF,CF;!function(e){e.MD5="MD5",e.CRC32="CRC32",e.CRC32C="CRC32C",e.SHA1="SHA1",e.SHA256="SHA256"}(wF||(wF={})),function(e){e.HEADER="header",e.TRAILER="trailer"}(CF||(CF={}));const TF=wF.MD5,EF=wF.CRC32,_F=[wF.CRC32,wF.CRC32C,wF.SHA1,wF.SHA256],xF=[wF.CRC32,wF.CRC32C,wF.SHA1,wF.SHA256],RF=e=>e===wF.MD5?"content-md5":`x-amz-checksum-${e.toLowerCase()}`,IF=e=>void 0!==e&&"string"!=typeof e&&!ArrayBuffer.isView(e)&&!A(e);var PF=n(9728);const OF=(e,t)=>({[wF.MD5]:t.md5,[wF.CRC32]:Ct.AwsCrc32,[wF.CRC32C]:PF.AwsCrc32c,[wF.SHA1]:t.sha1,[wF.SHA256]:t.sha256}[e]),DF=(e,t)=>{const n=new e;return n.update(B(t||"")),n.digest()},AF={name:"flexibleChecksumsMiddleware",step:"build",tags:["BODY_CHECKSUM"],override:!0},kF=(e=[])=>{const t=[];for(const n of xF)e.includes(n)&&_F.includes(n)&&t.push(n);return t};function NF(e){const t=new G.Transform;return t.push(e),t.push(null),t}const LF=async(e,{streamHasher:t,checksumAlgorithmFn:n,base64Encoder:r})=>{const i=IF(e)?t(n,e):DF(n,e);return r(await i)},jF={name:"flexibleChecksumsResponseMiddleware",toMiddleware:"deserializerMiddleware",relation:"after",tags:["BODY_CHECKSUM"],override:!0},MF=(e,t)=>({applyToStack:n=>{n.add(((e,t)=>(n,r)=>async i=>{if(!m.isInstance(i.request))return n(i);const{request:o}=i,{body:s,headers:a}=o,{base64Encoder:c,streamHasher:l}=e,{input:u,requestChecksumRequired:d,requestAlgorithmMember:p}=t,h=((e,{requestChecksumRequired:t,requestAlgorithmMember:n},r)=>{const i=r?EF:TF;if(!n||!e[n])return t?i:void 0;const o=e[n];if(!_F.includes(o))throw new Error(`The checksum algorithm "${o}" is not supported by the client. Select one of ${_F}.`);return o})(u,{requestChecksumRequired:d,requestAlgorithmMember:p},!!r.isS3ExpressBucket);let f=s,g=a;if(h){const t=RF(h),n=OF(h,e);if(IF(s)){const{getAwsChunkedEncodingStream:r,bodyLengthChecker:i}=e;f=r(s,{base64Encoder:c,bodyLengthChecker:i,checksumLocationName:t,checksumAlgorithmFn:n,streamHasher:l}),g={...a,"content-encoding":a["content-encoding"]?`${a["content-encoding"]},aws-chunked`:"aws-chunked","transfer-encoding":"chunked","x-amz-decoded-content-length":a["content-length"],"x-amz-content-sha256":"STREAMING-UNSIGNED-PAYLOAD-TRAILER","x-amz-trailer":t},delete g["content-length"]}else if(!((e,t)=>{const n=e.toLowerCase();for(const e of Object.keys(t))if(n===e.toLowerCase())return!0;return!1})(t,a)){const e=await DF(n,s);g={...a,[t]:c(e)}}}return await n({...i,request:{...o,headers:g,body:f}})})(e,t),AF),n.addRelativeTo(((e,t)=>(n,r)=>async i=>{if(!m.isInstance(i.request))return n(i);const o=i.input,s=await n(i),a=s.response;let c;const{requestValidationModeMember:l,responseAlgorithms:u}=t;if(l&&"ENABLED"===o[l]){const{clientName:t,commandName:n}=r;if("S3Client"===t&&"GetObjectCommand"===n&&kF(u).every((e=>{const t=RF(e),n=a.headers[t];return!n||(e=>{const t=e.lastIndexOf("-");if(-1!==t){const n=e.slice(t+1);if(!n.startsWith("0")){const e=parseInt(n,10);if(!isNaN(e)&&e>=1&&e<=1e4)return!0}}return!1})(n)})))return s;const i=IF(a.body);i&&(c=await e.streamCollector(a.body),a.body=NF(c)),await(async(e,{config:t,responseAlgorithms:n})=>{const r=kF(n),{body:i,headers:o}=e;for(const e of r){const n=RF(e),r=o[n];if(r){const o=OF(e,t),{streamHasher:s,base64Encoder:a}=t,c=await LF(i,{streamHasher:s,checksumAlgorithmFn:o,base64Encoder:a});if(c===r)break;throw new Error(`Checksum mismatch: expected "${c}" but received "${r}" in response header "${n}".`)}}})(s.response,{config:e,responseAlgorithms:u}),i&&c&&(a.body=NF(c))}return s})(e,t),jF)}});class FF extends(ie.classBuilder().ep({...no,Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions()),MF(n,{input:this.input,requestAlgorithmMember:"ChecksumAlgorithm",requestChecksumRequired:!0})]})).s("AmazonS3","DeleteObjects",{}).n("S3Client","DeleteObjectsCommand").f(void 0,void 0).ser(ec).de(au).build()){}class qF extends(ie.classBuilder().ep({...no,Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","DeleteObjectTagging",{}).n("S3Client","DeleteObjectTaggingCommand").f(void 0,void 0).ser(tc).de(lu).build()){}class BF extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","DeletePublicAccessBlock",{}).n("S3Client","DeletePublicAccessBlockCommand").f(void 0,void 0).ser(nc).de(du).build()){}class UF extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","GetBucketAccelerateConfiguration",{}).n("S3Client","GetBucketAccelerateConfigurationCommand").f(void 0,void 0).ser(rc).de(hu).build()){}class zF extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","GetBucketAcl",{}).n("S3Client","GetBucketAclCommand").f(void 0,void 0).ser(ic).de(mu).build()){}class GF extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","GetBucketAnalyticsConfiguration",{}).n("S3Client","GetBucketAnalyticsConfigurationCommand").f(void 0,void 0).ser(oc).de(yu).build()){}class HF extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","GetBucketCors",{}).n("S3Client","GetBucketCorsCommand").f(void 0,void 0).ser(sc).de(vu).build()){}class VF extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","GetBucketEncryption",{}).n("S3Client","GetBucketEncryptionCommand").f(void 0,Os).ser(ac).de(wu).build()){}class $F extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","GetBucketIntelligentTieringConfiguration",{}).n("S3Client","GetBucketIntelligentTieringConfigurationCommand").f(void 0,void 0).ser(cc).de(Tu).build()){}class WF extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","GetBucketInventoryConfiguration",{}).n("S3Client","GetBucketInventoryConfigurationCommand").f(void 0,js).ser(lc).de(_u).build()){}class KF extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","GetBucketLifecycleConfiguration",{}).n("S3Client","GetBucketLifecycleConfigurationCommand").f(void 0,void 0).ser(uc).de(Ru).build()){}class QF extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","GetBucketLocation",{}).n("S3Client","GetBucketLocationCommand").f(void 0,void 0).ser(dc).de(Pu).build()){}class XF extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","GetBucketLogging",{}).n("S3Client","GetBucketLoggingCommand").f(void 0,void 0).ser(pc).de(Du).build()){}class YF extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","GetBucketMetricsConfiguration",{}).n("S3Client","GetBucketMetricsConfigurationCommand").f(void 0,void 0).ser(hc).de(ku).build()){}class JF extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","GetBucketNotificationConfiguration",{}).n("S3Client","GetBucketNotificationConfigurationCommand").f(void 0,void 0).ser(fc).de(Lu).build()){}class ZF extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","GetBucketOwnershipControls",{}).n("S3Client","GetBucketOwnershipControlsCommand").f(void 0,void 0).ser(mc).de(Mu).build()){}class eq extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","GetBucketPolicy",{}).n("S3Client","GetBucketPolicyCommand").f(void 0,void 0).ser(gc).de(qu).build()){}class tq extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","GetBucketPolicyStatus",{}).n("S3Client","GetBucketPolicyStatusCommand").f(void 0,void 0).ser(yc).de(Uu).build()){}class nq extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","GetBucketReplication",{}).n("S3Client","GetBucketReplicationCommand").f(void 0,void 0).ser(bc).de(Gu).build()){}class rq extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","GetBucketRequestPayment",{}).n("S3Client","GetBucketRequestPaymentCommand").f(void 0,void 0).ser(vc).de(Vu).build()){}class iq extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","GetBucketTagging",{}).n("S3Client","GetBucketTaggingCommand").f(void 0,void 0).ser(Sc).de(Wu).build()){}class oq extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","GetBucketVersioning",{}).n("S3Client","GetBucketVersioningCommand").f(void 0,void 0).ser(wc).de(Qu).build()){}class sq extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","GetBucketWebsite",{}).n("S3Client","GetBucketWebsiteCommand").f(void 0,void 0).ser(Cc).de(Yu).build()){}class aq extends(ie.classBuilder().ep({...no,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","GetObjectAcl",{}).n("S3Client","GetObjectAclCommand").f(void 0,void 0).ser(Ec).de(td).build()){}class cq extends(ie.classBuilder().ep({...no,Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions()),eF(n)]})).s("AmazonS3","GetObjectAttributes",{}).n("S3Client","GetObjectAttributesCommand").f(qs,void 0).ser(_c).de(rd).build()){}class lq extends(ie.classBuilder().ep({...no,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions()),eF(n),MF(n,{input:this.input,requestChecksumRequired:!1,requestValidationModeMember:"ChecksumMode",responseAlgorithms:["CRC32","CRC32C","SHA256","SHA1"]})]})).s("AmazonS3","GetObject",{}).n("S3Client","GetObjectCommand").f(Fs,Ms).ser(Tc).de(Zu).build()){}class uq extends(ie.classBuilder().ep({...no,Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","GetObjectLegalHold",{}).n("S3Client","GetObjectLegalHoldCommand").f(void 0,void 0).ser(xc).de(od).build()){}class dq extends(ie.classBuilder().ep({...no,Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","GetObjectLockConfiguration",{}).n("S3Client","GetObjectLockConfigurationCommand").f(void 0,void 0).ser(Rc).de(ad).build()){}class pq extends(ie.classBuilder().ep({...no,Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","GetObjectRetention",{}).n("S3Client","GetObjectRetentionCommand").f(void 0,void 0).ser(Ic).de(ld).build()){}class hq extends(ie.classBuilder().ep({...no,Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","GetObjectTagging",{}).n("S3Client","GetObjectTaggingCommand").f(void 0,void 0).ser(Pc).de(dd).build()){}class fq extends(ie.classBuilder().ep({...no,Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","GetObjectTorrent",{}).n("S3Client","GetObjectTorrentCommand").f(void 0,Bs).ser(Oc).de(hd).build()){}class mq extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","GetPublicAccessBlock",{}).n("S3Client","GetPublicAccessBlockCommand").f(void 0,void 0).ser(Dc).de(md).build()){}class gq extends(ie.classBuilder().ep({...no,Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","HeadBucket",{}).n("S3Client","HeadBucketCommand").f(void 0,void 0).ser(Ac).de(yd).build()){}class yq extends(ie.classBuilder().ep({...no,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions()),eF(n)]})).s("AmazonS3","HeadObject",{}).n("S3Client","HeadObjectCommand").f(zs,Us).ser(kc).de(vd).build()){}class bq extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","ListBucketAnalyticsConfigurations",{}).n("S3Client","ListBucketAnalyticsConfigurationsCommand").f(void 0,void 0).ser(Nc).de(wd).build()){}class vq extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","ListBucketIntelligentTieringConfigurations",{}).n("S3Client","ListBucketIntelligentTieringConfigurationsCommand").f(void 0,void 0).ser(Lc).de(Td).build()){}class Sq extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","ListBucketInventoryConfigurations",{}).n("S3Client","ListBucketInventoryConfigurationsCommand").f(void 0,Gs).ser(jc).de(_d).build()){}class wq extends(ie.classBuilder().ep({...no,Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","ListBucketMetricsConfigurations",{}).n("S3Client","ListBucketMetricsConfigurationsCommand").f(void 0,void 0).ser(Mc).de(Rd).build()){}class Cq extends(ie.classBuilder().ep({...no}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","ListBuckets",{}).n("S3Client","ListBucketsCommand").f(void 0,void 0).ser(Fc).de(Pd).build()){}class Tq extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","ListDirectoryBuckets",{}).n("S3Client","ListDirectoryBucketsCommand").f(void 0,void 0).ser(qc).de(Dd).build()){}class Eq extends(ie.classBuilder().ep({...no,Bucket:{type:"contextParams",name:"Bucket"},Prefix:{type:"contextParams",name:"Prefix"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","ListMultipartUploads",{}).n("S3Client","ListMultipartUploadsCommand").f(void 0,void 0).ser(Bc).de(kd).build()){}class _q extends(ie.classBuilder().ep({...no,Bucket:{type:"contextParams",name:"Bucket"},Prefix:{type:"contextParams",name:"Prefix"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","ListObjects",{}).n("S3Client","ListObjectsCommand").f(void 0,void 0).ser(Uc).de(Ld).build()){}class xq extends(ie.classBuilder().ep({...no,Bucket:{type:"contextParams",name:"Bucket"},Prefix:{type:"contextParams",name:"Prefix"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","ListObjectsV2",{}).n("S3Client","ListObjectsV2Command").f(void 0,void 0).ser(zc).de(Md).build()){}class Rq extends(ie.classBuilder().ep({...no,Bucket:{type:"contextParams",name:"Bucket"},Prefix:{type:"contextParams",name:"Prefix"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","ListObjectVersions",{}).n("S3Client","ListObjectVersionsCommand").f(void 0,void 0).ser(Gc).de(qd).build()){}class Iq extends(ie.classBuilder().ep({...no,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions()),eF(n)]})).s("AmazonS3","ListParts",{}).n("S3Client","ListPartsCommand").f(Hs,void 0).ser(Hc).de(Ud).build()){}class Pq extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions()),MF(n,{input:this.input,requestAlgorithmMember:"ChecksumAlgorithm",requestChecksumRequired:!1})]})).s("AmazonS3","PutBucketAccelerateConfiguration",{}).n("S3Client","PutBucketAccelerateConfigurationCommand").f(void 0,void 0).ser(Vc).de(Gd).build()){}class Oq extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions()),MF(n,{input:this.input,requestAlgorithmMember:"ChecksumAlgorithm",requestChecksumRequired:!0})]})).s("AmazonS3","PutBucketAcl",{}).n("S3Client","PutBucketAclCommand").f(void 0,void 0).ser($c).de(Vd).build()){}class Dq extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","PutBucketAnalyticsConfiguration",{}).n("S3Client","PutBucketAnalyticsConfigurationCommand").f(void 0,void 0).ser(Wc).de(Wd).build()){}class Aq extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions()),MF(n,{input:this.input,requestAlgorithmMember:"ChecksumAlgorithm",requestChecksumRequired:!0})]})).s("AmazonS3","PutBucketCors",{}).n("S3Client","PutBucketCorsCommand").f(void 0,void 0).ser(Kc).de(Qd).build()){}class kq extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions()),MF(n,{input:this.input,requestAlgorithmMember:"ChecksumAlgorithm",requestChecksumRequired:!0})]})).s("AmazonS3","PutBucketEncryption",{}).n("S3Client","PutBucketEncryptionCommand").f(Vs,void 0).ser(Qc).de(Yd).build()){}class Nq extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","PutBucketIntelligentTieringConfiguration",{}).n("S3Client","PutBucketIntelligentTieringConfigurationCommand").f(void 0,void 0).ser(Xc).de(Zd).build()){}class Lq extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","PutBucketInventoryConfiguration",{}).n("S3Client","PutBucketInventoryConfigurationCommand").f($s,void 0).ser(Yc).de(tp).build()){}class jq extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions()),MF(n,{input:this.input,requestAlgorithmMember:"ChecksumAlgorithm",requestChecksumRequired:!0})]})).s("AmazonS3","PutBucketLifecycleConfiguration",{}).n("S3Client","PutBucketLifecycleConfigurationCommand").f(void 0,void 0).ser(Jc).de(rp).build()){}class Mq extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions()),MF(n,{input:this.input,requestAlgorithmMember:"ChecksumAlgorithm",requestChecksumRequired:!0})]})).s("AmazonS3","PutBucketLogging",{}).n("S3Client","PutBucketLoggingCommand").f(void 0,void 0).ser(Zc).de(op).build()){}class Fq extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","PutBucketMetricsConfiguration",{}).n("S3Client","PutBucketMetricsConfigurationCommand").f(void 0,void 0).ser(el).de(ap).build()){}class qq extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","PutBucketNotificationConfiguration",{}).n("S3Client","PutBucketNotificationConfigurationCommand").f(void 0,void 0).ser(tl).de(lp).build()){}class Bq extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions()),MF(n,{input:this.input,requestChecksumRequired:!0})]})).s("AmazonS3","PutBucketOwnershipControls",{}).n("S3Client","PutBucketOwnershipControlsCommand").f(void 0,void 0).ser(nl).de(dp).build()){}class Uq extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions()),MF(n,{input:this.input,requestAlgorithmMember:"ChecksumAlgorithm",requestChecksumRequired:!0})]})).s("AmazonS3","PutBucketPolicy",{}).n("S3Client","PutBucketPolicyCommand").f(void 0,void 0).ser(rl).de(hp).build()){}class zq extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions()),MF(n,{input:this.input,requestAlgorithmMember:"ChecksumAlgorithm",requestChecksumRequired:!0})]})).s("AmazonS3","PutBucketReplication",{}).n("S3Client","PutBucketReplicationCommand").f(void 0,void 0).ser(il).de(mp).build()){}class Gq extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions()),MF(n,{input:this.input,requestAlgorithmMember:"ChecksumAlgorithm",requestChecksumRequired:!0})]})).s("AmazonS3","PutBucketRequestPayment",{}).n("S3Client","PutBucketRequestPaymentCommand").f(void 0,void 0).ser(ol).de(yp).build()){}class Hq extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions()),MF(n,{input:this.input,requestAlgorithmMember:"ChecksumAlgorithm",requestChecksumRequired:!0})]})).s("AmazonS3","PutBucketTagging",{}).n("S3Client","PutBucketTaggingCommand").f(void 0,void 0).ser(sl).de(vp).build()){}class Vq extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions()),MF(n,{input:this.input,requestAlgorithmMember:"ChecksumAlgorithm",requestChecksumRequired:!0})]})).s("AmazonS3","PutBucketVersioning",{}).n("S3Client","PutBucketVersioningCommand").f(void 0,void 0).ser(al).de(wp).build()){}class $q extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions()),MF(n,{input:this.input,requestAlgorithmMember:"ChecksumAlgorithm",requestChecksumRequired:!0})]})).s("AmazonS3","PutBucketWebsite",{}).n("S3Client","PutBucketWebsiteCommand").f(void 0,void 0).ser(cl).de(Tp).build()){}class Wq extends(ie.classBuilder().ep({...no,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions()),MF(n,{input:this.input,requestAlgorithmMember:"ChecksumAlgorithm",requestChecksumRequired:!0})]})).s("AmazonS3","PutObjectAcl",{}).n("S3Client","PutObjectAclCommand").f(void 0,void 0).ser(ul).de(Rp).build()){}class Kq extends(ie.classBuilder().ep({...no,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions()),{applyToStack:e=>{e.add(((e,t)=>async n=>{const{request:r}=n;if(m.isInstance(r)&&!r.headers["content-length"]){const e="Are you using a Stream of unknown length as the Body of a PutObject request? Consider using Upload instead from @aws-sdk/lib-storage.";"function"!=typeof t?.logger?.warn||t.logger instanceof _?console.warn(e):t.logger.warn(e)}return e({...n})}),gt)}},eF(n),MF(n,{input:this.input,requestAlgorithmMember:"ChecksumAlgorithm",requestChecksumRequired:!1})]})).s("AmazonS3","PutObject",{}).n("S3Client","PutObjectCommand").f(Sa,va).ser(ll).de(_p).build()){}class Qq extends(ie.classBuilder().ep({...no,Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions()),MF(n,{input:this.input,requestAlgorithmMember:"ChecksumAlgorithm",requestChecksumRequired:!0})]})).s("AmazonS3","PutObjectLegalHold",{}).n("S3Client","PutObjectLegalHoldCommand").f(void 0,void 0).ser(dl).de(Pp).build()){}class Xq extends(ie.classBuilder().ep({...no,Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions()),MF(n,{input:this.input,requestAlgorithmMember:"ChecksumAlgorithm",requestChecksumRequired:!0})]})).s("AmazonS3","PutObjectLockConfiguration",{}).n("S3Client","PutObjectLockConfigurationCommand").f(void 0,void 0).ser(pl).de(Dp).build()){}class Yq extends(ie.classBuilder().ep({...no,Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions()),MF(n,{input:this.input,requestAlgorithmMember:"ChecksumAlgorithm",requestChecksumRequired:!0})]})).s("AmazonS3","PutObjectRetention",{}).n("S3Client","PutObjectRetentionCommand").f(void 0,void 0).ser(hl).de(kp).build()){}class Jq extends(ie.classBuilder().ep({...no,Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions()),MF(n,{input:this.input,requestAlgorithmMember:"ChecksumAlgorithm",requestChecksumRequired:!0})]})).s("AmazonS3","PutObjectTagging",{}).n("S3Client","PutObjectTaggingCommand").f(void 0,void 0).ser(fl).de(Lp).build()){}class Zq extends(ie.classBuilder().ep({...no,UseS3ExpressControlEndpoint:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions()),MF(n,{input:this.input,requestAlgorithmMember:"ChecksumAlgorithm",requestChecksumRequired:!0})]})).s("AmazonS3","PutPublicAccessBlock",{}).n("S3Client","PutPublicAccessBlockCommand").f(void 0,void 0).ser(ml).de(Mp).build()){}class eB extends(ie.classBuilder().ep({...no,Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions()),MF(n,{input:this.input,requestAlgorithmMember:"ChecksumAlgorithm",requestChecksumRequired:!1})]})).s("AmazonS3","RestoreObject",{}).n("S3Client","RestoreObjectCommand").f(_a,void 0).ser(gl).de(qp).build()){}class tB extends(ie.classBuilder().ep({...no,Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions()),eF(n)]})).s("AmazonS3","SelectObjectContent",{eventStream:{output:!0}}).n("S3Client","SelectObjectContentCommand").f(Ia,Ra).ser(yl).de(Up).build()){}class nB extends(ie.classBuilder().ep({...no,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions()),eF(n),MF(n,{input:this.input,requestAlgorithmMember:"ChecksumAlgorithm",requestChecksumRequired:!1})]})).s("AmazonS3","UploadPart",{}).n("S3Client","UploadPartCommand").f(Oa,Pa).ser(bl).de(Gp).build()){}class rB extends(ie.classBuilder().ep({...no,DisableS3ExpressSessionAuth:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions()),An(n),eF(n)]})).s("AmazonS3","UploadPartCopy",{}).n("S3Client","UploadPartCopyCommand").f(Aa,Da).ser(vl).de(Vp).build()){}class iB extends(ie.classBuilder().ep({...no,UseObjectLambdaEndpoint:{type:"staticContextParams",value:!0}}).m((function(e,t,n,r){return[Ci(n,this.serialize,this.deserialize),Ei(n,e.getEndpointParameterInstructions())]})).s("AmazonS3","WriteGetObjectResponse",{}).n("S3Client","WriteGetObjectResponseCommand").f(ka,void 0).ser(Sl).de(Wp).build()){}const oB={AbortMultipartUploadCommand:JM,CompleteMultipartUploadCommand:tF,CopyObjectCommand:nF,CreateBucketCommand:oF,CreateMultipartUploadCommand:sF,CreateSessionCommand:xI,DeleteBucketCommand:cF,DeleteBucketAnalyticsConfigurationCommand:aF,DeleteBucketCorsCommand:lF,DeleteBucketEncryptionCommand:uF,DeleteBucketIntelligentTieringConfigurationCommand:dF,DeleteBucketInventoryConfigurationCommand:pF,DeleteBucketLifecycleCommand:hF,DeleteBucketMetricsConfigurationCommand:fF,DeleteBucketOwnershipControlsCommand:mF,DeleteBucketPolicyCommand:gF,DeleteBucketReplicationCommand:yF,DeleteBucketTaggingCommand:bF,DeleteBucketWebsiteCommand:vF,DeleteObjectCommand:SF,DeleteObjectsCommand:FF,DeleteObjectTaggingCommand:qF,DeletePublicAccessBlockCommand:BF,GetBucketAccelerateConfigurationCommand:UF,GetBucketAclCommand:zF,GetBucketAnalyticsConfigurationCommand:GF,GetBucketCorsCommand:HF,GetBucketEncryptionCommand:VF,GetBucketIntelligentTieringConfigurationCommand:$F,GetBucketInventoryConfigurationCommand:WF,GetBucketLifecycleConfigurationCommand:KF,GetBucketLocationCommand:QF,GetBucketLoggingCommand:XF,GetBucketMetricsConfigurationCommand:YF,GetBucketNotificationConfigurationCommand:JF,GetBucketOwnershipControlsCommand:ZF,GetBucketPolicyCommand:eq,GetBucketPolicyStatusCommand:tq,GetBucketReplicationCommand:nq,GetBucketRequestPaymentCommand:rq,GetBucketTaggingCommand:iq,GetBucketVersioningCommand:oq,GetBucketWebsiteCommand:sq,GetObjectCommand:lq,GetObjectAclCommand:aq,GetObjectAttributesCommand:cq,GetObjectLegalHoldCommand:uq,GetObjectLockConfigurationCommand:dq,GetObjectRetentionCommand:pq,GetObjectTaggingCommand:hq,GetObjectTorrentCommand:fq,GetPublicAccessBlockCommand:mq,HeadBucketCommand:gq,HeadObjectCommand:yq,ListBucketAnalyticsConfigurationsCommand:bq,ListBucketIntelligentTieringConfigurationsCommand:vq,ListBucketInventoryConfigurationsCommand:Sq,ListBucketMetricsConfigurationsCommand:wq,ListBucketsCommand:Cq,ListDirectoryBucketsCommand:Tq,ListMultipartUploadsCommand:Eq,ListObjectsCommand:_q,ListObjectsV2Command:xq,ListObjectVersionsCommand:Rq,ListPartsCommand:Iq,PutBucketAccelerateConfigurationCommand:Pq,PutBucketAclCommand:Oq,PutBucketAnalyticsConfigurationCommand:Dq,PutBucketCorsCommand:Aq,PutBucketEncryptionCommand:kq,PutBucketIntelligentTieringConfigurationCommand:Nq,PutBucketInventoryConfigurationCommand:Lq,PutBucketLifecycleConfigurationCommand:jq,PutBucketLoggingCommand:Mq,PutBucketMetricsConfigurationCommand:Fq,PutBucketNotificationConfigurationCommand:qq,PutBucketOwnershipControlsCommand:Bq,PutBucketPolicyCommand:Uq,PutBucketReplicationCommand:zq,PutBucketRequestPaymentCommand:Gq,PutBucketTaggingCommand:Hq,PutBucketVersioningCommand:Vq,PutBucketWebsiteCommand:$q,PutObjectCommand:Kq,PutObjectAclCommand:Wq,PutObjectLegalHoldCommand:Qq,PutObjectLockConfigurationCommand:Xq,PutObjectRetentionCommand:Yq,PutObjectTaggingCommand:Jq,PutPublicAccessBlockCommand:Zq,RestoreObjectCommand:eB,SelectObjectContentCommand:tB,UploadPartCommand:nB,UploadPartCopyCommand:rB,WriteGetObjectResponseCommand:iB};class sB extends YM{}ae(oB,sB);const aB=aa(YM,Tq,"ContinuationToken","ContinuationToken","MaxDirectoryBuckets"),cB=aa(YM,xq,"ContinuationToken","NextContinuationToken","MaxKeys"),lB=aa(YM,Iq,"PartNumberMarker","NextPartNumberMarker","MaxParts"),uB=e=>new Promise((t=>setTimeout(t,1e3*e))),dB={minDelay:2,maxDelay:120};var pB;!function(e){e.ABORTED="ABORTED",e.FAILURE="FAILURE",e.SUCCESS="SUCCESS",e.RETRY="RETRY",e.TIMEOUT="TIMEOUT"}(pB||(pB={}));const hB=e=>{if(e.state===pB.ABORTED){const t=new Error(`${JSON.stringify({...e,reason:"Request was aborted"})}`);throw t.name="AbortError",t}if(e.state===pB.TIMEOUT){const t=new Error(`${JSON.stringify({...e,reason:"Waiter has timed out"})}`);throw t.name="TimeoutError",t}if(e.state!==pB.SUCCESS)throw new Error(`${JSON.stringify({result:e})}`);return e},fB=(e,t,n,r)=>r>n?t:mB(e,e*2**(r-1)),mB=(e,t)=>e+Math.random()*(t-e),gB=async({minDelay:e,maxDelay:t,maxWaitTime:n,abortController:r,client:i,abortSignal:o},s,a)=>{const{state:c,reason:l}=await a(i,s);if(c!==pB.RETRY)return{state:c,reason:l};let u=1;const d=Date.now()+1e3*n,p=Math.log(t/e)/Math.log(2)+1;for(;;){if(r?.signal?.aborted||o?.aborted)return{state:pB.ABORTED};const n=fB(e,t,p,u);if(Date.now()+1e3*n>d)return{state:pB.TIMEOUT};await uB(n);const{state:c,reason:l}=await a(i,s);if(c!==pB.RETRY)return{state:c,reason:l};u+=1}},yB=async e=>new Promise((t=>{e.onabort=()=>t({state:pB.ABORTED})})),bB=async(e,t,n)=>{const r={...dB,...e};(e=>{if(e.maxWaitTime<1)throw new Error("WaiterConfiguration.maxWaitTime must be greater than 0");if(e.minDelay<1)throw new Error("WaiterConfiguration.minDelay must be greater than 0");if(e.maxDelay<1)throw new Error("WaiterConfiguration.maxDelay must be greater than 0");if(e.maxWaitTime<=e.minDelay)throw new Error(`WaiterConfiguration.maxWaitTime [${e.maxWaitTime}] must be greater than WaiterConfiguration.minDelay [${e.minDelay}] for this waiter`);if(e.maxDelay<e.minDelay)throw new Error(`WaiterConfiguration.maxDelay [${e.maxDelay}] must be greater than WaiterConfiguration.minDelay [${e.minDelay}] for this waiter`)})(r);const i=[gB(r,t,n)];return e.abortController&&i.push(yB(e.abortController.signal)),e.abortSignal&&i.push(yB(e.abortSignal)),Promise.race(i)},vB=async(e,t)=>{let n;try{return n=await e.send(new gq(t)),{state:pB.SUCCESS,reason:n}}catch(e){if(n=e,e.name&&"NotFound"==e.name)return{state:pB.RETRY,reason:n}}return{state:pB.RETRY,reason:n}},SB=async(e,t)=>bB({minDelay:5,maxDelay:120,...e},t,vB),wB=async(e,t)=>{const n=await bB({minDelay:5,maxDelay:120,...e},t,vB);return hB(n)},CB=async(e,t)=>{let n;try{n=await e.send(new gq(t))}catch(e){if(n=e,e.name&&"NotFound"==e.name)return{state:pB.SUCCESS,reason:n}}return{state:pB.RETRY,reason:n}},TB=async(e,t)=>bB({minDelay:5,maxDelay:120,...e},t,CB),EB=async(e,t)=>{const n=await bB({minDelay:5,maxDelay:120,...e},t,CB);return hB(n)},_B=async(e,t)=>{let n;try{return n=await e.send(new yq(t)),{state:pB.SUCCESS,reason:n}}catch(e){if(n=e,e.name&&"NotFound"==e.name)return{state:pB.RETRY,reason:n}}return{state:pB.RETRY,reason:n}},xB=async(e,t)=>bB({minDelay:5,maxDelay:120,...e},t,_B),RB=async(e,t)=>{const n=await bB({minDelay:5,maxDelay:120,...e},t,_B);return hB(n)},IB=async(e,t)=>{let n;try{n=await e.send(new yq(t))}catch(e){if(n=e,e.name&&"NotFound"==e.name)return{state:pB.SUCCESS,reason:n}}return{state:pB.RETRY,reason:n}},PB=async(e,t)=>bB({minDelay:5,maxDelay:120,...e},t,IB),OB=async(e,t)=>{const n=await bB({minDelay:5,maxDelay:120,...e},t,IB);return hB(n)}},4006:(e,t,n)=>{"use strict";n.r(t),n.d(t,{fromUtf8:()=>r,toUtf8:()=>i});const r=e=>"function"==typeof TextEncoder?function(e){return(new TextEncoder).encode(e)}(e):(e=>{const t=[];for(let n=0,r=e.length;n<r;n++){const r=e.charCodeAt(n);if(r<128)t.push(r);else if(r<2048)t.push(r>>6|192,63&r|128);else if(n+1<e.length&&55296==(64512&r)&&56320==(64512&e.charCodeAt(n+1))){const i=65536+((1023&r)<<10)+(1023&e.charCodeAt(++n));t.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}else t.push(r>>12|224,r>>6&63|128,63&r|128)}return Uint8Array.from(t)})(e),i=e=>"function"==typeof TextDecoder?function(e){return new TextDecoder("utf-8").decode(e)}(e):(e=>{let t="";for(let n=0,r=e.length;n<r;n++){const r=e[n];if(r<128)t+=String.fromCharCode(r);else if(192<=r&&r<224){const i=e[++n];t+=String.fromCharCode((31&r)<<6|63&i)}else if(240<=r&&r<365){const i="%"+[r,e[++n],e[++n],e[++n]].map((e=>e.toString(16))).join("%");t+=decodeURIComponent(i)}else t+=String.fromCharCode((15&r)<<12|(63&e[++n])<<6|63&e[++n])}return t})(e)},1616:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const i=n(7571),o=n(9695),s=["redmond.corp.microsoft.com","northamerica.corp.microsoft.com","fareast.corp.microsoft.com","ntdev.corp.microsoft.com","wingroup.corp.microsoft.com","southpacific.corp.microsoft.com","wingroup.windeploy.ntdev.microsoft.com","ddnet.microsoft.com","europe.corp.microsoft.com"],a={"common.msftInternal":function(){const e=process.env.USERDNSDOMAIN;if(!e)return!1;const t=e.toLowerCase();return s.some((e=>t===e))}()?1:0},c={};try{const e=n(235);c["common.adsversion"]=null==e?void 0:e.version}catch(e){}class l{constructor(e,t,n,r){this.reporter=e,this.eventName=t,this.properties=n,this.measurements=r,this.properties=n||{},Object.assign(this.properties,c),this.measurements=r||{},Object.assign(this.measurements,a)}send(){var e;try{null===(e=this.reporter)||void 0===e||e.sendTelemetryEvent(this.eventName,this.properties,this.measurements)}catch(e){const t=e instanceof Error?e.message:e;console.error(`Error sending ${this.eventName} event ${t}`)}}withAdditionalProperties(e){return Object.assign(this.properties,e),this}withAdditionalMeasurements(e){return Object.assign(this.measurements,e),this}withConnectionInfo(e){return"object"==typeof e?Object.assign(this.properties,{authenticationType:e.authenticationType,providerName:e.providerName}):console.error("AdsTelemetryReporter received invalid ConnectionInfo object of type "+typeof e),this}withServerInfo(e){var t,n,r;return"object"==typeof e?Object.assign(this.properties,{connectionType:void 0!==e.isCloud?e.isCloud?"Azure":"Standalone":"",serverVersion:null!==(t=e.serverVersion)&&void 0!==t?t:"",serverEdition:null!==(n=e.serverEdition)&&void 0!==n?n:"",serverEngineEdition:null!==(r=e.engineEditionId)&&void 0!==r?r:""}):console.error("AdsTelemetryReporter received invalid ServerInfo object of type "+typeof e),this}}t.default=class{constructor(e,t,n){var r,o;this._telemetryReporter=void 0;try{this._telemetryReporter=new i.default(e,t,n)}catch(t){console.error(`Error initializing TelemetryReporter for '${e}'. ${null!==(o=null===(r=t)||void 0===r?void 0:r.message)&&void 0!==o?o:t}`)}}createViewEvent(e){return new l(this._telemetryReporter,"view",{view:e})}sendViewEvent(e){this.createViewEvent(e).send()}createActionEvent(e,t,n="",r="",i){const o=i?{durationInMs:i}:{};return new l(this._telemetryReporter,"action",{view:e,action:t,target:n,source:r},o)}sendActionEvent(e,t,n="",r="",i){this.createActionEvent(e,t,n,r,i).send()}createTimedAction(e,t,n,r){return new o.TimedAction(this,e,t,n,r)}createMetricsEvent(e,t=""){return new l(this._telemetryReporter,"metrics",{groupName:t},e)}sendMetricsEvent(e,t=""){this.createMetricsEvent(e,t).send()}createErrorEvent(e,t,n="",r=""){return new l(this._telemetryReporter,"error",{view:e,name:t,errorCode:n,errorType:r})}sendErrorEvent(e,t,n="",r=""){this.createErrorEvent(e,t,n,r).send()}createErrorEvent2(e,t,n=void 0,r=!1,i="",o=""){const s={view:e,name:t,errorCode:i,errorType:o};if(n instanceof Error){s.message=!0===r?n.message:"";let e=n.stack||"";if(!0!==r&&n.message){const t=new RegExp(n.message,"g");e=e.replace(t,"<REDACTED: error-message>")}s.stack=e}else s.message=!0===r?null==n?void 0:n.toString():"",s.stack="";return new l(this._telemetryReporter,"error",s)}sendErrorEvent2(e,t,n=void 0,r=!1,i="",o=""){this.createErrorEvent2(e,t,n,r,i,o).send()}createTelemetryEvent(e,t,n){return new l(this._telemetryReporter,e,t,n)}sendTelemetryEvent(e,t,n){this.createTelemetryEvent(e,t,n).send()}dispose(){var e;return r(this,void 0,void 0,(function*(){yield null===(e=this._telemetryReporter)||void 0===e?void 0:e.dispose()}))}}},9695:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimedAction=void 0,t.TimedAction=class{constructor(e,t,n,r="",i=""){this.reporter=e,this.view=t,this.action=n,this.target=r,this.source=i,this.properties={},this.measures={},this.start=Date.now()}withAdditionalProperties(e){return Object.assign(this.properties,e),this}withAdditionalMeasures(e){return Object.assign(this.measures,e),this}send(){this.reporter.createActionEvent(this.view,this.action,this.source,this.target,Date.now()-this.start).withAdditionalProperties(this.properties).withAdditionalMeasurements(this.measures).send()}}},4697:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Sequencer=void 0,t.Sequencer=class{constructor(){this.current=Promise.resolve(null)}queue(e){return this.current=this.current.then((()=>e()))}}},7534:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DistributionNotSupportedError=t.ArchitectureNotSupportedError=t.PlatformNotSupportedError=void 0;class n extends Error{constructor(e){super(`The platform '${e}' is not supported.`),this.code=0}}t.PlatformNotSupportedError=n;class r extends Error{constructor(e,t){super(`The architecture '${t}' for platform '${e}' is not supported.`),this.code=2}}t.ArchitectureNotSupportedError=r;class i extends Error{constructor(e,t,n){super(`The distribution '${t}' with version '${n}' for platform '${e}' is not supported.`),this.code=1}}t.DistributionNotSupportedError=i},3097:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ArchiveExtractor=void 0;const s=o(n(6244)),a=n(3011),c=n(3442),l=n(8553);t.ArchiveExtractor=class{constructor(){this.eventEmitter=new a.EventEmitter2({wildcard:!0}),this.unzipper=new c.Unzipper,this.logger=new l.Logger(this.eventEmitter)}extract(e,t){if(this.logger.verbose(`Extracting arhive '${e}' to '${t}'.`),e.match(/\.tar\.gz|\.tar|\.gz$/i)){let n=0;return s.x({file:e,cwd:t,onentry:e=>this.eventEmitter.emit("entry_extracted",e.path,++n,-1)})}return this.unzipper.extract(e,t)}}},3018:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.HttpClient=void 0;const s=o(n(5692)),a=o(n(8611)),c=o(n(9896)),l=n(7016),u=n(3011),d=n(8769);t.HttpClient=class{constructor(){this.eventEmitter=new u.EventEmitter2({wildcard:!0})}downloadFile(e,t,n,r){const i=(0,l.parse)(e);let o=this.getHttpClientOptions(i,n,r),c="http:"===i.protocol?a.request:s.request;return new Promise(((e,i)=>{if(!t.tmpFile||0===t.tmpFile.fd)return i(new Error("Temporary package file unavailable"));let s=c(o,(o=>301===o.statusCode||302===o.statusCode?e(this.downloadFile(o.headers.location,t,n,r)):200!==o.statusCode?i(new Error(o.statusCode.toString())):void this.handleSuccessfulResponse(t,o).then((t=>{e()})).catch((e=>{i(e)}))));s.on("error",(e=>{i(new Error(`Request error: ${e.name||"NONE"}`))})),s.end()}))}getHttpClientOptions(e,t,n){const r=(0,d.getProxyAgent)(e,t,n);let i={host:e.hostname,path:e.path,agent:r,port:+e.port};return"https:"===e.protocol&&(i={host:e.hostname,path:e.path,agent:r,port:+e.port}),i}handleDataReceivedEvent(e,t){if(e.downloadedBytes+=t.length,e.packageSize>0){let t=Math.ceil(e.downloadedBytes/e.packageSize*100);t!==e.downloadPercentage&&(this.eventEmitter.emit("download_progress",t),e.downloadPercentage=t)}}handleSuccessfulResponse(e,t){return new Promise(((n,r)=>{let i={packageSize:parseInt(t.headers["content-length"],10),downloadedBytes:0,downloadPercentage:0};this.eventEmitter.emit("download_start",e.url,i.packageSize),t.on("data",(e=>{this.handleDataReceivedEvent(i,e)}));let o=c.createWriteStream(void 0,{fd:e.tmpFile.fd});t.on("end",(()=>{this.eventEmitter.emit("download_end"),n()})),t.on("error",(e=>{r(new Error(`Response error: ${e.name||"NONE"}`))})),t.pipe(o,{end:!1})}))}}},7961:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},8553:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConsoleLogger=t.Logger=void 0,t.Logger=class{constructor(e){this.eventEmitter=e}verbose(e){this.log(0,e)}info(e){this.log(1,e)}warn(e){this.log(2,e)}error(e){this.log(3,e)}critical(e){this.log(4,e)}log(e,t){this.eventEmitter.emit("log_emitted",e,t)}},t.ConsoleLogger=class{verbose(e){console.log(e)}info(e){console.info(e)}warn(e){console.warn(e)}error(e){console.error(e)}critical(e){console.error(e)}}},2952:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||r(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),i(n(5235),t),i(n(5779),t),i(n(7961),t)},9858:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.PlatformInformation=t.getFallbackRuntimes=t.getRuntimeDisplayName=t.getRuntimeId=t.LinuxDistribution=t.Runtime=void 0;const s=o(n(857)),a=o(n(5317)),c=o(n(9896)),l=n(7534),u=n(8553),d="unknown";var p;!function(e){e.Unknown="Unknown",e.Windows_86="Windows_86",e.Windows_64="Windows_64",e.Windows_ARM64="Windows_ARM64",e.Windows="Windows",e.OSX="OSX",e.OSX_ARM64="OSX_ARM64",e.CentOS="CentOS",e.Debian="Debian",e.ElementaryOS_0_3="ElementaryOS_0_3",e.ElementaryOS_0_4="ElementaryOS_0_4",e.ElementaryOS="ElementaryOS",e.Fedora="Fedora",e.GalliumOS="GalliumOS",e.LinuxMint="LinuxMint",e.OpenSUSE="OpenSUSE",e.OracleLinux="OracleLinux",e.RHEL="RHEL",e.SLES="SLES",e.Ubuntu_14="Ubuntu_14",e.Ubuntu_16="Ubuntu_16",e.Ubuntu_18="Ubuntu_18",e.Ubuntu_20="Ubuntu_20",e.Ubuntu_22="Ubuntu_22",e.Ubuntu="Ubuntu",e.Linux="Linux",e.Linux_ARM64="Linux_ARM64"}(p=t.Runtime||(t.Runtime={}));class h{constructor(e,t,n){this.name=e,this.version=t,this.idLike=n}static getCurrent(){return h.fromFilePath("/etc/os-release").catch((()=>h.fromFilePath("/usr/lib/os-release"))).catch((()=>Promise.resolve(new h(d,d))))}toString(){return`name=${this.name}, version=${this.version}`}static fromFilePath(e){return new Promise(((t,n)=>{c.readFile(e,"utf8",((e,r)=>{e?n(e):t(h.fromReleaseInfo(r))}))}))}static fromReleaseInfo(e,t=s.EOL){let n,r=d,i=d;const o=e.split(t);for(let e of o){e=e.trim();let t=e.indexOf("=");if(t>=0){let o=e.substring(0,t),s=e.substring(t+1);if((s.length>1&&s.startsWith('"')&&s.endsWith('"')||s.length>1&&s.startsWith("'")&&s.endsWith("'"))&&(s=s.substring(1,s.length-1)),"ID"===o?r=s:"VERSION_ID"===o?i=s:"ID_LIKE"===o&&(n=s.split(" ")),r!==d&&i!==d&&void 0!==n)break}}return new h(r,i,n)}}function f(e,t,n){switch(e){case"ubuntu":return t.startsWith("14")?p.Ubuntu_14:t.startsWith("16")?p.Ubuntu_16:t.startsWith("18")?p.Ubuntu_18:t.startsWith("20")?p.Ubuntu_20:t.startsWith("22")?p.Ubuntu_22:(n.warn(`The Ubuntu version '${t}' is unknown to the service downloader, it will be treated as Ubuntu.`),p.Ubuntu);case"elementary":case"elementary OS":return t.startsWith("0.3")?p.ElementaryOS_0_3:t.startsWith("0.4")?p.ElementaryOS_0_4:(n.warn(`The ElementaryOS version '${t}' is unknown to the service downloader, it will be treated as ElementaryOS.`),p.ElementaryOS);case"linuxmint":return p.LinuxMint;case"centos":return p.CentOS;case"ol":return p.OracleLinux;case"fedora":return p.Fedora;case"opensuse":return p.OpenSUSE;case"sles":return p.SLES;case"rhel":return p.RHEL;case"debian":return p.Debian;case"galliumos":return p.GalliumOS;default:return n.warn(`Unknown distribution name: ${e}`),p.Linux}}function m(e,t,n,r){const i=process.env.AZDATA_RUNTIME;if(i)return r.verbose(`AZDATA_RUNTIME environment variable is set, the value '${i}' will be used as the runtime.`),i;switch(e){case"win32":switch(t){case"x86":return p.Windows_86;case"x86_64":return p.Windows_64;case"arm64":return p.Windows_ARM64;default:throw new l.ArchitectureNotSupportedError(e,t)}case"darwin":switch(t){case"x86_64":return p.OSX;case"arm64":return p.OSX_ARM64;default:throw new l.ArchitectureNotSupportedError(e,t)}case"linux":if("x86_64"===t){let e=f(n.name,n.version,r);if(e===p.Unknown&&n.idLike&&n.idLike.length>0)for(let t of n.idLike)if(e=f(t,n.version,r),e!==p.Unknown)break;if(e!==p.Unknown)return e}else if("aarch64"===t)return p.Linux_ARM64;throw new l.DistributionNotSupportedError(e,n.name,n.version);default:throw new l.PlatformNotSupportedError(e)}}function g(e){switch(e){case p.Windows_64:case p.Windows_86:case p.Windows_ARM64:case p.Windows:return"Windows";case p.OSX:return"OSX";case p.OSX_ARM64:return"OSX_ARM64";case p.CentOS:case p.Debian:case p.ElementaryOS_0_3:case p.ElementaryOS_0_4:case p.ElementaryOS:case p.Fedora:case p.GalliumOS:case p.LinuxMint:case p.OpenSUSE:case p.OracleLinux:case p.SLES:case p.RHEL:case p.Ubuntu_14:case p.Ubuntu_16:case p.Ubuntu_18:case p.Ubuntu_20:case p.Ubuntu_22:case p.Ubuntu:case p.Linux:case p.Linux_ARM64:return"Linux";default:throw new l.PlatformNotSupportedError(e)}}t.LinuxDistribution=h,t.getRuntimeId=m,t.getRuntimeDisplayName=g,t.getFallbackRuntimes=function e(t){switch(t){case p.Windows_64:case p.Windows_86:case p.Windows_ARM64:return[p.Windows];case p.OSX_ARM64:return[p.OSX];case p.ElementaryOS_0_3:return[p.Ubuntu_14,...e(p.Ubuntu_14)];case p.ElementaryOS_0_4:return[p.Ubuntu_16,...e(p.Ubuntu_16)];case p.ElementaryOS:return[p.Linux];case p.GalliumOS:case p.LinuxMint:return[p.Ubuntu_16,...e(p.Ubuntu_16)];case p.OracleLinux:return[p.CentOS,...e(p.CentOS)];case p.CentOS:case p.Debian:case p.Fedora:case p.OpenSUSE:case p.RHEL:case p.SLES:return[p.Linux];case p.Ubuntu_22:case p.Ubuntu_20:case p.Ubuntu_18:case p.Ubuntu_16:case p.Ubuntu_14:return[p.Ubuntu,...e(p.Ubuntu)];case p.Ubuntu:return[p.Linux];case p.Windows:case p.OSX:case p.Linux:case p.Linux_ARM64:return[];default:throw new l.PlatformNotSupportedError(t)}};class y{constructor(e,t,n,r=void 0){this.platform=t,this.architecture=n,this.distribution=r;try{e.verbose(`Getting runtime information. platform: ${t}, architecture: ${n}, distribution: ${r}`),this.runtimeId=m(t,n,r,e)}catch(i){const o=i&&i.message?i.message:i;e.error(`Failed to get the runtime information. platform: ${t}, architecture: ${n}, distribution: ${r}. error message: ${o}`),this.runtimeId=void 0}}get isWindows(){return"win32"===this.platform}get isMacOS(){return"darwin"===this.platform}get isLinux(){return"linux"===this.platform}get isValidRuntime(){return void 0!==this.runtimeId&&this.runtimeId!==p.Unknown}get runtimeDisplayName(){return g(this.runtimeId)}toString(){let e=this.platform;return this.architecture&&(e&&(e+=", "),e+=this.architecture),this.distribution&&(e&&(e+=", "),e+=this.distribution.toString()),e}static getCurrent(e=new u.ConsoleLogger){let t,n,r=s.platform();switch(r){case"win32":t=y.getWindowsArchitecture(),n=Promise.resolve(void 0);break;case"darwin":t=y.getUnixArchitecture(),n=Promise.resolve(void 0);break;case"linux":t=y.getUnixArchitecture(),n=h.getCurrent();break;default:return Promise.reject(new l.PlatformNotSupportedError(r))}return Promise.all([t,n]).then((t=>new y(e,r,t[0],t[1])))}static getWindowsArchitecture(){return new Promise(((e,t)=>{y.getWindowsArchitectureWmic().then((t=>{if(t&&t!==d)e(t);else{const t=y.getWindowsArchitectureEnv();e(t)}}))}))}static getWindowsArchitectureWmic(){return this.execChildProcess("wmic os get osarchitecture").then((e=>{if(e){let t=e.split(s.EOL);if(t.length>=2){let e=t[1].trim();if(e.toUpperCase().indexOf("ARM")>=0)return"arm64";if(e.indexOf("64")>=0)return"x86_64";if(e.indexOf("32")>=0)return"x86"}}return d})).catch((e=>d))}static getWindowsArchitectureEnv(){let e;return e="ARM64"===process.env.PROCESSOR_ARCHITECTURE?"arm64":"x86"===process.env.PROCESSOR_ARCHITECTURE&&void 0===process.env.PROCESSOR_ARCHITEW6432?"x86":"x86_64",e}static getUnixArchitecture(){return this.execChildProcess("uname -m").then((e=>{if(e)return e.trim()}))}static execChildProcess(e){return new Promise(((t,n)=>{a.exec(e,{maxBuffer:512e3},((e,r,i)=>{e?n(e):i&&i.length>0?n(new Error(i)):t(r)}))}))}}t.PlatformInformation=y},8769:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getProxyAgent=void 0;const i=n(7016),o=r(n(6645)),s=r(n(2288));t.getProxyAgent=function(e,t,n){const r=t||function(e){return"http:"===e.protocol?process.env.HTTP_PROXY||process.env.http_proxy||void 0:"https:"===e.protocol&&(process.env.HTTPS_PROXY||process.env.https_proxy||process.env.HTTP_PROXY||process.env.http_proxy)||void 0}(e);if(!r)return;const a=(0,i.parse)(r);if(!/^https?:$/.test(a.protocol))return;n=n||!0;const c={host:a.hostname,port:Number(a.port),auth:a.auth,rejectUnauthorized:n};return"http:"===e.protocol?(0,o.default)(c):(0,s.default)(c)}},5235:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.ServerProvider=void 0;const s=o(n(6928)),a=o(n(9896)),c=n(3011),l=n(9858),u=n(5779),d=n(8553);t.ServerProvider=class{get runtime(){return this._runtime?Promise.resolve(this._runtime):this.findRuntime().then((e=>(this._runtime=e,e)))}constructor(e){this.config=e,this.eventEmitter=new c.EventEmitter2({wildcard:!0}),this._downloadProvider=new u.ServiceDownloadProvider(this.config),this._downloadProvider.eventEmitter.onAny(((e,...t)=>{this.eventEmitter.emit(e,...t)})),this.logger=new d.Logger(this.eventEmitter)}get downloadProvider(){return this._downloadProvider}findRuntime(){return l.PlatformInformation.getCurrent(this.logger).then((e=>e.runtimeId))}findServerPath(e,t=void 0){return new Promise(((n,r)=>{a.stat(e,((r,i)=>{let o;i.isFile()&&n(e),void 0===t&&void 0!==this.config&&(t=this.config.executableFiles),void 0!==t&&t.forEach((t=>{let r=s.join(e,t);void 0===o&&a.existsSync(r)&&(o=r,n(o))})),n(o)}))}))}getOrDownloadServer(){return this.getServerPath().then((e=>void 0===e?this.downloadServerFiles().then((e=>e)):e))}getServerPath(){return this.runtime.then((e=>{const t=this._downloadProvider.getInstallDirectory(e);return this.findServerPath(t)}))}downloadServerFiles(){return this.runtime.then((e=>{const t=this._downloadProvider.getInstallDirectory(e);return this._downloadProvider.installService(e).then((e=>this.findServerPath(t)))}))}}},5779:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ServiceDownloadProvider=void 0;const c=o(n(9896)),l=o(n(3480)),u=n(3011),d=o(n(5083)),p=o(n(6928)),h=n(9858),f=n(3018),m=n(7534),g=n(9023),y=a(n(7336)),b=n(3097),v=n(8553);t.ServiceDownloadProvider=class{constructor(e){this._config=e,this.httpClient=new f.HttpClient,this.extractor=new b.ArchiveExtractor,this.eventEmitter=new u.EventEmitter2({wildcard:!0}),d.setGracefulCleanup(),this.httpClient.eventEmitter.onAny(((e,...t)=>{this.eventEmitter.emit(e,...t)})),this.extractor.eventEmitter.onAny(((e,...t)=>{this.eventEmitter.emit(e,...t)})),this.logger=new v.Logger(this.eventEmitter)}getDownloadFileName(e){const t=this._config.downloadFileNames;this.logger.verbose(`Runtimes specified in the configuration file: ${JSON.stringify(t)}`);const n=[e,...(0,h.getFallbackRuntimes)(e)];let r;this.logger.verbose(`Current runtime and the fallback runtimes: ${JSON.stringify(n)}`);for(let e=0;e<n.length;e++){const i=n[e];if(this.logger.verbose(`Checking whether a service file is specified for runtime: '${i}'.`),r=t[i],r){this.logger.verbose(`Found the service file for runtime: '${i}'.`);break}this.logger.verbose(`Service file is not specified for runtime: '${i}'.`)}if(void 0===r)throw"linux"===process.platform?new m.DistributionNotSupportedError("Unsupported linux distribution",process.platform,e):new m.PlatformNotSupportedError(process.platform);return r}getInstallDirectory(e){let t=this._config.installDirectory,n=this._config.version;return t=t.replace("{#version#}",n),t=t.replace("{#platform#}",(0,h.getRuntimeDisplayName)(e)),c.existsSync(t)||l.sync(t),t}getGetDownloadUrl(e){let t=this._config.downloadUrl,n=this._config.version;return t=t.replace("{#version#}",n),t=t.replace("{#fileName#}",e),t}installService(e){return s(this,void 0,void 0,(function*(){const t=this._config.proxy,n=this._config.strictSSL,r=this.getDownloadFileName(e),i={installPath:this.getInstallDirectory(e),url:this.getGetDownloadUrl(r),tmpFile:void 0},o=(0,g.promisify)(c.exists),a=(0,g.promisify)(c.unlink);return yield function(e,t,n={retries:0}){return s(this,void 0,void 0,(function*(){return yield(0,y.default)(((r,i)=>s(this,void 0,void 0,(function*(){try{return yield e()}catch(o){if(/403/.test(o))return void r(o);throw i<=n.retries&&t.warn(`[${(new Date).toLocaleTimeString("en-US",{hour12:!1})}] Retrying...   as attempt:${i} to run '${e.name}' failed with: '${o}'.`),o}}))),n)}))}((()=>s(this,void 0,void 0,(function*(){try{i.tmpFile=yield this.createTempFile(i),this.logger.info(`Downloading the package: '${i.url}' to file: '${i.tmpFile.name}'`),yield this.httpClient.downloadFile(i.url,i,t,n),this.logger.info(`Installing the package from file: ${i.tmpFile.name}`),yield this.install(i)}finally{(yield o(i.tmpFile.name))&&(yield a(i.tmpFile.name),this.logger.info(`Deleted the package file: ${i.tmpFile.name}`))}}))),this.logger,this._config.retry),!0}))}createTempFile(e){return new Promise(((t,n)=>{d.file({prefix:"package-",postfix:p.extname(e.url)},((e,r,i,o)=>{if(e)return n(new Error("Error from tmp.file"));t({name:r,fd:i,removeCallback:o})}))}))}install(e){return s(this,void 0,void 0,(function*(){this.eventEmitter.emit("install_start",e.installPath),yield this.extractor.extract(e.tmpFile.name,e.installPath),this.eventEmitter.emit("install_end")}))}}},3442:function(e,t,n){"use strict";var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),i=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return i(t,e),t},s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Unzipper=t.ExtractError=void 0;const a=n(4824),c=o(n(6928)),l=s(n(3480)),u=n(4697),d=n(9896),p=n(3011);class h extends Error{constructor(e,t){let n=t.message;"CorruptZip"===e&&(n=`Corrupt ZIP: ${n}`),super(n),this.type=e,this.cause=t}}function f(e){if(e instanceof h)return e;let t;return/end of central directory record signature not found/.test(e.message)&&(t="CorruptZip"),new h(t,e)}t.ExtractError=h,t.Unzipper=class{constructor(){this.eventEmitter=new p.EventEmitter2({wildcard:!0})}extract(e,t){return this.openZip(e,!0).then((e=>this.extractZip(e,t)))}openZip(e,t=!1){return new Promise(((n,r)=>{(0,a.open)(e,t?{lazyEntries:!0}:void 0,((e,t)=>{e?r(f(e)):n(t)}))}))}extractZip(e,t){let n=0;return new Promise(((r,i)=>{const o=new u.Sequencer,s=()=>{n++,e.readEntry()};e.once("error",i),e.once("close",(()=>{e.entryCount===n?r():i(new h("Incomplete",new Error(`Incomplete. Found ${n} of ${e.entryCount} entries`)))})),e.readEntry(),e.on("entry",(r=>{if(/\/$/.test(r.fileName)){const e=c.join(t,r.fileName);return void(0,l.default)(e).then((()=>s())).then(void 0,i)}const a=this.openZipStream(e,r),u=function(e){const t=e.externalFileAttributes>>16||33188;return[448,56,7].map((e=>t&e)).reduce(((e,t)=>e+t),61440&t)}(r);o.queue((()=>a.then((i=>this.extractEntry(i,r.fileName,u,t,n+1,e.entryCount).then((()=>s())))))).then(void 0,i)}))}))}extractEntry(e,t,n,r,i,o){const s=c.dirname(t),a=c.join(r,s);if(0!==a.indexOf(r))return Promise.reject(new Error(`Error extracting ${t}. Invalid file.`));const u=c.join(r,t);let p;return Promise.resolve((0,l.default)(a)).then((()=>new Promise(((t,r)=>{try{p=(0,d.createWriteStream)(u,{mode:n}),p.once("close",(()=>{this.eventEmitter.emit("entry_extracted",u,i,o),t()})),p.once("error",r),e.once("error",r),e.pipe(p)}catch(e){r(e)}}))))}openZipStream(e,t){return new Promise(((n,r)=>{e.openReadStream(t,((e,t)=>{e?r(f(e)):n(t)}))}))}}},2391:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,{signal:n}={}){return new Promise(((r,i)=>{function o(){null==n||n.removeEventListener("abort",o),e.removeListener(t,s),e.removeListener("error",a)}function s(...e){o(),r(e)}function a(e){o(),i(e)}null==n||n.addEventListener("abort",o),e.on(t,s),e.on("error",a)}))}},7571:(e,t,n)=>{var r,i,o,s,a=Object.create,c=Object.defineProperty,l=Object.defineProperties,u=Object.getOwnPropertyDescriptor,d=Object.getOwnPropertyDescriptors,p=Object.getOwnPropertyNames,h=Object.getOwnPropertySymbols,f=Object.getPrototypeOf,m=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable,y=(e,t,n)=>t in e?c(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,b=(e,t)=>{for(var n in t||(t={}))m.call(t,n)&&y(e,n,t[n]);if(h)for(var n of h(t))g.call(t,n)&&y(e,n,t[n]);return e},v=(e,t)=>l(e,d(t)),S=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),w=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of p(t))!m.call(e,i)&&i!==n&&c(e,i,{get:()=>t[i],enumerable:!(r=u(t,i))||r.enumerable});return e},C=(e,t,n)=>(n=null!=e?a(f(e)):{},w(!t&&e&&e.__esModule?n:c(n,"default",{value:e,enumerable:!0}),e)),T=S(((n,s)=>{var a;a=function(e){"use strict";var t="function",n="object",r="undefined",i="prototype",o="hasOwnProperty",s="default",a=Object,c=a[i],l=a.assign,u=a.create,d=a.defineProperty,p=c[o],h=null;function f(e){return void 0===e&&(e=!0),(!h||!e)&&(typeof globalThis!==r&&globalThis&&(h=globalThis),typeof self!==r&&self&&(h=self),typeof window!==r&&window&&(h=window),typeof global!==r&&global&&(h=global)),h}function m(e){throw new TypeError(e)}function g(e){if(u)return u(e);if(null==e)return{};var r=typeof e;function o(){}return r!==n&&r!==t&&m("Object prototype may only be an Object:"+e),o[i]=e,new o}var y=(f()||{}).Symbol,b=(f()||{}).Reflect,v=!!b,S="decorate",w="metadata",C="getOwnPropertySymbols",T="iterator",E=l||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])c[o].call(t,i)&&(e[i]=t[i]);return e},_=function(e,t){return(_=a.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t[o](n)&&(e[n]=t[n])})(e,t)};function x(e,n){function r(){this.constructor=e}typeof n!==t&&null!==n&&m("Class extends value "+String(n)+" is not a constructor or null"),_(e,n),e[i]=null===n?g(n):(r[i]=n[i],new r)}function R(e,t,n,r){void 0===r&&(r=n),u?d(e,r,{enumerable:!0,get:function(){return t[n]}}):e[r]=t[n]}e.ObjAssign=l,e.ObjClass=a,e.ObjCreate=u,e.ObjDefineProperty=d,e.ObjHasOwnProperty=p,e.ObjProto=c,e.__assignFn=E,e.__createBindingFn=R,e.__decorateFn=function(e,n,r,i){var o,s=arguments.length,c=s<3?n:null===i?i=a.getOwnPropertyDescriptor(n,r):i;if(v&&typeof b[S]===t)c=b[S](e,n,r,i);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(c=(s<3?o(c):s>3?o(n,r,c):o(n,r))||c);return s>3&&c&&d(n,r,c),c},e.__exportStarFn=function(e,t){for(var n in e)n!==s&&!p.call(t,n)&&R(t,e,n)},e.__exposeGlobalTsLib=function(){var e,t,n,r,i=f()||{};t=E,n=x,r=R,(e=i).__assign||(e.__assign=l||t),e.__extends||(e.__extends=n),e.__createBinding||(e.__createBinding=r),__assign||(__assign=i.__assign),__extends||(__extends=i.__extends),__createBinding||(__createBinding=i.__createBinding)},e.__extendsFn=x,e.__importDefaultFn=function(e){return e&&e.__esModule?e:{strDefault:e}},e.__importStarFn=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)n!==s&&Object.prototype.hasOwnProperty.call(e,n)&&R(t,e,n);return u?d(t,s,{enumerable:!0,value:e}):t[s]=e,t},e.__makeTemplateObjectFn=function(e,t){return d?d(e,"raw",{value:t}):e.raw=t,e},e.__metadataFn=function(e,n){if(v&&b[w]===t)return b[w](e,n)},e.__paramFn=function(e,t){return function(n,r){t(n,r,e)}},e.__readFn=function(e,n){var r=typeof y===t&&e[y[T]];if(!r)return e;var i,o,s=r.call(e),a=[];try{for(;(void 0===n||n-- >0)&&!(i=s.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(r=s.return)&&r.call(s)}finally{if(o)throw o.error}}return a},e.__restFn=function(e,n){var r={};for(var i in e)p.call(e,i)&&n.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&typeof a[C]===t)for(var o=0,s=a[C](e);o<s.length;o++)n.indexOf(s[o])<0&&c.propertyIsEnumerable.call(e,s[o])&&(r[s[o]]=e[s[o]]);return r},e.__spreadArrayFn=function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e},e.__spreadArraysFn=function(){for(var e=arguments,t=0,n=0,r=e.length;n<r;n++)t+=e[n].length;var i=Array(t),o=0;for(n=0;n<r;n++)for(var s=e[n],a=0,c=s.length;a<c;a++,o++)i[o]=s[a];return i},e.__valuesFn=function(e){var n=typeof y===t&&y[T],r=n&&e[n],i=0;return r?r.call(e):e&&"number"==typeof e.length?{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}}:void m(n?"Object is not iterable.":"Symbol.iterator is not defined.")},e.getGlobal=f,e.objCreateFn=g,e.strDefault=s,e.strShimFunction=t,e.strShimHasOwnProperty=o,e.strShimObject=n,e.strShimPrototype=i,e.strShimUndefined=r,e.throwTypeError=m,function(e,t,n){var r=Object.defineProperty;if(r)try{return r(e,t,n)}catch{}n&&void 0!==typeof n.value&&(e[t]=n.value)}(e,"__esModule",{value:!0})},"object"==typeof n&&typeof s<"u"?a(n):(i=[t],void 0===(o="function"==typeof(r=a)?r.apply(t,i):r)||(e.exports=o))})),E=S(((n,s)=>{var a;a=function(e){"use strict";var t="function",n="object",r="undefined",i="prototype",o="hasOwnProperty",s=Object,a=s[i],c=s.assign,l=s.create,u=s.defineProperty,d=a[o],p=null;function h(e){return void 0===e&&(e=!0),(!p||!e)&&(typeof globalThis!==r&&globalThis&&(p=globalThis),typeof self!==r&&self&&(p=self),typeof window!==r&&window&&(p=window),typeof global!==r&&global&&(p=global)),p}function f(e){throw new TypeError(e)}function m(e){if(l)return l(e);if(null==e)return{};var r=typeof e;function o(){}return r!==n&&r!==t&&f("Object prototype may only be an Object:"+e),o[i]=e,new o}(h()||{}).Symbol,(h()||{}).Reflect;var g=function(e,t){return(g=s.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t[o](n)&&(e[n]=t[n])})(e,t)};function y(e,n){function r(){this.constructor=e}typeof n!==t&&null!==n&&f("Class extends value "+String(n)+" is not a constructor or null"),g(e,n),e[i]=null===n?m(n):(r[i]=n[i],new r)}function b(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e}var v="",S="processTelemetry",w="priority",C="setNextPlugin",T="isInitialized",E="teardown",_="core",x="update",R="disabled",I="_doTeardown",P="processNext",O="resume",D="pause",A="NotificationListener",k="add"+A,N="remove"+A,L="eventsSent",j="eventsDiscarded",M="eventsSendRequest",F="perfEvent",q="toISOString",B="endsWith",U="startsWith",z="indexOf",G="reduce",H="trim",V="toString",$="__proto__",W="constructor",K=u,Q=s.freeze,X=s.seal,Y=s.keys,J=String[i],Z=J[H],ee=J[B],te=J[U],ne=Date[i][q],re=Array.isArray,ie=a[V],oe=d[V],se=oe.call(s),ae=/-([a-z])/g,ce=/([^\w\d_$])/g,le=/^(\d+[\w\d_$])/,ue=Object.getPrototypeOf;function de(e){if(e){if(ue)return ue(e);var t=e[$]||e[i]||e[W];if(t)return t}return null}function pe(e,t){return typeof e===t}function he(e){return void 0===e||typeof e===r}function fe(e){return null===e||he(e)}function me(e){return!fe(e)}function ge(e,t){return!(!e||!d.call(e,t))}function ye(e){return!(!e||typeof e!==n)}function be(e){return!(!e||typeof e!==t)}function ve(e){var t=e;return t&&xe(t)&&(t=(t=(t=t.replace(ae,(function(e,t){return t.toUpperCase()}))).replace(ce,"_")).replace(le,(function(e,t){return"_"+t}))),t}function Se(e,t){if(e)for(var n in e)d.call(e,n)&&t.call(e,n,e[n])}function we(e,t){var n=!1;return e&&t&&!(n=e===t)&&(n=ee?e[B](t):function(e,t){var n=!1,r=t?t.length:0,i=e?e.length:0;if(r&&i&&i>=r&&!(n=e===t)){for(var o=i-1,s=r-1;s>=0;s--){if(e[o]!=t[s])return!1;o--}n=!0}return n}(e,t)),n}function Ce(e,t){return!(!e||!t)&&-1!==e.indexOf(t)}function Te(e){return!(!e||"[object Date]"!==ie.call(e))}var Ee=re||function(e){return!(!e||"[object Array]"!==ie.call(e))};function _e(e){return!(!e||"[object Error]"!==ie.call(e))}function xe(e){return"string"==typeof e}function Re(e){return"number"==typeof e}function Ie(e){return"boolean"==typeof e}function Pe(e){var n=!1;if(e&&"object"==typeof e){var r=ue?ue(e):de(e);r?(r[W]&&d.call(r,W)&&(r=r[W]),n=typeof r===t&&oe.call(r)===se):n=!0}return n}function Oe(e){if(e)return ne?e[q]():function(e){if(e&&e.getUTCFullYear){var t=function(e){var t=String(e);return 1===t.length&&(t="0"+t),t};return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+String((e.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}}(e)}function De(e,t,n){var r=e.length;try{for(var i=0;i<r&&(!(i in e)||-1!==t.call(n||e,e[i],i,e));i++);}catch{}}function Ae(e,t,n){if(e){if(e[z])return e[z](t,n);var r=e.length,i=n||0;try{for(var o=Math.max(i>=0?i:r-Math.abs(i),0);o<r;o++)if(o in e&&e[o]===t)return o}catch{}}return-1}function ke(e,t,n){var r;if(e){if(e.map)return e.map(t,n);var i=e.length,o=n||e;r=new Array(i);try{for(var s=0;s<i;s++)s in e&&(r[s]=t.call(o,e[s],e))}catch{}}return r}function Ne(e,t,n){var r;if(e){if(e[G])return e[G](t,n);var i=e.length,o=0;if(arguments.length>=3)r=arguments[2];else{for(;o<i&&!(o in e);)o++;r=e[o++]}for(;o<i;)o in e&&(r=t(r,e[o],o,e)),o++}return r}function Le(e){return e&&(e=Z&&e[H]?e[H]():e.replace?e.replace(/^\s+|\s+$/g,""):e),e}var je=!{toString:null}.propertyIsEnumerable("toString"),Me=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];function Fe(e){var r=typeof e;if(r!==t&&(r!==n||null===e)&&f("objKeys called on non-object"),!je&&Y)return Y(e);var i=[];for(var o in e)e&&d.call(e,o)&&i.push(o);if(je)for(var s=Me.length,a=0;a<s;a++)e&&d.call(e,Me[a])&&i.push(Me[a]);return i}function qe(e,t,n,r){if(K)try{var i={enumerable:!0,configurable:!0};return n&&(i.get=n),r&&(i.set=r),K(e,t,i),!0}catch{}return!1}function Be(e){return e}function Ue(e){return Q&&Se(e,(function(e,t){(Ee(t)||ye(t))&&Q(t)})),ze(e)}var ze=Q||Be,Ge=X||Be;function He(){var e=Date;return e.now?e.now():(new e).getTime()}function Ve(e){return _e(e)?e.name:v}function $e(e,t,n,r,i){var o=n;return e&&(o=e[t])!==n&&(!i||i(o))&&(!r||r(n))&&(o=n,e[t]=o),o}function We(e,t,n){var r;return e?!(r=e[t])&&fe(r)&&(r=he(n)?{}:n,e[t]=r):r=he(n)?{}:n,r}function Ke(e){return!e}function Qe(e){return!!e}function Xe(e){throw new Error(e)}function Ye(e,t){var n=null,r=null;return be(e)?n=e:r=e,function(){var e=arguments;if(n&&(r=n()),r)return r[t].apply(r,e)}}function Je(e,t,n,r,i){e&&t&&n&&(!1!==i||he(e[t]))&&(e[t]=Ye(n,r))}function Ze(e,t,n,r){return e&&t&&ye(e)&&Ee(n)&&De(n,(function(n){xe(n)&&Je(e,n,t,n,r)})),e}function et(e,t,n,r,i,o){var s=arguments,a=s[0]||{},c=s.length,l=!1,u=1;for(c>0&&Ie(a)&&(l=a,a=s[u]||{},u++),ye(a)||(a={});u<c;u++){var p=s[u],h=Ee(p),f=ye(p);for(var m in p)if(h&&m in p||f&&d.call(p,m)){var g=p[m],y=void 0;if(l&&g&&((y=Ee(g))||Pe(g))){var b=a[m];y?Ee(b)||(b=[]):Pe(b)||(b={}),g=et(l,b,g)}void 0!==g&&(a[m]=g)}}return a}function tt(e){var t={};return Se(e,(function(e,n){t[e]=n,t[n]=e})),Ue(t)}var nt=tt({Unknown:0,NonRetryableStatus:1,InvalidEvent:2,SizeLimitExceeded:3,KillSwitch:4,QueueFull:5}),rt="constructor",it="prototype",ot="function",st="_dynInstFuncs",at="_isDynProxy",ct="_dynClass",lt="_dynInstChk",ut=lt,dt="_dfOpts",pt="_unknown_",ht="__proto__",ft="_dyn"+ht,mt="_dynInstProto",gt="useBaseInst",yt="setInstFuncs",bt=Object,vt=bt.getPrototypeOf,St=bt.getOwnPropertyNames,wt=0;function Ct(e,t){return e&&bt[it].hasOwnProperty.call(e,t)}function Tt(e){return e&&(e===bt[it]||e===Array[it])}function Et(e){return Tt(e)||e===Function[it]}function _t(e){var t;if(e){if(vt)return vt(e);var n=e[ht]||e[it]||(e[rt]?e[rt][it]:null);t=e[ft]||n,Ct(e,ft)||(delete e[mt],t=e[ft]=e[mt]||e[ft],e[mt]=n)}return t}function xt(e,t){var n=[];if(St)n=St(e);else for(var r in e)"string"==typeof r&&Ct(e,r)&&n.push(r);if(n&&n.length>0)for(var i=0;i<n.length;i++)t(n[i])}function Rt(e,t,n){return t!==rt&&typeof e[t]===ot&&(n||Ct(e,t))}function It(e){throw new TypeError("DynamicProto: "+e)}function Pt(e,t){for(var n=e.length-1;n>=0;n--)if(e[n]===t)return!0;return!1}function Ot(e,t,n,r,i){if(!Tt(e)){var o=n[st]=n[st]||{},s=o[t]=o[t]||{};!1!==o[ut]&&(o[ut]=!!i),xt(n,(function(t){Rt(n,t,!1)&&n[t]!==r[t]&&(s[t]=n[t],delete n[t],(!Ct(e,t)||e[t]&&!e[t][at])&&(e[t]=function(e,t){var n=function(){var r=function(e,t,n,r){var i=null;if(e&&Ct(n,ct)){var o=e[st]||{};if((i=(o[n[ct]]||{})[t])||It("Missing ["+t+"] "+ot),!i[lt]&&!1!==o[ut]){for(var s=!Ct(e,t),a=_t(e),c=[];s&&a&&!Et(a)&&!Pt(c,a);){var l=a[t];if(l){s=l===r;break}c.push(a),a=_t(a)}try{s&&(e[t]=i),i[lt]=1}catch{o[ut]=!1}}}return i}(this,t,e,n)||function(e,t,n){var r=t[e];return r===n&&(r=_t(t)[e]),typeof r!==ot&&It("["+e+"] is not a "+ot),r}(t,e,n);return r.apply(this,arguments)};return n[at]=1,n}(e,t)))}))}}function Dt(e,t){return Ct(e,it)?e.name||t||pt:((e||{})[rt]||{}).name||t||pt}function At(e,t,n,r){Ct(e,it)||It("theClass is an invalid class definition.");var i=e[it];(function(e,t){if(vt){for(var n=[],r=_t(t);r&&!Et(r)&&!Pt(n,r);){if(r===e)return!0;n.push(r),r=_t(r)}return!1}return!0})(i,t)||It("["+Dt(e)+"] is not in class hierarchy of ["+Dt(t)+"]");var o=null;Ct(i,ct)?o=i[ct]:(o="_dynCls$"+Dt(e,"_")+"$"+wt,wt++,i[ct]=o);var s=At[dt],a=!!s[gt];a&&r&&void 0!==r[gt]&&(a=!!r[gt]);var c=function(e){var t={};return xt(e,(function(n){!t[n]&&Rt(e,n,!1)&&(t[n]=e[n])})),t}(t),l=function(e,t,n,r){function i(e,t,n){var i=t[n];if(i[at]&&r){var o=e[st]||{};!1!==o[ut]&&(i=(o[t[ct]]||{})[n]||i)}return function(){return i.apply(e,arguments)}}var o={};xt(n,(function(e){o[e]=i(t,n,e)}));for(var s=_t(e),a=[];s&&!Et(s)&&!Pt(a,s);)xt(s,(function(e){!o[e]&&Rt(s,e,!vt)&&(o[e]=i(t,s,e))})),a.push(s),s=_t(s);return o}(i,t,c,a);n(t,l);var u=!!vt&&!!s[yt];u&&r&&(u=!!r[yt]),Ot(i,o,t,c,!1!==u)}At[dt]={setInstFuncs:!0,useBaseInst:!0};var kt="window",Nt="document",Lt="navigator",jt="location",Mt="console",Ft="performance",qt="JSON",Bt="crypto",Ut="msCrypto",zt="msie",Gt="trident/",Ht="XMLHttpRequest",Vt=null,$t=null,Wt=!1,Kt=null,Qt=null;function Xt(e,t){var n=!1;if(e){try{if(!(n=t in e)){var r=e[i];r&&(n=t in r)}}catch{}if(!n)try{n=!he((new e)[t])}catch{}}return n}function Yt(e){var t=h();return t&&t[e]?t[e]:e===kt&&Jt()?window:null}function Jt(){return Boolean(typeof window===n&&window)}function Zt(){return Jt()?window:Yt(kt)}function en(){return Boolean(typeof document===n&&document)}function tn(){return en()?document:Yt(Nt)}function nn(){return Boolean(typeof navigator===n&&navigator)}function rn(){return nn()?navigator:Yt(Lt)}function on(){return Boolean(typeof history===n&&history)}function sn(e){if(e&&Wt){var t=Yt("__mockLocation");if(t)return t}return typeof location===n&&location?location:Yt(jt)}function an(){return typeof console!==r?console:Yt(Mt)}function cn(){return Yt(Ft)}function ln(){return Boolean(typeof JSON===n&&JSON||null!==Yt(qt))}function un(){return ln()?JSON||Yt(qt):null}function dn(){return Yt(Bt)}function pn(){return Yt(Ut)}function hn(){var e=rn();if(e&&(e.userAgent!==$t||null===Vt)){var t=(($t=e.userAgent)||v).toLowerCase();Vt=Ce(t,zt)||Ce(t,Gt)}return Vt}function fn(e){var t=Object[i].toString.call(e),n=v;return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":ln()&&(n=un().stringify(e)),t+n}function mn(){var e=!1;try{e=!!Yt(Ht)}catch{}return e}function gn(e,t){if(e)for(var n=0;n<e.length;n++){var r=e[n];if(r.name&&r.name===t)return r}return{}}function yn(e){var t=tn();return t&&e?gn(t.querySelectorAll("meta"),e).content:null}function bn(e){var t,n=cn();if(n){var r=n.getEntriesByType("navigation")||[];t=gn((r.length>0?r[0]:{}).serverTiming,e).description}return t}var vn,Sn=["eventsSent","eventsDiscarded","eventsSendRequest","perfEvent"],wn=null;function Cn(e,t){return function(){var n=arguments,r=Tn(t);if(r){var i=r.listener;i&&i[e]&&i[e].apply(i,n)}}}function Tn(e){var t=wn;return!t&&!0!==e.disableDbgExt&&(t=wn||function(){var e=Yt("Microsoft");return e&&(wn=e.ApplicationInsights),wn}()),t?t.ChromeDbgExt:null}function En(e){if(!vn){vn={};for(var t=0;t<Sn.length;t++)vn[Sn[t]]=Cn(Sn[t],e)}return vn}function _n(e){return e?'"'+e.replace(/\"/g,v)+'"':v}function xn(e,t){var n=an();if(n){var r="log";n[e]&&(r=e),be(n[r])&&n[r](t)}}var Rn=function(){function e(e,t,n,r){void 0===n&&(n=!1);var i=this;i.messageId=e,i.message=(n?"AI: ":"AI (Internal): ")+e;var o=v;ln()&&(o=un().stringify(r));var s=(t?" message:"+_n(t):v)+(r?" props:"+_n(o):v);i.message+=s}return e.dataType="MessageData",e}();function In(e,t){return(e||{}).logger||new Pn(t)}var Pn=function e(t){this.identifier="DiagnosticLogger",this.queue=[];var n=0,r={};At(e,this,(function(e){function i(e,n){var r=t[e];return fe(r)?n:r}function o(e,n){var r=Tn(t);r&&r.diagLog&&r.diagLog(e,n)}fe(t)&&(t={}),e.consoleLoggingLevel=function(){return i("loggingLevelConsole",0)},e.telemetryLoggingLevel=function(){return i("loggingLevelTelemetry",1)},e.maxInternalMessageLimit=function(){return i("maxMessageLimit",25)},e.enableDebugExceptions=function(){return i("enableDebugExceptions",!1)},e.throwInternal=function(t,n,i,s,a){void 0===a&&(a=!1);var c=new Rn(n,i,a,s);if(e.enableDebugExceptions())throw fn(c);var l=1===t?"errorToConsole":"warnToConsole";if(he(c.message))o("throw"+(1===t?"Critical":"Warning"),c);else{var u=e.consoleLoggingLevel();if(a){var d=+c.messageId;!r[d]&&u>=t&&(e[l](c.message),r[d]=!0)}else u>=t&&e[l](c.message);e.logInternalMessage(t,c)}},e.warnToConsole=function(e){xn("warn",e),o("warning",e)},e.errorToConsole=function(e){xn("error",e),o("error",e)},e.resetInternalMessageCount=function(){n=0,r={}},e.logInternalMessage=function(t,i){if(!(n>=e.maxInternalMessageLimit())){var s=!0,a="AITR_"+i.messageId;if(r[a]?s=!1:r[a]=!0,s&&(t<=e.telemetryLoggingLevel()&&(e.queue.push(i),n++,o(1===t?"error":"warn",i)),n===e.maxInternalMessageLimit())){var c="Internal events throttle limit per PageView reached for this app.",l=new Rn(23,c,!1);e.queue.push(l),1===t?e.errorToConsole(c):e.warnToConsole(c)}}}}))};function On(e){return e||new Pn}function Dn(e,t,n,r,i,o){void 0===o&&(o=!1),(e||new Pn).throwInternal(t,n,r,i,o)}function An(e,t){On(e).warnToConsole(t)}var kn="ctx",Nn=null,Ln=function(){function e(t,n,r){var i,o=this,s=!1;o.start=He(),o.name=t,o.isAsync=r,o.isChildEvt=function(){return!1},be(n)&&(s=qe(o,"payload",(function(){return!i&&be(n)&&(i=n(),n=null),i}))),o.getCtx=function(t){return t?t===e.ParentContextKey||t===e.ChildrenContextKey?o[t]:(o[kn]||{})[t]:null},o.setCtx=function(t,n){t&&(t===e.ParentContextKey?(o[t]||(o.isChildEvt=function(){return!0}),o[t]=n):t===e.ChildrenContextKey?o[t]=n:(o[kn]=o[kn]||{})[t]=n)},o.complete=function(){var t=0,r=o.getCtx(e.ChildrenContextKey);if(Ee(r))for(var i=0;i<r.length;i++){var a=r[i];a&&(t+=a.time)}o.time=He()-o.start,o.exTime=o.time-t,o.complete=function(){},!s&&be(n)&&(o.payload=n())}}return e.ParentContextKey="parent",e.ChildrenContextKey="childEvts",e}(),jn=function e(t){this.ctx={},At(e,this,(function(e){e.create=function(e,t,n){return new Ln(e,t,n)},e.fire=function(e){e&&(e.complete(),t&&be(t.perfEvent)&&t.perfEvent(e))},e.setCtx=function(t,n){t&&((e[kn]=e[kn]||{})[t]=n)},e.getCtx=function(t){return(e[kn]||{})[t]}}))},Mn="CoreUtils.doPerf";function Fn(e,t,n,r,i){if(e){var o=e;if(be(o.getPerfMgr)&&(o=o.getPerfMgr()),o){var s=void 0,a=o.getCtx(Mn);try{if(s=o.create(t(),r,i)){if(a&&s.setCtx&&(s.setCtx(Ln.ParentContextKey,a),a.getCtx&&a.setCtx)){var c=a.getCtx(Ln.ChildrenContextKey);c||(c=[],a.setCtx(Ln.ChildrenContextKey,c)),c.push(s)}return o.setCtx(Mn,s),n(s)}}catch(e){s&&s.setCtx&&s.setCtx("exception",e)}finally{s&&o.fire(s),o.setCtx(Mn,a)}}}return n()}function qn(){return Nn}var Bn=4294967296,Un=4294967295,zn=!1,Gn=123456789,Hn=987654321;function Vn(e){e<0&&(e>>>=0),Gn=123456789+e&Un,Hn=987654321-e&Un,zn=!0}function $n(){try{var e=2147483647&He();Vn((Math.random()*Bn^e)+e)}catch{}}function Wn(e){return e>0?Math.floor(Kn()/Un*(e+1))>>>0:0}function Kn(e){var t=0,n=dn()||pn();return n&&n.getRandomValues&&(t=n.getRandomValues(new Uint32Array(1))[0]&Un),0===t&&hn()&&(zn||$n(),t=Xn()&Un),0===t&&(t=Math.floor(Bn*Math.random()|0)),e||(t>>>=0),t}function Qn(e){e?Vn(e):$n()}function Xn(e){var t=((Hn=36969*(65535&Hn)+(Hn>>16)&Un)<<16)+(65535&(Gn=18e3*(65535&Gn)+(Gn>>16)&Un))>>>0&Un;return e||(t>>>=0),t}function Yn(e){void 0===e&&(e=22);for(var t=Kn()>>>0,n=0,r=v;r.length<e;)n++,r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(63&t),t>>>=6,5===n&&(t=(Kn()<<2&4294967295|3&t)>>>0,n=0);return r}var Jn=u,Zn="2.8.4",er="."+Yn(6),tr=0;function nr(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType}function rr(e,t){return void 0===t&&(t=!1),ve(e+tr+++(t?"."+Zn:"")+er)}function ir(e){var t={id:rr("_aiData-"+(e||"")+"."+Zn),accept:function(e){return nr(e)},get:function(e,n,r,i){var o=e[t.id];return o?o[ve(n)]:(i&&((o=function(e,t){var n=t[e.id];if(!n){n={};try{nr(t)&&(function(e,t,n){if(Jn)try{return Jn(e,t,{value:n,enumerable:!1,configurable:!0}),!0}catch{}return!1}(t,e.id,n)||(t[e.id]=n))}catch{}}return n}(t,e))[ve(n)]=r),r)},kill:function(e,t){if(e&&e[t])try{delete e[t]}catch{}}};return t}var or="toGMTString",sr="toUTCString",ar="cookie",cr="expires",lr="enabled",ur="isCookieUseDisabled",dr="disableCookiesUsage",pr="_ckMgr",hr=null,fr=null,mr=null,gr=tn(),yr={},br={};function vr(e,t){var n=wr[pr]||br[pr];return n||(n=wr[pr]=wr(e,t),br[pr]=n),n}function Sr(e){return!e||e.isEnabled()}function wr(e,t){var n=function(e){var t=e.cookieCfg=e.cookieCfg||{};if($e(t,"domain",e.cookieDomain,me,fe),$e(t,"path",e.cookiePath||"/",null,fe),fe(t[lr])){var n=void 0;he(e[ur])||(n=!e[ur]),he(e[dr])||(n=!e[dr]),t[lr]=n}return t}(e||br),r=n.path||"/",i=n.domain,o=!1!==n[lr],s={isEnabled:function(){var e=o&&Cr(t),n=br[pr];return e&&n&&s!==n&&(e=Sr(n)),e},setEnabled:function(e){o=!1!==e},set:function(e,t,o,a,c){var l=!1;if(Sr(s)){var u={},d=Le(t||v),p=d.indexOf(";");if(-1!==p&&(d=Le(t.substring(0,p)),u=Tr(t.substring(p+1))),$e(u,"domain",a||i,Qe,he),!fe(o)){var h=hn();if(he(u[cr])){var f=He()+1e3*o;if(f>0){var m=new Date;m.setTime(f),$e(u,cr,Er(m,h?or:sr)||Er(m,h?or:sr)||v,Qe)}}h||$e(u,"max-age",v+o,null,he)}var g=sn();g&&"https:"===g.protocol&&($e(u,"secure",null,null,he),null===fr&&(fr=!Ir((rn()||{}).userAgent)),fr&&$e(u,"SameSite","None",null,he)),$e(u,"path",c||r,null,he),(n.setCookie||Rr)(e,_r(d,u)),l=!0}return l},get:function(e){var t=v;return Sr(s)&&(t=(n.getCookie||xr)(e)),t},del:function(e,t){var n=!1;return Sr(s)&&(n=s.purge(e,t)),n},purge:function(e,r){var i,o=!1;if(Cr(t)){var s=((i={}).path=r||"/",i[cr]="Thu, 01 Jan 1970 00:00:01 GMT",i);hn()||(s["max-age"]="0"),(n.delCookie||Rr)(e,_r(v,s)),o=!0}return o}};return s[pr]=s,s}function Cr(e){if(null===hr){hr=!1;try{hr=void 0!==(gr||{})[ar]}catch(t){Dn(e,2,68,"Cannot access document.cookie - "+Ve(t),{exception:fn(t)})}}return hr}function Tr(e){var t={};return e&&e.length&&De(Le(e).split(";"),(function(e){if(e=Le(e||v)){var n=e.indexOf("=");-1===n?t[e]=null:t[Le(e.substring(0,n))]=Le(e.substring(n+1))}})),t}function Er(e,t){return be(e[t])?e[t]():null}function _r(e,t){var n=e||v;return Se(t,(function(e,t){n+="; "+e+(fe(t)?v:"="+t)})),n}function xr(e){var t=v;if(gr){var n=gr[ar]||v;mr!==n&&(yr=Tr(n),mr=n),t=Le(yr[e]||v)}return t}function Rr(e,t){gr&&(gr[ar]=e+"="+t)}function Ir(e){return!!xe(e)&&!!(Ce(e,"CPU iPhone OS 12")||Ce(e,"iPad; CPU OS 12")||Ce(e,"Macintosh; Intel Mac OS X 10_14")&&Ce(e,"Version/")&&Ce(e,"Safari")||Ce(e,"Macintosh; Intel Mac OS X 10_14")&&we(e,"AppleWebKit/605.1.15 (KHTML, like Gecko)")||Ce(e,"Chrome/5")||Ce(e,"Chrome/6")||Ce(e,"UnrealEngine")&&!Ce(e,"Chrome")||Ce(e,"UCBrowser/12")||Ce(e,"UCBrowser/11"))}var Pr="on",Or="attachEvent",Dr="addEventListener",Ar="detachEvent",kr="removeEventListener",Nr="events",Lr="visibilitychange",jr="pagehide",Mr="pageshow",Fr="unload",qr="beforeunload",Br=rr("aiEvtPageHide"),Ur=rr("aiEvtPageShow"),zr=/\.[\.]+/g,Gr=/[\.]+$/,Hr=1,Vr=ir("events"),$r=/^([^.]*)(?:\.(.+)|)/;function Wr(e){return e&&e.replace?e.replace(/^\s*\.*|\.*\s*$/g,""):e}function Kr(e,t){if(t){var n="";Ee(t)?(n="",De(t,(function(e){(e=Wr(e))&&("."!==e[0]&&(e="."+e),n+=e)}))):n=Wr(t),n&&("."!==n[0]&&(n="."+n),e=(e||"")+n)}var r=$r.exec(e||"")||[];return{type:r[1],ns:(r[2]||"").replace(zr,".").replace(Gr,"").split(".").sort().join(".")}}function Qr(e,t,n){void 0===n&&(n=!0);var r=Vr.get(e,Nr,{},n),i=r[t];return i||(i=r[t]=[]),i}function Xr(e,t,n,r){e&&t&&t.type&&(e[kr]?e[kr](t.type,n,r):e[Ar]&&e[Ar](Pr+t.type,n))}function Yr(e,t,n,r){for(var i=t.length;i--;){var o=t[i];o&&(!n.ns||n.ns===o.evtName.ns)&&(!r||r(o))&&(Xr(e,o.evtName,o.handler,o.capture),t.splice(i,1))}}function Jr(e,t){return t?Kr("xx",Ee(t)?[e].concat(t):[e,t]).ns.split("."):e}function Zr(e,t,n,r,i){void 0===i&&(i=!1);var o=!1;if(e)try{var s=Kr(t,r);if(o=function(e,t,n,r){var i=!1;return e&&t&&t.type&&n&&(e[Dr]?(e[Dr](t.type,n,r),i=!0):e[Or]&&(e[Or](Pr+t.type,n),i=!0)),i}(e,s,n,i),o&&Vr.accept(e)){var a={guid:Hr++,evtName:s,handler:n,capture:i};Qr(e,s.type).push(a)}}catch{}return o}function ei(e,t,n,r,i){if(void 0===i&&(i=!1),e)try{var o=Kr(t,r),s=!1;(function(e,t,n){if(t.type)Yr(e,Qr(e,t.type),t,n);else{var r=Vr.get(e,Nr,{});Se(r,(function(r,i){Yr(e,i,t,n)})),0===Fe(r).length&&Vr.kill(e,Nr)}})(e,o,(function(e){return!((!o.ns||n)&&e.handler!==n||(s=!0,0))})),s||Xr(e,o,n,i)}catch{}}function ti(e,t,n,r){return void 0===r&&(r=!1),Zr(e,t,n,null,r)}function ni(e,t,n,r){void 0===r&&(r=!1),ei(e,t,n,null,r)}function ri(e,t,n){var r=!1,i=Zt();i&&(r=Zr(i,e,t,n),r=Zr(i.body,e,t,n)||r);var o=tn();return o&&(r=Zr(o,e,t,n)||r),r}function ii(e,t,n){var r=Zt();r&&(ei(r,e,t,n),ei(r.body,e,t,n));var i=tn();i&&ei(i,e,t,n)}function oi(e,t,n,r){var i=!1;return t&&e&&e.length>0&&De(e,(function(e){e&&(!n||-1===Ae(n,e))&&(i=ri(e,t,r)||i)})),i}function si(e,t,n,r){var i=!1;return t&&e&&Ee(e)&&!(i=oi(e,t,n,r))&&n&&n.length>0&&(i=oi(e,t,null,r)),i}function ai(e,t,n){e&&Ee(e)&&De(e,(function(e){e&&ii(e,t,n)}))}var ci,li=null,ui=r;function di(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(mi,(function(e){var t=0|Wn(15);return("x"===e?t:3&t|8).toString(16)}))}function pi(){var e=cn();return e&&e.now?e.now():He()}function hi(){for(var e,t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],n=v,r=0;r<4;r++)n+=t[15&(e=Kn())]+t[e>>4&15]+t[e>>8&15]+t[e>>12&15]+t[e>>16&15]+t[e>>20&15]+t[e>>24&15]+t[e>>28&15];var i=t[8+(3&Kn())|0];return n.substr(0,8)+n.substr(9,4)+"4"+n.substr(13,3)+i+n.substr(16,3)+n.substr(19,12)}var fi={_canUseCookies:void 0,isTypeof:pe,isUndefined:he,isNullOrUndefined:fe,hasOwnProperty:ge,isFunction:be,isObject:ye,isDate:Te,isArray:Ee,isError:_e,isString:xe,isNumber:Re,isBoolean:Ie,toISOString:Oe,arrForEach:De,arrIndexOf:Ae,arrMap:ke,arrReduce:Ne,strTrim:Le,objCreate:m,objKeys:Fe,objDefineAccessors:qe,addEventHandler:ri,dateNow:He,isIE:hn,disableCookies:bi,newGuid:di,perfNow:pi,newId:Yn,randomValue:Wn,random32:Kn,mwcRandomSeed:Qn,mwcRandom32:Xn,generateW3CId:hi},mi=/[xy]/g,gi={Attach:ti,AttachEvent:ti,Detach:ni,DetachEvent:ni};function yi(e,t){var n=vr(e,t),r=fi._canUseCookies;return null===li&&(li=[],ci=r,qe(fi,"_canUseCookies",(function(){return ci}),(function(e){ci=e,De(li,(function(t){t.setEnabled(e)}))}))),-1===Ae(li,n)&&li.push(n),Ie(r)&&n.setEnabled(r),Ie(ci)&&n.setEnabled(ci),n}function bi(){yi().setEnabled(!1)}var vi=/^([\da-f]{2})-([\da-f]{32})-([\da-f]{16})-([\da-f]{2})(-[^\s]*)?$/,Si="00",wi="ff",Ci="00000000000000000000000000000000",Ti="0000000000000000";function Ei(e,t,n){return!(!e||e.length!==t||e===n||!e.match(/^[\da-f]*$/))}function _i(e,t,n){return Ei(e,t)?e:n}function xi(e){(isNaN(e)||e<0||e>255)&&(e=1);for(var t=e.toString(16);t.length<2;)t="0"+t;return t}function Ri(e){if(!e||(Ee(e)&&(e=e[0]||""),!e||!xe(e)||e.length>8192))return null;var t=vi.exec(Le(e));return t&&t[1]!==wi&&t[2]!==Ci&&t[3]!==Ti?{version:t[1],traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}:null}function Ii(e){return Ei(e,32,Ci)}function Pi(e){return Ei(e,16,Ti)}function Oi(e){return!!(e&&Ei(e.version,2,wi)&&Ei(e.traceId,32,Ci)&&Ei(e.spanId,16,Ti)&&Ei(xi(e.traceFlags),2))}var Di=ir("plugin");function Ai(e){return Di.get(e,"state",{},!0)}function ki(e,t){for(var n,r=[],i=null,o=e.getNext();o;){var s=o.getPlugin();s&&(i&&be(i[C])&&be(s[S])&&i[C](s),(be(s[T])?s[T]():(n=Ai(s))[T])||r.push(s),i=s,o=o.getNext())}De(r,(function(r){var i=e.core();r.initialize(e.getCfg(),i,t,e.getNext()),n=Ai(r),!r[_]&&!n[_]&&(n[_]=i),n[T]=!0,delete n[E]}))}function Ni(e){return e.sort((function(e,t){var n=0;if(t){var r=be(t[S]);be(e[S])?n=r?e[w]-t[w]:1:r&&(n=-1)}else n=e?1:-1;return n}))}var Li="TelemetryPluginChain",ji="_hasRun",Mi="_getTelCtx",Fi=0;function qi(e,t,n,r){var i=null,o=[];null!==r&&(i=r?function(e,t,n){for(;e;){if(e.getPlugin()===n)return e;e=e.getNext()}return Gi([n],t.config||{},t)}(e,n,r):e);var s={_next:function(){var e=i;if(i=e?e.getNext():null,!e){var t=o;t&&t.length>0&&(De(t,(function(e){try{e.func.call(e.self,e.args)}catch(e){Dn(n.logger,2,73,"Unexpected Exception during onComplete - "+fn(e))}})),o=[])}return e},ctx:{core:function(){return n},diagLog:function(){return In(n,t)},getCfg:function(){return t},getExtCfg:a,getConfig:function(e,n,r){void 0===r&&(r=!1);var i,o=a(e,null);return o&&!fe(o[n])?i=o[n]:t&&!fe(t[n])&&(i=t[n]),fe(i)?r:i},hasNext:function(){return!!i},getNext:function(){return i},setNext:function(e){i=e},iterate:function(e){for(var t;t=s._next();){var n=t.getPlugin();n&&e(n)}},onComplete:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];e&&o.push({func:e,self:he(t)?s.ctx:t,args:n})}}};function a(e,n,r){var i;if(void 0===n&&(n={}),void 0===r&&(r=0),t){var o=t.extensionConfig;o&&e&&(i=o[e])}if(i){if(ye(n)&&0!==r){var s=et(!0,n,i);t&&2===r&&Se(n,(function(e){if(fe(s[e])){var n=t[e];fe(n)||(s[e]=n)}})),i=s}}else i=n;return i}return s}function Bi(e,t,n,r){var i=qi(e,t,n,r),o=i.ctx;return o.processNext=function(e){var t=i._next();return t&&t.processTelemetry(e,o),!t},o.createNew=function(e,r){return void 0===e&&(e=null),Ee(e)&&(e=Gi(e,t,n,r)),Bi(e||o.getNext(),t,n,r)},o}function Ui(e,t,n){var r=t.config||{},i=qi(e,r,t,n),o=i.ctx;return o.processNext=function(e){var t=i._next();return t&&t.unload(o,e),!t},o.createNew=function(e,n){return void 0===e&&(e=null),Ee(e)&&(e=Gi(e,r,t,n)),Ui(e||o.getNext(),t,n)},o}function zi(e,t,n){var r=t.config||{},i=qi(e,r,t,n).ctx;return i.processNext=function(e){return i.iterate((function(t){be(t.update)&&t.update(i,e)}))},i.createNew=function(e,n){return void 0===e&&(e=null),Ee(e)&&(e=Gi(e,r,t,n)),zi(e||i.getNext(),t,n)},i}function Gi(e,t,n,r){var i=null,o=!r;if(Ee(e)&&e.length>0){var s=null;De(e,(function(e){if(!o&&r===e&&(o=!0),o&&e&&be(e.processTelemetry)){var a=function(e,t,n){var r,i=null,o=be(e.processTelemetry),s=be(e.setNextPlugin),a={getPlugin:function(){return e},getNext:function(){return i},processTelemetry:function(r,l){c(l=l||function(){var r;return e&&be(e[Mi])&&(r=e[Mi]()),r||(r=Bi(a,t,n)),r}(),(function(t){if(!e||!o)return!1;var n=Ai(e);return!n.teardown&&!n[R]&&(s&&e.setNextPlugin(i),e.processTelemetry(r,t),!0)}),"processTelemetry",(function(){return{item:r}}),!r.sync)||l.processNext(r)},unload:function(t,n){c(t,(function(){var r=!1;if(e){var i=Ai(e),o=e[_]||i.core;e&&(!o||o===t[_]())&&!i[E]&&(i[_]=null,i[E]=!0,i[T]=!1,e[E]&&!0===e[E](t,n)&&(r=!0))}return r}),"unload",(function(){}),n.isAsync)||t.processNext(n)},update:function(t,n){c(t,(function(){var r=!1;if(e){var i=Ai(e),o=e[_]||i.core;e&&(!o||o===t[_]())&&!i[E]&&e[x]&&!0===e[x](t,n)&&(r=!0)}return r}),"update",(function(){}),!1)||t.processNext(n)},_id:r=e?e.identifier+"-"+e.priority+"-"+Fi++:"Unknown-0-"+Fi++,_setNext:function(e){i=e}};function c(t,n,o,s,a){var c=!1,l=e?e.identifier:Li,u=t[ji];return u||(u=t[ji]={}),t.setNext(i),e&&Fn(t[_](),(function(){return l+":"+o}),(function(){u[r]=!0;try{var e=i?i._id:v;e&&(u[e]=!1),c=n(t)}catch(e){var s=!i||u[i._id];s&&(c=!0),(!i||!s)&&Dn(t.diagLog(),1,73,"Plugin ["+l+"] failed during "+o+" - "+fn(e)+", run flags: "+fn(u))}}),s,a),c}return ze(a)}(e,t,n);i||(i=a),s&&s._setNext(a),s=a}}))}return r&&!i?Gi([r],t,n):i}var Hi="extensionConfig",Vi=500;function $i(e,t,n,r){t&&Ee(t)&&t.length>0&&(De(t=t.sort((function(e,t){return e.priority-t.priority})),(function(e){e.priority<Vi&&Xe("Channel has invalid priority - "+e.identifier)})),e.push({queue:ze(t),chain:Gi(t,n,r)}))}function Wi(){var e=[];return{add:function(t){t&&e.push(t)},run:function(t,n){De(e,(function(e){try{e(t,n)}catch(e){Dn(t.diagLog(),2,73,"Unexpected error calling unload handler - "+fn(e))}})),e=[]}}}var Ki="getPlugin",Qi=function e(){var t,n,r,i,o,s=this;function a(e){void 0===e&&(e=null);var t=e;if(!t){var i=n||Bi(null,{},s.core);t=r&&r[Ki]?i.createNew(null,r[Ki]):i.createNew(null,r)}return t}function c(e,t,i){e&&$e(e,Hi,[],null,fe),!i&&t&&(i=t.getProcessTelContext().getNext());var o=r;r&&r[Ki]&&(o=r[Ki]()),s.core=t,n=Bi(i,e,t,o)}function l(){t=!1,s.core=null,n=null,r=null,o=[],i=Wi()}l(),At(e,s,(function(e){e.initialize=function(e,n,r,i){c(e,n,i),t=!0},e.teardown=function(t,n){var s=e.core;if(s&&(!t||s===t.core())){var a,c=!1,u=t||Ui(null,s,r&&r[Ki]?r[Ki]():r),d=n||{reason:0,isAsync:!1};return e[I]&&!0===e[I](u,d,p)?a=!0:p(),a}function p(){c||(c=!0,i.run(u,n),De(o,(function(e){e.rm()})),o=[],!0===a&&u.processNext(d),l())}},e.update=function(t,n){var i=e.core;if(i&&(!t||i===t.core())){var o,s=!1,a=t||zi(null,i,r&&r[Ki]?r[Ki]():r),l=n||{reason:0};return e._doUpdate&&!0===e._doUpdate(a,l,u)?o=!0:u(),o}function u(){s||(s=!0,c(a.getCfg(),a.core(),a.getNext()))}},e._addHook=function(e){e&&(Ee(e)?o=o.concat(e):o.push(e))},Je(e,"_addUnloadCb",(function(){return i}),"add")})),s.diagLog=function(e){return a(e).diagLog()},s[T]=function(){return t},s.setInitialized=function(e){t=e},s[C]=function(e){r=e},s.processNext=function(e,t){t?t.processNext(e):r&&be(r.processTelemetry)&&r.processTelemetry(e,null)},s._getTelCtx=a},Xi=function(e){function t(){var n,r,i=e.call(this)||this;function o(){n=0,r=[]}return i.identifier="TelemetryInitializerPlugin",i.priority=199,o(),At(t,i,(function(e,t){e.addTelemetryInitializer=function(e){var t={id:n++,fn:e};return r.push(t),{remove:function(){De(r,(function(e,n){if(e.id===t.id)return r.splice(n,1),-1}))}}},e.processTelemetry=function(t,n){for(var i=!1,o=r.length,s=0;s<o;++s){var a=r[s];if(a)try{if(!1===a.fn.apply(null,[t])){i=!0;break}}catch(e){Dn(n.diagLog(),1,64,"One of telemetry initializers failed, telemetry item will not be sent: "+Ve(e),{exception:fn(e)},!0)}}i||e.processNext(t,n)},e[I]=function(){o()}})),i}return y(t,e),t}(Qi),Yi="Plugins must provide initialize method",Ji="_notificationManager",Zi="SDK is still unloading...",eo={loggingLevelConsole:1};function to(e,t){return new jn(t)}function no(e,t){var n=!1;return De(t,(function(t){if(t===e)return n=!0,-1})),n}var ro=function e(){var t,n,r,i,o,s,a,c,l,u,d,p,h,f,g,y,v,S,w,C=0;At(e,this,(function(e){function T(){t=!1,e.config=et(!0,{},eo),e.logger=new Pn(e.config),e._extensions=[],f=new Xi,n=[],r=null,i=null,o=null,s=null,a=null,l=null,c=[],u=null,d=null,p=null,h=!1,g=null,y=rr("AIBaseCore",!0),v=Wi(),w=null}function _(){return Bi(A(),e.config,e)}function x(t,n){var r=function(e,t,n){var r=[],i={};return De(n,(function(t){(fe(t)||fe(t.initialize))&&Xe(Yi);var n=t.priority,o=t.identifier;t&&n&&(fe(i[n])?i[n]=o:An(e,"Two extensions have same priority #"+n+" - "+i[n]+", "+o)),(!n||n<500)&&r.push(t)})),{all:n,core:r}}(e.logger,0,c);l=r.core,a=null;var i=r.all;if(p=ze(function(e,t,n,r){var i=[];if(e&&De(e,(function(e){return $i(i,e,n,r)})),t){var o=[];De(t,(function(e){e.priority>Vi&&o.push(e)})),$i(i,o,n,r)}return i}(d,i,t,e)),u){var o=Ae(i,u);-1!==o&&i.splice(o,1),-1!==(o=Ae(l,u))&&l.splice(o,1),u._setQueue(p)}else u=function(e,t){var n;function r(){return Bi(null,t.config,t,null)}function i(e,t,n,r){var i=e?e.length+1:1;function o(){0==--i&&(r&&r(),r=null)}i>0&&De(e,(function(e){if(e&&e.queue.length>0){var r=e.chain,s=t.createNew(r);s.onComplete(o),n(s)}else i--})),o()}var o=!1;return(n={identifier:"ChannelControllerPlugin",priority:Vi,initialize:function(t,n,r,i){o=!0,De(e,(function(e){e&&e.queue.length>0&&ki(Bi(e.chain,t,n),r)}))},isInitialized:function(){return o},processTelemetry:function(t,n){i(e,n||r(),(function(e){e[P](t)}),(function(){n[P](t)}))},update:function(t,n){var r=n||{reason:0};return i(e,t,(function(e){e[P](r)}),(function(){t[P](r)})),!0}})[D]=function(){i(e,r(),(function(e){e.iterate((function(e){e[D]&&e[D]()}))}),null)},n[O]=function(){i(e,r(),(function(e){e.iterate((function(e){e[O]&&e[O]()}))}),null)},n[E]=function(t,n){var r=n||{reason:0,isAsync:!1};return i(e,t,(function(e){e[P](r)}),(function(){t[P](r),o=!1})),!0},n.getChannel=function(t){var n=null;return e&&e.length>0&&De(e,(function(e){if(e&&e.queue.length>0&&(De(e.queue,(function(e){if(e.identifier===t)return n=e,-1})),n))return-1})),n},n.flush=function(t,n,o,s){var a=1,c=!1,l=null;function u(){a--,c&&0===a&&(l&&(clearTimeout(l),l=null),n&&n(c),n=null)}return s=s||5e3,i(e,r(),(function(e){e.iterate((function(e){if(e.flush){a++;var n=!1;e.flush(t,(function(){n=!0,u()}),o)||n||(t&&null==l?l=setTimeout((function(){l=null,u()}),s):u())}}))}),(function(){c=!0,u()})),!0},n._setQueue=function(t){e=t},n}(p,e);i.push(u),l.push(u),e._extensions=Ni(i),u.initialize(t,e,i),ki(_(),i),e._extensions=ze(Ni(l||[])).slice(),n&&function(t){var n=zi(A(),e);(!e._updateHook||!0!==e._updateHook(n,t))&&n.processNext(t)}(n)}function I(t){var n=null,r=null;return De(e._extensions,(function(e){if(e.identifier===t&&e!==u&&e!==f)return r=e,-1})),!r&&u&&(r=u.getChannel(t)),r&&(n={plugin:r,setEnabled:function(e){Ai(r)[R]=!e},isEnabled:function(){var e=Ai(r);return!e[E]&&!e[R]},remove:function(t,n){void 0===t&&(t=!0);var i=[r];F(i,{reason:1,isAsync:t},(function(t){t&&x(e.config,{reason:32,removed:i}),n&&n(t)}))}}),n}function A(){if(!a){var t=(l||[]).slice();-1===Ae(t,f)&&t.push(f),a=Gi(Ni(t),e.config,e)}return a}function F(t,n,r){if(t&&t.length>0){var i=Ui(Gi(t,e.config,e),e);i.onComplete((function(){var e=!1,n=[];De(c,(function(r,i){no(r,t)?e=!0:n.push(r)})),c=n;var i=[];d&&(De(d,(function(n,r){var o=[];De(n,(function(n){no(n,t)?e=!0:o.push(n)})),i.push(o)})),d=i),r&&r(e)})),i.processNext(n)}else r(!1)}function q(){var t=e.logger?e.logger.queue:[];t&&(De(t,(function(t){var n={name:g||"InternalMessageId: "+t.messageId,iKey:e.config.instrumentationKey,time:Oe(new Date),baseType:Rn.dataType,baseData:{message:t.message}};e.track(n)})),t.length=0)}function B(e,t,n,r){return u?u.flush(e,t,n||6,r):(t&&t(!1),!0)}function U(t){var n=e.logger;n?Dn(n,2,73,t):Xe(t)}T(),e.isInitialized=function(){return t},e.initialize=function(n,i,s,a){h&&Xe(Zi),e.isInitialized()&&Xe("Core should not be initialized more than once"),(!n||fe(n.instrumentationKey))&&Xe("Please provide instrumentation key"),r=a,e[Ji]=a,e.config=n||{},function(e){!0===e.disableDbgExt&&S&&(r[N](S),S=null),r&&!S&&!0!==e.disableDbgExt&&(S=En(e),r[k](S))}(n),function(t){!t.enablePerfMgr&&o&&(o=null),t.enablePerfMgr&&$e(e.config,"createPerfMgr",to)}(n),n.extensions=fe(n.extensions)?[]:n.extensions,function(e){We(e,Hi).NotificationManager=r}(n),s&&(e.logger=s),(c=[]).push.apply(c,b(b([],i),n.extensions)),d=(n||{}).channels,x(n,null),(!p||0===p.length)&&Xe("No channels available"),t=!0,e.releaseQueue()},e.getTransmissionControls=function(){var e=[];return p&&De(p,(function(t){e.push(t.queue)})),ze(e)},e.track=function(t){$e(t,"iKey",e.config.instrumentationKey,null,Ke),$e(t,"time",Oe(new Date),null,Ke),$e(t,"ver","4.0",null,fe),!h&&e.isInitialized()?_().processNext(t):n.push(t)},e.getProcessTelContext=_,e.getNotifyMgr=function(){return r||(r=function(){var e;return m(((e={})[k]=function(e){},e[N]=function(e){},e[L]=function(e){},e[j]=function(e,t){},e[M]=function(e,t){},e))}(),e[Ji]=r),r},e[k]=function(e){r&&r[k](e)},e[N]=function(e){r&&r[N](e)},e.getCookieMgr=function(){return s||(s=wr(e.config,e.logger)),s},e.setCookieMgr=function(e){s=e},e.getPerfMgr=function(){return!i&&!o&&e.config&&e.config.enablePerfMgr&&be(e.config.createPerfMgr)&&(o=e.config.createPerfMgr(e,e.getNotifyMgr())),i||o||qn()},e.setPerfMgr=function(e){i=e},e.eventCnt=function(){return n.length},e.releaseQueue=function(){if(t&&n.length>0){var e=n;n=[],De(e,(function(e){_().processNext(e)}))}},e.pollInternalLogs=function(t){g=t||null;var n=e.config.diagnosticLogInterval;return(!n||!(n>0))&&(n=1e4),C&&clearInterval(C),C=setInterval((function(){q()}),n)},e.stopPollingInternalLogs=function(){C&&(clearInterval(C),C=0,q())},Ze(e,(function(){return f}),["addTelemetryInitializer"]),e.unload=function(n,r,i){void 0===n&&(n=!0),t||Xe("SDK is not initialized"),h&&Xe(Zi);var o={reason:50,isAsync:n,flushComplete:!1},s=Ui(A(),e);function a(t){o.flushComplete=t,h=!0,v.run(s,o),e.stopPollingInternalLogs(),s.processNext(o)}s.onComplete((function(){T(),r&&r(o)}),e),B(n,a,6,i)||a(!1)},e.getPlugin=I,e.addPlugin=function(t,n,r,i){if(!t)return i&&i(!1),void U(Yi);var o=I(t.identifier);if(o&&!n)return i&&i(!1),void U("Plugin ["+t.identifier+"] is already loaded!");var s={reason:16};function a(n){c.push(t),s.added=[t],x(e.config,s),i&&i(!0)}if(o){var l=[o.plugin];F(l,{reason:2,isAsync:!!r},(function(e){e?(s.removed=l,s.reason|=32,a()):i&&i(!1)}))}else a()},e.evtNamespace=function(){return y},e.flush=B,e.getTraceCtx=function(e){return w||(w=function(){var e={};return{getName:function(){return e.name},setName:function(t){e.name=t},getTraceId:function(){return e.traceId},setTraceId:function(t){Ii(t)&&(e.traceId=t)},getSpanId:function(){return e.spanId},setSpanId:function(t){Pi(t)&&(e.spanId=t)},getTraceFlags:function(){return e.traceFlags},setTraceFlags:function(t){e.traceFlags=t}}}()),w},e.setTraceCtx=function(e){w=e||null},Je(e,"addUnloadCb",(function(){return v}),"add")}))};function io(e,t,n,r){De(e,(function(e){if(e&&e[t])if(n)setTimeout((function(){return r(e)}),0);else try{r(e)}catch{}}))}var oo=function e(t){this.listeners=[];var n=!!(t||{}).perfEvtsSendAll;At(e,this,(function(e){e[k]=function(t){e.listeners.push(t)},e[N]=function(t){for(var n=Ae(e.listeners,t);n>-1;)e.listeners.splice(n,1),n=Ae(e.listeners,t)},e[L]=function(t){io(e.listeners,L,!0,(function(e){e[L](t)}))},e[j]=function(t,n){io(e.listeners,j,!0,(function(e){e[j](t,n)}))},e[M]=function(t,n){io(e.listeners,M,n,(function(e){e[M](t,n)}))},e[F]=function(t){t&&(n||!t.isChildEvt())&&io(e.listeners,F,!1,(function(e){t.isAsync?setTimeout((function(){return e[F](t)}),0):e[F](t)}))}}))},so=function(e){function t(){var n=e.call(this)||this;return At(t,n,(function(e,t){function n(t){var n=e.getNotifyMgr();n&&n.eventsDiscarded([t],2)}e.initialize=function(e,n,r,i){t.initialize(e,n,r||new Pn(e),i||new oo(e))},e.track=function(r){Fn(e.getPerfMgr(),(function(){return"AppInsightsCore:track"}),(function(){null===r&&(n(r),Xe("Invalid telemetry item")),function(e){fe(e.name)&&(n(e),Xe("telemetry name required"))}(r),t.track(r)}),(function(){return{item:r}}),!r.sync)}})),n}return y(t,e),t}(ro),ao=tt({CRITICAL:1,WARNING:2}),co=tt({BrowserDoesNotSupportLocalStorage:0,BrowserCannotReadLocalStorage:1,BrowserCannotReadSessionStorage:2,BrowserCannotWriteLocalStorage:3,BrowserCannotWriteSessionStorage:4,BrowserFailedRemovalFromLocalStorage:5,BrowserFailedRemovalFromSessionStorage:6,CannotSendEmptyTelemetry:7,ClientPerformanceMathError:8,ErrorParsingAISessionCookie:9,ErrorPVCalc:10,ExceptionWhileLoggingError:11,FailedAddingTelemetryToBuffer:12,FailedMonitorAjaxAbort:13,FailedMonitorAjaxDur:14,FailedMonitorAjaxOpen:15,FailedMonitorAjaxRSC:16,FailedMonitorAjaxSend:17,FailedMonitorAjaxGetCorrelationHeader:18,FailedToAddHandlerForOnBeforeUnload:19,FailedToSendQueuedTelemetry:20,FailedToReportDataLoss:21,FlushFailed:22,MessageLimitPerPVExceeded:23,MissingRequiredFieldSpecification:24,NavigationTimingNotSupported:25,OnError:26,SessionRenewalDateIsZero:27,SenderNotInitialized:28,StartTrackEventFailed:29,StopTrackEventFailed:30,StartTrackFailed:31,StopTrackFailed:32,TelemetrySampledAndNotSent:33,TrackEventFailed:34,TrackExceptionFailed:35,TrackMetricFailed:36,TrackPVFailed:37,TrackPVFailedCalc:38,TrackTraceFailed:39,TransmissionFailed:40,FailedToSetStorageBuffer:41,FailedToRestoreStorageBuffer:42,InvalidBackendResponse:43,FailedToFixDepricatedValues:44,InvalidDurationValue:45,TelemetryEnvelopeInvalid:46,CreateEnvelopeError:47,CannotSerializeObject:48,CannotSerializeObjectNonSerializable:49,CircularReferenceDetected:50,ClearAuthContextFailed:51,ExceptionTruncated:52,IllegalCharsInName:53,ItemNotInArray:54,MaxAjaxPerPVExceeded:55,MessageTruncated:56,NameTooLong:57,SampleRateOutOfRange:58,SetAuthContextFailed:59,SetAuthContextFailedAccountName:60,StringValueTooLong:61,StartCalledMoreThanOnce:62,StopCalledWithoutStart:63,TelemetryInitializerFailed:64,TrackArgumentsNotSpecified:65,UrlTooLong:66,SessionStorageBufferFull:67,CannotAccessCookie:68,IdTooLong:69,InvalidEvent:70,FailedMonitorAjaxSetRequestHeader:71,SendBrowserInfoOnUserInit:72,PluginException:73,NotificationException:74,SnippetScriptLoadFailure:99,InvalidInstrumentationKey:100,CannotParseAiBlobValue:101,InvalidContentBlob:102,TrackPageActionEventFailed:103,FailedAddingCustomDefinedRequestContext:104,InMemoryStorageBufferFull:105,InstrumentationKeyDeprecation:106}),lo="_aiHooks",uo=["req","rsp","hkErr","fnErr"];function po(e,t){if(e)for(var n=0;n<e.length&&!t(e[n],n);n++);}function ho(e,t,n,r,i){i>=0&&i<=2&&po(e,(function(e,o){var s=e.cbks,a=s[uo[i]];if(a){t.ctx=function(){return r[o]=r[o]||{}};try{a.apply(t.inst,n)}catch(e){var c=t.err;try{var l=s[uo[2]];l&&(t.err=e,l.apply(t.inst,n))}catch{}finally{t.err=c}}}}))}function fo(e,t,n){var r=null;return e&&(ge(e,t)?r=e:n&&(r=fo(de(e),t,!1))),r}function mo(e,t,n,r){var i=n&&n[lo];if(!i){var o=function(e){return function(){var t=arguments,n=e.h,r={name:e.n,inst:this,ctx:null,set:function(e,n){(t=s([],t))[e]=n,o=s([r],t)}},i=[],o=s([r],t);function s(e,t){return po(t,(function(t){e.push(t)})),e}r.evt=Yt("event"),ho(n,r,o,i,0);var a=e.f;if(a)try{r.rslt=a.apply(this,t)}catch(e){throw r.err=e,ho(n,r,o,i,3),e}return ho(n,r,o,i,1),r.rslt}}(i={i:0,n:t,f:n,h:[]});o[lo]=i,e[t]=o}var s={id:i.i,cbks:r,rm:function(){var e=this.id;po(i.h,(function(t,n){if(t.id===e)return i.h.splice(n,1),1}))}};return i.i++,i.h.push(s),s}function go(e,n,r,i){if(void 0===i&&(i=!0),e&&n&&r){var o=fo(e,n,i);if(o){var s=o[n];if(typeof s===t)return mo(o,n,s,r)}}return null}function yo(e,t,n,r){void 0===r&&(r=!0);var i=null;return po(t,(function(t){var o=go(e,t,n,r);o&&(i||(i=[]),i.push(o))})),i}e.AppInsightsCore=so,e.BaseCore=ro,e.BaseTelemetryPlugin=Qi,e.CoreUtils=fi,e.DiagnosticLogger=Pn,e.EventHelper=gi,e.EventsDiscardedReason=nt,e.InstrumentEvent=function(e,t,n,r){if(e&&t&&n){var i=fo(e,t,r)||e;if(i)return mo(i,t,i[t],n)}return null},e.InstrumentFunc=go,e.InstrumentFuncs=yo,e.InstrumentProto=function(e,t,n){return e?go(e[i],t,n,!1):null},e.InstrumentProtos=function(e,t,n){return e?yo(e[i],t,n,!1):null},e.LoggingSeverity=ao,e.MinChannelPriorty=100,e.NotificationManager=oo,e.PerfEvent=Ln,e.PerfManager=jn,e.ProcessTelemetryContext=function(e,t,n,r){var i=Bi(e,t,n,r);Ze(this,i,Fe(i))},e.Undefined=ui,e._InternalLogMessage=Rn,e._InternalMessageId=co,e.__getRegisteredEvents=function(e,t,n){var r=[],i=Vr.get(e,Nr,{},!1),o=Kr(t,n);return Se(i,(function(e,t){De(t,(function(e){(!o.type||o.type===e.evtName.type)&&(!o.ns||o.ns==o.ns)&&r.push({name:e.evtName.type+(e.evtName.ns?"."+e.evtName.ns:""),handler:e.handler})}))})),r},e._legacyCookieMgr=yi,e._logInternalMessage=function(e,t,n){On(e).logInternalMessage(t,n)},e._throwInternal=Dn,e._warnToConsole=An,e.addEventHandler=ri,e.addEventListeners=si,e.addPageHideEventListener=function e(t,n,r){var i=Jr(Br,r),o=oi([jr],t,n,i);return(!n||-1===Ae(n,Lr))&&(o=oi([Lr],(function(e){var n=tn();t&&n&&"hidden"===n.visibilityState&&t(e)}),n,i)||o),!o&&n&&(o=e(t,null,r)),o},e.addPageShowEventListener=function e(t,n,r){var i=Jr(Ur,r),o=oi([Mr],t,n,i);return!(o=oi([Lr],(function(e){var n=tn();t&&n&&"visible"===n.visibilityState&&t(e)}),n,i)||o)&&n&&(o=e(t,null,r)),o},e.addPageUnloadEventListener=function(e,t,n){return si([qr,Fr,jr],e,t,n)},e.areCookiesSupported=Cr,e.arrForEach=De,e.arrIndexOf=Ae,e.arrMap=ke,e.arrReduce=Ne,e.attachEvent=ti,e.canUseCookies=function(e){return yi(null,e).isEnabled()},e.createClassFromInterface=function(e){return function(){var t=this;e&&Se(e,(function(e,n){t[e]=n}))}},e.createCookieMgr=wr,e.createEnumMap=function(e){var t={};return Se(e,(function(e,n){t[e]=e,t[n]=e})),Ue(t)},e.createEnumStyle=tt,e.createProcessTelemetryContext=Bi,e.createTraceParent=function(e,t,n,r){return{version:Ei(r,2,wi)?r:Si,traceId:Ii(e)?e:hi(),spanId:Pi(t)?t:hi().substr(0,16),traceFlags:n>=0&&n<=255?n:1}},e.createUniqueNamespace=rr,e.createUnloadHandlerContainer=Wi,e.createValueMap=function(e){var t={};return Se(e,(function(e,n){t[e]=n[1],t[n[0]]=n[1]})),Ue(t)},e.dateNow=He,e.deepFreeze=Ue,e.deleteCookie=function(e,t){return yi(null,e).del(t)},e.detachEvent=ni,e.disableCookies=bi,e.doPerf=Fn,e.dumpObj=fn,e.eventOff=ei,e.eventOn=Zr,e.findMetaTag=yn,e.findNamedServerTiming=bn,e.findW3cTraceParent=function(){var e="traceparent",t=Ri(yn(e));return t||(t=Ri(bn(e))),t},e.formatTraceParent=function(e){if(e){var t=xi(e.traceFlags);Ei(t,2)||(t="01");var n=e.version||Si;return"00"!==n&&"ff"!==n&&(n=Si),"".concat(n,"-").concat(_i(e.traceId,32,Ci),"-").concat(_i(e.spanId,16,Ti),"-").concat(t)}return""},e.generateW3CId=hi,e.getConsole=an,e.getCookie=function(e,t){return yi(null,e).get(t)},e.getCrypto=dn,e.getDebugExt=Tn,e.getDebugListener=En,e.getDocument=tn,e.getExceptionName=Ve,e.getGblPerfMgr=qn,e.getGlobal=h,e.getGlobalInst=Yt,e.getHistory=function(){return on()?history:Yt("history")},e.getIEVersion=function(e){if(void 0===e&&(e=null),!e){var t=rn()||{};e=t?(t.userAgent||v).toLowerCase():v}var n=(e||v).toLowerCase();if(Ce(n,zt)){var r=tn()||{};return Math.max(parseInt(n.split(zt)[1]),r.documentMode||0)}if(Ce(n,Gt)){var i=parseInt(n.split(Gt)[1]);if(i)return i+4}return null},e.getJSON=un,e.getLocation=sn,e.getMsCrypto=pn,e.getNavigator=rn,e.getPerformance=cn,e.getSetValue=We,e.getWindow=Zt,e.hasDocument=en,e.hasHistory=on,e.hasJSON=ln,e.hasNavigator=nn,e.hasOwnProperty=ge,e.hasWindow=Jt,e.initializePlugins=ki,e.isArray=Ee,e.isBeaconsSupported=function(){return null===Qt&&(Qt=nn()&&Boolean(rn().sendBeacon)),Qt},e.isBoolean=Ie,e.isDate=Te,e.isError=_e,e.isFetchSupported=function(e){var t=!1;try{t=!!Yt("fetch");var n=Yt("Request");t&&e&&n&&(t=Xt(n,"keepalive"))}catch{}return t},e.isFunction=be,e.isIE=hn,e.isNotNullOrUndefined=me,e.isNotTruthy=Ke,e.isNotUndefined=function(e){return!he(e)},e.isNullOrUndefined=fe,e.isNumber=Re,e.isObject=ye,e.isReactNative=function(){var e=rn();return!(!e||!e.product)&&"ReactNative"===e.product},e.isSafari=function(e){if(!e||!xe(e)){var t=rn()||{};e=t?(t.userAgent||v).toLowerCase():v}return(e||v).toLowerCase().indexOf("safari")>=0},e.isSampledFlag=function(e){return!(!Oi(e)||1&~e.traceFlags)},e.isString=xe,e.isSymbol=function(e){return"symbol"==typeof e},e.isTruthy=Qe,e.isTypeof=pe,e.isUndefined=he,e.isValidSpanId=Pi,e.isValidTraceId=Ii,e.isValidTraceParent=Oi,e.isXhrSupported=mn,e.mergeEvtNamespace=Jr,e.mwcRandom32=Xn,e.mwcRandomSeed=Qn,e.newGuid=di,e.newId=Yn,e.normalizeJsName=ve,e.objCreate=m,e.objDefineAccessors=qe,e.objExtend=et,e.objForEachKey=Se,e.objFreeze=ze,e.objKeys=Fe,e.objSeal=Ge,e.objToString=function(e){return ie.call(e)},e.optimizeObject=function(e){return e&&c&&(e=s(c({},e))),e},e.parseTraceParent=Ri,e.perfNow=pi,e.proxyAssign=function(e,t,n){if(e&&t&&ye(e)&&ye(t)){var r=function(r){if(xe(r)){var i=t[r];be(i)?(!n||n(r,!0,t,e))&&(e[r]=Ye(t,r)):(!n||n(r,!1,t,e))&&(ge(e,r)&&delete e[r],qe(e,r,(function(){return t[r]}),(function(e){t[r]=e}))||(e[r]=i))}};for(var i in t)r(i)}return e},e.proxyFunctionAs=Je,e.proxyFunctions=Ze,e.random32=Kn,e.randomValue=Wn,e.removeEventHandler=ii,e.removeEventListeners=ai,e.removePageHideEventListener=function(e,t){var n=Jr(Br,t);ai([jr],e,n),ai([Lr],null,n)},e.removePageShowEventListener=function(e,t){var n=Jr(Ur,t);ai([Mr],e,n),ai([Lr],null,n)},e.removePageUnloadEventListener=function(e,t){ai([qr,Fr,jr],e,t)},e.safeGetCookieMgr=function(e,t){var n;if(e)n=e.getCookieMgr();else if(t){var r=t.cookieCfg;n=r[pr]?r[pr]:wr(t)}return n||(n=vr(t,(e||{}).logger)),n},e.safeGetLogger=In,e.setCookie=function(e,t,n,r){yi(null,e).set(t,n,null,r)},e.setEnableEnvMocks=function(e){Wt=e},e.setGblPerfMgr=function(e){Nn=e},e.setValue=$e,e.sortPlugins=Ni,e.strContains=Ce,e.strEndsWith=we,e.strFunction=t,e.strObject=n,e.strPrototype=i,e.strStartsWith=function(e,t){var n=!1;return e&&t&&!(n=e===t)&&(n=te?e[U](t):function(e,t){var n=!1,r=t?t.length:0;if(e&&r&&e.length>=r&&!(n=e===t)){for(var i=0;i<r;i++)if(e[i]!==t[i])return!1;n=!0}return n}(e,t)),n},e.strTrim=Le,e.strUndefined=r,e.throwError=Xe,e.toISOString=Oe,e.uaDisallowsSameSiteNone=Ir,e.unloadComponents=function(e,t,n,r){var i=0;return function r(){for(;i<e.length;){var o=e[i++];if(o){var s=o._doUnload||o[I];if(be(s)&&!0===s.call(o,t,n,r))return!0}}}()},e.useXDomainRequest=function(){return null===Kt&&(Kt=typeof XDomainRequest!==r)&&mn()&&(Kt=Kt&&!Xt(Yt(Ht),"withCredentials")),Kt},function(e,t,n){var r=Object.defineProperty;if(r)try{return r(e,t,n)}catch{}n&&void 0!==typeof n.value&&(e[t]=n.value)}(e,"__esModule",{value:!0})},"object"==typeof n&&typeof s<"u"?a(n):(i=[t],void 0===(o="function"==typeof(r=a)?r.apply(t,i):r)||(e.exports=o))})),_=S(((i,s)=>{var a;a=function(){"use strict";var e="constructor",t="prototype",n="function",r="_dynInstFuncs",i="_isDynProxy",o="_dynClass",s="_dynInstChk",a=s,c="_dfOpts",l="_unknown_",u="__proto__",d="_dyn"+u,p="_dynInstProto",h="useBaseInst",f="setInstFuncs",m=Object,g=m.getPrototypeOf,y=m.getOwnPropertyNames,b=0;function v(e,n){return e&&m[t].hasOwnProperty.call(e,n)}function S(e){return e&&(e===m[t]||e===Array[t])}function w(e){return S(e)||e===Function[t]}function C(n){var r;if(n){if(g)return g(n);var i=n[u]||n[t]||(n[e]?n[e][t]:null);r=n[d]||i,v(n,d)||(delete n[p],r=n[d]=n[p]||n[d],n[p]=i)}return r}function T(e,t){var n=[];if(y)n=y(e);else for(var r in e)"string"==typeof r&&v(e,r)&&n.push(r);if(n&&n.length>0)for(var i=0;i<n.length;i++)t(n[i])}function E(t,r,i){return r!==e&&typeof t[r]===n&&(i||v(t,r))}function _(e){throw new TypeError("DynamicProto: "+e)}function x(e,t){for(var n=e.length-1;n>=0;n--)if(e[n]===t)return!0;return!1}function R(e,t,c,l,u){if(!S(e)){var d=c[r]=c[r]||{},p=d[t]=d[t]||{};!1!==d[a]&&(d[a]=!!u),T(c,(function(t){E(c,t,!1)&&c[t]!==l[t]&&(p[t]=c[t],delete c[t],(!v(e,t)||e[t]&&!e[t][i])&&(e[t]=function(e,t){var c=function(){var i=function(e,t,i,c){var l=null;if(e&&v(i,o)){var u=e[r]||{};if((l=(u[i[o]]||{})[t])||_("Missing ["+t+"] "+n),!l[s]&&!1!==u[a]){for(var d=!v(e,t),p=C(e),h=[];d&&p&&!w(p)&&!x(h,p);){var f=p[t];if(f){d=f===c;break}h.push(p),p=C(p)}try{d&&(e[t]=l),l[s]=1}catch{u[a]=!1}}}return l}(this,t,e,c)||function(e,t,r){var i=t[e];return i===r&&(i=C(t)[e]),typeof i!==n&&_("["+e+"] is not a "+n),i}(t,e,c);return i.apply(this,arguments)};return c[i]=1,c}(e,t)))}))}}function I(n,r){return v(n,t)?n.name||r||l:((n||{})[e]||{}).name||r||l}function P(e,n,s,l){v(e,t)||_("theClass is an invalid class definition.");var u=e[t];(function(e,t){if(g){for(var n=[],r=C(t);r&&!w(r)&&!x(n,r);){if(r===e)return!0;n.push(r),r=C(r)}return!1}return!0})(u,n)||_("["+I(e)+"] is not in class hierarchy of ["+I(n)+"]");var d=null;v(u,o)?d=u[o]:(d="_dynCls$"+I(e,"_")+"$"+b,b++,u[o]=d);var p=P[c],m=!!p[h];m&&l&&void 0!==l[h]&&(m=!!l[h]);var y=function(e){var t={};return T(e,(function(n){!t[n]&&E(e,n,!1)&&(t[n]=e[n])})),t}(n),S=function(e,t,n,s){function c(e,t,n){var c=t[n];if(c[i]&&s){var l=e[r]||{};!1!==l[a]&&(c=(l[t[o]]||{})[n]||c)}return function(){return c.apply(e,arguments)}}var l={};T(n,(function(e){l[e]=c(t,n,e)}));for(var u=C(e),d=[];u&&!w(u)&&!x(d,u);)T(u,(function(e){!l[e]&&E(u,e,!g)&&(l[e]=c(t,u,e))})),d.push(u),u=C(u);return l}(u,n,y,m);s(n,S);var O=!!g&&!!p[f];O&&l&&(O=!!l[f]),R(u,d,n,y,!1!==O)}return P[c]={setInstFuncs:!0,useBaseInst:!0},P},"object"==typeof i&&typeof s<"u"?s.exports=a():void 0===(o="function"==typeof(r=a)?r.call(t,n,t,e):r)||(e.exports=o)})),x=S(((s,a)=>{var c;c=function(e,t,n,r){"use strict";var i,o,s=(o=r)&&"object"==typeof o&&"default"in o?o.default:o,a=n.createEnumStyle({NotSet:0,Pii_DistinguishedName:1,Pii_GenericData:2,Pii_IPV4Address:3,Pii_IPv6Address:4,Pii_MailSubject:5,Pii_PhoneNumber:6,Pii_QueryString:7,Pii_SipAddress:8,Pii_SmtpAddress:9,Pii_Identity:10,Pii_Uri:11,Pii_Fqdn:12,Pii_IPV4AddressLegacy:13,CustomerContent_GenericContent:32}),c=n.createEnumStyle({Normal:1,CostDeferred:2,RealTime:3,Immediate:4}),l=n.createEnumStyle({Unspecified:0,String:1,Int32:2,UInt32:3,Int64:4,UInt64:5,Double:6,Bool:7,Guid:8,DateTime:9}),u=n.createEnumStyle({Normal:1,Critical:2}),d=n.createEnumStyle({NONE:0,ERROR:1,WARNING:2,INFORMATION:3}),p=n.objFreeze(t.__assignFn(t.__assignFn({},n._InternalMessageId),n.createEnumStyle({AuthHandShakeError:501,AuthRedirectFail:502,BrowserCannotReadLocalStorage:503,BrowserCannotWriteLocalStorage:504,BrowserDoesNotSupportLocalStorage:505,CannotParseBiBlobValue:506,CannotParseDataAttribute:507,CVPluginNotAvailable:508,DroppedEvent:509,ErrorParsingAISessionCookie:510,ErrorProvidedChannels:511,FailedToGetCookies:512,FailedToInitializeCorrelationVector:513,FailedToInitializeSDK:514,InvalidContentBlob:515,InvalidCorrelationValue:516,SessionRenewalDateIsZero:517,SendPostOnCompleteFailure:518,PostResponseHandler:519,SDKNotInitialized:520}))),h="3.2.3",f="1DS-Web-JS-"+h,m="withCredentials",g=((i={})[0]=0,i[2]=6,i[1]=1,i[3]=7,i[4098]=6,i[4097]=1,i[4099]=7,i),y=null,b=Boolean(n.getDocument()),v=Boolean(n.getWindow());function S(e){return!(""===e||n.isNullOrUndefined(e))}function w(e){if(e){var t=e.indexOf("-");if(t>-1)return e.substring(0,t)}return""}function C(){return null===y&&(y=!n.isUndefined(Uint8Array)&&!function(){var e=n.getNavigator();if(!n.isUndefined(e)&&e.userAgent){var t=e.userAgent.toLowerCase();if((t.indexOf("safari")>=0||t.indexOf("firefox")>=0)&&t.indexOf("chrome")<0)return!0}return!1}()&&!n.isReactNative()),y}function T(e){return!!(e&&n.isNumber(e)&&e>=1&&e<=4)}function E(e,t,r){if(!t&&!S(t)||"string"!=typeof e)return null;var i=typeof t;if("string"===i||"number"===i||"boolean"===i||n.isArray(t))t={value:t};else if("object"!==i||t.hasOwnProperty("value")){if(n.isNullOrUndefined(t.value)||""===t.value||!n.isString(t.value)&&!n.isNumber(t.value)&&!n.isBoolean(t.value)&&!n.isArray(t.value))return null}else t={value:r?JSON.stringify(t):t};if(n.isArray(t.value)&&!L(t.value))return null;if(!n.isNullOrUndefined(t.kind)){if(n.isArray(t.value)||!N(t.kind))return null;t.value=t.value.toString()}return t}function _(e,t,r){var i=-1;if(!n.isUndefined(e))if(t>0&&(32===t?i=8192:t<=13&&(i=t<<5)),function(e){return e>=0&&e<=9}(r))-1===i&&(i=0),i|=r;else{var o=g[M(e)]||-1;-1!==i&&-1!==o?i|=o:6===o&&(i=o)}return i}function x(){n.safeGetCookieMgr(null).setEnabled(!1)}function R(e,t,r){n.areCookiesSupported(null)&&n.safeGetCookieMgr(null).set(e,t,86400*r,null,"/")}function I(e){n.areCookiesSupported(null)&&n.safeGetCookieMgr(null).del(e)}function P(e){return n.areCookiesSupported(null)?O(n.safeGetCookieMgr(null),e):""}function O(e,t,n){var r;return void 0===n&&(n=!0),e&&(r=e.get(t),n&&r&&decodeURIComponent&&(r=decodeURIComponent(r))),r||""}function D(e){void 0===e&&(e="D");var t=n.newGuid();return"B"===e?t="{"+t+"}":"P"===e?t="("+t+")":"N"===e&&(t=t.replace(/-/g,"")),t}function A(e,t,r,i,o){var s={},a=!1,c=0,l=arguments.length,u=arguments;for("[object Boolean]"===Object[n.strPrototype].toString.call(u[0])&&(a=u[0],c++);c<l;c++)e=u[c],n.objForEachKey(e,(function(e,t){a&&t&&n.isObject(t)?n.isArray(t)?(s[e]=s[e]||[],n.arrForEach(t,(function(t,r){t&&n.isObject(t)?s[e][r]=A(!0,s[e][r],t):s[e][r]=t}))):s[e]=A(!0,s[e],t):s[e]=t}));return s}var k=n.perfNow;function N(e){return 0===e||e>0&&e<=13||32===e}function L(e){return e.length>0}function j(e,t){var n=e;n.timings=n.timings||{},n.timings.processTelemetryStart=n.timings.processTelemetryStart||{},n.timings.processTelemetryStart[t]=k()}function M(e){var r=0;if(null!=e){var i=typeof e;"string"===i?r=1:"number"===i?r=2:"boolean"===i?r=3:i===t.strShimObject&&(r=4,n.isArray(e)?(r=4096,e.length>0&&(r|=M(e[0]))):n.hasOwnProperty(e,"value")&&(r=8192|M(e.value)))}return r}var F={Version:h,FullVersionString:f,strUndefined:n.strUndefined,strObject:n.strObject,Undefined:n.strUndefined,arrForEach:n.arrForEach,arrIndexOf:n.arrIndexOf,arrMap:n.arrMap,arrReduce:n.arrReduce,objKeys:n.objKeys,toISOString:n.toISOString,isReactNative:n.isReactNative,isString:n.isString,isNumber:n.isNumber,isBoolean:n.isBoolean,isFunction:n.isFunction,isArray:n.isArray,isObject:n.isObject,strTrim:n.strTrim,isDocumentObjectAvailable:b,isWindowObjectAvailable:v,isValueAssigned:S,getTenantId:w,isBeaconsSupported:n.isBeaconsSupported,isUint8ArrayAvailable:C,isLatency:T,sanitizeProperty:E,getISOString:n.toISOString,useXDomainRequest:n.useXDomainRequest,getCommonSchemaMetaData:_,cookieAvailable:n.areCookiesSupported,disallowsSameSiteNone:n.uaDisallowsSameSiteNone,setCookie:R,deleteCookie:I,getCookie:P,createGuid:D,extend:A,getTime:k,isValueKind:N,isArrayValid:L,objDefineAccessors:n.objDefineAccessors,addPageUnloadEventListener:n.addPageUnloadEventListener,setProcessTelemetryTimings:j,addEventHandler:n.addEventHandler,getFieldValueType:M,strEndsWith:n.strEndsWith,objForEachKey:n.objForEachKey},q={_canUseCookies:void 0,isTypeof:n.isTypeof,isUndefined:n.isUndefined,isNullOrUndefined:n.isNullOrUndefined,hasOwnProperty:n.hasOwnProperty,isFunction:n.isFunction,isObject:n.isObject,isDate:n.isDate,isArray:n.isArray,isError:n.isError,isString:n.isString,isNumber:n.isNumber,isBoolean:n.isBoolean,toISOString:n.toISOString,arrForEach:n.arrForEach,arrIndexOf:n.arrIndexOf,arrMap:n.arrMap,arrReduce:n.arrReduce,strTrim:n.strTrim,objCreate:t.objCreateFn,objKeys:n.objKeys,objDefineAccessors:n.objDefineAccessors,addEventHandler:n.addEventHandler,dateNow:n.dateNow,isIE:n.isIE,disableCookies:x,newGuid:n.newGuid,perfNow:n.perfNow,newId:n.newId,randomValue:n.randomValue,random32:n.random32,mwcRandomSeed:n.mwcRandomSeed,mwcRandom32:n.mwcRandom32,generateW3CId:n.generateW3CId},B="version",U="properties",z=function(e){function r(){var t=e.call(this)||this;return t.pluginVersionStringArr=[],t.pluginVersionString="",s(r,t,(function(e,t){(!e.logger||!e.logger.queue)&&(e.logger=new n.DiagnosticLogger({loggingLevelConsole:1})),e.initialize=function(r,i,o,s){n.doPerf(e,(function(){return"AppInsightsCore.initialize"}),(function(){if(r){r.endpointUrl||(r.endpointUrl="https://browser.events.data.microsoft.com/OneCollector/1.0/");var a=r.propertyStorageOverride;if(a&&(!a.getProperty||!a.setProperty))throw new Error("Invalid property storage override passed.");r.channels&&n.arrForEach(r.channels,(function(t){t&&n.arrForEach(t,(function(t){if(t.identifier&&t.version){var n=t.identifier+"="+t.version;e.pluginVersionStringArr.push(n)}}))}))}e.getWParam=function(){return typeof document<"u"?0:-1},i&&n.arrForEach(i,(function(t){if(t&&t.identifier&&t.version){var n=t.identifier+"="+t.version;e.pluginVersionStringArr.push(n)}})),e.pluginVersionString=e.pluginVersionStringArr.join(";");try{t.initialize(r,i,o,s),e.pollInternalLogs("InternalLog")}catch(t){var c=e.logger,l=n.dumpObj(t);-1!==l.indexOf("channels")&&(l+="\n - Channels must be provided through config.channels only!"),c.throwInternal(1,514,"SDK Initialization Failed - no telemetry will be sent: "+l)}}),(function(){return{config:r,extensions:i,logger:o,notificationManager:s}}))},e.track=function(r){n.doPerf(e,(function(){return"AppInsightsCore.track"}),(function(){var n=r;if(n){n.timings=n.timings||{},n.timings.trackStart=k(),T(n.latency)||(n.latency=1);var i=n.ext=n.ext||{};i.sdk=i.sdk||{},i.sdk.ver=f;var o=n.baseData=n.baseData||{};o[U]||(o[U]={});var s=o[U];s[B]||(s[B]=""),""!==e.pluginVersionString&&(s[B]=e.pluginVersionString)}t.track(n)}),(function(){return{item:r}}),!r.sync)}})),t}return t.__extendsFn(r,e),r}(n.AppInsightsCore),G=function(e){function r(){var t=e.call(this)||this;return s(r,t,(function(e,t){e.initialize=function(r,i,o,s){r&&!r.endpointUrl&&(r.endpointUrl="https://browser.events.data.microsoft.com/OneCollector/1.0/"),e.getWParam=function(){return b?0:-1};try{t.initialize(r,i,o,s)}catch(t){n._throwInternal(e.logger,1,514,"Initialization Failed: "+n.dumpObj(t)+"\n - Note: Channels must be provided through config.channels only")}},e.track=function(e){var n=e;if(n){var r=n.ext=n.ext||{};r.sdk=r.sdk||{},r.sdk.ver=f}t.track(n)}})),t}return t.__extendsFn(r,e),r}(n.BaseCore),H=n.isFunction;function V(e,t,n){return function(r){e[t]=r,n()}}var $=function(){function e(t){var n=0,r=null,i=[];function o(){if(i.length>0){var e=i.slice();i=[],setTimeout((function(){for(var t=0,n=e.length;t<n;++t)try{e[t]()}catch{}}),0)}}function a(e){0===n&&(r=e,n=1,o())}function c(e){0===n&&(r=e,n=2,o())}s(e,this,(function(t){t.then=function(t,s){return new e((function(a,c){!function(t,s,a,c){i.push((function(){var i;try{(i=1===n?H(t)?t(r):r:H(s)?s(r):r)instanceof e?i.then(a,c):2!==n||H(s)?a(i):c(i)}catch(e){return void c(e)}})),0!==n&&o()}(t,s,a,c)}))},t.catch=function(e){return t.then(null,e)}})),function(){if(!H(t))throw new TypeError("ESPromise: resolvedFunc argument is not a Function");try{t(a,c)}catch(e){c(e)}}()}return e.resolve=function(t){return t instanceof e?t:t&&H(t.then)?new e((function(e,n){try{t.then(e,n)}catch(e){n(e)}})):new e((function(e){e(t)}))},e.reject=function(t){return new e((function(e,n){n(t)}))},e.all=function(t){if(t&&t.length)return new e((function(e,n){try{for(var r=[],i=0,o=0;o<t.length;o++){var s=t[o];s&&H(s.then)?(i++,s.then(V(r,o,(function(){0==--i&&e(r)})),n)):r[o]=s}0===i&&setTimeout((function(){e(r)}),0)}catch(e){n(e)}}))},e.race=function(t){return new e((function(e,n){if(t&&t.length)try{for(var r=function(r){var i=t[r];i&&H(i.then)?i.then(e,n):setTimeout((function(){e(i)}),0)},i=0;i<t.length;i++)r(i)}catch(e){n(e)}}))},e}(),W=0,K=[],Q=[],X=[];function Y(){return(new Date).getTime()}var J=function(){function e(t,r){var i=0,o=(t||"<unnamed>")+"."+W;function a(e){var t=n.getGlobal();t&&t.QUnit&&console&&console.log("ESPromiseScheduler["+o+"] "+e)}function c(e){r&&r.warnToConsole("ESPromiseScheduler["+o+"] "+e)}W++,s(e,this,(function(e){var t=null,n=0;function r(e,t){for(var n=0;n<e.length;n++)if(e[n].id===t)return e.splice(n,1)[0];return null}e.scheduleEvent=function(e,s,l){var u=o+"."+n;n++,s&&(u+="-("+s+")");var d=u+"{"+i+"}";i++;var p,h,f,m={evt:null,tm:Y(),id:d,isRunning:!1,isAborted:!1};return m.evt=t?(p=m,h=t,f=new $((function(e,t){var n=Y()-h.tm,i=h.id;a("["+u+"] is waiting for ["+i+":"+n+" ms] to complete before starting -- ["+Q.length+"] waiting and ["+K.length+"] running"),p.abort=function(e){p.abort=null,r(Q,u),p.isAborted=!0,t(new Error(e))},h.evt.then((function(n){r(Q,u),w(p).then(e,t)}),(function(n){r(Q,u),w(p).then(e,t)}))})),Q.push(p),f):w(m),(t=m).evt._schId=d,m.evt;function g(e){for(var t=Y(),n=t-6e5,r=e.length,i=0;i<r;){var o=e[i];if(o&&o.tm<n){var s=null;o.abort?(s="Aborting ["+o.id+"] due to Excessive runtime ("+(t-o.tm)+" ms)",o.abort(s)):s="Removing ["+o.id+"] due to Excessive runtime ("+(t-o.tm)+" ms)",c(s),e.splice(i,1),r--}else i++}}function y(e,n){var i=!1,o=r(K,e);if(o||(o=r(X,e),i=!0),o){o.to&&(clearTimeout(o.to),o.to=null);var s=Y()-o.tm;n?i?c("Timed out event ["+e+"] finally complete -- "+s+" ms"):a("Promise ["+e+"] Complete -- "+s+" ms"):(X.push(o),c("Event ["+e+"] Timed out and removed -- "+s+" ms"))}else a("Failed to remove ["+e+"] from running queue");t&&t.id===e&&(t=null),g(K),g(Q),g(X)}function b(e,t){return function(n){return y(e,!0),t&&t(n),n}}function v(e,t,n,r){t.then((function(t){return t instanceof $?(a("Event ["+e+"] returned a promise -- waiting"),v(e,t,n,r),t):b(e,n)(t)}),b(e,r))}function S(e,t){var n=e.id;return new $((function(r,i){a("Event ["+n+"] Starting -- waited for "+(e.wTm||"--")+" ms"),e.isRunning=!0,e.abort=function(t){e.abort=null,e.isAborted=!0,y(n,!1),i(new Error(t))};var o=t(n);o instanceof $?(l&&(e.to=setTimeout((function(){y(n,!1),i(new Error("Timed out after ["+l+"] ms"))}),l)),v(n,o,(function(t){a("Event ["+n+"] Resolving after "+(Y()-e.tm)+" ms"),r(t)}),i)):(a("Promise ["+n+"] Auto completed as the start action did not return a promise"),r())}))}function w(t){var n=Y();return t.wTm=n-t.tm,t.tm=n,t.isAborted?$.reject(new Error("["+u+"] was aborted")):(K.push(t),S(t,e))}}}))}return e.incomplete=function(){return K},e.waitingToStart=function(){return Q},e}(),Z=function(){function e(e){var t=this,r={},i=[],o=[];function s(e,t){var s,a=r[e];if(a&&(s=a[t]),!s&&null!==s){if(n.isString(e)&&n.isString(t))if(o.length>0){for(var c=0;c<o.length;c++)if(o[c].handleField(e,t)){s={canHandle:!0,fieldHandler:o[c]};break}}else 0===i.length&&(s={canHandle:!0});if(!s&&null!==s)for(s=null,c=0;c<i.length;c++)if(i[c].handleField(e,t)){s={canHandle:!0,handler:i[c],fieldHandler:null};break}a||(a=r[e]={}),a[t]=s}return s}function a(e,t,r,i,o,s){if(e.handler)return e.handler.property(t,r,o,s);if(!n.isNullOrUndefined(o.kind)){if(!(4096&~i&&N(o.kind)))return null;o.value=o.value.toString()}return l(e.fieldHandler,t,r,i,o)}function c(e,t,n){return S(n)?{value:n}:null}function l(e,r,i,o,s){if(s&&e){var a=e.getSanitizer(r,i,o,s.kind,s.propertyType);if(a)if(4===o){var u={},d=s.value;n.objForEachKey(d,(function(t,n){var o=r+"."+i;if(S(n)){var s=c(0,0,n);(s=l(e,o,t,M(n),s))&&(u[t]=s.value)}})),s.value=u}else{var p={path:r,name:i,type:o,prop:s,sanitizer:t};s=a.call(t,p)}}return s}e&&o.push(e),t.addSanitizer=function(e){e&&(i.push(e),r={})},t.addFieldSanitizer=function(e){e&&(o.push(e),r={})},t.handleField=function(e,t){var n=s(e,t);return!!n&&n.canHandle},t.value=function(e,t,r,i){var o=s(e,t);if(o&&o.canHandle){if(!o||!o.canHandle)return null;if(o.handler)return o.handler.value(e,t,r,i);if(!n.isString(t)||n.isNullOrUndefined(r)||""===r)return null;var l=null,u=M(r);if(8192&~u)1!==u&&2!==u&&3!==u&&4096&~u?4===u&&(l=c(0,0,i?JSON.stringify(r):r)):l=c(0,0,r);else{var d=-8193&u;if(!S((l=r).value)||1!==d&&2!==d&&3!==d&&4096&~d)return null}if(l)return a(o,e,t,u,l,i)}return null},t.property=function(e,t,r,i){var o=s(e,t);if(!o||!o.canHandle||!n.isString(t)||n.isNullOrUndefined(r)||!S(r.value))return null;var c=M(r.value);return 0===c?null:a(o,e,t,c,r,i)}}return e.getFieldType=M,e}();e.BaseTelemetryPlugin=n.BaseTelemetryPlugin,e.DiagnosticLogger=n.DiagnosticLogger,e.EventHelper=n.EventHelper,e.EventsDiscardedReason=n.EventsDiscardedReason,e.InternalAppInsightsCore=n.AppInsightsCore,e.InternalBaseCore=n.BaseCore,e.LoggingSeverity=n.LoggingSeverity,e.MinChannelPriorty=n.MinChannelPriorty,e.NotificationManager=n.NotificationManager,e.PerfEvent=n.PerfEvent,e.PerfManager=n.PerfManager,e.ProcessTelemetryContext=n.ProcessTelemetryContext,e.Undefined=n.strUndefined,e._InternalLogMessage=n._InternalLogMessage,e._InternalMessageId=n._InternalMessageId,e.__getRegisteredEvents=n.__getRegisteredEvents,e._throwInternal=n._throwInternal,e.addEventHandler=n.addEventHandler,e.addEventListeners=n.addEventListeners,e.addPageHideEventListener=n.addPageHideEventListener,e.addPageShowEventListener=n.addPageShowEventListener,e.addPageUnloadEventListener=n.addPageUnloadEventListener,e.areCookiesSupported=n.areCookiesSupported,e.arrForEach=n.arrForEach,e.arrIndexOf=n.arrIndexOf,e.arrMap=n.arrMap,e.arrReduce=n.arrReduce,e.attachEvent=n.attachEvent,e.cookieAvailable=n.areCookiesSupported,e.createCookieMgr=n.createCookieMgr,e.createEnumStyle=n.createEnumStyle,e.createProcessTelemetryContext=n.createProcessTelemetryContext,e.createTraceParent=n.createTraceParent,e.createUniqueNamespace=n.createUniqueNamespace,e.createUnloadHandlerContainer=n.createUnloadHandlerContainer,e.dateNow=n.dateNow,e.detachEvent=n.detachEvent,e.disallowsSameSiteNone=n.uaDisallowsSameSiteNone,e.doPerf=n.doPerf,e.dumpObj=n.dumpObj,e.eventOff=n.eventOff,e.eventOn=n.eventOn,e.findW3cTraceParent=n.findW3cTraceParent,e.formatTraceParent=n.formatTraceParent,e.generateW3CId=n.generateW3CId,e.getConsole=n.getConsole,e.getCrypto=n.getCrypto,e.getDocument=n.getDocument,e.getExceptionName=n.getExceptionName,e.getGlobal=n.getGlobal,e.getGlobalInst=n.getGlobalInst,e.getHistory=n.getHistory,e.getIEVersion=n.getIEVersion,e.getISOString=n.toISOString,e.getJSON=n.getJSON,e.getLocation=n.getLocation,e.getMsCrypto=n.getMsCrypto,e.getNavigator=n.getNavigator,e.getPerformance=n.getPerformance,e.getSetValue=n.getSetValue,e.getWindow=n.getWindow,e.hasDocument=n.hasDocument,e.hasHistory=n.hasHistory,e.hasJSON=n.hasJSON,e.hasNavigator=n.hasNavigator,e.hasOwnProperty=n.hasOwnProperty,e.hasWindow=n.hasWindow,e.isArray=n.isArray,e.isBeaconsSupported=n.isBeaconsSupported,e.isBoolean=n.isBoolean,e.isDate=n.isDate,e.isError=n.isError,e.isFetchSupported=n.isFetchSupported,e.isFunction=n.isFunction,e.isIE=n.isIE,e.isNotTruthy=n.isNotTruthy,e.isNullOrUndefined=n.isNullOrUndefined,e.isNumber=n.isNumber,e.isObject=n.isObject,e.isReactNative=n.isReactNative,e.isSampledFlag=n.isSampledFlag,e.isString=n.isString,e.isTruthy=n.isTruthy,e.isTypeof=n.isTypeof,e.isUndefined=n.isUndefined,e.isValidSpanId=n.isValidSpanId,e.isValidTraceId=n.isValidTraceId,e.isValidTraceParent=n.isValidTraceParent,e.isXhrSupported=n.isXhrSupported,e.mergeEvtNamespace=n.mergeEvtNamespace,e.newGuid=n.newGuid,e.newId=n.newId,e.normalizeJsName=n.normalizeJsName,e.objCreate=n.objCreate,e.objDefineAccessors=n.objDefineAccessors,e.objForEachKey=n.objForEachKey,e.objFreeze=n.objFreeze,e.objKeys=n.objKeys,e.objSeal=n.objSeal,e.optimizeObject=n.optimizeObject,e.parseTraceParent=n.parseTraceParent,e.perfNow=n.perfNow,e.proxyAssign=n.proxyAssign,e.proxyFunctionAs=n.proxyFunctionAs,e.proxyFunctions=n.proxyFunctions,e.random32=n.random32,e.randomValue=n.randomValue,e.removeEventHandler=n.removeEventHandler,e.removeEventListeners=n.removeEventListeners,e.removePageHideEventListener=n.removePageHideEventListener,e.removePageShowEventListener=n.removePageShowEventListener,e.removePageUnloadEventListener=n.removePageUnloadEventListener,e.safeGetCookieMgr=n.safeGetCookieMgr,e.safeGetLogger=n.safeGetLogger,e.setEnableEnvMocks=n.setEnableEnvMocks,e.setValue=n.setValue,e.strContains=n.strContains,e.strEndsWith=n.strEndsWith,e.strFunction=n.strFunction,e.strObject=n.strObject,e.strPrototype=n.strPrototype,e.strStartsWith=n.strStartsWith,e.strTrim=n.strTrim,e.strUndefined=n.strUndefined,e.throwError=n.throwError,e.toISOString=n.toISOString,e.useXDomainRequest=n.useXDomainRequest,e.AppInsightsCore=z,e.BaseCore=G,e.CoreUtils=q,e.ESPromise=$,e.ESPromiseScheduler=J,e.EventLatency=c,e.EventPersistence=u,e.EventPropertyType=l,e.FullVersionString=f,e.TraceLevel=d,e.Utils=F,e.ValueKind=a,e.ValueSanitizer=Z,e.Version=h,e._ExtendedInternalMessageId=p,e.createGuid=D,e.deleteCookie=I,e.disableCookies=x,e.extend=A,e.getCommonSchemaMetaData=_,e.getCookie=P,e.getCookieValue=O,e.getFieldValueType=M,e.getTenantId=w,e.getTime=k,e.isArrayValid=L,e.isChromium=function(){return!!n.getGlobalInst("chrome")},e.isDocumentObjectAvailable=b,e.isLatency=T,e.isUint8ArrayAvailable=C,e.isValueAssigned=S,e.isValueKind=N,e.isWindowObjectAvailable=v,e.openXhr=function(e,t,n,r,i,o){function s(e,t,n){try{e[t]=n}catch{}}void 0===r&&(r=!1),void 0===i&&(i=!1);var a=new XMLHttpRequest;return r&&s(a,"Microsoft_ApplicationInsights_BypassAjaxInstrumentation",r),n&&s(a,m,n),a.open(e,t,!i),n&&s(a,m,n),!i&&o&&s(a,"timeout",o),a},e.sanitizeProperty=E,e.setCookie=R,e.setProcessTelemetryTimings=j,function(e,t,n){var r=Object.defineProperty;if(r)try{return r(e,t,n)}catch{}n&&void 0!==typeof n.value&&(e[t]=n.value)}(e,"__esModule",{value:!0})},"object"==typeof s&&typeof a<"u"?c(s,T(),E(),_()):(i=[t,n(2284),n(3695),n(1356)],void 0===(o="function"==typeof(r=c)?r.apply(t,i):r)||(e.exports=o))})),R=S(((n,s)=>{var a;a=function(e){"use strict";var t="function",n="object",r="undefined",i="prototype",o="hasOwnProperty",s="default",a=Object,c=a[i],l=a.assign,u=a.create,d=a.defineProperty,p=c[o],h=null;function f(e){return void 0===e&&(e=!0),(!h||!e)&&(typeof globalThis!==r&&globalThis&&(h=globalThis),typeof self!==r&&self&&(h=self),typeof window!==r&&window&&(h=window),typeof global!==r&&global&&(h=global)),h}function m(e){throw new TypeError(e)}function g(e){if(u)return u(e);if(null==e)return{};var r=typeof e;function o(){}return r!==n&&r!==t&&m("Object prototype may only be an Object:"+e),o[i]=e,new o}var y=(f()||{}).Symbol,b=(f()||{}).Reflect,v=!!b,S="decorate",w="metadata",C="getOwnPropertySymbols",T="iterator",E=l||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])c[o].call(t,i)&&(e[i]=t[i]);return e},_=function(e,t){return(_=a.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t[o](n)&&(e[n]=t[n])})(e,t)};function x(e,n){function r(){this.constructor=e}typeof n!==t&&null!==n&&m("Class extends value "+String(n)+" is not a constructor or null"),_(e,n),e[i]=null===n?g(n):(r[i]=n[i],new r)}function R(e,t,n,r){void 0===r&&(r=n),u?d(e,r,{enumerable:!0,get:function(){return t[n]}}):e[r]=t[n]}e.ObjAssign=l,e.ObjClass=a,e.ObjCreate=u,e.ObjDefineProperty=d,e.ObjHasOwnProperty=p,e.ObjProto=c,e.__assignFn=E,e.__createBindingFn=R,e.__decorateFn=function(e,n,r,i){var o,s=arguments.length,c=s<3?n:null===i?i=a.getOwnPropertyDescriptor(n,r):i;if(v&&typeof b[S]===t)c=b[S](e,n,r,i);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(c=(s<3?o(c):s>3?o(n,r,c):o(n,r))||c);return s>3&&c&&d(n,r,c),c},e.__exportStarFn=function(e,t){for(var n in e)n!==s&&!p.call(t,n)&&R(t,e,n)},e.__exposeGlobalTsLib=function(){var e,t,n,r,i=f()||{};t=E,n=x,r=R,(e=i).__assign||(e.__assign=l||t),e.__extends||(e.__extends=n),e.__createBinding||(e.__createBinding=r),__assign||(__assign=i.__assign),__extends||(__extends=i.__extends),__createBinding||(__createBinding=i.__createBinding)},e.__extendsFn=x,e.__importDefaultFn=function(e){return e&&e.__esModule?e:{strDefault:e}},e.__importStarFn=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)n!==s&&Object.prototype.hasOwnProperty.call(e,n)&&R(t,e,n);return u?d(t,s,{enumerable:!0,value:e}):t[s]=e,t},e.__makeTemplateObjectFn=function(e,t){return d?d(e,"raw",{value:t}):e.raw=t,e},e.__metadataFn=function(e,n){if(v&&b[w]===t)return b[w](e,n)},e.__paramFn=function(e,t){return function(n,r){t(n,r,e)}},e.__readFn=function(e,n){var r=typeof y===t&&e[y[T]];if(!r)return e;var i,o,s=r.call(e),a=[];try{for(;(void 0===n||n-- >0)&&!(i=s.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(r=s.return)&&r.call(s)}finally{if(o)throw o.error}}return a},e.__restFn=function(e,n){var r={};for(var i in e)p.call(e,i)&&n.indexOf(i)<0&&(r[i]=e[i]);if(null!=e&&typeof a[C]===t)for(var o=0,s=a[C](e);o<s.length;o++)n.indexOf(s[o])<0&&c.propertyIsEnumerable.call(e,s[o])&&(r[s[o]]=e[s[o]]);return r},e.__spreadArrayFn=function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e},e.__spreadArraysFn=function(){for(var e=arguments,t=0,n=0,r=e.length;n<r;n++)t+=e[n].length;var i=Array(t),o=0;for(n=0;n<r;n++)for(var s=e[n],a=0,c=s.length;a<c;a++,o++)i[o]=s[a];return i},e.__valuesFn=function(e){var n=typeof y===t&&y[T],r=n&&e[n],i=0;return r?r.call(e):e&&"number"==typeof e.length?{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}}:void m(n?"Object is not iterable.":"Symbol.iterator is not defined.")},e.getGlobal=f,e.objCreateFn=g,e.strDefault=s,e.strShimFunction=t,e.strShimHasOwnProperty=o,e.strShimObject=n,e.strShimPrototype=i,e.strShimUndefined=r,e.throwTypeError=m,function(e,t,n){var r=Object.defineProperty;if(r)try{return r(e,t,n)}catch{}n&&void 0!==typeof n.value&&(e[t]=n.value)}(e,"__esModule",{value:!0})},"object"==typeof n&&typeof s<"u"?a(n):(i=[t],void 0===(o="function"==typeof(r=a)?r.apply(t,i):r)||(e.exports=o))})),I=S(((s,a)=>{var c;c=function(e,t,n,r){"use strict";var i,o=(i=n)&&"object"==typeof i&&"default"in i?i.default:i,s="REAL_TIME",a="NEAR_REAL_TIME",c="BEST_EFFORT",l="POST",u="drop",d="requeue",p="application/x-json-stream",h="cache-control",f="content-type",m="kill-duration",g="time-delta-millis",y="client-version",b="client-id",v="time-delta-to-apply-millis",S="upload-time",w="apikey",C="AuthMsaDeviceTicket",T="AuthXToken",E="msfpc";function _(e){var t=(e.ext||{}).intweb;return t&&r.isValueAssigned(t[E])?t[E]:null}function x(e){for(var t=null,n=0;null===t&&n<e.length;n++)t=_(e[n]);return t}var R=function(){function e(t,n){var i=n?[].concat(n):[],o=this,s=x(i);o.iKey=function(){return t},o.Msfpc=function(){return s||""},o.count=function(){return i.length},o.events=function(){return i},o.addEvent=function(e){return!!e&&(i.push(e),s||(s=_(e)),!0)},o.split=function(n,o){var a;if(n<i.length){var c=i.length-n;r.isNullOrUndefined(o)||(c=o<c?o:c),a=i.splice(n,c),s=x(i)}return new e(t,a)}}return e.create=function(t,n){return new e(t,n)},e}(),I=2e6,P=Math.min(I,65e3),O="metadata",D="f",A=/\./,k=function e(t,n,i,s){var a="data",c="baseData",l=!!s,u=!0,d=n,p={};o(e,this,(function(e){function n(e,t,o,s,a,c,u){r.objForEachKey(e,(function(e,h){var f=null;if(h||r.isValueAssigned(h)){var m=o,g=e,y=a,b=t;if(l&&!s&&A.test(e)){var v=e.split("."),S=v.length;if(S>1){y&&(y=y.slice());for(var w=0;w<S-1;w++){var C=v[w];b=b[C]=b[C]||{},m+="."+C,y&&y.push(C)}g=v[S-1]}}var T=s&&function(e){var t=p[e];return void 0===t&&(e.length>=7&&(t=r.strStartsWith(e,"ext.metadata")||r.strStartsWith(e,"ext.web")),p[e]=t),t}(m);if(f=!T&&d&&d.handleField(m,g)?d.value(m,g,h,i):r.sanitizeProperty(g,h,i)){var E=f.value;if(b[g]=E,c&&c(y,g,f),u&&"object"==typeof E&&!r.isArray(E)){var _=y;_&&(_=_.slice()).push(g),n(h,E,m+"."+g,s,_,c,u)}}}}))}e.createPayload=function(e,t,n,r,i,o){return{apiKeys:[],payloadBlob:"",overflow:null,sizeExceed:[],failedEvts:[],batches:[],numEvents:0,retryCnt:e,isTeardown:t,isSync:n,isBeacon:r,sendType:o,sendReason:i}},e.appendPayload=function(n,i,o){var s=n&&i&&!n.overflow;return s&&r.doPerf(t,(function(){return"Serializer:appendPayload"}),(function(){for(var t=i.events(),s=n.payloadBlob,a=n.numEvents,c=!1,l=[],u=[],d=n.isBeacon,p=d?65e3:3984588,h=d?P:I,f=0,m=0;f<t.length;){var g=t[f];if(g){if(a>=o){n.overflow=i.split(f);break}var y=e.getEventBlob(g);if(y&&y.length<=h){var b=y.length;if(s.length+b>p){n.overflow=i.split(f);break}s&&(s+="\n"),s+=y,++m>20&&(s.substr(0,1),m=0),c=!0,a++}else y?l.push(g):u.push(g),t.splice(f,1),f--}f++}if(l&&l.length>0&&n.sizeExceed.push(R.create(i.iKey(),l)),u&&u.length>0&&n.failedEvts.push(R.create(i.iKey(),u)),c){n.batches.push(i),n.payloadBlob=s,n.numEvents=a;var v=i.iKey();-1===r.arrIndexOf(n.apiKeys,v)&&n.apiKeys.push(v)}}),(function(){return{payload:n,theBatch:{iKey:i.iKey(),evts:i.events()},max:o}})),s},e.getEventBlob=function(e){try{return r.doPerf(t,(function(){return"Serializer.getEventBlob"}),(function(){var t={};t.name=e.name,t.time=e.time,t.ver=e.ver,t.iKey="o:"+r.getTenantId(e.iKey);var i={},o=e.ext;o&&(t.ext=i,r.objForEachKey(o,(function(e,t){n(t,i[e]={},"ext."+e,!0,null,null,!0)})));var s=t[a]={};s.baseType=e.baseType;var l=s[c]={};return n(e.baseData,l,c,!1,[c],(function(e,t,n){N(i,e,t,n)}),u),n(e.data,s,a,!1,[],(function(e,t,n){N(i,e,t,n)}),u),JSON.stringify(t)}),(function(){return{item:e}}))}catch{return null}}}))};function N(e,t,n,i){if(i&&e){var o=r.getCommonSchemaMetaData(i.value,i.kind,i.propertyType);if(o>-1){var s=e[O];s||(s=e[O]={f:{}});var a=s[D];if(a||(a=s[D]={}),t)for(var c=0;c<t.length;c++){var l=t[c];a[l]||(a[l]={f:{}});var u=a[l][D];u||(u=a[l][D]={}),a=u}a=a[n]={},r.isArray(i.value)?a.a={t:o}:a.t=o}}}function L(e){var t,n=Math.floor(1200*Math.random())+2400;return t=Math.pow(2,e)*n,Math.min(t,6e5)}var j,M=function e(){var t={};o(e,this,(function(e){e.setKillSwitchTenants=function(e,n){if(e&&n)try{var i=function(e){var t=[];return e&&r.arrForEach(e,(function(e){t.push(r.strTrim(e))})),t}(e.split(","));if("this-request-only"===n)return i;for(var o=1e3*parseInt(n,10),s=0;s<i.length;++s)t[i[s]]=r.dateNow()+o}catch{return[]}return[]},e.isTenantKilled=function(e){var n=t,i=r.strTrim(e);return void 0!==n[i]&&n[i]>r.dateNow()||(delete n[i],!1)}}))},F=function e(){var t=!0,n=!0,r=!0,i="use-collector-delta",s=!1;o(e,this,(function(e){e.allowRequestSending=function(){return t},e.firstRequestSent=function(){r&&(r=!1,s||(t=!1))},e.shouldAddClockSkewHeaders=function(){return n},e.getClockSkewHeaderValue=function(){return i},e.setClockSkew=function(e){s||(e?(i=e,n=!0,s=!0):n=!1,t=!0)}}))},q="sendAttempt",B="&NoResponseBody=true",U=((j={})[1]=d,j[100]=d,j[200]="sent",j[8004]=u,j[8003]=u,j),z={},G={};function H(e,t,n){z[e]=t,!1!==n&&(G[t]=e)}function V(e){try{return e.responseText}catch{}return""}function $(e,t){var n=!1;if(e&&t){var i=r.objKeys(e);if(i&&i.length>0)for(var o=t.toLowerCase(),s=0;s<i.length;s++){var a=i[s];if(a&&r.hasOwnProperty(t,a)&&a.toLowerCase()===o){n=!0;break}}}return n}function W(e,t,n,r){t&&n&&n.length>0&&(r&&z[t]?(e.hdrs[z[t]]=n,e.useHdrs=!0):e.url+="&"+t+"="+n)}H(C,C,!1),H(y,y),H(b,"Client-Id"),H(w,w),H(v,v),H(S,S),H(T,T);var K=function e(t,n,i,s,a){this._responseHandlers=[];var c,d,C,T,_,x,R="?cors=true&"+f.toLowerCase()+"="+p,I=new M,P=!1,O=new F,D=!1,A=0,N=!0,j=[],z={},H=[],K=null,Q=!1,X=!1,Y=!1;o(e,this,(function(e){var o=!0;function M(e,t){for(var n=0,i=null,o=0;null==i&&o<e.length;)1===(n=e[o])?r.useXDomainRequest()?i=F:r.isXhrSupported()&&(i=Z):2===n&&r.isFetchSupported(t)?i=J:D&&3===n&&r.isBeaconsSupported()&&(i=te),o++;return i?{_transport:n,_isSync:t,sendPOST:i}:null}function F(e,t,n){var r=new XDomainRequest;r.open(l,e.urlString),e.timeout&&(r.timeout=e.timeout),r.onload=function(){var e=V(r);ee(t,200,{},e),pe(e)},r.onerror=function(){ee(t,400,{})},r.ontimeout=function(){ee(t,500,{})},r.onprogress=function(){},n?r.send(e.data):a.set((function(){r.send(e.data)}),0)}function J(e,t,n){var i,s=e.urlString,c=!1,u=!1,d=((i={body:e.data,method:l}).Microsoft_ApplicationInsights_BypassAjaxInstrumentation=!0,i);n&&(d.keepalive=!0,2===e._sendReason&&(c=!0,s+=B)),o&&(d.credentials="include"),e.headers&&r.objKeys(e.headers).length>0&&(d.headers=e.headers),fetch(s,d).then((function(e){var n={},r="";e.headers&&e.headers.forEach((function(e,t){n[t]=e})),e.body&&e.text().then((function(e){r=e})),u||(u=!0,ee(t,e.status,n,r),pe(r))})).catch((function(e){u||(u=!0,ee(t,0,{}))})),c&&!u&&(u=!0,ee(t,200,{})),!u&&e.timeout>0&&a.set((function(){u||(u=!0,ee(t,500,{}))}),e.timeout)}function Z(e,t,n){var i=e.urlString;function s(e,t,n){if(!e[n]&&t&&t.getResponseHeader){var i=t.getResponseHeader(n);i&&(e[n]=r.strTrim(i))}return e}function a(e,n){ee(t,e.status,function(e){var t={};return e.getAllResponseHeaders?t=function(e){var t={};if(r.isString(e)){var n=r.strTrim(e).split(/[\r\n]+/);r.arrForEach(n,(function(e){if(e){var n=e.indexOf(": ");if(-1!==n){var i=r.strTrim(e.substring(0,n)).toLowerCase(),o=r.strTrim(e.substring(n+1));t[i]=o}else t[r.strTrim(e)]=1}}))}return t}(e.getAllResponseHeaders()):(t=s(t,e,g),t=s(t,e,m),t=s(t,e,"kill-duration-seconds")),t}(e),n)}n&&e.disableXhrSync&&(n=!1);var c=r.openXhr(l,i,o,!0,n,e.timeout);r.objForEachKey(e.headers,(function(e,t){c.setRequestHeader(e,t)})),c.onload=function(){var e=V(c);a(c,e),pe(e)},c.onerror=function(){a(c)},c.ontimeout=function(){a(c)},c.send(e.data)}function ee(e,t,n,i){try{e(t,n,i)}catch(e){r._throwInternal(c.diagLog(),2,518,r.dumpObj(e))}}function te(e,t,n){var i=200,o=e._thePayload,s=e.urlString+B;try{var a=r.getNavigator();if(!a.sendBeacon(s,e.data))if(o){var l=[];r.arrForEach(o.batches,(function(e){if(l&&e&&e.count()>0){for(var t=e.events(),n=0;n<t.length;n++)if(!a.sendBeacon(s,K.getEventBlob(t[n]))){l.push(e.split(n));break}}else l.push(e.split(0))})),he(l,8003,o.sendType,!0)}else i=0}catch(e){c.diagLog().warnToConsole("Failed to send telemetry using sendBeacon API. Ex:"+r.dumpObj(e)),i=0}finally{ee(t,i,{},"")}}function ne(e){return 2===e||3===e}function re(e){return X&&ne(e)&&(e=2),e}function ie(){return!P&&A<n}function oe(){var e=H;return H=[],e}function se(e,t,n){var r=!1;return e&&e.length>0&&!P&&d[t]&&K&&(r=0!==t||ie()&&(n>0||O.allowRequestSending())),r}function ae(e){var t={};return e&&r.arrForEach(e,(function(e,n){t[n]={iKey:e.iKey(),evts:e.events()}})),t}function ce(e,n,i,o,s){if(e&&0!==e.length){if(P)return void he(e,1,o);o=re(o);try{var a=e,l=0!==o;r.doPerf(C,(function(){return"HttpManager:_sendBatches"}),(function(a){a&&(e=e.slice(0));for(var c=[],u=null,p=r.getTime(),h=d[o]||(l?d[1]:d[0]),f=(X||ne(o)||h&&3===h._transport)&&!N&&D&&r.isBeaconsSupported();se(e,o,n);){var m=e.shift();m&&m.count()>0&&(I.isTenantKilled(m.iKey())?c.push(m):(u=u||K.createPayload(n,i,l,f,s,o),K.appendPayload(u,m,t)?null!==u.overflow&&(e=[u.overflow].concat(e),u.overflow=null,ue(u,p,r.getTime(),s),p=r.getTime(),u=null):(ue(u,p,r.getTime(),s),p=r.getTime(),e=[m].concat(e),u=null)))}u&&ue(u,p,r.getTime(),s),e.length>0&&(H=e.concat(H)),he(c,8004,o)}),(function(){return{batches:ae(a),retryCount:n,isTeardown:i,isSynchronous:l,sendReason:s,useSendBeacon:ne(o),sendType:o}}),!l)}catch(e){r._throwInternal(c.diagLog(),2,48,"Unexpected Exception sending batch: "+r.dumpObj(e))}}}function le(e,t,n){e[t]=e[t]||{},e[t][c.identifier]=n}function ue(t,n,o,s){if(t&&t.payloadBlob&&t.payloadBlob.length>0){var a=!!e.sendHook,l=d[t.sendType];!ne(t.sendType)&&t.isBeacon&&2===t.sendReason&&(l=d[2]||d[3]||l);var u=Y;(t.isBeacon||3===l._transport)&&(u=!1);var T=function(e,t){var n={url:R,hdrs:{},useHdrs:!1};t?(n.hdrs=r.extend(n.hdrs,z),n.useHdrs=r.objKeys(n.hdrs).length>0):r.objForEachKey(z,(function(e,t){G[e]?W(n,G[e],t,!1):(n.hdrs[e]=t,n.useHdrs=!0)})),W(n,b,"NO_AUTH",t),W(n,y,r.FullVersionString,t);var i="";r.arrForEach(e.apiKeys,(function(e){i.length>0&&(i+=","),i+=e})),W(n,w,i,t),W(n,S,r.dateNow().toString(),t);var o=function(e){for(var t=0;t<e.batches.length;t++){var n=e.batches[t].Msfpc();if(n)return encodeURIComponent(n)}return""}(e);if(r.isValueAssigned(o)&&(n.url+="&ext.intweb.msfpc="+o),O.shouldAddClockSkewHeaders()&&W(n,v,O.getClockSkewHeaderValue(),t),C.getWParam){var s=C.getWParam();s>=0&&(n.url+="&w="+s)}for(var a=0;a<j.length;a++)n.url+="&"+j[a].name+"="+j[a].value;return n}(t,u);u=u||T.useHdrs;var E=r.getTime();r.doPerf(C,(function(){return"HttpManager:_doPayloadSend"}),(function(){for(var d=0;d<t.batches.length;d++)for(var y=t.batches[d].events(),b=0;b<y.length;b++){var v=y[b];if(Q){var S=v.timings=v.timings||{};le(S,"sendEventStart",E),le(S,"serializationStart",n),le(S,"serializationCompleted",o)}v[q]>0?v[q]++:v[q]=1}he(t.batches,1e3+(s||0),t.sendType,!0);var w={data:t.payloadBlob,urlString:T.url,headers:T.hdrs,_thePayload:t,_sendReason:s,timeout:_};r.isUndefined(x)||(w.disableXhrSync=!!x),u&&($(w.headers,h)||(w.headers[h]="no-cache, no-store"),$(w.headers,f)||(w.headers[f]=p));var R=null;l&&(R=function(n){O.firstRequestSent();var o=function(n,o){!function(t,n,o,s){var a=9e3,l=null,u=!1,d=!1;try{var p=!0;if(typeof t!==r.strUndefined){if(n){O.setClockSkew(n[g]);var h=n[m]||n["kill-duration-seconds"];r.arrForEach(I.setKillSwitchTenants(n["kill-tokens"],h),(function(e){r.arrForEach(o.batches,(function(t){if(t.iKey()===e){l=l||[];var n=t.split(0);o.numEvents-=n.count(),l.push(n)}}))}))}if(200==t||204==t)return void(a=200);(!function(e){return!(e>=300&&e<500&&408!=e&&429!=e||501==e||505==e)}(t)||o.numEvents<=0)&&(p=!1),a=9e3+t%1e3}if(p){a=100;var f=o.retryCnt;0===o.sendType&&(f<i?(u=!0,de((function(){0===o.sendType&&A--,ce(o.batches,f+1,o.isTeardown,X?2:o.sendType,5)}),X,L(f))):(d=!0,X&&(a=8001)))}}finally{u||(O.setClockSkew(),function(t,n,i,o){try{o&&c._backOffTransmission(),200===n&&(!o&&!t.isSync&&c._clearBackOff(),function(e){if(Q){var t=r.getTime();r.arrForEach(e,(function(e){e&&e.count()>0&&function(e,t){Q&&r.arrForEach(e,(function(e){le(e.timings=e.timings||{},"sendEventCompleted",t)}))}(e.events(),t)}))}}(t.batches)),he(t.batches,n,t.sendType,!0)}finally{0===t.sendType&&(A--,5!==i&&e.sendQueuedRequests(t.sendType,i))}}(o,a,s,d)),he(l,8004,o.sendType)}}(n,o,t,s)},a=t.isTeardown||t.isSync;try{l.sendPOST(n,o,a),e.sendListener&&e.sendListener(w,n,a,t.isBeacon)}catch(e){c.diagLog().warnToConsole("Unexpected exception sending payload. Ex:"+r.dumpObj(e)),ee(o,0,{})}}),r.doPerf(C,(function(){return"HttpManager:_doPayloadSend.sender"}),(function(){if(R)if(0===t.sendType&&A++,a&&!t.isBeacon&&3!==l._transport){var n={data:w.data,urlString:w.urlString,headers:r.extend({},w.headers),timeout:w.timeout,disableXhrSync:w.disableXhrSync},i=!1;r.doPerf(C,(function(){return"HttpManager:_doPayloadSend.sendHook"}),(function(){try{e.sendHook(n,(function(e){i=!0,!N&&!e._thePayload&&(e._thePayload=e._thePayload||w._thePayload,e._sendReason=e._sendReason||w._sendReason),R(e)}),t.isSync||t.isTeardown)}catch{i||R(w)}}))}else R(w)}))}),(function(){return{thePayload:t,serializationStart:n,serializationCompleted:o,sendReason:s}}),t.isSync)}t.sizeExceed&&t.sizeExceed.length>0&&he(t.sizeExceed,8003,t.sendType),t.failedEvts&&t.failedEvts.length>0&&he(t.failedEvts,8002,t.sendType)}function de(e,t,n){t?e():a.set(e,n)}function pe(t){var n=e._responseHandlers;try{for(var i=0;i<n.length;i++)try{n[i](t)}catch(e){r._throwInternal(c.diagLog(),1,519,"Response handler failed: "+e)}if(t){var o=JSON.parse(t);r.isValueAssigned(o.webResult)&&r.isValueAssigned(o.webResult[E])&&T.set("MSFPC",o.webResult[E],31536e3)}}catch{}}function he(e,t,n,i){if(e&&e.length>0&&s){var o=s[function(e){var t=U[e];return r.isValueAssigned(t)||(t="oth",e>=9e3&&e<=9999?t="rspFail":e>=8e3&&e<=8999?t=u:e>=1e3&&e<=1999&&(t="send")),t}(t)];if(o){var a=0!==n;r.doPerf(C,(function(){return"HttpManager:_sendBatchesNotification"}),(function(){de((function(){try{o.call(s,e,t,a,n)}catch(e){r._throwInternal(c.diagLog(),1,74,"send request notification failed: "+e)}}),i||a,0)}),(function(){return{batches:ae(e),reason:t,isSync:a,sendSync:i,sendType:n}}),!a)}}}e.initialize=function(e,t,n,i,s){var a;s||(s={}),R=e+R,Y=!!r.isUndefined(s.avoidOptions)||!s.avoidOptions,C=t,T=t.getCookieMgr(),Q=!C.config.disableEventTimings;var l=!!C.config.enableCompoundKey;c=n;var u=s.valueSanitizer,p=s.stringifyObjects;r.isUndefined(s.enableCompoundKey)||(l=!!s.enableCompoundKey),_=s.xhrTimeout,x=s.disableXhrSync,D=!r.isReactNative(),K=new k(C,u,p,l);var h=i,f=s.alwaysUseXhrOverride?i:null,m=s.alwaysUseXhrOverride?i:null;if(!i){N=!1;var g=r.getLocation();g&&g.protocol&&"file:"===g.protocol.toLowerCase()&&(o=!1);var y=[];y=r.isReactNative()?[2,1]:[1,2,3];var b=s.transports;b&&(r.isNumber(b)?y=[b].concat(y):r.isArray(b)&&(y=b.concat(y))),i=M(y,!1),h=M(y,!0),i||c.diagLog().warnToConsole("No available transport to send events")}(a={})[0]=i,a[1]=h||M([1,2,3],!0),a[2]=f||M([3,2],!0)||h||M([1],!0),a[3]=m||M([2,3],!0)||h||M([1],!0),d=a},e._getDbgPlgTargets=function(){return[d[0],I,K,d]},e.addQueryStringParameter=function(e,t){for(var n=0;n<j.length;n++)if(j[n].name===e)return void(j[n].value=t);j.push({name:e,value:t})},e.addHeader=function(e,t){z[e]=t},e.canSendRequest=function(){return ie()&&O.allowRequestSending()},e.sendQueuedRequests=function(e,t){r.isUndefined(e)&&(e=0),X&&(e=re(e),t=2),se(H,e,0)&&ce(oe(),0,!1,e,t||0)},e.isCompletelyIdle=function(){return!P&&0===A&&0===H.length},e.setUnloading=function(e){X=e},e.addBatch=function(e){if(e&&e.count()>0){if(I.isTenantKilled(e.iKey()))return!1;H.push(e)}return!0},e.teardown=function(){H.length>0&&ce(oe(),0,!0,2,2)},e.pause=function(){P=!0},e.resume=function(){P=!1,e.sendQueuedRequests(0,4)},e.sendSynchronousBatch=function(e,t,n){e&&e.count()>0&&(r.isNullOrUndefined(t)&&(t=1),X&&(t=re(t),n=2),ce([e],0,!1,t,n||0))}}))};function Q(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout(e,t,n)}function X(e){clearTimeout(e)}function Y(e,t){return{set:e||Q,clear:t||X}}var J="eventsDiscarded",Z="overrideInstrumentationKey",ee="maxEventRetryAttempts",te="maxUnloadEventRetryAttempts",ne=function(e){function n(){var t=e.call(this)||this;t.identifier="PostChannel",t.priority=1011,t.version="3.2.3";var i,l,u,d,p,h,f,m,g=!1,y=[],b=null,v=!1,S=0,w=500,T=0,E=1e4,_={},x=s,I=null,P=null,O=0,D=0,A={},k=-1,N=!0,j=!1,M=6,F=2;return o(n,t,(function(e,t){function n(e){"beforeunload"!==(e||r.getWindow().event).type&&(j=!0,u.setUnloading(j)),$(2,2)}function o(e){j=!1,u.setUnloading(j)}function q(e,t){if(e.sendAttempt||(e.sendAttempt=0),e.latency||(e.latency=1),e.ext&&e.ext.trace&&delete e.ext.trace,e.ext&&e.ext.user&&e.ext.user.id&&delete e.ext.user.id,N&&(e.ext=r.optimizeObject(e.ext),e.baseData&&(e.baseData=r.optimizeObject(e.baseData)),e.data&&(e.data=r.optimizeObject(e.data))),e.sync)if(O||v)e.latency=3,e.sync=!1;else if(u)return N&&(e=r.optimizeObject(e)),void u.sendSynchronousBatch(R.create(e.iKey,[e]),!0===e.sync?1:e.sync,3);var n=e.latency,i=T,o=E;4===n&&(i=S,o=w);var s=!1;if(i<o)s=!X(e,t);else{var a=1,c=20;4===n&&(a=4,c=1),s=!0,function(e,t,n,i){for(;n<=t;){var o=W(e,t,!0);if(o&&o.count()>0){var s=o.split(0,i),a=s.count();if(a>0)return 4===n?S-=a:T-=a,ue(J,[s],r.EventsDiscardedReason.QueueFull),!0}n++}return ne(),!1}(e.iKey,e.latency,a,c)&&(s=!X(e,t))}s&&le(J,[e],r.EventsDiscardedReason.QueueFull)}function B(e,t,n){var r=re(e,t,n);return u.sendQueuedRequests(t,n),r}function U(){return T>0}function z(){if(k>=0&&re(k,0,h)&&u.sendQueuedRequests(0,h),S>0&&!P&&!v){var e=_[x][2];e>=0&&(P=H((function(){P=null,B(4,0,1),z()}),e))}var t=_[x][1];!I&&!b&&t>=0&&!v&&(U()?I=H((function(){I=null,B(0===D?3:1,0,1),D++,D%=2,z()}),t):D=0)}function G(){i=null,g=!1,y=[],b=null,v=!1,S=0,w=500,T=0,E=1e4,_={},x=s,I=null,P=null,O=0,D=0,l=null,A={},d=void 0,p=0,k=-1,h=null,N=!0,j=!1,M=6,F=2,f=null,m=Y(),u=new K(500,2,1,{requeue:ae,send:de,sent:pe,drop:he,rspFail:fe,oth:me},m),se(),A[4]={batches:[],iKeyMap:{}},A[3]={batches:[],iKeyMap:{}},A[2]={batches:[],iKeyMap:{}},A[1]={batches:[],iKeyMap:{}},ge()}function H(e,t){0===t&&O&&(t=1);var n=1e3;return O&&(n=L(O-1)),m.set(e,t*n)}function V(){return null!==I&&(m.clear(I),I=null,D=0,!0)}function $(e,t){V(),b&&(m.clear(b),b=null),v||B(1,e,t)}function W(e,t,n){var r=A[t];r||(r=A[t=1]);var i=r.iKeyMap[e];return!i&&n&&(i=R.create(e),r.batches.push(i),r.iKeyMap[e]=i),i}function Q(t,n){u.canSendRequest()&&!O&&(d>0&&T>d&&(n=!0),n&&null==b&&e.flush(t,null,20))}function X(e,t){N&&(e=r.optimizeObject(e));var n=e.latency,i=W(e.iKey,n,!0);return!!i.addEvent(e)&&(4!==n?(T++,t&&0===e.sendAttempt&&Q(!e.sync,p>0&&i.count()>=p)):S++,!0)}function ne(){for(var e=0,t=0,n=function(n){var i=A[n];i&&i.batches&&r.arrForEach(i.batches,(function(r){4===n?e+=r.count():t+=r.count()}))},i=1;i<=4;i++)n(i);T=t,S=e}function re(t,n,i){var o=!1,s=0===n;return!s||u.canSendRequest()?r.doPerf(e.core,(function(){return"PostChannel._queueBatches"}),(function(){for(var e=[],n=4;n>=t;){var i=A[n];i&&i.batches&&i.batches.length>0&&(r.arrForEach(i.batches,(function(t){u.addBatch(t)?o=o||t&&t.count()>0:e=e.concat(t.events()),4===n?S-=t.count():T-=t.count()})),i.batches=[],i.iKeyMap={}),n--}e.length>0&&le(J,e,r.EventsDiscardedReason.KillSwitch),o&&k>=t&&(k=-1,h=0)}),(function(){return{latency:t,sendType:n,sendReason:i}}),!s):(k=k>=0?Math.min(k,t):t,h=Math.max(h,i)),o}function ie(e,t){B(1,0,t),ne(),oe((function(){e&&e(),y.length>0?b=H((function(){b=null,ie(y.shift(),t)}),0):(b=null,z())}))}function oe(e){u.isCompletelyIdle()?e():b=H((function(){b=null,oe(e)}),.25)}function se(){(_={})[s]=[2,1,0],_[a]=[6,3,0],_[c]=[18,9,0]}function ae(t,n){var i=[],o=M;j&&(o=F),r.arrForEach(t,(function(t){t&&t.count()>0&&r.arrForEach(t.events(),(function(t){t&&(t.sync&&(t.latency=4,t.sync=!1),t.sendAttempt<o?(r.setProcessTelemetryTimings(t,e.identifier),q(t,!1)):i.push(t))}))})),i.length>0&&le(J,i,r.EventsDiscardedReason.NonRetryableStatus),j&&$(2,2)}function ce(t,n){var i=e._notificationManager||{},o=i[t];if(o)try{o.apply(i,n)}catch(n){r._throwInternal(e.diagLog(),1,74,t+" notification failed: "+n)}}function le(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];t&&t.length>0&&ce(e,[t].concat(n))}function ue(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];t&&t.length>0&&r.arrForEach(t,(function(t){t&&t.count()>0&&ce(e,[t.events()].concat(n))}))}function de(e,t,n){e&&e.length>0&&ce("eventsSendRequest",[t>=1e3&&t<=1999?t-1e3:0,!0!==n])}function pe(e,t){ue("eventsSent",e,t),z()}function he(e,t){ue(J,e,t>=8e3&&t<=8999?t-8e3:r.EventsDiscardedReason.Unknown)}function fe(e){ue(J,e,r.EventsDiscardedReason.NonRetryableStatus),z()}function me(e,t){ue(J,e,r.EventsDiscardedReason.Unknown),z()}function ge(){p=i&&i.disableAutoBatchFlushLimit?0:Math.max(1500,E/6)}G(),e._getDbgPlgTargets=function(){return[u]},e.initialize=function(s,a,c){r.doPerf(a,(function(){return"PostChannel:initialize"}),(function(){var p=a;t.initialize(s,a,c);try{a.addUnloadCb,f=r.mergeEvtNamespace(r.createUniqueNamespace(e.identifier),a.evtNamespace&&a.evtNamespace());var h=e._getTelCtx();s.extensionConfig[e.identifier]=s.extensionConfig[e.identifier]||{},i=h.getExtCfg(e.identifier),m=Y(i.setTimeoutOverride,i.clearTimeoutOverride),N=!i.disableOptimizeObj&&r.isChromium(),function(e){var t=e.getWParam;e.getWParam=function(){var e=0;return i.ignoreMc1Ms0CookieProcessing&&(e|=2),e|t()}}(p),i.eventsLimitInMem>0&&(E=i.eventsLimitInMem),i.immediateEventLimit>0&&(w=i.immediateEventLimit),i.autoFlushEventsLimit>0&&(d=i.autoFlushEventsLimit),r.isNumber(i[ee])&&(M=i[ee]),r.isNumber(i[te])&&(F=i[te]),ge(),i.httpXHROverride&&i.httpXHROverride.sendPOST&&(l=i.httpXHROverride),r.isValueAssigned(s.anonCookieName)&&u.addQueryStringParameter("anoncknm",s.anonCookieName),u.sendHook=i.payloadPreprocessor,u.sendListener=i.payloadListener;var g=i.overrideEndpointUrl?i.overrideEndpointUrl:s.endpointUrl;e._notificationManager=s.extensionConfig.NotificationManager,u.initialize(g,e.core,e,l,i);var y=s.disablePageUnloadEvents||[];r.addPageUnloadEventListener(n,y,f),r.addPageHideEventListener(n,y,f),r.addPageShowEventListener(o,s.disablePageShowEvents,f)}catch(t){throw e.setInitialized(!1),t}}),(function(){return{coreConfig:s,core:a,extensions:c}}))},e.processTelemetry=function(t,n){r.setProcessTelemetryTimings(t,e.identifier);var o=(n=e._getTelCtx(n)).getExtCfg(e.identifier),s=!!i.disableTelemetry;o&&(s=s||!!o.disableTelemetry);var a=t;!s&&!g&&(i[Z]&&(a.iKey=i[Z]),o&&o[Z]&&(a.iKey=o[Z]),q(a,!0),j?$(2,2):z()),e.processNext(a,n)},e._doTeardown=function(e,t){$(2,2),g=!0,u.teardown(),r.removePageUnloadEventListener(null,f),r.removePageHideEventListener(null,f),r.removePageShowEventListener(null,f),G()},e.setEventQueueLimits=function(e,t){E=e>0?e:1e4,d=t>0?t:0,ge();var n=T>e;if(!n&&p>0)for(var i=1;!n&&i<=3;i++){var o=A[i];o&&o.batches&&r.arrForEach(o.batches,(function(e){e&&e.count()>=p&&(n=!0)}))}Q(!0,n)},e.pause=function(){V(),v=!0,u.pause()},e.resume=function(){v=!1,u.resume(),z()},e.addResponseHandler=function(e){u._responseHandlers.push(e)},e._loadTransmitProfiles=function(e){V(),se(),x=s,z(),r.objForEachKey(e,(function(e,t){var n=t.length;if(n>=2){var r=n>2?t[2]:0;if(t.splice(0,n-2),t[1]<0&&(t[0]=-1),t[1]>0&&t[0]>0){var i=t[0]/t[1];t[0]=Math.ceil(i)*t[1]}r>=0&&t[1]>=0&&r>t[1]&&(r=t[1]),t.push(r),_[e]=t}}))},e.flush=function(e,t,n){if(void 0===e&&(e=!0),!v)if(n=n||1,e)null==b?(V(),re(1,0,n),b=H((function(){b=null,ie(t,n)}),0)):y.push(t);else{var r=V();B(1,1,n),null!=t&&t(),r&&z()}},e.setMsaAuthTicket=function(e){u.addHeader(C,e)},e.hasEvents=U,e._setTransmitProfile=function(e){x!==e&&void 0!==_[e]&&(V(),x=e,z())},e._backOffTransmission=function(){O<4&&(O++,V(),z())},e._clearBackOff=function(){O&&(O=0,V(),z())},r.objDefineAccessors(e,"_setTimeoutOverride",(function(){return m.set}),(function(e){m=Y(e,m.clear)})),r.objDefineAccessors(e,"_clearTimeoutOverride",(function(){return m.clear}),(function(e){m=Y(m.set,e)}))})),t}return t.__extendsFn(n,e),n}(r.BaseTelemetryPlugin);e.BE_PROFILE=c,e.NRT_PROFILE=a,e.PostChannel=ne,e.RT_PROFILE=s,function(e,t,n){var r=Object.defineProperty;if(r)try{return r(e,t,n)}catch{}n&&void 0!==typeof n.value&&(e[t]=n.value)}(e,"__esModule",{value:!0})},"object"==typeof s&&typeof a<"u"?c(s,R(),_(),x()):(i=[t,n(2284),n(1356),n(1318)],void 0===(o="function"==typeof(r=c)?r.apply(t,i):r)||(e.exports=o))})),P=S(((e,t)=>{"use strict";var n=function(){function e(){}return e.info=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];e.enableDebug&&console.info(e.TAG+t,n)},e.warn=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];e.disableWarnings||console.warn(e.TAG+t,n)},e.enableDebug=!1,e.disableWarnings=!1,e.disableErrors=!1,e.TAG="ApplicationInsights:",e}();t.exports=n})),O=S((e=>{"use strict";var t=e&&e.__assign||function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.AsyncScopeManager=e.OpenTelemetryScopeManagerWrapper=void 0;var r=xr(),i=n(4434),o=function(){function e(){}return e.prototype.active=function(){var e=this,n=r.CorrelationContextManager.getCurrentContext();return t(t({},n),{getValue:function(t){return e._activeSymbol?t===e._activeSymbol&&n:(e._activeSymbol=t,n)},setValue:function(){}})},e.prototype.with=function(t,n){var i=t.parentSpanId,o=t.name,s=e._spanToContext(t,i,o);return r.CorrelationContextManager.runWithContext(s,n)()},e.prototype.bind=function(e){return"function"==typeof e?r.CorrelationContextManager.wrapCallback(e):(e instanceof i.EventEmitter&&r.CorrelationContextManager.wrapEmitter(e),e)},e.prototype.enable=function(){return r.CorrelationContextManager.enable(),this},e.prototype.disable=function(){return r.CorrelationContextManager.disable(),this},e._spanToContext=function(e,n,i){var o=n?"|"+e.spanContext().traceId+"."+n+".":e.spanContext().traceId,s=t(t({},e.spanContext()),{traceFlags:e.spanContext().traceFlags});return r.CorrelationContextManager.spanToContextObject(s,o,i)},e}();e.OpenTelemetryScopeManagerWrapper=o,e.AsyncScopeManager=new o})),D=S(((e,t)=>{var n;e=t.exports=W,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(){},e.SEMVER_SPEC_VERSION="2.0.0";var r=256,i=Number.MAX_SAFE_INTEGER||9007199254740991,o=e.re=[],s=e.src=[],a=0,c=a++;s[c]="0|[1-9]\\d*";var l=a++;s[l]="[0-9]+";var u=a++;s[u]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var d=a++;s[d]="("+s[c]+")\\.("+s[c]+")\\.("+s[c]+")";var p=a++;s[p]="("+s[l]+")\\.("+s[l]+")\\.("+s[l]+")";var h=a++;s[h]="(?:"+s[c]+"|"+s[u]+")";var f=a++;s[f]="(?:"+s[l]+"|"+s[u]+")";var m=a++;s[m]="(?:-("+s[h]+"(?:\\."+s[h]+")*))";var g=a++;s[g]="(?:-?("+s[f]+"(?:\\."+s[f]+")*))";var y=a++;s[y]="[0-9A-Za-z-]+";var b=a++;s[b]="(?:\\+("+s[y]+"(?:\\."+s[y]+")*))";var v=a++,S="v?"+s[d]+s[m]+"?"+s[b]+"?";s[v]="^"+S+"$";var w="[v=\\s]*"+s[p]+s[g]+"?"+s[b]+"?",C=a++;s[C]="^"+w+"$";var T=a++;s[T]="((?:<|>)?=?)";var E=a++;s[E]=s[l]+"|x|X|\\*";var _=a++;s[_]=s[c]+"|x|X|\\*";var x=a++;s[x]="[v=\\s]*("+s[_]+")(?:\\.("+s[_]+")(?:\\.("+s[_]+")(?:"+s[m]+")?"+s[b]+"?)?)?";var R=a++;s[R]="[v=\\s]*("+s[E]+")(?:\\.("+s[E]+")(?:\\.("+s[E]+")(?:"+s[g]+")?"+s[b]+"?)?)?";var I=a++;s[I]="^"+s[T]+"\\s*"+s[x]+"$";var P=a++;s[P]="^"+s[T]+"\\s*"+s[R]+"$";var O=a++;s[O]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var D=a++;s[D]="(?:~>?)";var A=a++;s[A]="(\\s*)"+s[D]+"\\s+",o[A]=new RegExp(s[A],"g");var k=a++;s[k]="^"+s[D]+s[x]+"$";var N=a++;s[N]="^"+s[D]+s[R]+"$";var L=a++;s[L]="(?:\\^)";var j=a++;s[j]="(\\s*)"+s[L]+"\\s+",o[j]=new RegExp(s[j],"g");var M=a++;s[M]="^"+s[L]+s[x]+"$";var F=a++;s[F]="^"+s[L]+s[R]+"$";var q=a++;s[q]="^"+s[T]+"\\s*("+w+")$|^$";var B=a++;s[B]="^"+s[T]+"\\s*("+S+")$|^$";var U=a++;s[U]="(\\s*)"+s[T]+"\\s*("+w+"|"+s[x]+")",o[U]=new RegExp(s[U],"g");var z=a++;s[z]="^\\s*("+s[x]+")\\s+-\\s+("+s[x]+")\\s*$";var G=a++;s[G]="^\\s*("+s[R]+")\\s+-\\s+("+s[R]+")\\s*$";var H,V=a++;for(s[V]="(<|>)?=?\\s*\\*",H=0;H<35;H++)n(H,s[H]),o[H]||(o[H]=new RegExp(s[H]));function $(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof W)return e;if("string"!=typeof e||e.length>r)return null;if(!(t.loose?o[C]:o[v]).test(e))return null;try{return new W(e,t)}catch{return null}}function W(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof W){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 W))return new W(e,t);n("SemVer",e,t),this.options=t,this.loose=!!t.loose;var s=e.trim().match(t.loose?o[C]:o[v]);if(!s)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>i||this.major<0)throw new TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t<i)return t}return e})):this.prerelease=[],this.build=s[5]?s[5].split("."):[],this.format()}e.parse=$,e.valid=function(e,t){var n=$(e,t);return n?n.version:null},e.clean=function(e,t){var n=$(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null},e.SemVer=W,W.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},W.prototype.toString=function(){return this.version},W.prototype.compare=function(e){return n("SemVer.compare",this.version,this.options,e),e instanceof W||(e=new W(e,this.options)),this.compareMain(e)||this.comparePre(e)},W.prototype.compareMain=function(e){return e instanceof W||(e=new W(e,this.options)),Q(this.major,e.major)||Q(this.minor,e.minor)||Q(this.patch,e.patch)},W.prototype.comparePre=function(e){if(e instanceof W||(e=new W(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;var t=0;do{var r=this.prerelease[t],i=e.prerelease[t];if(n("prerelease compare",t,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return Q(r,i)}while(++t)},W.prototype.inc=function(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":(0!==this.minor||0!==this.patch||0===this.prerelease.length)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(0!==this.patch||0===this.prerelease.length)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var n=this.prerelease.length;--n>=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},e.inc=function(e,t,n,r){"string"==typeof n&&(r=n,n=void 0);try{return new W(e,n).inc(t,r).version}catch{return null}},e.diff=function(e,t){if(Z(e,t))return null;var n=$(e),r=$(t),i="";if(n.prerelease.length||r.prerelease.length){i="pre";var o="prerelease"}for(var s in n)if(("major"===s||"minor"===s||"patch"===s)&&n[s]!==r[s])return i+s;return o},e.compareIdentifiers=Q;var K=/^[0-9]+$/;function Q(e,t){var n=K.test(e),r=K.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e<t?-1:1}function X(e,t,n){return new W(e,n).compare(new W(t,n))}function Y(e,t,n){return X(e,t,n)>0}function J(e,t,n){return X(e,t,n)<0}function Z(e,t,n){return 0===X(e,t,n)}function ee(e,t,n){return 0!==X(e,t,n)}function te(e,t,n){return X(e,t,n)>=0}function ne(e,t,n){return X(e,t,n)<=0}function re(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 Z(e,n,r);case"!=":return ee(e,n,r);case">":return Y(e,n,r);case">=":return te(e,n,r);case"<":return J(e,n,r);case"<=":return ne(e,n,r);default:throw new TypeError("Invalid operator: "+t)}}function ie(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof ie){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof ie))return new ie(e,t);n("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===oe?this.value="":this.value=this.operator+this.semver.version,n("comp",this)}e.rcompareIdentifiers=function(e,t){return Q(t,e)},e.major=function(e,t){return new W(e,t).major},e.minor=function(e,t){return new W(e,t).minor},e.patch=function(e,t){return new W(e,t).patch},e.compare=X,e.compareLoose=function(e,t){return X(e,t,!0)},e.rcompare=function(e,t,n){return X(t,e,n)},e.sort=function(t,n){return t.sort((function(t,r){return e.compare(t,r,n)}))},e.rsort=function(t,n){return t.sort((function(t,r){return e.rcompare(t,r,n)}))},e.gt=Y,e.lt=J,e.eq=Z,e.neq=ee,e.gte=te,e.lte=ne,e.cmp=re,e.Comparator=ie;var oe={};function se(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof se)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new se(e.raw,t);if(e instanceof ie)return new se(e.value,t);if(!(this instanceof se))return new se(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function ae(e){return!e||"x"===e.toLowerCase()||"*"===e}function ce(e,t,n,r,i,o,s,a,c,l,u,d,p){return((t=ae(n)?"":ae(r)?">="+n+".0.0":ae(i)?">="+n+"."+r+".0":">="+t)+" "+(a=ae(c)?"":ae(l)?"<"+(+c+1)+".0.0":ae(u)?"<"+c+"."+(+l+1)+".0":d?"<="+c+"."+l+"."+u+"-"+d:"<="+a)).trim()}function le(e,t,r){for(var i=0;i<e.length;i++)if(!e[i].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(i=0;i<e.length;i++)if(n(e[i].semver),e[i].semver!==oe&&e[i].semver.prerelease.length>0){var o=e[i].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch)return!0}return!1}return!0}function ue(e,t,n){try{t=new se(t,n)}catch{return!1}return t.test(e)}function de(e,t,n,r){var i,o,s,a,c;switch(e=new W(e,r),t=new se(t,r),n){case">":i=Y,o=ne,s=J,a=">",c=">=";break;case"<":i=J,o=te,s=Y,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(ue(e,t,r))return!1;for(var l=0;l<t.set.length;++l){var u=t.set[l],d=null,p=null;if(u.forEach((function(e){e.semver===oe&&(e=new ie(">=0.0.0")),d=d||e,p=p||e,i(e.semver,d.semver,r)?d=e:s(e.semver,p.semver,r)&&(p=e)})),d.operator===a||d.operator===c||(!p.operator||p.operator===a)&&o(e,p.semver))return!1;if(p.operator===c&&s(e,p.semver))return!1}return!0}ie.prototype.parse=function(e){var t=this.options.loose?o[q]:o[B],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 W(n[2],this.options.loose):this.semver=oe},ie.prototype.toString=function(){return this.value},ie.prototype.test=function(e){return n("Comparator.test",e,this.options.loose),this.semver===oe||("string"==typeof e&&(e=new W(e,this.options)),re(e,this.operator,this.semver,this.options))},ie.prototype.intersects=function(e,t){if(!(e instanceof ie))throw new TypeError("a Comparator is required");var n;if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),""===this.operator)return n=new se(e.value,t),ue(this.value,n,t);if(""===e.operator)return n=new se(this.value,t),ue(e.semver,n,t);var r=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=re(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=re(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||i||o&&s||a||c},e.Range=se,se.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},se.prototype.toString=function(){return this.range},se.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var r=t?o[G]:o[z];e=e.replace(r,ce),n("hyphen replace",e),e=e.replace(o[U],"$1$2$3"),n("comparator trim",e,o[U]),e=(e=(e=e.replace(o[A],"$1~")).replace(o[j],"$1^")).split(/\s+/).join(" ");var i=t?o[q]:o[B],s=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?o[F]:o[M];return e.replace(r,(function(t,r,i,o,s){var a;return n("caret",e,t,r,i,o,s),ae(r)?a="":ae(i)?a=">="+r+".0.0 <"+(+r+1)+".0.0":ae(o)?a="0"===r?">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":">="+r+"."+i+".0 <"+(+r+1)+".0.0":s?(n("replaceCaret pr",s),a="0"===r?"0"===i?">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+i+"."+(+o+1):">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+o+"-"+s+" <"+(+r+1)+".0.0"):(n("no pr"),a="0"===r?"0"===i?">="+r+"."+i+"."+o+" <"+r+"."+i+"."+(+o+1):">="+r+"."+i+"."+o+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+o+" <"+(+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?o[N]:o[k];return e.replace(r,(function(t,r,i,o,s){var a;return n("tilde",e,t,r,i,o,s),ae(r)?a="":ae(i)?a=">="+r+".0.0 <"+(+r+1)+".0.0":ae(o)?a=">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":s?(n("replaceTilde pr",s),a=">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+(+i+1)+".0"):a=">="+r+"."+i+"."+o+" <"+r+"."+(+i+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?o[P]:o[I];return e.replace(r,(function(t,r,i,o,s,a){n("xRange",e,t,r,i,o,s,a);var c=ae(i),l=c||ae(o),u=l||ae(s);return"="===r&&u&&(r=""),c?t=">"===r||"<"===r?"<0.0.0":"*":r&&u?(l&&(o=0),s=0,">"===r?(r=">=",l?(i=+i+1,o=0,s=0):(o=+o+1,s=0)):"<="===r&&(r="<",l?i=+i+1:o=+o+1),t=r+i+"."+o+"."+s):l?t=">="+i+".0.0 <"+(+i+1)+".0.0":u&&(t=">="+i+"."+o+".0 <"+i+"."+(+o+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(o[V],"")}(e,t),n("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(s=s.filter((function(e){return!!e.match(i)}))),s.map((function(e){return new ie(e,this.options)}),this)},se.prototype.intersects=function(e,t){if(!(e instanceof se))throw new TypeError("a Range is required");return this.set.some((function(n){return n.every((function(n){return e.set.some((function(e){return e.every((function(e){return n.intersects(e,t)}))}))}))}))},e.toComparators=function(e,t){return new se(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},se.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new W(e,this.options));for(var t=0;t<this.set.length;t++)if(le(this.set[t],e,this.options))return!0;return!1},e.satisfies=ue,e.maxSatisfying=function(e,t,n){var r=null,i=null;try{var o=new se(t,n)}catch{return null}return e.forEach((function(e){o.test(e)&&(!r||-1===i.compare(e))&&(i=new W(r=e,n))})),r},e.minSatisfying=function(e,t,n){var r=null,i=null;try{var o=new se(t,n)}catch{return null}return e.forEach((function(e){o.test(e)&&(!r||1===i.compare(e))&&(i=new W(r=e,n))})),r},e.minVersion=function(e,t){e=new se(e,t);var n=new W("0.0.0");if(e.test(n)||(n=new W("0.0.0-0"),e.test(n)))return n;n=null;for(var r=0;r<e.set.length;++r)e.set[r].forEach((function(e){var t=new W(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":(!n||Y(n,t))&&(n=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}));return n&&e.test(n)?n:null},e.validRange=function(e,t){try{return new se(e,t).range||"*"}catch{return null}},e.ltr=function(e,t,n){return de(e,t,"<",n)},e.gtr=function(e,t,n){return de(e,t,">",n)},e.outside=de,e.prerelease=function(e,t){var n=$(e,t);return n&&n.prerelease.length?n.prerelease:null},e.intersects=function(e,t,n){return e=new se(e,n),t=new se(t,n),e.intersects(t)},e.coerce=function(e){if(e instanceof W)return e;if("string"!=typeof e)return null;var t=e.match(o[O]);return null==t?null:$(t[1]+"."+(t[2]||"0")+"."+(t[3]||"0"))}})),A=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.makePatchingRequire=void 0;var t=n(6928),r=D(),i=n(3339),o=Object.keys(process.binding("natives")),s=i.prototype.require;e.makePatchingRequire=function(e){var n={};return function(a){var c=s.apply(this,arguments);if(e[a]){var l=i._resolveFilename(a,this);if(n.hasOwnProperty(l))return n[l];var u=void 0;if(o.indexOf(a)<0)try{u=s.call(this,t.join(a,"package.json")).version}catch{return c}else u=process.version.substring(1);var d=u.indexOf("-");d>=0&&(u=u.substring(0,d));for(var p=c,h=0,f=e[a];h<f.length;h++){var m=f[h];r.satisfies(u,m.versionSpecifier)&&(p=m.patch(p,l))}return n[l]=p}return c}}})),k=S(((e,t)=>{t.exports={name:"diagnostic-channel",version:"1.0.0",main:"./dist/src/channel.js",types:"./dist/src/channel.d.ts",scripts:{build:"tsc",lint:"tslint -c tslint.json -p tsconfig.json",clean:"rimraf ./dist",test:"mocha ./dist/tests/**/*.js"},homepage:"https://github.com/Microsoft/node-diagnostic-channel",bugs:{url:"https://github.com/Microsoft/node-diagnostic-channel/issues"},repository:{type:"git",url:"https://github.com/Microsoft/node-diagnostic-channel.git"},description:"Provides a context-saving pub/sub channel to connect diagnostic event publishers and subscribers",dependencies:{semver:"^5.3.0"},devDependencies:{"@types/mocha":"^2.2.40","@types/node":"~8.0.0",mocha:"^3.2.0",rimraf:"^2.6.1",tslint:"^5.0.0",typescript:"4.1.2"},files:["dist/src/**/*.d.ts","dist/src/**/*.js","LICENSE","README.md","package.json"],license:"MIT"}})),N=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.channel=e.makePatchingRequire=void 0;var t=A(),r=A();Object.defineProperty(e,"makePatchingRequire",{enumerable:!0,get:function(){return r.makePatchingRequire}});var i=function(e){return!0},o=function(){function e(){this.version=k().version,this.subscribers={},this.contextPreservationFunction=function(e){return e},this.knownPatches={},this.currentlyPublishing=!1}return e.prototype.shouldPublish=function(e){var t=this.subscribers[e];return!!t&&t.some((function(e){var t=e.filter;return!t||t(!1)}))},e.prototype.publish=function(e,t){if(!this.currentlyPublishing){var n=this.subscribers[e];if(n){var r={timestamp:Date.now(),data:t};this.currentlyPublishing=!0,n.forEach((function(e){var t=e.listener,n=e.filter;try{n&&n(!0)&&t(r)}catch{}})),this.currentlyPublishing=!1}}},e.prototype.subscribe=function(e,t,n){void 0===n&&(n=i),this.subscribers[e]||(this.subscribers[e]=[]),this.subscribers[e].push({listener:t,filter:n})},e.prototype.unsubscribe=function(e,t,n){void 0===n&&(n=i);var r=this.subscribers[e];if(r)for(var o=0;o<r.length;++o)if(r[o].listener===t&&r[o].filter===n)return r.splice(o,1),!0;return!1},e.prototype.reset=function(){var e=this;this.subscribers={},this.contextPreservationFunction=function(e){return e},Object.getOwnPropertyNames(this.knownPatches).forEach((function(t){return delete e.knownPatches[t]}))},e.prototype.bindToContext=function(e){return this.contextPreservationFunction(e)},e.prototype.addContextPreservation=function(e){var t=this.contextPreservationFunction;this.contextPreservationFunction=function(n){return e(t(n))}},e.prototype.registerMonkeyPatch=function(e,t){this.knownPatches[e]||(this.knownPatches[e]=[]),this.knownPatches[e].push(t)},e.prototype.getPatchesObject=function(){return this.knownPatches},e}();global.diagnosticsSource||(global.diagnosticsSource=new o,n(3339).prototype.require=t.makePatchingRequire(global.diagnosticsSource.getPatchesObject())),e.channel=global.diagnosticsSource})),L=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),j=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e._globalThis=void 0,e._globalThis="object"==typeof globalThis?globalThis:global})),M=S((e=>{"use strict";var t=e&&e.__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]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(j(),e)})),F=S((e=>{"use strict";var t=e&&e.__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]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(M(),e)})),q=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VERSION=void 0,e.VERSION="1.0.3"})),B=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isCompatible=e._makeCompatibilityCheck=void 0;var t=q(),n=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;function r(e){var t=new Set([e]),r=new Set,i=e.match(n);if(!i)return function(){return!1};var o=+i[1],s=+i[2],a=+i[3];if(null!=i[4])return function(t){return t===e};function c(e){return r.add(e),!1}function l(e){return t.add(e),!0}return function(e){if(t.has(e))return!0;if(r.has(e))return!1;var i=e.match(n);if(!i)return c(e);var u=+i[1],d=+i[2],p=+i[3];return null!=i[4]||o!==u?c(e):0===o?s===d&&a<=p?l(e):c(e):s<=d?l(e):c(e)}}e._makeCompatibilityCheck=r,e.isCompatible=r(t.VERSION)})),U=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.unregisterGlobal=e.getGlobal=e.registerGlobal=void 0;var t=F(),n=q(),r=B(),i=n.VERSION.split(".")[0],o=Symbol.for("opentelemetry.js.api."+i),s=t._globalThis;e.registerGlobal=function(e,t,r,i){var a;void 0===i&&(i=!1);var c=s[o]=null!==(a=s[o])&&void 0!==a?a:{version:n.VERSION};if(!i&&c[e]){var l=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+e);return r.error(l.stack||l.message),!1}return c.version!==n.VERSION?(l=new Error("@opentelemetry/api: All API registration versions must match"),r.error(l.stack||l.message),!1):(c[e]=t,r.debug("@opentelemetry/api: Registered a global for "+e+" v"+n.VERSION+"."),!0)},e.getGlobal=function(e){var t,n,i=null===(t=s[o])||void 0===t?void 0:t.version;if(i&&r.isCompatible(i))return null===(n=s[o])||void 0===n?void 0:n[e]},e.unregisterGlobal=function(e,t){t.debug("@opentelemetry/api: Unregistering a global for "+e+" v"+n.VERSION+".");var r=s[o];r&&delete r[e]}})),z=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiagComponentLogger=void 0;var t=U(),n=function(){function e(e){this._namespace=e.namespace||"DiagComponentLogger"}return e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r("debug",this._namespace,e)},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r("error",this._namespace,e)},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r("info",this._namespace,e)},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r("warn",this._namespace,e)},e.prototype.verbose=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r("verbose",this._namespace,e)},e}();function r(e,n,r){var i=t.getGlobal("diag");if(i)return r.unshift(n),i[e].apply(i,r)}e.DiagComponentLogger=n})),G=S((e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.DiagLogLevel=void 0,(t=e.DiagLogLevel||(e.DiagLogLevel={}))[t.NONE=0]="NONE",t[t.ERROR=30]="ERROR",t[t.WARN=50]="WARN",t[t.INFO=60]="INFO",t[t.DEBUG=70]="DEBUG",t[t.VERBOSE=80]="VERBOSE",t[t.ALL=9999]="ALL"})),H=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createLogLevelDiagLogger=void 0;var t=G();e.createLogLevelDiagLogger=function(e,n){function r(t,r){var i=n[t];return"function"==typeof i&&e>=r?i.bind(n):function(){}}return e<t.DiagLogLevel.NONE?e=t.DiagLogLevel.NONE:e>t.DiagLogLevel.ALL&&(e=t.DiagLogLevel.ALL),n=n||{},{error:r("error",t.DiagLogLevel.ERROR),warn:r("warn",t.DiagLogLevel.WARN),info:r("info",t.DiagLogLevel.INFO),debug:r("debug",t.DiagLogLevel.DEBUG),verbose:r("verbose",t.DiagLogLevel.VERBOSE)}}})),V=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiagAPI=void 0;var t=z(),n=H(),r=G(),i=U(),o=function(){function e(){function e(e){return function(){var t=i.getGlobal("diag");if(t)return t[e].apply(t,arguments)}}var o=this;o.setLogger=function(e,t){var s,a;if(void 0===t&&(t=r.DiagLogLevel.INFO),e===o){var c=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return o.error(null!==(s=c.stack)&&void 0!==s?s:c.message),!1}var l=i.getGlobal("diag"),u=n.createLogLevelDiagLogger(t,e);if(l){var d=null!==(a=(new Error).stack)&&void 0!==a?a:"<failed to generate stacktrace>";l.warn("Current logger will be overwritten from "+d),u.warn("Current logger will overwrite one already registered from "+d)}return i.registerGlobal("diag",u,o,!0)},o.disable=function(){i.unregisterGlobal("diag",o)},o.createComponentLogger=function(e){return new t.DiagComponentLogger(e)},o.verbose=e("verbose"),o.debug=e("debug"),o.info=e("info"),o.warn=e("warn"),o.error=e("error")}return e.instance=function(){return this._instance||(this._instance=new e),this._instance},e}();e.DiagAPI=o})),$=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaggageImpl=void 0;var t=function(){function e(e){this._entries=e?new Map(e):new Map}return e.prototype.getEntry=function(e){var t=this._entries.get(e);if(t)return Object.assign({},t)},e.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map((function(e){return[e[0],e[1]]}))},e.prototype.setEntry=function(t,n){var r=new e(this._entries);return r._entries.set(t,n),r},e.prototype.removeEntry=function(t){var n=new e(this._entries);return n._entries.delete(t),n},e.prototype.removeEntries=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];for(var r=new e(this._entries),i=0,o=t;i<o.length;i++){var s=o[i];r._entries.delete(s)}return r},e.prototype.clear=function(){return new e},e}();e.BaggageImpl=t})),W=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.baggageEntryMetadataSymbol=void 0,e.baggageEntryMetadataSymbol=Symbol("BaggageEntryMetadata")})),K=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.baggageEntryMetadataFromString=e.createBaggage=void 0;var t=V(),n=$(),r=W(),i=t.DiagAPI.instance();e.createBaggage=function(e){return void 0===e&&(e={}),new n.BaggageImpl(new Map(Object.entries(e)))},e.baggageEntryMetadataFromString=function(e){return"string"!=typeof e&&(i.error("Cannot create baggage metadata from unknown type: "+typeof e),e=""),{__TYPE__:r.baggageEntryMetadataSymbol,toString:function(){return e}}}})),Q=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),X=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Y=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiagConsoleLogger=void 0;var t=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}];e.DiagConsoleLogger=function(){function e(e){return function(){var t=arguments;if(console){var n=console[e];if("function"!=typeof n&&(n=console.log),"function"==typeof n)return n.apply(console,t)}}}for(var n=0;n<t.length;n++)this[t[n].n]=e(t[n].c)}})),J=S((e=>{"use strict";var t=e&&e.__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]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(Y(),e),n(G(),e)})),Z=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultTextMapSetter=e.defaultTextMapGetter=void 0,e.defaultTextMapGetter={get:function(e,t){if(null!=e)return e[t]},keys:function(e){return null==e?[]:Object.keys(e)}},e.defaultTextMapSetter={set:function(e,t,n){null!=e&&(e[t]=n)}}})),ee=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),te=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),ne=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ROOT_CONTEXT=e.createContextKey=void 0,e.createContextKey=function(e){return Symbol.for(e)};e.ROOT_CONTEXT=new function e(t){var n=this;n._currentContext=t?new Map(t):new Map,n.getValue=function(e){return n._currentContext.get(e)},n.setValue=function(t,r){var i=new e(n._currentContext);return i._currentContext.set(t,r),i},n.deleteValue=function(t){var r=new e(n._currentContext);return r._currentContext.delete(t),r}}})),re=S((e=>{"use strict";var t=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(e,"__esModule",{value:!0}),e.NoopContextManager=void 0;var n=ne(),r=function(){function e(){}return e.prototype.active=function(){return n.ROOT_CONTEXT},e.prototype.with=function(e,n,r){for(var i=[],o=3;o<arguments.length;o++)i[o-3]=arguments[o];return n.call.apply(n,t([r],i))},e.prototype.bind=function(e,t){return t},e.prototype.enable=function(){return this},e.prototype.disable=function(){return this},e}();e.NoopContextManager=r})),ie=S((e=>{"use strict";var t=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(e,"__esModule",{value:!0}),e.ContextAPI=void 0;var n=re(),r=U(),i=V(),o="context",s=new n.NoopContextManager,a=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalContextManager=function(e){return r.registerGlobal(o,e,i.DiagAPI.instance())},e.prototype.active=function(){return this._getContextManager().active()},e.prototype.with=function(e,n,r){for(var i,o=[],s=3;s<arguments.length;s++)o[s-3]=arguments[s];return(i=this._getContextManager()).with.apply(i,t([e,n,r],o))},e.prototype.bind=function(e,t){return this._getContextManager().bind(e,t)},e.prototype._getContextManager=function(){return r.getGlobal(o)||s},e.prototype.disable=function(){this._getContextManager().disable(),r.unregisterGlobal(o,i.DiagAPI.instance())},e}();e.ContextAPI=a})),oe=S((e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.TraceFlags=void 0,(t=e.TraceFlags||(e.TraceFlags={}))[t.NONE=0]="NONE",t[t.SAMPLED=1]="SAMPLED"})),se=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.INVALID_SPAN_CONTEXT=e.INVALID_TRACEID=e.INVALID_SPANID=void 0;var t=oe();e.INVALID_SPANID="0000000000000000",e.INVALID_TRACEID="00000000000000000000000000000000",e.INVALID_SPAN_CONTEXT={traceId:e.INVALID_TRACEID,spanId:e.INVALID_SPANID,traceFlags:t.TraceFlags.NONE}})),ae=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NonRecordingSpan=void 0;var t=se(),n=function(){function e(e){void 0===e&&(e=t.INVALID_SPAN_CONTEXT),this._spanContext=e}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(e,t){return this},e.prototype.setAttributes=function(e){return this},e.prototype.addEvent=function(e,t){return this},e.prototype.setStatus=function(e){return this},e.prototype.updateName=function(e){return this},e.prototype.end=function(e){},e.prototype.isRecording=function(){return!1},e.prototype.recordException=function(e,t){},e}();e.NonRecordingSpan=n})),ce=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSpanContext=e.setSpanContext=e.deleteSpan=e.setSpan=e.getSpan=void 0;var t=ne(),n=ae(),r=t.createContextKey("OpenTelemetry Context Key SPAN");function i(e){return e.getValue(r)||void 0}function o(e,t){return e.setValue(r,t)}e.getSpan=i,e.setSpan=o,e.deleteSpan=function(e){return e.deleteValue(r)},e.setSpanContext=function(e,t){return o(e,new n.NonRecordingSpan(t))},e.getSpanContext=function(e){var t;return null===(t=i(e))||void 0===t?void 0:t.spanContext()}})),le=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.wrapSpanContext=e.isSpanContextValid=e.isValidSpanId=e.isValidTraceId=void 0;var t=se(),n=ae(),r=/^([0-9a-f]{32})$/i,i=/^[0-9a-f]{16}$/i;function o(e){return r.test(e)&&e!==t.INVALID_TRACEID}function s(e){return i.test(e)&&e!==t.INVALID_SPANID}e.isValidTraceId=o,e.isValidSpanId=s,e.isSpanContextValid=function(e){return o(e.traceId)&&s(e.spanId)},e.wrapSpanContext=function(e){return new n.NonRecordingSpan(e)}})),ue=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NoopTracer=void 0;var t=ie(),n=ce(),r=ae(),i=le(),o=t.ContextAPI.getInstance(),s=function(){function e(){}return e.prototype.startSpan=function(e,t,o){if(Boolean(null==t?void 0:t.root))return new r.NonRecordingSpan;var s=o&&n.getSpanContext(o);return function(e){return"object"==typeof e&&"string"==typeof e.spanId&&"string"==typeof e.traceId&&"number"==typeof e.traceFlags}(s)&&i.isSpanContextValid(s)?new r.NonRecordingSpan(s):new r.NonRecordingSpan},e.prototype.startActiveSpan=function(e,t,r,i){var s,a,c;if(!(arguments.length<2)){2===arguments.length?c=t:3===arguments.length?(s=t,c=r):(s=t,a=r,c=i);var l=a??o.active(),u=this.startSpan(e,s,l),d=n.setSpan(l,u);return o.with(d,c,void 0,u)}},e}();e.NoopTracer=s})),de=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProxyTracer=void 0;var t=new(ue().NoopTracer),n=function(){function e(e,t,n){this._provider=e,this.name=t,this.version=n}return e.prototype.startSpan=function(e,t,n){return this._getTracer().startSpan(e,t,n)},e.prototype.startActiveSpan=function(e,t,n,r){var i=this._getTracer();return Reflect.apply(i.startActiveSpan,i,arguments)},e.prototype._getTracer=function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateTracer(this.name,this.version);return e?(this._delegate=e,this._delegate):t},e}();e.ProxyTracer=n})),pe=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NoopTracerProvider=void 0;var t=ue(),n=function(){function e(){}return e.prototype.getTracer=function(e,n){return new t.NoopTracer},e}();e.NoopTracerProvider=n})),he=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProxyTracerProvider=void 0;var t=de(),n=new(pe().NoopTracerProvider),r=function(){function e(){}return e.prototype.getTracer=function(e,n){var r;return null!==(r=this.getDelegateTracer(e,n))&&void 0!==r?r:new t.ProxyTracer(this,e,n)},e.prototype.getDelegate=function(){var e;return null!==(e=this._delegate)&&void 0!==e?e:n},e.prototype.setDelegate=function(e){this._delegate=e},e.prototype.getDelegateTracer=function(e,t){var n;return null===(n=this._delegate)||void 0===n?void 0:n.getTracer(e,t)},e}();e.ProxyTracerProvider=r})),fe=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),me=S((e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.SamplingDecision=void 0,(t=e.SamplingDecision||(e.SamplingDecision={}))[t.NOT_RECORD=0]="NOT_RECORD",t[t.RECORD=1]="RECORD",t[t.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})),ge=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),ye=S((e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.SpanKind=void 0,(t=e.SpanKind||(e.SpanKind={}))[t.INTERNAL=0]="INTERNAL",t[t.SERVER=1]="SERVER",t[t.CLIENT=2]="CLIENT",t[t.PRODUCER=3]="PRODUCER",t[t.CONSUMER=4]="CONSUMER"})),be=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),ve=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Se=S((e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.SpanStatusCode=void 0,(t=e.SpanStatusCode||(e.SpanStatusCode={}))[t.UNSET=0]="UNSET",t[t.OK=1]="OK",t[t.ERROR=2]="ERROR"})),we=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Ce=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Te=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Ee=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),_e=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TraceAPI=void 0;var t=U(),n=he(),r=le(),i=ce(),o=V(),s="trace",a=function(){function e(){this._proxyTracerProvider=new n.ProxyTracerProvider,this.wrapSpanContext=r.wrapSpanContext,this.isSpanContextValid=r.isSpanContextValid,this.deleteSpan=i.deleteSpan,this.getSpan=i.getSpan,this.getSpanContext=i.getSpanContext,this.setSpan=i.setSpan,this.setSpanContext=i.setSpanContext}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalTracerProvider=function(e){var n=t.registerGlobal(s,this._proxyTracerProvider,o.DiagAPI.instance());return n&&this._proxyTracerProvider.setDelegate(e),n},e.prototype.getTracerProvider=function(){return t.getGlobal(s)||this._proxyTracerProvider},e.prototype.getTracer=function(e,t){return this.getTracerProvider().getTracer(e,t)},e.prototype.disable=function(){t.unregisterGlobal(s,o.DiagAPI.instance()),this._proxyTracerProvider=new n.ProxyTracerProvider},e}();e.TraceAPI=a})),xe=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NoopTextMapPropagator=void 0;var t=function(){function e(){}return e.prototype.inject=function(e,t){},e.prototype.extract=function(e,t){return e},e.prototype.fields=function(){return[]},e}();e.NoopTextMapPropagator=t})),Re=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.deleteBaggage=e.setBaggage=e.getBaggage=void 0;var t=ne().createContextKey("OpenTelemetry Baggage Key");e.getBaggage=function(e){return e.getValue(t)||void 0},e.setBaggage=function(e,n){return e.setValue(t,n)},e.deleteBaggage=function(e){return e.deleteValue(t)}})),Ie=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PropagationAPI=void 0;var t=U(),n=xe(),r=Z(),i=Re(),o=K(),s=V(),a="propagation",c=new n.NoopTextMapPropagator,l=function(){function e(){this.createBaggage=o.createBaggage,this.getBaggage=i.getBaggage,this.setBaggage=i.setBaggage,this.deleteBaggage=i.deleteBaggage}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalPropagator=function(e){return t.registerGlobal(a,e,s.DiagAPI.instance())},e.prototype.inject=function(e,t,n){return void 0===n&&(n=r.defaultTextMapSetter),this._getGlobalPropagator().inject(e,t,n)},e.prototype.extract=function(e,t,n){return void 0===n&&(n=r.defaultTextMapGetter),this._getGlobalPropagator().extract(e,t,n)},e.prototype.fields=function(){return this._getGlobalPropagator().fields()},e.prototype.disable=function(){t.unregisterGlobal(a,s.DiagAPI.instance())},e.prototype._getGlobalPropagator=function(){return t.getGlobal(a)||c},e}();e.PropagationAPI=l})),Pe=S((e=>{"use strict";var t=e&&e.__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]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.diag=e.propagation=e.trace=e.context=e.INVALID_SPAN_CONTEXT=e.INVALID_TRACEID=e.INVALID_SPANID=e.isValidSpanId=e.isValidTraceId=e.isSpanContextValid=e.baggageEntryMetadataFromString=void 0,n(L(),e);var r=K();Object.defineProperty(e,"baggageEntryMetadataFromString",{enumerable:!0,get:function(){return r.baggageEntryMetadataFromString}}),n(Q(),e),n(X(),e),n(J(),e),n(Z(),e),n(ee(),e),n(te(),e),n(de(),e),n(he(),e),n(fe(),e),n(me(),e),n(ge(),e),n(ye(),e),n(be(),e),n(ve(),e),n(Se(),e),n(oe(),e),n(we(),e),n(Ce(),e),n(Te(),e);var i=le();Object.defineProperty(e,"isSpanContextValid",{enumerable:!0,get:function(){return i.isSpanContextValid}}),Object.defineProperty(e,"isValidTraceId",{enumerable:!0,get:function(){return i.isValidTraceId}}),Object.defineProperty(e,"isValidSpanId",{enumerable:!0,get:function(){return i.isValidSpanId}});var o=se();Object.defineProperty(e,"INVALID_SPANID",{enumerable:!0,get:function(){return o.INVALID_SPANID}}),Object.defineProperty(e,"INVALID_TRACEID",{enumerable:!0,get:function(){return o.INVALID_TRACEID}}),Object.defineProperty(e,"INVALID_SPAN_CONTEXT",{enumerable:!0,get:function(){return o.INVALID_SPAN_CONTEXT}}),n(ne(),e),n(Ee(),e);var s=ie();e.context=s.ContextAPI.getInstance();var a=_e();e.trace=a.TraceAPI.getInstance();var c=Ie();e.propagation=c.PropagationAPI.getInstance();var l=V();e.diag=l.DiagAPI.instance(),e.default={trace:e.trace,context:e.context,propagation:e.propagation,diag:e.diag}})),Oe=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isTracingSuppressed=e.unsuppressTracing=e.suppressTracing=void 0;var t=Pe().createContextKey("OpenTelemetry SDK Context Key SUPPRESS_TRACING");e.suppressTracing=function(e){return e.setValue(t,!0)},e.unsuppressTracing=function(e){return e.deleteValue(t)},e.isTracingSuppressed=function(e){return!0===e.getValue(t)}})),De=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BAGGAGE_MAX_TOTAL_LENGTH=e.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=e.BAGGAGE_MAX_NAME_VALUE_PAIRS=e.BAGGAGE_HEADER=e.BAGGAGE_ITEMS_SEPARATOR=e.BAGGAGE_PROPERTIES_SEPARATOR=e.BAGGAGE_KEY_PAIR_SEPARATOR=void 0,e.BAGGAGE_KEY_PAIR_SEPARATOR="=",e.BAGGAGE_PROPERTIES_SEPARATOR=";",e.BAGGAGE_ITEMS_SEPARATOR=",",e.BAGGAGE_HEADER="baggage",e.BAGGAGE_MAX_NAME_VALUE_PAIRS=180,e.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS=4096,e.BAGGAGE_MAX_TOTAL_LENGTH=8192})),Ae=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseKeyPairsIntoRecord=e.parsePairKeyValue=e.getKeyPairs=e.serializeKeyPairs=void 0;var t=Pe(),n=De();e.serializeKeyPairs=e=>e.reduce(((e,t)=>{let r=`${e}${""!==e?n.BAGGAGE_ITEMS_SEPARATOR:""}${t}`;return r.length>n.BAGGAGE_MAX_TOTAL_LENGTH?e:r}),""),e.getKeyPairs=e=>e.getAllEntries().map((([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(t.value)}`)),e.parsePairKeyValue=e=>{let r=e.split(n.BAGGAGE_PROPERTIES_SEPARATOR);if(r.length<=0)return;let i=r.shift();if(!i)return;let o=i.split(n.BAGGAGE_KEY_PAIR_SEPARATOR);if(2!==o.length)return;let s,a=decodeURIComponent(o[0].trim()),c=decodeURIComponent(o[1].trim());return r.length>0&&(s=t.baggageEntryMetadataFromString(r.join(n.BAGGAGE_PROPERTIES_SEPARATOR))),{key:a,value:c,metadata:s}},e.parseKeyPairsIntoRecord=t=>"string"!=typeof t||0===t.length?{}:t.split(n.BAGGAGE_ITEMS_SEPARATOR).map((t=>e.parsePairKeyValue(t))).filter((e=>void 0!==e&&e.value.length>0)).reduce(((e,t)=>(e[t.key]=t.value,e)),{})})),ke=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HttpBaggagePropagator=void 0;var t=Pe(),n=Oe(),r=De(),i=Ae();e.HttpBaggagePropagator=class{inject(e,o,s){let a=t.propagation.getBaggage(e);if(!a||n.isTracingSuppressed(e))return;let c=i.getKeyPairs(a).filter((e=>e.length<=r.BAGGAGE_MAX_PER_NAME_VALUE_PAIRS)).slice(0,r.BAGGAGE_MAX_NAME_VALUE_PAIRS),l=i.serializeKeyPairs(c);l.length>0&&s.set(o,r.BAGGAGE_HEADER,l)}extract(e,n,o){let s=o.get(n,r.BAGGAGE_HEADER);if(!s)return e;let a={};return 0===s.length||(s.split(r.BAGGAGE_ITEMS_SEPARATOR).forEach((e=>{let t=i.parsePairKeyValue(e);if(t){let e={value:t.value};t.metadata&&(e.metadata=t.metadata),a[t.key]=e}})),0===Object.entries(a).length)?e:t.propagation.setBaggage(e,t.propagation.createBaggage(a))}fields(){return[r.BAGGAGE_HEADER]}}})),Ne=S((e=>{"use strict";function t(e){return null==e||(Array.isArray(e)?function(e){let t;for(let r of e)if(null!=r){if(!t){if(n(r)){t=typeof r;continue}return!1}if(typeof r!==t)return!1}return!0}(e):n(e))}function n(e){switch(typeof e){case"number":case"boolean":case"string":return!0}return!1}Object.defineProperty(e,"__esModule",{value:!0}),e.isAttributeValue=e.sanitizeAttributes=void 0,e.sanitizeAttributes=function(e){let n={};if(null==e||"object"!=typeof e)return n;for(let[r,i]of Object.entries(e))t(i)&&(Array.isArray(i)?n[r]=i.slice():n[r]=i);return n},e.isAttributeValue=t})),Le=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.loggingErrorHandler=void 0;var t=Pe();e.loggingErrorHandler=function(){return e=>{t.diag.error(function(e){return"string"==typeof e?e:JSON.stringify(function(e){let t={},n=e;for(;null!==n;)Object.getOwnPropertyNames(n).forEach((e=>{if(t[e])return;let r=n[e];r&&(t[e]=String(r))})),n=Object.getPrototypeOf(n);return t}(e))}(e))}}})),je=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.globalErrorHandler=e.setGlobalErrorHandler=void 0;var t=Le().loggingErrorHandler();e.setGlobalErrorHandler=function(e){t=e},e.globalErrorHandler=e=>{try{t(e)}catch{}}})),Me=S((e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.TracesSamplerValues=void 0,(t=e.TracesSamplerValues||(e.TracesSamplerValues={})).AlwaysOff="always_off",t.AlwaysOn="always_on",t.ParentBasedAlwaysOff="parentbased_always_off",t.ParentBasedAlwaysOn="parentbased_always_on",t.ParentBasedTraceIdRatio="parentbased_traceidratio",t.TraceIdRatio="traceidratio"})),Fe=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.parseEnvironment=e.DEFAULT_ENVIRONMENT=void 0;var t=Pe(),n=Me(),r=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT"];function i(e){return r.indexOf(e)>-1}var o=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function s(e){return o.indexOf(e)>-1}function a(e,t,n,r=-1/0,i=1/0){if(typeof n[e]<"u"){let o=Number(n[e]);isNaN(o)||(t[e]=o<r?r:o>i?i:o)}}function c(e,t,n,r=","){let i=n[e];"string"==typeof i&&(t[e]=i.split(r).map((e=>e.trim())))}e.DEFAULT_ENVIRONMENT={CONTAINER_NAME:"",ECS_CONTAINER_METADATA_URI_V4:"",ECS_CONTAINER_METADATA_URI:"",HOSTNAME:"",KUBERNETES_SERVICE_HOST:"",NAMESPACE:"",OTEL_BSP_EXPORT_TIMEOUT:3e4,OTEL_BSP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BSP_MAX_QUEUE_SIZE:2048,OTEL_BSP_SCHEDULE_DELAY:5e3,OTEL_EXPORTER_JAEGER_AGENT_HOST:"",OTEL_EXPORTER_JAEGER_ENDPOINT:"",OTEL_EXPORTER_JAEGER_PASSWORD:"",OTEL_EXPORTER_JAEGER_USER:"",OTEL_EXPORTER_OTLP_ENDPOINT:"",OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:"",OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:"",OTEL_EXPORTER_OTLP_HEADERS:"",OTEL_EXPORTER_OTLP_TRACES_HEADERS:"",OTEL_EXPORTER_OTLP_METRICS_HEADERS:"",OTEL_EXPORTER_ZIPKIN_ENDPOINT:"http://localhost:9411/api/v2/spans",OTEL_LOG_LEVEL:t.DiagLogLevel.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:128,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_TRACES_EXPORTER:"none",OTEL_TRACES_SAMPLER:n.TracesSamplerValues.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:""};var l={ALL:t.DiagLogLevel.ALL,VERBOSE:t.DiagLogLevel.VERBOSE,DEBUG:t.DiagLogLevel.DEBUG,INFO:t.DiagLogLevel.INFO,WARN:t.DiagLogLevel.WARN,ERROR:t.DiagLogLevel.ERROR,NONE:t.DiagLogLevel.NONE};function u(e,t,n){let r=n[e];if("string"==typeof r){let n=l[r.toUpperCase()];null!=n&&(t[e]=n)}}e.parseEnvironment=function(t){let n={};for(let r in e.DEFAULT_ENVIRONMENT){let e=r;if("OTEL_LOG_LEVEL"===e)u(e,n,t);else if(i(e))a(e,n,t);else if(s(e))c(e,n,t);else{let r=t[e];typeof r<"u"&&null!==r&&(n[e]=String(r))}}return n}})),qe=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getEnv=void 0;var t=n(857),r=Fe();e.getEnv=function(){let e=r.parseEnvironment(process.env);return Object.assign({HOSTNAME:t.hostname()},r.DEFAULT_ENVIRONMENT,e)}})),Be=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hexToBase64=void 0,e.hexToBase64=function(e){let t=e.length,n="";for(let r=0;r<t;r+=2){let t=e.substring(r,r+2),i=parseInt(t,16);n+=String.fromCharCode(i)}return Buffer.from(n,"ascii").toString("base64")}})),Ue=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.RandomIdGenerator=void 0,e.RandomIdGenerator=class{constructor(){this.generateTraceId=n(16),this.generateSpanId=n(8)}};var t=Buffer.allocUnsafe(16);function n(e){return function(){for(let n=0;n<e/4;n++)t.writeUInt32BE(Math.random()*2**32>>>0,4*n);for(let n=0;n<e&&!(t[n]>0);n++)n===e-1&&(t[e-1]=1);return t.toString("hex",0,e)}}})),ze=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.otperformance=void 0;var t=n(2987);e.otperformance=t.performance})),Ge=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VERSION=void 0,e.VERSION="0.23.0"})),He=S((e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.RpcGrpcStatusCodeValues=e.MessagingOperationValues=e.MessagingDestinationKindValues=e.HttpFlavorValues=e.NetTransportValues=e.FaasInvokedProviderValues=e.FaasDocumentOperationValues=e.FaasTriggerValues=e.DbCassandraConsistencyLevelValues=e.DbSystemValues=e.SemanticAttributes=void 0,e.SemanticAttributes={DB_SYSTEM:"db.system",DB_CONNECTION_STRING:"db.connection_string",DB_USER:"db.user",DB_JDBC_DRIVER_CLASSNAME:"db.jdbc.driver_classname",DB_NAME:"db.name",DB_STATEMENT:"db.statement",DB_OPERATION:"db.operation",DB_MSSQL_INSTANCE_NAME:"db.mssql.instance_name",DB_CASSANDRA_KEYSPACE:"db.cassandra.keyspace",DB_CASSANDRA_PAGE_SIZE:"db.cassandra.page_size",DB_CASSANDRA_CONSISTENCY_LEVEL:"db.cassandra.consistency_level",DB_CASSANDRA_TABLE:"db.cassandra.table",DB_CASSANDRA_IDEMPOTENCE:"db.cassandra.idempotence",DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:"db.cassandra.speculative_execution_count",DB_CASSANDRA_COORDINATOR_ID:"db.cassandra.coordinator.id",DB_CASSANDRA_COORDINATOR_DC:"db.cassandra.coordinator.dc",DB_HBASE_NAMESPACE:"db.hbase.namespace",DB_REDIS_DATABASE_INDEX:"db.redis.database_index",DB_MONGODB_COLLECTION:"db.mongodb.collection",DB_SQL_TABLE:"db.sql.table",EXCEPTION_TYPE:"exception.type",EXCEPTION_MESSAGE:"exception.message",EXCEPTION_STACKTRACE:"exception.stacktrace",EXCEPTION_ESCAPED:"exception.escaped",FAAS_TRIGGER:"faas.trigger",FAAS_EXECUTION:"faas.execution",FAAS_DOCUMENT_COLLECTION:"faas.document.collection",FAAS_DOCUMENT_OPERATION:"faas.document.operation",FAAS_DOCUMENT_TIME:"faas.document.time",FAAS_DOCUMENT_NAME:"faas.document.name",FAAS_TIME:"faas.time",FAAS_CRON:"faas.cron",FAAS_COLDSTART:"faas.coldstart",FAAS_INVOKED_NAME:"faas.invoked_name",FAAS_INVOKED_PROVIDER:"faas.invoked_provider",FAAS_INVOKED_REGION:"faas.invoked_region",NET_TRANSPORT:"net.transport",NET_PEER_IP:"net.peer.ip",NET_PEER_PORT:"net.peer.port",NET_PEER_NAME:"net.peer.name",NET_HOST_IP:"net.host.ip",NET_HOST_PORT:"net.host.port",NET_HOST_NAME:"net.host.name",PEER_SERVICE:"peer.service",ENDUSER_ID:"enduser.id",ENDUSER_ROLE:"enduser.role",ENDUSER_SCOPE:"enduser.scope",THREAD_ID:"thread.id",THREAD_NAME:"thread.name",CODE_FUNCTION:"code.function",CODE_NAMESPACE:"code.namespace",CODE_FILEPATH:"code.filepath",CODE_LINENO:"code.lineno",HTTP_METHOD:"http.method",HTTP_URL:"http.url",HTTP_TARGET:"http.target",HTTP_HOST:"http.host",HTTP_SCHEME:"http.scheme",HTTP_STATUS_CODE:"http.status_code",HTTP_FLAVOR:"http.flavor",HTTP_USER_AGENT:"http.user_agent",HTTP_REQUEST_CONTENT_LENGTH:"http.request_content_length",HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:"http.request_content_length_uncompressed",HTTP_RESPONSE_CONTENT_LENGTH:"http.response_content_length",HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:"http.response_content_length_uncompressed",HTTP_SERVER_NAME:"http.server_name",HTTP_ROUTE:"http.route",HTTP_CLIENT_IP:"http.client_ip",AWS_DYNAMODB_TABLE_NAMES:"aws.dynamodb.table_names",AWS_DYNAMODB_CONSUMED_CAPACITY:"aws.dynamodb.consumed_capacity",AWS_DYNAMODB_ITEM_COLLECTION_METRICS:"aws.dynamodb.item_collection_metrics",AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:"aws.dynamodb.provisioned_read_capacity",AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:"aws.dynamodb.provisioned_write_capacity",AWS_DYNAMODB_CONSISTENT_READ:"aws.dynamodb.consistent_read",AWS_DYNAMODB_PROJECTION:"aws.dynamodb.projection",AWS_DYNAMODB_LIMIT:"aws.dynamodb.limit",AWS_DYNAMODB_ATTRIBUTES_TO_GET:"aws.dynamodb.attributes_to_get",AWS_DYNAMODB_INDEX_NAME:"aws.dynamodb.index_name",AWS_DYNAMODB_SELECT:"aws.dynamodb.select",AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:"aws.dynamodb.global_secondary_indexes",AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:"aws.dynamodb.local_secondary_indexes",AWS_DYNAMODB_EXCLUSIVE_START_TABLE:"aws.dynamodb.exclusive_start_table",AWS_DYNAMODB_TABLE_COUNT:"aws.dynamodb.table_count",AWS_DYNAMODB_SCAN_FORWARD:"aws.dynamodb.scan_forward",AWS_DYNAMODB_SEGMENT:"aws.dynamodb.segment",AWS_DYNAMODB_TOTAL_SEGMENTS:"aws.dynamodb.total_segments",AWS_DYNAMODB_COUNT:"aws.dynamodb.count",AWS_DYNAMODB_SCANNED_COUNT:"aws.dynamodb.scanned_count",AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:"aws.dynamodb.attribute_definitions",AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:"aws.dynamodb.global_secondary_index_updates",MESSAGING_SYSTEM:"messaging.system",MESSAGING_DESTINATION:"messaging.destination",MESSAGING_DESTINATION_KIND:"messaging.destination_kind",MESSAGING_TEMP_DESTINATION:"messaging.temp_destination",MESSAGING_PROTOCOL:"messaging.protocol",MESSAGING_PROTOCOL_VERSION:"messaging.protocol_version",MESSAGING_URL:"messaging.url",MESSAGING_MESSAGE_ID:"messaging.message_id",MESSAGING_CONVERSATION_ID:"messaging.conversation_id",MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:"messaging.message_payload_size_bytes",MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:"messaging.message_payload_compressed_size_bytes",MESSAGING_OPERATION:"messaging.operation",MESSAGING_RABBITMQ_ROUTING_KEY:"messaging.rabbitmq.routing_key",MESSAGING_KAFKA_MESSAGE_KEY:"messaging.kafka.message_key",MESSAGING_KAFKA_CONSUMER_GROUP:"messaging.kafka.consumer_group",MESSAGING_KAFKA_CLIENT_ID:"messaging.kafka.client_id",MESSAGING_KAFKA_PARTITION:"messaging.kafka.partition",MESSAGING_KAFKA_TOMBSTONE:"messaging.kafka.tombstone",RPC_SYSTEM:"rpc.system",RPC_SERVICE:"rpc.service",RPC_METHOD:"rpc.method",RPC_GRPC_STATUS_CODE:"rpc.grpc.status_code",RPC_JSONRPC_VERSION:"rpc.jsonrpc.version",RPC_JSONRPC_METHOD:"rpc.jsonrpc.method",RPC_JSONRPC_REQUEST_ID:"rpc.jsonrpc.request_id",RPC_JSONRPC_ERROR_CODE:"rpc.jsonrpc.error_code",RPC_JSONRPC_ERROR_MESSAGE:"rpc.jsonrpc.error_message"},(t=e.DbSystemValues||(e.DbSystemValues={})).OTHER_SQL="other_sql",t.MSSQL="mssql",t.MYSQL="mysql",t.ORACLE="oracle",t.DB2="db2",t.POSTGRESQL="postgresql",t.REDSHIFT="redshift",t.HIVE="hive",t.CLOUDSCAPE="cloudscape",t.HSQLDB="hsqldb",t.PROGRESS="progress",t.MAXDB="maxdb",t.HANADB="hanadb",t.INGRES="ingres",t.FIRSTSQL="firstsql",t.EDB="edb",t.CACHE="cache",t.ADABAS="adabas",t.FIREBIRD="firebird",t.DERBY="derby",t.FILEMAKER="filemaker",t.INFORMIX="informix",t.INSTANTDB="instantdb",t.INTERBASE="interbase",t.MARIADB="mariadb",t.NETEZZA="netezza",t.PERVASIVE="pervasive",t.POINTBASE="pointbase",t.SQLITE="sqlite",t.SYBASE="sybase",t.TERADATA="teradata",t.VERTICA="vertica",t.H2="h2",t.COLDFUSION="coldfusion",t.CASSANDRA="cassandra",t.HBASE="hbase",t.MONGODB="mongodb",t.REDIS="redis",t.COUCHBASE="couchbase",t.COUCHDB="couchdb",t.COSMOSDB="cosmosdb",t.DYNAMODB="dynamodb",t.NEO4J="neo4j",t.GEODE="geode",t.ELASTICSEARCH="elasticsearch",t.MEMCACHED="memcached",t.COCKROACHDB="cockroachdb",function(e){e.ALL="all",e.EACH_QUORUM="each_quorum",e.QUORUM="quorum",e.LOCAL_QUORUM="local_quorum",e.ONE="one",e.TWO="two",e.THREE="three",e.LOCAL_ONE="local_one",e.ANY="any",e.SERIAL="serial",e.LOCAL_SERIAL="local_serial"}(e.DbCassandraConsistencyLevelValues||(e.DbCassandraConsistencyLevelValues={})),function(e){e.DATASOURCE="datasource",e.HTTP="http",e.PUBSUB="pubsub",e.TIMER="timer",e.OTHER="other"}(e.FaasTriggerValues||(e.FaasTriggerValues={})),function(e){e.INSERT="insert",e.EDIT="edit",e.DELETE="delete"}(e.FaasDocumentOperationValues||(e.FaasDocumentOperationValues={})),function(e){e.AWS="aws",e.AZURE="azure",e.GCP="gcp"}(e.FaasInvokedProviderValues||(e.FaasInvokedProviderValues={})),function(e){e.IP_TCP="ip_tcp",e.IP_UDP="ip_udp",e.IP="ip",e.UNIX="unix",e.PIPE="pipe",e.INPROC="inproc",e.OTHER="other"}(e.NetTransportValues||(e.NetTransportValues={})),function(e){e.HTTP_1_0="1.0",e.HTTP_1_1="1.1",e.HTTP_2_0="2.0",e.SPDY="SPDY",e.QUIC="QUIC"}(e.HttpFlavorValues||(e.HttpFlavorValues={})),function(e){e.QUEUE="queue",e.TOPIC="topic"}(e.MessagingDestinationKindValues||(e.MessagingDestinationKindValues={})),function(e){e.RECEIVE="receive",e.PROCESS="process"}(e.MessagingOperationValues||(e.MessagingOperationValues={})),function(e){e[e.OK=0]="OK",e[e.CANCELLED=1]="CANCELLED",e[e.UNKNOWN=2]="UNKNOWN",e[e.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",e[e.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",e[e.NOT_FOUND=5]="NOT_FOUND",e[e.ALREADY_EXISTS=6]="ALREADY_EXISTS",e[e.PERMISSION_DENIED=7]="PERMISSION_DENIED",e[e.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",e[e.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",e[e.ABORTED=10]="ABORTED",e[e.OUT_OF_RANGE=11]="OUT_OF_RANGE",e[e.UNIMPLEMENTED=12]="UNIMPLEMENTED",e[e.INTERNAL=13]="INTERNAL",e[e.UNAVAILABLE=14]="UNAVAILABLE",e[e.DATA_LOSS=15]="DATA_LOSS",e[e.UNAUTHENTICATED=16]="UNAUTHENTICATED"}(e.RpcGrpcStatusCodeValues||(e.RpcGrpcStatusCodeValues={}))})),Ve=S((e=>{"use strict";var t=e&&e.__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]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(He(),e)})),$e=S((e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.TelemetrySdkLanguageValues=e.OsTypeValues=e.HostArchValues=e.AwsEcsLaunchtypeValues=e.CloudPlatformValues=e.CloudProviderValues=e.ResourceAttributes=void 0,e.ResourceAttributes={CLOUD_PROVIDER:"cloud.provider",CLOUD_ACCOUNT_ID:"cloud.account.id",CLOUD_REGION:"cloud.region",CLOUD_AVAILABILITY_ZONE:"cloud.availability_zone",CLOUD_PLATFORM:"cloud.platform",AWS_ECS_CONTAINER_ARN:"aws.ecs.container.arn",AWS_ECS_CLUSTER_ARN:"aws.ecs.cluster.arn",AWS_ECS_LAUNCHTYPE:"aws.ecs.launchtype",AWS_ECS_TASK_ARN:"aws.ecs.task.arn",AWS_ECS_TASK_FAMILY:"aws.ecs.task.family",AWS_ECS_TASK_REVISION:"aws.ecs.task.revision",AWS_EKS_CLUSTER_ARN:"aws.eks.cluster.arn",AWS_LOG_GROUP_NAMES:"aws.log.group.names",AWS_LOG_GROUP_ARNS:"aws.log.group.arns",AWS_LOG_STREAM_NAMES:"aws.log.stream.names",AWS_LOG_STREAM_ARNS:"aws.log.stream.arns",CONTAINER_NAME:"container.name",CONTAINER_ID:"container.id",CONTAINER_RUNTIME:"container.runtime",CONTAINER_IMAGE_NAME:"container.image.name",CONTAINER_IMAGE_TAG:"container.image.tag",DEPLOYMENT_ENVIRONMENT:"deployment.environment",DEVICE_ID:"device.id",DEVICE_MODEL_IDENTIFIER:"device.model.identifier",DEVICE_MODEL_NAME:"device.model.name",FAAS_NAME:"faas.name",FAAS_ID:"faas.id",FAAS_VERSION:"faas.version",FAAS_INSTANCE:"faas.instance",FAAS_MAX_MEMORY:"faas.max_memory",HOST_ID:"host.id",HOST_NAME:"host.name",HOST_TYPE:"host.type",HOST_ARCH:"host.arch",HOST_IMAGE_NAME:"host.image.name",HOST_IMAGE_ID:"host.image.id",HOST_IMAGE_VERSION:"host.image.version",K8S_CLUSTER_NAME:"k8s.cluster.name",K8S_NODE_NAME:"k8s.node.name",K8S_NODE_UID:"k8s.node.uid",K8S_NAMESPACE_NAME:"k8s.namespace.name",K8S_POD_UID:"k8s.pod.uid",K8S_POD_NAME:"k8s.pod.name",K8S_CONTAINER_NAME:"k8s.container.name",K8S_REPLICASET_UID:"k8s.replicaset.uid",K8S_REPLICASET_NAME:"k8s.replicaset.name",K8S_DEPLOYMENT_UID:"k8s.deployment.uid",K8S_DEPLOYMENT_NAME:"k8s.deployment.name",K8S_STATEFULSET_UID:"k8s.statefulset.uid",K8S_STATEFULSET_NAME:"k8s.statefulset.name",K8S_DAEMONSET_UID:"k8s.daemonset.uid",K8S_DAEMONSET_NAME:"k8s.daemonset.name",K8S_JOB_UID:"k8s.job.uid",K8S_JOB_NAME:"k8s.job.name",K8S_CRONJOB_UID:"k8s.cronjob.uid",K8S_CRONJOB_NAME:"k8s.cronjob.name",OS_TYPE:"os.type",OS_DESCRIPTION:"os.description",OS_NAME:"os.name",OS_VERSION:"os.version",PROCESS_PID:"process.pid",PROCESS_EXECUTABLE_NAME:"process.executable.name",PROCESS_EXECUTABLE_PATH:"process.executable.path",PROCESS_COMMAND:"process.command",PROCESS_COMMAND_LINE:"process.command_line",PROCESS_COMMAND_ARGS:"process.command_args",PROCESS_OWNER:"process.owner",PROCESS_RUNTIME_NAME:"process.runtime.name",PROCESS_RUNTIME_VERSION:"process.runtime.version",PROCESS_RUNTIME_DESCRIPTION:"process.runtime.description",SERVICE_NAME:"service.name",SERVICE_NAMESPACE:"service.namespace",SERVICE_INSTANCE_ID:"service.instance.id",SERVICE_VERSION:"service.version",TELEMETRY_SDK_NAME:"telemetry.sdk.name",TELEMETRY_SDK_LANGUAGE:"telemetry.sdk.language",TELEMETRY_SDK_VERSION:"telemetry.sdk.version",TELEMETRY_AUTO_VERSION:"telemetry.auto.version",WEBENGINE_NAME:"webengine.name",WEBENGINE_VERSION:"webengine.version",WEBENGINE_DESCRIPTION:"webengine.description"},(t=e.CloudProviderValues||(e.CloudProviderValues={})).AWS="aws",t.AZURE="azure",t.GCP="gcp",function(e){e.AWS_EC2="aws_ec2",e.AWS_ECS="aws_ecs",e.AWS_EKS="aws_eks",e.AWS_LAMBDA="aws_lambda",e.AWS_ELASTIC_BEANSTALK="aws_elastic_beanstalk",e.AZURE_VM="azure_vm",e.AZURE_CONTAINER_INSTANCES="azure_container_instances",e.AZURE_AKS="azure_aks",e.AZURE_FUNCTIONS="azure_functions",e.AZURE_APP_SERVICE="azure_app_service",e.GCP_COMPUTE_ENGINE="gcp_compute_engine",e.GCP_CLOUD_RUN="gcp_cloud_run",e.GCP_KUBERNETES_ENGINE="gcp_kubernetes_engine",e.GCP_CLOUD_FUNCTIONS="gcp_cloud_functions",e.GCP_APP_ENGINE="gcp_app_engine"}(e.CloudPlatformValues||(e.CloudPlatformValues={})),function(e){e.EC2="ec2",e.FARGATE="fargate"}(e.AwsEcsLaunchtypeValues||(e.AwsEcsLaunchtypeValues={})),function(e){e.AMD64="amd64",e.ARM32="arm32",e.ARM64="arm64",e.IA64="ia64",e.PPC32="ppc32",e.PPC64="ppc64",e.X86="x86"}(e.HostArchValues||(e.HostArchValues={})),function(e){e.WINDOWS="windows",e.LINUX="linux",e.DARWIN="darwin",e.FREEBSD="freebsd",e.NETBSD="netbsd",e.OPENBSD="openbsd",e.DRAGONFLYBSD="dragonflybsd",e.HPUX="hpux",e.AIX="aix",e.SOLARIS="solaris",e.Z_OS="z_os"}(e.OsTypeValues||(e.OsTypeValues={})),function(e){e.CPP="cpp",e.DOTNET="dotnet",e.ERLANG="erlang",e.GO="go",e.JAVA="java",e.NODEJS="nodejs",e.PHP="php",e.PYTHON="python",e.RUBY="ruby",e.WEBJS="webjs"}(e.TelemetrySdkLanguageValues||(e.TelemetrySdkLanguageValues={}))})),We=S((e=>{"use strict";var t=e&&e.__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]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n($e(),e)})),Ke=S((e=>{"use strict";var t=e&&e.__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]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ve(),e),n(We(),e)})),Qe=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SDK_INFO=void 0;var t=Ge(),n=Ke();e.SDK_INFO={[n.ResourceAttributes.TELEMETRY_SDK_NAME]:"opentelemetry",[n.ResourceAttributes.PROCESS_RUNTIME_NAME]:"node",[n.ResourceAttributes.TELEMETRY_SDK_LANGUAGE]:n.TelemetrySdkLanguageValues.NODEJS,[n.ResourceAttributes.TELEMETRY_SDK_VERSION]:t.VERSION}})),Xe=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.unrefTimer=void 0,e.unrefTimer=function(e){e.unref()}})),Ye=S((e=>{"use strict";var t=e&&e.__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]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(qe(),e),n(Be(),e),n(Ue(),e),n(ze(),e),n(Qe(),e),n(Xe(),e)})),Je=S((e=>{"use strict";var t=e&&e.__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]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ye(),e)})),Ze=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isTimeInput=e.isTimeInputHrTime=e.hrTimeToMicroseconds=e.hrTimeToMilliseconds=e.hrTimeToNanoseconds=e.hrTimeToTimeStamp=e.hrTimeDuration=e.timeInputToHrTime=e.hrTime=void 0;var t=Je(),n=9,r=Math.pow(10,n);function i(e){let t=e/1e3,i=Math.trunc(t);return[i,Number((t-i).toFixed(n))*r]}function o(){let e=t.otperformance.timeOrigin;if("number"!=typeof e){let n=t.otperformance;e=n.timing&&n.timing.fetchStart}return e}function s(e){let n=i(o()),s=i("number"==typeof e?e:t.otperformance.now()),a=n[0]+s[0],c=n[1]+s[1];return c>r&&(c-=r,a+=1),[a,c]}function a(e){return Array.isArray(e)&&2===e.length&&"number"==typeof e[0]&&"number"==typeof e[1]}e.hrTime=s,e.timeInputToHrTime=function(e){if(a(e))return e;if("number"==typeof e)return e<o()?s(e):i(e);if(e instanceof Date)return i(e.getTime());throw TypeError("Invalid input type")},e.hrTimeDuration=function(e,t){let n=t[0]-e[0],i=t[1]-e[1];return i<0&&(n-=1,i+=r),[n,i]},e.hrTimeToTimeStamp=function(e){let t=n,r=`${"0".repeat(t)}${e[1]}Z`,i=r.substr(r.length-t-1);return new Date(1e3*e[0]).toISOString().replace("000Z",i)},e.hrTimeToNanoseconds=function(e){return e[0]*r+e[1]},e.hrTimeToMilliseconds=function(e){return Math.round(1e3*e[0]+e[1]/1e6)},e.hrTimeToMicroseconds=function(e){return Math.round(1e6*e[0]+e[1]/1e3)},e.isTimeInputHrTime=a,e.isTimeInput=function(e){return a(e)||"number"==typeof e||e instanceof Date}})),et=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),tt=S((e=>{"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.ExportResultCode=void 0,(t=e.ExportResultCode||(e.ExportResultCode={}))[t.SUCCESS=0]="SUCCESS",t[t.FAILED=1]="FAILED"})),nt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CompositePropagator=void 0;var t=Pe();e.CompositePropagator=class{constructor(e={}){var t;this._propagators=null!==(t=e.propagators)&&void 0!==t?t:[],this._fields=Array.from(new Set(this._propagators.map((e=>"function"==typeof e.fields?e.fields():[])).reduce(((e,t)=>e.concat(t)),[])))}inject(e,n,r){for(let i of this._propagators)try{i.inject(e,n,r)}catch(e){t.diag.warn(`Failed to inject with ${i.constructor.name}. Err: ${e.message}`)}}extract(e,n,r){return this._propagators.reduce(((e,i)=>{try{return i.extract(e,n,r)}catch(e){t.diag.warn(`Failed to inject with ${i.constructor.name}. Err: ${e.message}`)}return e}),e)}fields(){return this._fields.slice()}}})),rt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.validateValue=e.validateKey=void 0;var t="[_0-9a-z-*/]",n=new RegExp(`^(?:[a-z]${t}{0,255}|[a-z0-9]${t}{0,240}@[a-z]${t}{0,13})$`),r=/^[ -~]{0,255}[!-~]$/,i=/,|=/;e.validateKey=function(e){return n.test(e)},e.validateValue=function(e){return r.test(e)&&!i.test(e)}})),it=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TraceState=void 0;var t=rt(),n=class{constructor(e){this._internalState=new Map,e&&this._parse(e)}set(e,t){let n=this._clone();return n._internalState.has(e)&&n._internalState.delete(e),n._internalState.set(e,t),n}unset(e){let t=this._clone();return t._internalState.delete(e),t}get(e){return this._internalState.get(e)}serialize(){return this._keys().reduce(((e,t)=>(e.push(t+"="+this.get(t)),e)),[]).join(",")}_parse(e){e.length>512||(this._internalState=e.split(",").reverse().reduce(((e,n)=>{let r=n.trim(),i=r.indexOf("=");if(-1!==i){let o=r.slice(0,i),s=r.slice(i+1,n.length);t.validateKey(o)&&t.validateValue(s)&&e.set(o,s)}return e}),new Map),this._internalState.size>32&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,32))))}_keys(){return Array.from(this._internalState.keys()).reverse()}_clone(){let e=new n;return e._internalState=new Map(this._internalState),e}};e.TraceState=n})),ot=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HttpTraceContextPropagator=e.parseTraceParent=e.TRACE_STATE_HEADER=e.TRACE_PARENT_HEADER=void 0;var t=Pe(),n=Oe(),r=it();e.TRACE_PARENT_HEADER="traceparent",e.TRACE_STATE_HEADER="tracestate";var i=new RegExp("^\\s?((?!ff)[\\da-f]{2})-((?![0]{32})[\\da-f]{32})-((?![0]{16})[\\da-f]{16})-([\\da-f]{2})(-.*)?\\s?$");function o(e){let t=i.exec(e);return!t||"00"===t[1]&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}}e.parseTraceParent=o,e.HttpTraceContextPropagator=class{inject(r,i,o){let s=t.trace.getSpanContext(r);if(!s||n.isTracingSuppressed(r)||!t.isSpanContextValid(s))return;let a=`00-${s.traceId}-${s.spanId}-0${Number(s.traceFlags||t.TraceFlags.NONE).toString(16)}`;o.set(i,e.TRACE_PARENT_HEADER,a),s.traceState&&o.set(i,e.TRACE_STATE_HEADER,s.traceState.serialize())}extract(n,i,s){let a=s.get(i,e.TRACE_PARENT_HEADER);if(!a)return n;let c=Array.isArray(a)?a[0]:a;if("string"!=typeof c)return n;let l=o(c);if(!l)return n;l.isRemote=!0;let u=s.get(i,e.TRACE_STATE_HEADER);if(u){let e=Array.isArray(u)?u.join(","):u;l.traceState=new r.TraceState("string"==typeof e?e:void 0)}return t.trace.setSpanContext(n,l)}fields(){return[e.TRACE_PARENT_HEADER,e.TRACE_STATE_HEADER]}}})),st=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),at=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getRPCMetadata=e.deleteRPCMetadata=e.setRPCMetadata=e.RPCType=void 0;var t=Pe().createContextKey("OpenTelemetry SDK Context Key RPC_METADATA");(e.RPCType||(e.RPCType={})).HTTP="http",e.setRPCMetadata=function(e,n){return e.setValue(t,n)},e.deleteRPCMetadata=function(e){return e.deleteValue(t)},e.getRPCMetadata=function(e){return e.getValue(t)}})),ct=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AlwaysOffSampler=void 0;var t=Pe();e.AlwaysOffSampler=class{shouldSample(){return{decision:t.SamplingDecision.NOT_RECORD}}toString(){return"AlwaysOffSampler"}}})),lt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AlwaysOnSampler=void 0;var t=Pe();e.AlwaysOnSampler=class{shouldSample(){return{decision:t.SamplingDecision.RECORD_AND_SAMPLED}}toString(){return"AlwaysOnSampler"}}})),ut=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ParentBasedSampler=void 0;var t=Pe(),n=je(),r=ct(),i=lt();e.ParentBasedSampler=class{constructor(e){var t,o,s,a;this._root=e.root,this._root||(n.globalErrorHandler(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new i.AlwaysOnSampler),this._remoteParentSampled=null!==(t=e.remoteParentSampled)&&void 0!==t?t:new i.AlwaysOnSampler,this._remoteParentNotSampled=null!==(o=e.remoteParentNotSampled)&&void 0!==o?o:new r.AlwaysOffSampler,this._localParentSampled=null!==(s=e.localParentSampled)&&void 0!==s?s:new i.AlwaysOnSampler,this._localParentNotSampled=null!==(a=e.localParentNotSampled)&&void 0!==a?a:new r.AlwaysOffSampler}shouldSample(e,n,r,i,o,s){let a=t.trace.getSpanContext(e);return a&&t.isSpanContextValid(a)?a.isRemote?a.traceFlags&t.TraceFlags.SAMPLED?this._remoteParentSampled.shouldSample(e,n,r,i,o,s):this._remoteParentNotSampled.shouldSample(e,n,r,i,o,s):a.traceFlags&t.TraceFlags.SAMPLED?this._localParentSampled.shouldSample(e,n,r,i,o,s):this._localParentNotSampled.shouldSample(e,n,r,i,o,s):this._root.shouldSample(e,n,r,i,o,s)}toString(){return`ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`}}})),dt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TraceIdRatioBasedSampler=void 0;var t=Pe();e.TraceIdRatioBasedSampler=class{constructor(e=0){this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(4294967295*this._ratio)}shouldSample(e,n){return{decision:t.isValidTraceId(n)&&this._accumulate(n)<this._upperBound?t.SamplingDecision.RECORD_AND_SAMPLED:t.SamplingDecision.NOT_RECORD}}toString(){return`TraceIdRatioBased{${this._ratio}}`}_normalize(e){return"number"!=typeof e||isNaN(e)?0:e>=1?1:e<=0?0:e}_accumulate(e){let t=0;for(let n=0;n<e.length/8;n++){let r=8*n;t=(t^parseInt(e.slice(r,r+8),16))>>>0}return t}}})),pt=S((e=>{"use strict";function t(e,t){return"string"==typeof t?e===t:t.test(e)}Object.defineProperty(e,"__esModule",{value:!0}),e.isUrlIgnored=e.urlMatches=void 0,e.urlMatches=t,e.isUrlIgnored=function(e,n){if(!n)return!1;for(let r of n)if(t(e,r))return!0;return!1}})),ht=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isWrapped=void 0,e.isWrapped=function(e){return"function"==typeof e&&"function"==typeof e.__original&&"function"==typeof e.__unwrap&&!0===e.__wrapped}})),ft=S((e=>{"use strict";var t=e&&e.__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]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.baggageUtils=void 0,n(ke(),e),n(Ne(),e),n(je(),e),n(Le(),e),n(Ze(),e),n(et(),e),n(tt(),e),n(Ge(),e),e.baggageUtils=Ae(),n(Je(),e),n(nt(),e),n(ot(),e),n(st(),e),n(at(),e),n(ct(),e),n(lt(),e),n(ut(),e),n(dt(),e),n(Oe(),e),n(it(),e),n(Fe(),e),n(Me(),e),n(pt(),e),n(ht(),e),n(Ge(),e)})),mt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ExceptionEventName=void 0,e.ExceptionEventName="exception"})),gt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Span=void 0;var t=Pe(),n=ft(),r=Ke(),i=mt();e.Span=class{constructor(e,r,i,o,s,a,c=[],l=n.hrTime()){this.attributes={},this.links=[],this.events=[],this.status={code:t.SpanStatusCode.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=i,this._spanContext=o,this.parentSpanId=a,this.kind=s,this.links=c,this.startTime=n.timeInputToHrTime(l),this.resource=e.resource,this.instrumentationLibrary=e.instrumentationLibrary,this._spanLimits=e.getSpanLimits(),this._spanProcessor=e.getActiveSpanProcessor(),this._spanProcessor.onStart(this,r)}spanContext(){return this._spanContext}setAttribute(e,r){return null==r||this._isSpanEnded()?this:0===e.length?(t.diag.warn(`Invalid attribute key: ${e}`),this):n.isAttributeValue(r)?(Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)||(this.attributes[e]=r),this):(t.diag.warn(`Invalid attribute value set for key: ${e}`),this)}setAttributes(e){for(let[t,n]of Object.entries(e))this.setAttribute(t,n);return this}addEvent(e,r,i){return this._isSpanEnded()||(this.events.length>=this._spanLimits.eventCountLimit&&(t.diag.warn("Dropping extra events."),this.events.shift()),n.isTimeInput(r)&&(typeof i>"u"&&(i=r),r=void 0),typeof i>"u"&&(i=n.hrTime()),this.events.push({name:e,attributes:r,time:n.timeInputToHrTime(i)})),this}setStatus(e){return this._isSpanEnded()||(this.status=e),this}updateName(e){return this._isSpanEnded()||(this.name=e),this}end(e=n.hrTime()){this._isSpanEnded()?t.diag.error("You can only call end() on a span once."):(this._ended=!0,this.endTime=n.timeInputToHrTime(e),this._duration=n.hrTimeDuration(this.startTime,this.endTime),this._duration[0]<0&&t.diag.warn("Inconsistent start and end time, startTime > endTime",this.startTime,this.endTime),this._spanProcessor.onEnd(this))}isRecording(){return!1===this._ended}recordException(e,o=n.hrTime()){let s={};"string"==typeof e?s[r.SemanticAttributes.EXCEPTION_MESSAGE]=e:e&&(e.code?s[r.SemanticAttributes.EXCEPTION_TYPE]=e.code.toString():e.name&&(s[r.SemanticAttributes.EXCEPTION_TYPE]=e.name),e.message&&(s[r.SemanticAttributes.EXCEPTION_MESSAGE]=e.message),e.stack&&(s[r.SemanticAttributes.EXCEPTION_STACKTRACE]=e.stack)),s[r.SemanticAttributes.EXCEPTION_TYPE]||s[r.SemanticAttributes.EXCEPTION_MESSAGE]?this.addEvent(i.ExceptionEventName,s,o):t.diag.warn(`Failed to record an exception ${e}`)}get duration(){return this._duration}get ended(){return this._ended}_isSpanEnded(){return this._ended&&t.diag.warn("Can not execute the operation on ended Span {traceId: %s, spanId: %s}",this._spanContext.traceId,this._spanContext.spanId),this._ended}}})),yt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.buildSamplerFromEnv=e.DEFAULT_CONFIG=void 0;var t=Pe(),n=ft(),r=n.getEnv(),i=n.TracesSamplerValues.AlwaysOn;function o(e=n.getEnv()){switch(e.OTEL_TRACES_SAMPLER){case n.TracesSamplerValues.AlwaysOn:return new n.AlwaysOnSampler;case n.TracesSamplerValues.AlwaysOff:return new n.AlwaysOffSampler;case n.TracesSamplerValues.ParentBasedAlwaysOn:return new n.ParentBasedSampler({root:new n.AlwaysOnSampler});case n.TracesSamplerValues.ParentBasedAlwaysOff:return new n.ParentBasedSampler({root:new n.AlwaysOffSampler});case n.TracesSamplerValues.TraceIdRatio:return new n.TraceIdRatioBasedSampler(a(e));case n.TracesSamplerValues.ParentBasedTraceIdRatio:return new n.ParentBasedSampler({root:new n.TraceIdRatioBasedSampler(a(e))});default:return t.diag.error(`OTEL_TRACES_SAMPLER value "${e.OTEL_TRACES_SAMPLER} invalid, defaulting to ${i}".`),new n.AlwaysOnSampler}}e.DEFAULT_CONFIG={sampler:o(r),forceFlushTimeoutMillis:3e4,spanLimits:{attributeCountLimit:n.getEnv().OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:n.getEnv().OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:n.getEnv().OTEL_SPAN_EVENT_COUNT_LIMIT}},e.buildSamplerFromEnv=o;var s=1;function a(e){if(void 0===e.OTEL_TRACES_SAMPLER_ARG||""===e.OTEL_TRACES_SAMPLER_ARG)return t.diag.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${s}.`),s;let n=Number(e.OTEL_TRACES_SAMPLER_ARG);return isNaN(n)?(t.diag.error(`OTEL_TRACES_SAMPLER_ARG=${e.OTEL_TRACES_SAMPLER_ARG} was given, but it is invalid, defaulting to ${s}.`),s):n<0||n>1?(t.diag.error(`OTEL_TRACES_SAMPLER_ARG=${e.OTEL_TRACES_SAMPLER_ARG} was given, but it is out of range ([0..1]), defaulting to ${s}.`),s):n}})),bt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.mergeConfig=void 0;var t=yt();e.mergeConfig=function(e){let n={sampler:t.buildSamplerFromEnv()},r=Object.assign({},t.DEFAULT_CONFIG,n,e);return r.spanLimits=Object.assign({},t.DEFAULT_CONFIG.spanLimits,e.spanLimits||{}),r}})),vt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Tracer=void 0;var t=Pe(),n=ft(),r=gt(),i=bt();e.Tracer=class{constructor(e,t,r){this._tracerProvider=r;let o=i.mergeConfig(t);this._sampler=o.sampler,this._spanLimits=o.spanLimits,this._idGenerator=t.idGenerator||new n.RandomIdGenerator,this.resource=r.resource,this.instrumentationLibrary=e}startSpan(e,i={},o=t.context.active()){var s,a;if(n.isTracingSuppressed(o))return t.diag.debug("Instrumentation suppressed, returning Noop Span"),t.trace.wrapSpanContext(t.INVALID_SPAN_CONTEXT);let c,l,u,d=function(e,n){if(!e.root)return t.trace.getSpanContext(n)}(i,o),p=this._idGenerator.generateSpanId();d&&t.trace.isSpanContextValid(d)?(c=d.traceId,l=d.traceState,u=d.spanId):c=this._idGenerator.generateTraceId();let h=null!==(s=i.kind)&&void 0!==s?s:t.SpanKind.INTERNAL,f=null!==(a=i.links)&&void 0!==a?a:[],m=n.sanitizeAttributes(i.attributes),g=this._sampler.shouldSample(i.root?t.trace.setSpanContext(o,t.INVALID_SPAN_CONTEXT):o,c,e,h,m,f),y={traceId:c,spanId:p,traceFlags:g.decision===t.SamplingDecision.RECORD_AND_SAMPLED?t.TraceFlags.SAMPLED:t.TraceFlags.NONE,traceState:l};if(g.decision===t.SamplingDecision.NOT_RECORD)return t.diag.debug("Recording is off, propagating context in a non-recording span"),t.trace.wrapSpanContext(y);let b=new r.Span(this,o,e,y,h,u,f,i.startTime);return b.setAttributes(Object.assign(m,g.attributes)),b}startActiveSpan(e,n,r,i){let o,s,a;if(arguments.length<2)return;2===arguments.length?a=n:3===arguments.length?(o=n,a=r):(o=n,s=r,a=i);let c=s??t.context.active(),l=this.startSpan(e,o,c),u=t.trace.setSpan(c,l);return t.context.with(u,a,void 0,l)}getSpanLimits(){return this._spanLimits}getActiveSpanProcessor(){return this._tracerProvider.getActiveSpanProcessor()}}})),St=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.defaultServiceName=void 0,e.defaultServiceName=function(){return`unknown_service:${process.argv0}`}})),wt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.detectResources=void 0;var t=Rt(),r=Pe(),i=n(9023);e.detectResources=async(e={})=>{let n=Object.assign(e),i=await Promise.all((n.detectors||[]).map((async e=>{try{let t=await e.detect(n);return r.diag.debug(`${e.constructor.name} found resource.`,t),t}catch(n){return r.diag.debug(`${e.constructor.name} failed: ${n.message}`),t.Resource.empty()}})));return o(i),i.reduce(((e,t)=>e.merge(t)),t.Resource.empty())};var o=e=>{e.forEach((e=>{if(Object.keys(e.attributes).length>0){let t=i.inspect(e.attributes,{depth:2,breakLength:1/0,sorted:!0,compact:!1});r.diag.verbose(t)}}))}})),Ct=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.envDetector=void 0;var t=Pe(),n=ft(),r=Ke(),i=Ot();e.envDetector=new class{constructor(){this._MAX_LENGTH=255,this._COMMA_SEPARATOR=",",this._LABEL_KEY_VALUE_SPLITTER="=",this._ERROR_MESSAGE_INVALID_CHARS="should be a ASCII string with a length greater than 0 and not exceed "+this._MAX_LENGTH+" characters.",this._ERROR_MESSAGE_INVALID_VALUE="should be a ASCII string with a length not exceed "+this._MAX_LENGTH+" characters."}async detect(e){let o={},s=n.getEnv(),a=s.OTEL_RESOURCE_ATTRIBUTES,c=s.OTEL_SERVICE_NAME;if(a)try{let e=this._parseResourceAttributes(a);Object.assign(o,e)}catch(e){t.diag.debug(`EnvDetector failed: ${e.message}`)}return c&&(o[r.ResourceAttributes.SERVICE_NAME]=c),new i.Resource(o)}_parseResourceAttributes(e){if(!e)return{};let t={},n=e.split(this._COMMA_SEPARATOR,-1);for(let e of n){let n=e.split(this._LABEL_KEY_VALUE_SPLITTER,-1);if(2!==n.length)continue;let[r,i]=n;if(r=r.trim(),i=i.trim().split('^"|"$').join(""),!this._isValidAndNotEmpty(r))throw new Error(`Attribute key ${this._ERROR_MESSAGE_INVALID_CHARS}`);if(!this._isValid(i))throw new Error(`Attribute value ${this._ERROR_MESSAGE_INVALID_VALUE}`);t[r]=i}return t}_isValid(e){return e.length<=this._MAX_LENGTH&&this._isPrintableString(e)}_isPrintableString(e){for(let t=0;t<e.length;t++){let n=e.charAt(t);if(n<=" "||n>="~")return!1}return!0}_isValidAndNotEmpty(e){return e.length>0&&this._isValid(e)}}})),Tt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.processDetector=void 0;var t=Pe(),n=Ke(),r=Ot();e.processDetector=new class{async detect(e){let t={[n.ResourceAttributes.PROCESS_PID]:process.pid,[n.ResourceAttributes.PROCESS_EXECUTABLE_NAME]:process.title||"",[n.ResourceAttributes.PROCESS_COMMAND]:process.argv[1]||"",[n.ResourceAttributes.PROCESS_COMMAND_LINE]:process.argv.join(" ")||""};return this._getResourceAttributes(t,e)}_getResourceAttributes(e,i){return""===e[n.ResourceAttributes.PROCESS_EXECUTABLE_NAME]||""===e[n.ResourceAttributes.PROCESS_EXECUTABLE_PATH]||""===e[n.ResourceAttributes.PROCESS_COMMAND]||""===e[n.ResourceAttributes.PROCESS_COMMAND_LINE]?(t.diag.debug("ProcessDetector failed: Unable to find required process resources. "),r.Resource.empty()):new r.Resource(Object.assign({},e))}}})),Et=S((e=>{"use strict";var t=e&&e.__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]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(Ct(),e),n(Tt(),e)})),_t=S((e=>{"use strict";var t=e&&e.__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]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(St(),e),n(wt(),e),n(Et(),e)})),xt=S((e=>{"use strict";var t=e&&e.__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]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(_t(),e)})),Rt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Resource=void 0;var t=Ke(),n=ft(),r=xt(),i=class{constructor(e){this.attributes=e}static empty(){return i.EMPTY}static default(){return new i({[t.ResourceAttributes.SERVICE_NAME]:r.defaultServiceName(),[t.ResourceAttributes.TELEMETRY_SDK_LANGUAGE]:n.SDK_INFO[t.ResourceAttributes.TELEMETRY_SDK_LANGUAGE],[t.ResourceAttributes.TELEMETRY_SDK_NAME]:n.SDK_INFO[t.ResourceAttributes.TELEMETRY_SDK_NAME],[t.ResourceAttributes.TELEMETRY_SDK_VERSION]:n.SDK_INFO[t.ResourceAttributes.TELEMETRY_SDK_VERSION]})}merge(e){if(!e||!Object.keys(e.attributes).length)return this;let t=Object.assign({},this.attributes,e.attributes);return new i(t)}};e.Resource=i,i.EMPTY=new i({})})),It=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Pt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Ot=S((e=>{"use strict";var t=e&&e.__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]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(Rt(),e),n(xt(),e),n(It(),e),n(Pt(),e)})),Dt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MultiSpanProcessor=void 0;var t=ft();e.MultiSpanProcessor=class{constructor(e){this._spanProcessors=e}forceFlush(){let e=[];for(let t of this._spanProcessors)e.push(t.forceFlush());return new Promise((n=>{Promise.all(e).then((()=>{n()})).catch((e=>{t.globalErrorHandler(e||new Error("MultiSpanProcessor: forceFlush failed")),n()}))}))}onStart(e,t){for(let n of this._spanProcessors)n.onStart(e,t)}onEnd(e){for(let t of this._spanProcessors)t.onEnd(e)}shutdown(){let e=[];for(let t of this._spanProcessors)e.push(t.shutdown());return new Promise(((t,n)=>{Promise.all(e).then((()=>{t()}),n)}))}}})),At=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.NoopSpanProcessor=void 0,e.NoopSpanProcessor=class{onStart(e,t){}onEnd(e){}shutdown(){return Promise.resolve()}forceFlush(){return Promise.resolve()}}})),kt=S(((e,t)=>{var n="__lodash_hash_undefined__",r=9007199254740991,i="[object Arguments]",o="[object AsyncFunction]",s="[object Function]",a="[object GeneratorFunction]",c="[object Null]",l="[object Object]",u="[object Proxy]",d="[object Undefined]",p=/^\[object .+?Constructor\]$/,h=/^(?:0|[1-9]\d*)$/,f={};f["[object Float32Array]"]=f["[object Float64Array]"]=f["[object Int8Array]"]=f["[object Int16Array]"]=f["[object Int32Array]"]=f["[object Uint8Array]"]=f["[object Uint8ClampedArray]"]=f["[object Uint16Array]"]=f["[object Uint32Array]"]=!0,f[i]=f["[object Array]"]=f["[object ArrayBuffer]"]=f["[object Boolean]"]=f["[object DataView]"]=f["[object Date]"]=f["[object Error]"]=f[s]=f["[object Map]"]=f["[object Number]"]=f[l]=f["[object RegExp]"]=f["[object Set]"]=f["[object String]"]=f["[object WeakMap]"]=!1;var m,g="object"==typeof global&&global&&global.Object===Object&&global,y="object"==typeof self&&self&&self.Object===Object&&self,b=g||y||Function("return this")(),v="object"==typeof e&&e&&!e.nodeType&&e,S=v&&"object"==typeof t&&t&&!t.nodeType&&t,w=S&&S.exports===v,C=w&&g.process,T=function(){try{return S&&S.require&&S.require("util").types||C&&C.binding&&C.binding("util")}catch{}}(),E=T&&T.isTypedArray,_=Array.prototype,x=Function.prototype,R=Object.prototype,I=b["__core-js_shared__"],P=x.toString,O=R.hasOwnProperty,D=(m=/[^.]+$/.exec(I&&I.keys&&I.keys.IE_PROTO||""))?"Symbol(src)_1."+m:"",A=R.toString,k=P.call(Object),N=RegExp("^"+P.call(O).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),L=w?b.Buffer:void 0,j=b.Symbol,M=b.Uint8Array,F=(L&&L.allocUnsafe,function(e,t){return function(n){return e(t(n))}}(Object.getPrototypeOf,Object)),q=Object.create,B=R.propertyIsEnumerable,U=_.splice,z=j?j.toStringTag:void 0,G=function(){try{var e=ue(Object,"defineProperty");return e({},"",{}),e}catch{}}(),H=L?L.isBuffer:void 0,V=Math.max,$=Date.now,W=ue(b,"Map"),K=ue(Object,"create"),Q=function(){function e(){}return function(t){if(!Ce(t))return{};if(q)return q(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function X(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Y(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function J(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Z(e){var t=this.__data__=new Y(e);this.size=t.size}function ee(e,t,n){(void 0!==n&&!me(e[t],n)||void 0===n&&!(t in e))&&re(e,t,n)}function te(e,t,n){var r=e[t];(!O.call(e,t)||!me(r,n)||void 0===n&&!(t in e))&&re(e,t,n)}function ne(e,t){for(var n=e.length;n--;)if(me(e[n][0],t))return n;return-1}function re(e,t,n){"__proto__"==t&&G?G(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}X.prototype.clear=function(){this.__data__=K?K(null):{},this.size=0},X.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},X.prototype.get=function(e){var t=this.__data__;if(K){var r=t[e];return r===n?void 0:r}return O.call(t,e)?t[e]:void 0},X.prototype.has=function(e){var t=this.__data__;return K?void 0!==t[e]:O.call(t,e)},X.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=K&&void 0===t?n:t,this},Y.prototype.clear=function(){this.__data__=[],this.size=0},Y.prototype.delete=function(e){var t=this.__data__,n=ne(t,e);return!(n<0||(n==t.length-1?t.pop():U.call(t,n,1),--this.size,0))},Y.prototype.get=function(e){var t=this.__data__,n=ne(t,e);return n<0?void 0:t[n][1]},Y.prototype.has=function(e){return ne(this.__data__,e)>-1},Y.prototype.set=function(e,t){var n=this.__data__,r=ne(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},J.prototype.clear=function(){this.size=0,this.__data__={hash:new X,map:new(W||Y),string:new X}},J.prototype.delete=function(e){var t=le(this,e).delete(e);return this.size-=t?1:0,t},J.prototype.get=function(e){return le(this,e).get(e)},J.prototype.has=function(e){return le(this,e).has(e)},J.prototype.set=function(e,t){var n=le(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Z.prototype.clear=function(){this.__data__=new Y,this.size=0},Z.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Z.prototype.get=function(e){return this.__data__.get(e)},Z.prototype.has=function(e){return this.__data__.has(e)},Z.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Y){var r=n.__data__;if(!W||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new J(r)}return n.set(e,t),this.size=n.size,this};var ie=function(e,t,n){for(var r=-1,i=Object(e),o=n(e),s=o.length;s--;){var a=o[++r];if(!1===t(i[a],a,i))break}return e};function oe(e){return null==e?void 0===e?d:c:z&&z in Object(e)?function(e){var t=O.call(e,z),n=e[z];try{e[z]=void 0;var r=!0}catch{}var i=A.call(e);return r&&(t?e[z]=n:delete e[z]),i}(e):function(e){return A.call(e)}(e)}function se(e){return Te(e)&&oe(e)==i}function ae(e,t,n,r,i){e!==t&&ie(t,(function(o,s){if(i||(i=new Z),Ce(o))!function(e,t,n,r,i,o,s){var a=he(e,n),c=he(t,n),u=s.get(c);if(u)ee(e,n,u);else{var d=o?o(a,c,n+"",e,t,s):void 0,p=void 0===d;if(p){var h=ye(c),f=!h&&ve(c),m=!h&&!f&&Ee(c);d=c,h||f||m?ye(a)?d=a:function(e){return Te(e)&&be(e)}(a)?d=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}(a):f?(p=!1,d=function(e){return e.slice()}(c)):m?(p=!1,d=function(e){var t=function(e){var t=new e.constructor(e.byteLength);return new M(t).set(new M(e)),t}(e.buffer);return new e.constructor(t,e.byteOffset,e.length)}(c)):d=[]:function(e){if(!Te(e)||oe(e)!=l)return!1;var t=F(e);if(null===t)return!0;var n=O.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&P.call(n)==k}(c)||ge(c)?(d=a,ge(a)?d=function(e){return function(e,t,n){var r=!n;n||(n={});for(var i=-1,o=t.length;++i<o;){var s=t[i],a=void 0;void 0===a&&(a=e[s]),r?re(n,s,a):te(n,s,a)}return n}(e,_e(e))}(a):(!Ce(a)||Se(a))&&(d=function(e){return"function"!=typeof e.constructor||pe(e)?{}:Q(F(e))}(c))):p=!1}p&&(s.set(c,d),i(d,c,r,o,s),s.delete(c)),ee(e,n,d)}}(e,t,s,n,ae,r,i);else{var a=r?r(he(e,s),o,s+"",e,t,i):void 0;void 0===a&&(a=o),ee(e,s,a)}}),_e)}var ce=G?function(e,t){return G(e,"toString",{configurable:!0,enumerable:!1,value:Re(t),writable:!0})}:Ie;function le(e,t){var n=e.__data__;return function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}(t)?n["string"==typeof t?"string":"hash"]:n.map}function ue(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!Ce(e)||function(e){return!!D&&D in e}(e))&&(Se(e)?N:p).test(function(e){if(null!=e){try{return P.call(e)}catch{}try{return e+""}catch{}}return""}(e))}(n)?n:void 0}function de(e,t){var n=typeof e;return!!(t=t??r)&&("number"==n||"symbol"!=n&&h.test(e))&&e>-1&&e%1==0&&e<t}function pe(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||R)}function he(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var fe=function(e){var t=0,n=0;return function(){var r=$(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(ce);function me(e,t){return e===t||e!=e&&t!=t}var ge=se(function(){return arguments}())?se:function(e){return Te(e)&&O.call(e,"callee")&&!B.call(e,"callee")},ye=Array.isArray;function be(e){return null!=e&&we(e.length)&&!Se(e)}var ve=H||function(){return!1};function Se(e){if(!Ce(e))return!1;var t=oe(e);return t==s||t==a||t==o||t==u}function we(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}function Ce(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Te(e){return null!=e&&"object"==typeof e}var Ee=E?function(e){return function(t){return e(t)}}(E):function(e){return Te(e)&&we(e.length)&&!!f[oe(e)]};function _e(e){return be(e)?function(e,t){var n=ye(e),r=!n&&ge(e),i=!n&&!r&&ve(e),o=!n&&!r&&!i&&Ee(e),s=n||r||i||o,a=s?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],c=a.length;for(var l in e)(t||O.call(e,l))&&(!s||!("length"==l||i&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||de(l,c)))&&a.push(l);return a}(e,!0):function(e){if(!Ce(e))return function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}(e);var t=pe(e),n=[];for(var r in e)"constructor"==r&&(t||!O.call(e,r))||n.push(r);return n}(e)}var xe=function(e){return function(e,t){return fe(function(e,t,n){return t=V(void 0===t?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=V(r.length-t,0),s=Array(o);++i<o;)s[i]=r[t+i];i=-1;for(var a=Array(t+1);++i<t;)a[i]=r[i];return a[t]=n(s),function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}(e,this,a)}}(e,t,Ie),e+"")}((function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,s&&function(e,t,n){if(!Ce(n))return!1;var r=typeof t;return!!("number"==r?be(n)&&de(t,n.length):"string"==r&&t in n)&&me(n[t],e)}(n[0],n[1],s)&&(o=i<3?void 0:o,i=1),t=Object(t);++r<i;){var a=n[r];a&&e(t,a,r)}return t}))}((function(e,t,n){ae(e,t,n)}));function Re(e){return function(){return e}}function Ie(e){return e}t.exports=xe})),Nt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BatchSpanProcessorBase=void 0;var t=Pe(),n=ft();e.BatchSpanProcessorBase=class{constructor(e,t){this._exporter=e,this._finishedSpans=[],this._isShutdown=!1,this._shuttingDownPromise=Promise.resolve();let r=n.getEnv();this._maxExportBatchSize="number"==typeof(null==t?void 0:t.maxExportBatchSize)?t.maxExportBatchSize:r.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize="number"==typeof(null==t?void 0:t.maxQueueSize)?t.maxQueueSize:r.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis="number"==typeof(null==t?void 0:t.scheduledDelayMillis)?t.scheduledDelayMillis:r.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis="number"==typeof(null==t?void 0:t.exportTimeoutMillis)?t.exportTimeoutMillis:r.OTEL_BSP_EXPORT_TIMEOUT}forceFlush(){return this._isShutdown?this._shuttingDownPromise:this._flushAll()}onStart(e){}onEnd(e){this._isShutdown||this._addToBuffer(e)}shutdown(){return this._isShutdown||(this._isShutdown=!0,this._shuttingDownPromise=new Promise(((e,t)=>{Promise.resolve().then((()=>this.onShutdown())).then((()=>this._flushAll())).then((()=>this._exporter.shutdown())).then(e).catch((e=>{t(e)}))}))),this._shuttingDownPromise}_addToBuffer(e){this._finishedSpans.length>=this._maxQueueSize||(this._finishedSpans.push(e),this._maybeStartTimer())}_flushAll(){return new Promise(((e,t)=>{let n=[];for(let e=0,t=Math.ceil(this._finishedSpans.length/this._maxExportBatchSize);e<t;e++)n.push(this._flushOneBatch());Promise.all(n).then((()=>{e()})).catch(t)}))}_flushOneBatch(){return this._clearTimer(),0===this._finishedSpans.length?Promise.resolve():new Promise(((e,r)=>{let i=setTimeout((()=>{r(new Error("Timeout"))}),this._exportTimeoutMillis);t.context.with(n.suppressTracing(t.context.active()),(()=>{this._exporter.export(this._finishedSpans.splice(0,this._maxExportBatchSize),(t=>{var o;clearTimeout(i),t.code===n.ExportResultCode.SUCCESS?e():r(null!==(o=t.error)&&void 0!==o?o:new Error("BatchSpanProcessor: span export failed"))}))}))}))}_maybeStartTimer(){void 0===this._timer&&(this._timer=setTimeout((()=>{this._flushOneBatch().then((()=>{this._finishedSpans.length>0&&(this._clearTimer(),this._maybeStartTimer())})).catch((e=>{n.globalErrorHandler(e)}))}),this._scheduledDelayMillis),n.unrefTimer(this._timer))}_clearTimer(){void 0!==this._timer&&(clearTimeout(this._timer),this._timer=void 0)}}})),Lt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BatchSpanProcessor=void 0;var t=Nt(),n=class extends t.BatchSpanProcessorBase{onShutdown(){}};e.BatchSpanProcessor=n})),jt=S((e=>{"use strict";var t=e&&e.__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]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(Lt(),e)})),Mt=S((e=>{"use strict";var t=e&&e.__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]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(jt(),e)})),Ft=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BasicTracerProvider=e.ForceFlushState=void 0;var t,n,r=Pe(),i=ft(),o=Ot(),s=Wt(),a=yt(),c=Dt(),l=At(),u=kt(),d=Mt();(n=t=e.ForceFlushState||(e.ForceFlushState={}))[n.resolved=0]="resolved",n[n.timeout=1]="timeout",n[n.error=2]="error",n[n.unresolved=3]="unresolved";var p=class{constructor(e={}){var t;this._registeredSpanProcessors=[],this._tracers=new Map;let n=u({},a.DEFAULT_CONFIG,e);this.resource=null!==(t=n.resource)&&void 0!==t?t:o.Resource.empty(),this.resource=o.Resource.default().merge(this.resource),this._config=Object.assign({},n,{resource:this.resource});let r=this._buildExporterFromEnv();if(void 0!==r){let e=new d.BatchSpanProcessor(r);this.activeSpanProcessor=e}else this.activeSpanProcessor=new l.NoopSpanProcessor}getTracer(e,t){let n=`${e}@${t||""}`;return this._tracers.has(n)||this._tracers.set(n,new s.Tracer({name:e,version:t},this._config,this)),this._tracers.get(n)}addSpanProcessor(e){0===this._registeredSpanProcessors.length&&this.activeSpanProcessor.shutdown().catch((e=>r.diag.error("Error while trying to shutdown current span processor",e))),this._registeredSpanProcessors.push(e),this.activeSpanProcessor=new c.MultiSpanProcessor(this._registeredSpanProcessors)}getActiveSpanProcessor(){return this.activeSpanProcessor}register(e={}){r.trace.setGlobalTracerProvider(this),void 0===e.propagator&&(e.propagator=this._buildPropagatorFromEnv()),e.contextManager&&r.context.setGlobalContextManager(e.contextManager),e.propagator&&r.propagation.setGlobalPropagator(e.propagator)}forceFlush(){let e=this._config.forceFlushTimeoutMillis,n=this._registeredSpanProcessors.map((n=>new Promise((r=>{let i,o=setTimeout((()=>{r(new Error(`Span processor did not completed within timeout period of ${e} ms`)),i=t.timeout}),e);n.forceFlush().then((()=>{clearTimeout(o),i!==t.timeout&&(i=t.resolved,r(i))})).catch((e=>{clearTimeout(o),i=t.error,r(e)}))}))));return new Promise(((e,r)=>{Promise.all(n).then((n=>{let i=n.filter((e=>e!==t.resolved));i.length>0?r(i):e()})).catch((e=>r([e])))}))}shutdown(){return this.activeSpanProcessor.shutdown()}_getPropagator(e){var t;return null===(t=p._registeredPropagators.get(e))||void 0===t?void 0:t()}_getSpanExporter(e){var t;return null===(t=p._registeredExporters.get(e))||void 0===t?void 0:t()}_buildPropagatorFromEnv(){let e=Array.from(new Set(i.getEnv().OTEL_PROPAGATORS)),t=e.map((e=>{let t=this._getPropagator(e);return t||r.diag.warn(`Propagator "${e}" requested through environment variable is unavailable.`),t})).reduce(((e,t)=>(t&&e.push(t),e)),[]);if(0!==t.length)return 1===e.length?t[0]:new i.CompositePropagator({propagators:t})}_buildExporterFromEnv(){let e=i.getEnv().OTEL_TRACES_EXPORTER;if("none"===e)return;let t=this._getSpanExporter(e);return t||r.diag.error(`Exporter "${e}" requested through environment variable is unavailable.`),t}};e.BasicTracerProvider=p,p._registeredPropagators=new Map([["tracecontext",()=>new i.HttpTraceContextPropagator],["baggage",()=>new i.HttpBaggagePropagator]]),p._registeredExporters=new Map})),qt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConsoleSpanExporter=void 0;var t=ft();e.ConsoleSpanExporter=class{export(e,t){return this._sendSpans(e,t)}shutdown(){return this._sendSpans([]),Promise.resolve()}_exportInfo(e){return{traceId:e.spanContext().traceId,parentId:e.parentSpanId,name:e.name,id:e.spanContext().spanId,kind:e.kind,timestamp:t.hrTimeToMicroseconds(e.startTime),duration:t.hrTimeToMicroseconds(e.duration),attributes:e.attributes,status:e.status,events:e.events}}_sendSpans(e,n){for(let t of e)console.log(this._exportInfo(t));if(n)return n({code:t.ExportResultCode.SUCCESS})}}})),Bt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InMemorySpanExporter=void 0;var t=ft();e.InMemorySpanExporter=class{constructor(){this._finishedSpans=[],this._stopped=!1}export(e,n){if(this._stopped)return n({code:t.ExportResultCode.FAILED,error:new Error("Exporter has been stopped")});this._finishedSpans.push(...e),setTimeout((()=>n({code:t.ExportResultCode.SUCCESS})),0)}shutdown(){return this._stopped=!0,this._finishedSpans=[],Promise.resolve()}reset(){this._finishedSpans=[]}getFinishedSpans(){return this._finishedSpans}}})),Ut=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),zt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SimpleSpanProcessor=void 0;var t=Pe(),n=ft();e.SimpleSpanProcessor=class{constructor(e){this._exporter=e,this._isShutdown=!1,this._shuttingDownPromise=Promise.resolve()}forceFlush(){return Promise.resolve()}onStart(e){}onEnd(e){this._isShutdown||t.context.with(n.suppressTracing(t.context.active()),(()=>{this._exporter.export([e],(e=>{var t;e.code!==n.ExportResultCode.SUCCESS&&n.globalErrorHandler(null!==(t=e.error)&&void 0!==t?t:new Error(`SimpleSpanProcessor: span export failed (status ${e})`))}))}))}shutdown(){return this._isShutdown||(this._isShutdown=!0,this._shuttingDownPromise=new Promise(((e,t)=>{Promise.resolve().then((()=>this._exporter.shutdown())).then(e).catch((e=>{t(e)}))}))),this._shuttingDownPromise}}})),Gt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Ht=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Vt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),$t=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Wt=S((e=>{"use strict";var t=e&&e.__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]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(vt(),e),n(Ft(),e),n(Mt(),e),n(qt(),e),n(Bt(),e),n(Ut(),e),n(zt(),e),n(Gt(),e),n(At(),e),n(gt(),e),n(Ht(),e),n(Vt(),e),n($t(),e)})),Kt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.azureCoreTracing=e.AzureMonitorSymbol=void 0;var t=N();e.AzureMonitorSymbol="Azure_Monitor_Tracer";var n=!1;e.azureCoreTracing={versionSpecifier:">= 1.0.0 < 2.0.0",patch:function(r){if(n)return r;try{var i=Wt(),o=Pe(),s=(new i.BasicTracerProvider).getTracer("applicationinsights tracer"),a=r.setTracer;r.setTracer=function(n){var r=n.startSpan;n.startSpan=function(e,n,i){var o=r.call(this,e,n,i),s=o.end;return o.end=function(){var e=s.apply(this,arguments);return t.channel.publish("azure-coretracing",o),e},o},n[e.AzureMonitorSymbol]=!0,a.call(this,n)},o.trace.getSpan(o.context.active()),r.setTracer(s),n=!0}catch{}return r}},e.enable=function(){t.channel.registerMonkeyPatch("@azure/core-tracing",e.azureCoreTracing)}})),Qt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.bunyan=void 0;var t=N();e.bunyan={versionSpecifier:">= 1.0.0 < 2.0.0",patch:function(e){var n=e.prototype._emit;return e.prototype._emit=function(e,r){var i=n.apply(this,arguments);if(!r){var o=i;o||(o=n.call(this,e,!0)),t.channel.publish("bunyan",{level:e.level,result:o})}return i},e}},e.enable=function(){t.channel.registerMonkeyPatch("bunyan",e.bunyan)}})),Xt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.console=void 0;var t=N(),r=n(2203);e.console={versionSpecifier:">= 4.0.0",patch:function(e){var n=new r.Writable,i=new r.Writable;n.write=function(e){if(!e)return!0;var n=e.toString();return t.channel.publish("console",{message:n}),!0},i.write=function(e){if(!e)return!0;var n=e.toString();return t.channel.publish("console",{message:n,stderr:!0}),!0};for(var o=new e.Console(n,i),s=function(t){var n=e[t];n&&(e[t]=function(){if(o[t])try{o[t].apply(o,arguments)}catch{}return n.apply(e,arguments)})},a=0,c=["log","info","warn","error","dir","time","timeEnd","trace","assert"];a<c.length;a++)s(c[a]);return e}},e.enable=function(){t.channel.registerMonkeyPatch("console",e.console),n(4236)}})),Yt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.mongoCore=void 0;var t=N();e.mongoCore={versionSpecifier:">= 2.0.0 < 4.0.0",patch:function(e){var n=e.Server.prototype.connect;return e.Server.prototype.connect=function(){var e=n.apply(this,arguments),r=this.s.pool.write;this.s.pool.write=function(){var e="function"==typeof arguments[1]?1:2;return"function"==typeof arguments[e]&&(arguments[e]=t.channel.bindToContext(arguments[e])),r.apply(this,arguments)};var i=this.s.pool.logout;return this.s.pool.logout=function(){return"function"==typeof arguments[1]&&(arguments[1]=t.channel.bindToContext(arguments[1])),i.apply(this,arguments)},e},e}},e.enable=function(){t.channel.registerMonkeyPatch("mongodb-core",e.mongoCore)}})),Jt=S((e=>{"use strict";var t=e&&e.__assign||function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.mongo330=e.mongo3=e.mongo2=void 0;var n=N();e.mongo2={versionSpecifier:">= 2.0.0 <= 3.0.5",patch:function(e){var r=e.instrument({operationIdGenerator:{next:function(){return n.channel.bindToContext((function(e){return e()}))}}}),i={};return r.on("started",(function(e){i[e.requestId]||(i[e.requestId]=t(t({},e),{time:new Date}))})),r.on("succeeded",(function(e){var t=i[e.requestId];t&&delete i[e.requestId],"function"==typeof e.operationId?e.operationId((function(){return n.channel.publish("mongodb",{startedData:t,event:e,succeeded:!0})})):n.channel.publish("mongodb",{startedData:t,event:e,succeeded:!0})})),r.on("failed",(function(e){var t=i[e.requestId];t&&delete i[e.requestId],"function"==typeof e.operationId?e.operationId((function(){return n.channel.publish("mongodb",{startedData:t,event:e,succeeded:!1})})):n.channel.publish("mongodb",{startedData:t,event:e,succeeded:!1})})),e}},e.mongo3={versionSpecifier:"> 3.0.5 < 3.3.0",patch:function(e){var r=e.instrument(),i={},o={};return r.on("started",(function(e){i[e.requestId]||(o[e.requestId]=n.channel.bindToContext((function(e){return e()})),i[e.requestId]=t(t({},e),{time:new Date}))})),r.on("succeeded",(function(e){var t=i[e.requestId];t&&delete i[e.requestId],"object"==typeof e&&"function"==typeof o[e.requestId]&&(o[e.requestId]((function(){return n.channel.publish("mongodb",{startedData:t,event:e,succeeded:!0})})),delete o[e.requestId])})),r.on("failed",(function(e){var t=i[e.requestId];t&&delete i[e.requestId],"object"==typeof e&&"function"==typeof o[e.requestId]&&(o[e.requestId]((function(){return n.channel.publish("mongodb",{startedData:t,event:e,succeeded:!1})})),delete o[e.requestId])})),e}},e.mongo330={versionSpecifier:">= 3.3.0 < 4.0.0",patch:function(e){!function(e){var t=e.Server.prototype.connect;e.Server.prototype.connect=function(){var e=t.apply(this,arguments),r=this.s.coreTopology.s.pool.write;this.s.coreTopology.s.pool.write=function(){var e="function"==typeof arguments[1]?1:2;return"function"==typeof arguments[e]&&(arguments[e]=n.channel.bindToContext(arguments[e])),r.apply(this,arguments)};var i=this.s.coreTopology.s.pool.logout;return this.s.coreTopology.s.pool.logout=function(){return"function"==typeof arguments[1]&&(arguments[1]=n.channel.bindToContext(arguments[1])),i.apply(this,arguments)},e}}(e);var t=e.instrument(),r={},i={};return t.on("started",(function(e){r[e.requestId]||(i[e.requestId]=n.channel.bindToContext((function(e){return e()})),r[e.requestId]=e)})),t.on("succeeded",(function(e){var t=r[e.requestId];t&&delete r[e.requestId],"object"==typeof e&&"function"==typeof i[e.requestId]&&(i[e.requestId]((function(){return n.channel.publish("mongodb",{startedData:t,event:e,succeeded:!0})})),delete i[e.requestId])})),t.on("failed",(function(e){var t=r[e.requestId];t&&delete r[e.requestId],"object"==typeof e&&"function"==typeof i[e.requestId]&&(i[e.requestId]((function(){return n.channel.publish("mongodb",{startedData:t,event:e,succeeded:!1})})),delete i[e.requestId])})),e}},e.enable=function(){n.channel.registerMonkeyPatch("mongodb",e.mongo2),n.channel.registerMonkeyPatch("mongodb",e.mongo3),n.channel.registerMonkeyPatch("mongodb",e.mongo330)}})),Zt=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.mysql=void 0;var t=N(),r=n(6928);e.mysql={versionSpecifier:">= 2.0.0 < 3.0.0",patch:function(e,i){var o=function(e,n){return function(n,r){var i=e[n];i&&(e[n]=function(){for(var e=arguments.length-1,n=arguments.length-1;n>=0;--n){if("function"==typeof arguments[n]){e=n;break}if(typeof arguments[n]<"u")break}var o=arguments[e],s={result:null,startTime:null,startDate:null};"function"==typeof o&&(r?(s.startTime=process.hrtime(),s.startDate=new Date,arguments[e]=t.channel.bindToContext(r(s,o))):arguments[e]=t.channel.bindToContext(o));var a=i.apply(this,arguments);return s.result=a,a})}},s=function(e,t){return o(e.prototype)},a=n(889)(r.dirname(i)+"/lib/Connection");["connect","changeUser","ping","statistics","end"].forEach((function(e){return s(a)(e)})),o(a)("createQuery",(function(e,n){return function(r){var i=process.hrtime(e.startTime),o=1e3*i[0]+i[1]/1e6|0;t.channel.publish("mysql",{query:e.result,callbackArgs:arguments,err:r,duration:o,time:e.startDate}),n.apply(this,arguments)}}));var c=n(8371)(r.dirname(i)+"/lib/Pool");return["_enqueueCallback"].forEach((function(e){return s(c)(e)})),e}},e.enable=function(){t.channel.registerMonkeyPatch("mysql",e.mysql)}})),en=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.postgresPool1=void 0;var t=N();e.postgresPool1={versionSpecifier:">= 1.0.0 < 3.0.0",patch:function(e){var n=e.prototype.connect;return e.prototype.connect=function(e){return e&&(arguments[0]=t.channel.bindToContext(e)),n.apply(this,arguments)},e}},e.enable=function(){t.channel.registerMonkeyPatch("pg-pool",e.postgresPool1)}})),tn=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.postgres7=e.postgres6=void 0;var t=N(),r=n(4434);e.postgres6={versionSpecifier:"6.*",patch:function(e,n){var i=e.Client.prototype.query,o="__diagnosticOriginalFunc";return e.Client.prototype.query=function(e,n,s){var a,c={query:{},database:{host:this.connectionParameters.host,port:this.connectionParameters.port},result:null,error:null,duration:0,time:new Date},l=process.hrtime();function u(e){e&&e[o]&&(e=e[o]);var n=t.channel.bindToContext((function(n,i){var o=process.hrtime(l);if(c.result=i&&{rowCount:i.rowCount,command:i.command},c.error=n,c.duration=Math.ceil(1e3*o[0]+o[1]/1e6),t.channel.publish("postgres",c),n){if(e)return e.apply(this,arguments);a&&a instanceof r.EventEmitter&&a.emit("error",n)}else e&&e.apply(this,arguments)}));try{return Object.defineProperty(n,o,{value:e}),n}catch{return e}}try{"string"==typeof e?n instanceof Array?(c.query.preparable={text:e,args:n},s=u(s)):(c.query.text=e,s?s=u(s):n=u(n)):("string"==typeof e.name?c.query.plan=e.name:e.values instanceof Array?c.query.preparable={text:e.text,args:e.values}:c.query.text=e.text,s?s=u(s):n?n=u(n):e.callback=u(e.callback))}catch{return i.apply(this,arguments)}return arguments[0]=e,arguments[1]=n,arguments[2]=s,arguments.length=arguments.length>3?arguments.length:3,a=i.apply(this,arguments)},e}},e.postgres7={versionSpecifier:">=7.* <=8.*",patch:function(e,n){var i=e.Client.prototype.query,o="__diagnosticOriginalFunc";return e.Client.prototype.query=function(e,n,s){var a,c=this,l=!!s,u={query:{},database:{host:this.connectionParameters.host,port:this.connectionParameters.port},result:null,error:null,duration:0,time:new Date},d=process.hrtime();function p(e){e&&e[o]&&(e=e[o]);var n=t.channel.bindToContext((function(n,i){var o=process.hrtime(d);if(u.result=i&&{rowCount:i.rowCount,command:i.command},u.error=n,u.duration=Math.ceil(1e3*o[0]+o[1]/1e6),t.channel.publish("postgres",u),n){if(e)return e.apply(this,arguments);a&&a instanceof r.EventEmitter&&a.emit("error",n)}else e&&e.apply(this,arguments)}));try{return Object.defineProperty(n,o,{value:e}),n}catch{return e}}try{"string"==typeof e?n instanceof Array?(u.query.preparable={text:e,args:n},s=(l="function"==typeof s)?p(s):s):(u.query.text=e,s?s=(l="function"==typeof s)?p(s):s:n=(l="function"==typeof n)?p(n):n):("string"==typeof e.name?u.query.plan=e.name:e.values instanceof Array?u.query.preparable={text:e.text,args:e.values}:u.query.text=e.text,s?(l="function"==typeof s,s=p(s)):n?n=(l="function"==typeof n)?p(n):n:(l="function"==typeof e.callback,e.callback=l?p(e.callback):e.callback))}catch{return i.apply(this,arguments)}return arguments[0]=e,arguments[1]=n,arguments[2]=s,arguments.length=arguments.length>3?arguments.length:3,a=i.apply(this,arguments),l?a:a.then((function(e){return p()(void 0,e),new c._Promise((function(t,n){t(e)}))})).catch((function(e){return p()(e,void 0),new c._Promise((function(t,n){n(e)}))}))},e}},e.enable=function(){t.channel.registerMonkeyPatch("pg",e.postgres6),t.channel.registerMonkeyPatch("pg",e.postgres7)}})),nn=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.redis=void 0;var t=N();e.redis={versionSpecifier:">= 2.0.0 < 4.0.0",patch:function(e){var n=e.RedisClient.prototype.internal_send_command;return e.RedisClient.prototype.internal_send_command=function(e){if(e){var r=e.callback;if(!r||!r.pubsubBound){var i=this.address,o=process.hrtime(),s=new Date;e.callback=t.channel.bindToContext((function(n,a){var c=process.hrtime(o),l=1e3*c[0]+c[1]/1e6|0;t.channel.publish("redis",{duration:l,address:i,commandObj:e,err:n,result:a,time:s}),"function"==typeof r&&r.apply(this,arguments)})),e.callback.pubsubBound=!0}}return n.call(this,e)},e}},e.enable=function(){t.channel.registerMonkeyPatch("redis",e.redis)}})),rn=S((e=>{"use strict";var t=e&&e.__assign||function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.tedious=void 0;var n=N();e.tedious={versionSpecifier:">= 6.0.0 < 9.0.0",patch:function(e){var r=e.Connection.prototype.makeRequest;return e.Connection.prototype.makeRequest=function(){var e,i,o,s=arguments[0];arguments[0].callback=(e=s.callback,i=process.hrtime(),o={query:{},database:{host:null,port:null},result:null,error:null,duration:0},n.channel.bindToContext((function(r,s,a){var c=process.hrtime(i);o=t(t({},o),{database:{host:this.connection.config.server,port:this.connection.config.options.port},result:!r&&{rowCount:s,rows:a},query:{text:this.parametersByName.statement.value},error:r,duration:Math.ceil(1e3*c[0]+c[1]/1e6)}),n.channel.publish("tedious",o),e.call(this,r,s,a)}))),r.apply(this,arguments)},e}},e.enable=function(){n.channel.registerMonkeyPatch("tedious",e.tedious)}})),on=S((e=>{"use strict";var t,n=e&&e.__extends||(t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},t(e,n)},function(e,n){function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}),r=e&&e.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.winston2=e.winston3=void 0;var i=N();e.winston3={versionSpecifier:"3.x",patch:function(e){var t=function(e){function t(t,n){var r=e.call(this,n)||this;return r.winston=t,r}return n(t,e),t.prototype.log=function(e,t){var n=e.message,o=e.level,s=e.meta,a=r(e,["message","level","meta"]);o="function"==typeof Symbol.for?e[Symbol.for("level")]:o,n=e instanceof Error?e:n;var c=function(e,t){return null!=e.config.npm.levels[t]?"npm":null!=e.config.syslog.levels[t]?"syslog":"unknown"}(this.winston,o);for(var l in s=s||{},a)a.hasOwnProperty(l)&&(s[l]=a[l]);i.channel.publish("winston",{message:n,level:o,levelKind:c,meta:s}),t()},t}(e.Transport);function o(){var n,r=arguments[0].levels||e.config.npm.levels;for(var i in r)r.hasOwnProperty(i)&&(n=void 0===n||r[i]>r[n]?i:n);this.add(new t(e,{level:n}))}var s=e.createLogger;e.createLogger=function(){var n,r=arguments[0].levels||e.config.npm.levels;for(var i in r)r.hasOwnProperty(i)&&(n=void 0===n||r[i]>r[n]?i:n);var a=s.apply(this,arguments);a.add(new t(e,{level:n}));var c=a.configure;return a.configure=function(){c.apply(this,arguments),o.apply(this,arguments)},a};var a=e.configure;return e.configure=function(){a.apply(this,arguments),o.apply(this,arguments)},e.add(new t(e)),e}},e.winston2={versionSpecifier:"2.x",patch:function(e){var t,n=e.Logger.prototype.log,r=function(n,r,o){var s;return s=t===e.config.npm.levels?"npm":t===e.config.syslog.levels?"syslog":"unknown",i.channel.publish("winston",{level:n,message:r,meta:o,levelKind:s}),r};return e.Logger.prototype.log=function(){return t=this.levels,this.filters&&0!==this.filters.length?this.filters[this.filters.length-1]!==r&&(this.filters=this.filters.filter((function(e){return e!==r})),this.filters.push(r)):this.filters=[r],n.apply(this,arguments)},e}},e.enable=function(){i.channel.registerMonkeyPatch("winston",e.winston2),i.channel.registerMonkeyPatch("winston",e.winston3)}})),sn=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.tedious=e.pgPool=e.pg=e.winston=e.redis=e.mysql=e.mongodb=e.mongodbCore=e.console=e.bunyan=e.azuresdk=void 0;var t=Kt();e.azuresdk=t;var n=Qt();e.bunyan=n;var r=Xt();e.console=r;var i=Yt();e.mongodbCore=i;var o=Jt();e.mongodb=o;var s=Zt();e.mysql=s;var a=en();e.pgPool=a;var c=tn();e.pg=c;var l=nn();e.redis=l;var u=rn();e.tedious=u;var d=on();e.winston=d,e.enable=function(){n.enable(),r.enable(),i.enable(),o.enable(),s.enable(),c.enable(),a.enable(),l.enable(),d.enable(),t.enable(),u.enable()}})),an=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.registerContextPreservation=e.IsInitialized=void 0;var t=O(),n=P();e.IsInitialized=!process.env.APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL;var r,i,o,s,a="DiagnosticChannel";if(e.IsInitialized){for(s in r=sn(),i=(process.env.APPLICATION_INSIGHTS_NO_PATCH_MODULES||"").split(","),o={bunyan:r.bunyan,console:r.console,mongodb:r.mongodb,mongodbCore:r.mongodbCore,mysql:r.mysql,redis:r.redis,pg:r.pg,pgPool:r.pgPool,winston:r.winston,azuresdk:r.azuresdk})-1===i.indexOf(s)&&(o[s].enable(),n.info(a,"Subscribed to "+s+" events"));i.length>0&&n.info(a,"Some modules will not be patched",i)}else n.info(a,"Not subscribing to dependency autocollection because APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL was set");e.registerContextPreservation=function(n){if(e.IsInitialized){var r=N();r.channel.addContextPreservation(n),r.channel.spanContextPropagator=t.AsyncScopeManager}}})),cn=S(((e,t)=>{"use strict";t.exports={requestContextHeader:"request-context",requestContextSourceKey:"appId",requestContextTargetKey:"appId",requestIdHeader:"request-id",parentIdHeader:"x-ms-request-id",rootIdHeader:"x-ms-request-root-id",correlationContextHeader:"correlation-context",traceparentHeader:"traceparent",traceStateHeader:"tracestate"}})),ln=S(((e,t)=>{"use strict";var r=e&&e.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)},i=n(8611),o=n(5692),s=n(7016),a=n(9140),c=P(),l=cn(),u=function(){function e(){}return e.getCookie=function(t,n){var r="";if(t&&t.length&&"string"==typeof n)for(var i=t+"=",o=n.split(";"),s=0;s<o.length;s++)if(n=o[s],(n=e.trim(n))&&0===n.indexOf(i)){r=n.substring(i.length,o[s].length);break}return r},e.trim=function(e){return"string"==typeof e?e.replace(/^\s+|\s+$/g,""):""},e.int32ArrayToBase64=function(e){var t=function(e,t){return String.fromCharCode(e>>t&255)},n=e.map((function(e){return t(e,24)+t(e,16)+t(e,8)+t(e,0)})).join(""),r=(Buffer.from?Buffer.from(n,"binary"):new Buffer(n,"binary")).toString("base64");return r.substr(0,r.indexOf("="))},e.random32=function(){return 4294967296*Math.random()|0},e.randomu32=function(){return e.random32()+2147483648},e.w3cTraceId=function(){for(var t,n=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],r="",i=0;i<4;i++)r+=n[15&(t=e.random32())]+n[t>>4&15]+n[t>>8&15]+n[t>>12&15]+n[t>>16&15]+n[t>>20&15]+n[t>>24&15]+n[t>>28&15];var o=n[8+4*Math.random()|0];return r.substr(0,8)+r.substr(9,4)+"4"+r.substr(13,3)+o+r.substr(16,3)+r.substr(19,12)},e.w3cSpanId=function(){return e.w3cTraceId().substring(16)},e.isValidW3CId=function(e){return 32===e.length&&"00000000000000000000000000000000"!==e},e.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)},e.isError=function(e){return e instanceof Error},e.isPrimitive=function(e){var t=typeof e;return"string"===t||"number"===t||"boolean"===t},e.isDate=function(e){return"[object Date]"===Object.prototype.toString.call(e)},e.msToTimeSpan=function(e){(isNaN(e)||e<0)&&(e=0);var t=(e/1e3%60).toFixed(7).replace(/0{0,4}$/,""),n=""+Math.floor(e/6e4)%60,r=""+Math.floor(e/36e5)%24,i=Math.floor(e/864e5);return t=t.indexOf(".")<2?"0"+t:t,n=n.length<2?"0"+n:n,(i>0?i+".":"")+(r=r.length<2?"0"+r:r)+":"+n+":"+t},e.extractError=function(e){var t=e;return{message:e.message,code:t.code||t.id||""}},e.extractObject=function(t){return t instanceof Error?e.extractError(t):"function"==typeof t.toJSON?t.toJSON():t},e.validateStringMap=function(t){if("object"==typeof t){var n={};for(var r in t){var i="",o=t[r],s=typeof o;if(e.isPrimitive(o))i=o.toString();else if(null===o||"undefined"===s)i="";else{if("function"===s){c.info("key: "+r+" was function; will not serialize");continue}var a=e.isArray(o)?o:e.extractObject(o);try{i=e.isPrimitive(a)?a:JSON.stringify(a)}catch(e){i=o.constructor.name.toString()+" (Error: "+e.message+")",c.info("key: "+r+", could not be serialized")}}n[r]=i.substring(0,e.MAX_PROPERTY_LENGTH)}return n}c.info("Invalid properties dropped from payload")},e.canIncludeCorrelationHeader=function(e,t){var n=e&&e.config&&e.config.correlationHeaderExcludedDomains;if(!n||0==n.length||!t)return!0;for(var r=0;r<n.length;r++)if(new RegExp(n[r].replace(/\./g,".").replace(/\*/g,".*")).test(s.parse(t).hostname))return!1;return!0},e.getCorrelationContextTarget=function(e,t){var n=e.headers&&e.headers[l.requestContextHeader];if(n)for(var r=n.split(","),i=0;i<r.length;++i){var o=r[i].split("=");if(2==o.length&&o[0]==t)return o[1]}},e.makeRequest=function(t,n,a,l){n&&0===n.indexOf("//")&&(n="https:"+n);var u=s.parse(n),d=r(r({},a),{host:u.hostname,port:u.port,path:u.pathname}),p=void 0;if("https:"===u.protocol&&(p=t.proxyHttpsUrl||void 0),"http:"===u.protocol&&(p=t.proxyHttpUrl||void 0),p){0===p.indexOf("//")&&(p="http:"+p);var h=s.parse(p);"https:"===h.protocol?(c.info("Proxies that use HTTPS are not supported"),p=void 0):d=r(r({},d),{host:h.hostname,port:h.port||"80",path:n,headers:r(r({},d.headers),{Host:u.hostname})})}var f="https:"===u.protocol&&!p;return f&&void 0!==t.httpsAgent?d.agent=t.httpsAgent:f||void 0===t.httpAgent?f&&(d.agent=e.tlsRestrictedAgent):d.agent=t.httpAgent,f?o.request(d,l):i.request(d,l)},e.safeIncludeCorrelationHeader=function(t,n,r){var i;if("string"==typeof r)i=r;else if(r instanceof Array)i=r.join(",");else if(r&&"function"==typeof r.toString)try{i=r.toString()}catch(e){c.warn("Outgoing request-context header could not be read. Correlation of requests may be lost.",e,r)}i?e.addCorrelationIdHeaderFromString(t,n,i):n.setHeader(l.requestContextHeader,l.requestContextSourceKey+"="+t.config.correlationId)},e.dumpObj=function(e){var t=Object.prototype.toString.call(e);return t+("[object Error]"===t?"{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e.name+"'":JSON.stringify(e))},e.addCorrelationIdHeaderFromString=function(e,t,n){var r=n.split(","),i=l.requestContextSourceKey+"=";r.some((function(e){return e.substring(0,i.length)===i}))||t.setHeader(l.requestContextHeader,n+","+l.requestContextSourceKey+"="+e.config.correlationId)},e.MAX_PROPERTY_LENGTH=8192,e.tlsRestrictedAgent=new o.Agent({keepAlive:!0,maxSockets:25,secureOptions:a.SSL_OP_NO_SSLv2|a.SSL_OP_NO_SSLv3|a.SSL_OP_NO_TLSv1|a.SSL_OP_NO_TLSv1_1}),e}();t.exports=u})),un=S(((e,t)=>{"use strict";var n=ln(),r=P(),i=function(){function e(){}return e.queryCorrelationId=function(t,i){var o=t.profileQueryEndpoint+"/api/profiles/"+t.instrumentationKey+"/appId";if(e.completedLookups.hasOwnProperty(o))i(e.completedLookups[o]);else if(e.pendingLookups[o])e.pendingLookups[o].push(i);else{e.pendingLookups[o]=[i];var s=function(){if(e.pendingLookups[o]){var i={method:"GET",disableAppInsightsAutoCollection:!0};r.info(e.TAG,i);var a=n.makeRequest(t,o,i,(function(n){if(200===n.statusCode){var i="";n.setEncoding("utf-8"),n.on("data",(function(e){i+=e})),n.on("end",(function(){r.info(e.TAG,i);var t=e.correlationIdPrefix+i;e.completedLookups[o]=t,e.pendingLookups[o]&&e.pendingLookups[o].forEach((function(e){return e(t)})),delete e.pendingLookups[o]}))}else n.statusCode>=400&&n.statusCode<500?(e.completedLookups[o]=void 0,delete e.pendingLookups[o]):setTimeout(s,t.correlationIdRetryIntervalMs)}));a&&(a.on("error",(function(t){r.warn(e.TAG,t)})),a.end())}};setTimeout(s,0)}},e.cancelCorrelationIdQuery=function(t,n){var r=t.profileQueryEndpoint+"/api/profiles/"+t.instrumentationKey+"/appId",i=e.pendingLookups[r];i&&(e.pendingLookups[r]=i.filter((function(e){return e!=n})),0==e.pendingLookups[r].length&&delete e.pendingLookups[r])},e.generateRequestId=function(t){if(t){"."!==(t="|"==t[0]?t:"|"+t)[t.length-1]&&(t+=".");var n=(e.currentRootId++).toString(16);return e.appendSuffix(t,n,"_")}return e.generateRootId()},e.getRootId=function(e){var t=e.indexOf(".");t<0&&(t=e.length);var n="|"===e[0]?1:0;return e.substring(n,t)},e.generateRootId=function(){return"|"+n.w3cTraceId()+"."},e.appendSuffix=function(t,r,i){if(t.length+r.length<e.requestIdMaxLength)return t+r+i;var o=e.requestIdMaxLength-9;if(t.length>o)for(;o>1;--o){var s=t[o-1];if("."===s||"_"===s)break}if(o<=1)return e.generateRootId();for(r=n.randomu32().toString(16);r.length<8;)r="0"+r;return t.substring(0,o)+r+"#"},e.TAG="CorrelationIdManager",e.correlationIdPrefix="cid-v1:",e.w3cEnabled=!0,e.pendingLookups={},e.completedLookups={},e.requestIdMaxLength=1024,e.currentRootId=n.randomu32(),e}();t.exports=i})),dn=S(((e,t)=>{"use strict";var n=ln(),r=un(),i=function(){function e(t,i){if(this.traceFlag=e.DEFAULT_TRACE_FLAG,this.version=e.DEFAULT_VERSION,t&&"string"==typeof t)if(t.split(",").length>1)this.traceId=n.w3cTraceId(),this.spanId=n.w3cTraceId().substr(0,16);else{var o=t.trim().split("-"),s=o.length;s>=4?(this.version=o[0],this.traceId=o[1],this.spanId=o[2],this.traceFlag=o[3]):(this.traceId=n.w3cTraceId(),this.spanId=n.w3cTraceId().substr(0,16)),this.version.match(/^[0-9a-f]{2}$/g)||(this.version=e.DEFAULT_VERSION,this.traceId=n.w3cTraceId()),"00"===this.version&&4!==s&&(this.traceId=n.w3cTraceId(),this.spanId=n.w3cTraceId().substr(0,16)),"ff"===this.version&&(this.version=e.DEFAULT_VERSION,this.traceId=n.w3cTraceId(),this.spanId=n.w3cTraceId().substr(0,16)),this.version.match(/^0[0-9a-f]$/g)||(this.version=e.DEFAULT_VERSION),this.traceFlag.match(/^[0-9a-f]{2}$/g)||(this.traceFlag=e.DEFAULT_TRACE_FLAG,this.traceId=n.w3cTraceId()),e.isValidTraceId(this.traceId)||(this.traceId=n.w3cTraceId()),e.isValidSpanId(this.spanId)||(this.spanId=n.w3cTraceId().substr(0,16),this.traceId=n.w3cTraceId()),this.parentId=this.getBackCompatRequestId()}else if(i){this.parentId=i.slice();var a=r.getRootId(i);e.isValidTraceId(a)||(this.legacyRootId=a,a=n.w3cTraceId()),-1!==i.indexOf("|")&&(i=i.substring(1+i.substring(0,i.length-1).lastIndexOf("."),i.length-1)),this.traceId=a,this.spanId=i}else this.traceId=n.w3cTraceId(),this.spanId=n.w3cTraceId().substr(0,16)}return e.isValidTraceId=function(e){return e.match(/^[0-9a-f]{32}$/)&&"00000000000000000000000000000000"!==e},e.isValidSpanId=function(e){return e.match(/^[0-9a-f]{16}$/)&&"0000000000000000"!==e},e.formatOpenTelemetryTraceFlags=function(e){var t="0"+e.toString(16);return t.substring(t.length-2)},e.prototype.getBackCompatRequestId=function(){return"|"+this.traceId+"."+this.spanId+"."},e.prototype.toString=function(){return this.version+"-"+this.traceId+"-"+this.spanId+"-"+this.traceFlag},e.prototype.updateSpanId=function(){this.spanId=n.w3cTraceId().substr(0,16)},e.DEFAULT_TRACE_FLAG="01",e.DEFAULT_VERSION="00",e}();t.exports=i})),pn=S(((e,t)=>{"use strict";var n=function(){function e(e){this.fieldmap=[],e&&(this.fieldmap=this.parseHeader(e))}return e.prototype.toString=function(){var e=this.fieldmap;return e&&0!=e.length?e.join(", "):null},e.validateKeyChars=function(e){var t=e.split("@");if(2==t.length){var n=t[0].trim(),r=t[1].trim(),i=Boolean(n.match(/^[\ ]?[a-z0-9\*\-\_/]{1,241}$/)),o=Boolean(r.match(/^[\ ]?[a-z0-9\*\-\_/]{1,14}$/));return i&&o}return 1==t.length&&Boolean(e.match(/^[\ ]?[a-z0-9\*\-\_/]{1,256}$/))},e.prototype.parseHeader=function(t){var n=[],r={},i=t.split(",");if(i.length>32)return null;for(var o=0,s=i;o<s.length;o++){var a=s[o].trim();if(0!==a.length){var c=a.split("=");if(2!==c.length||!e.validateKeyChars(c[0])||r[c[0]])return null;r[c[0]]=!0,n.push(a)}}return n},e.strict=!0,e}();t.exports=n})),hn=S(((e,t)=>{"use strict";t.exports=function(){}})),fn=S(((e,t)=>{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},n(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return r(t,e),t}(hn());t.exports=i})),mn=S(((e,t)=>{"use strict";t.exports=function(){}})),gn=S(((e,t)=>{"use strict";t.exports=function(){this.applicationVersion="ai.application.ver",this.deviceId="ai.device.id",this.deviceLocale="ai.device.locale",this.deviceModel="ai.device.model",this.deviceOEMName="ai.device.oemName",this.deviceOSVersion="ai.device.osVersion",this.deviceType="ai.device.type",this.locationIp="ai.location.ip",this.operationId="ai.operation.id",this.operationName="ai.operation.name",this.operationParentId="ai.operation.parentId",this.operationSyntheticSource="ai.operation.syntheticSource",this.operationCorrelationVector="ai.operation.correlationVector",this.sessionId="ai.session.id",this.sessionIsFirst="ai.session.isFirst",this.userAccountId="ai.user.accountId",this.userId="ai.user.id",this.userAuthUserId="ai.user.authUserId",this.cloudRole="ai.cloud.role",this.cloudRoleInstance="ai.cloud.roleInstance",this.internalSdkVersion="ai.internal.sdkVersion",this.internalAgentVersion="ai.internal.agentVersion",this.internalNodeName="ai.internal.nodeName"}})),yn=S(((e,t)=>{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},n(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){return e.call(this)||this}return r(t,e),t}(mn());t.exports=i})),bn=S(((e,t)=>{"use strict";var n,r;(r=n||(n={}))[r.Measurement=0]="Measurement",r[r.Aggregation=1]="Aggregation",t.exports=n})),vn=S(((e,t)=>{"use strict";var n=bn();t.exports=function(){this.kind=n.Measurement}})),Sn=S(((e,t)=>{"use strict";t.exports=function(){this.ver=1,this.sampleRate=100,this.tags={}}})),wn=S(((e,t)=>{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},n(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return r(t,e),t}(hn());t.exports=i})),Cn=S(((e,t)=>{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},n(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.exceptions=[],t.properties={},t.measurements={},t}return r(t,e),t}(hn());t.exports=i})),Tn=S(((e,t)=>{"use strict";t.exports=function(){this.hasFullStack=!0,this.parsedStack=[]}})),En=S(((e,t)=>{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},n(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t}return r(t,e),t}(hn());t.exports=i})),_n=S(((e,t)=>{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},n(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.metrics=[],t.properties={},t}return r(t,e),t}(hn());t.exports=i})),xn=S(((e,t)=>{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},n(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return r(t,e),t}(wn());t.exports=i})),Rn=S(((e,t)=>{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},n(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.success=!0,t.properties={},t.measurements={},t}return r(t,e),t}(hn());t.exports=i})),In=S(((e,t)=>{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},n(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=function(e){function t(){var t=e.call(this)||this;return t.ver=2,t.properties={},t.measurements={},t}return r(t,e),t}(hn());t.exports=i})),Pn=S(((e,t)=>{"use strict";var n,r;(r=n||(n={}))[r.Verbose=0]="Verbose",r[r.Information=1]="Information",r[r.Warning=2]="Warning",r[r.Error=3]="Error",r[r.Critical=4]="Critical",t.exports=n})),On=S(((e,t)=>{"use strict";t.exports=function(){}})),Dn=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AvailabilityData=fn(),e.Base=mn(),e.ContextTagKeys=gn(),e.Data=yn(),e.DataPoint=vn(),e.DataPointType=bn(),e.Domain=hn(),e.Envelope=Sn(),e.EventData=wn(),e.ExceptionData=Cn(),e.ExceptionDetails=Tn(),e.MessageData=En(),e.MetricData=_n(),e.PageViewData=xn(),e.RemoteDependencyData=Rn(),e.RequestData=In(),e.SeverityLevel=Pn(),e.StackFrame=On()})),An=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.domainSupportsProperties=e.RemoteDependencyDataConstants=void 0;var t=Dn(),n=function(){function e(){}return e.TYPE_HTTP="Http",e.TYPE_AI="Http (tracked component)",e}();e.RemoteDependencyDataConstants=n,e.domainSupportsProperties=function(e){return"properties"in e||e instanceof t.EventData||e instanceof t.ExceptionData||e instanceof t.MessageData||e instanceof t.MetricData||e instanceof t.PageViewData||e instanceof t.RemoteDependencyData||e instanceof t.RequestData}})),kn=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Nn=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Ln=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),jn=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Mn=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Fn=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),qn=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Bn=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Un=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),zn=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Gn=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Hn=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Vn=S((e=>{"use strict";var t,n;Object.defineProperty(e,"__esModule",{value:!0}),e.TelemetryType=e.TelemetryTypeString=e.baseTypeToTelemetryType=e.telemetryTypeToBaseType=void 0,e.telemetryTypeToBaseType=function(e){switch(e){case t.Event:return"EventData";case t.Exception:return"ExceptionData";case t.Trace:return"MessageData";case t.Metric:return"MetricData";case t.Request:return"RequestData";case t.Dependency:return"RemoteDependencyData";case t.Availability:return"AvailabilityData";case t.PageView:return"PageViewData"}},e.baseTypeToTelemetryType=function(e){switch(e){case"EventData":return t.Event;case"ExceptionData":return t.Exception;case"MessageData":return t.Trace;case"MetricData":return t.Metric;case"RequestData":return t.Request;case"RemoteDependencyData":return t.Dependency;case"AvailabilityData":return t.Availability;case"PageViewData":return t.PageView}},e.TelemetryTypeString={Event:"EventData",Exception:"ExceptionData",Trace:"MessageData",Metric:"MetricData",Request:"RequestData",Dependency:"RemoteDependencyData",Availability:"AvailabilityData",PageView:"PageViewData"},(n=t=e.TelemetryType||(e.TelemetryType={}))[n.Event=0]="Event",n[n.Exception=1]="Exception",n[n.Trace=2]="Trace",n[n.Metric=3]="Metric",n[n.Request=4]="Request",n[n.Dependency=5]="Dependency",n[n.Availability=6]="Availability",n[n.PageView=7]="PageView"})),$n=S((e=>{"use strict";var t=e&&e.__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]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(kn(),e),n(Nn(),e),n(Ln(),e),n(jn(),e),n(Mn(),e),n(Fn(),e),n(qn(),e),n(Bn(),e),n(Un(),e),n(zn(),e),n(Gn(),e),n(Hn(),e),n(Vn(),e)})),Wn=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Kn=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Qn=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Xn=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Yn=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Jn=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),Zn=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),er=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),tr=S((e=>{"use strict";var t=e&&e.__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]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(Wn(),e),n(Kn(),e),n(Qn(),e),n(Xn(),e),n(Yn(),e),n(Jn(),e),n(Zn(),e),n(er(),e)})),nr=S((e=>{"use strict";var t=e&&e.__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]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(An(),e),n(Dn(),e),n($n(),e),n(tr(),e)})),rr=S(((e,t)=>{"use strict";var n=function(){function e(){}return e.prototype.getUrl=function(){return this.url},e.prototype.RequestParser=function(){this.startTime=+new Date},e.prototype._setStatus=function(e,t){var n=+new Date;this.duration=n-this.startTime,this.statusCode=e;var r=this.properties||{};if(t)if("string"==typeof t)r.error=t;else if(t instanceof Error)r.error=t.message;else if("object"==typeof t)for(var i in t)r[i]=t[i]&&t[i].toString&&t[i].toString();this.properties=r},e.prototype._isSuccess=function(){return 0<this.statusCode&&this.statusCode<400},e}();t.exports=n})),ir=S(((e,t)=>{"use strict";var r,i=e&&e.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=n(7016),s=nr(),a=ln(),c=cn(),l=rr(),u=un(),d=pn(),p=dn(),h=function(e){function t(t,n){var r=e.call(this)||this;return t&&(r.method=t.method,r.url=r._getAbsoluteUrl(t),r.startTime=+new Date,r.socketRemoteAddress=t.socket&&t.socket.remoteAddress,r.parseHeaders(t,n),t.connection&&(r.connectionRemoteAddress=t.connection.remoteAddress,r.legacySocketRemoteAddress=t.connection.socket&&t.connection.socket.remoteAddress)),r}return i(t,e),t.prototype.onError=function(e,t){this._setStatus(void 0,e),t&&(this.duration=t)},t.prototype.onResponse=function(e,t){this._setStatus(e.statusCode,void 0),t&&(this.duration=t)},t.prototype.getRequestTelemetry=function(e){var t={id:this.requestId,name:this.method+" "+o.parse(this.url).pathname,url:this.url,source:this.sourceCorrelationId,duration:this.duration,resultCode:this.statusCode?this.statusCode.toString():null,success:this._isSuccess(),properties:this.properties};if(e&&e.time?t.time=e.time:this.startTime&&(t.time=new Date(this.startTime)),e){for(var n in e)t[n]||(t[n]=e[n]);if(e.properties)for(var n in e.properties)t.properties[n]=e.properties[n]}return t},t.prototype.getRequestTags=function(e){var n={};for(var r in e)n[r]=e[r];return n[t.keys.locationIp]=e[t.keys.locationIp]||this._getIp(),n[t.keys.sessionId]=e[t.keys.sessionId]||this._getId("ai_session"),n[t.keys.userId]=e[t.keys.userId]||this._getId("ai_user"),n[t.keys.userAuthUserId]=e[t.keys.userAuthUserId]||this._getId("ai_authUser"),n[t.keys.operationName]=this.getOperationName(e),n[t.keys.operationParentId]=this.getOperationParentId(e),n[t.keys.operationId]=this.getOperationId(e),n},t.prototype.getOperationId=function(e){return e[t.keys.operationId]||this.operationId},t.prototype.getOperationParentId=function(e){return e[t.keys.operationParentId]||this.parentId||this.getOperationId(e)},t.prototype.getOperationName=function(e){return e[t.keys.operationName]||this.method+" "+o.parse(this.url).pathname},t.prototype.getRequestId=function(){return this.requestId},t.prototype.getCorrelationContextHeader=function(){return this.correlationContextHeader},t.prototype.getTraceparent=function(){return this.traceparent},t.prototype.getTracestate=function(){return this.tracestate},t.prototype.getLegacyRootId=function(){return this.legacyRootId},t.prototype._getAbsoluteUrl=function(e){if(!e.headers)return e.url;var t=e.connection?e.connection.encrypted:null,n=o.parse(e.url),r=n.pathname,i=n.search,s=t||"https"==e.headers["x-forwarded-proto"]?"https":"http";return o.format({protocol:s,host:e.headers.host,pathname:r,search:i})},t.prototype._getIp=function(){var e=/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/,t=function(t){var n=e.exec(t);if(n)return n[0]},n=t(this.rawHeaders["x-forwarded-for"])||t(this.rawHeaders["x-client-ip"])||t(this.rawHeaders["x-real-ip"])||t(this.connectionRemoteAddress)||t(this.socketRemoteAddress)||t(this.legacySocketRemoteAddress);return!n&&this.connectionRemoteAddress&&this.connectionRemoteAddress.substr&&"::"===this.connectionRemoteAddress.substr(0,2)&&(n="127.0.0.1"),n},t.prototype._getId=function(e){var n=this.rawHeaders&&this.rawHeaders.cookie&&"string"==typeof this.rawHeaders.cookie&&this.rawHeaders.cookie||"";return t.parseId(a.getCookie(e,n))},t.prototype.setBackCompatFromThisTraceContext=function(){this.operationId=this.traceparent.traceId,this.traceparent.legacyRootId&&(this.legacyRootId=this.traceparent.legacyRootId),this.parentId=this.traceparent.parentId,this.traceparent.updateSpanId(),this.requestId=this.traceparent.getBackCompatRequestId()},t.prototype.parseHeaders=function(e,t){if(this.rawHeaders=e.headers||e.rawHeaders,this.userAgent=e.headers&&e.headers["user-agent"],this.sourceCorrelationId=a.getCorrelationContextTarget(e,c.requestContextSourceKey),e.headers){var n=e.headers[c.traceStateHeader]?e.headers[c.traceStateHeader].toString():null,r=e.headers[c.traceparentHeader]?e.headers[c.traceparentHeader].toString():null,i=e.headers[c.requestIdHeader]?e.headers[c.requestIdHeader].toString():null,o=e.headers[c.parentIdHeader]?e.headers[c.parentIdHeader].toString():null,s=e.headers[c.rootIdHeader]?e.headers[c.rootIdHeader].toString():null;this.correlationContextHeader=e.headers[c.correlationContextHeader]?e.headers[c.correlationContextHeader].toString():null,u.w3cEnabled&&(r||n)?(this.traceparent=new p(r?r.toString():null),this.tracestate=r&&n&&new d(n?n.toString():null),this.setBackCompatFromThisTraceContext()):i?u.w3cEnabled?(this.traceparent=new p(null,i),this.setBackCompatFromThisTraceContext()):(this.parentId=i,this.requestId=u.generateRequestId(this.parentId),this.operationId=u.getRootId(this.requestId)):u.w3cEnabled?(this.traceparent=new p,this.traceparent.parentId=o,this.traceparent.legacyRootId=s||o,this.setBackCompatFromThisTraceContext()):(this.parentId=o,this.requestId=u.generateRequestId(s||this.parentId),this.correlationContextHeader=null,this.operationId=u.getRootId(this.requestId)),t&&(this.requestId=t,this.operationId=u.getRootId(this.requestId))}},t.parseId=function(e){var t=e.split("|");return t.length>0?t[0]:""},t.keys=new s.ContextTagKeys,t}(l);t.exports=h})),or=S(((e,t)=>{var n;e=t.exports=W,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(){},e.SEMVER_SPEC_VERSION="2.0.0";var r=256,i=Number.MAX_SAFE_INTEGER||9007199254740991,o=e.re=[],s=e.src=[],a=0,c=a++;s[c]="0|[1-9]\\d*";var l=a++;s[l]="[0-9]+";var u=a++;s[u]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var d=a++;s[d]="("+s[c]+")\\.("+s[c]+")\\.("+s[c]+")";var p=a++;s[p]="("+s[l]+")\\.("+s[l]+")\\.("+s[l]+")";var h=a++;s[h]="(?:"+s[c]+"|"+s[u]+")";var f=a++;s[f]="(?:"+s[l]+"|"+s[u]+")";var m=a++;s[m]="(?:-("+s[h]+"(?:\\."+s[h]+")*))";var g=a++;s[g]="(?:-?("+s[f]+"(?:\\."+s[f]+")*))";var y=a++;s[y]="[0-9A-Za-z-]+";var b=a++;s[b]="(?:\\+("+s[y]+"(?:\\."+s[y]+")*))";var v=a++,S="v?"+s[d]+s[m]+"?"+s[b]+"?";s[v]="^"+S+"$";var w="[v=\\s]*"+s[p]+s[g]+"?"+s[b]+"?",C=a++;s[C]="^"+w+"$";var T=a++;s[T]="((?:<|>)?=?)";var E=a++;s[E]=s[l]+"|x|X|\\*";var _=a++;s[_]=s[c]+"|x|X|\\*";var x=a++;s[x]="[v=\\s]*("+s[_]+")(?:\\.("+s[_]+")(?:\\.("+s[_]+")(?:"+s[m]+")?"+s[b]+"?)?)?";var R=a++;s[R]="[v=\\s]*("+s[E]+")(?:\\.("+s[E]+")(?:\\.("+s[E]+")(?:"+s[g]+")?"+s[b]+"?)?)?";var I=a++;s[I]="^"+s[T]+"\\s*"+s[x]+"$";var P=a++;s[P]="^"+s[T]+"\\s*"+s[R]+"$";var O=a++;s[O]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var D=a++;s[D]="(?:~>?)";var A=a++;s[A]="(\\s*)"+s[D]+"\\s+",o[A]=new RegExp(s[A],"g");var k=a++;s[k]="^"+s[D]+s[x]+"$";var N=a++;s[N]="^"+s[D]+s[R]+"$";var L=a++;s[L]="(?:\\^)";var j=a++;s[j]="(\\s*)"+s[L]+"\\s+",o[j]=new RegExp(s[j],"g");var M=a++;s[M]="^"+s[L]+s[x]+"$";var F=a++;s[F]="^"+s[L]+s[R]+"$";var q=a++;s[q]="^"+s[T]+"\\s*("+w+")$|^$";var B=a++;s[B]="^"+s[T]+"\\s*("+S+")$|^$";var U=a++;s[U]="(\\s*)"+s[T]+"\\s*("+w+"|"+s[x]+")",o[U]=new RegExp(s[U],"g");var z=a++;s[z]="^\\s*("+s[x]+")\\s+-\\s+("+s[x]+")\\s*$";var G=a++;s[G]="^\\s*("+s[R]+")\\s+-\\s+("+s[R]+")\\s*$";var H,V=a++;for(s[V]="(<|>)?=?\\s*\\*",H=0;H<35;H++)n(H,s[H]),o[H]||(o[H]=new RegExp(s[H]));function $(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof W)return e;if("string"!=typeof e||e.length>r)return null;if(!(t.loose?o[C]:o[v]).test(e))return null;try{return new W(e,t)}catch{return null}}function W(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof W){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 W))return new W(e,t);n("SemVer",e,t),this.options=t,this.loose=!!t.loose;var s=e.trim().match(t.loose?o[C]:o[v]);if(!s)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>i||this.major<0)throw new TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t<i)return t}return e})):this.prerelease=[],this.build=s[5]?s[5].split("."):[],this.format()}e.parse=$,e.valid=function(e,t){var n=$(e,t);return n?n.version:null},e.clean=function(e,t){var n=$(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null},e.SemVer=W,W.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},W.prototype.toString=function(){return this.version},W.prototype.compare=function(e){return n("SemVer.compare",this.version,this.options,e),e instanceof W||(e=new W(e,this.options)),this.compareMain(e)||this.comparePre(e)},W.prototype.compareMain=function(e){return e instanceof W||(e=new W(e,this.options)),Q(this.major,e.major)||Q(this.minor,e.minor)||Q(this.patch,e.patch)},W.prototype.comparePre=function(e){if(e instanceof W||(e=new W(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;var t=0;do{var r=this.prerelease[t],i=e.prerelease[t];if(n("prerelease compare",t,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return Q(r,i)}while(++t)},W.prototype.inc=function(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":(0!==this.minor||0!==this.patch||0===this.prerelease.length)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(0!==this.patch||0===this.prerelease.length)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var n=this.prerelease.length;--n>=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},e.inc=function(e,t,n,r){"string"==typeof n&&(r=n,n=void 0);try{return new W(e,n).inc(t,r).version}catch{return null}},e.diff=function(e,t){if(Z(e,t))return null;var n=$(e),r=$(t),i="";if(n.prerelease.length||r.prerelease.length){i="pre";var o="prerelease"}for(var s in n)if(("major"===s||"minor"===s||"patch"===s)&&n[s]!==r[s])return i+s;return o},e.compareIdentifiers=Q;var K=/^[0-9]+$/;function Q(e,t){var n=K.test(e),r=K.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e<t?-1:1}function X(e,t,n){return new W(e,n).compare(new W(t,n))}function Y(e,t,n){return X(e,t,n)>0}function J(e,t,n){return X(e,t,n)<0}function Z(e,t,n){return 0===X(e,t,n)}function ee(e,t,n){return 0!==X(e,t,n)}function te(e,t,n){return X(e,t,n)>=0}function ne(e,t,n){return X(e,t,n)<=0}function re(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 Z(e,n,r);case"!=":return ee(e,n,r);case">":return Y(e,n,r);case">=":return te(e,n,r);case"<":return J(e,n,r);case"<=":return ne(e,n,r);default:throw new TypeError("Invalid operator: "+t)}}function ie(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof ie){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof ie))return new ie(e,t);n("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===oe?this.value="":this.value=this.operator+this.semver.version,n("comp",this)}e.rcompareIdentifiers=function(e,t){return Q(t,e)},e.major=function(e,t){return new W(e,t).major},e.minor=function(e,t){return new W(e,t).minor},e.patch=function(e,t){return new W(e,t).patch},e.compare=X,e.compareLoose=function(e,t){return X(e,t,!0)},e.rcompare=function(e,t,n){return X(t,e,n)},e.sort=function(t,n){return t.sort((function(t,r){return e.compare(t,r,n)}))},e.rsort=function(t,n){return t.sort((function(t,r){return e.rcompare(t,r,n)}))},e.gt=Y,e.lt=J,e.eq=Z,e.neq=ee,e.gte=te,e.lte=ne,e.cmp=re,e.Comparator=ie;var oe={};function se(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof se)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new se(e.raw,t);if(e instanceof ie)return new se(e.value,t);if(!(this instanceof se))return new se(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function ae(e){return!e||"x"===e.toLowerCase()||"*"===e}function ce(e,t,n,r,i,o,s,a,c,l,u,d,p){return((t=ae(n)?"":ae(r)?">="+n+".0.0":ae(i)?">="+n+"."+r+".0":">="+t)+" "+(a=ae(c)?"":ae(l)?"<"+(+c+1)+".0.0":ae(u)?"<"+c+"."+(+l+1)+".0":d?"<="+c+"."+l+"."+u+"-"+d:"<="+a)).trim()}function le(e,t,r){for(var i=0;i<e.length;i++)if(!e[i].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(i=0;i<e.length;i++)if(n(e[i].semver),e[i].semver!==oe&&e[i].semver.prerelease.length>0){var o=e[i].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch)return!0}return!1}return!0}function ue(e,t,n){try{t=new se(t,n)}catch{return!1}return t.test(e)}function de(e,t,n,r){var i,o,s,a,c;switch(e=new W(e,r),t=new se(t,r),n){case">":i=Y,o=ne,s=J,a=">",c=">=";break;case"<":i=J,o=te,s=Y,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(ue(e,t,r))return!1;for(var l=0;l<t.set.length;++l){var u=t.set[l],d=null,p=null;if(u.forEach((function(e){e.semver===oe&&(e=new ie(">=0.0.0")),d=d||e,p=p||e,i(e.semver,d.semver,r)?d=e:s(e.semver,p.semver,r)&&(p=e)})),d.operator===a||d.operator===c||(!p.operator||p.operator===a)&&o(e,p.semver))return!1;if(p.operator===c&&s(e,p.semver))return!1}return!0}ie.prototype.parse=function(e){var t=this.options.loose?o[q]:o[B],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 W(n[2],this.options.loose):this.semver=oe},ie.prototype.toString=function(){return this.value},ie.prototype.test=function(e){return n("Comparator.test",e,this.options.loose),this.semver===oe||("string"==typeof e&&(e=new W(e,this.options)),re(e,this.operator,this.semver,this.options))},ie.prototype.intersects=function(e,t){if(!(e instanceof ie))throw new TypeError("a Comparator is required");var n;if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),""===this.operator)return n=new se(e.value,t),ue(this.value,n,t);if(""===e.operator)return n=new se(this.value,t),ue(e.semver,n,t);var r=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=re(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=re(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||i||o&&s||a||c},e.Range=se,se.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},se.prototype.toString=function(){return this.range},se.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var r=t?o[G]:o[z];e=e.replace(r,ce),n("hyphen replace",e),e=e.replace(o[U],"$1$2$3"),n("comparator trim",e,o[U]),e=(e=(e=e.replace(o[A],"$1~")).replace(o[j],"$1^")).split(/\s+/).join(" ");var i=t?o[q]:o[B],s=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?o[F]:o[M];return e.replace(r,(function(t,r,i,o,s){var a;return n("caret",e,t,r,i,o,s),ae(r)?a="":ae(i)?a=">="+r+".0.0 <"+(+r+1)+".0.0":ae(o)?a="0"===r?">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":">="+r+"."+i+".0 <"+(+r+1)+".0.0":s?(n("replaceCaret pr",s),a="0"===r?"0"===i?">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+i+"."+(+o+1):">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+o+"-"+s+" <"+(+r+1)+".0.0"):(n("no pr"),a="0"===r?"0"===i?">="+r+"."+i+"."+o+" <"+r+"."+i+"."+(+o+1):">="+r+"."+i+"."+o+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+o+" <"+(+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?o[N]:o[k];return e.replace(r,(function(t,r,i,o,s){var a;return n("tilde",e,t,r,i,o,s),ae(r)?a="":ae(i)?a=">="+r+".0.0 <"+(+r+1)+".0.0":ae(o)?a=">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":s?(n("replaceTilde pr",s),a=">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+(+i+1)+".0"):a=">="+r+"."+i+"."+o+" <"+r+"."+(+i+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?o[P]:o[I];return e.replace(r,(function(t,r,i,o,s,a){n("xRange",e,t,r,i,o,s,a);var c=ae(i),l=c||ae(o),u=l||ae(s);return"="===r&&u&&(r=""),c?t=">"===r||"<"===r?"<0.0.0":"*":r&&u?(l&&(o=0),s=0,">"===r?(r=">=",l?(i=+i+1,o=0,s=0):(o=+o+1,s=0)):"<="===r&&(r="<",l?i=+i+1:o=+o+1),t=r+i+"."+o+"."+s):l?t=">="+i+".0.0 <"+(+i+1)+".0.0":u&&(t=">="+i+"."+o+".0 <"+i+"."+(+o+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(o[V],"")}(e,t),n("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(s=s.filter((function(e){return!!e.match(i)}))),s.map((function(e){return new ie(e,this.options)}),this)},se.prototype.intersects=function(e,t){if(!(e instanceof se))throw new TypeError("a Range is required");return this.set.some((function(n){return n.every((function(n){return e.set.some((function(e){return e.every((function(e){return n.intersects(e,t)}))}))}))}))},e.toComparators=function(e,t){return new se(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},se.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new W(e,this.options));for(var t=0;t<this.set.length;t++)if(le(this.set[t],e,this.options))return!0;return!1},e.satisfies=ue,e.maxSatisfying=function(e,t,n){var r=null,i=null;try{var o=new se(t,n)}catch{return null}return e.forEach((function(e){o.test(e)&&(!r||-1===i.compare(e))&&(i=new W(r=e,n))})),r},e.minSatisfying=function(e,t,n){var r=null,i=null;try{var o=new se(t,n)}catch{return null}return e.forEach((function(e){o.test(e)&&(!r||1===i.compare(e))&&(i=new W(r=e,n))})),r},e.minVersion=function(e,t){e=new se(e,t);var n=new W("0.0.0");if(e.test(n)||(n=new W("0.0.0-0"),e.test(n)))return n;n=null;for(var r=0;r<e.set.length;++r)e.set[r].forEach((function(e){var t=new W(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":(!n||Y(n,t))&&(n=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}));return n&&e.test(n)?n:null},e.validRange=function(e,t){try{return new se(e,t).range||"*"}catch{return null}},e.ltr=function(e,t,n){return de(e,t,"<",n)},e.gtr=function(e,t,n){return de(e,t,">",n)},e.outside=de,e.prerelease=function(e,t){var n=$(e,t);return n&&n.prerelease.length?n.prerelease:null},e.intersects=function(e,t,n){return e=new se(e,n),t=new se(t,n),e.intersects(t)},e.coerce=function(e){if(e instanceof W)return e;if("string"!=typeof e)return null;var t=e.match(o[O]);return null==t?null:$(t[1]+"."+(t[2]||"0")+"."+(t[3]||"0"))}})),sr=S(((e,t)=>{"use strict";function n(e){return"function"==typeof e}var r=console.error.bind(console);function i(e,t,n){var r=!!e[t]&&e.propertyIsEnumerable(t);Object.defineProperty(e,t,{configurable:!0,enumerable:r,writable:!0,value:n})}function o(e){e&&e.logger&&(n(e.logger)?r=e.logger:r("new logger isn't a function, not replacing"))}function s(e,t,o){if(e&&e[t]){if(!o)return r("no wrapper function"),void r((new Error).stack);if(n(e[t])&&n(o)){var s=e[t],a=o(s,t);return i(a,"__original",s),i(a,"__unwrap",(function(){e[t]===a&&i(e,t,s)})),i(a,"__wrapped",!0),i(e,t,a),a}r("original object and wrapper must be functions")}else r("no original function "+t+" to wrap")}function a(e,t){return e&&e[t]?e[t].__unwrap?e[t].__unwrap():void r("no original to unwrap to -- has "+t+" already been unwrapped?"):(r("no function to unwrap."),void r((new Error).stack))}o.wrap=s,o.massWrap=function(e,t,n){if(!e)return r("must provide one or more modules to patch"),void r((new Error).stack);Array.isArray(e)||(e=[e]),t&&Array.isArray(t)?e.forEach((function(e){t.forEach((function(t){s(e,t,n)}))})):r("must provide one or more functions to wrap on modules")},o.unwrap=a,o.massUnwrap=function(e,t){if(!e)return r("must provide one or more modules to patch"),void r((new Error).stack);Array.isArray(e)||(e=[e]),t&&Array.isArray(t)?e.forEach((function(e){t.forEach((function(t){a(e,t)}))})):r("must provide one or more functions to unwrap on modules")},t.exports=o})),ar=S(((e,t)=>{"use strict";var n=sr(),r=n.wrap,i=n.unwrap,o="wrap@before";function s(e,t,n){var r=!!e[t]&&e.propertyIsEnumerable(t);Object.defineProperty(e,t,{configurable:!0,enumerable:r,writable:!0,value:n})}function a(e,t){var n;return n=e._events&&e._events[t],Array.isArray(n)||(n=n?[n]:[]),n}function c(e,t){if(e){var n=e;if("function"==typeof e)n=t(e);else if(Array.isArray(e)){n=[];for(var r=0;r<e.length;r++)n[r]=t(e[r])}return n}}t.exports=function(e,t,n){if(!(e&&e.on&&e.addListener&&e.removeListener&&e.emit))throw new Error("can only wrap real EEs");if(!t)throw new Error("must have function to run on listener addition");if(!n)throw new Error("must have function to wrap listeners when emitting");function l(e){return function(t,n){var i=a(this,t).slice();try{var s=e.call(this,t,n);return function(e,t,n){var r=a(e,t).filter((function(e){return-1===n.indexOf(e)}));r.length>0&&function(e,t){for(var n=t.length,r=0;r<n;r++){var i=t[r],s=e[o];if("function"==typeof s)s(i);else if(Array.isArray(s))for(var a=s.length,c=0;c<a;c++)s[c](i)}}(e,r)}(this,t,i),s}finally{this.on.__wrapped||r(this,"on",l),this.addListener.__wrapped||r(this,"addListener",l)}}}e[o]?"function"==typeof e[o]?s(e,o,[e[o],t]):Array.isArray(e[o])&&e[o].push(t):s(e,o,t),e.__wrapped||(r(e,"addListener",l),r(e,"on",l),r(e,"emit",(function(e){return function(t){if(!this._events||!this._events[t])return e.apply(this,arguments);var o=this._events[t];r(this,"removeListener",(function(e){return function(){this._events[t]=o;try{return e.apply(this,arguments)}finally{o=this._events[t],this._events[t]=c(o,n)}}}));try{return this._events[t]=c(o,n),e.apply(this,arguments)}finally{i(this,"removeListener"),this._events[t]=o}}})),s(e,"__unwrap",(function(){i(e,"addListener"),i(e,"on"),i(e,"emit"),delete e[o],delete e.__wrapped})),s(e,"__wrapped",!0))}})),cr=S(((e,t)=>{"use strict";var r=n(9023),i=n(2613),o=ar(),s=n(290),a="cls@contexts",c="error@context",l=process.env.DEBUG_CLS_HOOKED,u=-1;function d(e){this.name=e,this.active=null,this._set=[],this.id=null,this._contexts=new Map,this._indent=0}function p(e){return process.namespaces[e]}function h(e){let t=p(e);i.ok(t,"can't delete nonexistent namespace! \""+e+'"'),i.ok(t.id,"don't assign to process.namespaces directly! "+r.inspect(t)),process.namespaces[e]=null}function f(...e){l&&process._rawDebug(`${r.format(...e)}`)}t.exports={getNamespace:p,createNamespace:function(e){i.ok(e,"namespace must be given a name."),l&&f(`NS-CREATING NAMESPACE (${e})`);let t=new d(e);return t.id=u,s.createHook({init(n,i,o,a){if(u=s.executionAsyncId(),t.active)t._contexts.set(n,t.active),l&&f(`${" ".repeat(t._indent<0?0:t._indent)}INIT [${i}] (${e}) asyncId:${n} currentUid:${u} triggerId:${o} active:${r.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} resource:${a}`);else if(0===u){let o=s.triggerAsyncId(),c=t._contexts.get(o);c?(t._contexts.set(n,c),l&&f(`${" ".repeat(t._indent<0?0:t._indent)}INIT USING CONTEXT FROM TRIGGERID [${i}] (${e}) asyncId:${n} currentUid:${u} triggerId:${o} active:${r.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} resource:${a}`)):l&&f(`${" ".repeat(t._indent<0?0:t._indent)}INIT MISSING CONTEXT [${i}] (${e}) asyncId:${n} currentUid:${u} triggerId:${o} active:${r.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} resource:${a}`)}if(l&&"PROMISE"===i){f(r.inspect(a,{showHidden:!0}));let s=a.parentId;f(`${" ".repeat(t._indent<0?0:t._indent)}INIT RESOURCE-PROMISE [${i}] (${e}) parentId:${s} asyncId:${n} currentUid:${u} triggerId:${o} active:${r.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} resource:${a}`)}},before(n){let i;if(u=s.executionAsyncId(),i=t._contexts.get(n)||t._contexts.get(u),i){if(l){let o=s.triggerAsyncId();f(`${" ".repeat(t._indent<0?0:t._indent)}BEFORE (${e}) asyncId:${n} currentUid:${u} triggerId:${o} active:${r.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} context:${r.inspect(i)}`),t._indent+=2}t.enter(i)}else if(l){let i=s.triggerAsyncId();f(`${" ".repeat(t._indent<0?0:t._indent)}BEFORE MISSING CONTEXT (${e}) asyncId:${n} currentUid:${u} triggerId:${i} active:${r.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} namespace._contexts:${r.inspect(t._contexts,{showHidden:!0,depth:2,colors:!0})}`),t._indent+=2}},after(n){let i;if(u=s.executionAsyncId(),i=t._contexts.get(n)||t._contexts.get(u),i){if(l){let o=s.triggerAsyncId();t._indent-=2,f(`${" ".repeat(t._indent<0?0:t._indent)}AFTER (${e}) asyncId:${n} currentUid:${u} triggerId:${o} active:${r.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} context:${r.inspect(i)}`)}t.exit(i)}else if(l){let o=s.triggerAsyncId();t._indent-=2,f(`${" ".repeat(t._indent<0?0:t._indent)}AFTER MISSING CONTEXT (${e}) asyncId:${n} currentUid:${u} triggerId:${o} active:${r.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} context:${r.inspect(i)}`)}},destroy(n){if(u=s.executionAsyncId(),l){let i=s.triggerAsyncId();f(`${" ".repeat(t._indent<0?0:t._indent)}DESTROY (${e}) currentUid:${u} asyncId:${n} triggerId:${i} active:${r.inspect(t.active,{showHidden:!0,depth:2,colors:!0})} context:${r.inspect(t._contexts.get(u))}`)}t._contexts.delete(n)}}).enable(),process.namespaces[e]=t,t},destroyNamespace:h,reset:function(){process.namespaces&&Object.keys(process.namespaces).forEach((function(e){h(e)})),process.namespaces=Object.create(null)},ERROR_SYMBOL:c},d.prototype.set=function(e,t){if(!this.active)throw new Error("No context available. ns.run() or ns.bind() must be called first.");return this.active[e]=t,l&&f(" ".repeat(this._indent<0?0:this._indent)+"CONTEXT-SET KEY:"+e+"="+t+" in ns:"+this.name+" currentUid:"+u+" active:"+r.inspect(this.active,{showHidden:!0,depth:2,colors:!0})),t},d.prototype.get=function(e){if(this.active){if(l){let t=s.executionAsyncId(),n=s.triggerAsyncId(),i=" ".repeat(this._indent<0?0:this._indent);f(i+"CONTEXT-GETTING KEY:"+e+"="+this.active[e]+" ("+this.name+") currentUid:"+u+" active:"+r.inspect(this.active,{showHidden:!0,depth:2,colors:!0})),f(`${i}CONTEXT-GETTING KEY: (${this.name}) ${e}=${this.active[e]} currentUid:${u} asyncHooksCurrentId:${t} triggerId:${n} len:${this._set.length} active:${r.inspect(this.active)}`)}return this.active[e]}if(l){let t=s.currentId(),n=s.triggerAsyncId();f(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-GETTING KEY NO ACTIVE NS: (${this.name}) ${e}=undefined currentUid:${u} asyncHooksCurrentId:${t} triggerId:${n} len:${this._set.length}`)}},d.prototype.createContext=function(){let e=Object.create(this.active?this.active:Object.prototype);if(e._ns_name=this.name,e.id=u,l){let t=s.executionAsyncId(),n=s.triggerAsyncId();f(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-CREATED Context: (${this.name}) currentUid:${u} asyncHooksCurrentId:${t} triggerId:${n} len:${this._set.length} context:${r.inspect(e,{showHidden:!0,depth:2,colors:!0})}`)}return e},d.prototype.run=function(e){let t=this.createContext();this.enter(t);try{if(l){let e=s.triggerAsyncId(),n=s.executionAsyncId();f(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-RUN BEGIN: (${this.name}) currentUid:${u} triggerId:${e} asyncHooksCurrentId:${n} len:${this._set.length} context:${r.inspect(t)}`)}return e(t),t}catch(e){throw e&&(e[c]=t),e}finally{if(l){let e=s.triggerAsyncId(),n=s.executionAsyncId();f(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-RUN END: (${this.name}) currentUid:${u} triggerId:${e} asyncHooksCurrentId:${n} len:${this._set.length} ${r.inspect(t)}`)}this.exit(t)}},d.prototype.runAndReturn=function(e){let t;return this.run((function(n){t=e(n)})),t},d.prototype.runPromise=function(e){let t=this.createContext();this.enter(t);let n=e(t);if(!n||!n.then||!n.catch)throw new Error("fn must return a promise.");return l&&f("CONTEXT-runPromise BEFORE: ("+this.name+") currentUid:"+u+" len:"+this._set.length+" "+r.inspect(t)),n.then((e=>(l&&f("CONTEXT-runPromise AFTER then: ("+this.name+") currentUid:"+u+" len:"+this._set.length+" "+r.inspect(t)),this.exit(t),e))).catch((e=>{throw e[c]=t,l&&f("CONTEXT-runPromise AFTER catch: ("+this.name+") currentUid:"+u+" len:"+this._set.length+" "+r.inspect(t)),this.exit(t),e}))},d.prototype.bind=function(e,t){t||(t=this.active?this.active:this.createContext());let n=this;return function(){n.enter(t);try{return e.apply(this,arguments)}catch(e){throw e&&(e[c]=t),e}finally{n.exit(t)}}},d.prototype.enter=function(e){if(i.ok(e,"context must be provided for entering"),l){let t=s.executionAsyncId(),n=s.triggerAsyncId();f(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-ENTER: (${this.name}) currentUid:${u} triggerId:${n} asyncHooksCurrentId:${t} len:${this._set.length} ${r.inspect(e)}`)}this._set.push(this.active),this.active=e},d.prototype.exit=function(e){if(i.ok(e,"context must be provided for exiting"),l){let t=s.executionAsyncId(),n=s.triggerAsyncId();f(`${" ".repeat(this._indent<0?0:this._indent)}CONTEXT-EXIT: (${this.name}) currentUid:${u} triggerId:${n} asyncHooksCurrentId:${t} len:${this._set.length} ${r.inspect(e)}`)}if(this.active===e)return i.ok(this._set.length,"can't remove top context"),void(this.active=this._set.pop());let t=this._set.lastIndexOf(e);t<0?(l&&f("??ERROR?? context exiting but not entered - ignoring: "+r.inspect(e)),i.ok(t>=0,"context not currently entered; can't exit. \n"+r.inspect(this)+"\n"+r.inspect(e))):(i.ok(t,"can't remove top context"),this._set.splice(t,1))},d.prototype.bindEmitter=function(e){i.ok(e.on&&e.addListener&&e.emit,"can only bind real EEs");let t=this,n="context@"+this.name;o(e,(function(e){!e||(e[a]||(e[a]=Object.create(null)),e[a][n]={namespace:t,context:t.active})}),(function(e){if(!e||!e[a])return e;let t=e,n=e[a];return Object.keys(n).forEach((function(e){let r=n[e];t=r.namespace.bind(t,r.context)})),t}))},d.prototype.fromException=function(e){return e[c]},process.namespaces={}})),lr=S(((e,t)=>{"use strict";function n(){}t.exports=function(){let e=this._hooks,t=this._state,r=process.nextTick;process.nextTick=function(){if(!t.enabled)return r.apply(process,arguments);let i=new Array(arguments.length);for(let e=0;e<arguments.length;e++)i[e]=arguments[e];let o=i[0];if("function"!=typeof o)throw new TypeError("callback is not a function");let s=new n,a=--t.counter;return e.init.call(s,a,0,null,null),i[0]=function(){e.pre.call(s,a);let t=!0;try{o.apply(this,arguments),t=!1}finally{t&&process.listenerCount("uncaughtException")>0&&process.once("uncaughtException",(function(){e.post.call(s,a,!0),e.destroy.call(null,a)}))}e.post.call(s,a,!1),e.destroy.call(null,a)},r.apply(process,i)}}})),ur=S(((e,t)=>{"use strict";function n(){}t.exports=function(){let e=this._hooks,t=this._state,r=global.Promise,i=r.prototype.then;function o(t,n,r,i){return"function"!=typeof t?i?function(t){return function(n){return e.destroy.call(null,t),n}}(r):function(t){return function(n){throw e.destroy.call(null,t),n}}(r):function(){e.pre.call(n,r);try{return t.apply(this,arguments)}finally{e.post.call(n,r,!1),e.destroy.call(null,r)}}}r.prototype.then=function(r,s){if(!t.enabled)return i.call(this,r,s);let a=new n,c=--t.counter;return e.init.call(a,c,0,null,null),i.call(this,o(r,a,c,!0),o(s,a,c,!1))}}})),dr=S(((e,t)=>{"use strict";var r=n(3557);function i(){}function o(){}function s(){}var a=new Map,c=new Map,l=new Map,u=null,d=!1;function p(e,t,n,i,o,s,a){let c=r[n],l=r[i];r[n]=function(){if(!t.enabled)return c.apply(r,arguments);let n=new Array(arguments.length);for(let e=0;e<arguments.length;e++)n[e]=arguments[e];let i=n[0];if("function"!=typeof i)throw new TypeError('"callback" argument must be a function');let l,p=new o,h=--t.counter;return e.init.call(p,h,0,null,null),n[0]=function(){u=l,e.pre.call(p,h);let t=!0;try{i.apply(this,arguments),t=!1}finally{t&&process.listenerCount("uncaughtException")>0&&process.once("uncaughtException",(function(){e.post.call(p,h,!0),s.delete(l),e.destroy.call(null,h)}))}e.post.call(p,h,!1),u=null,(a||d)&&(d=!1,s.delete(l),e.destroy.call(null,h))},l=c.apply(r,n),s.set(l,h),l},r[i]=function(t){if(u===t&&null!==t)d=!0;else if(s.has(t)){let n=s.get(t);s.delete(t),e.destroy.call(null,n)}l.apply(r,arguments)}}t.exports=function(){p(this._hooks,this._state,"setTimeout","clearTimeout",i,a,!0),p(this._hooks,this._state,"setInterval","clearInterval",o,c,!1),p(this._hooks,this._state,"setImmediate","clearImmediate",s,l,!0),global.setTimeout=r.setTimeout,global.setInterval=r.setInterval,global.setImmediate=r.setImmediate,global.clearTimeout=r.clearTimeout,global.clearInterval=r.clearInterval,global.clearImmediate=r.clearImmediate}})),pr=S(((e,t)=>{t.exports={name:"async-hook-jl",description:"Inspect the life of handle objects in node",version:"1.7.6",author:"Andreas Madsen <amwebdk@gmail.com>",main:"./index.js",scripts:{test:"node ./test/runner.js && eslint ."},repository:{type:"git",url:"git://github.com/jeff-lewis/async-hook-jl.git"},keywords:["async","async hooks","inspect","async wrap"],license:"MIT",dependencies:{"stack-chain":"^1.3.7"},devDependencies:{async:"1.5.x","cli-color":"1.1.x",eslint:"^3.4.0",endpoint:"0.4.x"},engines:{node:"^4.7 || >=6.9 || >=7.3"}}})),hr=S(((e,t)=>{"use strict";var n=process.binding("async_wrap"),r=n.Providers.TIMERWRAP,i={nextTick:lr(),promise:ur(),timers:dr()},o=new Set;function s(){this.enabled=!1,this.counter=0}function a(){let e=this.initFns=[],t=this.preFns=[],n=this.postFns=[],i=this.destroyFns=[];this.init=function(t,n,i,s){if(n!==r)for(let r of e)r(t,this,n,i,s);else o.add(t)},this.pre=function(e){if(!o.has(e))for(let n of t)n(e,this)},this.post=function(e,t){if(!o.has(e))for(let r of n)r(e,this,t)},this.destroy=function(e){if(o.has(e))o.delete(e);else for(let t of i)t(e)}}function c(e,t){let n=e.indexOf(t);-1!==n&&e.splice(n,1)}function l(){this._state=new s,this._hooks=new a,this.version=pr().version,this.providers=n.Providers;for(let e of Object.keys(i))i[e].call(this);process.env.hasOwnProperty("NODE_ASYNC_HOOK_WARNING")&&console.warn("warning: you are using async-hook-jl which is unstable."),n.setupHooks({init:this._hooks.init,pre:this._hooks.pre,post:this._hooks.post,destroy:this._hooks.destroy})}a.prototype.add=function(e){e.init&&this.initFns.push(e.init),e.pre&&this.preFns.push(e.pre),e.post&&this.postFns.push(e.post),e.destroy&&this.destroyFns.push(e.destroy)},a.prototype.remove=function(e){e.init&&c(this.initFns,e.init),e.pre&&c(this.preFns,e.pre),e.post&&c(this.postFns,e.post),e.destroy&&c(this.destroyFns,e.destroy)},t.exports=l,l.prototype.addHooks=function(e){this._hooks.add(e)},l.prototype.removeHooks=function(e){this._hooks.remove(e)},l.prototype.enable=function(){this._state.enabled=!0,n.enable()},l.prototype.disable=function(){this._state.enabled=!1,n.disable()}})),fr=S(((e,t)=>{t.exports={name:"stack-chain",description:"API for combining call site modifiers",version:"1.3.7",author:"Andreas Madsen <amwebdk@gmail.com>",scripts:{test:"tap ./test/simple"},repository:{type:"git",url:"git://github.com/AndreasMadsen/stack-chain.git"},keywords:["stack","chain","trace","call site","concat","format"],devDependencies:{tap:"2.x.x","uglify-js":"2.5.x"},license:"MIT"}})),mr=S(((e,t)=>{t.exports=function(e,t){var n=[];n.push(function(e){try{return Error.prototype.toString.call(e)}catch(e){try{return"<error: "+e+">"}catch{return"<error>"}}}(e));for(var r=0;r<t.length;r++){var i,o=t[r];try{i=o.toString()}catch(e){try{i="<error: "+e+">"}catch{i="<error>"}}n.push("    at "+i)}return n.join("\n")}})),gr=S(((e,t)=>{var n=mr();function r(){this.extend=new s,this.filter=new s,this.format=new a,this.version=fr().version}var i=!1;r.prototype.callSite=function e(t){t||(t={}),i=!0;var n={};Error.captureStackTrace(n,e);var r=n.stack;return i=!1,r=r.slice(t.slice||0),t.extend&&(r=this.extend._modify(n,r)),t.filter&&(r=this.filter._modify(n,r)),r};var o=new r;function s(){this._modifiers=[]}function a(){this._formater=n,this._previous=void 0}s.prototype._modify=function(e,t){for(var n=0,r=this._modifiers.length;n<r;n++)t=this._modifiers[n](e,t);return t},s.prototype.attach=function(e){this._modifiers.push(e)},s.prototype.deattach=function(e){var t=this._modifiers.indexOf(e);return-1!==t&&(this._modifiers.splice(t,1),!0)},a.prototype.replace=function(e){e?this._formater=e:this.restore()},a.prototype.restore=function(){this._formater=n,this._previous=void 0},a.prototype._backup=function(){this._previous=this._formater},a.prototype._roolback=function(){this._previous===n?this.replace(void 0):this.replace(this._previous),this._previous=void 0},Error.prepareStackTrace&&o.format.replace(Error.prepareStackTrace);var c=!1;function l(e,t){if(i)return t;if(c)return n(e,t);var r=t.concat();r=o.extend._modify(e,r),r=(r=o.filter._modify(e,r)).slice(0,Error.stackTraceLimit),Object.isExtensible(e)&&void 0===Object.getOwnPropertyDescriptor(e,"callSite")&&(e.callSite={original:t,mutated:r}),c=!0;var s=o.format._formater(e,r);return c=!1,s}Object.defineProperty(Error,"prepareStackTrace",{get:function(){return l},set:function(e){e===l?o.format._roolback():(o.format._backup(),o.format.replace(e))}}),Object.defineProperty(Error.prototype,"callSite",{get:function(){return this.stack,this.callSite},set:function(e){Object.defineProperty(this,"callSite",{value:e,writable:!0,configurable:!0})},configurable:!0}),t.exports=o})),yr=S(((e,t)=>{if(global._stackChain){if(global._stackChain.version!==fr().version)throw new Error("Conflicting version of stack-chain found");t.exports=global._stackChain}else t.exports=global._stackChain=gr()})),br=S(((e,t)=>{"use strict";var n=hr();if(global._asyncHook){if(global._asyncHook.version!==pr().version)throw new Error("Conflicting version of async-hook-jl found");t.exports=global._asyncHook}else yr().filter.attach((function(e,t){return t.filter((function(e){let t=e.getFileName();return!(t&&t.slice(0,__dirname.length)===__dirname)}))})),t.exports=global._asyncHook=new n})),vr=S(((e,t)=>{"use strict";var r=n(9023),i=n(2613),o=ar(),s=br(),a="cls@contexts",c="error@context",l=[];for(let e in s.providers)l[s.providers[e]]=e;var u,d,p=process.env.DEBUG_CLS_HOOKED,h=-1;function f(e){this.name=e,this.active=null,this._set=[],this.id=null,this._contexts=new Map}function m(e){return process.namespaces[e]}function g(e){let t=m(e);i.ok(t,"can't delete nonexistent namespace! \""+e+'"'),i.ok(t.id,"don't assign to process.namespaces directly! "+r.inspect(t)),process.namespaces[e]=null}function y(e){process.env.DEBUG&&process._rawDebug(e)}function b(e){return e?"function"==typeof e?e.name?e.name:(e.toString().trim().match(/^function\s*([^\s(]+)/)||[])[1]:e.constructor&&e.constructor.name?e.constructor.name:void 0:e}if(t.exports={getNamespace:m,createNamespace:function(e){i.ok(e,"namespace must be given a name."),p&&y("CREATING NAMESPACE "+e);let t=new f(e);return t.id=h,s.addHooks({init(n,i,o,s,a){h=n,s?(t._contexts.set(n,t._contexts.get(s)),p&&y("PARENTID: "+e+" uid:"+n+" parent:"+s+" provider:"+o)):t._contexts.set(h,t.active),p&&y("INIT "+e+" uid:"+n+" parent:"+s+" provider:"+l[o]+" active:"+r.inspect(t.active,!0))},pre(n,i){h=n;let o=t._contexts.get(n);o?(p&&y(" PRE "+e+" uid:"+n+" handle:"+b(i)+" context:"+r.inspect(o)),t.enter(o)):p&&y(" PRE MISSING CONTEXT "+e+" uid:"+n+" handle:"+b(i))},post(n,i){h=n;let o=t._contexts.get(n);o?(p&&y(" POST "+e+" uid:"+n+" handle:"+b(i)+" context:"+r.inspect(o)),t.exit(o)):p&&y(" POST MISSING CONTEXT "+e+" uid:"+n+" handle:"+b(i))},destroy(n){h=n,p&&y("DESTROY "+e+" uid:"+n+" context:"+r.inspect(t._contexts.get(h))+" active:"+r.inspect(t.active,!0)),t._contexts.delete(n)}}),process.namespaces[e]=t,t},destroyNamespace:g,reset:function(){process.namespaces&&Object.keys(process.namespaces).forEach((function(e){g(e)})),process.namespaces=Object.create(null)},ERROR_SYMBOL:c},f.prototype.set=function(e,t){if(!this.active)throw new Error("No context available. ns.run() or ns.bind() must be called first.");return p&&y("    SETTING KEY:"+e+"="+t+" in ns:"+this.name+" uid:"+h+" active:"+r.inspect(this.active,!0)),this.active[e]=t,t},f.prototype.get=function(e){if(this.active)return p&&y("    GETTING KEY:"+e+"="+this.active[e]+" "+this.name+" uid:"+h+" active:"+r.inspect(this.active,!0)),this.active[e];p&&y("    GETTING KEY:"+e+"=undefined "+this.name+" uid:"+h+" active:"+r.inspect(this.active,!0))},f.prototype.createContext=function(){p&&y("   CREATING Context: "+this.name+" uid:"+h+" len:"+this._set.length+"  active:"+r.inspect(this.active,!0,2,!0));let e=Object.create(this.active?this.active:Object.prototype);return e._ns_name=this.name,e.id=h,p&&y("   CREATED Context: "+this.name+" uid:"+h+" len:"+this._set.length+"  context:"+r.inspect(e,!0,2,!0)),e},f.prototype.run=function(e){let t=this.createContext();this.enter(t);try{return p&&y(" BEFORE RUN: "+this.name+" uid:"+h+" len:"+this._set.length+" "+r.inspect(t)),e(t),t}catch(e){throw e&&(e[c]=t),e}finally{p&&y(" AFTER RUN: "+this.name+" uid:"+h+" len:"+this._set.length+" "+r.inspect(t)),this.exit(t)}},f.prototype.runAndReturn=function(e){var t;return this.run((function(n){t=e(n)})),t},f.prototype.runPromise=function(e){let t=this.createContext();this.enter(t);let n=e(t);if(!n||!n.then||!n.catch)throw new Error("fn must return a promise.");return p&&y(" BEFORE runPromise: "+this.name+" uid:"+h+" len:"+this._set.length+" "+r.inspect(t)),n.then((e=>(p&&y(" AFTER runPromise: "+this.name+" uid:"+h+" len:"+this._set.length+" "+r.inspect(t)),this.exit(t),e))).catch((e=>{throw e[c]=t,p&&y(" AFTER runPromise: "+this.name+" uid:"+h+" len:"+this._set.length+" "+r.inspect(t)),this.exit(t),e}))},f.prototype.bind=function(e,t){t||(t=this.active?this.active:this.createContext());let n=this;return function(){n.enter(t);try{return e.apply(this,arguments)}catch(e){throw e&&(e[c]=t),e}finally{n.exit(t)}}},f.prototype.enter=function(e){i.ok(e,"context must be provided for entering"),p&&y("  ENTER "+this.name+" uid:"+h+" len:"+this._set.length+" context: "+r.inspect(e)),this._set.push(this.active),this.active=e},f.prototype.exit=function(e){if(i.ok(e,"context must be provided for exiting"),p&&y("  EXIT "+this.name+" uid:"+h+" len:"+this._set.length+" context: "+r.inspect(e)),this.active===e)return i.ok(this._set.length,"can't remove top context"),void(this.active=this._set.pop());let t=this._set.lastIndexOf(e);t<0?(p&&y("??ERROR?? context exiting but not entered - ignoring: "+r.inspect(e)),i.ok(t>=0,"context not currently entered; can't exit. \n"+r.inspect(this)+"\n"+r.inspect(e))):(i.ok(t,"can't remove top context"),this._set.splice(t,1))},f.prototype.bindEmitter=function(e){i.ok(e.on&&e.addListener&&e.emit,"can only bind real EEs");let t=this,n="context@"+this.name;o(e,(function(e){!e||(e[a]||(e[a]=Object.create(null)),e[a][n]={namespace:t,context:t.active})}),(function(e){if(!e||!e[a])return e;let t=e,n=e[a];return Object.keys(n).forEach((function(e){let r=n[e];t=r.namespace.bind(t,r.context)})),t}))},f.prototype.fromException=function(e){return e[c]},process.namespaces={},s._state&&!s._state.enabled&&s.enable(),p)for(d in(u=yr()).filter._modifiers)u.filter.deattach(d)})),Sr=S(((e,t)=>{"use strict";var n=or();process&&n.gte(process.versions.node,"8.0.0")?t.exports=cr():t.exports=vr()})),wr=S(((e,t)=>{var n;e=t.exports=W,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(){},e.SEMVER_SPEC_VERSION="2.0.0";var r=256,i=Number.MAX_SAFE_INTEGER||9007199254740991,o=e.re=[],s=e.src=[],a=0,c=a++;s[c]="0|[1-9]\\d*";var l=a++;s[l]="[0-9]+";var u=a++;s[u]="\\d*[a-zA-Z-][a-zA-Z0-9-]*";var d=a++;s[d]="("+s[c]+")\\.("+s[c]+")\\.("+s[c]+")";var p=a++;s[p]="("+s[l]+")\\.("+s[l]+")\\.("+s[l]+")";var h=a++;s[h]="(?:"+s[c]+"|"+s[u]+")";var f=a++;s[f]="(?:"+s[l]+"|"+s[u]+")";var m=a++;s[m]="(?:-("+s[h]+"(?:\\."+s[h]+")*))";var g=a++;s[g]="(?:-?("+s[f]+"(?:\\."+s[f]+")*))";var y=a++;s[y]="[0-9A-Za-z-]+";var b=a++;s[b]="(?:\\+("+s[y]+"(?:\\."+s[y]+")*))";var v=a++,S="v?"+s[d]+s[m]+"?"+s[b]+"?";s[v]="^"+S+"$";var w="[v=\\s]*"+s[p]+s[g]+"?"+s[b]+"?",C=a++;s[C]="^"+w+"$";var T=a++;s[T]="((?:<|>)?=?)";var E=a++;s[E]=s[l]+"|x|X|\\*";var _=a++;s[_]=s[c]+"|x|X|\\*";var x=a++;s[x]="[v=\\s]*("+s[_]+")(?:\\.("+s[_]+")(?:\\.("+s[_]+")(?:"+s[m]+")?"+s[b]+"?)?)?";var R=a++;s[R]="[v=\\s]*("+s[E]+")(?:\\.("+s[E]+")(?:\\.("+s[E]+")(?:"+s[g]+")?"+s[b]+"?)?)?";var I=a++;s[I]="^"+s[T]+"\\s*"+s[x]+"$";var P=a++;s[P]="^"+s[T]+"\\s*"+s[R]+"$";var O=a++;s[O]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var D=a++;s[D]="(?:~>?)";var A=a++;s[A]="(\\s*)"+s[D]+"\\s+",o[A]=new RegExp(s[A],"g");var k=a++;s[k]="^"+s[D]+s[x]+"$";var N=a++;s[N]="^"+s[D]+s[R]+"$";var L=a++;s[L]="(?:\\^)";var j=a++;s[j]="(\\s*)"+s[L]+"\\s+",o[j]=new RegExp(s[j],"g");var M=a++;s[M]="^"+s[L]+s[x]+"$";var F=a++;s[F]="^"+s[L]+s[R]+"$";var q=a++;s[q]="^"+s[T]+"\\s*("+w+")$|^$";var B=a++;s[B]="^"+s[T]+"\\s*("+S+")$|^$";var U=a++;s[U]="(\\s*)"+s[T]+"\\s*("+w+"|"+s[x]+")",o[U]=new RegExp(s[U],"g");var z=a++;s[z]="^\\s*("+s[x]+")\\s+-\\s+("+s[x]+")\\s*$";var G=a++;s[G]="^\\s*("+s[R]+")\\s+-\\s+("+s[R]+")\\s*$";var H,V=a++;for(s[V]="(<|>)?=?\\s*\\*",H=0;H<35;H++)n(H,s[H]),o[H]||(o[H]=new RegExp(s[H]));function $(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof W)return e;if("string"!=typeof e||e.length>r)return null;if(!(t.loose?o[C]:o[v]).test(e))return null;try{return new W(e,t)}catch{return null}}function W(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof W){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 W))return new W(e,t);n("SemVer",e,t),this.options=t,this.loose=!!t.loose;var s=e.trim().match(t.loose?o[C]:o[v]);if(!s)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+s[1],this.minor=+s[2],this.patch=+s[3],this.major>i||this.major<0)throw new TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw new TypeError("Invalid patch version");s[4]?this.prerelease=s[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t<i)return t}return e})):this.prerelease=[],this.build=s[5]?s[5].split("."):[],this.format()}e.parse=$,e.valid=function(e,t){var n=$(e,t);return n?n.version:null},e.clean=function(e,t){var n=$(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null},e.SemVer=W,W.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},W.prototype.toString=function(){return this.version},W.prototype.compare=function(e){return n("SemVer.compare",this.version,this.options,e),e instanceof W||(e=new W(e,this.options)),this.compareMain(e)||this.comparePre(e)},W.prototype.compareMain=function(e){return e instanceof W||(e=new W(e,this.options)),Q(this.major,e.major)||Q(this.minor,e.minor)||Q(this.patch,e.patch)},W.prototype.comparePre=function(e){if(e instanceof W||(e=new W(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;var t=0;do{var r=this.prerelease[t],i=e.prerelease[t];if(n("prerelease compare",t,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return Q(r,i)}while(++t)},W.prototype.inc=function(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":(0!==this.minor||0!==this.patch||0===this.prerelease.length)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(0!==this.patch||0===this.prerelease.length)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var n=this.prerelease.length;--n>=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},e.inc=function(e,t,n,r){"string"==typeof n&&(r=n,n=void 0);try{return new W(e,n).inc(t,r).version}catch{return null}},e.diff=function(e,t){if(Z(e,t))return null;var n=$(e),r=$(t),i="";if(n.prerelease.length||r.prerelease.length){i="pre";var o="prerelease"}for(var s in n)if(("major"===s||"minor"===s||"patch"===s)&&n[s]!==r[s])return i+s;return o},e.compareIdentifiers=Q;var K=/^[0-9]+$/;function Q(e,t){var n=K.test(e),r=K.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e<t?-1:1}function X(e,t,n){return new W(e,n).compare(new W(t,n))}function Y(e,t,n){return X(e,t,n)>0}function J(e,t,n){return X(e,t,n)<0}function Z(e,t,n){return 0===X(e,t,n)}function ee(e,t,n){return 0!==X(e,t,n)}function te(e,t,n){return X(e,t,n)>=0}function ne(e,t,n){return X(e,t,n)<=0}function re(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 Z(e,n,r);case"!=":return ee(e,n,r);case">":return Y(e,n,r);case">=":return te(e,n,r);case"<":return J(e,n,r);case"<=":return ne(e,n,r);default:throw new TypeError("Invalid operator: "+t)}}function ie(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof ie){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof ie))return new ie(e,t);n("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===oe?this.value="":this.value=this.operator+this.semver.version,n("comp",this)}e.rcompareIdentifiers=function(e,t){return Q(t,e)},e.major=function(e,t){return new W(e,t).major},e.minor=function(e,t){return new W(e,t).minor},e.patch=function(e,t){return new W(e,t).patch},e.compare=X,e.compareLoose=function(e,t){return X(e,t,!0)},e.rcompare=function(e,t,n){return X(t,e,n)},e.sort=function(t,n){return t.sort((function(t,r){return e.compare(t,r,n)}))},e.rsort=function(t,n){return t.sort((function(t,r){return e.rcompare(t,r,n)}))},e.gt=Y,e.lt=J,e.eq=Z,e.neq=ee,e.gte=te,e.lte=ne,e.cmp=re,e.Comparator=ie;var oe={};function se(e,t){if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),e instanceof se)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new se(e.raw,t);if(e instanceof ie)return new se(e.value,t);if(!(this instanceof se))return new se(e,t);if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e,this.set=e.split(/\s*\|\|\s*/).map((function(e){return this.parseRange(e.trim())}),this).filter((function(e){return e.length})),!this.set.length)throw new TypeError("Invalid SemVer Range: "+e);this.format()}function ae(e){return!e||"x"===e.toLowerCase()||"*"===e}function ce(e,t,n,r,i,o,s,a,c,l,u,d,p){return((t=ae(n)?"":ae(r)?">="+n+".0.0":ae(i)?">="+n+"."+r+".0":">="+t)+" "+(a=ae(c)?"":ae(l)?"<"+(+c+1)+".0.0":ae(u)?"<"+c+"."+(+l+1)+".0":d?"<="+c+"."+l+"."+u+"-"+d:"<="+a)).trim()}function le(e,t,r){for(var i=0;i<e.length;i++)if(!e[i].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(i=0;i<e.length;i++)if(n(e[i].semver),e[i].semver!==oe&&e[i].semver.prerelease.length>0){var o=e[i].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch)return!0}return!1}return!0}function ue(e,t,n){try{t=new se(t,n)}catch{return!1}return t.test(e)}function de(e,t,n,r){var i,o,s,a,c;switch(e=new W(e,r),t=new se(t,r),n){case">":i=Y,o=ne,s=J,a=">",c=">=";break;case"<":i=J,o=te,s=Y,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(ue(e,t,r))return!1;for(var l=0;l<t.set.length;++l){var u=t.set[l],d=null,p=null;if(u.forEach((function(e){e.semver===oe&&(e=new ie(">=0.0.0")),d=d||e,p=p||e,i(e.semver,d.semver,r)?d=e:s(e.semver,p.semver,r)&&(p=e)})),d.operator===a||d.operator===c||(!p.operator||p.operator===a)&&o(e,p.semver))return!1;if(p.operator===c&&s(e,p.semver))return!1}return!0}ie.prototype.parse=function(e){var t=this.options.loose?o[q]:o[B],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 W(n[2],this.options.loose):this.semver=oe},ie.prototype.toString=function(){return this.value},ie.prototype.test=function(e){return n("Comparator.test",e,this.options.loose),this.semver===oe||("string"==typeof e&&(e=new W(e,this.options)),re(e,this.operator,this.semver,this.options))},ie.prototype.intersects=function(e,t){if(!(e instanceof ie))throw new TypeError("a Comparator is required");var n;if((!t||"object"!=typeof t)&&(t={loose:!!t,includePrerelease:!1}),""===this.operator)return n=new se(e.value,t),ue(this.value,n,t);if(""===e.operator)return n=new se(this.value,t),ue(e.semver,n,t);var r=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=re(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=re(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||i||o&&s||a||c},e.Range=se,se.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},se.prototype.toString=function(){return this.range},se.prototype.parseRange=function(e){var t=this.options.loose;e=e.trim();var r=t?o[G]:o[z];e=e.replace(r,ce),n("hyphen replace",e),e=e.replace(o[U],"$1$2$3"),n("comparator trim",e,o[U]),e=(e=(e=e.replace(o[A],"$1~")).replace(o[j],"$1^")).split(/\s+/).join(" ");var i=t?o[q]:o[B],s=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?o[F]:o[M];return e.replace(r,(function(t,r,i,o,s){var a;return n("caret",e,t,r,i,o,s),ae(r)?a="":ae(i)?a=">="+r+".0.0 <"+(+r+1)+".0.0":ae(o)?a="0"===r?">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":">="+r+"."+i+".0 <"+(+r+1)+".0.0":s?(n("replaceCaret pr",s),a="0"===r?"0"===i?">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+i+"."+(+o+1):">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+o+"-"+s+" <"+(+r+1)+".0.0"):(n("no pr"),a="0"===r?"0"===i?">="+r+"."+i+"."+o+" <"+r+"."+i+"."+(+o+1):">="+r+"."+i+"."+o+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+o+" <"+(+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?o[N]:o[k];return e.replace(r,(function(t,r,i,o,s){var a;return n("tilde",e,t,r,i,o,s),ae(r)?a="":ae(i)?a=">="+r+".0.0 <"+(+r+1)+".0.0":ae(o)?a=">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":s?(n("replaceTilde pr",s),a=">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+(+i+1)+".0"):a=">="+r+"."+i+"."+o+" <"+r+"."+(+i+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?o[P]:o[I];return e.replace(r,(function(t,r,i,o,s,a){n("xRange",e,t,r,i,o,s,a);var c=ae(i),l=c||ae(o),u=l||ae(s);return"="===r&&u&&(r=""),c?t=">"===r||"<"===r?"<0.0.0":"*":r&&u?(l&&(o=0),s=0,">"===r?(r=">=",l?(i=+i+1,o=0,s=0):(o=+o+1,s=0)):"<="===r&&(r="<",l?i=+i+1:o=+o+1),t=r+i+"."+o+"."+s):l?t=">="+i+".0.0 <"+(+i+1)+".0.0":u&&(t=">="+i+"."+o+".0 <"+i+"."+(+o+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(o[V],"")}(e,t),n("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(s=s.filter((function(e){return!!e.match(i)}))),s.map((function(e){return new ie(e,this.options)}),this)},se.prototype.intersects=function(e,t){if(!(e instanceof se))throw new TypeError("a Range is required");return this.set.some((function(n){return n.every((function(n){return e.set.some((function(e){return e.every((function(e){return n.intersects(e,t)}))}))}))}))},e.toComparators=function(e,t){return new se(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},se.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new W(e,this.options));for(var t=0;t<this.set.length;t++)if(le(this.set[t],e,this.options))return!0;return!1},e.satisfies=ue,e.maxSatisfying=function(e,t,n){var r=null,i=null;try{var o=new se(t,n)}catch{return null}return e.forEach((function(e){o.test(e)&&(!r||-1===i.compare(e))&&(i=new W(r=e,n))})),r},e.minSatisfying=function(e,t,n){var r=null,i=null;try{var o=new se(t,n)}catch{return null}return e.forEach((function(e){o.test(e)&&(!r||1===i.compare(e))&&(i=new W(r=e,n))})),r},e.minVersion=function(e,t){e=new se(e,t);var n=new W("0.0.0");if(e.test(n)||(n=new W("0.0.0-0"),e.test(n)))return n;n=null;for(var r=0;r<e.set.length;++r)e.set[r].forEach((function(e){var t=new W(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":(!n||Y(n,t))&&(n=t);break;case"<":case"<=":break;default:throw new Error("Unexpected operation: "+e.operator)}}));return n&&e.test(n)?n:null},e.validRange=function(e,t){try{return new se(e,t).range||"*"}catch{return null}},e.ltr=function(e,t,n){return de(e,t,"<",n)},e.gtr=function(e,t,n){return de(e,t,">",n)},e.outside=de,e.prerelease=function(e,t){var n=$(e,t);return n&&n.prerelease.length?n.prerelease:null},e.intersects=function(e,t,n){return e=new se(e,n),t=new se(t,n),e.intersects(t)},e.coerce=function(e){if(e instanceof W)return e;if("string"!=typeof e)return null;var t=e.match(o[O]);return null==t?null:$(t[1]+"."+(t[2]||"0")+"."+(t[3]||"0"))}})),Cr=S(((e,t)=>{var n,r,i,o,s,a=sr().wrap,c=1,l=2,u=4,d=8,p=[],h=0,f=!1,m=[];function g(e,t){var n=e.length,r=t.length,i=[];if(0===n&&0===r)return i;for(var o=0;o<n;o++)i[o]=e[o];if(0===r)return i;for(var s=0;s<r;s++){var a=!0;for(o=0;o<n;o++)if(e[o].uid===t[s].uid){a=!1;break}a&&i.push(t[s])}return i}function y(e,t){"function"==typeof e.create&&(this.create=e.create,this.flags|=c),"function"==typeof e.before&&(this.before=e.before,this.flags|=l),"function"==typeof e.after&&(this.after=e.after,this.flags|=u),"function"==typeof e.error&&(this.error=e.error,this.flags|=d),this.uid=++h,this.data=void 0===t?null:t}function b(e,t){if("object"!=typeof e||!e)throw new TypeError("callbacks argument must be an object");return e instanceof y?e:new y(e,t)}process._fatalException?(i=!1,n=function(e){var t=p.length;if(i||0===t)return!1;var n=!1;i=!0;for(var r=0;r<t;++r){var s=p[r];if(s.flags&d){var a=o&&o[s.uid];n=s.error(a,e)||n}}return i=!1,m.length>0&&(p=m.pop()),o=void 0,n&&!f},r=function(e,t,n){var r=[];f=!0;for(var i=0;i<n;++i){var s=t[i];if(r[s.uid]=s.data,s.flags&c){var a=s.create(s.data);void 0!==a&&(r[s.uid]=a)}}return f=!1,function(){o=r,m.push(p),p=g(t,p),f=!0;for(var i=0;i<n;++i)(t[i].flags&l)>0&&t[i].before(this,r[t[i].uid]);f=!1;var s=e.apply(this,arguments);for(f=!0,i=0;i<n;++i)(t[i].flags&u)>0&&t[i].after(this,r[t[i].uid]);return f=!1,p=m.pop(),o=void 0,s}},a(process,"_fatalException",(function(e){return function(t){return n(t)||e(t)}}))):(s=!1,n=function(e){if(s)throw e;for(var t=!1,n=p.length,r=0;r<n;++r){var i=p[r];i.flags&d&&(t=i.error(null,e)||t)}if(!t&&f)throw e},r=function(e,t,r){var i=[];f=!0;for(var o=0;o<r;++o){var a=t[o];if(i[a.uid]=a.data,a.flags&c){var h=a.create(a.data);void 0!==h&&(i[a.uid]=h)}}return f=!1,function(){var o,a=!1,c=!1;m.push(p),p=g(t,p),f=!0;for(var h=0;h<r;++h)(t[h].flags&l)>0&&t[h].before(this,i[t[h].uid]);f=!1;try{o=e.apply(this,arguments)}catch(e){for(a=!0,h=0;h<r;++h)if(p[h].flags&d)try{c=p[h].error(i[t[h].uid],e)||c}catch(e){throw s=!0,e}if(!c)throw process.removeListener("uncaughtException",n),process._originalNextTick((function(){process.addListener("uncaughtException",n)})),e}finally{if(!a||c){for(f=!0,h=0;h<r;++h)(t[h].flags&u)>0&&t[h].after(this,i[t[h].uid]);f=!1}p=m.pop()}return o}},process.addListener("uncaughtException",n)),y.prototype.create=void 0,y.prototype.before=void 0,y.prototype.after=void 0,y.prototype.error=void 0,y.prototype.data=void 0,y.prototype.uid=0,y.prototype.flags=0,process.createAsyncListener=b,process.addAsyncListener=function(e,t){var n;n=e instanceof y?e:b(e,t);for(var r=!1,i=0;i<p.length;i++)if(n===p[i]){r=!0;break}return r||p.push(n),n},process.removeAsyncListener=function(e){for(var t=0;t<p.length;t++)if(e===p[t]){p.splice(t,1);break}},t.exports=function(e){var t=p.length;if(0===t)return e;for(var n=p.slice(),i=0;i<t;++i)if(n[i].flags>0)return r(e,n,t);return function(e,t,n){f=!0;for(var r=0;r<n;++r){var i=t[r];i.create&&i.create(i.data)}return f=!1,function(){m.push(p),p=g(t,p);var n=e.apply(this,arguments);return p=m.pop(),n}}(e,n,t)}})),Tr=S(((e,t)=>{"use strict";t.exports=(e,t)=>class extends e{constructor(e){var n,r;super((function(e,o){n=this,r=[function(n){return t(i,!1),e(n)},function(e){return t(i,!1),o(e)}]}));var i=this;try{e.apply(n,r)}catch(e){r[1](e)}return i}}})),Er=S((()=>{"use strict";if(process.addAsyncListener)throw new Error("Don't require polyfill unless needed");var e=sr(),t=wr(),r=e.wrap,i=e.massWrap,o=Cr(),s=n(9023),a=t.gte(process.version,"6.0.0"),c=t.gte(process.version,"7.0.0"),l=t.gte(process.version,"8.0.0"),u=t.gte(process.version,"11.0.0"),d=n(9278);function p(e){return function(){this.on("connection",(function(e){e._handle&&(e._handle.onread=o(e._handle.onread))}));try{return e.apply(this,arguments)}finally{this._handle&&this._handle.onconnection&&(this._handle.onconnection=o(this._handle.onconnection))}}}function h(e){if(e&&e._handle){var t=e._handle;t._originalOnread||(t._originalOnread=t.onread),t.onread=o(t._originalOnread)}}c&&!d._normalizeArgs?d._normalizeArgs=function(e){if(0===e.length)return[{},null];var t=e[0],n={};"object"==typeof t&&null!==t?n=t:function(e){return"string"==typeof e&&!1===function(e){return(e=Number(e))>=0&&e}(e)}(t)?n.path=t:(n.port=t,e.length>1&&"string"==typeof e[1]&&(n.host=e[1]));var r=e[e.length-1];return"function"!=typeof r?[n,null]:[n,r]}:!c&&!d._normalizeConnectArgs&&(d._normalizeConnectArgs=function(e){var t={};"object"==typeof e[0]&&null!==e[0]?t=e[0]:"string"==typeof e[0]&&!1===function(e){return(e=Number(e))>=0&&e}(e[0])?t.path=e[0]:(t.port=e[0],"string"==typeof e[1]&&(t.host=e[1]));var n=e[e.length-1];return"function"==typeof n?[t,n]:[t]}),"_setUpListenHandle"in d.Server.prototype?r(d.Server.prototype,"_setUpListenHandle",p):r(d.Server.prototype,"_listen2",p),r(d.Socket.prototype,"connect",(function(e){return function(){var t;(t=l&&Array.isArray(arguments[0])&&Object.getOwnPropertySymbols(arguments[0]).length>0?arguments[0]:c?d._normalizeArgs(arguments):d._normalizeConnectArgs(arguments))[1]&&(t[1]=o(t[1]));var n=e.apply(this,t);return h(this),n}}));var f=n(8611);r(f.Agent.prototype,"addRequest",(function(e){return function(t){var n=t.onSocket;return t.onSocket=o((function(e){return h(e),n.apply(this,arguments)})),e.apply(this,arguments)}}));var m=n(5317);function g(e){Array.isArray(e.stdio)&&e.stdio.forEach((function(e){e&&e._handle&&(e._handle.onread=o(e._handle.onread),r(e._handle,"close",O))})),e._handle&&(e._handle.onexit=o(e._handle.onexit))}m.ChildProcess?r(m.ChildProcess.prototype,"spawn",(function(e){return function(){var t=e.apply(this,arguments);return g(this),t}})):i(m,["execFile","fork","spawn"],(function(e){return function(){var t=e.apply(this,arguments);return g(t),t}})),process._fatalException||(process._originalNextTick=process.nextTick);var y=[];process._nextDomainTick&&y.push("_nextDomainTick"),process._tickDomainCallback&&y.push("_tickDomainCallback"),i(process,y,P),r(process,"nextTick",O);var b=["setTimeout","setInterval"];global.setImmediate&&b.push("setImmediate");var v=n(3557),S=global.setTimeout===v.setTimeout;i(v,b,O),S&&i(global,b,O);var w=n(2250);i(w,["lookup","resolve","resolve4","resolve6","resolveCname","resolveMx","resolveNs","resolveTxt","resolveSrv","reverse"],P),w.resolveNaptr&&r(w,"resolveNaptr",P);var C,T,E,_=n(9896);i(_,["watch","rename","truncate","chown","fchown","chmod","fchmod","stat","lstat","fstat","link","symlink","readlink","realpath","unlink","rmdir","mkdir","readdir","close","open","utimes","futimes","fsync","write","read","readFile","writeFile","appendFile","watchFile","unwatchFile","exists"],P),_.lchown&&r(_,"lchown",P),_.lchmod&&r(_,"lchmod",P),_.ftruncate&&r(_,"ftruncate",P);try{C=n(3106)}catch{}C&&C.Deflate&&C.Deflate.prototype&&((T=Object.getPrototypeOf(C.Deflate.prototype))._transform?r(T,"_transform",P):T.write&&T.flush&&T.end&&i(T,["write","flush","end"],P));try{E=n(6982)}catch{}E&&(x=["pbkdf2","randomBytes"],u||x.push("pseudoRandomBytes"),i(E,x,P));var x,R,I=!!global.Promise&&"function Promise() { [native code] }"===Promise.toString()&&"function toString() { [native code] }"===Promise.toString.toString();function P(e){var t=function(){var t,n=arguments.length-1;if("function"==typeof arguments[n]){t=Array(arguments.length);for(var r=0;r<arguments.length-1;r++)t[r]=arguments[r];t[n]=o(arguments[n])}return e.apply(this,t||arguments)};switch(e.length){case 1:return function(n){return 1!==arguments.length?t.apply(this,arguments):("function"==typeof n&&(n=o(n)),e.call(this,n))};case 2:return function(n,r){return 2!==arguments.length?t.apply(this,arguments):("function"==typeof r&&(r=o(r)),e.call(this,n,r))};case 3:return function(n,r,i){return 3!==arguments.length?t.apply(this,arguments):("function"==typeof i&&(i=o(i)),e.call(this,n,r,i))};case 4:return function(n,r,i,s){return 4!==arguments.length?t.apply(this,arguments):("function"==typeof s&&(s=o(s)),e.call(this,n,r,i,s))};case 5:return function(n,r,i,s,a){return 5!==arguments.length?t.apply(this,arguments):("function"==typeof a&&(a=o(a)),e.call(this,n,r,i,s,a))};case 6:return function(n,r,i,s,a,c){return 6!==arguments.length?t.apply(this,arguments):("function"==typeof c&&(c=o(c)),e.call(this,n,r,i,s,a,c))};default:return t}}function O(e){var t=function(){var t;if("function"==typeof arguments[0]){(t=Array(arguments.length))[0]=o(arguments[0]);for(var n=1;n<arguments.length;n++)t[n]=arguments[n]}return e.apply(this,t||arguments)};switch(e.length){case 1:return function(n){return 1!==arguments.length?t.apply(this,arguments):("function"==typeof n&&(n=o(n)),e.call(this,n))};case 2:return function(n,r){return 2!==arguments.length?t.apply(this,arguments):("function"==typeof n&&(n=o(n)),e.call(this,n,r))};case 3:return function(n,r,i){return 3!==arguments.length?t.apply(this,arguments):("function"==typeof n&&(n=o(n)),e.call(this,n,r,i))};case 4:return function(n,r,i,s){return 4!==arguments.length?t.apply(this,arguments):("function"==typeof n&&(n=o(n)),e.call(this,n,r,i,s))};case 5:return function(n,r,i,s,a){return 5!==arguments.length?t.apply(this,arguments):("function"==typeof n&&(n=o(n)),e.call(this,n,r,i,s,a))};case 6:return function(n,r,i,s,a,c){return 6!==arguments.length?t.apply(this,arguments):("function"==typeof n&&(n=o(n)),e.call(this,n,r,i,s,a,c))};default:return t}}I&&(R=process.addAsyncListener({create:function(){I=!1}}),global.Promise.resolve(!0).then((function(){I=!1})),process.removeAsyncListener(R)),I&&function(){var e=global.Promise;function t(r){if(!(this instanceof t))return e(r);if("function"!=typeof r)return new e(r);var i,o,s=new e((function(e,t){i=this,o=[function(t){return n(s,!1),e(t)},function(e){return n(s,!1),t(e)}]}));s.__proto__=t.prototype;try{r.apply(i,o)}catch(e){o[1](e)}return s}function n(e,t){(!e.__asl_wrapper||t)&&(e.__asl_wrapper=o(i))}function i(t,r,o,s){var a;try{return{returnVal:a=r.call(t,o),error:!1}}catch(e){return{errorVal:e,error:!0}}finally{a instanceof e?s.__asl_wrapper=function(){return(a.__asl_wrapper||i).apply(this,arguments)}:n(s,!0)}}function c(e){return function(){var t=this,n=e.apply(t,Array.prototype.map.call(arguments,(function(e){return"function"!=typeof e?e:o((function(r){var o=(t.__asl_wrapper||i)(this,e,r,n);if(o.error)throw o.errorVal;return o.returnVal}))})));return n.__asl_wrapper=function(e,r,o,s){return t.__asl_wrapper?(t.__asl_wrapper(e,(function(){}),null,n),n.__asl_wrapper(e,r,o,s)):i(e,r,o,s)},n}}s.inherits(t,e),r(e.prototype,"then",c),e.prototype.chain&&r(e.prototype,"chain",c),a?global.Promise=Tr()(e,n):(["all","race","reject","resolve","accept","defer"].forEach((function(n){"function"==typeof e[n]&&(t[n]=e[n])})),global.Promise=t)}()})),_r=S(((e,t)=>{"use strict";var r=n(2613),i=ar(),o="cls@contexts",s="error@context";function a(e){this.name=e,this.active=null,this._set=[],this.id=null}function c(e){return process.namespaces[e]}function l(e){var t=c(e);r.ok(t,"can't delete nonexistent namespace!"),r.ok(t.id,"don't assign to process.namespaces directly!"),process.removeAsyncListener(t.id),process.namespaces[e]=null}function u(){process.namespaces&&Object.keys(process.namespaces).forEach((function(e){l(e)})),process.namespaces=Object.create(null)}process.addAsyncListener||Er(),a.prototype.set=function(e,t){if(!this.active)throw new Error("No context available. ns.run() or ns.bind() must be called first.");return this.active[e]=t,t},a.prototype.get=function(e){if(this.active)return this.active[e]},a.prototype.createContext=function(){return Object.create(this.active)},a.prototype.run=function(e){var t=this.createContext();this.enter(t);try{return e(t),t}catch(e){throw e&&(e[s]=t),e}finally{this.exit(t)}},a.prototype.runAndReturn=function(e){var t;return this.run((function(n){t=e(n)})),t},a.prototype.bind=function(e,t){t||(t=this.active?this.active:this.createContext());var n=this;return function(){n.enter(t);try{return e.apply(this,arguments)}catch(e){throw e&&(e[s]=t),e}finally{n.exit(t)}}},a.prototype.enter=function(e){r.ok(e,"context must be provided for entering"),this._set.push(this.active),this.active=e},a.prototype.exit=function(e){if(r.ok(e,"context must be provided for exiting"),this.active===e)return r.ok(this._set.length,"can't remove top context"),void(this.active=this._set.pop());var t=this._set.lastIndexOf(e);r.ok(t>=0,"context not currently entered; can't exit"),r.ok(t,"can't remove top context"),this._set.splice(t,1)},a.prototype.bindEmitter=function(e){r.ok(e.on&&e.addListener&&e.emit,"can only bind real EEs");var t=this,n="context@"+this.name;i(e,(function(e){!e||(e[o]||(e[o]=Object.create(null)),e[o][n]={namespace:t,context:t.active})}),(function(e){if(!e||!e[o])return e;var t=e,n=e[o];return Object.keys(n).forEach((function(e){var r=n[e];t=r.namespace.bind(t,r.context)})),t}))},a.prototype.fromException=function(e){return e[s]},process.namespaces||u(),t.exports={getNamespace:c,createNamespace:function(e){r.ok(e,"namespace must be given a name!");var t=new a(e);return t.id=process.addAsyncListener({create:function(){return t.active},before:function(e,n){n&&t.enter(n)},after:function(e,n){n&&t.exit(n)},error:function(e){e&&t.exit(e)}}),process.namespaces[e]=t,t},destroyNamespace:l,reset:u}})),xr=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CorrelationContextManager=void 0;var t=P(),n=an(),r=dn(),i=pn(),o=ir(),s=function(){function e(){}return e.getCurrentContext=function(){if(!e.enabled)return null;var t=e.session.get(e.CONTEXT_NAME);return void 0===t?null:t},e.generateContextObject=function(e,t,n,r,i,o){return t=t||e,this.enabled?{operation:{name:n,id:e,parentId:t,traceparent:i,tracestate:o},customProperties:new a(r)}:null},e.spanToContextObject=function(t,n,i){var o=new r;return o.traceId=t.traceId,o.spanId=t.spanId,o.traceFlag=r.formatOpenTelemetryTraceFlags(t.traceFlags)||r.DEFAULT_TRACE_FLAG,o.parentId=n,e.generateContextObject(o.traceId,o.parentId,i,null,o)},e.runWithContext=function(t,n){var r;return e.enabled?e.session.bind(n,((r={})[e.CONTEXT_NAME]=t,r))():n()},e.wrapEmitter=function(t){e.enabled&&e.session.bindEmitter(t)},e.wrapCallback=function(t,n){var r;return e.enabled?e.session.bind(t,n?((r={})[e.CONTEXT_NAME]=n,r):void 0):t},e.enable=function(t){if(!this.enabled){if(!this.isNodeVersionCompatible())return void(this.enabled=!1);e.hasEverEnabled||(this.forceClsHooked=t,this.hasEverEnabled=!0,typeof this.cls>"u"&&(!0===e.forceClsHooked||void 0===e.forceClsHooked&&e.shouldUseClsHooked()?this.cls=Sr():this.cls=_r()),e.session=this.cls.createNamespace("AI-CLS-Session"),n.registerContextPreservation((function(t){return e.session.bind(t)}))),this.enabled=!0}},e.startOperation=function(n,s){var a=n&&n.traceContext||null,c=n&&n.traceId?n:null,l=n&&n.headers;if(c){var u=new r("00-"+c.traceId+"-"+c.spanId+"-01"),d=new i(c.traceState?c.traceState.serialize():null);return e.generateContextObject(c.traceId,"|"+c.traceId+"."+c.spanId+".","string"==typeof s?s:"",void 0,u,d)}if(a){u=new r(a.traceparent),d=new i(a.tracestate);var p="object"==typeof s?new o(s):null;return e.generateContextObject(u.traceId,u.parentId,"string"==typeof s?s:p.getOperationName({}),p&&p.getCorrelationContextHeader()||void 0,u,d)}return l?(u=new r(l.traceparent?l.traceparent.toString():null),d=new i(l.tracestate?l.tracestate.toString():null),p=new o(n),e.generateContextObject(u.traceId,u.parentId,p.getOperationName({}),p.getCorrelationContextHeader(),u,d)):(t.warn("startOperation was called with invalid arguments",arguments),null)},e.disable=function(){this.enabled=!1},e.reset=function(){e.hasEverEnabled&&(e.session=null,e.session=this.cls.createNamespace("AI-CLS-Session"))},e.isNodeVersionCompatible=function(){var e=process.versions.node.split(".");return parseInt(e[0])>3||parseInt(e[0])>2&&parseInt(e[1])>2},e.shouldUseClsHooked=function(){var e=process.versions.node.split(".");return parseInt(e[0])>8||parseInt(e[0])>=8&&parseInt(e[1])>=2},e.canUseClsHooked=function(){var e=process.versions.node.split("."),t=parseInt(e[0])>8||parseInt(e[0])>=8&&parseInt(e[1])>=0,n=parseInt(e[0])<8||parseInt(e[0])<=8&&parseInt(e[1])<2,r=parseInt(e[0])>4||parseInt(e[0])>=4&&parseInt(e[1])>=7;return!(t&&n)&&r},e.enabled=!1,e.hasEverEnabled=!1,e.forceClsHooked=void 0,e.CONTEXT_NAME="ApplicationInsights-Context",e}();e.CorrelationContextManager=s;var a=function(){function e(e){this.props=[],this.addHeaderData(e)}return e.prototype.addHeaderData=function(e){var t=e?e.split(", "):[];this.props=t.map((function(e){var t=e.split("=");return{key:t[0],value:t[1]}})).concat(this.props)},e.prototype.serializeToHeader=function(){return this.props.map((function(e){return e.key+"="+e.value})).join(", ")},e.prototype.getProperty=function(e){for(var t=0;t<this.props.length;++t){var n=this.props[t];if(n.key===e)return n.value}},e.prototype.setProperty=function(n,r){if(e.bannedCharacters.test(n)||e.bannedCharacters.test(r))t.warn("Correlation context property keys and values must not contain ',' or '='. setProperty was called with key: "+n+" and value: "+r);else{for(var i=0;i<this.props.length;++i){var o=this.props[i];if(o.key===n)return void(o.value=r)}this.props.push({key:n,value:r})}},e.bannedCharacters=/[,=]/,e}()})),Rr=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.dispose=e.enable=void 0;var t=nr(),n=N(),r=[],i=function(e){var n=e.data.message;r.forEach((function(r){n instanceof Error?r.trackException({exception:n}):(n.lastIndexOf("\n")==n.length-1&&(n=n.substring(0,n.length-1)),r.trackTrace({message:n,severity:e.data.stderr?t.SeverityLevel.Warning:t.SeverityLevel.Information}))}))};e.enable=function(e,t){e?(0===r.length&&n.channel.subscribe("console",i),r.push(t)):0===(r=r.filter((function(e){return e!=t}))).length&&n.channel.unsubscribe("console",i)},e.dispose=function(){n.channel.unsubscribe("console",i),r=[]}})),Ir=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.dispose=e.enable=void 0;var t=nr(),n=N(),r=[],i={10:t.SeverityLevel.Verbose,20:t.SeverityLevel.Verbose,30:t.SeverityLevel.Information,40:t.SeverityLevel.Warning,50:t.SeverityLevel.Error,60:t.SeverityLevel.Critical},o=function(e){var t=e.data.result;r.forEach((function(n){var r=i[e.data.level];t instanceof Error?n.trackException({exception:t}):n.trackTrace({message:t,severity:r})}))};e.enable=function(e,t){e?(0===r.length&&n.channel.subscribe("bunyan",o),r.push(t)):0===(r=r.filter((function(e){return e!=t}))).length&&n.channel.unsubscribe("bunyan",o)},e.dispose=function(){n.channel.unsubscribe("bunyan",o),r=[]}})),Pr=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.dispose=e.enable=void 0;var t=nr(),n=N(),r=[],i={syslog:function(e){var n={emerg:t.SeverityLevel.Critical,alert:t.SeverityLevel.Critical,crit:t.SeverityLevel.Critical,error:t.SeverityLevel.Error,warning:t.SeverityLevel.Warning,notice:t.SeverityLevel.Information,info:t.SeverityLevel.Information,debug:t.SeverityLevel.Verbose};return void 0===n[e]?t.SeverityLevel.Information:n[e]},npm:function(e){var n={error:t.SeverityLevel.Error,warn:t.SeverityLevel.Warning,info:t.SeverityLevel.Information,verbose:t.SeverityLevel.Verbose,debug:t.SeverityLevel.Verbose,silly:t.SeverityLevel.Verbose};return void 0===n[e]?t.SeverityLevel.Information:n[e]},unknown:function(e){return t.SeverityLevel.Information}},o=function(e){var t=e.data.message;r.forEach((function(n){if(t instanceof Error)n.trackException({exception:t,properties:e.data.meta});else{var r=i[e.data.levelKind](e.data.level);n.trackTrace({message:t,severity:r,properties:e.data.meta})}}))};e.enable=function(e,t){e?(0===r.length&&n.channel.subscribe("winston",o),r.push(t)):0===(r=r.filter((function(e){return e!=t}))).length&&n.channel.unsubscribe("winston",o)},e.dispose=function(){n.channel.unsubscribe("winston",o),r=[]}})),Or=S(((e,t)=>{"use strict";var n=an(),r=function(){function e(t){if(e.INSTANCE)throw new Error("Console logging adapter tracking should be configured from the applicationInsights object");this._client=t,e.INSTANCE=this}return e.prototype.enable=function(e,t){n.IsInitialized&&(Rr().enable(e&&t,this._client),Ir().enable(e,this._client),Pr().enable(e,this._client))},e.prototype.isInitialized=function(){return this._isInitialized},e.prototype.dispose=function(){e.INSTANCE=null,this.enable(!1,!1)},e._methodNames=["debug","info","log","warn","error"],e}();t.exports=r})),Dr=S(((e,t)=>{"use strict";var n=function(){function e(t){if(e.INSTANCE)throw new Error("Exception tracking should be configured from the applicationInsights object");e.INSTANCE=this,this._client=t;var n=process.versions.node.split(".");e._canUseUncaughtExceptionMonitor=parseInt(n[0])>13||13===parseInt(n[0])&&parseInt(n[1])>=7}return e.prototype.isInitialized=function(){return this._isInitialized},e.prototype.enable=function(t){var n=this;if(t){if(this._isInitialized=!0,!this._exceptionListenerHandle){var r=function(t,r,i){void 0===i&&(i=new Error(e._FALLBACK_ERROR_MESSAGE)),n._client.trackException({exception:i}),n._client.flush({isAppCrashing:!0}),t&&r&&1===process.listeners(r).length&&(console.error(i),process.exit(1))};e._canUseUncaughtExceptionMonitor?(this._exceptionListenerHandle=r.bind(this,!1,void 0),process.on(e.UNCAUGHT_EXCEPTION_MONITOR_HANDLER_NAME,this._exceptionListenerHandle)):(this._exceptionListenerHandle=r.bind(this,!0,e.UNCAUGHT_EXCEPTION_HANDLER_NAME),this._rejectionListenerHandle=r.bind(this,!1,void 0),process.on(e.UNCAUGHT_EXCEPTION_HANDLER_NAME,this._exceptionListenerHandle),process.on(e.UNHANDLED_REJECTION_HANDLER_NAME,this._rejectionListenerHandle))}}else this._exceptionListenerHandle&&(e._canUseUncaughtExceptionMonitor?process.removeListener(e.UNCAUGHT_EXCEPTION_MONITOR_HANDLER_NAME,this._exceptionListenerHandle):(process.removeListener(e.UNCAUGHT_EXCEPTION_HANDLER_NAME,this._exceptionListenerHandle),process.removeListener(e.UNHANDLED_REJECTION_HANDLER_NAME,this._rejectionListenerHandle)),this._exceptionListenerHandle=void 0,this._rejectionListenerHandle=void 0,delete this._exceptionListenerHandle,delete this._rejectionListenerHandle)},e.prototype.dispose=function(){e.INSTANCE=null,this.enable(!1),this._isInitialized=!1},e.INSTANCE=null,e.UNCAUGHT_EXCEPTION_MONITOR_HANDLER_NAME="uncaughtExceptionMonitor",e.UNCAUGHT_EXCEPTION_HANDLER_NAME="uncaughtException",e.UNHANDLED_REJECTION_HANDLER_NAME="unhandledRejection",e._RETHROW_EXIT_MESSAGE="Application Insights Rethrow Exception Handler",e._FALLBACK_ERROR_MESSAGE="A promise was rejected without providing an error. Application Insights generated this error stack for you.",e._canUseUncaughtExceptionMonitor=!1,e}();t.exports=n})),Ar=S((e=>{"use strict";var t,n,r,i;Object.defineProperty(e,"__esModule",{value:!0}),e.HeartBeatMetricName=e.DependencyTypeName=e.SpanAttribute=e.TelemetryTypeStringToQuickPulseDocumentType=e.TelemetryTypeStringToQuickPulseType=e.QuickPulseType=e.QuickPulseDocumentType=e.PerformanceToQuickPulseCounter=e.MetricId=e.PerformanceCounter=e.QuickPulseCounter=e.DEFAULT_LIVEMETRICS_HOST=e.DEFAULT_LIVEMETRICS_ENDPOINT=e.DEFAULT_BREEZE_ENDPOINT=void 0,e.DEFAULT_BREEZE_ENDPOINT="https://dc.services.visualstudio.com",e.DEFAULT_LIVEMETRICS_ENDPOINT="https://rt.services.visualstudio.com",e.DEFAULT_LIVEMETRICS_HOST="rt.services.visualstudio.com",(r=n=e.QuickPulseCounter||(e.QuickPulseCounter={})).COMMITTED_BYTES="\\Memory\\Committed Bytes",r.PROCESSOR_TIME="\\Processor(_Total)\\% Processor Time",r.REQUEST_RATE="\\ApplicationInsights\\Requests/Sec",r.REQUEST_FAILURE_RATE="\\ApplicationInsights\\Requests Failed/Sec",r.REQUEST_DURATION="\\ApplicationInsights\\Request Duration",r.DEPENDENCY_RATE="\\ApplicationInsights\\Dependency Calls/Sec",r.DEPENDENCY_FAILURE_RATE="\\ApplicationInsights\\Dependency Calls Failed/Sec",r.DEPENDENCY_DURATION="\\ApplicationInsights\\Dependency Call Duration",r.EXCEPTION_RATE="\\ApplicationInsights\\Exceptions/Sec",function(e){e.PRIVATE_BYTES="\\Process(??APP_WIN32_PROC??)\\Private Bytes",e.AVAILABLE_BYTES="\\Memory\\Available Bytes",e.PROCESSOR_TIME="\\Processor(_Total)\\% Processor Time",e.PROCESS_TIME="\\Process(??APP_WIN32_PROC??)\\% Processor Time",e.REQUEST_RATE="\\ASP.NET Applications(??APP_W3SVC_PROC??)\\Requests/Sec",e.REQUEST_DURATION="\\ASP.NET Applications(??APP_W3SVC_PROC??)\\Request Execution Time"}(i=e.PerformanceCounter||(e.PerformanceCounter={})),function(e){e.REQUESTS_DURATION="requests/duration",e.DEPENDENCIES_DURATION="dependencies/duration",e.EXCEPTIONS_COUNT="exceptions/count",e.TRACES_COUNT="traces/count"}(e.MetricId||(e.MetricId={})),e.PerformanceToQuickPulseCounter=((t={})[i.PROCESSOR_TIME]=n.PROCESSOR_TIME,t[i.REQUEST_RATE]=n.REQUEST_RATE,t[i.REQUEST_DURATION]=n.REQUEST_DURATION,t[n.COMMITTED_BYTES]=n.COMMITTED_BYTES,t[n.REQUEST_FAILURE_RATE]=n.REQUEST_FAILURE_RATE,t[n.DEPENDENCY_RATE]=n.DEPENDENCY_RATE,t[n.DEPENDENCY_FAILURE_RATE]=n.DEPENDENCY_FAILURE_RATE,t[n.DEPENDENCY_DURATION]=n.DEPENDENCY_DURATION,t[n.EXCEPTION_RATE]=n.EXCEPTION_RATE,t),e.QuickPulseDocumentType={Event:"Event",Exception:"Exception",Trace:"Trace",Metric:"Metric",Request:"Request",Dependency:"RemoteDependency",Availability:"Availability",PageView:"PageView"},e.QuickPulseType={Event:"EventTelemetryDocument",Exception:"ExceptionTelemetryDocument",Trace:"TraceTelemetryDocument",Metric:"MetricTelemetryDocument",Request:"RequestTelemetryDocument",Dependency:"DependencyTelemetryDocument",Availability:"AvailabilityTelemetryDocument",PageView:"PageViewTelemetryDocument"},e.TelemetryTypeStringToQuickPulseType={EventData:e.QuickPulseType.Event,ExceptionData:e.QuickPulseType.Exception,MessageData:e.QuickPulseType.Trace,MetricData:e.QuickPulseType.Metric,RequestData:e.QuickPulseType.Request,RemoteDependencyData:e.QuickPulseType.Dependency,AvailabilityData:e.QuickPulseType.Availability,PageViewData:e.QuickPulseType.PageView},e.TelemetryTypeStringToQuickPulseDocumentType={EventData:e.QuickPulseDocumentType.Event,ExceptionData:e.QuickPulseDocumentType.Exception,MessageData:e.QuickPulseDocumentType.Trace,MetricData:e.QuickPulseDocumentType.Metric,RequestData:e.QuickPulseDocumentType.Request,RemoteDependencyData:e.QuickPulseDocumentType.Dependency,AvailabilityData:e.QuickPulseDocumentType.Availability,PageViewData:e.QuickPulseDocumentType.PageView},e.SpanAttribute={HttpHost:"http.host",HttpMethod:"http.method",HttpPort:"http.port",HttpStatusCode:"http.status_code",HttpUrl:"http.url",HttpUserAgent:"http.user_agent",GrpcMethod:"grpc.method",GrpcService:"rpc.service"},e.DependencyTypeName={Grpc:"GRPC",Http:"HTTP",InProc:"InProc"},e.HeartBeatMetricName="HeartBeat"})),kr=S(((e,t)=>{"use strict";var r=n(857),i=Ar(),o=function(){function e(t,n,r){void 0===n&&(n=6e4),void 0===r&&(r=!1),this._lastIntervalRequestExecutionTime=0,this._lastIntervalDependencyExecutionTime=0,e.INSTANCE||(e.INSTANCE=this),this._isInitialized=!1,this._client=t,this._collectionInterval=n,this._enableLiveMetricsCounters=r}return e.prototype.enable=function(t,n){var i=this;this._isEnabled=t,this._isEnabled&&!this._isInitialized&&(this._isInitialized=!0),t?this._handle||(this._lastCpus=r.cpus(),this._lastRequests={totalRequestCount:e._totalRequestCount,totalFailedRequestCount:e._totalFailedRequestCount,time:+new Date},this._lastDependencies={totalDependencyCount:e._totalDependencyCount,totalFailedDependencyCount:e._totalFailedDependencyCount,time:+new Date},this._lastExceptions={totalExceptionCount:e._totalExceptionCount,time:+new Date},"function"==typeof process.cpuUsage&&(this._lastAppCpuUsage=process.cpuUsage()),this._lastHrtime=process.hrtime(),this._collectionInterval=n||this._collectionInterval,this._handle=setInterval((function(){return i.trackPerformance()}),this._collectionInterval),this._handle.unref()):this._handle&&(clearInterval(this._handle),this._handle=void 0)},e.countRequest=function(t,n){var r;if(e.isEnabled()){if("string"==typeof t)r=+new Date("1970-01-01T"+t+"Z");else{if("number"!=typeof t)return;r=t}e._intervalRequestExecutionTime+=r,!1===n&&e._totalFailedRequestCount++,e._totalRequestCount++}},e.countException=function(){e._totalExceptionCount++},e.countDependency=function(t,n){var r;if(e.isEnabled()){if("string"==typeof t)r=+new Date("1970-01-01T"+t+"Z");else{if("number"!=typeof t)return;r=t}e._intervalDependencyExecutionTime+=r,!1===n&&e._totalFailedDependencyCount++,e._totalDependencyCount++}},e.prototype.isInitialized=function(){return this._isInitialized},e.isEnabled=function(){return e.INSTANCE&&e.INSTANCE._isEnabled},e.prototype.trackPerformance=function(){this._trackCpu(),this._trackMemory(),this._trackNetwork(),this._trackDependencyRate(),this._trackExceptionRate()},e.prototype._trackCpu=function(){var e=r.cpus();if(e&&e.length&&this._lastCpus&&e.length===this._lastCpus.length){for(var t=0,n=0,o=0,s=0,a=0,c=0;e&&c<e.length;c++){var l=e[c],u=this._lastCpus[c],d=(l.model,l.speed,l.times),p=u.times;t+=d.user-p.user||0,n+=d.sys-p.sys||0,o+=d.nice-p.nice||0,s+=d.idle-p.idle||0,a+=d.irq-p.irq||0}var h=void 0;if("function"==typeof process.cpuUsage){var f=process.cpuUsage(),m=process.hrtime(),g=f.user-this._lastAppCpuUsage.user+(f.system-this._lastAppCpuUsage.system)||0;typeof this._lastHrtime<"u"&&2===this._lastHrtime.length&&(h=100*g/((1e6*(m[0]-this._lastHrtime[0])+(m[1]-this._lastHrtime[1])/1e3||0)*e.length)),this._lastAppCpuUsage=f,this._lastHrtime=m}var y=t+n+o+s+a||1;this._client.trackMetric({name:i.PerformanceCounter.PROCESSOR_TIME,value:(y-s)/y*100}),this._client.trackMetric({name:i.PerformanceCounter.PROCESS_TIME,value:h||t/y*100})}this._lastCpus=e},e.prototype._trackMemory=function(){var e=r.freemem(),t=process.memoryUsage().rss,n=r.totalmem()-e;this._client.trackMetric({name:i.PerformanceCounter.PRIVATE_BYTES,value:t}),this._client.trackMetric({name:i.PerformanceCounter.AVAILABLE_BYTES,value:e}),this._enableLiveMetricsCounters&&this._client.trackMetric({name:i.QuickPulseCounter.COMMITTED_BYTES,value:n})},e.prototype._trackNetwork=function(){var t=this._lastRequests,n={totalRequestCount:e._totalRequestCount,totalFailedRequestCount:e._totalFailedRequestCount,time:+new Date},r=n.totalRequestCount-t.totalRequestCount||0,o=n.totalFailedRequestCount-t.totalFailedRequestCount||0,s=n.time-t.time,a=s/1e3,c=(e._intervalRequestExecutionTime-this._lastIntervalRequestExecutionTime)/r||0;if(this._lastIntervalRequestExecutionTime=e._intervalRequestExecutionTime,s>0){var l=r/a,u=o/a;this._client.trackMetric({name:i.PerformanceCounter.REQUEST_RATE,value:l}),(!this._enableLiveMetricsCounters||r>0)&&this._client.trackMetric({name:i.PerformanceCounter.REQUEST_DURATION,value:c}),this._enableLiveMetricsCounters&&this._client.trackMetric({name:i.QuickPulseCounter.REQUEST_FAILURE_RATE,value:u})}this._lastRequests=n},e.prototype._trackDependencyRate=function(){if(this._enableLiveMetricsCounters){var t=this._lastDependencies,n={totalDependencyCount:e._totalDependencyCount,totalFailedDependencyCount:e._totalFailedDependencyCount,time:+new Date},r=n.totalDependencyCount-t.totalDependencyCount||0,o=n.totalFailedDependencyCount-t.totalFailedDependencyCount||0,s=n.time-t.time,a=s/1e3,c=(e._intervalDependencyExecutionTime-this._lastIntervalDependencyExecutionTime)/r||0;if(this._lastIntervalDependencyExecutionTime=e._intervalDependencyExecutionTime,s>0){var l=r/a,u=o/a;this._client.trackMetric({name:i.QuickPulseCounter.DEPENDENCY_RATE,value:l}),this._client.trackMetric({name:i.QuickPulseCounter.DEPENDENCY_FAILURE_RATE,value:u}),(!this._enableLiveMetricsCounters||r>0)&&this._client.trackMetric({name:i.QuickPulseCounter.DEPENDENCY_DURATION,value:c})}this._lastDependencies=n}},e.prototype._trackExceptionRate=function(){if(this._enableLiveMetricsCounters){var t=this._lastExceptions,n={totalExceptionCount:e._totalExceptionCount,time:+new Date},r=n.totalExceptionCount-t.totalExceptionCount||0,o=n.time-t.time;if(o>0){var s=r/(o/1e3);this._client.trackMetric({name:i.QuickPulseCounter.EXCEPTION_RATE,value:s})}this._lastExceptions=n}},e.prototype.dispose=function(){e.INSTANCE=null,this.enable(!1),this._isInitialized=!1},e._totalRequestCount=0,e._totalFailedRequestCount=0,e._totalDependencyCount=0,e._totalFailedDependencyCount=0,e._totalExceptionCount=0,e._intervalDependencyExecutionTime=0,e._intervalRequestExecutionTime=0,e}();t.exports=o})),Nr=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AggregatedMetricCounter=void 0;e.AggregatedMetricCounter=function(e){this.dimensions=e,this.totalCount=0,this.lastTotalCount=0,this.intervalExecutionTime=0,this.lastTime=+new Date,this.lastIntervalExecutionTime=0}})),Lr=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.PreaggregatedMetricPropertyNames=void 0,e.PreaggregatedMetricPropertyNames={cloudRoleInstance:"cloud/roleInstance",cloudRoleName:"cloud/roleName",operationSynthetic:"operation/synthetic",requestSuccess:"Request.Success",requestResultCode:"request/resultCode",dependencyType:"Dependency.Type",dependencyTarget:"dependency/target",dependencySuccess:"Dependency.Success",dependencyResultCode:"dependency/resultCode",traceSeverityLevel:"trace/severityLevel"}})),jr=S(((e,t)=>{"use strict";var n=e&&e.__assign||function(){return n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},n.apply(this,arguments)},r=Ar(),i=Nr(),o=Lr(),s=function(){function e(t,n){void 0===n&&(n=6e4),e.INSTANCE||(e.INSTANCE=this),this._isInitialized=!1,e._dependencyCountersCollection=[],e._requestCountersCollection=[],e._exceptionCountersCollection=[],e._traceCountersCollection=[],this._client=t,this._collectionInterval=n}return e.prototype.enable=function(e,t){var n=this;this._isEnabled=e,this._isEnabled&&!this._isInitialized&&(this._isInitialized=!0),e?this._handle||(this._collectionInterval=t||this._collectionInterval,this._handle=setInterval((function(){return n.trackPreAggregatedMetrics()}),this._collectionInterval),this._handle.unref()):this._handle&&(clearInterval(this._handle),this._handle=void 0)},e.countException=function(t){e.isEnabled()&&e._getAggregatedCounter(t,this._exceptionCountersCollection).totalCount++},e.countTrace=function(t){e.isEnabled()&&e._getAggregatedCounter(t,this._traceCountersCollection).totalCount++},e.countRequest=function(t,n){if(e.isEnabled()){var r,i=e._getAggregatedCounter(n,this._requestCountersCollection);if("string"==typeof t)r=+new Date("1970-01-01T"+t+"Z");else{if("number"!=typeof t)return;r=t}i.intervalExecutionTime+=r,i.totalCount++}},e.countDependency=function(t,n){if(e.isEnabled()){var r,i=e._getAggregatedCounter(n,this._dependencyCountersCollection);if("string"==typeof t)r=+new Date("1970-01-01T"+t+"Z");else{if("number"!=typeof t)return;r=t}i.intervalExecutionTime+=r,i.totalCount++}},e.prototype.isInitialized=function(){return this._isInitialized},e.isEnabled=function(){return e.INSTANCE&&e.INSTANCE._isEnabled},e.prototype.trackPreAggregatedMetrics=function(){this._trackRequestMetrics(),this._trackDependencyMetrics(),this._trackExceptionMetrics(),this._trackTraceMetrics()},e._getAggregatedCounter=function(e,t){for(var n=!1,r=0;r<t.length;r++){if(e===t[r].dimensions)return t[r];if(Object.keys(e).length===Object.keys(t[r].dimensions).length){for(var o in e)if(e[o]!=t[r].dimensions[o]){n=!0;break}if(!n)return t[r];n=!1}}var s=new i.AggregatedMetricCounter(e);return t.push(s),s},e.prototype._trackRequestMetrics=function(){for(var t=0;t<e._requestCountersCollection.length;t++){var n=e._requestCountersCollection[t];n.time=+new Date;var i=n.totalCount-n.lastTotalCount||0,o=n.time-n.lastTime,s=(n.intervalExecutionTime-n.lastIntervalExecutionTime)/i||0;n.lastIntervalExecutionTime=n.intervalExecutionTime,o>0&&i>0&&this._trackPreAggregatedMetric({name:"Server response time",dimensions:n.dimensions,value:s,count:i,aggregationInterval:o,metricType:r.MetricId.REQUESTS_DURATION}),n.lastTotalCount=n.totalCount,n.lastTime=n.time}},e.prototype._trackDependencyMetrics=function(){for(var t=0;t<e._dependencyCountersCollection.length;t++){var n=e._dependencyCountersCollection[t];n.time=+new Date;var i=n.totalCount-n.lastTotalCount||0,o=n.time-n.lastTime,s=(n.intervalExecutionTime-n.lastIntervalExecutionTime)/i||0;n.lastIntervalExecutionTime=n.intervalExecutionTime,o>0&&i>0&&this._trackPreAggregatedMetric({name:"Dependency duration",dimensions:n.dimensions,value:s,count:i,aggregationInterval:o,metricType:r.MetricId.DEPENDENCIES_DURATION}),n.lastTotalCount=n.totalCount,n.lastTime=n.time}},e.prototype._trackExceptionMetrics=function(){for(var t=0;t<e._exceptionCountersCollection.length;t++){var n=e._exceptionCountersCollection[t],i=n.totalCount-n.lastTotalCount||0,o=n.time-n.lastTime;this._trackPreAggregatedMetric({name:"Exceptions",dimensions:n.dimensions,value:i,count:i,aggregationInterval:o,metricType:r.MetricId.EXCEPTIONS_COUNT}),n.lastTotalCount=n.totalCount,n.lastTime=n.time}},e.prototype._trackTraceMetrics=function(){for(var t=0;t<e._traceCountersCollection.length;t++){var n=e._traceCountersCollection[t],i=n.totalCount-n.lastTotalCount||0,o=n.time-n.lastTime;this._trackPreAggregatedMetric({name:"Traces",dimensions:n.dimensions,value:i,count:i,aggregationInterval:o,metricType:r.MetricId.TRACES_COUNT}),n.lastTotalCount=n.totalCount,n.lastTime=n.time}},e.prototype._trackPreAggregatedMetric=function(e){var t={};for(var r in e.dimensions)t[o.PreaggregatedMetricPropertyNames[r]]=e.dimensions[r];t=n(n({},t),{"_MS.MetricId":e.metricType,"_MS.AggregationIntervalMs":String(e.aggregationInterval),"_MS.IsAutocollected":"True"});var i={name:e.name,value:e.value,count:e.count,properties:t,kind:"Aggregation"};this._client.trackMetric(i)},e.prototype.dispose=function(){e.INSTANCE=null,this.enable(!1),this._isInitialized=!1},e}();t.exports=s})),Mr=S(((e,t)=>{"use strict";var r=n(857),i=n(9896),o=n(6928),s=nr(),a=P(),c=function(){function e(e){this.keys=new s.ContextTagKeys,this.tags={},this._loadApplicationContext(e),this._loadDeviceContext(),this._loadInternalContext()}return e.prototype._loadApplicationContext=function(t){if(t=t||o.resolve(__dirname,"../../../../package.json"),!e.appVersion[t]){e.appVersion[t]="unknown";try{var n=JSON.parse(i.readFileSync(t,"utf8"));n&&"string"==typeof n.version&&(e.appVersion[t]=n.version)}catch(e){a.info("unable to read app version: ",e)}}this.tags[this.keys.applicationVersion]=e.appVersion[t]},e.prototype._loadDeviceContext=function(){this.tags[this.keys.deviceId]="",this.tags[this.keys.cloudRoleInstance]=r&&r.hostname(),this.tags[this.keys.deviceOSVersion]=r&&r.type()+" "+r.release(),this.tags[this.keys.cloudRole]=e.DefaultRoleName,this.tags["ai.device.osArchitecture"]=r&&r.arch(),this.tags["ai.device.osPlatform"]=r&&r.platform()},e.prototype._loadInternalContext=function(){var t=o.resolve(__dirname,"../../package.json");if(!e.sdkVersion){e.sdkVersion="unknown";try{var n=JSON.parse(i.readFileSync(t,"utf8"));n&&"string"==typeof n.version&&(e.sdkVersion=n.version)}catch(e){a.info("unable to read app version: ",e)}}this.tags[this.keys.internalSdkVersion]="node:"+e.sdkVersion},e.DefaultRoleName="Web",e.appVersion={},e.sdkVersion=null,e}();t.exports=c})),Fr=S(((e,t)=>{"use strict";var r,i=e&&e.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=n(7016),s=nr(),a=ln(),c=cn(),l=rr(),u=un(),d=function(e){function t(n,r){var i=e.call(this)||this;return r&&r.method&&n&&(i.method=r.method,i.url=t._getUrlFromRequestOptions(n,r),i.startTime=+new Date),i}return i(t,e),t.prototype.onError=function(e){this._setStatus(void 0,e)},t.prototype.onResponse=function(e){this._setStatus(e.statusCode,void 0),this.correlationId=a.getCorrelationContextTarget(e,c.requestContextTargetKey)},t.prototype.getDependencyTelemetry=function(e,t){var n=o.parse(this.url);n.search=void 0,n.hash=void 0;var r=this.method.toUpperCase()+" "+n.pathname,i=s.RemoteDependencyDataConstants.TYPE_HTTP,a=n.hostname;n.port&&(a+=":"+n.port),this.correlationId?(i=s.RemoteDependencyDataConstants.TYPE_AI,this.correlationId!==u.correlationIdPrefix&&(a+=" | "+this.correlationId)):i=s.RemoteDependencyDataConstants.TYPE_HTTP;var c={id:t,name:r,data:this.url,duration:this.duration,success:this._isSuccess(),resultCode:this.statusCode?this.statusCode.toString():null,properties:this.properties||{},dependencyTypeName:i,target:a};if(e&&e.time?c.time=e.time:this.startTime&&(c.time=new Date(this.startTime)),e){for(var l in e)c[l]||(c[l]=e[l]);if(e.properties)for(var l in e.properties)c.properties[l]=e.properties[l]}return c},t._getUrlFromRequestOptions=function(e,t){if("string"==typeof e)if(0===e.indexOf("http://")||0===e.indexOf("https://"))e=o.parse(e);else{var n=o.parse(e);e="443"===n.host?o.parse("https://"+e):o.parse("http://"+e)}else{if(e&&"function"==typeof o.URL&&e instanceof o.URL)return o.format(e);var r=e;e={},r&&Object.keys(r).forEach((function(t){e[t]=r[t]}))}if(e.path){var i=o.parse(e.path);e.pathname=i.pathname,e.search=i.search}return e.host&&e.port&&!o.parse("http://"+e.host).port&&e.port&&(e.hostname=e.host,delete e.host),e.protocol=e.protocol||t.agent&&t.agent.protocol||t.protocol||void 0,e.hostname=e.hostname||"localhost",o.format(e)},t}(l);t.exports=d})),qr=S((e=>{"use strict";var t=e&&e.__assign||function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.spanToTelemetryContract=void 0;var n=Pe(),r=Ar();function i(e){var n=t({},e);return Object.keys(r.SpanAttribute).forEach((function(e){delete n[e]})),n}e.spanToTelemetryContract=function(e){var o="|"+e.spanContext().traceId+"."+e.spanContext().spanId+".",s=Math.round(1e3*e._duration[0]+e._duration[1]/1e6),a=e.attributes["peer.address"]?e.attributes["peer.address"].toString():"",c=e.attributes.component?e.attributes.component.toString():"",l=c.toUpperCase()===r.DependencyTypeName.Http||!!e.attributes[r.SpanAttribute.HttpUrl],u=c.toLowerCase()===r.DependencyTypeName.Grpc;if(l){var d=e.attributes[r.SpanAttribute.HttpMethod]||"GET",p=new URL(e.attributes[r.SpanAttribute.HttpUrl].toString()),h=e.attributes[r.SpanAttribute.HttpHost]||p.host,f=e.attributes[r.SpanAttribute.HttpPort]||p.port||null,m=d+" "+(p.pathname||"/"),g=r.DependencyTypeName.Http,y=f?(h+":"+f).toString():h.toString(),b=p.toString(),v=e.attributes[r.SpanAttribute.HttpStatusCode]||e.status.code||0;return{id:o,name:m,dependencyTypeName:g,target:y,data:b,success:v<400,duration:s,url:b,resultCode:String(v),properties:i(e.attributes)}}if(u){d=e.attributes[r.SpanAttribute.GrpcMethod]||"rpc";var S=e.attributes[r.SpanAttribute.GrpcService],w=S?d+" "+S:e.name;return{id:o,duration:s,name:w,target:S.toString(),data:S.toString()||w,url:S.toString()||w,dependencyTypeName:r.DependencyTypeName.Grpc,resultCode:String(e.status.code||0),success:0===e.status.code,properties:i(e.attributes)}}var C=e.name,T=e.links&&e.links.map((function(e){return{operation_Id:e.context.traceId,id:e.context.spanId}}));return{id:o,duration:s,name:C,target:a,data:a||C,url:a||C,dependencyTypeName:e.kind===n.SpanKind.INTERNAL?r.DependencyTypeName.InProc:c||e.name,resultCode:String(e.status.code||0),success:0===e.status.code,properties:t(t({},i(e.attributes)),{"_MS.links":T||void 0})}}})),Br=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.subscriber=void 0;var t=Pe(),n=N(),r=dn(),i=qr(),o=O(),s=[];e.subscriber=function(e){var n=e.data,a=i.spanToTelemetryContract(n),c=n.spanContext(),l=new r;l.traceId=c.traceId,l.spanId=c.spanId,l.traceFlag=r.formatOpenTelemetryTraceFlags(c.traceFlags),l.parentId=n.parentSpanId?"|"+c.traceId+"."+n.parentSpanId+".":null,o.AsyncScopeManager.with(n,(function(){s.forEach((function(e){n.kind===t.SpanKind.SERVER?e.trackRequest(a):(n.kind===t.SpanKind.CLIENT||n.kind===t.SpanKind.INTERNAL)&&e.trackDependency(a)}))}))},e.enable=function(t,r){t?(0===s.length&&n.channel.subscribe("azure-coretracing",e.subscriber),s.push(r)):0===(s=s.filter((function(e){return e!=r}))).length&&n.channel.unsubscribe("azure-coretracing",e.subscriber)}})),Ur=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.subscriber=void 0;var t=N(),n=[];e.subscriber=function(e){"ismaster"!==e.data.event.commandName&&n.forEach((function(t){var n=e.data.startedData&&e.data.startedData.databaseName||"Unknown database";t.trackDependency({target:n,data:e.data.event.commandName,name:e.data.event.commandName,duration:e.data.event.duration,success:e.data.succeeded,resultCode:e.data.succeeded?"0":"1",time:e.data.startedData.time,dependencyTypeName:"mongodb"})}))},e.enable=function(r,i){r?(0===n.length&&t.channel.subscribe("mongodb",e.subscriber),n.push(i)):0===(n=n.filter((function(e){return e!=i}))).length&&t.channel.unsubscribe("mongodb",e.subscriber)}})),zr=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.subscriber=void 0;var t=N(),n=[];e.subscriber=function(e){n.forEach((function(t){var n=e.data.query||{},r=n.sql||"Unknown query",i=!e.data.err,o=(n._connection||{}).config||{},s=o.socketPath?o.socketPath:(o.host||"localhost")+":"+o.port;t.trackDependency({target:s,data:r,name:r,duration:e.data.duration,success:i,resultCode:i?"0":"1",time:e.data.time,dependencyTypeName:"mysql"})}))},e.enable=function(r,i){r?(0===n.length&&t.channel.subscribe("mysql",e.subscriber),n.push(i)):0===(n=n.filter((function(e){return e!=i}))).length&&t.channel.unsubscribe("mysql",e.subscriber)}})),Gr=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.subscriber=void 0;var t=N(),n=[];e.subscriber=function(e){n.forEach((function(t){"info"!==e.data.commandObj.command&&t.trackDependency({target:e.data.address,name:e.data.commandObj.command,data:e.data.commandObj.command,duration:e.data.duration,success:!e.data.err,resultCode:e.data.err?"1":"0",time:e.data.time,dependencyTypeName:"redis"})}))},e.enable=function(r,i){r?(0===n.length&&t.channel.subscribe("redis",e.subscriber),n.push(i)):0===(n=n.filter((function(e){return e!=i}))).length&&t.channel.unsubscribe("redis",e.subscriber)}})),Hr=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.enable=e.subscriber=void 0;var t=N(),n=[];e.subscriber=function(e){n.forEach((function(t){var n=e.data.query,r=n.preparable&&n.preparable.text||n.plan||n.text||"unknown query",i=!e.data.error,o=e.data.database.host+":"+e.data.database.port;t.trackDependency({target:o,data:r,name:r,duration:e.data.duration,success:i,resultCode:i?"0":"1",time:e.data.time,dependencyTypeName:"postgres"})}))},e.enable=function(r,i){r?(0===n.length&&t.channel.subscribe("postgres",e.subscriber),n.push(i)):0===(n=n.filter((function(e){return e!=i}))).length&&t.channel.unsubscribe("postgres",e.subscriber)}})),Vr=S(((e,t)=>{"use strict";var r=e&&e.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)r[i]=o[s];return r},i=n(8611),o=n(5692),s=P(),a=ln(),c=cn(),l=Fr(),u=xr(),d=un(),p=dn(),h=an(),f=function(){function e(t){if(e.INSTANCE)throw new Error("Client request tracking should be configured from the applicationInsights object");e.INSTANCE=this,this._client=t}return e.prototype.enable=function(e){this._isEnabled=e,this._isEnabled&&!this._isInitialized&&this._initialize(),h.IsInitialized&&(Br().enable(!0,this._client),Ur().enable(e,this._client),zr().enable(e,this._client),Gr().enable(e,this._client),Hr().enable(e,this._client))},e.prototype.isInitialized=function(){return this._isInitialized},e.prototype._initialize=function(){var t=this;this._isInitialized=!0;var n=i.request,s=o.request,a=function(n,r){var i=!r[e.disableCollectionRequestOption]&&!n[e.alreadyAutoCollectedFlag];r.headers&&r.headers["user-agent"]&&-1!==r.headers["user-agent"].toString().indexOf("azsdk-js")&&(i=!1),n[e.alreadyAutoCollectedFlag]=!0,n&&r&&i&&(u.CorrelationContextManager.wrapEmitter(n),e.trackRequest(t._client,{options:r,request:n}))};i.request=function(e){for(var t=[],o=1;o<arguments.length;o++)t[o-1]=arguments[o];var s=n.call.apply(n,r([i,e],t));return a(s,e),s},o.request=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var i=s.call.apply(s,r([o,e],t));return a(i,e),i},i.get=function(e){for(var t,n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];var s=(t=i.request).call.apply(t,r([i,e],n));return s.end(),s},o.get=function(e){for(var t,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var s=(t=o.request).call.apply(t,r([o,e],n));return s.end(),s}},e.trackRequest=function(t,n){if(n.options&&n.request&&t){var r,i,o=new l(n.options,n.request),h=u.CorrelationContextManager.getCurrentContext();if(h&&h.operation&&h.operation.traceparent&&p.isValidTraceId(h.operation.traceparent.traceId)?(h.operation.traceparent.updateSpanId(),r=h.operation.traceparent.getBackCompatRequestId()):d.w3cEnabled?(i=(m=new p).toString(),r=m.getBackCompatRequestId()):r=h&&h.operation&&h.operation.parentId+e.requestNumber+++".",a.canIncludeCorrelationHeader(t,o.getUrl())&&n.request.getHeader&&n.request.setHeader&&t.config&&t.config.correlationId){var f=n.request.getHeader(c.requestContextHeader);try{a.safeIncludeCorrelationHeader(t,n.request,f)}catch(e){s.warn("Request-Context header could not be set. Correlation of requests may be lost",e)}if(h&&h.operation)try{if(n.request.setHeader(c.requestIdHeader,r),t.config.ignoreLegacyHeaders||(n.request.setHeader(c.parentIdHeader,h.operation.id),n.request.setHeader(c.rootIdHeader,r)),i||h.operation.traceparent)n.request.setHeader(c.traceparentHeader,i||h.operation.traceparent.toString());else if(d.w3cEnabled){var m=(new p).toString();n.request.setHeader(c.traceparentHeader,m)}if(h.operation.tracestate){var g=h.operation.tracestate.toString();g&&n.request.setHeader(c.traceStateHeader,g)}var y=h.customProperties.serializeToHeader();y&&n.request.setHeader(c.correlationContextHeader,y)}catch(e){s.warn("Correlation headers could not be set. Correlation of requests may be lost.",e)}}n.request.on&&(n.request.on("response",(function(e){o.onResponse(e);var i=o.getDependencyTelemetry(n,r);i.contextObjects=i.contextObjects||{},i.contextObjects["http.RequestOptions"]=n.options,i.contextObjects["http.ClientRequest"]=n.request,i.contextObjects["http.ClientResponse"]=e,t.trackDependency(i)})),n.request.on("error",(function(e){o.onError(e);var i=o.getDependencyTelemetry(n,r);i.contextObjects=i.contextObjects||{},i.contextObjects["http.RequestOptions"]=n.options,i.contextObjects["http.ClientRequest"]=n.request,i.contextObjects.Error=e,t.trackDependency(i)})),n.request.on("abort",(function(){o.onError(new Error);var e=o.getDependencyTelemetry(n,r);e.contextObjects=e.contextObjects||{},e.contextObjects["http.RequestOptions"]=n.options,e.contextObjects["http.ClientRequest"]=n.request,t.trackDependency(e)})))}else s.info("AutoCollectHttpDependencies.trackRequest was called with invalid parameters: ",!n.options,!n.request,!t)},e.prototype.dispose=function(){e.INSTANCE=null,this.enable(!1),this._isInitialized=!1},e.disableCollectionRequestOption="disableAppInsightsAutoCollection",e.requestNumber=1,e.alreadyAutoCollectedFlag="_appInsightsAutoCollected",e}();t.exports=f})),$r=S(((e,t)=>{"use strict";var r=n(857),i=Ar(),o=ln(),s=Mr(),a=Vr(),c=function(){function e(t){this._collectionInterval=9e5,this._vmData={},this._azInst_vmId="",this._azInst_subscriptionId="",this._azInst_osType="",e.INSTANCE||(e.INSTANCE=this),this._isInitialized=!1,this._client=t}return e.prototype.enable=function(e,t){var n=this;this._isEnabled=e,this._isEnabled&&!this._isInitialized&&(this._isInitialized=!0),e?this._handle||(this._handle=setInterval((function(){return n.trackHeartBeat(t,(function(){}))}),this._collectionInterval),this._handle.unref()):this._handle&&(clearInterval(this._handle),this._handle=null)},e.prototype.isInitialized=function(){return this._isInitialized},e.isEnabled=function(){return e.INSTANCE&&e.INSTANCE._isEnabled},e.prototype.trackHeartBeat=function(e,t){var n=this,o=!1,a={},c=s.sdkVersion;a.sdk=c,a.osType=r.type(),process.env.WEBSITE_SITE_NAME?(a.appSrv_SiteName=process.env.WEBSITE_SITE_NAME||"",a.appSrv_wsStamp=process.env.WEBSITE_HOME_STAMPNAME||"",a.appSrv_wsHost=process.env.WEBSITE_HOSTNAME||""):process.env.FUNCTIONS_WORKER_RUNTIME?a.azfunction_appId=process.env.WEBSITE_HOSTNAME:e&&(void 0===this._isVM?(o=!0,this._getAzureComputeMetadata(e,(function(){n._isVM&&Object.keys(n._vmData).length>0&&(a.azInst_vmId=n._vmData.vmId||"",a.azInst_subscriptionId=n._vmData.subscriptionId||"",a.azInst_osType=n._vmData.osType||"",n._azInst_vmId=n._vmData.vmId||"",n._azInst_subscriptionId=n._vmData.subscriptionId||"",n._azInst_osType=n._vmData.osType||""),n._client.trackMetric({name:i.HeartBeatMetricName,value:0,properties:a}),t()}))):this._isVM&&(a.azInst_vmId=this._azInst_vmId,a.azInst_subscriptionId=this._azInst_subscriptionId,a.azInst_osType=this._azInst_osType)),o||(this._client.trackMetric({name:i.HeartBeatMetricName,value:0,properties:a}),t())},e.prototype.dispose=function(){e.INSTANCE=null,this.enable(!1),this._isInitialized=!1},e.prototype._getAzureComputeMetadata=function(e,t){var n,r=this,i=((n={method:"GET"})[a.disableCollectionRequestOption]=!0,n.headers={Metadata:"True"},n),s=o.makeRequest(e,"http://169.254.169.254/metadata/instance/compute?api-version=2017-12-01&format=json",i,(function(e){if(200===e.statusCode){r._isVM=!0;var n="";e.on("data",(function(e){n+=e})),e.on("end",(function(){r._vmData=r._isJSON(n)?JSON.parse(n):{},t()}))}else t()}));s&&(s.on("error",(function(e){e&&e.message&&e.message.indexOf("ENETUNREACH")>-1&&(r._isVM=!1),t()})),s.end())},e.prototype._isJSON=function(e){try{return JSON.parse(e)&&!!e}catch{return!1}},e}();t.exports=c})),Wr=S(((e,t)=>{"use strict";var r=n(8611),i=n(5692),o=P(),s=ln(),a=cn(),c=ir(),l=xr(),u=kr(),d=function(){function e(t){if(e.INSTANCE)throw new Error("Server request tracking should be configured from the applicationInsights object");e.INSTANCE=this,this._client=t}return e.prototype.enable=function(e){this._isEnabled=e,(this._isAutoCorrelating||this._isEnabled||u.isEnabled())&&!this._isInitialized&&(this.useAutoCorrelation(this._isAutoCorrelating),this._initialize())},e.prototype.useAutoCorrelation=function(e,t){e&&!this._isAutoCorrelating?l.CorrelationContextManager.enable(t):!e&&this._isAutoCorrelating&&l.CorrelationContextManager.disable(),this._isAutoCorrelating=e},e.prototype.isInitialized=function(){return this._isInitialized},e.prototype.isAutoCorrelating=function(){return this._isAutoCorrelating},e.prototype._generateCorrelationContext=function(e){if(this._isAutoCorrelating)return l.CorrelationContextManager.generateContextObject(e.getOperationId(this._client.context.tags),e.getRequestId(),e.getOperationName(this._client.context.tags),e.getCorrelationContextHeader(),e.getTraceparent(),e.getTracestate())},e.prototype._initialize=function(){var t=this;this._isInitialized=!0;var n=function(n){if(n){if("function"!=typeof n)throw new Error("onRequest handler must be a function");return function(r,i){l.CorrelationContextManager.wrapEmitter(r),l.CorrelationContextManager.wrapEmitter(i);var o=r&&!r[e.alreadyAutoCollectedFlag];if(r&&o){var s=new c(r),a=t._generateCorrelationContext(s);l.CorrelationContextManager.runWithContext(a,(function(){t._isEnabled&&(r[e.alreadyAutoCollectedFlag]=!0,e.trackRequest(t._client,{request:r,response:i},s)),"function"==typeof n&&n(r,i)}))}else"function"==typeof n&&n(r,i)}}},o=function(e){var t=e.addListener.bind(e);e.addListener=function(e,r){switch(e){case"request":case"checkContinue":return t(e,n(r));default:return t(e,r)}},e.on=e.addListener},s=r.createServer;r.createServer=function(e,t){if(t&&"function"==typeof t){var r=s(e,n(t));return o(r),r}return r=s(n(e)),o(r),r};var a=i.createServer;i.createServer=function(e,t){var r=a(e,n(t));return o(r),r}},e.trackRequestSync=function(t,n){if(n.request&&n.response&&t){e.addResponseCorrelationIdHeader(t,n.response);var r=l.CorrelationContextManager.getCurrentContext(),i=new c(n.request,r&&r.operation.parentId);r&&(r.operation.id=i.getOperationId(t.context.tags)||r.operation.id,r.operation.name=i.getOperationName(t.context.tags)||r.operation.name,r.operation.parentId=i.getRequestId()||r.operation.parentId,r.customProperties.addHeaderData(i.getCorrelationContextHeader())),e.endRequest(t,i,n,n.duration,n.error)}else o.info("AutoCollectHttpRequests.trackRequestSync was called with invalid parameters: ",!n.request,!n.response,!t)},e.trackRequest=function(t,n,r){if(n.request&&n.response&&t){var i=l.CorrelationContextManager.getCurrentContext(),a=r||new c(n.request,i&&i.operation.parentId);s.canIncludeCorrelationHeader(t,a.getUrl())&&e.addResponseCorrelationIdHeader(t,n.response),i&&!r&&(i.operation.id=a.getOperationId(t.context.tags)||i.operation.id,i.operation.name=a.getOperationName(t.context.tags)||i.operation.name,i.operation.parentId=a.getOperationParentId(t.context.tags)||i.operation.parentId,i.customProperties.addHeaderData(a.getCorrelationContextHeader())),n.response.once&&n.response.once("finish",(function(){e.endRequest(t,a,n,null,null)})),n.request.on&&n.request.on("error",(function(r){e.endRequest(t,a,n,null,r)})),n.request.on&&n.request.on("aborted",(function(){e.endRequest(t,a,n,null,"The request has been aborted and the network socket has closed.")}))}else o.info("AutoCollectHttpRequests.trackRequest was called with invalid parameters: ",!n.request,!n.response,!t)},e.addResponseCorrelationIdHeader=function(e,t){if(e.config&&e.config.correlationId&&t.getHeader&&t.setHeader&&!t.headersSent){var n=t.getHeader(a.requestContextHeader);s.safeIncludeCorrelationHeader(e,t,n)}},e.endRequest=function(e,t,n,r,i){i?t.onError(i,r):t.onResponse(n.response,r);var o=t.getRequestTelemetry(n);if(o.tagOverrides=t.getRequestTags(e.context.tags),n.tagOverrides)for(var s in n.tagOverrides)o.tagOverrides[s]=n.tagOverrides[s];var a=t.getLegacyRootId();a&&(o.properties.ai_legacyRootId=a),o.contextObjects=o.contextObjects||{},o.contextObjects["http.ServerRequest"]=n.request,o.contextObjects["http.ServerResponse"]=n.response,e.trackRequest(o)},e.prototype.dispose=function(){e.INSTANCE=null,this.enable(!1),this._isInitialized=!1,l.CorrelationContextManager.disable(),this._isAutoCorrelating=!1},e.alreadyAutoCollectedFlag="_appInsightsAutoCollected",e}();t.exports=d})),Kr=S(((e,t)=>{"use strict";var r=e&&e.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)},i=n(857),o=nr(),s=Ar(),a=ln(),c=P(),l=a.w3cTraceId(),u=function(){function e(){}return e.createQuickPulseEnvelope=function(e,t,n,r){var o=i&&"function"==typeof i.hostname&&i.hostname()||"Unknown",s=r.tags&&r.keys&&r.keys.cloudRoleInstance&&r.tags[r.keys.cloudRoleInstance]||o,a=r.tags&&r.keys&&r.keys.cloudRole&&r.tags[r.keys.cloudRole]||null;return{Documents:t.length>0?t:null,InstrumentationKey:n.instrumentationKey||"",Metrics:e.length>0?e:null,InvariantVersion:1,Timestamp:"/Date("+Date.now()+")/",Version:r.tags[r.keys.internalSdkVersion],StreamId:l,MachineName:o,Instance:s,RoleName:a}},e.createQuickPulseMetric=function(e){return{Name:e.name,Value:e.value,Weight:e.count||1}},e.telemetryEnvelopeToQuickPulseDocument=function(t){switch(t.data.baseType){case o.TelemetryTypeString.Event:return e.createQuickPulseEventDocument(t);case o.TelemetryTypeString.Exception:return e.createQuickPulseExceptionDocument(t);case o.TelemetryTypeString.Trace:return e.createQuickPulseTraceDocument(t);case o.TelemetryTypeString.Dependency:return e.createQuickPulseDependencyDocument(t);case o.TelemetryTypeString.Request:return e.createQuickPulseRequestDocument(t)}return null},e.createQuickPulseEventDocument=function(t){var n=e.createQuickPulseDocument(t),i=t.data.baseData.name;return r(r({},n),{Name:i})},e.createQuickPulseTraceDocument=function(t){var n=e.createQuickPulseDocument(t),i=t.data.baseData.severityLevel||0;return r(r({},n),{Message:t.data.baseData.message,SeverityLevel:o.SeverityLevel[i]})},e.createQuickPulseExceptionDocument=function(t){var n=e.createQuickPulseDocument(t),i=t.data.baseData.exceptions,o="",s="",a="";return i&&i.length>0&&(i[0].parsedStack&&i[0].parsedStack.length>0?i[0].parsedStack.forEach((function(e){o+=e.assembly+"\n"})):i[0].stack&&i[0].stack.length>0&&(o=i[0].stack),s=i[0].message,a=i[0].typeName),r(r({},n),{Exception:o,ExceptionMessage:s,ExceptionType:a})},e.createQuickPulseRequestDocument=function(t){var n=e.createQuickPulseDocument(t),i=t.data.baseData;return r(r({},n),{Name:i.name,Success:i.success,Duration:i.duration,ResponseCode:i.responseCode,OperationName:i.name})},e.createQuickPulseDependencyDocument=function(t){var n=e.createQuickPulseDocument(t),i=t.data.baseData;return r(r({},n),{Name:i.name,Target:i.target,Success:i.success,Duration:i.duration,ResultCode:i.resultCode,CommandName:i.data,OperationName:n.OperationId,DependencyTypeName:i.type})},e.createQuickPulseDocument=function(t){var n,r;return t.data.baseType?(r=s.TelemetryTypeStringToQuickPulseType[t.data.baseType],n=s.TelemetryTypeStringToQuickPulseDocumentType[t.data.baseType]):c.warn("Document type invalid; not sending live metric document",t.data.baseType),{DocumentType:n,__type:r,OperationId:t.tags[e.keys.operationId],Version:"1.0",Properties:e.aggregateProperties(t)}},e.aggregateProperties=function(e){var t=[],n=e.data.baseData.measurements||{};for(var r in n)if(n.hasOwnProperty(r)){var i={key:r,value:n[r]};t.push(i)}var o=e.data.baseData.properties||{};for(var r in o)o.hasOwnProperty(r)&&(i={key:r,value:o[r]},t.push(i));return t},e.keys=new o.ContextTagKeys,e}();t.exports=u})),Qr=S(((e,t)=>{"use strict";t.exports={getTransmissionTime:function(){return 1e4*(Date.now()+621355968e5)}}})),Xr=S(((e,t)=>{"use strict";var r=e&&e.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){e.done?i(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(s,a)}c((r=r.apply(e,t||[])).next())}))},i=e&&e.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},o=n(5692),s=Vr(),a=P(),c=Qr(),l=ln(),u="x-ms-qps-service-polling-interval-hint",d="x-ms-qps-service-endpoint-redirect",p=function(){function e(e){this._config=e,this._consecutiveErrors=0}return e.prototype.ping=function(e,t,n){var r=[{name:"x-ms-qps-stream-id",value:e.StreamId},{name:"x-ms-qps-machine-name",value:e.MachineName},{name:"x-ms-qps-role-name",value:e.RoleName},{name:"x-ms-qps-instance-name",value:e.Instance},{name:"x-ms-qps-invariant-version",value:e.InvariantVersion.toString()}];this._submitData(e,t,n,"ping",r)},e.prototype.post=function(e,t,n){return r(this,void 0,void 0,(function(){return i(this,(function(r){switch(r.label){case 0:return[4,this._submitData([e],t,n,"post")];case 1:return r.sent(),[2]}}))}))},e.prototype._submitData=function(e,t,n,a,p){return r(this,void 0,void 0,(function(){var r,h,f,m,g,y=this;return i(this,(function(i){return r=JSON.stringify(e),(m={})[s.disableCollectionRequestOption]=!0,m.host=t&&t.length>0?t:this._config.quickPulseHost,m.method="POST",m.path="/QuickPulseService.svc/"+a+"?ikey="+this._config.instrumentationKey,m.headers=((g={Expect:"100-continue"})["x-ms-qps-transmission-time"]=c.getTransmissionTime(),g["Content-Type"]="application/json",g["Content-Length"]=Buffer.byteLength(r),g),h=m,p&&p.length>0&&p.forEach((function(e){return h.headers[e.name]=e.value})),this._config.httpsAgent?h.agent=this._config.httpsAgent:h.agent=l.tlsRestrictedAgent,(f=o.request(h,(function(e){if(200==e.statusCode){var t="true"===e.headers["x-ms-qps-subscribed"],r=e.headers[d]?e.headers[d].toString():null,i=e.headers[u]?parseInt(e.headers[u].toString()):null;y._consecutiveErrors=0,n(t,e,r,i)}else y._onError("StatusCode:"+e.statusCode+" StatusMessage:"+e.statusMessage),n()}))).on("error",(function(e){y._onError(e),n()})),f.write(r),f.end(),[2]}))}))},e.prototype._onError=function(t){this._consecutiveErrors++;var n="Transient error connecting to the Live Metrics endpoint. This packet will not appear in your Live Metrics Stream. Error:";this._consecutiveErrors%e.MAX_QPS_FAILURES_BEFORE_WARN==0?(n="Live Metrics endpoint could not be reached "+this._consecutiveErrors+" consecutive times. Most recent error:",a.warn(e.TAG,n,t)):a.info(e.TAG,n,t)},e.TAG="QuickPulseSender",e.MAX_QPS_FAILURES_BEFORE_WARN=25,e}();t.exports=p})),Yr=S(((e,t)=>{"use strict";var n=e&&e.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){e.done?i(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(s,a)}c((r=r.apply(e,t||[])).next())}))},r=e&&e.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},i=P(),o=Kr(),s=Xr(),a=Ar(),c=Mr(),l=function(){function e(e,t){this._isCollectingData=!1,this._lastSuccessTime=Date.now(),this._lastSendSucceeded=!0,this._metrics={},this._documents=[],this._collectors=[],this._redirectedHost=null,this._pollingIntervalHint=-1,this.config=e,this.context=t||new c,this._sender=new s(this.config),this._isEnabled=!1}return e.prototype.addCollector=function(e){this._collectors.push(e)},e.prototype.trackMetric=function(e){this._addMetric(e)},e.prototype.addDocument=function(e){var t=o.telemetryEnvelopeToQuickPulseDocument(e);t&&this._documents.push(t)},e.prototype.enable=function(e){e&&!this._isEnabled?(this._isEnabled=!0,this._goQuickPulse()):!e&&this._isEnabled&&(this._isEnabled=!1,clearTimeout(this._handle),this._handle=void 0)},e.prototype.enableCollectors=function(e){this._collectors.forEach((function(t){t.enable(e)}))},e.prototype._addMetric=function(e){var t=e.value,n=e.count||1,r=a.PerformanceToQuickPulseCounter[e.name];r&&(this._metrics[r]?(this._metrics[r].Value=(this._metrics[r].Value*this._metrics[r].Weight+t*n)/(this._metrics[r].Weight+n),this._metrics[r].Weight+=n):(this._metrics[r]=o.createQuickPulseMetric(e),this._metrics[r].Name=r,this._metrics[r].Weight=1))},e.prototype._resetQuickPulseBuffer=function(){delete this._metrics,this._metrics={},this._documents.length=0},e.prototype._goQuickPulse=function(){return n(this,void 0,void 0,(function(){var t,n,i,s,a=this;return r(this,(function(r){switch(r.label){case 0:return t=Object.keys(this._metrics).map((function(e){return a._metrics[e]})),n=o.createQuickPulseEnvelope(t,this._documents.slice(),this.config,this.context),this._resetQuickPulseBuffer(),this._isCollectingData?[4,this._post(n)]:[3,2];case 1:return r.sent(),[3,3];case 2:this._ping(n),r.label=3;case 3:return i=this._pollingIntervalHint>0?this._pollingIntervalHint:e.PING_INTERVAL,s=this._isCollectingData?e.POST_INTERVAL:i,this._isCollectingData&&Date.now()-this._lastSuccessTime>=e.MAX_POST_WAIT_TIME&&!this._lastSendSucceeded?(this._isCollectingData=!1,s=e.FALLBACK_INTERVAL):!this._isCollectingData&&Date.now()-this._lastSuccessTime>=e.MAX_PING_WAIT_TIME&&!this._lastSendSucceeded&&(s=e.FALLBACK_INTERVAL),this._lastSendSucceeded=null,this._handle=setTimeout(this._goQuickPulse.bind(this),s),this._handle.unref(),[2]}}))}))},e.prototype._ping=function(e){this._sender.ping(e,this._redirectedHost,this._quickPulseDone.bind(this))},e.prototype._post=function(e){return n(this,void 0,void 0,(function(){return r(this,(function(t){switch(t.label){case 0:return[4,this._sender.post(e,this._redirectedHost,this._quickPulseDone.bind(this))];case 1:return t.sent(),[2]}}))}))},e.prototype._quickPulseDone=function(e,t,n,r){null!=e?(this._isCollectingData!==e&&(i.info("Live Metrics sending data",e),this.enableCollectors(e)),this._isCollectingData=e,n&&n.length>0&&(this._redirectedHost=n,i.info("Redirecting endpoint to: ",n)),r&&r>0&&(this._pollingIntervalHint=r),t&&t.statusCode<300&&t.statusCode>=200?(this._lastSuccessTime=Date.now(),this._lastSendSucceeded=!0):this._lastSendSucceeded=!1):this._lastSendSucceeded=!1},e.MAX_POST_WAIT_TIME=2e4,e.MAX_PING_WAIT_TIME=6e4,e.FALLBACK_INTERVAL=6e4,e.PING_INTERVAL=5e3,e.POST_INTERVAL=1e3,e}();t.exports=l})),Jr=S(((e,t)=>{"use strict";var n=Ar(),r=function(){function e(){}return e.parse=function(t){if(!t)return{};var r=t.split(e._FIELDS_SEPARATOR).reduce((function(t,n){var r=n.split(e._FIELD_KEY_VALUE_SEPARATOR);if(2===r.length){var i=r[0].toLowerCase(),o=r[1];t[i]=o}return t}),{});if(Object.keys(r).length>0){if(r.endpointsuffix){var i=r.location?r.location+".":"";r.ingestionendpoint=r.ingestionendpoint||"https://"+i+"dc."+r.endpointsuffix,r.liveendpoint=r.liveendpoint||"https://"+i+"live."+r.endpointsuffix}r.ingestionendpoint=r.ingestionendpoint||n.DEFAULT_BREEZE_ENDPOINT,r.liveendpoint=r.liveendpoint||n.DEFAULT_LIVEMETRICS_ENDPOINT}return r},e._FIELDS_SEPARATOR=";",e._FIELD_KEY_VALUE_SEPARATOR="=",e}();t.exports=r})),Zr=S(((e,t)=>{"use strict";var r=un(),i=Jr(),o=(P(),Ar()),s=n(7016),a=function(){function e(t){var n=this;this.endpointBase=o.DEFAULT_BREEZE_ENDPOINT;var r=process.env[e.ENV_connectionString],a=i.parse(t),c=i.parse(r),l=!a.instrumentationkey&&Object.keys(a).length>0?null:t;this.instrumentationKey=a.instrumentationkey||l||c.instrumentationkey||e._getInstrumentationKey(),e._validateInstrumentationKey(this.instrumentationKey),this.endpointUrl=(a.ingestionendpoint||c.ingestionendpoint||this.endpointBase)+"/v2.1/track",this.maxBatchSize=250,this.maxBatchIntervalMs=15e3,this.disableAppInsights=!1,this.samplingPercentage=100,this.correlationIdRetryIntervalMs=3e4,this.correlationHeaderExcludedDomains=["*.core.windows.net","*.core.chinacloudapi.cn","*.core.cloudapi.de","*.core.usgovcloudapi.net","*.core.microsoft.scloud","*.core.eaglex.ic.gov"],this.setCorrelationId=function(e){return n.correlationId=e},this.proxyHttpUrl=process.env[e.ENV_http_proxy]||void 0,this.proxyHttpsUrl=process.env[e.ENV_https_proxy]||void 0,this.httpAgent=void 0,this.httpsAgent=void 0,this.profileQueryEndpoint=a.ingestionendpoint||c.ingestionendpoint||process.env[e.ENV_profileQueryEndpoint]||this.endpointBase,this._quickPulseHost=a.liveendpoint||c.liveendpoint||process.env[e.ENV_quickPulseHost]||o.DEFAULT_LIVEMETRICS_HOST,this._quickPulseHost.match(/^https?:\/\//)&&(this._quickPulseHost=s.parse(this._quickPulseHost).host)}return Object.defineProperty(e.prototype,"profileQueryEndpoint",{get:function(){return this._profileQueryEndpoint},set:function(e){r.cancelCorrelationIdQuery(this,this.setCorrelationId),this._profileQueryEndpoint=e,this.correlationId=r.correlationIdPrefix,r.queryCorrelationId(this,this.setCorrelationId)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"quickPulseHost",{get:function(){return this._quickPulseHost},set:function(e){this._quickPulseHost=e},enumerable:!1,configurable:!0}),e._getInstrumentationKey=function(){var t=process.env[e.ENV_iKey]||process.env[e.ENV_azurePrefix+e.ENV_iKey]||process.env[e.legacy_ENV_iKey]||process.env[e.ENV_azurePrefix+e.legacy_ENV_iKey];if(!t||""==t)throw new Error("Instrumentation key not found, pass the key in the config to this method or set the key in the environment variable APPINSIGHTS_INSTRUMENTATIONKEY before starting the server");return t},e._validateInstrumentationKey=function(e){return new RegExp("^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$").test(e)},e.ENV_azurePrefix="APPSETTING_",e.ENV_iKey="APPINSIGHTS_INSTRUMENTATIONKEY",e.legacy_ENV_iKey="APPINSIGHTS_INSTRUMENTATION_KEY",e.ENV_profileQueryEndpoint="APPINSIGHTS_PROFILE_QUERY_ENDPOINT",e.ENV_quickPulseHost="APPINSIGHTS_QUICKPULSE_HOST",e.ENV_connectionString="APPLICATIONINSIGHTS_CONNECTION_STRING",e.ENV_nativeMetricsDisablers="APPLICATION_INSIGHTS_DISABLE_EXTENDED_METRIC",e.ENV_nativeMetricsDisableAll="APPLICATION_INSIGHTS_DISABLE_ALL_EXTENDED_METRICS",e.ENV_http_proxy="http_proxy",e.ENV_https_proxy="https_proxy",e}();t.exports=a})),ei=S((e=>{"use strict";var t=e&&e.__assign||function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.AutoCollectNativePerformance=void 0;var r=Zr(),i=Mr(),o=P(),s=function(){function e(t){this._disabledMetrics={},e.INSTANCE&&e.INSTANCE.dispose(),e.INSTANCE=this,this._client=t}return e.isNodeVersionCompatible=function(){var e=process.versions.node.split(".");return parseInt(e[0])>=6},e.prototype.enable=function(t,r,i){var s=this;if(void 0===r&&(r={}),void 0===i&&(i=6e4),e.isNodeVersionCompatible()){if(null==e._metricsAvailable&&t&&!this._isInitialized)try{var a=n(4597);e._emitter=new a,e._metricsAvailable=!0,o.info("Native metrics module successfully loaded!")}catch{return void(e._metricsAvailable=!1)}this._isEnabled=t,this._disabledMetrics=r,this._isEnabled&&!this._isInitialized&&(this._isInitialized=!0),this._isEnabled&&e._emitter?(e._emitter.enable(!0,i),this._handle||(this._handle=setInterval((function(){return s._trackNativeMetrics()}),i),this._handle.unref())):e._emitter&&(e._emitter.enable(!1),this._handle&&(clearInterval(this._handle),this._handle=void 0))}},e.prototype.dispose=function(){this.enable(!1)},e.parseEnabled=function(e){var n=process.env[r.ENV_nativeMetricsDisableAll],i=process.env[r.ENV_nativeMetricsDisablers];if(n)return{isEnabled:!1,disabledMetrics:{}};if(i){var o=i.split(","),s={};if(o.length>0)for(var a=0,c=o;a<c.length;a++)s[c[a]]=!0;return"object"==typeof e?{isEnabled:!0,disabledMetrics:t(t({},e),s)}:{isEnabled:e,disabledMetrics:s}}return"boolean"==typeof e?{isEnabled:e,disabledMetrics:{}}:{isEnabled:!0,disabledMetrics:e}},e.prototype._trackNativeMetrics=function(){var e=!0;"object"!=typeof this._isEnabled&&(e=this._isEnabled),e&&(this._trackGarbageCollection(),this._trackEventLoop(),this._trackHeapUsage())},e.prototype._trackGarbageCollection=function(){var t;if(!this._disabledMetrics.gc){var n=e._emitter.getGCData();for(var r in n){var o=n[r].metrics,s=r+" Garbage Collection Duration",a=Math.sqrt(o.sumSquares/o.count-Math.pow(o.total/o.count,2))||0;this._client.trackMetric({name:s,value:o.total,count:o.count,max:o.max,min:o.min,stdDev:a,tagOverrides:(t={},t[this._client.context.keys.internalSdkVersion]="node-nativeperf:"+i.sdkVersion,t)})}}},e.prototype._trackEventLoop=function(){var t;if(!this._disabledMetrics.loop){var n=e._emitter.getLoopData().loopUsage;if(0!=n.count){var r=Math.sqrt(n.sumSquares/n.count-Math.pow(n.total/n.count,2))||0;this._client.trackMetric({name:"Event Loop CPU Time",value:n.total,count:n.count,min:n.min,max:n.max,stdDev:r,tagOverrides:(t={},t[this._client.context.keys.internalSdkVersion]="node-nativeperf:"+i.sdkVersion,t)})}}},e.prototype._trackHeapUsage=function(){var e,t,n;if(!this._disabledMetrics.heap){var r=process.memoryUsage(),o=r.heapUsed,s=r.heapTotal,a=r.rss;this._client.trackMetric({name:"Memory Usage (Heap)",value:o,count:1,tagOverrides:(e={},e[this._client.context.keys.internalSdkVersion]="node-nativeperf:"+i.sdkVersion,e)}),this._client.trackMetric({name:"Memory Total (Heap)",value:s,count:1,tagOverrides:(t={},t[this._client.context.keys.internalSdkVersion]="node-nativeperf:"+i.sdkVersion,t)}),this._client.trackMetric({name:"Memory Usage (Non-Heap)",value:a-s,count:1,tagOverrides:(n={},n[this._client.context.keys.internalSdkVersion]="node-nativeperf:"+i.sdkVersion,n)})}},e}();e.AutoCollectNativePerformance=s})),ti=S(((e,t)=>{"use strict";var n=P(),r=function(){function e(e,t,n,r){this._buffer=[],this._lastSend=0,this._isDisabled=e,this._getBatchSize=t,this._getBatchIntervalMs=n,this._sender=r}return e.prototype.setUseDiskRetryCaching=function(e,t,n){this._sender.setDiskRetryMode(e,t,n)},e.prototype.send=function(e){var t=this;if(!this._isDisabled()){if(!e)return void n.warn("Cannot send null/undefined telemetry");if(this._buffer.push(e),this._buffer.length>=this._getBatchSize())return void this.triggerSend(!1);!this._timeoutHandle&&this._buffer.length>0&&(this._timeoutHandle=setTimeout((function(){t._timeoutHandle=null,t.triggerSend(!1)}),this._getBatchIntervalMs()))}},e.prototype.triggerSend=function(e,t){var n=this._buffer.length<1;n||(e?(this._sender.saveOnCrash(this._buffer),"function"==typeof t&&t("data saved on crash")):this._sender.send(this._buffer,t)),this._lastSend=+new Date,this._buffer=[],clearTimeout(this._timeoutHandle),this._timeoutHandle=null,n&&"function"==typeof t&&t("no data to send")},e}();t.exports=r})),ni=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.azureRoleEnvironmentTelemetryProcessor=void 0,e.azureRoleEnvironmentTelemetryProcessor=function(e,t){process.env.WEBSITE_SITE_NAME&&(e.tags[t.keys.cloudRole]=process.env.WEBSITE_SITE_NAME)}})),ri=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSamplingHashCode=e.samplingTelemetryProcessor=void 0;var t=nr();function n(e){var t=2147483647,n=5381;if(!e)return 0;for(;e.length<8;)e+=e;for(var r=0;r<e.length;r++)n=((n<<5)+n|0)+e.charCodeAt(r)|0;return(n=n<=-2147483648?t:Math.abs(n))/t*100}e.samplingTelemetryProcessor=function(e,r){var i=e.sampleRate;return!!(null==i||i>=100||e.data&&t.TelemetryType.Metric===t.baseTypeToTelemetryType(e.data.baseType))||(r.correlationContext&&r.correlationContext.operation?n(r.correlationContext.operation.id)<i:100*Math.random()<i)},e.getSamplingHashCode=n})),ii=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.performanceMetricsTelemetryProcessor=void 0;var t=kr(),n=nr();e.performanceMetricsTelemetryProcessor=function(e,r){switch(r&&r.addDocument(e),e.data.baseType){case n.TelemetryTypeString.Exception:t.countException();break;case n.TelemetryTypeString.Request:var i=e.data.baseData;t.countRequest(i.duration,i.success);break;case n.TelemetryTypeString.Dependency:var o=e.data.baseData;t.countDependency(o.duration,o.success)}return!0}})),oi=S((e=>{"use strict";var t=e&&e.__assign||function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)};Object.defineProperty(e,"__esModule",{value:!0}),e.preAggregatedMetricsTelemetryProcessor=void 0;var n=nr(),r=jr(),i=nr();e.preAggregatedMetricsTelemetryProcessor=function(e,o){if(r.isEnabled())switch(e.data.baseType){case i.TelemetryTypeString.Exception:var s=e.data.baseData;s.properties=t(t({},s.properties),{"_MS.ProcessedByMetricExtractors":"(Name:'Exceptions', Ver:'1.1')"});var a={cloudRoleInstance:e.tags[o.keys.cloudRoleInstance],cloudRoleName:e.tags[o.keys.cloudRole]};r.countException(a);break;case i.TelemetryTypeString.Trace:var c=e.data.baseData;c.properties=t(t({},c.properties),{"_MS.ProcessedByMetricExtractors":"(Name:'Traces', Ver:'1.1')"});var l={cloudRoleInstance:e.tags[o.keys.cloudRoleInstance],cloudRoleName:e.tags[o.keys.cloudRole],traceSeverityLevel:n.SeverityLevel[c.severity]};r.countTrace(l);break;case i.TelemetryTypeString.Request:var u=e.data.baseData;u.properties=t(t({},u.properties),{"_MS.ProcessedByMetricExtractors":"(Name:'Requests', Ver:'1.1')"});var d={cloudRoleInstance:e.tags[o.keys.cloudRoleInstance],cloudRoleName:e.tags[o.keys.cloudRole],operationSynthetic:e.tags[o.keys.operationSyntheticSource],requestSuccess:u.success,requestResultCode:u.responseCode};r.countRequest(u.duration,d);break;case i.TelemetryTypeString.Dependency:var p=e.data.baseData;p.properties=t(t({},p.properties),{"_MS.ProcessedByMetricExtractors":"(Name:'Dependencies', Ver:'1.1')"});var h={cloudRoleInstance:e.tags[o.keys.cloudRoleInstance],cloudRoleName:e.tags[o.keys.cloudRole],operationSynthetic:e.tags[o.keys.operationSyntheticSource],dependencySuccess:p.success,dependencyType:p.type,dependencyTarget:p.target,dependencyResultCode:p.resultCode};r.countDependency(p.duration,h)}return!0}})),si=S((e=>{"use strict";var t=e&&e.__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]}),n=e&&e.__exportStar||function(e,n){for(var r in e)"default"!==r&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),n(ni(),e),n(ri(),e),n(ii(),e),n(oi(),e)})),ai=S(((e,t)=>{"use strict";var r=e&&e.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){e.done?i(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(s,a)}c((r=r.apply(e,t||[])).next())}))},i=e&&e.__generator||function(e,t){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=(i=s.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},o=n(9896),s=n(857),a=n(6928),c=n(3106),l=n(5317),u=P(),d=Vr(),p=ln(),h=function(){function e(t,n,r){if(this._redirectedHost=null,this._config=t,this._onSuccess=n,this._onError=r,this._enableDiskRetryMode=!1,this._resendInterval=e.WAIT_BETWEEN_RESEND,this._maxBytesOnDisk=e.MAX_BYTES_ON_DISK,this._numConsecutiveFailures=0,this._numConsecutiveRedirects=0,this._resendTimer=null,this._fileCleanupTimer=null,this._tempDir=a.join(s.tmpdir(),e.TEMPDIR_PREFIX+this._config.instrumentationKey),!e.OS_PROVIDES_FILE_PROTECTION)if(e.USE_ICACLS){try{e.OS_PROVIDES_FILE_PROTECTION=o.existsSync(e.ICACLS_PATH)}catch{}e.OS_PROVIDES_FILE_PROTECTION||u.warn(e.TAG,"Could not find ICACLS in expected location! This is necessary to use disk retry mode on Windows.")}else e.OS_PROVIDES_FILE_PROTECTION=!0}return e.prototype.setDiskRetryMode=function(t,n,r){var i=this;this._enableDiskRetryMode=e.OS_PROVIDES_FILE_PROTECTION&&t,"number"==typeof n&&n>=0&&(this._resendInterval=Math.floor(n)),"number"==typeof r&&r>=0&&(this._maxBytesOnDisk=Math.floor(r)),t&&!e.OS_PROVIDES_FILE_PROTECTION&&(this._enableDiskRetryMode=!1,u.warn(e.TAG,"Ignoring request to enable disk retry mode. Sufficient file protection capabilities were not detected.")),this._enableDiskRetryMode?this._fileCleanupTimer||(this._fileCleanupTimer=setTimeout((function(){i._fileCleanupTask()}),e.CLEANUP_TIMEOUT),this._fileCleanupTimer.unref()):this._fileCleanupTimer&&clearTimeout(this._fileCleanupTimer)},e.prototype.send=function(t,n){return r(this,void 0,void 0,(function(){var r,o,s,a,l=this;return i(this,(function(i){return t&&(r=this._redirectedHost||this._config.endpointUrl,o={method:"POST",withCredentials:!1,headers:{"Content-Type":"application/x-json-stream"}},s="",t.forEach((function(e){var t=l._stringify(e);"string"==typeof t&&(s+=t+"\n")})),s.length>0&&(s=s.substring(0,s.length-1)),a=Buffer.from?Buffer.from(s):new Buffer(s),c.gzip(a,(function(i,s){var c=s;i?(u.warn(i),c=a,o.headers["Content-Length"]=a.length.toString()):(o.headers["Content-Encoding"]="gzip",o.headers["Content-Length"]=s.length.toString()),u.info(e.TAG,o),o[d.disableCollectionRequestOption]=!0;var h=p.makeRequest(l._config,r,o,(function(r){r.setEncoding("utf-8");var i="";r.on("data",(function(e){i+=e})),r.on("end",(function(){if(l._numConsecutiveFailures=0,l._enableDiskRetryMode)if(200===r.statusCode)l._resendTimer||(l._resendTimer=setTimeout((function(){l._resendTimer=null,l._sendFirstFileOnDisk()}),l._resendInterval),l._resendTimer.unref());else if(l._isRetriable(r.statusCode))try{var o=JSON.parse(i),s=[];o.errors.forEach((function(e){l._isRetriable(e.statusCode)&&s.push(t[e.index])})),s.length>0&&l._storeToDisk(s)}catch{l._storeToDisk(t)}if(307===r.statusCode||308===r.statusCode)if(l._numConsecutiveRedirects++,l._numConsecutiveRedirects<10){var a=r.headers.location?r.headers.location.toString():null;a&&(l._redirectedHost=a,l.send(t,n))}else"function"==typeof n&&n("Error sending telemetry because of circular redirects.");else l._numConsecutiveRedirects=0,"function"==typeof n&&n(i),u.info(e.TAG,i),"function"==typeof l._onSuccess&&l._onSuccess(i)}))}));h.on("error",(function(r){if(l._numConsecutiveFailures++,!l._enableDiskRetryMode||l._numConsecutiveFailures>0&&l._numConsecutiveFailures%e.MAX_CONNECTION_FAILURES_BEFORE_WARN==0){var i="Ingestion endpoint could not be reached. This batch of telemetry items has been lost. Use Disk Retry Caching to enable resending of failed telemetry. Error:";l._enableDiskRetryMode&&(i="Ingestion endpoint could not be reached "+l._numConsecutiveFailures+" consecutive times. There may be resulting telemetry loss. Most recent error:"),u.warn(e.TAG,i,p.dumpObj(r))}else i="Transient failure to reach ingestion endpoint. This batch of telemetry items will be retried. Error:",u.info(e.TAG,i,p.dumpObj(r));l._onErrorHelper(r),"function"==typeof n&&(r&&n(p.dumpObj(r)),n("Error sending telemetry")),l._enableDiskRetryMode&&l._storeToDisk(t)})),h.write(c),h.end()}))),[2]}))}))},e.prototype.saveOnCrash=function(e){this._enableDiskRetryMode&&this._storeToDiskSync(this._stringify(e))},e.prototype._isRetriable=function(e){return 206===e||408===e||429===e||439===e||500===e||503===e},e.prototype._runICACLS=function(t,n){var r=l.spawn(e.ICACLS_PATH,t,{windowsHide:!0});r.on("error",(function(e){return n(e)})),r.on("close",(function(e,t){return n(0===e?null:new Error("Setting ACL restrictions did not succeed (ICACLS returned code "+e+")"))}))},e.prototype._runICACLSSync=function(t){if(!l.spawnSync)throw new Error("Could not synchronously call ICACLS under current version of Node.js");var n=l.spawnSync(e.ICACLS_PATH,t,{windowsHide:!0});if(n.error)throw n.error;if(0!==n.status)throw new Error("Setting ACL restrictions did not succeed (ICACLS returned code "+n.status+")")},e.prototype._getACLIdentity=function(t){if(e.ACL_IDENTITY)return t(null,e.ACL_IDENTITY);var n=l.spawn(e.POWERSHELL_PATH,["-Command","[System.Security.Principal.WindowsIdentity]::GetCurrent().Name"],{windowsHide:!0,stdio:["ignore","pipe","pipe"]}),r="";n.stdout.on("data",(function(e){return r+=e})),n.on("error",(function(e){return t(e,null)})),n.on("close",(function(n,i){return e.ACL_IDENTITY=r&&r.trim(),t(0===n?null:new Error("Getting ACL identity did not succeed (PS returned code "+n+")"),e.ACL_IDENTITY)}))},e.prototype._getACLIdentitySync=function(){if(e.ACL_IDENTITY)return e.ACL_IDENTITY;if(l.spawnSync){var t=l.spawnSync(e.POWERSHELL_PATH,["-Command","[System.Security.Principal.WindowsIdentity]::GetCurrent().Name"],{windowsHide:!0,stdio:["ignore","pipe","pipe"]});if(t.error)throw t.error;if(0!==t.status)throw new Error("Getting ACL identity did not succeed (PS returned code "+t.status+")");return e.ACL_IDENTITY=t.stdout&&t.stdout.toString().trim(),e.ACL_IDENTITY}throw new Error("Could not synchronously get ACL identity under current version of Node.js")},e.prototype._getACLArguments=function(e,t){return[e,"/grant","*S-1-5-32-544:(OI)(CI)F","/grant",t+":(OI)(CI)F","/inheritance:r"]},e.prototype._applyACLRules=function(t,n){var r=this;return e.USE_ICACLS?void 0!==e.ACLED_DIRECTORIES[t]?n(e.ACLED_DIRECTORIES[t]?null:new Error("Setting ACL restrictions did not succeed (cached result)")):(e.ACLED_DIRECTORIES[t]=!1,void this._getACLIdentity((function(i,o){if(i)return e.ACLED_DIRECTORIES[t]=!1,n(i);r._runICACLS(r._getACLArguments(t,o),(function(r){return e.ACLED_DIRECTORIES[t]=!r,n(r)}))}))):n(null)},e.prototype._applyACLRulesSync=function(t){if(e.USE_ICACLS){if(void 0===e.ACLED_DIRECTORIES[t])return this._runICACLSSync(this._getACLArguments(t,this._getACLIdentitySync())),void(e.ACLED_DIRECTORIES[t]=!0);if(!e.ACLED_DIRECTORIES[t])throw new Error("Setting ACL restrictions did not succeed (cached result)")}},e.prototype._confirmDirExists=function(e,t){var n=this;o.lstat(e,(function(r,i){r&&"ENOENT"===r.code?o.mkdir(e,(function(r){r&&"EEXIST"!==r.code?t(r):n._applyACLRules(e,t)})):!r&&i.isDirectory()?n._applyACLRules(e,t):t(r||new Error("Path existed but was not a directory"))}))},e.prototype._getShallowDirectorySize=function(e,t){o.readdir(e,(function(n,r){if(n)return t(n,-1);var i=null,s=0,c=0;if(0!==r.length)for(var l=0;l<r.length;l++)o.stat(a.join(e,r[l]),(function(e,n){c++,e?i=e:n.isFile()&&(s+=n.size),c===r.length&&t(i,i?-1:s)}));else t(null,0)}))},e.prototype._getShallowDirectorySizeSync=function(e){for(var t=o.readdirSync(e),n=0,r=0;r<t.length;r++)n+=o.statSync(a.join(e,t[r])).size;return n},e.prototype._storeToDisk=function(t){var n=this;u.info(e.TAG,"Checking existence of data storage directory: "+this._tempDir),this._confirmDirExists(this._tempDir,(function(r){if(r)return u.warn(e.TAG,"Error while checking/creating directory: "+(r&&r.message)),void n._onErrorHelper(r);n._getShallowDirectorySize(n._tempDir,(function(r,i){if(r||i<0)return u.warn(e.TAG,"Error while checking directory size: "+(r&&r.message)),void n._onErrorHelper(r);if(i>n._maxBytesOnDisk)u.warn(e.TAG,"Not saving data due to max size limit being met. Directory size in bytes is: "+i);else{var s=(new Date).getTime()+".ai.json",c=a.join(n._tempDir,s);u.info(e.TAG,"saving data to disk at: "+c),o.writeFile(c,n._stringify(t),{mode:384},(function(e){return n._onErrorHelper(e)}))}}))}))},e.prototype._storeToDiskSync=function(t){try{u.info(e.TAG,"Checking existence of data storage directory: "+this._tempDir),o.existsSync(this._tempDir)||o.mkdirSync(this._tempDir),this._applyACLRulesSync(this._tempDir);var n=this._getShallowDirectorySizeSync(this._tempDir);if(n>this._maxBytesOnDisk)return void u.info(e.TAG,"Not saving data due to max size limit being met. Directory size in bytes is: "+n);var r=(new Date).getTime()+".ai.json",i=a.join(this._tempDir,r);u.info(e.TAG,"saving data before crash to disk at: "+i),o.writeFileSync(i,t,{mode:384})}catch(t){u.warn(e.TAG,"Error while saving data to disk: "+(t&&t.message)),this._onErrorHelper(t)}},e.prototype._sendFirstFileOnDisk=function(){var e=this;o.exists(this._tempDir,(function(t){t&&o.readdir(e._tempDir,(function(t,n){if(t)e._onErrorHelper(t);else if((n=n.filter((function(e){return a.basename(e).indexOf(".ai.json")>-1}))).length>0){var r=n[0],i=a.join(e._tempDir,r);o.readFile(i,(function(t,n){t?e._onErrorHelper(t):o.unlink(i,(function(t){if(t)e._onErrorHelper(t);else try{var r=JSON.parse(n.toString());e.send(r)}catch(e){u.warn("Failed to read persisted file",e)}}))}))}}))}))},e.prototype._onErrorHelper=function(e){"function"==typeof this._onError&&this._onError(e)},e.prototype._stringify=function(e){try{return JSON.stringify(e)}catch(t){u.warn("Failed to serialize payload",t,e)}},e.prototype._fileCleanupTask=function(){var t=this;o.exists(this._tempDir,(function(n){n&&o.readdir(t._tempDir,(function(n,r){n?t._onErrorHelper(n):(r=r.filter((function(e){return a.basename(e).indexOf(".ai.json")>-1}))).length>0&&r.forEach((function(n){var r=new Date(parseInt(n.split(".ai.json")[0]));if(new Date(+new Date-e.FILE_RETEMPTION_PERIOD)>r){var i=a.join(t._tempDir,n);o.unlink(i,(function(e){e&&t._onErrorHelper(e)}))}}))}))}))},e.TAG="Sender",e.ICACLS_PATH=process.env.systemdrive+"/windows/system32/icacls.exe",e.POWERSHELL_PATH=process.env.systemdrive+"/windows/system32/windowspowershell/v1.0/powershell.exe",e.ACLED_DIRECTORIES={},e.ACL_IDENTITY=null,e.WAIT_BETWEEN_RESEND=6e4,e.MAX_BYTES_ON_DISK=52428800,e.MAX_CONNECTION_FAILURES_BEFORE_WARN=5,e.CLEANUP_TIMEOUT=36e5,e.FILE_RETEMPTION_PERIOD=6048e5,e.TEMPDIR_PREFIX="appInsights-node",e.OS_PROVIDES_FILE_PROTECTION=!1,e.USE_ICACLS="Windows_NT"===s.type(),e}();t.exports=h})),ci=S(((e,t)=>{"use strict";var n=nr(),r=ln(),i=xr(),o=function(){function e(){}return e.createEnvelope=function(t,i,o,s,a){var c=null;switch(i){case n.TelemetryType.Trace:c=e.createTraceData(t);break;case n.TelemetryType.Dependency:c=e.createDependencyData(t);break;case n.TelemetryType.Event:c=e.createEventData(t);break;case n.TelemetryType.Exception:c=e.createExceptionData(t);break;case n.TelemetryType.Request:c=e.createRequestData(t);break;case n.TelemetryType.Metric:c=e.createMetricData(t);break;case n.TelemetryType.Availability:c=e.createAvailabilityData(t);break;case n.TelemetryType.PageView:c=e.createPageViewData(t)}if(o&&n.domainSupportsProperties(c.baseData)){if(c&&c.baseData)if(c.baseData.properties)for(var l in o)c.baseData.properties[l]||(c.baseData.properties[l]=o[l]);else c.baseData.properties=o;c.baseData.properties=r.validateStringMap(c.baseData.properties)}var u=a&&a.instrumentationKey||"",d=new n.Envelope;return d.data=c,d.iKey=u,d.name="Microsoft.ApplicationInsights."+u.replace(/-/g,"")+"."+c.baseType.substr(0,c.baseType.length-4),d.tags=this.getTags(s,t.tagOverrides),d.time=(new Date).toISOString(),d.ver=1,d.sampleRate=a?a.samplingPercentage:100,i===n.TelemetryType.Metric&&(d.sampleRate=100),d},e.createTraceData=function(e){var t=new n.MessageData;t.message=e.message,t.properties=e.properties,isNaN(e.severity)?t.severityLevel=n.SeverityLevel.Information:t.severityLevel=e.severity;var r=new n.Data;return r.baseType=n.telemetryTypeToBaseType(n.TelemetryType.Trace),r.baseData=t,r},e.createDependencyData=function(e){var t=new n.RemoteDependencyData;"string"==typeof e.name&&(t.name=e.name.length>1024?e.name.slice(0,1021)+"...":e.name),t.data=e.data,t.target=e.target,t.duration=r.msToTimeSpan(e.duration),t.success=e.success,t.type=e.dependencyTypeName,t.properties=e.properties,t.resultCode=e.resultCode?e.resultCode+"":"",e.id?t.id=e.id:t.id=r.w3cTraceId();var i=new n.Data;return i.baseType=n.telemetryTypeToBaseType(n.TelemetryType.Dependency),i.baseData=t,i},e.createEventData=function(e){var t=new n.EventData;t.name=e.name,t.properties=e.properties,t.measurements=e.measurements;var r=new n.Data;return r.baseType=n.telemetryTypeToBaseType(n.TelemetryType.Event),r.baseData=t,r},e.createExceptionData=function(e){var t=new n.ExceptionData;t.properties=e.properties,isNaN(e.severity)?t.severityLevel=n.SeverityLevel.Error:t.severityLevel=e.severity,t.measurements=e.measurements,t.exceptions=[];var i=e.exception.stack,o=new n.ExceptionDetails;o.message=e.exception.message,o.typeName=e.exception.name,o.parsedStack=this.parseStack(i),o.hasFullStack=r.isArray(o.parsedStack)&&o.parsedStack.length>0,t.exceptions.push(o);var s=new n.Data;return s.baseType=n.telemetryTypeToBaseType(n.TelemetryType.Exception),s.baseData=t,s},e.createRequestData=function(e){var t=new n.RequestData;e.id?t.id=e.id:t.id=r.w3cTraceId(),t.name=e.name,t.url=e.url,t.source=e.source,t.duration=r.msToTimeSpan(e.duration),t.responseCode=e.resultCode?e.resultCode+"":"",t.success=e.success,t.properties=e.properties;var i=new n.Data;return i.baseType=n.telemetryTypeToBaseType(n.TelemetryType.Request),i.baseData=t,i},e.createMetricData=function(e){var t=new n.MetricData;t.metrics=[];var r=new n.DataPoint;r.count=isNaN(e.count)?1:e.count,r.kind=n.DataPointType.Aggregation,r.max=isNaN(e.max)?e.value:e.max,r.min=isNaN(e.min)?e.value:e.min,r.name=e.name,r.stdDev=isNaN(e.stdDev)?0:e.stdDev,r.value=e.value,t.metrics.push(r),t.properties=e.properties;var i=new n.Data;return i.baseType=n.telemetryTypeToBaseType(n.TelemetryType.Metric),i.baseData=t,i},e.createAvailabilityData=function(e){var t=new n.AvailabilityData;e.id?t.id=e.id:t.id=r.w3cTraceId(),t.name=e.name,t.duration=r.msToTimeSpan(e.duration),t.success=e.success,t.runLocation=e.runLocation,t.message=e.message,t.measurements=e.measurements,t.properties=e.properties;var i=new n.Data;return i.baseType=n.telemetryTypeToBaseType(n.TelemetryType.Availability),i.baseData=t,i},e.createPageViewData=function(e){var t=new n.PageViewData;t.name=e.name,t.duration=r.msToTimeSpan(e.duration),t.url=e.url,t.measurements=e.measurements,t.properties=e.properties;var i=new n.Data;return i.baseType=n.telemetryTypeToBaseType(n.TelemetryType.PageView),i.baseData=t,i},e.getTags=function(e,t){var n=i.CorrelationContextManager.getCurrentContext(),r={};if(e&&e.tags)for(var o in e.tags)r[o]=e.tags[o];if(t)for(var o in t)r[o]=t[o];return n&&(r[e.keys.operationId]=r[e.keys.operationId]||n.operation.id,r[e.keys.operationName]=r[e.keys.operationName]||n.operation.name,r[e.keys.operationParentId]=r[e.keys.operationParentId]||n.operation.parentId),r},e.parseStack=function(e){var t=void 0;if("string"==typeof e){var n=e.split("\n");t=[];for(var r=0,i=0,o=0;o<=n.length;o++){var a=n[o];if(s.regex.test(a)){var c=new s(n[o],r++);i+=c.sizeInBytes,t.push(c)}}if(i>32768)for(var l=0,u=t.length-1,d=0,p=l,h=u;l<u;){if((d+=t[l].sizeInBytes+t[u].sizeInBytes)>32768){var f=h-p+1;t.splice(p,f);break}p=l,h=u,l++,u--}}return t},e}(),s=function(){function e(t,n){this.sizeInBytes=0,this.level=n,this.method="<no_method>",this.assembly=r.trim(t);var i=t.match(e.regex);i&&i.length>=5&&(this.method=r.trim(i[2])||this.method,this.fileName=r.trim(i[4])||"<no_filename>",this.line=parseInt(i[5])||0),this.sizeInBytes+=this.method.length,this.sizeInBytes+=this.fileName.length,this.sizeInBytes+=this.assembly.length,this.sizeInBytes+=e.baseSize,this.sizeInBytes+=this.level.toString().length,this.sizeInBytes+=this.line.toString().length}return e.regex=/^(\s+at)?(.*?)(\@|\s\(|\s)([^\(\n]+):(\d+):(\d+)(\)?)$/,e.baseSize=58,e}();t.exports=o})),li=S(((e,t)=>{"use strict";var r=n(7016),i=Zr(),o=Mr(),s=nr(),a=ti(),c=si(),l=xr(),u=ai(),d=ln(),p=P(),h=ci(),f=function(){function e(e){this._telemetryProcessors=[],this._enableAzureProperties=!1;var t=new i(e);this.config=t,this.context=new o,this.commonProperties={};var n=new u(this.config);this.channel=new a((function(){return t.disableAppInsights}),(function(){return t.maxBatchSize}),(function(){return t.maxBatchIntervalMs}),n)}return e.prototype.trackAvailability=function(e){this.track(e,s.TelemetryType.Availability)},e.prototype.trackPageView=function(e){this.track(e,s.TelemetryType.PageView)},e.prototype.trackTrace=function(e){this.track(e,s.TelemetryType.Trace)},e.prototype.trackMetric=function(e){this.track(e,s.TelemetryType.Metric)},e.prototype.trackException=function(e){e&&e.exception&&!d.isError(e.exception)&&(e.exception=new Error(e.exception.toString())),this.track(e,s.TelemetryType.Exception)},e.prototype.trackEvent=function(e){this.track(e,s.TelemetryType.Event)},e.prototype.trackRequest=function(e){this.track(e,s.TelemetryType.Request)},e.prototype.trackDependency=function(e){e&&!e.target&&e.data&&(e.target=r.parse(e.data).host),this.track(e,s.TelemetryType.Dependency)},e.prototype.flush=function(e){this.channel.triggerSend(!!e&&!!e.isAppCrashing,e?e.callback:void 0)},e.prototype.track=function(e,t){if(e&&s.telemetryTypeToBaseType(t)){var n=h.createEnvelope(e,t,this.commonProperties,this.context,this.config);e.time&&(n.time=e.time.toISOString()),this._enableAzureProperties&&c.azureRoleEnvironmentTelemetryProcessor(n,this.context);var r=this.runTelemetryProcessors(n,e.contextObjects);r=r&&c.samplingTelemetryProcessor(n,{correlationContext:l.CorrelationContextManager.getCurrentContext()}),c.preAggregatedMetricsTelemetryProcessor(n,this.context),r&&(c.performanceMetricsTelemetryProcessor(n,this.quickPulseClient),this.channel.send(n))}else p.warn("track() requires telemetry object and telemetryType to be specified.")},e.prototype.setAutoPopulateAzureProperties=function(e){this._enableAzureProperties=e},e.prototype.addTelemetryProcessor=function(e){this._telemetryProcessors.push(e)},e.prototype.clearTelemetryProcessors=function(){this._telemetryProcessors=[]},e.prototype.runTelemetryProcessors=function(e,t){var n=!0,r=this._telemetryProcessors.length;if(0===r)return n;(t=t||{}).correlationContext=l.CorrelationContextManager.getCurrentContext();for(var i=0;i<r;++i)try{var o=this._telemetryProcessors[i];if(o&&!1===o.apply(null,[e,t])){n=!1;break}}catch(t){n=!0,p.warn("One of telemetry processors failed, telemetry item will be sent.",t,e)}return n&&(e&&e.tags&&(e.tags=d.validateStringMap(e.tags)),e&&e.data&&e.data.baseData&&e.data.baseData.properties&&(e.data.baseData.properties=d.validateStringMap(e.data.baseData.properties))),n},e}();t.exports=f})),ui=S(((e,t)=>{"use strict";var n,r=e&&e.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},n(e,t)},function(e,t){function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),i=li(),o=Wr(),s=Vr(),a=P(),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.trackNodeHttpRequestSync=function(e){e&&e.request&&e.response&&e.duration?o.trackRequestSync(this,e):a.warn("trackNodeHttpRequestSync requires NodeHttpRequestTelemetry object with request, response and duration specified.")},t.prototype.trackNodeHttpRequest=function(e){(e.duration||e.error)&&a.warn("trackNodeHttpRequest will ignore supplied duration and error parameters. These values are collected from the request and response objects."),e&&e.request&&e.response?o.trackRequest(this,e):a.warn("trackNodeHttpRequest requires NodeHttpRequestTelemetry object with request and response specified.")},t.prototype.trackNodeHttpDependency=function(e){e&&e.request?s.trackRequest(this,e):a.warn("trackNodeHttpDependency requires NodeHttpDependencyTelemetry object with request specified.")},t}(i);t.exports=c})),di=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})})),pi=S((e=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.dispose=e.Configuration=e.wrapWithCorrelationContext=e.startOperation=e.getCorrelationContext=e.start=e.setup=e.liveMetricsClient=e.defaultClient=e.DistributedTracingModes=void 0;var t,n,r=xr(),i=Or(),o=Dr(),s=kr(),a=jr(),c=$r(),l=Vr(),u=Wr(),d=un(),p=P(),h=Yr(),f=ei();e.TelemetryClient=ui(),e.Contracts=nr(),e.azureFunctionsTypes=di(),(n=t=e.DistributedTracingModes||(e.DistributedTracingModes={}))[n.AI=0]="AI",n[n.AI_AND_W3C=1]="AI_AND_W3C";var m,g,y,b,v,S,w,C,T,E,_,x=!0,R=!1,I=!0,O=!0,D=!0,A=!1,k=!0,N=!0,L=!0,j=!0,M=!1,F=!0,q=void 0,B=void 0,U=!1;function z(){return e.defaultClient?(U=!0,y.enable(x,R),b.enable(I),v.enable(O),S.enable(D),w.enable(A,e.defaultClient.config),C.enable(F,g),T.useAutoCorrelation(j,m),T.enable(k),E.enable(N),e.liveMetricsClient&&M&&e.liveMetricsClient.enable(M)):p.warn("Start cannot be called before setup"),G}e.setup=function(t){return e.defaultClient?p.info("The default client is already setup"):(e.defaultClient=new e.TelemetryClient(t),y=new i(e.defaultClient),b=new o(e.defaultClient),v=new s(e.defaultClient),S=new a(e.defaultClient),w=new c(e.defaultClient),T=new u(e.defaultClient),E=new l(e.defaultClient),C||(C=new f.AutoCollectNativePerformance(e.defaultClient))),e.defaultClient&&e.defaultClient.channel&&e.defaultClient.channel.setUseDiskRetryCaching(L,q,B),G},e.start=z,e.getCorrelationContext=function(){return j?r.CorrelationContextManager.getCurrentContext():null},e.startOperation=function(e,t){return r.CorrelationContextManager.startOperation(e,t)},e.wrapWithCorrelationContext=function(e,t){return r.CorrelationContextManager.wrapCallback(e,t)};var G=function(){function n(){}return n.setDistributedTracingMode=function(e){return d.w3cEnabled=e===t.AI_AND_W3C,n},n.setAutoCollectConsole=function(e,t){return void 0===t&&(t=!1),x=e,R=t,U&&y.enable(e,t),n},n.setAutoCollectExceptions=function(e){return I=e,U&&b.enable(e),n},n.setAutoCollectPerformance=function(e,t){void 0===t&&(t=!0),O=e;var r=f.AutoCollectNativePerformance.parseEnabled(t);return F=r.isEnabled,g=r.disabledMetrics,U&&(v.enable(e),C.enable(r.isEnabled,r.disabledMetrics)),n},n.setAutoCollectPreAggregatedMetrics=function(e){return D=e,U&&S.enable(e),n},n.setAutoCollectHeartbeat=function(t){return A=t,U&&w.enable(t,e.defaultClient.config),n},n.setAutoCollectRequests=function(e){return k=e,U&&T.enable(e),n},n.setAutoCollectDependencies=function(e){return N=e,U&&E.enable(e),n},n.setAutoDependencyCorrelation=function(e,t){return j=e,m=t,U&&T.useAutoCorrelation(e,t),n},n.setUseDiskRetryCaching=function(t,r,i){return L=t,q=r,B=i,e.defaultClient&&e.defaultClient.channel&&e.defaultClient.channel.setUseDiskRetryCaching(t,r,i),n},n.setInternalLogging=function(e,t){return void 0===e&&(e=!1),void 0===t&&(t=!0),p.enableDebug=e,p.disableWarnings=!t,n},n.setSendLiveMetrics=function(t){return void 0===t&&(t=!1),e.defaultClient?(!e.liveMetricsClient&&t?(e.liveMetricsClient=new h(e.defaultClient.config,null),_=new s(e.liveMetricsClient,1e3,!0),e.liveMetricsClient.addCollector(_),e.defaultClient.quickPulseClient=e.liveMetricsClient):e.liveMetricsClient&&e.liveMetricsClient.enable(t),M=t,n):(p.warn("Live metrics client cannot be setup without the default client"),n)},n.start=z,n}();e.Configuration=G,e.dispose=function(){d.w3cEnabled=!0,e.defaultClient=null,U=!1,y&&y.dispose(),b&&b.dispose(),v&&v.dispose(),S&&S.dispose(),w&&w.dispose(),C&&C.dispose(),T&&T.dispose(),E&&E.dispose(),e.liveMetricsClient&&(e.liveMetricsClient.enable(!1),M=!1,e.liveMetricsClient=void 0)}})),hi={};((e,t)=>{for(var n in t)c(e,n,{get:t[n],enumerable:!0})})(hi,{default:()=>Si}),e.exports=(s=hi,w(c({},"__esModule",{value:!0}),s));var fi=C(n(857)),mi=C(n(1398)),gi=C(n(5692)),yi=class{constructor(e){this.vscodeAPI=e}getTelemetryLevel(){try{let e=this.vscodeAPI.env.telemetryConfiguration;return e.isUsageEnabled&&e.isErrorsEnabled&&e.isCrashEnabled?"on":e.isErrorsEnabled&&e.isCrashEnabled?"error":"off"}catch{return void 0!==this.vscodeAPI.env.isTelemetryEnabled?this.vscodeAPI.env.isTelemetryEnabled?"on":"off":this.vscodeAPI.workspace.getConfiguration("telemetry").get("enableTelemetry")?"on":"off"}}static applyReplacements(e,t){for(let n of Object.keys(e))for(let r of t)r.lookup.test(n)&&(void 0!==r.replacementString?e[n]=r.replacementString:delete e[n])}static shouldUseOneDataSystemSDK(e){return 74===e.length&&"-"===e[32]&&"-"===e[41]&&"-"===e[46]&&"-"===e[51]&&"-"===e[56]&&"-"===e[69]}static getInstance(e){return yi._instance||(yi._instance=new yi(e)),yi._instance}},bi=class{constructor(e,t,n,r,i,o){this.extensionId=e,this.extensionVersion=t,this.telemetryAppender=n,this.osShim=r,this.vscodeAPI=i,this.firstParty=!1,this.userOptIn=!1,this.errorOptIn=!1,this.disposables=[],this.firstParty=!!o,this.updateUserOptStatus(),void 0!==i.env.onDidChangeTelemetryEnabled?(this.disposables.push(i.env.onDidChangeTelemetryEnabled((()=>this.updateUserOptStatus()))),this.disposables.push(i.workspace.onDidChangeConfiguration((()=>this.updateUserOptStatus())))):this.disposables.push(i.workspace.onDidChangeConfiguration((()=>this.updateUserOptStatus())))}updateUserOptStatus(){let e=yi.getInstance(this.vscodeAPI).getTelemetryLevel();this.userOptIn="on"===e,this.errorOptIn="error"===e||this.userOptIn,(this.userOptIn||this.errorOptIn)&&this.telemetryAppender.instantiateAppender()}cleanRemoteName(e){if(!e)return"none";let t="other";return["ssh-remote","dev-container","attached-container","wsl","codespaces"].forEach((n=>{0===e.indexOf(`${n}`)&&(t=n)})),t}get extension(){return void 0===this._extension&&(this._extension=this.vscodeAPI.extensions.getExtension(this.extensionId)),this._extension}cloneAndChange(e,t){if(null===e||"object"!=typeof e||"function"!=typeof t)return e;let n={};for(let r in e)n[r]=t(r,e[r]);return n}shouldSendErrorTelemetry(){return!(!1===this.errorOptIn||this.firstParty&&this.vscodeAPI.env.remoteName&&"other"===this.cleanRemoteName(this.vscodeAPI.env.remoteName))}getCommonProperties(){let e={};if(e["common.os"]=this.osShim.platform,e["common.nodeArch"]=this.osShim.architecture,e["common.platformversion"]=(this.osShim.release||"").replace(/^(\d+)(\.\d+)?(\.\d+)?(.*)/,"$1$2$3"),e["common.extname"]=this.extensionId,e["common.extversion"]=this.extensionVersion,this.vscodeAPI&&this.vscodeAPI.env){switch(e["common.vscodemachineid"]=this.vscodeAPI.env.machineId,e["common.vscodesessionid"]=this.vscodeAPI.env.sessionId,e["common.vscodeversion"]=this.vscodeAPI.version,e["common.isnewappinstall"]=this.vscodeAPI.env.isNewAppInstall?this.vscodeAPI.env.isNewAppInstall.toString():"false",e["common.product"]=this.vscodeAPI.env.appHost,this.vscodeAPI.env.uiKind){case this.vscodeAPI.UIKind.Web:e["common.uikind"]="web";break;case this.vscodeAPI.UIKind.Desktop:e["common.uikind"]="desktop";break;default:e["common.uikind"]="unknown"}e["common.remotename"]=this.cleanRemoteName(this.vscodeAPI.env.remoteName)}return e}anonymizeFilePaths(e,t){let n;if(null==e)return"";let r=[];""!==this.vscodeAPI.env.appRoot&&r.push(new RegExp(this.vscodeAPI.env.appRoot.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gi")),this.extension&&r.push(new RegExp(this.extension.extensionPath.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"gi"));let i=e;if(t){let t=[];for(let i of r)for(;(n=i.exec(e))&&n;)t.push([n.index,i.lastIndex]);let o=/^[\\/]?(node_modules|node_modules\.asar)[\\/]/,s=/(file:\/\/)?([a-zA-Z]:(\\\\|\\|\/)|(\\\\|\\|\/))?([\w-._]+(\\\\|\\|\/))+[\w-._]*/g,a=0;for(i="";(n=s.exec(e))&&n;)n[0]&&!o.test(n[0])&&t.every((([e,t])=>n.index<e||n.index>=t))&&(i+=e.substring(a,n.index)+"<REDACTED: user-file-path>",a=s.lastIndex);a<e.length&&(i+=e.substr(a))}for(let e of r)i=i.replace(e,"");return i}removePropertiesWithPossibleUserInfo(e){if("object"!=typeof e)return;let t={};for(let n of Object.keys(e)){let r=e[n];if(!r)continue;let i=/@[a-zA-Z0-9-.]+/,o=/xox[pbaors]-[a-zA-Z0-9]+-[a-zA-Z0-9-]+?/;/(key|token|sig|signature|password|passwd|pwd|android:value)[^a-zA-Z0-9]/.test(r.toLowerCase())?t[n]="<REDACTED: secret>":i.test(r)?t[n]="<REDACTED: email>":o.test(r)?t[n]="<REDACTED: token>":t[n]=r}return t}get telemetryLevel(){switch(yi.getInstance(this.vscodeAPI).getTelemetryLevel()){case"on":return"all";case"error":return"error";case"off":return"off"}}internalSendTelemetryEvent(e,t,n,r,i){if((this.userOptIn||i)&&""!==e){if(t=b(b({},t),this.getCommonProperties()),r){let e=this.cloneAndChange(t,((e,t)=>this.anonymizeFilePaths(t,this.firstParty)));t=this.removePropertiesWithPossibleUserInfo(e)}t=t??{},n=n??{},e=`${this.extensionId}/${e}`,this.telemetryAppender.logEvent(e,{properties:t,measurements:n})}}sendTelemetryEvent(e,t,n){this.internalSendTelemetryEvent(e,t,n,!0,!1)}sendRawTelemetryEvent(e,t,n){this.internalSendTelemetryEvent(e,t,n,!1,!1)}sendDangerousTelemetryEvent(e,t,n,r=!0){this.telemetryAppender.instantiateAppender(),this.internalSendTelemetryEvent(e,t,n,r,!0)}internalSendTelemetryErrorEvent(e,t,n,r,i){if((this.shouldSendErrorTelemetry()||i)&&""!==e){if(t=b(b({},t),this.getCommonProperties()),r){let e=this.cloneAndChange(t,((e,t)=>this.anonymizeFilePaths(t,this.firstParty)));t=this.removePropertiesWithPossibleUserInfo(e)}t=t??{},n=n??{},e=`${this.extensionId}/${e}`,this.telemetryAppender.logEvent(e,{properties:t,measurements:n})}}sendTelemetryErrorEvent(e,t,n){this.internalSendTelemetryErrorEvent(e,t,n,!0,!1)}sendDangerousTelemetryErrorEvent(e,t,n,r=!0){this.telemetryAppender.instantiateAppender(),this.internalSendTelemetryErrorEvent(e,t,n,r,!0)}internalSendTelemetryException(e,t,n,r,i){if((this.shouldSendErrorTelemetry()||i)&&e){if(t=b(b({},t),this.getCommonProperties()),r){let n=this.cloneAndChange(t,((e,t)=>this.anonymizeFilePaths(t,this.firstParty)));e.stack&&(e.stack=this.anonymizeFilePaths(e.stack,this.firstParty)),t=this.removePropertiesWithPossibleUserInfo(n)}t=t??{},n=n??{},this.telemetryAppender.logException(e,{properties:t,measurements:n})}}sendTelemetryException(e,t,n){this.internalSendTelemetryException(e,t,n,!0,!1)}sendDangerousTelemetryException(e,t,n,r=!0){this.telemetryAppender.instantiateAppender(),this.internalSendTelemetryException(e,t,n,r,!0)}dispose(){return this.telemetryAppender.flush(),Promise.all(this.disposables.map((e=>e.dispose())))}},vi=class{constructor(e,t){this._instantiationStatus=0,this._eventQueue=[],this._exceptionQueue=[],this._clientFactory=t,this._key=e}logEvent(e,t){this._telemetryClient?this._telemetryClient.logEvent(e,t):2!==this._instantiationStatus&&this._eventQueue.push({eventName:e,data:t})}logException(e,t){this._telemetryClient?this._telemetryClient.logException(e,t):2!==this._instantiationStatus&&this._exceptionQueue.push({exception:e,data:t})}async flush(){this._telemetryClient&&(await this._telemetryClient.flush(),this._telemetryClient=void 0)}_flushQueues(){this._eventQueue.forEach((({eventName:e,data:t})=>this.logEvent(e,t))),this._eventQueue=[],this._exceptionQueue.forEach((({exception:e,data:t})=>this.logException(e,t))),this._exceptionQueue=[]}instantiateAppender(){0===this._instantiationStatus&&(this._instantiationStatus=1,this._clientFactory(this._key).then((e=>{this._telemetryClient=e,this._instantiationStatus=2,this._flushQueues()})).catch((e=>{console.error(e),this._instantiationStatus=2})))}},Si=class extends bi{constructor(e,t,n,r,i){let o=e=>(async(e,t)=>{let n;try{process.env.APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL="1";let t=await Promise.resolve().then((()=>C(pi())));t.defaultClient?(n=new t.TelemetryClient(e),n.channel.setUseDiskRetryCaching(!0)):(t.setup(e).setAutoCollectRequests(!1).setAutoCollectPerformance(!1).setAutoCollectExceptions(!1).setAutoCollectDependencies(!1).setAutoDependencyCorrelation(!1).setAutoCollectConsole(!1).setAutoCollectHeartbeat(!1).setUseDiskRetryCaching(!0).start(),n=t.defaultClient),mi&&mi.env&&(n.context.tags[n.context.keys.userId]=mi.env.machineId,n.context.tags[n.context.keys.sessionId]=mi.env.sessionId,n.context.tags[n.context.keys.cloudRole]=mi.env.appName,n.context.tags[n.context.keys.cloudRoleInstance]=mi.env.appName),e&&0===e.indexOf("AIF-")&&(n.config.endpointUrl="https://mobile.events.data.microsoft.com/collect/v1")}catch(e){return Promise.reject("Failed to initialize app insights!\n"+e.message)}return null!=t&&t.length&&function(e,t){e.addTelemetryProcessor((e=>(Array.isArray(e.tags)?e.tags.forEach((e=>yi.applyReplacements(e,t))):e.tags&&yi.applyReplacements(e.tags,t),e.data.baseData&&yi.applyReplacements(e.data.baseData,t),!0)))}(n,t),{logEvent:(e,t)=>{try{null==n||n.trackEvent({name:e,properties:null==t?void 0:t.properties,measurements:null==t?void 0:t.measurements})}catch(e){throw new Error("Failed to log event to app insights!\n"+e.message)}},logException:(e,t)=>{try{null==n||n.trackException({exception:e,properties:null==t?void 0:t.properties,measurements:null==t?void 0:t.measurements})}catch(e){throw new Error("Failed to log exception to app insights!\n"+e.message)}},flush:async()=>{try{null==n||n.flush()}catch(e){throw new Error("Failed to flush app insights!\n"+e.message)}}}})(e,i);yi.shouldUseOneDataSystemSDK(n)&&(o=e=>(async(e,t,n)=>{let r=await(async(e,t,n)=>{let r=await Promise.resolve().then((()=>C(x()))),i=await Promise.resolve().then((()=>C(I()))),o=new r.AppInsightsCore,s=new i.PostChannel,a={instrumentationKey:e,endpointUrl:"https://mobile.events.data.microsoft.com/OneCollector/1.0",loggingLevelTelemetry:0,loggingLevelConsole:0,disableCookiesUsage:!0,disableDbgExt:!0,disableInstrumentationKeyValidation:!0,channels:[[s]]};if(n){a.extensionConfig={};let e={alwaysUseXhrOverride:!0,httpXHROverride:n};a.extensionConfig[s.identifier]=e}let c=t.workspace.getConfiguration("telemetry").get("internalTesting");return o.initialize(a,[]),o.addTelemetryInitializer((e=>{!c||(e.ext=e.ext??{},e.ext.utc=e.ext.utc??{},e.ext.utc.flags=8462029)})),o})(e,t,n);return{logEvent:(e,t)=>{try{null==r||r.track({name:e,baseData:{name:e,properties:null==t?void 0:t.properties,measurements:null==t?void 0:t.measurements}})}catch(e){throw new Error("Failed to log event to app insights!\n"+e.message)}},logException:(e,t)=>{throw new Error("1DS SDK does not support logging exceptions, please use logEvent for exception tracking")},flush:async()=>{try{null==r||r.unload()}catch(e){throw new Error("Failed to flush app insights!\n"+e.message)}}}})(e,mi,{sendPOST:(e,t)=>{let n={method:"POST",headers:v(b({},e.headers),{"Content-Type":"application/json","Content-Length":Buffer.byteLength(e.data)})};try{let r=gi.request(e.urlString,n,(e=>{e.on("data",(function(n){t(e.statusCode??200,e.headers,n.toString())})),e.on("error",(function(){t(0,{})}))}));r.write(e.data),r.end()}catch{t(0,{})}}}));let s=new vi(n,o);n&&(0===n.indexOf("AIF-")||yi.shouldUseOneDataSystemSDK(n))&&(r=!0),super(e,t,s,{release:fi.release(),platform:fi.platform(),architecture:fi.arch()},mi,r)}}},889:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=889,e.exports=t},8371:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=8371,e.exports=t},9724:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};const i=n(4434),o=r(n(5753)),s=r(n(1956)),a=o.default("agent-base");function c(){const{stack:e}=new Error;return"string"==typeof e&&e.split("\n").some((e=>-1!==e.indexOf("(https.js:")||-1!==e.indexOf("node:https:")))}function l(e,t){return new l.Agent(e,t)}!function(e){class t extends i.EventEmitter{constructor(e,t){super();let n=t;"function"==typeof e?this.callback=e:e&&(n=e),this.timeout=null,n&&"number"==typeof n.timeout&&(this.timeout=n.timeout),this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){return"number"==typeof this.explicitDefaultPort?this.explicitDefaultPort:c()?443:80}set defaultPort(e){this.explicitDefaultPort=e}get protocol(){return"string"==typeof this.explicitProtocol?this.explicitProtocol:c()?"https:":"http:"}set protocol(e){this.explicitProtocol=e}callback(e,t,n){throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(e,t){const n=Object.assign({},t);"boolean"!=typeof n.secureEndpoint&&(n.secureEndpoint=c()),null==n.host&&(n.host="localhost"),null==n.port&&(n.port=n.secureEndpoint?443:80),null==n.protocol&&(n.protocol=n.secureEndpoint?"https:":"http:"),n.host&&n.path&&delete n.path,delete n.agent,delete n.hostname,delete n._defaultAgent,delete n.defaultPort,delete n.createConnection,e._last=!0,e.shouldKeepAlive=!1;let r=!1,i=null;const o=n.timeout||this.timeout,l=t=>{e._hadError||(e.emit("error",t),e._hadError=!0)},u=()=>{i=null,r=!0;const e=new Error(`A "socket" was not created for HTTP request before ${o}ms`);e.code="ETIMEOUT",l(e)},d=e=>{r||(null!==i&&(clearTimeout(i),i=null),l(e))},p=t=>{if(r)return;if(null!=i&&(clearTimeout(i),i=null),o=t,Boolean(o)&&"function"==typeof o.addRequest)return a("Callback returned another Agent instance %o",t.constructor.name),void t.addRequest(e,n);var o;if(t)return t.once("free",(()=>{this.freeSocket(t,n)})),void e.onSocket(t);const s=new Error(`no Duplex stream was returned to agent-base for \`${e.method} ${e.path}\``);l(s)};if("function"==typeof this.callback){this.promisifiedCallback||(this.callback.length>=3?(a("Converting legacy callback function to promise"),this.promisifiedCallback=s.default(this.callback)):this.promisifiedCallback=this.callback),"number"==typeof o&&o>0&&(i=setTimeout(u,o)),"port"in n&&"number"!=typeof n.port&&(n.port=Number(n.port));try{a("Resolving socket for %o request: %o",n.protocol,`${e.method} ${e.path}`),Promise.resolve(this.promisifiedCallback(e,n)).then(p,d)}catch(e){Promise.reject(e).catch(d)}}else l(new Error("`callback` is not defined"))}freeSocket(e,t){a("Freeing socket %o %o",e.constructor.name,t),e.destroy()}destroy(){a("Destroying agent %o",this.constructor.name)}}e.Agent=t,e.prototype=e.Agent.prototype}(l||(l={})),e.exports=l},1956:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return function(t,n){return new Promise(((r,i)=>{e.call(this,t,n,((e,t)=>{e?i(e):r(t)}))}))}}},7336:(e,t,n)=>{var r=n(5617);e.exports=function(e,t){return new Promise((function(n,i){var o,s=t||{};function a(e){i(e||new Error("Aborted"))}function c(e,t){e.bail?a(e):o.retry(e)?s.onRetry&&s.onRetry(e,t):i(o.mainError())}"randomize"in s||(s.randomize=!0),(o=r.operation(s)).attempt((function(t){var r;try{r=e(a,t)}catch(e){return void c(e,t)}Promise.resolve(r).then(n).catch((function(e){c(e,t)}))}))}))}},8505:e=>{"use strict";function t(e,t,i){e instanceof RegExp&&(e=n(e,i)),t instanceof RegExp&&(t=n(t,i));var o=r(e,t,i);return o&&{start:o[0],end:o[1],pre:i.slice(0,o[0]),body:i.slice(o[0]+e.length,o[1]),post:i.slice(o[1]+t.length)}}function n(e,t){var n=t.match(e);return n?n[0]:null}function r(e,t,n){var r,i,o,s,a,c=n.indexOf(e),l=n.indexOf(t,c+1),u=c;if(c>=0&&l>0){if(e===t)return[c,l];for(r=[],o=n.length;u>=0&&!a;)u==c?(r.push(u),c=n.indexOf(e,u+1)):1==r.length?a=[r.pop(),l]:((i=r.pop())<o&&(o=i,s=l),l=n.indexOf(t,u+1)),u=c<l&&c>=0?c:l;r.length&&(a=[o,s])}return a}e.exports=t,t.range=r},8928:(e,t,n)=>{var r=n(9818),i=n(8505);e.exports=function(e){return e?("{}"===e.substr(0,2)&&(e="\\{\\}"+e.substr(2)),y(function(e){return e.split("\\\\").join(o).split("\\{").join(s).split("\\}").join(a).split("\\,").join(c).split("\\.").join(l)}(e),!0).map(d)):[]};var o="\0SLASH"+Math.random()+"\0",s="\0OPEN"+Math.random()+"\0",a="\0CLOSE"+Math.random()+"\0",c="\0COMMA"+Math.random()+"\0",l="\0PERIOD"+Math.random()+"\0";function u(e){return parseInt(e,10)==e?parseInt(e,10):e.charCodeAt(0)}function d(e){return e.split(o).join("\\").split(s).join("{").split(a).join("}").split(c).join(",").split(l).join(".")}function p(e){if(!e)return[""];var t=[],n=i("{","}",e);if(!n)return e.split(",");var r=n.pre,o=n.body,s=n.post,a=r.split(",");a[a.length-1]+="{"+o+"}";var c=p(s);return s.length&&(a[a.length-1]+=c.shift(),a.push.apply(a,c)),t.push.apply(t,a),t}function h(e){return"{"+e+"}"}function f(e){return/^-?0\d/.test(e)}function m(e,t){return e<=t}function g(e,t){return e>=t}function y(e,t){var n=[],o=i("{","}",e);if(!o||/\$$/.test(o.pre))return[e];var s,c=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(o.body),l=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(o.body),d=c||l,b=o.body.indexOf(",")>=0;if(!d&&!b)return o.post.match(/,.*\}/)?y(e=o.pre+"{"+o.body+a+o.post):[e];if(d)s=o.body.split(/\.\./);else if(1===(s=p(o.body)).length&&1===(s=y(s[0],!1).map(h)).length)return(w=o.post.length?y(o.post,!1):[""]).map((function(e){return o.pre+s[0]+e}));var v,S=o.pre,w=o.post.length?y(o.post,!1):[""];if(d){var C=u(s[0]),T=u(s[1]),E=Math.max(s[0].length,s[1].length),_=3==s.length?Math.abs(u(s[2])):1,x=m;T<C&&(_*=-1,x=g);var R=s.some(f);v=[];for(var I=C;x(I,T);I+=_){var P;if(l)"\\"===(P=String.fromCharCode(I))&&(P="");else if(P=String(I),R){var O=E-P.length;if(O>0){var D=new Array(O+1).join("0");P=I<0?"-"+D+P.slice(1):D+P}}v.push(P)}}else v=r(s,(function(e){return y(e,!1)}));for(var A=0;A<v.length;A++)for(var k=0;k<w.length;k++){var N=S+v[A]+w[k];(!t||d||N)&&n.push(N)}return n}},4025:(e,t,n)=>{var r=n(181).Buffer,i=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];function o(e){if(r.isBuffer(e))return e;var t="function"==typeof r.alloc&&"function"==typeof r.from;if("number"==typeof e)return t?r.alloc(e):new r(e);if("string"==typeof e)return t?r.from(e):new r(e);throw new Error("input must be buffer, number, or string, received "+typeof e)}function s(e,t){e=o(e),r.isBuffer(t)&&(t=t.readUInt32BE(0));for(var n=~t,s=0;s<e.length;s++)n=i[255&(n^e[s])]^n>>>8;return~n}function a(){return e=s.apply(null,arguments),(t=o(4)).writeInt32BE(e,0),t;var e,t}"undefined"!=typeof Int32Array&&(i=new Int32Array(i)),a.signed=function(){return s.apply(null,arguments)},a.unsigned=function(){return s.apply(null,arguments)>>>0},e.exports=a},911:(e,t,n)=>{"use strict";const r=n(9896),i=n(6928),o=r.lchown?"lchown":"chown",s=r.lchownSync?"lchownSync":"chownSync",a=r.lchown&&!process.version.match(/v1[1-9]+\./)&&!process.version.match(/v10\.[6-9]/),c=(e,t,n)=>{try{return r[s](e,t,n)}catch(e){if("ENOENT"!==e.code)throw e}},l=a?(e,t,n,i)=>o=>{o&&"EISDIR"===o.code?r.chown(e,t,n,i):i(o)}:(e,t,n,r)=>r,u=a?(e,t,n)=>{try{return c(e,t,n)}catch(i){if("EISDIR"!==i.code)throw i;((e,t,n)=>{try{return r.chownSync(e,t,n)}catch(e){if("ENOENT"!==e.code)throw e}})(e,t,n)}}:(e,t,n)=>c(e,t,n),d=process.version;let p=(e,t,n)=>r.readdir(e,t,n);/^v4\./.test(d)&&(p=(e,t,n)=>r.readdir(e,n));const h=(e,t,n,i)=>{r[o](e,t,n,l(e,t,n,(e=>{i(e&&"ENOENT"!==e.code?e:null)})))},f=(e,t,n,o,s)=>{if("string"==typeof t)return r.lstat(i.resolve(e,t),((r,i)=>{if(r)return s("ENOENT"!==r.code?r:null);i.name=t,f(e,i,n,o,s)}));if(t.isDirectory())m(i.resolve(e,t.name),n,o,(r=>{if(r)return s(r);const a=i.resolve(e,t.name);h(a,n,o,s)}));else{const r=i.resolve(e,t.name);h(r,n,o,s)}},m=(e,t,n,r)=>{p(e,{withFileTypes:!0},((i,o)=>{if(i){if("ENOENT"===i.code)return r();if("ENOTDIR"!==i.code&&"ENOTSUP"!==i.code)return r(i)}if(i||!o.length)return h(e,t,n,r);let s=o.length,a=null;const c=i=>{if(!a)return i?r(a=i):0==--s?h(e,t,n,r):void 0};o.forEach((r=>f(e,r,t,n,c)))}))},g=(e,t,n)=>{let o;try{o=(e=>r.readdirSync(e,{withFileTypes:!0}))(e)}catch(r){if("ENOENT"===r.code)return;if("ENOTDIR"===r.code||"ENOTSUP"===r.code)return u(e,t,n);throw r}return o&&o.length&&o.forEach((o=>((e,t,n,o)=>{if("string"==typeof t)try{const n=r.lstatSync(i.resolve(e,t));n.name=t,t=n}catch(e){if("ENOENT"===e.code)return;throw e}t.isDirectory()&&g(i.resolve(e,t.name),n,o),u(i.resolve(e,t.name),n,o)})(e,o,t,n))),u(e,t,n)};e.exports=m,m.sync=g},9818:e=>{e.exports=function(e,n){for(var r=[],i=0;i<e.length;i++){var o=n(e[i],i);t(o)?r.push.apply(r,o):r.push(o)}return r};var t=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}},7316:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.c2p=void 0;const r=n(235);t.c2p={asConnectionParams:function(e,t){return{ownerUri:e,connection:{options:t.options}}},asExecutionPlanOptions:function(e){return{includeEstimatedExecutionPlanXml:e?e.displayEstimatedQueryPlan:void 0,includeActualExecutionPlanXml:e?e.displayActualQueryPlan:void 0}},asScriptingParams:function(e,t,n,i){let o={type:n.metadataTypeName,schema:n.schema,name:n.name,parentName:n.parentName,parentTypeName:n.parentTypeName},s=i.targetDatabaseEngineEdition,a=i.targetDatabaseEngineType,c=i.scriptCompatibilityOption,l={scriptCreateDrop:t===r.ScriptOperation.Delete?"ScriptDrop":t===r.ScriptOperation.Select?"ScriptSelect":"ScriptCreate",typeOfDataToScript:"SchemaOnly",scriptStatistics:"ScriptStatsNone",targetDatabaseEngineEdition:s||"SqlServerEnterpriseEdition",targetDatabaseEngineType:a||"SingleInstance",scriptCompatibilityOption:c||"Script140Compat"};return{connectionString:null,filePath:i.filePath,scriptingObjects:[o],scriptDestination:"ToEditor",includeObjectCriteria:null,excludeObjectCriteria:null,includeSchemas:null,excludeSchemas:null,includeTypes:null,excludeTypes:null,scriptOptions:l,connectionDetails:null,selectScript:null,ownerURI:e,operation:t}}}},5702:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseService=t.SqlOpsDataClient=t.FileBrowserFeature=t.TaskServicesFeature=t.ScriptingFeature=t.ObjectExplorerFeature=t.RestoreFeature=t.BackupFeature=t.AdminServicesFeature=t.MetadataFeature=t.QueryFeature=t.ConnectionFeature=t.CapabilitiesFeature=t.SqlOpsFeature=void 0;const r=n(4382),i=n(5805),o=n(6362),s=n(235),a=n(1398),c=n(7316),l=n(4219),u=n(1559);function d(e,t){return void 0===e[t]&&(e[t]={}),e[t]}class p{constructor(e,t){this._client=e,this._message=t,this._providers=new Map,this._disposables=[]}get messages(){return this._message}register(e,t){if(i.array(this.messages)&&i.array(e)){let t=e.every((e=>!!this.messages.find((t=>t.method===e.method))));if(!t)throw new Error("Register called on wrong feature.")}else if(i.array(this.messages)&&!i.array(e)){if(!this.messages.find((t=>t.method===e.method)))throw new Error("Register called on wrong feature.")}else if(!i.array(this.messages)&&!i.array(e)&&this.messages.method!==e.method)throw new Error(`Register called on wrong feature. Requested ${e.method} but reached feature ${this.messages.method}`);let n=this.registerProvider(t.registerOptions);n&&this._providers.set(t.id,n)}unregister(e){let t=this._providers.get(e);t&&t.dispose()}dispose(){this._providers.forEach((e=>{e.dispose()})),this._disposables.forEach((e=>e.dispose())),this._providers.clear(),this._disposables=[]}registerNotificationEmitter(e){const t=new a.EventEmitter;return this._disposables.push(t),this._client.onNotification(e,(e=>{t.fire(e)})),t}}t.SqlOpsFeature=p;class h extends p{constructor(e){super(e,h.messagesTypes)}fillClientCapabilities(e){d(d(e,"connection"),"capabilities").dynamicRegistration=!0}initialize(e){this.register(this.messages,{id:o.generateUuid(),registerOptions:void 0})}registerProvider(e){const t=this._client;return s.dataprotocol.registerCapabilitiesServiceProvider({providerId:t.providerId,getServerCapabilities:e=>t.sendRequest(l.CapabiltiesDiscoveryRequest.type,e).then(t.sqlp2c.asServerCapabilities,(e=>(t.logFailedRequest(l.CapabiltiesDiscoveryRequest.type,e),Promise.resolve(void 0))))})}}t.CapabilitiesFeature=h,h.messagesTypes=[l.CapabiltiesDiscoveryRequest.type];class f extends p{constructor(e){super(e,f.messagesTypes)}fillClientCapabilities(e){d(d(e,"connection"),"connection").dynamicRegistration=!0}initialize(e){this.register(this.messages,{id:o.generateUuid(),registerOptions:void 0})}registerProvider(e){const t=this._client,n=this.registerNotificationEmitter(l.ConnectionCompleteNotification.type),r=this.registerNotificationEmitter(l.IntelliSenseReadyNotification.type),i=this.registerNotificationEmitter(l.ConnectionChangedNotification.type);return s.dataprotocol.onDidChangeLanguageFlavor((e=>{t.sendNotification(l.LanguageFlavorChangedNotification.type,e)})),s.dataprotocol.registerConnectionProvider({providerId:t.providerId,connect:(e,n)=>t.sendRequest(l.ConnectionRequest.type,t.sqlc2p.asConnectionParams(e,n)).then((e=>e),(e=>(t.logFailedRequest(l.ConnectionRequest.type,e),Promise.resolve(!1)))),disconnect:e=>{let n={ownerUri:e};return t.sendRequest(l.DisconnectRequest.type,n).then((e=>e),(e=>(t.logFailedRequest(l.DisconnectRequest.type,e),Promise.resolve(!1))))},cancelConnect:e=>{let n={ownerUri:e};return t.sendRequest(l.CancelConnectRequest.type,n).then((e=>e),(e=>(t.logFailedRequest(l.CancelConnectRequest.type,e),Promise.resolve(!1))))},changeDatabase:(e,n)=>{let r={ownerUri:e,newDatabase:n};return t.sendRequest(l.ChangeDatabaseRequest.type,r).then((e=>e),(e=>(t.logFailedRequest(l.ChangeDatabaseRequest.type,e),Promise.resolve(!1))))},changePassword:(e,n,r)=>{let i={ownerUri:e,connection:{options:n.options},newPassword:r};return t.sendRequest(l.ChangePasswordRequest.type,i).then((e=>e),(e=>(t.logFailedRequest(l.ChangePasswordRequest.type,e),Promise.resolve(!1))))},listDatabases:e=>{let n={ownerUri:e};return t.sendRequest(l.ListDatabasesRequest.type,n).then((e=>e),(e=>(t.logFailedRequest(l.ListDatabasesRequest.type,e),Promise.resolve(void 0))))},getConnectionString:(e,n)=>{let r={ownerUri:e,includePassword:n};return t.sendRequest(l.GetConnectionStringRequest.type,r).then((e=>e),(e=>(t.logFailedRequest(l.GetConnectionStringRequest.type,e),Promise.resolve(void 0))))},buildConnectionInfo:e=>t.sendRequest(l.BuildConnectionInfoRequest.type,e).then((e=>e),(e=>(t.logFailedRequest(l.BuildConnectionInfoRequest.type,e),Promise.resolve(e)))),rebuildIntelliSenseCache:e=>{let n={ownerUri:e};return t.sendNotification(l.RebuildIntelliSenseNotification.type,n),Promise.resolve()},registerOnConnectionChanged:e=>i.event((t=>e({connectionUri:t.ownerUri,connection:t.connection}))),registerOnIntelliSenseCacheComplete:e=>r.event((t=>e(t.ownerUri))),registerOnConnectionComplete:e=>n.event(e)})}}t.ConnectionFeature=f,f.messagesTypes=[l.ConnectionRequest.type,l.ConnectionCompleteNotification.type,l.ConnectionChangedNotification.type,l.DisconnectRequest.type,l.CancelConnectRequest.type,l.ChangeDatabaseRequest.type,l.ListDatabasesRequest.type,l.GetConnectionStringRequest.type,l.LanguageFlavorChangedNotification.type,l.ChangePasswordRequest.type];class m extends p{constructor(e){super(e,m.messagesTypes)}fillClientCapabilities(e){d(d(e,"connection"),"query").dynamicRegistration=!0}initialize(e){this.register(this.messages,{id:o.generateUuid(),registerOptions:void 0})}registerProvider(e){const t=this._client,n=this.registerNotificationEmitter(l.QueryExecuteCompleteNotification.type),r=this.registerNotificationEmitter(l.QueryExecuteBatchStartNotification.type),i=this.registerNotificationEmitter(l.QueryExecuteBatchCompleteNotification.type),o=this.registerNotificationEmitter(l.QueryExecuteResultSetAvailableNotification.type),a=this.registerNotificationEmitter(l.QueryExecuteResultSetUpdatedNotification.type),c=this.registerNotificationEmitter(l.QueryExecuteMessageNotification.type),u=this.registerNotificationEmitter(l.EditSessionReadyNotification.type);return s.dataprotocol.registerQueryProvider({providerId:t.providerId,cancelQuery:e=>{let n={ownerUri:e};return t.sendRequest(l.QueryCancelRequest.type,n).then((e=>e),(e=>(t.logFailedRequest(l.QueryCancelRequest.type,e),Promise.reject(e))))},commitEdit:e=>{let n={ownerUri:e};return t.sendRequest(l.EditCommitRequest.type,n).then((e=>{}),(e=>(t.logFailedRequest(l.EditCommitRequest.type,e),Promise.reject(e))))},createRow:e=>{let n={ownerUri:e};return t.sendRequest(l.EditCreateRowRequest.type,n).then((e=>e),(e=>(t.logFailedRequest(l.EditCreateRowRequest.type,e),Promise.reject(e))))},deleteRow:(e,n)=>{let r={ownerUri:e,rowId:n};return t.sendRequest(l.EditDeleteRowRequest.type,r).then((e=>{}),(e=>(t.logFailedRequest(l.EditDeleteRowRequest.type,e),Promise.reject(e))))},disposeEdit:e=>{let n={ownerUri:e};return t.sendRequest(l.EditDisposeRequest.type,n).then((e=>{}),(e=>(t.logFailedRequest(l.EditDisposeRequest.type,e),Promise.reject(e))))},disposeQuery:e=>{let n={ownerUri:e};return t.sendRequest(l.QueryDisposeRequest.type,n).then((e=>{}),(e=>(t.logFailedRequest(l.QueryDisposeRequest.type,e),Promise.reject(e))))},connectionUriChanged:(e,n)=>{let r={newOwnerUri:e,originalOwnerUri:n};return t.sendNotification(l.ConnectionUriChangedNotification.type,r),Promise.resolve()},getEditRows:e=>t.sendRequest(l.EditSubsetRequest.type,e).then((e=>e),(e=>(t.logFailedRequest(l.EditSubsetRequest.type,e),Promise.reject(e)))),getQueryRows:e=>t.sendRequest(l.QueryExecuteSubsetRequest.type,e).then((e=>e),(e=>(t.logFailedRequest(l.QueryExecuteSubsetRequest.type,e),Promise.reject(e)))),setQueryExecutionOptions:(e,n)=>{let r={ownerUri:e,options:n};return t.sendRequest(l.QueryExecutionOptionsRequest.type,r).then((e=>{}),(e=>(t.logFailedRequest(l.QueryExecutionOptionsRequest.type,e),Promise.reject(e))))},initializeEdit:(e,n,r,i,o,s)=>{let a={ownerUri:e,schemaName:n,objectName:r,objectType:i,filters:{LimitResults:o},queryString:s};return t.sendRequest(l.EditInitializeRequest.type,a).then((e=>{}),(e=>(t.logFailedRequest(l.EditInitializeRequest.type,e),Promise.reject(e))))},registerOnBatchComplete:e=>i.event(e),registerOnBatchStart:e=>r.event(e),registerOnEditSessionReady:e=>u.event((t=>e(t.ownerUri,t.success,t.message))),registerOnMessage:e=>c.event(e),registerOnQueryComplete:e=>n.event(e),registerOnResultSetAvailable:e=>o.event(e),registerOnResultSetUpdated:e=>a.event(e),revertCell:(e,n,r)=>{let i={ownerUri:e,rowId:n,columnId:r};return t.sendRequest(l.EditRevertCellRequest.type,i).then((e=>e),(e=>(t.logFailedRequest(l.EditRevertCellRequest.type,e),Promise.reject(e))))},revertRow:(e,n)=>{let r={ownerUri:e,rowId:n};return t.sendRequest(l.EditRevertRowRequest.type,r).then((e=>{}),(e=>(t.logFailedRequest(l.EditRevertRowRequest.type,e),Promise.reject(e))))},runQuery:(e,n,r)=>{let i={ownerUri:e,querySelection:n,executionPlanOptions:t.sqlc2p.asExecutionPlanOptions(r)};return t.sendRequest(l.QueryExecuteRequest.type,i).then((e=>{}),(e=>(t.logFailedRequest(l.QueryExecuteRequest.type,e),Promise.reject(e))))},runQueryAndReturn:(e,n)=>{let r={ownerUri:e,queryString:n};return t.sendRequest(l.SimpleExecuteRequest.type,r).then((e=>e),(e=>(t.logFailedRequest(l.SimpleExecuteRequest.type,e),Promise.reject(e))))},parseSyntax:(e,n)=>{let r={ownerUri:e,query:n};return t.sendRequest(l.SyntaxParseRequest.type,r).then((e=>e),(e=>(t.logFailedRequest(l.SyntaxParseRequest.type,e),Promise.reject(e))))},runQueryStatement:(e,n,r)=>{let i={ownerUri:e,line:n,column:r};return t.sendRequest(l.QueryExecuteStatementRequest.type,i).then((e=>{}),(e=>(t.logFailedRequest(l.QueryExecuteStatementRequest.type,e),Promise.reject(e))))},runQueryString:(e,n)=>{let r={ownerUri:e,query:n};return t.sendRequest(l.QueryExecuteStringRequest.type,r).then((e=>{}),(e=>(t.logFailedRequest(l.QueryExecuteStringRequest.type,e),Promise.reject(e))))},saveResults:e=>{switch(e.resultFormat){case"csv":return t.sendRequest(l.SaveResultsAsCsvRequest.type,e).then(void 0,(e=>(t.logFailedRequest(l.SaveResultsAsCsvRequest.type,e),Promise.reject(e))));case"json":return t.sendRequest(l.SaveResultsAsJsonRequest.type,e).then(void 0,(e=>(t.logFailedRequest(l.SaveResultsAsJsonRequest.type,e),Promise.reject(e))));case"markdown":return t.sendRequest(l.SaveResultsAsMarkdownRequest.type,e).then(void 0,(e=>(t.logFailedRequest(l.SaveResultsAsMarkdownRequest.type,e),Promise.reject(e))));case"excel":return t.sendRequest(l.SaveResultsAsExcelRequest.type,e).then(void 0,(e=>(t.logFailedRequest(l.SaveResultsAsExcelRequest.type,e),Promise.reject(e))));case"xml":return t.sendRequest(l.SaveResultsAsXmlRequest.type,e).then(void 0,(e=>(t.logFailedRequest(l.SaveResultsAsXmlRequest.type,e),Promise.reject(e))));default:return Promise.reject("unsupported format")}},updateCell:(e,n,r,i)=>{let o={ownerUri:e,rowId:n,columnId:r,newValue:i};return t.sendRequest(l.EditUpdateCellRequest.type,o).then((e=>e),(e=>(t.logFailedRequest(l.EditUpdateCellRequest.type,e),Promise.reject(e))))},copyResults:e=>t.sendRequest(l.CopyResultsRequest.type,e).then((e=>{}),(e=>(t.logFailedRequest(l.CopyResultsRequest.type,e),Promise.reject(e))))})}}t.QueryFeature=m,m.messagesTypes=[l.QueryExecuteRequest.type,l.QueryCancelRequest.type,l.QueryExecuteStatementRequest.type,l.QueryExecuteStringRequest.type,l.SimpleExecuteRequest.type,l.QueryExecuteSubsetRequest.type,l.QueryDisposeRequest.type,l.ConnectionUriChangedNotification.type,l.QueryExecuteCompleteNotification.type,l.QueryExecuteBatchStartNotification.type,l.QueryExecuteBatchCompleteNotification.type,l.QueryExecuteResultSetAvailableNotification.type,l.QueryExecuteResultSetUpdatedNotification.type,l.QueryExecuteMessageNotification.type,l.QueryExecutionOptionsRequest.type,l.SaveResultsAsCsvRequest.type,l.SaveResultsAsJsonRequest.type,l.SaveResultsAsMarkdownRequest.type,l.SaveResultsAsExcelRequest.type,l.SaveResultsAsXmlRequest.type,l.CopyResultsRequest.type,l.EditCommitRequest.type,l.EditCreateRowRequest.type,l.EditDeleteRowRequest.type,l.EditDisposeRequest.type,l.EditInitializeRequest.type,l.EditRevertCellRequest.type,l.EditRevertRowRequest.type,l.EditUpdateCellRequest.type,l.EditSubsetRequest.type,l.EditSessionReadyNotification.type];class g extends p{constructor(e){super(e,g.messagesTypes)}fillClientCapabilities(e){d(d(e,"connection"),"metadata").dynamicRegistration=!0}initialize(e){this.register(this.messages,{id:o.generateUuid(),registerOptions:void 0})}registerProvider(e){const t=this._client;return s.dataprotocol.registerMetadataProvider({providerId:t.providerId,getDatabases:e=>{let n={ownerUri:e,includeDetails:!0};return t.sendRequest(l.ListDatabasesRequest.type,n).then((e=>e.databaseNames?e.databaseNames:e.databases),(e=>(t.logFailedRequest(l.ListDatabasesRequest.type,e),Promise.resolve(void 0))))},getMetadata:e=>{let n={ownerUri:e};return t.sendRequest(l.MetadataQueryRequest.type,n).then(t.sqlp2c.asProviderMetadata,(e=>(t.logFailedRequest(l.MetadataQueryRequest.type,e),Promise.resolve(void 0))))},getTableInfo:(e,n)=>{let r={objectName:n.name,ownerUri:e,schema:n.schema};return t.sendRequest(l.TableMetadataRequest.type,r).then((e=>e.columns),(e=>(t.logFailedRequest(l.TableMetadataRequest.type,e),Promise.resolve(void 0))))},getViewInfo:(e,n)=>{let r={objectName:n.name,ownerUri:e,schema:n.schema};return t.sendRequest(l.ViewMetadataRequest.type,r).then((e=>e.columns),(e=>(t.logFailedRequest(l.ViewMetadataRequest.type,e),Promise.resolve(void 0))))}})}}t.MetadataFeature=g,g.messagesTypes=[l.MetadataQueryRequest.type,l.ListDatabasesRequest.type,l.TableMetadataRequest.type,l.ViewMetadataRequest.type];class y extends p{constructor(e){super(e,y.messagesTypes)}fillClientCapabilities(e){d(d(e,"connection"),"adminServices").dynamicRegistration=!0}initialize(e){this.register(this.messages,{id:o.generateUuid(),registerOptions:void 0})}registerProvider(e){const t=this._client;return s.dataprotocol.registerAdminServicesProvider({providerId:t.providerId,createDatabase:(e,n)=>{let r={ownerUri:e,databaseInfo:n};return t.sendRequest(l.CreateDatabaseRequest.type,r).then((e=>e),(e=>(t.logFailedRequest(l.CreateDatabaseRequest.type,e),Promise.resolve(void 0))))},createLogin:(e,n)=>{let r={ownerUri:e,loginInfo:n};return t.sendRequest(l.CreateLoginRequest.type,r).then((e=>e),(e=>(t.logFailedRequest(l.CreateLoginRequest.type,e),Promise.resolve(void 0))))},getDatabaseInfo:e=>{let n={ownerUri:e};return t.sendRequest(l.GetDatabaseInfoRequest.type,n).then((e=>e.databaseInfo),(e=>(t.logFailedRequest(l.GetDatabaseInfoRequest.type,e),Promise.reject(e))))},getDefaultDatabaseInfo:e=>{let n={ownerUri:e};return t.sendRequest(l.DefaultDatabaseInfoRequest.type,n).then((e=>e.defaultDatabaseInfo),(e=>(t.logFailedRequest(l.DefaultDatabaseInfoRequest.type,e),Promise.resolve(void 0))))}})}}t.AdminServicesFeature=y,y.messagesTypes=[l.CreateDatabaseRequest.type,l.DefaultDatabaseInfoRequest.type,l.GetDatabaseInfoRequest.type,l.CreateLoginRequest.type];class b extends p{constructor(e){super(e,b.messagesTypes)}fillClientCapabilities(e){d(d(e,"connection"),"backup").dynamicRegistration=!0}initialize(e){this.register(this.messages,{id:o.generateUuid(),registerOptions:void 0})}registerProvider(e){const t=this._client;return s.dataprotocol.registerBackupProvider({providerId:t.providerId,backup:(e,n,r)=>{let i={ownerUri:e,backupInfo:n,taskExecutionMode:r};return t.sendRequest(l.BackupRequest.type,i).then((e=>e),(e=>(t.logFailedRequest(l.BackupRequest.type,e),Promise.resolve(void 0))))},getBackupConfigInfo:e=>{let n={ownerUri:e};return t.sendRequest(l.BackupConfigInfoRequest.type,n).then((e=>e.backupConfigInfo),(e=>(t.logFailedRequest(l.BackupConfigInfoRequest.type,e),Promise.resolve(void 0))))}})}}t.BackupFeature=b,b.messagesTypes=[l.BackupRequest.type,l.BackupConfigInfoRequest.type];class v extends p{constructor(e){super(e,v.messagesTypes)}fillClientCapabilities(e){d(d(e,"connection"),"restore").dynamicRegistration=!0}initialize(e){this.register(this.messages,{id:o.generateUuid(),registerOptions:void 0})}registerProvider(e){const t=this._client;return s.dataprotocol.registerRestoreProvider({providerId:t.providerId,cancelRestorePlan:(e,n)=>{let r={options:n.options,ownerUri:e,taskExecutionMode:n.taskExecutionMode};return t.sendRequest(l.CancelRestorePlanRequest.type,r).then((e=>e),(e=>(t.logFailedRequest(l.CancelRestorePlanRequest.type,e),Promise.resolve(void 0))))},getRestoreConfigInfo:e=>{let n={ownerUri:e};return t.sendRequest(l.RestoreConfigInfoRequest.type,n).then((e=>e),(e=>(t.logFailedRequest(l.RestoreConfigInfoRequest.type,e),Promise.resolve(void 0))))},getRestorePlan:(e,n)=>{let r={options:n.options,ownerUri:e,taskExecutionMode:n.taskExecutionMode};return t.sendRequest(l.RestorePlanRequest.type,r).then((e=>e),(e=>(t.logFailedRequest(l.RestorePlanRequest.type,e),Promise.resolve(void 0))))},restore:(e,n)=>{let r={options:n.options,ownerUri:e,taskExecutionMode:n.taskExecutionMode};return t.sendRequest(l.RestoreRequest.type,r).then((e=>e),(e=>(t.logFailedRequest(l.RestoreRequest.type,e),Promise.resolve(void 0))))}})}}t.RestoreFeature=v,v.messagesTypes=[l.RestorePlanRequest.type,l.RestoreRequest.type,l.RestoreConfigInfoRequest.type,l.CancelRestorePlanRequest.type];class S extends p{constructor(e){super(e,S.messagesTypes)}fillClientCapabilities(e){d(d(e,"connection"),"objectExplorer").dynamicRegistration=!0}initialize(e){this.register(this.messages,{id:o.generateUuid(),registerOptions:void 0})}registerProvider(e){const t=this._client,n=this.registerNotificationEmitter(l.ObjectExplorerCreateSessionCompleteNotification.type),r=this.registerNotificationEmitter(l.ObjectExplorerSessionDisconnectedNotification.type),i=this.registerNotificationEmitter(l.ObjectExplorerExpandCompleteNotification.type);return s.dataprotocol.registerObjectExplorerProvider({providerId:t.providerId,closeSession:e=>t.sendRequest(l.ObjectExplorerCloseSessionRequest.type,e).then((e=>e),(e=>(t.logFailedRequest(l.ObjectExplorerCloseSessionRequest.type,e),Promise.resolve(void 0)))),createNewSession:e=>t.sendRequest(l.ObjectExplorerCreateSessionRequest.type,e).then((e=>e),(e=>(t.logFailedRequest(l.ObjectExplorerCreateSessionRequest.type,e),Promise.resolve(void 0)))),expandNode:e=>t.sendRequest(l.ObjectExplorerExpandRequest.type,e).then((e=>e),(e=>(t.logFailedRequest(l.ObjectExplorerExpandRequest.type,e),Promise.resolve(void 0)))),refreshNode:e=>t.sendRequest(l.ObjectExplorerRefreshRequest.type,e).then((e=>e),(e=>(t.logFailedRequest(l.ObjectExplorerRefreshRequest.type,e),Promise.resolve(void 0)))),findNodes:e=>t.sendRequest(l.ObjectExplorerFindNodesRequest.type,e).then((e=>e),(e=>(t.logFailedRequest(l.ObjectExplorerFindNodesRequest.type,e),Promise.resolve(void 0)))),registerOnExpandCompleted:e=>i.event(e),registerOnSessionCreated:e=>n.event(e),registerOnSessionDisconnected:e=>r.event(e)})}}t.ObjectExplorerFeature=S,S.messagesTypes=[l.ObjectExplorerCreateSessionRequest.type,l.ObjectExplorerExpandRequest.type,l.ObjectExplorerRefreshRequest.type,l.ObjectExplorerCloseSessionRequest.type,l.ObjectExplorerCreateSessionCompleteNotification.type,l.ObjectExplorerExpandCompleteNotification.type,l.ObjectExplorerFindNodesRequest.type];class w extends p{constructor(e){super(e,w.messagesTypes)}fillClientCapabilities(e){d(d(e,"connection"),"scripting").dynamicRegistration=!0}initialize(e){this.register(this.messages,{id:o.generateUuid(),registerOptions:void 0})}registerProvider(e){const t=this._client,n=this.registerNotificationEmitter(l.ScriptingCompleteNotification.type);return s.dataprotocol.registerScriptingProvider({providerId:t.providerId,registerOnScriptingComplete:e=>n.event(e),scriptAsOperation:(e,n,r,i)=>t.sendRequest(l.ScriptingRequest.type,t.sqlc2p.asScriptingParams(e,n,r,i)).then((e=>e),(e=>(t.logFailedRequest(l.ScriptingRequest.type,e),Promise.reject(e))))})}}t.ScriptingFeature=w,w.messagesTypes=[l.ScriptingRequest.type,l.ScriptingCompleteNotification.type];class C extends p{constructor(e){super(e,C.messagesTypes)}fillClientCapabilities(e){d(d(e,"connection"),"taskServices").dynamicRegistration=!0}initialize(e){this.register(this.messages,{id:o.generateUuid(),registerOptions:void 0})}registerProvider(e){const t=this._client,n=this.registerNotificationEmitter(l.TaskCreatedNotification.type),r=this.registerNotificationEmitter(l.TaskStatusChangedNotification.type);return s.dataprotocol.registerTaskServicesProvider({providerId:t.providerId,cancelTask:e=>t.sendRequest(l.CancelTaskRequest.type,e).then((e=>e),(e=>(t.logFailedRequest(l.CancelTaskRequest.type,e),Promise.resolve(void 0)))),getAllTasks:e=>t.sendRequest(l.ListTasksRequest.type,e).then((e=>e),(e=>(t.logFailedRequest(l.ListTasksRequest.type,e),Promise.resolve(void 0)))),registerOnTaskCreated:e=>n.event(e),registerOnTaskStatusChanged:e=>r.event(e)})}}t.TaskServicesFeature=C,C.messagesTypes=[l.ListTasksRequest.type,l.CancelTaskRequest.type,l.TaskCreatedNotification.type,l.TaskStatusChangedNotification.type];class T extends p{constructor(e){super(e,T.messagesTypes)}fillClientCapabilities(e){d(d(e,"connection"),"fileBrowser").dynamicRegistration=!0}initialize(e){this.register(this.messages,{id:o.generateUuid(),registerOptions:void 0})}registerProvider(e){const t=this._client,n=this.registerNotificationEmitter(l.FileBrowserOpenedNotification.type),r=this.registerNotificationEmitter(l.FileBrowserExpandedNotification.type),i=this.registerNotificationEmitter(l.FileBrowserValidatedNotification.type);return s.dataprotocol.registerFileBrowserProvider({providerId:t.providerId,closeFileBrowser:e=>{let n={ownerUri:e};return t.sendRequest(l.FileBrowserCloseRequest.type,n).then((e=>e),(e=>(t.logFailedRequest(l.FileBrowserCloseRequest.type,e),Promise.resolve(void 0))))},expandFolderNode:(e,n)=>{let r={ownerUri:e,expandPath:n};return t.sendRequest(l.FileBrowserExpandRequest.type,r).then((e=>e),(e=>(t.logFailedRequest(l.FileBrowserExpandRequest.type,e),Promise.resolve(void 0))))},openFileBrowser:(e,n,r,i,o)=>{let s={ownerUri:e,expandPath:n,fileFilters:r,changeFilter:i,showFoldersOnly:o};return t.sendRequest(l.FileBrowserOpenRequest.type,s).then((e=>e),(e=>(t.logFailedRequest(l.FileBrowserOpenRequest.type,e),Promise.resolve(void 0))))},registerOnFileBrowserOpened:e=>n.event(e),registerOnFilePathsValidated:e=>i.event(e),registerOnFolderNodeExpanded:e=>r.event(e),validateFilePaths:(e,n,r)=>{let i={ownerUri:e,serviceType:n,selectedFiles:r};return t.sendRequest(l.FileBrowserValidateRequest.type,i).then((e=>e),(e=>(t.logFailedRequest(l.FileBrowserValidateRequest.type,e),Promise.resolve(void 0))))}})}}t.FileBrowserFeature=T,T.messagesTypes=[l.FileBrowserOpenRequest.type,l.FileBrowserOpenedNotification.type,l.FileBrowserExpandRequest.type,l.FileBrowserExpandedNotification.type,l.FileBrowserValidateRequest.type,l.FileBrowserValidatedNotification.type,l.FileBrowserCloseRequest.type];class E extends r.LanguageClient{constructor(e,t,n,r,o){let s;i.string(t)?(super(e,t,n,r,o),this._providerId=r.providerId,s=r.features):(super(e,t,n,r),this._providerId=n.providerId,s=n.features),this._sqlc2p=c.c2p,this._sqlp2c=u.p2c,this.registerSqlopsFeatures(s||E.defaultFeatures)}get sqlc2p(){return this._sqlc2p}get sqlp2c(){return this._sqlp2c}get providerId(){return this._providerId}registerSqlopsFeatures(e){e.map((e=>{this.registerFeature(new e(this))}))}}t.SqlOpsDataClient=E,E.defaultFeatures=[f,h,m,g,y,b,v,S,w,C,T],t.BaseService=class{constructor(e){this.client=e}runWithErrorHandling(e,t){return this.client.sendRequest(e,t).then((e=>e),(t=>(this.client.logFailedRequest(e,t),Promise.reject(t))))}}},4219:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MetadataQueryRequest=t.QueryExecutionOptionsRequest=t.QueryExecuteStringRequest=t.SimpleExecuteRequest=t.SyntaxParseRequest=t.CopyResultsRequest=t.SaveResultsAsXmlRequest=t.SaveResultsAsExcelRequest=t.SaveResultsAsMarkdownRequest=t.SaveResultsAsJsonRequest=t.SaveResultsAsCsvRequest=t.QueryExecuteStatementRequest=t.QueryExecuteSubsetRequest=t.QueryExecuteRequest=t.QueryExecuteMessageNotification=t.QueryExecuteResultSetUpdatedNotification=t.QueryExecuteResultSetAvailableNotification=t.QueryExecuteBatchCompleteNotification=t.QueryExecuteBatchStartNotification=t.QueryExecuteCompleteNotification=t.ConnectionUriChangedParams=t.ConnectionUriChangedNotification=t.QueryDisposeRequest=t.QueryCancelRequest=t.CapabiltiesDiscoveryRequest=t.CapabiltiesDiscoveryParams=t.IntelliSenseReadyNotification=t.ViewMetadataRequest=t.TableMetadataRequest=t.TableMetadataResult=t.TableMetadataParams=t.LanguageFlavorChangedNotification=t.BuildConnectionInfoRequest=t.GetConnectionStringRequest=t.GetConnectionStringParams=t.ListDatabasesRequest=t.ListDatabasesParams=t.ChangeDatabaseRequest=t.ChangeDatabaseParams=t.CancelConnectRequest=t.CancelConnectParams=t.DisconnectRequest=t.DisconnectParams=t.ChangePasswordRequest=t.ConnectionChangedNotification=t.ConnectionChangedParams=t.ConnectionCompleteNotification=t.ConnectionRequest=t.RebuildIntelliSenseParams=t.RebuildIntelliSenseNotification=void 0,t.FileBrowserCloseRequest=t.FileBrowserValidatedNotification=t.FileBrowserValidateRequest=t.FileBrowserExpandedNotification=t.FileBrowserExpandRequest=t.FileBrowserOpenedNotification=t.FileBrowserOpenRequest=t.RestoreConfigInfoRequest=t.CancelRestorePlanRequest=t.RestorePlanRequest=t.RestoreRequest=t.BackupConfigInfoRequest=t.BackupRequest=t.GetDatabaseInfoRequest=t.CreateLoginRequest=t.DefaultDatabaseInfoRequest=t.CreateDatabaseRequest=t.TaskCreatedNotification=t.TaskStatusChangedNotification=t.CancelTaskRequest=t.ListTasksRequest=t.ObjectExplorerExpandCompleteNotification=t.ObjectExplorerSessionDisconnectedNotification=t.ObjectExplorerCreateSessionCompleteNotification=t.ObjectExplorerFindNodesRequest=t.ObjectExplorerCloseSessionRequest=t.ObjectExplorerRefreshRequest=t.ObjectExplorerExpandRequest=t.ObjectExplorerCreateSessionRequest=t.EditSubsetRequest=t.EditUpdateCellRequest=t.EditSessionReadyNotification=t.EditRevertRowRequest=t.EditRevertCellRequest=t.EditInitializeRequest=t.EditDisposeRequest=t.EditDeleteRowRequest=t.EditCreateRowRequest=t.EditCommitRequest=t.ScriptingCompleteNotification=t.ScriptingRequest=void 0;const r=n(4382);(t.RebuildIntelliSenseNotification||(t.RebuildIntelliSenseNotification={})).type=new r.NotificationType("textDocument/rebuildIntelliSense"),t.RebuildIntelliSenseParams=class{},(t.ConnectionRequest||(t.ConnectionRequest={})).type=new r.RequestType("connection/connect"),(t.ConnectionCompleteNotification||(t.ConnectionCompleteNotification={})).type=new r.NotificationType("connection/complete"),t.ConnectionChangedParams=class{},(t.ConnectionChangedNotification||(t.ConnectionChangedNotification={})).type=new r.NotificationType("connection/connectionchanged"),(t.ChangePasswordRequest||(t.ChangePasswordRequest={})).type=new r.RequestType("connection/changepassword"),t.DisconnectParams=class{},(t.DisconnectRequest||(t.DisconnectRequest={})).type=new r.RequestType("connection/disconnect"),t.CancelConnectParams=class{},(t.CancelConnectRequest||(t.CancelConnectRequest={})).type=new r.RequestType("connection/cancelconnect"),t.ChangeDatabaseParams=class{},(t.ChangeDatabaseRequest||(t.ChangeDatabaseRequest={})).type=new r.RequestType("connection/changedatabase"),t.ListDatabasesParams=class{},(t.ListDatabasesRequest||(t.ListDatabasesRequest={})).type=new r.RequestType("connection/listdatabases"),t.GetConnectionStringParams=class{},(t.GetConnectionStringRequest||(t.GetConnectionStringRequest={})).type=new r.RequestType("connection/getconnectionstring"),(t.BuildConnectionInfoRequest||(t.BuildConnectionInfoRequest={})).type=new r.RequestType("connection/buildconnectioninfo"),(t.LanguageFlavorChangedNotification||(t.LanguageFlavorChangedNotification={})).type=new r.NotificationType("connection/languageflavorchanged"),t.TableMetadataParams=class{},t.TableMetadataResult=class{},(t.TableMetadataRequest||(t.TableMetadataRequest={})).type=new r.RequestType("metadata/table"),(t.ViewMetadataRequest||(t.ViewMetadataRequest={})).type=new r.RequestType("metadata/view"),(t.IntelliSenseReadyNotification||(t.IntelliSenseReadyNotification={})).type=new r.NotificationType("textDocument/intelliSenseReady"),t.CapabiltiesDiscoveryParams=class{},(t.CapabiltiesDiscoveryRequest||(t.CapabiltiesDiscoveryRequest={})).type=new r.RequestType("capabilities/list"),(t.QueryCancelRequest||(t.QueryCancelRequest={})).type=new r.RequestType("query/cancel"),(t.QueryDisposeRequest||(t.QueryDisposeRequest={})).type=new r.RequestType("query/dispose"),(t.ConnectionUriChangedNotification||(t.ConnectionUriChangedNotification={})).type=new r.NotificationType("query/connectionUriChanged"),t.ConnectionUriChangedParams=class{},(t.QueryExecuteCompleteNotification||(t.QueryExecuteCompleteNotification={})).type=new r.NotificationType("query/complete"),(t.QueryExecuteBatchStartNotification||(t.QueryExecuteBatchStartNotification={})).type=new r.NotificationType("query/batchStart"),(t.QueryExecuteBatchCompleteNotification||(t.QueryExecuteBatchCompleteNotification={})).type=new r.NotificationType("query/batchComplete"),(t.QueryExecuteResultSetAvailableNotification||(t.QueryExecuteResultSetAvailableNotification={})).type=new r.NotificationType("query/resultSetAvailable"),(t.QueryExecuteResultSetUpdatedNotification||(t.QueryExecuteResultSetUpdatedNotification={})).type=new r.NotificationType("query/resultSetUpdated"),(t.QueryExecuteMessageNotification||(t.QueryExecuteMessageNotification={})).type=new r.NotificationType("query/message"),(t.QueryExecuteRequest||(t.QueryExecuteRequest={})).type=new r.RequestType("query/executeDocumentSelection"),(t.QueryExecuteSubsetRequest||(t.QueryExecuteSubsetRequest={})).type=new r.RequestType("query/subset"),(t.QueryExecuteStatementRequest||(t.QueryExecuteStatementRequest={})).type=new r.RequestType("query/executedocumentstatement"),(t.SaveResultsAsCsvRequest||(t.SaveResultsAsCsvRequest={})).type=new r.RequestType("query/saveCsv"),(t.SaveResultsAsJsonRequest||(t.SaveResultsAsJsonRequest={})).type=new r.RequestType("query/saveJson"),(t.SaveResultsAsMarkdownRequest||(t.SaveResultsAsMarkdownRequest={})).type=new r.RequestType("query/saveMarkdown"),(t.SaveResultsAsExcelRequest||(t.SaveResultsAsExcelRequest={})).type=new r.RequestType("query/saveExcel"),(t.SaveResultsAsXmlRequest||(t.SaveResultsAsXmlRequest={})).type=new r.RequestType("query/saveXml"),(t.CopyResultsRequest||(t.CopyResultsRequest={})).type=new r.RequestType("query/copy"),(t.SyntaxParseRequest||(t.SyntaxParseRequest={})).type=new r.RequestType("query/syntaxparse"),(t.SimpleExecuteRequest||(t.SimpleExecuteRequest={})).type=new r.RequestType("query/simpleexecute"),(t.QueryExecuteStringRequest||(t.QueryExecuteStringRequest={})).type=new r.RequestType("query/executeString"),(t.QueryExecutionOptionsRequest||(t.QueryExecutionOptionsRequest={})).type=new r.RequestType("query/setexecutionoptions"),(t.MetadataQueryRequest||(t.MetadataQueryRequest={})).type=new r.RequestType("metadata/list"),(t.ScriptingRequest||(t.ScriptingRequest={})).type=new r.RequestType("scripting/script"),(t.ScriptingCompleteNotification||(t.ScriptingCompleteNotification={})).type=new r.NotificationType("scripting/scriptComplete"),(t.EditCommitRequest||(t.EditCommitRequest={})).type=new r.RequestType("edit/commit"),(t.EditCreateRowRequest||(t.EditCreateRowRequest={})).type=new r.RequestType("edit/createRow"),(t.EditDeleteRowRequest||(t.EditDeleteRowRequest={})).type=new r.RequestType("edit/deleteRow"),(t.EditDisposeRequest||(t.EditDisposeRequest={})).type=new r.RequestType("edit/dispose"),(t.EditInitializeRequest||(t.EditInitializeRequest={})).type=new r.RequestType("edit/initialize"),(t.EditRevertCellRequest||(t.EditRevertCellRequest={})).type=new r.RequestType("edit/revertCell"),(t.EditRevertRowRequest||(t.EditRevertRowRequest={})).type=new r.RequestType("edit/revertRow"),(t.EditSessionReadyNotification||(t.EditSessionReadyNotification={})).type=new r.NotificationType("edit/sessionReady"),(t.EditUpdateCellRequest||(t.EditUpdateCellRequest={})).type=new r.RequestType("edit/updateCell"),(t.EditSubsetRequest||(t.EditSubsetRequest={})).type=new r.RequestType("edit/subset"),(t.ObjectExplorerCreateSessionRequest||(t.ObjectExplorerCreateSessionRequest={})).type=new r.RequestType("objectexplorer/createsession"),(t.ObjectExplorerExpandRequest||(t.ObjectExplorerExpandRequest={})).type=new r.RequestType("objectexplorer/expand"),(t.ObjectExplorerRefreshRequest||(t.ObjectExplorerRefreshRequest={})).type=new r.RequestType("objectexplorer/refresh"),(t.ObjectExplorerCloseSessionRequest||(t.ObjectExplorerCloseSessionRequest={})).type=new r.RequestType("objectexplorer/closesession"),(t.ObjectExplorerFindNodesRequest||(t.ObjectExplorerFindNodesRequest={})).type=new r.RequestType("objectexplorer/findnodes"),(t.ObjectExplorerCreateSessionCompleteNotification||(t.ObjectExplorerCreateSessionCompleteNotification={})).type=new r.NotificationType("objectexplorer/sessioncreated"),(t.ObjectExplorerSessionDisconnectedNotification||(t.ObjectExplorerSessionDisconnectedNotification={})).type=new r.NotificationType("objectexplorer/sessiondisconnected"),(t.ObjectExplorerExpandCompleteNotification||(t.ObjectExplorerExpandCompleteNotification={})).type=new r.NotificationType("objectexplorer/expandCompleted"),(t.ListTasksRequest||(t.ListTasksRequest={})).type=new r.RequestType("tasks/listtasks"),(t.CancelTaskRequest||(t.CancelTaskRequest={})).type=new r.RequestType("tasks/canceltask"),(t.TaskStatusChangedNotification||(t.TaskStatusChangedNotification={})).type=new r.NotificationType("tasks/statuschanged"),(t.TaskCreatedNotification||(t.TaskCreatedNotification={})).type=new r.NotificationType("tasks/newtaskcreated"),(t.CreateDatabaseRequest||(t.CreateDatabaseRequest={})).type=new r.RequestType("admin/createdatabase"),(t.DefaultDatabaseInfoRequest||(t.DefaultDatabaseInfoRequest={})).type=new r.RequestType("admin/defaultdatabaseinfo"),(t.CreateLoginRequest||(t.CreateLoginRequest={})).type=new r.RequestType("admin/createlogin"),(t.GetDatabaseInfoRequest||(t.GetDatabaseInfoRequest={})).type=new r.RequestType("admin/getdatabaseinfo"),(t.BackupRequest||(t.BackupRequest={})).type=new r.RequestType("backup/backup"),(t.BackupConfigInfoRequest||(t.BackupConfigInfoRequest={})).type=new r.RequestType("backup/backupconfiginfo"),(t.RestoreRequest||(t.RestoreRequest={})).type=new r.RequestType("restore/restore"),(t.RestorePlanRequest||(t.RestorePlanRequest={})).type=new r.RequestType("restore/restoreplan"),(t.CancelRestorePlanRequest||(t.CancelRestorePlanRequest={})).type=new r.RequestType("restore/cancelrestoreplan"),(t.RestoreConfigInfoRequest||(t.RestoreConfigInfoRequest={})).type=new r.RequestType("restore/restoreconfiginfo"),(t.FileBrowserOpenRequest||(t.FileBrowserOpenRequest={})).type=new r.RequestType("filebrowser/open"),(t.FileBrowserOpenedNotification||(t.FileBrowserOpenedNotification={})).type=new r.NotificationType("filebrowser/opencomplete"),(t.FileBrowserExpandRequest||(t.FileBrowserExpandRequest={})).type=new r.RequestType("filebrowser/expand"),(t.FileBrowserExpandedNotification||(t.FileBrowserExpandedNotification={})).type=new r.NotificationType("filebrowser/expandcomplete"),(t.FileBrowserValidateRequest||(t.FileBrowserValidateRequest={})).type=new r.RequestType("filebrowser/validate"),(t.FileBrowserValidatedNotification||(t.FileBrowserValidatedNotification={})).type=new r.NotificationType("filebrowser/validatecomplete"),(t.FileBrowserCloseRequest||(t.FileBrowserCloseRequest={})).type=new r.RequestType("filebrowser/close")},1559:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.p2c=void 0;const r=n(235);function i(e){return"string"===e?r.ServiceOptionType.string:"multistring"===e?r.ServiceOptionType.multistring:"password"===e?r.ServiceOptionType.password:"number"===e?r.ServiceOptionType.number:"boolean"===e?r.ServiceOptionType.boolean:"category"===e?r.ServiceOptionType.category:"object"===e?r.ServiceOptionType.object:r.ServiceOptionType.string}function o(e){return{name:e.name,displayName:e.displayName?e.displayName:e.name,description:e.description,groupName:e.groupName,defaultValue:e.defaultValue,categoryValues:e.categoryValues,isRequired:e.isRequired,isArray:e.isArray,objectType:e.objectType,valueType:i(e.valueType)}}t.p2c={asProviderMetadata:function(e){let t=[];if(!e.metadata||!e.metadata.length)return{objectMetadata:t};for(let n=0;n<e.metadata.length;++n){let i,o=e.metadata[n];i=o.metadataTypeName?o.metadataTypeName:o.metadataType===r.MetadataType.View?"View":o.metadataType===r.MetadataType.SProc?"StoredProcedure":o.metadataType===r.MetadataType.Function?"Function":"Table",t.push({metadataTypeName:i,metadataType:o.metadataType,name:o.name,schema:o.schema,urn:o.urn})}return{objectMetadata:t}},asServerCapabilities:function(e){let t={protocolVersion:e.capabilities.protocolVersion,providerName:e.capabilities.providerName,providerDisplayName:e.capabilities.providerDisplayName,connectionProvider:void 0,adminServicesProvider:void 0,features:[]};if(e.capabilities.adminServicesProvider){if(t.adminServicesProvider={databaseInfoOptions:new Array,databaseFileInfoOptions:new Array,fileGroupInfoOptions:new Array},e.capabilities.adminServicesProvider.databaseInfoOptions&&e.capabilities.adminServicesProvider.databaseInfoOptions.length>0)for(let n=0;n<e.capabilities.adminServicesProvider.databaseInfoOptions.length;++n){let r=o(e.capabilities.adminServicesProvider.databaseInfoOptions[n]);t.adminServicesProvider.databaseInfoOptions.push(r)}if(e.capabilities.adminServicesProvider.databaseFileInfoOptions&&e.capabilities.adminServicesProvider.databaseFileInfoOptions.length>0)for(let n=0;n<e.capabilities.adminServicesProvider.databaseFileInfoOptions.length;++n){let r=o(e.capabilities.adminServicesProvider.databaseFileInfoOptions[n]);t.adminServicesProvider.databaseFileInfoOptions.push(r)}if(e.capabilities.adminServicesProvider.fileGroupInfoOptions&&e.capabilities.adminServicesProvider.fileGroupInfoOptions.length>0)for(let n=0;n<e.capabilities.adminServicesProvider.fileGroupInfoOptions.length;++n){let r=o(e.capabilities.adminServicesProvider.fileGroupInfoOptions[n]);t.adminServicesProvider.fileGroupInfoOptions.push(r)}}if(e.capabilities.connectionProvider&&e.capabilities.connectionProvider.options&&e.capabilities.connectionProvider.options.length>0){t.connectionProvider={options:new Array};for(let n=0;n<e.capabilities.connectionProvider.options.length;++n){let o=e.capabilities.connectionProvider.options[n],s={name:o.name,displayName:o.displayName?o.displayName:o.name,description:o.description,groupName:o.groupName,defaultValue:o.defaultValue,categoryValues:o.categoryValues,isIdentity:o.isIdentity,isRequired:o.isRequired,valueType:i(o.valueType),specialValueType:void 0};"serverName"===o.specialValueType?s.specialValueType=r.ConnectionOptionSpecialType.serverName:"databaseName"===o.specialValueType?s.specialValueType=r.ConnectionOptionSpecialType.databaseName:"authType"===o.specialValueType?s.specialValueType=r.ConnectionOptionSpecialType.authType:"userName"===o.specialValueType?s.specialValueType=r.ConnectionOptionSpecialType.userName:"password"===o.specialValueType?s.specialValueType=r.ConnectionOptionSpecialType.password:"appName"===o.specialValueType&&(s.specialValueType=r.ConnectionOptionSpecialType.appName),t.connectionProvider.options.push(s)}}return e.capabilities.features&&e.capabilities.features.length>0&&e.capabilities.features.forEach((e=>{let n={enabled:e.enabled,featureName:e.featureName,optionsMetadata:[]};t.features.push(n),e.optionsMetadata&&e.optionsMetadata.forEach((e=>{n.optionsMetadata.push(o(e))}))})),t}}},7833:(e,t,n)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const n="color: "+this.color;t.splice(1,0,n,"color: inherit");let r=0,i=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(r++,"%c"===e&&(i=r))})),t.splice(i,0,n)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&"undefined"!=typeof process&&"env"in process&&(e=process.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=n(736)(t);const{formatters:r}=e.exports;r.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},736:(e,t,n)=>{e.exports=function(e){function t(e){let n,i,o,s=null;function a(...e){if(!a.enabled)return;const r=a,i=Number(new Date),o=i-(n||i);r.diff=o,r.prev=n,r.curr=i,n=i,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((n,i)=>{if("%%"===n)return"%";s++;const o=t.formatters[i];if("function"==typeof o){const t=e[s];n=o.call(r,t),e.splice(s,1),s--}return n})),t.formatArgs.call(r,e),(r.log||t.log).apply(r,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=r,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(i!==t.namespaces&&(i=t.namespaces,o=t.enabled(e)),o),set:e=>{s=e}}),"function"==typeof t.init&&t.init(a),a}function r(e,n){const r=t(this.namespace+(void 0===n?":":n)+e);return r.log=this.log,r}function i(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){const e=[...t.names.map(i),...t.skips.map(i).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let n;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const r=("string"==typeof e?e:"").split(/[\s,]+/),i=r.length;for(n=0;n<i;n++)r[n]&&("-"===(e=r[n].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1},t.humanize=n(6585),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((n=>{t[n]=e[n]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let n=0;for(let t=0;t<e.length;t++)n=(n<<5)-n+e.charCodeAt(t),n|=0;return t.colors[Math.abs(n)%t.colors.length]},t.enable(t.load()),t}},5753:(e,t,n)=>{"undefined"==typeof process||"renderer"===process.type||!0===process.browser||process.__nwjs?e.exports=n(7833):e.exports=n(6033)},6033:(e,t,n)=>{const r=n(2018),i=n(9023);t.init=function(e){e.inspectOpts={};const n=Object.keys(t.inspectOpts);for(let r=0;r<n.length;r++)e.inspectOpts[n[r]]=t.inspectOpts[n[r]]},t.log=function(...e){return process.stderr.write(i.format(...e)+"\n")},t.formatArgs=function(n){const{namespace:r,useColors:i}=this;if(i){const t=this.color,i="[3"+(t<8?t:"8;5;"+t),o=`  ${i};1m${r} `;n[0]=o+n[0].split("\n").join("\n"+o),n.push(i+"m+"+e.exports.humanize(this.diff)+"")}else n[0]=(t.inspectOpts.hideDate?"":(new Date).toISOString()+" ")+r+" "+n[0]},t.save=function(e){e?process.env.DEBUG=e:delete process.env.DEBUG},t.load=function(){return process.env.DEBUG},t.useColors=function(){return"colors"in t.inspectOpts?Boolean(t.inspectOpts.colors):r.isatty(process.stderr.fd)},t.destroy=i.deprecate((()=>{}),"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),t.colors=[6,2,3,4,5,1];try{const e=n(7687);e&&(e.stderr||e).level>=2&&(t.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}t.inspectOpts=Object.keys(process.env).filter((e=>/^debug_/i.test(e))).reduce(((e,t)=>{const n=t.substring(6).toLowerCase().replace(/_([a-z])/g,((e,t)=>t.toUpperCase()));let r=process.env[t];return r=!!/^(yes|on|true|enabled)$/i.test(r)||!/^(no|off|false|disabled)$/i.test(r)&&("null"===r?null:Number(r)),e[n]=r,e}),{}),e.exports=n(736)(t);const{formatters:o}=e.exports;o.o=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts).split("\n").map((e=>e.trim())).join(" ")},o.O=function(e){return this.inspectOpts.colors=this.useColors,i.inspect(e,this.inspectOpts)}},3011:(e,t,n)=>{var r;!function(i){var o=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},s=10;function a(){this._events={},this._conf&&c.call(this,this._conf)}function c(e){e?(this._conf=e,e.delimiter&&(this.delimiter=e.delimiter),this._maxListeners=e.maxListeners!==i?e.maxListeners:s,e.wildcard&&(this.wildcard=e.wildcard),e.newListener&&(this._newListener=e.newListener),e.removeListener&&(this._removeListener=e.removeListener),e.verboseMemoryLeak&&(this.verboseMemoryLeak=e.verboseMemoryLeak),this.wildcard&&(this.listenerTree={})):this._maxListeners=s}function l(e,t){var n="(node) warning: possible EventEmitter memory leak detected. "+e+" listeners added. Use emitter.setMaxListeners() to increase limit.";if(this.verboseMemoryLeak&&(n+=" Event name: "+t+"."),"undefined"!=typeof process&&process.emitWarning){var r=new Error(n);r.name="MaxListenersExceededWarning",r.emitter=this,r.count=e,process.emitWarning(r)}else console.error(n),console.trace&&console.trace()}function u(e){this._events={},this._newListener=!1,this._removeListener=!1,this.verboseMemoryLeak=!1,c.call(this,e)}function d(e,t,n,r){if(!n)return[];var i,o,s,a,c,l,u,p=[],h=t.length,f=t[r],m=t[r+1];if(r===h&&n._listeners){if("function"==typeof n._listeners)return e&&e.push(n._listeners),[n];for(i=0,o=n._listeners.length;i<o;i++)e&&e.push(n._listeners[i]);return[n]}if("*"===f||"**"===f||n[f]){if("*"===f){for(s in n)"_listeners"!==s&&n.hasOwnProperty(s)&&(p=p.concat(d(e,t,n[s],r+1)));return p}if("**"===f){for(s in(u=r+1===h||r+2===h&&"*"===m)&&n._listeners&&(p=p.concat(d(e,t,n,h))),n)"_listeners"!==s&&n.hasOwnProperty(s)&&("*"===s||"**"===s?(n[s]._listeners&&!u&&(p=p.concat(d(e,t,n[s],h))),p=p.concat(d(e,t,n[s],r))):p=s===m?p.concat(d(e,t,n[s],r+2)):p.concat(d(e,t,n[s],r)));return p}p=p.concat(d(e,t,n[f],r+1))}if((a=n["*"])&&d(e,t,a,r+1),c=n["**"])if(r<h)for(s in c._listeners&&d(e,t,c,h),c)"_listeners"!==s&&c.hasOwnProperty(s)&&(s===m?d(e,t,c[s],r+2):s===f?d(e,t,c[s],r+1):((l={})[s]=c[s],d(e,t,{"**":l},r+1)));else c._listeners?d(e,t,c,h):c["*"]&&c["*"]._listeners&&d(e,t,c["*"],h);return p}function p(e,t){for(var n=0,r=(e="string"==typeof e?e.split(this.delimiter):e.slice()).length;n+1<r;n++)if("**"===e[n]&&"**"===e[n+1])return;for(var o=this.listenerTree,s=e.shift();s!==i;){if(o[s]||(o[s]={}),o=o[s],0===e.length)return o._listeners?("function"==typeof o._listeners&&(o._listeners=[o._listeners]),o._listeners.push(t),!o._listeners.warned&&this._maxListeners>0&&o._listeners.length>this._maxListeners&&(o._listeners.warned=!0,l.call(this,o._listeners.length,s))):o._listeners=t,!0;s=e.shift()}return!0}u.EventEmitter2=u,u.prototype.delimiter=".",u.prototype.setMaxListeners=function(e){e!==i&&(this._maxListeners=e,this._conf||(this._conf={}),this._conf.maxListeners=e)},u.prototype.event="",u.prototype.once=function(e,t){return this._once(e,t,!1)},u.prototype.prependOnceListener=function(e,t){return this._once(e,t,!0)},u.prototype._once=function(e,t,n){return this._many(e,1,t,n),this},u.prototype.many=function(e,t,n){return this._many(e,t,n,!1)},u.prototype.prependMany=function(e,t,n){return this._many(e,t,n,!0)},u.prototype._many=function(e,t,n,r){var i=this;if("function"!=typeof n)throw new Error("many only accepts instances of Function");function o(){return 0==--t&&i.off(e,o),n.apply(this,arguments)}return o._origin=n,this._on(e,o,r),i},u.prototype.emit=function(){this._events||a.call(this);var e=arguments[0];if("newListener"===e&&!this._newListener&&!this._events.newListener)return!1;var t,n,r,i,o,s=arguments.length;if(this._all&&this._all.length){if(o=this._all.slice(),s>3)for(t=new Array(s),i=0;i<s;i++)t[i]=arguments[i];for(r=0,n=o.length;r<n;r++)switch(this.event=e,s){case 1:o[r].call(this,e);break;case 2:o[r].call(this,e,arguments[1]);break;case 3:o[r].call(this,e,arguments[1],arguments[2]);break;default:o[r].apply(this,t)}}if(this.wildcard){o=[];var c="string"==typeof e?e.split(this.delimiter):e.slice();d.call(this,o,c,this.listenerTree,0)}else{if("function"==typeof(o=this._events[e])){switch(this.event=e,s){case 1:o.call(this);break;case 2:o.call(this,arguments[1]);break;case 3:o.call(this,arguments[1],arguments[2]);break;default:for(t=new Array(s-1),i=1;i<s;i++)t[i-1]=arguments[i];o.apply(this,t)}return!0}o&&(o=o.slice())}if(o&&o.length){if(s>3)for(t=new Array(s-1),i=1;i<s;i++)t[i-1]=arguments[i];for(r=0,n=o.length;r<n;r++)switch(this.event=e,s){case 1:o[r].call(this);break;case 2:o[r].call(this,arguments[1]);break;case 3:o[r].call(this,arguments[1],arguments[2]);break;default:o[r].apply(this,t)}return!0}if(!this._all&&"error"===e)throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");return!!this._all},u.prototype.emitAsync=function(){this._events||a.call(this);var e=arguments[0];if("newListener"===e&&!this._newListener&&!this._events.newListener)return Promise.resolve([!1]);var t,n,r,i,o,s=[],c=arguments.length;if(this._all){if(c>3)for(t=new Array(c),i=1;i<c;i++)t[i]=arguments[i];for(r=0,n=this._all.length;r<n;r++)switch(this.event=e,c){case 1:s.push(this._all[r].call(this,e));break;case 2:s.push(this._all[r].call(this,e,arguments[1]));break;case 3:s.push(this._all[r].call(this,e,arguments[1],arguments[2]));break;default:s.push(this._all[r].apply(this,t))}}if(this.wildcard){o=[];var l="string"==typeof e?e.split(this.delimiter):e.slice();d.call(this,o,l,this.listenerTree,0)}else o=this._events[e];if("function"==typeof o)switch(this.event=e,c){case 1:s.push(o.call(this));break;case 2:s.push(o.call(this,arguments[1]));break;case 3:s.push(o.call(this,arguments[1],arguments[2]));break;default:for(t=new Array(c-1),i=1;i<c;i++)t[i-1]=arguments[i];s.push(o.apply(this,t))}else if(o&&o.length){if(o=o.slice(),c>3)for(t=new Array(c-1),i=1;i<c;i++)t[i-1]=arguments[i];for(r=0,n=o.length;r<n;r++)switch(this.event=e,c){case 1:s.push(o[r].call(this));break;case 2:s.push(o[r].call(this,arguments[1]));break;case 3:s.push(o[r].call(this,arguments[1],arguments[2]));break;default:s.push(o[r].apply(this,t))}}else if(!this._all&&"error"===e)return arguments[1]instanceof Error?Promise.reject(arguments[1]):Promise.reject("Uncaught, unspecified 'error' event.");return Promise.all(s)},u.prototype.on=function(e,t){return this._on(e,t,!1)},u.prototype.prependListener=function(e,t){return this._on(e,t,!0)},u.prototype.onAny=function(e){return this._onAny(e,!1)},u.prototype.prependAny=function(e){return this._onAny(e,!0)},u.prototype.addListener=u.prototype.on,u.prototype._onAny=function(e,t){if("function"!=typeof e)throw new Error("onAny only accepts instances of Function");return this._all||(this._all=[]),t?this._all.unshift(e):this._all.push(e),this},u.prototype._on=function(e,t,n){if("function"==typeof e)return this._onAny(e,t),this;if("function"!=typeof t)throw new Error("on only accepts instances of Function");return this._events||a.call(this),this._newListener&&this.emit("newListener",e,t),this.wildcard?(p.call(this,e,t),this):(this._events[e]?("function"==typeof this._events[e]&&(this._events[e]=[this._events[e]]),n?this._events[e].unshift(t):this._events[e].push(t),!this._events[e].warned&&this._maxListeners>0&&this._events[e].length>this._maxListeners&&(this._events[e].warned=!0,l.call(this,this._events[e].length,e))):this._events[e]=t,this)},u.prototype.off=function(e,t){if("function"!=typeof t)throw new Error("removeListener only takes instances of Function");var n,r=[];if(this.wildcard){var s="string"==typeof e?e.split(this.delimiter):e.slice();r=d.call(this,null,s,this.listenerTree,0)}else{if(!this._events[e])return this;n=this._events[e],r.push({_listeners:n})}for(var a=0;a<r.length;a++){var c=r[a];if(n=c._listeners,o(n)){for(var l=-1,u=0,p=n.length;u<p;u++)if(n[u]===t||n[u].listener&&n[u].listener===t||n[u]._origin&&n[u]._origin===t){l=u;break}if(l<0)continue;return this.wildcard?c._listeners.splice(l,1):this._events[e].splice(l,1),0===n.length&&(this.wildcard?delete c._listeners:delete this._events[e]),this._removeListener&&this.emit("removeListener",e,t),this}(n===t||n.listener&&n.listener===t||n._origin&&n._origin===t)&&(this.wildcard?delete c._listeners:delete this._events[e],this._removeListener&&this.emit("removeListener",e,t))}return function e(t){if(t!==i){var n=Object.keys(t);for(var r in n){var o=n[r],s=t[o];s instanceof Function||"object"!=typeof s||null===s||(Object.keys(s).length>0&&e(t[o]),0===Object.keys(s).length&&delete t[o])}}}(this.listenerTree),this},u.prototype.offAny=function(e){var t,n=0,r=0;if(e&&this._all&&this._all.length>0){for(n=0,r=(t=this._all).length;n<r;n++)if(e===t[n])return t.splice(n,1),this._removeListener&&this.emit("removeListenerAny",e),this}else{if(t=this._all,this._removeListener)for(n=0,r=t.length;n<r;n++)this.emit("removeListenerAny",t[n]);this._all=[]}return this},u.prototype.removeListener=u.prototype.off,u.prototype.removeAllListeners=function(e){if(e===i)return!this._events||a.call(this),this;if(this.wildcard)for(var t="string"==typeof e?e.split(this.delimiter):e.slice(),n=d.call(this,null,t,this.listenerTree,0),r=0;r<n.length;r++)n[r]._listeners=null;else this._events&&(this._events[e]=null);return this},u.prototype.listeners=function(e){if(this.wildcard){var t=[],n="string"==typeof e?e.split(this.delimiter):e.slice();return d.call(this,t,n,this.listenerTree,0),t}return this._events||a.call(this),this._events[e]||(this._events[e]=[]),o(this._events[e])||(this._events[e]=[this._events[e]]),this._events[e]},u.prototype.eventNames=function(){return Object.keys(this._events)},u.prototype.listenerCount=function(e){return this.listeners(e).length},u.prototype.listenersAny=function(){return this._all?this._all:[]},(r=function(){return u}.call(t,n,t,e))===i||(e.exports=r)}()},6454:(e,t,n)=>{"use strict";const r=n(3918),i=n(2923),o=n(8904);e.exports={XMLParser:i,XMLValidator:r,XMLBuilder:o}},5334:(e,t)=>{"use strict";const n=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",r="["+n+"]["+n+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*",i=new RegExp("^"+r+"$");t.isExist=function(e){return void 0!==e},t.isEmptyObject=function(e){return 0===Object.keys(e).length},t.merge=function(e,t,n){if(t){const r=Object.keys(t),i=r.length;for(let o=0;o<i;o++)e[r[o]]="strict"===n?[t[r[o]]]:t[r[o]]}},t.getValue=function(e){return t.isExist(e)?e:""},t.isName=function(e){return!(null==i.exec(e))},t.getAllMatches=function(e,t){const n=[];let r=t.exec(e);for(;r;){const i=[];i.startIndex=t.lastIndex-r[0].length;const o=r.length;for(let e=0;e<o;e++)i.push(r[e]);n.push(i),r=t.exec(e)}return n},t.nameRegexp=r},3918:(e,t,n)=>{"use strict";const r=n(5334),i={allowBooleanAttributes:!1,unpairedTags:[]};function o(e){return" "===e||"\t"===e||"\n"===e||"\r"===e}function s(e,t){const n=t;for(;t<e.length;t++)if("?"!=e[t]&&" "!=e[t]);else{const r=e.substr(n,t-n);if(t>5&&"xml"===r)return f("InvalidXml","XML declaration allowed only at the start of the document.",g(e,t));if("?"==e[t]&&">"==e[t+1]){t++;break}}return t}function a(e,t){if(e.length>t+5&&"-"===e[t+1]&&"-"===e[t+2]){for(t+=3;t<e.length;t++)if("-"===e[t]&&"-"===e[t+1]&&">"===e[t+2]){t+=2;break}}else if(e.length>t+8&&"D"===e[t+1]&&"O"===e[t+2]&&"C"===e[t+3]&&"T"===e[t+4]&&"Y"===e[t+5]&&"P"===e[t+6]&&"E"===e[t+7]){let n=1;for(t+=8;t<e.length;t++)if("<"===e[t])n++;else if(">"===e[t]&&(n--,0===n))break}else if(e.length>t+9&&"["===e[t+1]&&"C"===e[t+2]&&"D"===e[t+3]&&"A"===e[t+4]&&"T"===e[t+5]&&"A"===e[t+6]&&"["===e[t+7])for(t+=8;t<e.length;t++)if("]"===e[t]&&"]"===e[t+1]&&">"===e[t+2]){t+=2;break}return t}t.validate=function(e,t){t=Object.assign({},i,t);const n=[];let c=!1,l=!1;"\ufeff"===e[0]&&(e=e.substr(1));for(let i=0;i<e.length;i++)if("<"===e[i]&&"?"===e[i+1]){if(i+=2,i=s(e,i),i.err)return i}else{if("<"!==e[i]){if(o(e[i]))continue;return f("InvalidChar","char '"+e[i]+"' is not expected.",g(e,i))}{let m=i;if(i++,"!"===e[i]){i=a(e,i);continue}{let y=!1;"/"===e[i]&&(y=!0,i++);let b="";for(;i<e.length&&">"!==e[i]&&" "!==e[i]&&"\t"!==e[i]&&"\n"!==e[i]&&"\r"!==e[i];i++)b+=e[i];if(b=b.trim(),"/"===b[b.length-1]&&(b=b.substring(0,b.length-1),i--),d=b,!r.isName(d)){let t;return t=0===b.trim().length?"Invalid space after '<'.":"Tag '"+b+"' is an invalid name.",f("InvalidTag",t,g(e,i))}const v=u(e,i);if(!1===v)return f("InvalidAttr","Attributes for '"+b+"' have open quote.",g(e,i));let S=v.value;if(i=v.index,"/"===S[S.length-1]){const n=i-S.length;S=S.substring(0,S.length-1);const r=p(S,t);if(!0!==r)return f(r.err.code,r.err.msg,g(e,n+r.err.line));c=!0}else if(y){if(!v.tagClosed)return f("InvalidTag","Closing tag '"+b+"' doesn't have proper closing.",g(e,i));if(S.trim().length>0)return f("InvalidTag","Closing tag '"+b+"' can't have attributes or invalid starting.",g(e,m));{const t=n.pop();if(b!==t.tagName){let n=g(e,t.tagStartPos);return f("InvalidTag","Expected closing tag '"+t.tagName+"' (opened in line "+n.line+", col "+n.col+") instead of closing tag '"+b+"'.",g(e,m))}0==n.length&&(l=!0)}}else{const r=p(S,t);if(!0!==r)return f(r.err.code,r.err.msg,g(e,i-S.length+r.err.line));if(!0===l)return f("InvalidXml","Multiple possible root nodes found.",g(e,i));-1!==t.unpairedTags.indexOf(b)||n.push({tagName:b,tagStartPos:m}),c=!0}for(i++;i<e.length;i++)if("<"===e[i]){if("!"===e[i+1]){i++,i=a(e,i);continue}if("?"!==e[i+1])break;if(i=s(e,++i),i.err)return i}else if("&"===e[i]){const t=h(e,i);if(-1==t)return f("InvalidChar","char '&' is not expected.",g(e,i));i=t}else if(!0===l&&!o(e[i]))return f("InvalidXml","Extra text at the end",g(e,i));"<"===e[i]&&i--}}}var d;return c?1==n.length?f("InvalidTag","Unclosed tag '"+n[0].tagName+"'.",g(e,n[0].tagStartPos)):!(n.length>0)||f("InvalidXml","Invalid '"+JSON.stringify(n.map((e=>e.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):f("InvalidXml","Start tag expected.",1)};const c='"',l="'";function u(e,t){let n="",r="",i=!1;for(;t<e.length;t++){if(e[t]===c||e[t]===l)""===r?r=e[t]:r!==e[t]||(r="");else if(">"===e[t]&&""===r){i=!0;break}n+=e[t]}return""===r&&{value:n,index:t,tagClosed:i}}const d=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function p(e,t){const n=r.getAllMatches(e,d),i={};for(let e=0;e<n.length;e++){if(0===n[e][1].length)return f("InvalidAttr","Attribute '"+n[e][2]+"' has no space in starting.",y(n[e]));if(void 0!==n[e][3]&&void 0===n[e][4])return f("InvalidAttr","Attribute '"+n[e][2]+"' is without value.",y(n[e]));if(void 0===n[e][3]&&!t.allowBooleanAttributes)return f("InvalidAttr","boolean attribute '"+n[e][2]+"' is not allowed.",y(n[e]));const r=n[e][2];if(!m(r))return f("InvalidAttr","Attribute '"+r+"' is an invalid name.",y(n[e]));if(i.hasOwnProperty(r))return f("InvalidAttr","Attribute '"+r+"' is repeated.",y(n[e]));i[r]=1}return!0}function h(e,t){if(";"===e[++t])return-1;if("#"===e[t])return function(e,t){let n=/\d/;for("x"===e[t]&&(t++,n=/[\da-fA-F]/);t<e.length;t++){if(";"===e[t])return t;if(!e[t].match(n))break}return-1}(e,++t);let n=0;for(;t<e.length;t++,n++)if(!(e[t].match(/\w/)&&n<20)){if(";"===e[t])break;return-1}return t}function f(e,t,n){return{err:{code:e,msg:t,line:n.line||n,col:n.col}}}function m(e){return r.isName(e)}function g(e,t){const n=e.substring(0,t).split(/\r?\n/);return{line:n.length,col:n[n.length-1].length+1}}function y(e){return e.startIndex+e[1].length}},8904:(e,t,n)=>{"use strict";const r=n(2788),i={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:"  ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function o(e){this.options=Object.assign({},i,e),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=c),this.processTextOrObjNode=s,this.options.format?(this.indentate=a,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function s(e,t,n){const r=this.j2x(e,n+1);return void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextValNode(e[this.options.textNodeName],t,r.attrStr,n):this.buildObjectNode(r.val,t,r.attrStr,n)}function a(e){return this.options.indentBy.repeat(e)}function c(e){return!!e.startsWith(this.options.attributeNamePrefix)&&e.substr(this.attrPrefixLen)}o.prototype.build=function(e){return this.options.preserveOrder?r(e,this.options):(Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e}),this.j2x(e,0).val)},o.prototype.j2x=function(e,t){let n="",r="";for(let i in e)if(void 0===e[i]);else if(null===e[i])"?"===i[0]?r+=this.indentate(t)+"<"+i+"?"+this.tagEndChar:r+=this.indentate(t)+"<"+i+"/"+this.tagEndChar;else if(e[i]instanceof Date)r+=this.buildTextValNode(e[i],i,"",t);else if("object"!=typeof e[i]){const o=this.isAttribute(i);if(o)n+=this.buildAttrPairStr(o,""+e[i]);else if(i===this.options.textNodeName){let t=this.options.tagValueProcessor(i,""+e[i]);r+=this.replaceEntitiesValue(t)}else r+=this.buildTextValNode(e[i],i,"",t)}else if(Array.isArray(e[i])){const n=e[i].length;let o="";for(let s=0;s<n;s++){const n=e[i][s];void 0===n||(null===n?"?"===i[0]?r+=this.indentate(t)+"<"+i+"?"+this.tagEndChar:r+=this.indentate(t)+"<"+i+"/"+this.tagEndChar:"object"==typeof n?this.options.oneListGroup?o+=this.j2x(n,t+1).val:o+=this.processTextOrObjNode(n,i,t):o+=this.buildTextValNode(n,i,"",t))}this.options.oneListGroup&&(o=this.buildObjectNode(o,i,"",t)),r+=o}else if(this.options.attributesGroupName&&i===this.options.attributesGroupName){const t=Object.keys(e[i]),r=t.length;for(let o=0;o<r;o++)n+=this.buildAttrPairStr(t[o],""+e[i][t[o]])}else r+=this.processTextOrObjNode(e[i],i,t);return{attrStr:n,val:r}},o.prototype.buildAttrPairStr=function(e,t){return t=this.options.attributeValueProcessor(e,""+t),t=this.replaceEntitiesValue(t),this.options.suppressBooleanAttributes&&"true"===t?" "+e:" "+e+'="'+t+'"'},o.prototype.buildObjectNode=function(e,t,n,r){if(""===e)return"?"===t[0]?this.indentate(r)+"<"+t+n+"?"+this.tagEndChar:this.indentate(r)+"<"+t+n+this.closeTag(t)+this.tagEndChar;{let i="</"+t+this.tagEndChar,o="";return"?"===t[0]&&(o="?",i=""),n&&-1===e.indexOf("<")?this.indentate(r)+"<"+t+n+o+">"+e+i:!1!==this.options.commentPropName&&t===this.options.commentPropName&&0===o.length?this.indentate(r)+`\x3c!--${e}--\x3e`+this.newLine:this.indentate(r)+"<"+t+n+o+this.tagEndChar+e+this.indentate(r)+i}},o.prototype.closeTag=function(e){let t="";return-1!==this.options.unpairedTags.indexOf(e)?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`></${e}`,t},o.prototype.buildTextValNode=function(e,t,n,r){if(!1!==this.options.cdataPropName&&t===this.options.cdataPropName)return this.indentate(r)+`<![CDATA[${e}]]>`+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(r)+`\x3c!--${e}--\x3e`+this.newLine;if("?"===t[0])return this.indentate(r)+"<"+t+n+"?"+this.tagEndChar;{let i=this.options.tagValueProcessor(t,e);return i=this.replaceEntitiesValue(i),""===i?this.indentate(r)+"<"+t+n+this.closeTag(t)+this.tagEndChar:this.indentate(r)+"<"+t+n+">"+i+"</"+t+this.tagEndChar}},o.prototype.replaceEntitiesValue=function(e){if(e&&e.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){const n=this.options.entities[t];e=e.replace(n.regex,n.val)}return e},e.exports=o},2788:e=>{function t(e,s,a,c){let l="",u=!1;for(let d=0;d<e.length;d++){const p=e[d],h=n(p);let f="";if(f=0===a.length?h:`${a}.${h}`,h===s.textNodeName){let e=p[h];i(f,s)||(e=s.tagValueProcessor(h,e),e=o(e,s)),u&&(l+=c),l+=e,u=!1;continue}if(h===s.cdataPropName){u&&(l+=c),l+=`<![CDATA[${p[h][0][s.textNodeName]}]]>`,u=!1;continue}if(h===s.commentPropName){l+=c+`\x3c!--${p[h][0][s.textNodeName]}--\x3e`,u=!0;continue}if("?"===h[0]){const e=r(p[":@"],s),t="?xml"===h?"":c;let n=p[h][0][s.textNodeName];n=0!==n.length?" "+n:"",l+=t+`<${h}${n}${e}?>`,u=!0;continue}let m=c;""!==m&&(m+=s.indentBy);const g=c+`<${h}${r(p[":@"],s)}`,y=t(p[h],s,f,m);-1!==s.unpairedTags.indexOf(h)?s.suppressUnpairedNode?l+=g+">":l+=g+"/>":y&&0!==y.length||!s.suppressEmptyNode?y&&y.endsWith(">")?l+=g+`>${y}${c}</${h}>`:(l+=g+">",y&&""!==c&&(y.includes("/>")||y.includes("</"))?l+=c+s.indentBy+y+c:l+=y,l+=`</${h}>`):l+=g+"/>",u=!0}return l}function n(e){const t=Object.keys(e);for(let e=0;e<t.length;e++){const n=t[e];if(":@"!==n)return n}}function r(e,t){let n="";if(e&&!t.ignoreAttributes)for(let r in e){let i=t.attributeValueProcessor(r,e[r]);i=o(i,t),!0===i&&t.suppressBooleanAttributes?n+=` ${r.substr(t.attributeNamePrefix.length)}`:n+=` ${r.substr(t.attributeNamePrefix.length)}="${i}"`}return n}function i(e,t){let n=(e=e.substr(0,e.length-t.textNodeName.length-1)).substr(e.lastIndexOf(".")+1);for(let r in t.stopNodes)if(t.stopNodes[r]===e||t.stopNodes[r]==="*."+n)return!0;return!1}function o(e,t){if(e&&e.length>0&&t.processEntities)for(let n=0;n<t.entities.length;n++){const r=t.entities[n];e=e.replace(r.regex,r.val)}return e}e.exports=function(e,n){let r="";return n.format&&n.indentBy.length>0&&(r="\n"),t(e,n,"",r)}},9400:(e,t,n)=>{const r=n(5334);function i(e,t){let n="";for(;t<e.length&&"'"!==e[t]&&'"'!==e[t];t++)n+=e[t];if(n=n.trim(),-1!==n.indexOf(" "))throw new Error("External entites are not supported");const r=e[t++];let i="";for(;t<e.length&&e[t]!==r;t++)i+=e[t];return[n,i,t]}function o(e,t){return"!"===e[t+1]&&"-"===e[t+2]&&"-"===e[t+3]}function s(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"N"===e[t+3]&&"T"===e[t+4]&&"I"===e[t+5]&&"T"===e[t+6]&&"Y"===e[t+7]}function a(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"L"===e[t+3]&&"E"===e[t+4]&&"M"===e[t+5]&&"E"===e[t+6]&&"N"===e[t+7]&&"T"===e[t+8]}function c(e,t){return"!"===e[t+1]&&"A"===e[t+2]&&"T"===e[t+3]&&"T"===e[t+4]&&"L"===e[t+5]&&"I"===e[t+6]&&"S"===e[t+7]&&"T"===e[t+8]}function l(e,t){return"!"===e[t+1]&&"N"===e[t+2]&&"O"===e[t+3]&&"T"===e[t+4]&&"A"===e[t+5]&&"T"===e[t+6]&&"I"===e[t+7]&&"O"===e[t+8]&&"N"===e[t+9]}function u(e){if(r.isName(e))return e;throw new Error(`Invalid entity name ${e}`)}e.exports=function(e,t){const n={};if("O"!==e[t+3]||"C"!==e[t+4]||"T"!==e[t+5]||"Y"!==e[t+6]||"P"!==e[t+7]||"E"!==e[t+8])throw new Error("Invalid Tag instead of DOCTYPE");{t+=9;let r=1,d=!1,p=!1,h="";for(;t<e.length;t++)if("<"!==e[t]||p)if(">"===e[t]){if(p?"-"===e[t-1]&&"-"===e[t-2]&&(p=!1,r--):r--,0===r)break}else"["===e[t]?d=!0:h+=e[t];else{if(d&&s(e,t))t+=7,[entityName,val,t]=i(e,t+1),-1===val.indexOf("&")&&(n[u(entityName)]={regx:RegExp(`&${entityName};`,"g"),val});else if(d&&a(e,t))t+=8;else if(d&&c(e,t))t+=8;else if(d&&l(e,t))t+=9;else{if(!o)throw new Error("Invalid DOCTYPE");p=!0}r++,h=""}if(0!==r)throw new Error("Unclosed DOCTYPE")}return{entities:n,i:t}}},460:(e,t)=>{const n={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,n){return e}};t.buildOptions=function(e){return Object.assign({},n,e)},t.defaultOptions=n},7680:(e,t,n)=>{"use strict";const r=n(5334),i=n(1451),o=n(9400),s=n(7983);function a(e){const t=Object.keys(e);for(let n=0;n<t.length;n++){const r=t[n];this.lastEntities[r]={regex:new RegExp("&"+r+";","g"),val:e[r]}}}function c(e,t,n,r,i,o,s){if(void 0!==e&&(this.options.trimValues&&!r&&(e=e.trim()),e.length>0)){s||(e=this.replaceEntitiesValue(e));const r=this.options.tagValueProcessor(t,e,n,i,o);return null==r?e:typeof r!=typeof e||r!==e?r:this.options.trimValues||e.trim()===e?S(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function l(e){if(this.options.removeNSPrefix){const t=e.split(":"),n="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=n+t[1])}return e}"<((!\\[CDATA\\[([\\s\\S]*?)(]]>))|((NAME:)?(NAME))([^>]*)>|((\\/)(NAME)\\s*>))([^<]*)".replace(/NAME/g,r.nameRegexp);const u=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function d(e,t,n){if(!this.options.ignoreAttributes&&"string"==typeof e){const n=r.getAllMatches(e,u),i=n.length,o={};for(let e=0;e<i;e++){const r=this.resolveNameSpace(n[e][1]);let i=n[e][4],s=this.options.attributeNamePrefix+r;if(r.length)if(this.options.transformAttributeName&&(s=this.options.transformAttributeName(s)),"__proto__"===s&&(s="#__proto__"),void 0!==i){this.options.trimValues&&(i=i.trim()),i=this.replaceEntitiesValue(i);const e=this.options.attributeValueProcessor(r,i,t);o[s]=null==e?i:typeof e!=typeof i||e!==i?e:S(i,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(o[s]=!0)}if(!Object.keys(o).length)return;if(this.options.attributesGroupName){const e={};return e[this.options.attributesGroupName]=o,e}return o}}const p=function(e){e=e.replace(/\r\n?/g,"\n");const t=new i("!xml");let n=t,r="",s="";for(let a=0;a<e.length;a++)if("<"===e[a])if("/"===e[a+1]){const t=y(e,">",a,"Closing Tag is not closed.");let i=e.substring(a+2,t).trim();if(this.options.removeNSPrefix){const e=i.indexOf(":");-1!==e&&(i=i.substr(e+1))}this.options.transformTagName&&(i=this.options.transformTagName(i)),n&&(r=this.saveTextToParentTag(r,n,s));const o=s.substring(s.lastIndexOf(".")+1);if(i&&-1!==this.options.unpairedTags.indexOf(i))throw new Error(`Unpaired tag can not be used as closing tag: </${i}>`);let c=0;o&&-1!==this.options.unpairedTags.indexOf(o)?(c=s.lastIndexOf(".",s.lastIndexOf(".")-1),this.tagsNodeStack.pop()):c=s.lastIndexOf("."),s=s.substring(0,c),n=this.tagsNodeStack.pop(),r="",a=t}else if("?"===e[a+1]){let t=b(e,a,!1,"?>");if(!t)throw new Error("Pi Tag is not closed.");if(r=this.saveTextToParentTag(r,n,s),this.options.ignoreDeclaration&&"?xml"===t.tagName||this.options.ignorePiTags);else{const e=new i(t.tagName);e.add(this.options.textNodeName,""),t.tagName!==t.tagExp&&t.attrExpPresent&&(e[":@"]=this.buildAttributesMap(t.tagExp,s,t.tagName)),this.addChild(n,e,s)}a=t.closeIndex+1}else if("!--"===e.substr(a+1,3)){const t=y(e,"--\x3e",a+4,"Comment is not closed.");if(this.options.commentPropName){const i=e.substring(a+4,t-2);r=this.saveTextToParentTag(r,n,s),n.add(this.options.commentPropName,[{[this.options.textNodeName]:i}])}a=t}else if("!D"===e.substr(a+1,2)){const t=o(e,a);this.docTypeEntities=t.entities,a=t.i}else if("!["===e.substr(a+1,2)){const t=y(e,"]]>",a,"CDATA is not closed.")-2,i=e.substring(a+9,t);if(r=this.saveTextToParentTag(r,n,s),this.options.cdataPropName)n.add(this.options.cdataPropName,[{[this.options.textNodeName]:i}]);else{let e=this.parseTextData(i,n.tagname,s,!0,!1,!0);null==e&&(e=""),n.add(this.options.textNodeName,e)}a=t+2}else{let o=b(e,a,this.options.removeNSPrefix),c=o.tagName,l=o.tagExp,u=o.attrExpPresent,d=o.closeIndex;this.options.transformTagName&&(c=this.options.transformTagName(c)),n&&r&&"!xml"!==n.tagname&&(r=this.saveTextToParentTag(r,n,s,!1));const p=n;if(p&&-1!==this.options.unpairedTags.indexOf(p.tagname)&&(n=this.tagsNodeStack.pop(),s=s.substring(0,s.lastIndexOf("."))),c!==t.tagname&&(s+=s?"."+c:c),this.isItStopNode(this.options.stopNodes,s,c)){let t="";if(l.length>0&&l.lastIndexOf("/")===l.length-1)a=o.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(c))a=o.closeIndex;else{const n=this.readStopNodeData(e,c,d+1);if(!n)throw new Error(`Unexpected end of ${c}`);a=n.i,t=n.tagContent}const r=new i(c);c!==l&&u&&(r[":@"]=this.buildAttributesMap(l,s,c)),t&&(t=this.parseTextData(t,c,s,!0,u,!0,!0)),s=s.substr(0,s.lastIndexOf(".")),r.add(this.options.textNodeName,t),this.addChild(n,r,s)}else{if(l.length>0&&l.lastIndexOf("/")===l.length-1){"/"===c[c.length-1]?(c=c.substr(0,c.length-1),l=c):l=l.substr(0,l.length-1),this.options.transformTagName&&(c=this.options.transformTagName(c));const e=new i(c);c!==l&&u&&(e[":@"]=this.buildAttributesMap(l,s,c)),this.addChild(n,e,s),s=s.substr(0,s.lastIndexOf("."))}else{const e=new i(c);this.tagsNodeStack.push(n),c!==l&&u&&(e[":@"]=this.buildAttributesMap(l,s,c)),this.addChild(n,e,s),n=e}r="",a=d}}else r+=e[a];return t.child};function h(e,t,n){const r=this.options.updateTag(t.tagname,n,t[":@"]);!1===r||("string"==typeof r?(t.tagname=r,e.addChild(t)):e.addChild(t))}const f=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){const n=this.docTypeEntities[t];e=e.replace(n.regx,n.val)}for(let t in this.lastEntities){const n=this.lastEntities[t];e=e.replace(n.regex,n.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const n=this.htmlEntities[t];e=e.replace(n.regex,n.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function m(e,t,n,r){return e&&(void 0===r&&(r=0===Object.keys(t.child).length),void 0!==(e=this.parseTextData(e,t.tagname,n,!1,!!t[":@"]&&0!==Object.keys(t[":@"]).length,r))&&""!==e&&t.add(this.options.textNodeName,e),e=""),e}function g(e,t,n){const r="*."+n;for(const n in e){const i=e[n];if(r===i||t===i)return!0}return!1}function y(e,t,n,r){const i=e.indexOf(t,n);if(-1===i)throw new Error(r);return i+t.length-1}function b(e,t,n,r=">"){const i=function(e,t,n=">"){let r,i="";for(let o=t;o<e.length;o++){let t=e[o];if(r)t===r&&(r="");else if('"'===t||"'"===t)r=t;else if(t===n[0]){if(!n[1])return{data:i,index:o};if(e[o+1]===n[1])return{data:i,index:o}}else"\t"===t&&(t=" ");i+=t}}(e,t+1,r);if(!i)return;let o=i.data;const s=i.index,a=o.search(/\s/);let c=o,l=!0;if(-1!==a&&(c=o.substr(0,a).replace(/\s\s*$/,""),o=o.substr(a+1)),n){const e=c.indexOf(":");-1!==e&&(c=c.substr(e+1),l=c!==i.data.substr(e+1))}return{tagName:c,tagExp:o,closeIndex:s,attrExpPresent:l}}function v(e,t,n){const r=n;let i=1;for(;n<e.length;n++)if("<"===e[n])if("/"===e[n+1]){const o=y(e,">",n,`${t} is not closed`);if(e.substring(n+2,o).trim()===t&&(i--,0===i))return{tagContent:e.substring(r,n),i:o};n=o}else if("?"===e[n+1])n=y(e,"?>",n+1,"StopNode is not closed.");else if("!--"===e.substr(n+1,3))n=y(e,"--\x3e",n+3,"StopNode is not closed.");else if("!["===e.substr(n+1,2))n=y(e,"]]>",n,"StopNode is not closed.")-2;else{const r=b(e,n,">");r&&((r&&r.tagName)===t&&"/"!==r.tagExp[r.tagExp.length-1]&&i++,n=r.closeIndex)}}function S(e,t,n){if(t&&"string"==typeof e){const t=e.trim();return"true"===t||"false"!==t&&s(e,n)}return r.isExist(e)?e:""}e.exports=class{constructor(e){this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"}},this.addExternalEntities=a,this.parseXml=p,this.parseTextData=c,this.resolveNameSpace=l,this.buildAttributesMap=d,this.isItStopNode=g,this.replaceEntitiesValue=f,this.readStopNodeData=v,this.saveTextToParentTag=m,this.addChild=h}}},2923:(e,t,n)=>{const{buildOptions:r}=n(460),i=n(7680),{prettify:o}=n(5629),s=n(3918);e.exports=class{constructor(e){this.externalEntities={},this.options=r(e)}parse(e,t){if("string"==typeof e);else{if(!e.toString)throw new Error("XML data is accepted in String or Bytes[] form.");e=e.toString()}if(t){!0===t&&(t={});const n=s.validate(e,t);if(!0!==n)throw Error(`${n.err.msg}:${n.err.line}:${n.err.col}`)}const n=new i(this.options);n.addExternalEntities(this.externalEntities);const r=n.parseXml(e);return this.options.preserveOrder||void 0===r?r:o(r,this.options)}addEntity(e,t){if(-1!==t.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==e.indexOf("&")||-1!==e.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if("&"===t)throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=t}}},5629:(e,t)=>{"use strict";function n(e,t,s){let a;const c={};for(let l=0;l<e.length;l++){const u=e[l],d=r(u);let p="";if(p=void 0===s?d:s+"."+d,d===t.textNodeName)void 0===a?a=u[d]:a+=""+u[d];else{if(void 0===d)continue;if(u[d]){let e=n(u[d],t,p);const r=o(e,t);u[":@"]?i(e,u[":@"],p,t):1!==Object.keys(e).length||void 0===e[t.textNodeName]||t.alwaysCreateTextNode?0===Object.keys(e).length&&(t.alwaysCreateTextNode?e[t.textNodeName]="":e=""):e=e[t.textNodeName],void 0!==c[d]&&c.hasOwnProperty(d)?(Array.isArray(c[d])||(c[d]=[c[d]]),c[d].push(e)):t.isArray(d,p,r)?c[d]=[e]:c[d]=e}}}return"string"==typeof a?a.length>0&&(c[t.textNodeName]=a):void 0!==a&&(c[t.textNodeName]=a),c}function r(e){const t=Object.keys(e);for(let e=0;e<t.length;e++){const n=t[e];if(":@"!==n)return n}}function i(e,t,n,r){if(t){const i=Object.keys(t),o=i.length;for(let s=0;s<o;s++){const o=i[s];r.isArray(o,n+"."+o,!0,!0)?e[o]=[t[o]]:e[o]=t[o]}}}function o(e,t){const{textNodeName:n}=t,r=Object.keys(e).length;return 0===r||!(1!==r||!e[n]&&"boolean"!=typeof e[n]&&0!==e[n])}t.prettify=function(e,t){return n(e,t)}},1451:e=>{"use strict";e.exports=class{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){"__proto__"===e&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e){"__proto__"===e.tagname&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child})}}},3070:(e,t,n)=>{var r=n(9896),i=n(9023),o=n(2203),s=o.Readable,a=o.Writable,c=o.PassThrough,l=n(1436),u=n(4434).EventEmitter;function d(e,t){t=t||{},u.call(this),this.fd=e,this.pend=new l,this.pend.max=1,this.refCount=0,this.autoClose=!!t.autoClose}function p(e,t){t=t||{},s.call(this,t),this.context=e,this.context.ref(),this.start=t.start||0,this.endOffset=t.end,this.pos=this.start,this.destroyed=!1}function h(e,t){t=t||{},a.call(this,t),this.context=e,this.context.ref(),this.start=t.start||0,this.endOffset=null==t.end?1/0:+t.end,this.bytesWritten=0,this.pos=this.start,this.destroyed=!1,this.on("finish",this.destroy.bind(this))}function f(e,t){u.call(this),t=t||{},this.refCount=0,this.buffer=e,this.maxChunkSize=t.maxChunkSize||Number.MAX_SAFE_INTEGER}t.createFromBuffer=function(e,t){return new f(e,t)},t.createFromFd=function(e,t){return new d(e,t)},t.BufferSlicer=f,t.FdSlicer=d,i.inherits(d,u),d.prototype.read=function(e,t,n,i,o){var s=this;s.pend.go((function(a){r.read(s.fd,e,t,n,i,(function(e,t,n){a(),o(e,t,n)}))}))},d.prototype.write=function(e,t,n,i,o){var s=this;s.pend.go((function(a){r.write(s.fd,e,t,n,i,(function(e,t,n){a(),o(e,t,n)}))}))},d.prototype.createReadStream=function(e){return new p(this,e)},d.prototype.createWriteStream=function(e){return new h(this,e)},d.prototype.ref=function(){this.refCount+=1},d.prototype.unref=function(){var e=this;if(e.refCount-=1,!(e.refCount>0)){if(e.refCount<0)throw new Error("invalid unref");e.autoClose&&r.close(e.fd,(function(t){t?e.emit("error",t):e.emit("close")}))}},i.inherits(p,s),p.prototype._read=function(e){var t=this;if(!t.destroyed){var n=Math.min(t._readableState.highWaterMark,e);if(null!=t.endOffset&&(n=Math.min(n,t.endOffset-t.pos)),n<=0)return t.destroyed=!0,t.push(null),void t.context.unref();t.context.pend.go((function(e){if(t.destroyed)return e();var i=new Buffer(n);r.read(t.context.fd,i,0,n,t.pos,(function(n,r){n?t.destroy(n):0===r?(t.destroyed=!0,t.push(null),t.context.unref()):(t.pos+=r,t.push(i.slice(0,r))),e()}))}))}},p.prototype.destroy=function(e){this.destroyed||(e=e||new Error("stream destroyed"),this.destroyed=!0,this.emit("error",e),this.context.unref())},i.inherits(h,a),h.prototype._write=function(e,t,n){var i=this;if(!i.destroyed){if(i.pos+e.length>i.endOffset){var o=new Error("maximum file length exceeded");return o.code="ETOOBIG",i.destroy(),void n(o)}i.context.pend.go((function(t){if(i.destroyed)return t();r.write(i.context.fd,e,0,e.length,i.pos,(function(e,r){e?(i.destroy(),t(),n(e)):(i.bytesWritten+=r,i.pos+=r,i.emit("progress"),t(),n())}))}))}},h.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.context.unref())},i.inherits(f,u),f.prototype.read=function(e,t,n,r,i){var o=r+n,s=o-this.buffer.length,a=s>0?s:n;this.buffer.copy(e,t,r,o),setImmediate((function(){i(null,a)}))},f.prototype.write=function(e,t,n,r,i){e.copy(this.buffer,r,t,t+n),setImmediate((function(){i(null,n,e)}))},f.prototype.createReadStream=function(e){var t=new c(e=e||{});t.destroyed=!1,t.start=e.start||0,t.endOffset=e.end,t.pos=t.endOffset||this.buffer.length;for(var n=this.buffer.slice(t.start,t.pos),r=0;;){var i=r+this.maxChunkSize;if(i>=n.length){r<n.length&&t.write(n.slice(r,n.length));break}t.write(n.slice(r,i)),r=i}return t.end(),t.destroy=function(){t.destroyed=!0},t},f.prototype.createWriteStream=function(e){var t=this,n=new a(e=e||{});return n.start=e.start||0,n.endOffset=null==e.end?this.buffer.length:+e.end,n.bytesWritten=0,n.pos=n.start,n.destroyed=!1,n._write=function(e,r,i){if(!n.destroyed){var o=n.pos+e.length;if(o>n.endOffset){var s=new Error("maximum file length exceeded");return s.code="ETOOBIG",n.destroyed=!0,void i(s)}e.copy(t.buffer,n.pos,0,e.length),n.bytesWritten+=e.length,n.pos=o,n.emit("progress"),i()}},n.destroy=function(){n.destroyed=!0},n},f.prototype.ref=function(){this.refCount+=1},f.prototype.unref=function(){if(this.refCount-=1,this.refCount<0)throw new Error("invalid unref")}},1203:(e,t,n)=>{var r,i,o=n(9896),s=n(6928),a=n(111),c=n(9023),l=n(3215);function u(e,t){var n=o.statSync(e).mtime.getTime();return r>n+1e3*t}function d(e){return e&&e.hasOwnProperty("limit")}function p(e){return e&&e.hasOwnProperty("totalRemoved")}function h(e){return p(e)?e.totalRemoved:-2}function f(e){return h(e)>=function(e){return d(e)?e.limit:-1}(e)}function m(e){return e&&e.hasOwnProperty("maxLevel")}function g(e){return m(e)?e.maxLevel:-1}function y(e){return e&&e.age&&e.age.seconds?e.age.seconds:null}var b=e.exports=function(e,t,n){var v={};if(!f(t)&&o.existsSync(e)){var S=g(t),w=!1;if(d(t)&&(t.totalRemoved=p(t)?h(t):0),void 0===n?n=0:n++,n<1?(r=(new Date).getTime(),i=function(e){return!(!e||!e.hasOwnProperty("test"))&&e.test}(t)):w=function(e,t,n){var r=!1,i=t&&t.dir;if(i){var o=y(t),a=s.basename(e);c.isArray(i)?r=1!==i.indexOf("*")||-1!==i.indexOf(a):a!==i&&"*"!==i||(r=!0),r&&d(t)&&(r=!f(t)),r&&m(t)&&n>0&&(r=n<=g(t)),o&&r&&(r=u(e,o))}return r}(e,t,n),(-1===S||n<S)&&o.readdirSync(e).forEach((function(r){var l,h=s.join(e,r),m=!1;try{l=o.statSync(h)}catch(e){m=!0}if(m);else if(l.isDirectory()){var g=b(h,t,n);v=a(v,g),p(t)&&(t.totalRemoved+=Object.keys(g).length)}else if(function(e,t){var n=!1,r=t&&t.extensions?t.extensions:null,i=t&&t.files?t.files:null,o=t&&t.prefix?t.prefix:null,a=(t&&t.dir&&t.dir,t&&t.ignore?t.ignore:null),l=s.basename(e);if(i&&(n=c.isArray(i)?-1!==i.indexOf("*.*")||-1!==i.indexOf(l):"*.*"===i||l===i),!n&&r){var p=s.extname(e);n=c.isArray(r)?-1!==r.indexOf(p):p===r}if(!n&&o&&(n=0===l.indexOf(o)),n&&d(t)&&(n=!f(t)),n&&a&&(n=c.isArray(a)?!(-1!==a.indexOf(l)):!(l===a)),n){var h=y(t);h&&(n=u(e,h))}return n}(h,t)){var S;if(i)S=!0;else try{o.unlinkSync(h),S=!0}catch(e){}S&&(v[h]=!0,p(t)&&t.totalRemoved++)}})),w)try{i||l.sync(e),p(t)||(v[e]=!0)}catch(e){throw e}}return v}},3215:(e,t,n)=>{e.exports=p,p.sync=y;var r=n(2613),i=n(6928),o=n(9896),s=n(3577),a=parseInt("666",8),c={nosort:!0,silent:!0},l=0,u="win32"===process.platform;function d(e){["unlink","chmod","stat","lstat","rmdir","readdir"].forEach((function(t){e[t]=e[t]||o[t],e[t+="Sync"]=e[t]||o[t]})),e.maxBusyTries=e.maxBusyTries||3,e.emfileWait=e.emfileWait||1e3,!1===e.glob&&(e.disableGlob=!0),e.disableGlob=e.disableGlob||!1,e.glob=e.glob||c}function p(e,t,n){"function"==typeof t&&(n=t,t={}),r(e,"rimraf: missing path"),r.equal(typeof e,"string","rimraf: path should be a string"),r.equal(typeof n,"function","rimraf: callback function required"),r(t,"rimraf: invalid options argument provided"),r.equal(typeof t,"object","rimraf: options should be object"),d(t);var i=0,o=null,a=0;if(t.disableGlob||!s.hasMagic(e))return c(null,[e]);function c(e,r){return e?n(e):0===(a=r.length)?n():void r.forEach((function(e){h(e,t,(function r(s){if(s){if(("EBUSY"===s.code||"ENOTEMPTY"===s.code||"EPERM"===s.code)&&i<t.maxBusyTries)return i++,setTimeout((function(){h(e,t,r)}),100*i);if("EMFILE"===s.code&&l<t.emfileWait)return setTimeout((function(){h(e,t,r)}),l++);"ENOENT"===s.code&&(s=null)}l=0,function(e){o=o||e,0==--a&&n(o)}(s)}))}))}t.lstat(e,(function(n,r){if(!n)return c(null,[e]);s(e,t.glob,c)}))}function h(e,t,n){r(e),r(t),r("function"==typeof n),t.lstat(e,(function(r,i){return r&&"ENOENT"===r.code?n(null):(r&&"EPERM"===r.code&&u&&f(e,t,r,n),i&&i.isDirectory()?g(e,t,r,n):void t.unlink(e,(function(r){if(r){if("ENOENT"===r.code)return n(null);if("EPERM"===r.code)return u?f(e,t,r,n):g(e,t,r,n);if("EISDIR"===r.code)return g(e,t,r,n)}return n(r)})))}))}function f(e,t,n,i){r(e),r(t),r("function"==typeof i),n&&r(n instanceof Error),t.chmod(e,a,(function(r){r?i("ENOENT"===r.code?null:n):t.stat(e,(function(r,o){r?i("ENOENT"===r.code?null:n):o.isDirectory()?g(e,t,n,i):t.unlink(e,i)}))}))}function m(e,t,n){r(e),r(t),n&&r(n instanceof Error);try{t.chmodSync(e,a)}catch(e){if("ENOENT"===e.code)return;throw n}try{var i=t.statSync(e)}catch(e){if("ENOENT"===e.code)return;throw n}i.isDirectory()?b(e,t,n):t.unlinkSync(e)}function g(e,t,n,o){r(e),r(t),n&&r(n instanceof Error),r("function"==typeof o),t.rmdir(e,(function(s){!s||"ENOTEMPTY"!==s.code&&"EEXIST"!==s.code&&"EPERM"!==s.code?s&&"ENOTDIR"===s.code?o(n):o(s):function(e,t,n){r(e),r(t),r("function"==typeof n),t.readdir(e,(function(r,o){if(r)return n(r);var s,a=o.length;if(0===a)return t.rmdir(e,n);o.forEach((function(r){p(i.join(e,r),t,(function(r){if(!s)return r?n(s=r):void(0==--a&&t.rmdir(e,n))}))}))}))}(e,t,o)}))}function y(e,t){var n;if(d(t=t||{}),r(e,"rimraf: missing path"),r.equal(typeof e,"string","rimraf: path should be a string"),r(t,"rimraf: missing options"),r.equal(typeof t,"object","rimraf: options should be object"),t.disableGlob||!s.hasMagic(e))n=[e];else try{t.lstatSync(e),n=[e]}catch(r){n=s.sync(e,t.glob)}if(n.length)for(var i=0;i<n.length;i++){e=n[i];try{var o=t.lstatSync(e)}catch(n){if("ENOENT"===n.code)return;"EPERM"===n.code&&u&&m(e,t,n)}try{o&&o.isDirectory()?b(e,t,null):t.unlinkSync(e)}catch(n){if("ENOENT"===n.code)return;if("EPERM"===n.code)return u?m(e,t,n):b(e,t,n);if("EISDIR"!==n.code)throw n;b(e,t,n)}}}function b(e,t,n){r(e),r(t),n&&r(n instanceof Error);try{t.rmdirSync(e)}catch(o){if("ENOENT"===o.code)return;if("ENOTDIR"===o.code)throw n;"ENOTEMPTY"!==o.code&&"EEXIST"!==o.code&&"EPERM"!==o.code||function(e,t){r(e),r(t),t.readdirSync(e).forEach((function(n){y(i.join(e,n),t)}));for(var n=u?100:1,o=0;;){var s=!0;try{var a=t.rmdirSync(e,t);return s=!1,a}finally{if(++o<n&&s)continue}}}(e,t)}}},111:function(e){!function(){function t(e,r){var i=Array.prototype.slice.call(arguments,2),o={};return Object.keys(e||{}).forEach((function(t){o[t]=n(e[t])})),Object.keys(r||{}).forEach((function(i){var s=r[i];s=s&&"object"==typeof s&&!Array.isArray(s)&&e&&e[i]&&"object"==typeof e[i]?t(e[i],s):n(s),o[i]=s})),i.length&&(i.unshift(o),o=t.apply(null,i)),o}function n(e){return Array.isArray(e)?e.map(n):e&&"object"==typeof e?t(e):e}e.exports=t}()},1475:(e,t,n)=>{"use strict";const r=n(1055),i=n(4434).EventEmitter,o=n(9896);let s=o.writev;if(!s){const e=process.binding("fs"),t=e.FSReqWrap||e.FSReqCallback;s=(n,r,i,o)=>{const s=new t;s.oncomplete=(e,t)=>o(e,t,r),e.writeBuffers(n,r,i,s)}}const a=Symbol("_autoClose"),c=Symbol("_close"),l=Symbol("_ended"),u=Symbol("_fd"),d=Symbol("_finished"),p=Symbol("_flags"),h=Symbol("_flush"),f=Symbol("_handleChunk"),m=Symbol("_makeBuf"),g=Symbol("_mode"),y=Symbol("_needDrain"),b=Symbol("_onerror"),v=Symbol("_onopen"),S=Symbol("_onread"),w=Symbol("_onwrite"),C=Symbol("_open"),T=Symbol("_path"),E=Symbol("_pos"),_=Symbol("_queue"),x=Symbol("_read"),R=Symbol("_readSize"),I=Symbol("_reading"),P=Symbol("_remain"),O=Symbol("_size"),D=Symbol("_write"),A=Symbol("_writing"),k=Symbol("_defaultFlag"),N=Symbol("_errored");class L extends r{constructor(e,t){if(super(t=t||{}),this.readable=!0,this.writable=!1,"string"!=typeof e)throw new TypeError("path must be a string");this[N]=!1,this[u]="number"==typeof t.fd?t.fd:null,this[T]=e,this[R]=t.readSize||16777216,this[I]=!1,this[O]="number"==typeof t.size?t.size:1/0,this[P]=this[O],this[a]="boolean"!=typeof t.autoClose||t.autoClose,"number"==typeof this[u]?this[x]():this[C]()}get fd(){return this[u]}get path(){return this[T]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[C](){o.open(this[T],"r",((e,t)=>this[v](e,t)))}[v](e,t){e?this[b](e):(this[u]=t,this.emit("open",t),this[x]())}[m](){return Buffer.allocUnsafe(Math.min(this[R],this[P]))}[x](){if(!this[I]){this[I]=!0;const e=this[m]();if(0===e.length)return process.nextTick((()=>this[S](null,0,e)));o.read(this[u],e,0,e.length,null,((e,t,n)=>this[S](e,t,n)))}}[S](e,t,n){this[I]=!1,e?this[b](e):this[f](t,n)&&this[x]()}[c](){if(this[a]&&"number"==typeof this[u]){const e=this[u];this[u]=null,o.close(e,(e=>e?this.emit("error",e):this.emit("close")))}}[b](e){this[I]=!0,this[c](),this.emit("error",e)}[f](e,t){let n=!1;return this[P]-=e,e>0&&(n=super.write(e<t.length?t.slice(0,e):t)),(0===e||this[P]<=0)&&(n=!1,this[c](),super.end()),n}emit(e,t){switch(e){case"prefinish":case"finish":break;case"drain":"number"==typeof this[u]&&this[x]();break;case"error":if(this[N])return;return this[N]=!0,super.emit(e,t);default:return super.emit(e,t)}}}class j extends i{constructor(e,t){super(t=t||{}),this.readable=!1,this.writable=!0,this[N]=!1,this[A]=!1,this[l]=!1,this[y]=!1,this[_]=[],this[T]=e,this[u]="number"==typeof t.fd?t.fd:null,this[g]=void 0===t.mode?438:t.mode,this[E]="number"==typeof t.start?t.start:null,this[a]="boolean"!=typeof t.autoClose||t.autoClose;const n=null!==this[E]?"r+":"w";this[k]=void 0===t.flags,this[p]=this[k]?n:t.flags,null===this[u]&&this[C]()}emit(e,t){if("error"===e){if(this[N])return;this[N]=!0}return super.emit(e,t)}get fd(){return this[u]}get path(){return this[T]}[b](e){this[c](),this[A]=!0,this.emit("error",e)}[C](){o.open(this[T],this[p],this[g],((e,t)=>this[v](e,t)))}[v](e,t){this[k]&&"r+"===this[p]&&e&&"ENOENT"===e.code?(this[p]="w",this[C]()):e?this[b](e):(this[u]=t,this.emit("open",t),this[h]())}end(e,t){return e&&this.write(e,t),this[l]=!0,this[A]||this[_].length||"number"!=typeof this[u]||this[w](null,0),this}write(e,t){return"string"==typeof e&&(e=Buffer.from(e,t)),this[l]?(this.emit("error",new Error("write() after end()")),!1):null===this[u]||this[A]||this[_].length?(this[_].push(e),this[y]=!0,!1):(this[A]=!0,this[D](e),!0)}[D](e){o.write(this[u],e,0,e.length,this[E],((e,t)=>this[w](e,t)))}[w](e,t){e?this[b](e):(null!==this[E]&&(this[E]+=t),this[_].length?this[h]():(this[A]=!1,this[l]&&!this[d]?(this[d]=!0,this[c](),this.emit("finish")):this[y]&&(this[y]=!1,this.emit("drain"))))}[h](){if(0===this[_].length)this[l]&&this[w](null,0);else if(1===this[_].length)this[D](this[_].pop());else{const e=this[_];this[_]=[],s(this[u],e,this[E],((e,t)=>this[w](e,t)))}}[c](){if(this[a]&&"number"==typeof this[u]){const e=this[u];this[u]=null,o.close(e,(e=>e?this.emit("error",e):this.emit("close")))}}}t.ReadStream=L,t.ReadStreamSync=class extends L{[C](){let e=!0;try{this[v](null,o.openSync(this[T],"r")),e=!1}finally{e&&this[c]()}}[x](){let e=!0;try{if(!this[I]){for(this[I]=!0;;){const e=this[m](),t=0===e.length?0:o.readSync(this[u],e,0,e.length,null);if(!this[f](t,e))break}this[I]=!1}e=!1}finally{e&&this[c]()}}[c](){if(this[a]&&"number"==typeof this[u]){const e=this[u];this[u]=null,o.closeSync(e),this.emit("close")}}},t.WriteStream=j,t.WriteStreamSync=class extends j{[C](){let e;if(this[k]&&"r+"===this[p])try{e=o.openSync(this[T],this[p],this[g])}catch(e){if("ENOENT"===e.code)return this[p]="w",this[C]();throw e}else e=o.openSync(this[T],this[p],this[g]);this[v](null,e)}[c](){if(this[a]&&"number"==typeof this[u]){const e=this[u];this[u]=null,o.closeSync(e),this.emit("close")}}[D](e){let t=!0;try{this[w](null,o.writeSync(this[u],e,0,e.length,this[E])),t=!1}finally{if(t)try{this[c]()}catch(e){}}}}},1455:(e,t,n)=>{e.exports=u,u.realpath=u,u.sync=d,u.realpathSync=d,u.monkeypatch=function(){r.realpath=u,r.realpathSync=d},u.unmonkeypatch=function(){r.realpath=i,r.realpathSync=o};var r=n(9896),i=r.realpath,o=r.realpathSync,s=process.version,a=/^v[0-5]\./.test(s),c=n(6674);function l(e){return e&&"realpath"===e.syscall&&("ELOOP"===e.code||"ENOMEM"===e.code||"ENAMETOOLONG"===e.code)}function u(e,t,n){if(a)return i(e,t,n);"function"==typeof t&&(n=t,t=null),i(e,t,(function(r,i){l(r)?c.realpath(e,t,n):n(r,i)}))}function d(e,t){if(a)return o(e,t);try{return o(e,t)}catch(n){if(l(n))return c.realpathSync(e,t);throw n}}},6674:(e,t,n)=>{var r=n(6928),i="win32"===process.platform,o=n(9896),s=process.env.NODE_DEBUG&&/fs/.test(process.env.NODE_DEBUG);if(r.normalize,i)var a=/(.*?)(?:[\/\\]+|$)/g;else a=/(.*?)(?:[\/]+|$)/g;if(i)var c=/^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/;else c=/^[\/]*/;t.realpathSync=function(e,t){if(e=r.resolve(e),t&&Object.prototype.hasOwnProperty.call(t,e))return t[e];var n,s,l,u,d=e,p={},h={};function f(){var t=c.exec(e);n=t[0].length,s=t[0],l=t[0],u="",i&&!h[l]&&(o.lstatSync(l),h[l]=!0)}for(f();n<e.length;){a.lastIndex=n;var m=a.exec(e);if(u=s,s+=m[0],l=u+m[1],n=a.lastIndex,!(h[l]||t&&t[l]===l)){var g;if(t&&Object.prototype.hasOwnProperty.call(t,l))g=t[l];else{var y=o.lstatSync(l);if(!y.isSymbolicLink()){h[l]=!0,t&&(t[l]=l);continue}var b=null;if(!i){var v=y.dev.toString(32)+":"+y.ino.toString(32);p.hasOwnProperty(v)&&(b=p[v])}null===b&&(o.statSync(l),b=o.readlinkSync(l)),g=r.resolve(u,b),t&&(t[l]=g),i||(p[v]=b)}e=r.resolve(g,e.slice(n)),f()}}return t&&(t[d]=e),e},t.realpath=function(e,t,n){if("function"!=typeof n&&(n=function(e){return"function"==typeof e?e:function(){var e;if(s){var t=new Error;e=function(e){e&&(t.message=e.message,n(e=t))}}else e=n;return e;function n(e){if(e){if(process.throwDeprecation)throw e;if(!process.noDeprecation){var t="fs: missing callback "+(e.stack||e.message);process.traceDeprecation?console.trace(t):console.error(t)}}}}()}(t),t=null),e=r.resolve(e),t&&Object.prototype.hasOwnProperty.call(t,e))return process.nextTick(n.bind(null,null,t[e]));var l,u,d,p,h=e,f={},m={};function g(){var t=c.exec(e);l=t[0].length,u=t[0],d=t[0],p="",i&&!m[d]?o.lstat(d,(function(e){if(e)return n(e);m[d]=!0,y()})):process.nextTick(y)}function y(){if(l>=e.length)return t&&(t[h]=e),n(null,e);a.lastIndex=l;var r=a.exec(e);return p=u,u+=r[0],d=p+r[1],l=a.lastIndex,m[d]||t&&t[d]===d?process.nextTick(y):t&&Object.prototype.hasOwnProperty.call(t,d)?S(t[d]):o.lstat(d,b)}function b(e,r){if(e)return n(e);if(!r.isSymbolicLink())return m[d]=!0,t&&(t[d]=d),process.nextTick(y);if(!i){var s=r.dev.toString(32)+":"+r.ino.toString(32);if(f.hasOwnProperty(s))return v(null,f[s],d)}o.stat(d,(function(e){if(e)return n(e);o.readlink(d,(function(e,t){i||(f[s]=t),v(e,t)}))}))}function v(e,i,o){if(e)return n(e);var s=r.resolve(p,i);t&&(t[o]=s),S(s)}function S(t){e=r.resolve(t,e.slice(l)),g()}g()}},1198:(e,t,n)=>{function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.setopts=function(e,t,n){if(n||(n={}),n.matchBase&&-1===t.indexOf("/")){if(n.noglobstar)throw new Error("base matching requires globstar");t="**/"+t}e.silent=!!n.silent,e.pattern=t,e.strict=!1!==n.strict,e.realpath=!!n.realpath,e.realpathCache=n.realpathCache||Object.create(null),e.follow=!!n.follow,e.dot=!!n.dot,e.mark=!!n.mark,e.nodir=!!n.nodir,e.nodir&&(e.mark=!0),e.sync=!!n.sync,e.nounique=!!n.nounique,e.nonull=!!n.nonull,e.nosort=!!n.nosort,e.nocase=!!n.nocase,e.stat=!!n.stat,e.noprocess=!!n.noprocess,e.absolute=!!n.absolute,e.fs=n.fs||i,e.maxLength=n.maxLength||1/0,e.cache=n.cache||Object.create(null),e.statCache=n.statCache||Object.create(null),e.symlinks=n.symlinks||Object.create(null),function(e,t){e.ignore=t.ignore||[],Array.isArray(e.ignore)||(e.ignore=[e.ignore]),e.ignore.length&&(e.ignore=e.ignore.map(u))}(e,n),e.changedCwd=!1;var s=process.cwd();r(n,"cwd")?(e.cwd=o.resolve(n.cwd),e.changedCwd=e.cwd!==s):e.cwd=s,e.root=n.root||o.resolve(e.cwd,"/"),e.root=o.resolve(e.root),"win32"===process.platform&&(e.root=e.root.replace(/\\/g,"/")),e.cwdAbs=a(e.cwd)?e.cwd:d(e,e.cwd),"win32"===process.platform&&(e.cwdAbs=e.cwdAbs.replace(/\\/g,"/")),e.nomount=!!n.nomount,n.nonegate=!0,n.nocomment=!0,n.allowWindowsEscape=!1,e.minimatch=new c(t,n),e.options=e.minimatch.options},t.ownProp=r,t.makeAbs=d,t.finish=function(e){for(var t=e.nounique,n=t?[]:Object.create(null),r=0,i=e.matches.length;r<i;r++){var o=e.matches[r];if(o&&0!==Object.keys(o).length){var s=Object.keys(o);t?n.push.apply(n,s):s.forEach((function(e){n[e]=!0}))}else if(e.nonull){var a=e.minimatch.globSet[r];t?n.push(a):n[a]=!0}}if(t||(n=Object.keys(n)),e.nosort||(n=n.sort(l)),e.mark){for(r=0;r<n.length;r++)n[r]=e._mark(n[r]);e.nodir&&(n=n.filter((function(t){var n=!/\/$/.test(t),r=e.cache[t]||e.cache[d(e,t)];return n&&r&&(n="DIR"!==r&&!Array.isArray(r)),n})))}e.ignore.length&&(n=n.filter((function(t){return!p(e,t)}))),e.found=n},t.mark=function(e,t){var n=d(e,t),r=e.cache[n],i=t;if(r){var o="DIR"===r||Array.isArray(r),s="/"===t.slice(-1);if(o&&!s?i+="/":!o&&s&&(i=i.slice(0,-1)),i!==t){var a=d(e,i);e.statCache[a]=e.statCache[n],e.cache[a]=e.cache[n]}}return i},t.isIgnored=p,t.childrenIgnored=function(e,t){return!!e.ignore.length&&e.ignore.some((function(e){return!(!e.gmatcher||!e.gmatcher.match(t))}))};var i=n(9896),o=n(6928),s=n(4027),a=n(2641),c=s.Minimatch;function l(e,t){return e.localeCompare(t,"en")}function u(e){var t=null;if("/**"===e.slice(-3)){var n=e.replace(/(\/\*\*)+$/,"");t=new c(n,{dot:!0})}return{matcher:new c(e,{dot:!0}),gmatcher:t}}function d(e,t){var n=t;return n="/"===t.charAt(0)?o.join(e.root,t):a(t)||""===t?t:e.changedCwd?o.resolve(e.cwd,t):o.resolve(t),"win32"===process.platform&&(n=n.replace(/\\/g,"/")),n}function p(e,t){return!!e.ignore.length&&e.ignore.some((function(e){return e.matcher.match(t)||!(!e.gmatcher||!e.gmatcher.match(t))}))}},3577:(e,t,n)=>{e.exports=b;var r=n(1455),i=n(4027),o=(i.Minimatch,n(2017)),s=n(4434).EventEmitter,a=n(6928),c=n(2613),l=n(2641),u=n(4700),d=n(1198),p=d.setopts,h=d.ownProp,f=n(3423),m=(n(9023),d.childrenIgnored),g=d.isIgnored,y=n(3519);function b(e,t,n){if("function"==typeof t&&(n=t,t={}),t||(t={}),t.sync){if(n)throw new TypeError("callback provided to sync glob");return u(e,t)}return new S(e,t,n)}b.sync=u;var v=b.GlobSync=u.GlobSync;function S(e,t,n){if("function"==typeof t&&(n=t,t=null),t&&t.sync){if(n)throw new TypeError("callback provided to sync glob");return new v(e,t)}if(!(this instanceof S))return new S(e,t,n);p(this,e,t),this._didRealPath=!1;var r=this.minimatch.set.length;this.matches=new Array(r),"function"==typeof n&&(n=y(n),this.on("error",n),this.on("end",(function(e){n(null,e)})));var i=this;if(this._processing=0,this._emitQueue=[],this._processQueue=[],this.paused=!1,this.noprocess)return this;if(0===r)return a();for(var o=!0,s=0;s<r;s++)this._process(this.minimatch.set[s],s,!1,a);function a(){--i._processing,i._processing<=0&&(o?process.nextTick((function(){i._finish()})):i._finish())}o=!1}b.glob=b,b.hasMagic=function(e,t){var n=function(e,t){if(null===t||"object"!=typeof t)return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}({},t);n.noprocess=!0;var r=new S(e,n).minimatch.set;if(!e)return!1;if(r.length>1)return!0;for(var i=0;i<r[0].length;i++)if("string"!=typeof r[0][i])return!0;return!1},b.Glob=S,o(S,s),S.prototype._finish=function(){if(c(this instanceof S),!this.aborted){if(this.realpath&&!this._didRealpath)return this._realpath();d.finish(this),this.emit("end",this.found)}},S.prototype._realpath=function(){if(!this._didRealpath){this._didRealpath=!0;var e=this.matches.length;if(0===e)return this._finish();for(var t=this,n=0;n<this.matches.length;n++)this._realpathSet(n,r)}function r(){0==--e&&t._finish()}},S.prototype._realpathSet=function(e,t){var n=this.matches[e];if(!n)return t();var i=Object.keys(n),o=this,s=i.length;if(0===s)return t();var a=this.matches[e]=Object.create(null);i.forEach((function(n,i){n=o._makeAbs(n),r.realpath(n,o.realpathCache,(function(r,i){r?"stat"===r.syscall?a[n]=!0:o.emit("error",r):a[i]=!0,0==--s&&(o.matches[e]=a,t())}))}))},S.prototype._mark=function(e){return d.mark(this,e)},S.prototype._makeAbs=function(e){return d.makeAbs(this,e)},S.prototype.abort=function(){this.aborted=!0,this.emit("abort")},S.prototype.pause=function(){this.paused||(this.paused=!0,this.emit("pause"))},S.prototype.resume=function(){if(this.paused){if(this.emit("resume"),this.paused=!1,this._emitQueue.length){var e=this._emitQueue.slice(0);this._emitQueue.length=0;for(var t=0;t<e.length;t++){var n=e[t];this._emitMatch(n[0],n[1])}}if(this._processQueue.length){var r=this._processQueue.slice(0);for(this._processQueue.length=0,t=0;t<r.length;t++){var i=r[t];this._processing--,this._process(i[0],i[1],i[2],i[3])}}}},S.prototype._process=function(e,t,n,r){if(c(this instanceof S),c("function"==typeof r),!this.aborted)if(this._processing++,this.paused)this._processQueue.push([e,t,n,r]);else{for(var o,s=0;"string"==typeof e[s];)s++;switch(s){case e.length:return void this._processSimple(e.join("/"),t,r);case 0:o=null;break;default:o=e.slice(0,s).join("/")}var a,u=e.slice(s);null===o?a=".":l(o)||l(e.map((function(e){return"string"==typeof e?e:"[*]"})).join("/"))?(o&&l(o)||(o="/"+o),a=o):a=o;var d=this._makeAbs(a);if(m(this,a))return r();u[0]===i.GLOBSTAR?this._processGlobStar(o,a,d,u,t,n,r):this._processReaddir(o,a,d,u,t,n,r)}},S.prototype._processReaddir=function(e,t,n,r,i,o,s){var a=this;this._readdir(n,o,(function(c,l){return a._processReaddir2(e,t,n,r,i,o,l,s)}))},S.prototype._processReaddir2=function(e,t,n,r,i,o,s,c){if(!s)return c();for(var l=r[0],u=!!this.minimatch.negate,d=l._glob,p=this.dot||"."===d.charAt(0),h=[],f=0;f<s.length;f++)("."!==(g=s[f]).charAt(0)||p)&&(u&&!e?!g.match(l):g.match(l))&&h.push(g);var m=h.length;if(0===m)return c();if(1===r.length&&!this.mark&&!this.stat){for(this.matches[i]||(this.matches[i]=Object.create(null)),f=0;f<m;f++){var g=h[f];e&&(g="/"!==e?e+"/"+g:e+g),"/"!==g.charAt(0)||this.nomount||(g=a.join(this.root,g)),this._emitMatch(i,g)}return c()}for(r.shift(),f=0;f<m;f++)g=h[f],e&&(g="/"!==e?e+"/"+g:e+g),this._process([g].concat(r),i,o,c);c()},S.prototype._emitMatch=function(e,t){if(!this.aborted&&!g(this,t))if(this.paused)this._emitQueue.push([e,t]);else{var n=l(t)?t:this._makeAbs(t);if(this.mark&&(t=this._mark(t)),this.absolute&&(t=n),!this.matches[e][t]){if(this.nodir){var r=this.cache[n];if("DIR"===r||Array.isArray(r))return}this.matches[e][t]=!0;var i=this.statCache[n];i&&this.emit("stat",t,i),this.emit("match",t)}}},S.prototype._readdirInGlobStar=function(e,t){if(!this.aborted){if(this.follow)return this._readdir(e,!1,t);var n=this,r=f("lstat\0"+e,(function(r,i){if(r&&"ENOENT"===r.code)return t();var o=i&&i.isSymbolicLink();n.symlinks[e]=o,o||!i||i.isDirectory()?n._readdir(e,!1,t):(n.cache[e]="FILE",t())}));r&&n.fs.lstat(e,r)}},S.prototype._readdir=function(e,t,n){if(!this.aborted&&(n=f("readdir\0"+e+"\0"+t,n))){if(t&&!h(this.symlinks,e))return this._readdirInGlobStar(e,n);if(h(this.cache,e)){var r=this.cache[e];if(!r||"FILE"===r)return n();if(Array.isArray(r))return n(null,r)}this.fs.readdir(e,function(e,t,n){return function(r,i){r?e._readdirError(t,r,n):e._readdirEntries(t,i,n)}}(this,e,n))}},S.prototype._readdirEntries=function(e,t,n){if(!this.aborted){if(!this.mark&&!this.stat)for(var r=0;r<t.length;r++){var i=t[r];i="/"===e?e+i:e+"/"+i,this.cache[i]=!0}return this.cache[e]=t,n(null,t)}},S.prototype._readdirError=function(e,t,n){if(!this.aborted){switch(t.code){case"ENOTSUP":case"ENOTDIR":var r=this._makeAbs(e);if(this.cache[r]="FILE",r===this.cwdAbs){var i=new Error(t.code+" invalid cwd "+this.cwd);i.path=this.cwd,i.code=t.code,this.emit("error",i),this.abort()}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(e)]=!1;break;default:this.cache[this._makeAbs(e)]=!1,this.strict&&(this.emit("error",t),this.abort()),this.silent||console.error("glob error",t)}return n()}},S.prototype._processGlobStar=function(e,t,n,r,i,o,s){var a=this;this._readdir(n,o,(function(c,l){a._processGlobStar2(e,t,n,r,i,o,l,s)}))},S.prototype._processGlobStar2=function(e,t,n,r,i,o,s,a){if(!s)return a();var c=r.slice(1),l=e?[e]:[],u=l.concat(c);this._process(u,i,!1,a);var d=this.symlinks[n],p=s.length;if(d&&o)return a();for(var h=0;h<p;h++)if("."!==s[h].charAt(0)||this.dot){var f=l.concat(s[h],c);this._process(f,i,!0,a);var m=l.concat(s[h],r);this._process(m,i,!0,a)}a()},S.prototype._processSimple=function(e,t,n){var r=this;this._stat(e,(function(i,o){r._processSimple2(e,t,i,o,n)}))},S.prototype._processSimple2=function(e,t,n,r,i){if(this.matches[t]||(this.matches[t]=Object.create(null)),!r)return i();if(e&&l(e)&&!this.nomount){var o=/[\/\\]$/.test(e);"/"===e.charAt(0)?e=a.join(this.root,e):(e=a.resolve(this.root,e),o&&(e+="/"))}"win32"===process.platform&&(e=e.replace(/\\/g,"/")),this._emitMatch(t,e),i()},S.prototype._stat=function(e,t){var n=this._makeAbs(e),r="/"===e.slice(-1);if(e.length>this.maxLength)return t();if(!this.stat&&h(this.cache,n)){var i=this.cache[n];if(Array.isArray(i)&&(i="DIR"),!r||"DIR"===i)return t(null,i);if(r&&"FILE"===i)return t()}var o=this.statCache[n];if(void 0!==o){if(!1===o)return t(null,o);var s=o.isDirectory()?"DIR":"FILE";return r&&"FILE"===s?t():t(null,s,o)}var a=this,c=f("stat\0"+n,(function(r,i){if(i&&i.isSymbolicLink())return a.fs.stat(n,(function(r,o){r?a._stat2(e,n,null,i,t):a._stat2(e,n,r,o,t)}));a._stat2(e,n,r,i,t)}));c&&a.fs.lstat(n,c)},S.prototype._stat2=function(e,t,n,r,i){if(n&&("ENOENT"===n.code||"ENOTDIR"===n.code))return this.statCache[t]=!1,i();var o="/"===e.slice(-1);if(this.statCache[t]=r,"/"===t.slice(-1)&&r&&!r.isDirectory())return i(null,!1,r);var s=!0;return r&&(s=r.isDirectory()?"DIR":"FILE"),this.cache[t]=this.cache[t]||s,o&&"FILE"===s?i():i(null,s,r)}},4700:(e,t,n)=>{e.exports=h,h.GlobSync=f;var r=n(1455),i=n(4027),o=(i.Minimatch,n(3577).Glob,n(9023),n(6928)),s=n(2613),a=n(2641),c=n(1198),l=c.setopts,u=c.ownProp,d=c.childrenIgnored,p=c.isIgnored;function h(e,t){if("function"==typeof t||3===arguments.length)throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");return new f(e,t).found}function f(e,t){if(!e)throw new Error("must provide pattern");if("function"==typeof t||3===arguments.length)throw new TypeError("callback provided to sync glob\nSee: https://github.com/isaacs/node-glob/issues/167");if(!(this instanceof f))return new f(e,t);if(l(this,e,t),this.noprocess)return this;var n=this.minimatch.set.length;this.matches=new Array(n);for(var r=0;r<n;r++)this._process(this.minimatch.set[r],r,!1);this._finish()}f.prototype._finish=function(){if(s.ok(this instanceof f),this.realpath){var e=this;this.matches.forEach((function(t,n){var i=e.matches[n]=Object.create(null);for(var o in t)try{o=e._makeAbs(o),i[r.realpathSync(o,e.realpathCache)]=!0}catch(t){if("stat"!==t.syscall)throw t;i[e._makeAbs(o)]=!0}}))}c.finish(this)},f.prototype._process=function(e,t,n){s.ok(this instanceof f);for(var r,o=0;"string"==typeof e[o];)o++;switch(o){case e.length:return void this._processSimple(e.join("/"),t);case 0:r=null;break;default:r=e.slice(0,o).join("/")}var c,l=e.slice(o);null===r?c=".":a(r)||a(e.map((function(e){return"string"==typeof e?e:"[*]"})).join("/"))?(r&&a(r)||(r="/"+r),c=r):c=r;var u=this._makeAbs(c);d(this,c)||(l[0]===i.GLOBSTAR?this._processGlobStar(r,c,u,l,t,n):this._processReaddir(r,c,u,l,t,n))},f.prototype._processReaddir=function(e,t,n,r,i,s){var a=this._readdir(n,s);if(a){for(var c=r[0],l=!!this.minimatch.negate,u=c._glob,d=this.dot||"."===u.charAt(0),p=[],h=0;h<a.length;h++)("."!==(g=a[h]).charAt(0)||d)&&(l&&!e?!g.match(c):g.match(c))&&p.push(g);var f=p.length;if(0!==f)if(1!==r.length||this.mark||this.stat)for(r.shift(),h=0;h<f;h++){var m;g=p[h],m=e?[e,g]:[g],this._process(m.concat(r),i,s)}else{this.matches[i]||(this.matches[i]=Object.create(null));for(h=0;h<f;h++){var g=p[h];e&&(g="/"!==e.slice(-1)?e+"/"+g:e+g),"/"!==g.charAt(0)||this.nomount||(g=o.join(this.root,g)),this._emitMatch(i,g)}}}},f.prototype._emitMatch=function(e,t){if(!p(this,t)){var n=this._makeAbs(t);if(this.mark&&(t=this._mark(t)),this.absolute&&(t=n),!this.matches[e][t]){if(this.nodir){var r=this.cache[n];if("DIR"===r||Array.isArray(r))return}this.matches[e][t]=!0,this.stat&&this._stat(t)}}},f.prototype._readdirInGlobStar=function(e){if(this.follow)return this._readdir(e,!1);var t,n;try{n=this.fs.lstatSync(e)}catch(e){if("ENOENT"===e.code)return null}var r=n&&n.isSymbolicLink();return this.symlinks[e]=r,r||!n||n.isDirectory()?t=this._readdir(e,!1):this.cache[e]="FILE",t},f.prototype._readdir=function(e,t){if(t&&!u(this.symlinks,e))return this._readdirInGlobStar(e);if(u(this.cache,e)){var n=this.cache[e];if(!n||"FILE"===n)return null;if(Array.isArray(n))return n}try{return this._readdirEntries(e,this.fs.readdirSync(e))}catch(t){return this._readdirError(e,t),null}},f.prototype._readdirEntries=function(e,t){if(!this.mark&&!this.stat)for(var n=0;n<t.length;n++){var r=t[n];r="/"===e?e+r:e+"/"+r,this.cache[r]=!0}return this.cache[e]=t,t},f.prototype._readdirError=function(e,t){switch(t.code){case"ENOTSUP":case"ENOTDIR":var n=this._makeAbs(e);if(this.cache[n]="FILE",n===this.cwdAbs){var r=new Error(t.code+" invalid cwd "+this.cwd);throw r.path=this.cwd,r.code=t.code,r}break;case"ENOENT":case"ELOOP":case"ENAMETOOLONG":case"UNKNOWN":this.cache[this._makeAbs(e)]=!1;break;default:if(this.cache[this._makeAbs(e)]=!1,this.strict)throw t;this.silent||console.error("glob error",t)}},f.prototype._processGlobStar=function(e,t,n,r,i,o){var s=this._readdir(n,o);if(s){var a=r.slice(1),c=e?[e]:[],l=c.concat(a);this._process(l,i,!1);var u=s.length;if(!this.symlinks[n]||!o)for(var d=0;d<u;d++)if("."!==s[d].charAt(0)||this.dot){var p=c.concat(s[d],a);this._process(p,i,!0);var h=c.concat(s[d],r);this._process(h,i,!0)}}},f.prototype._processSimple=function(e,t){var n=this._stat(e);if(this.matches[t]||(this.matches[t]=Object.create(null)),n){if(e&&a(e)&&!this.nomount){var r=/[\/\\]$/.test(e);"/"===e.charAt(0)?e=o.join(this.root,e):(e=o.resolve(this.root,e),r&&(e+="/"))}"win32"===process.platform&&(e=e.replace(/\\/g,"/")),this._emitMatch(t,e)}},f.prototype._stat=function(e){var t=this._makeAbs(e),n="/"===e.slice(-1);if(e.length>this.maxLength)return!1;if(!this.stat&&u(this.cache,t)){var r=this.cache[t];if(Array.isArray(r)&&(r="DIR"),!n||"DIR"===r)return r;if(n&&"FILE"===r)return!1}var i=this.statCache[t];if(!i){var o;try{o=this.fs.lstatSync(t)}catch(e){if(e&&("ENOENT"===e.code||"ENOTDIR"===e.code))return this.statCache[t]=!1,!1}if(o&&o.isSymbolicLink())try{i=this.fs.statSync(t)}catch(e){i=o}else i=o}return this.statCache[t]=i,r=!0,i&&(r=i.isDirectory()?"DIR":"FILE"),this.cache[t]=this.cache[t]||r,(!n||"FILE"!==r)&&r},f.prototype._mark=function(e){return c.mark(this,e)},f.prototype._makeAbs=function(e){return c.makeAbs(this,e)}},5884:e=>{"use strict";e.exports=(e,t=process.argv)=>{const n=e.startsWith("-")?"":1===e.length?"-":"--",r=t.indexOf(n+e),i=t.indexOf("--");return-1!==r&&(-1===i||r<i)}},9848:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=i(n(9278)),s=i(n(4756)),a=i(n(7016)),c=i(n(5753)),l=i(n(2391)),u=n(9724),d=(0,c.default)("http-proxy-agent");class p extends u.Agent{constructor(e){let t;if(t="string"==typeof e?a.default.parse(e):e,!t)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");d("Creating new HttpProxyAgent instance: %o",t),super(t);const n=Object.assign({},t);var r;this.secureProxy=t.secureProxy||"string"==typeof(r=n.protocol)&&/^https:?$/i.test(r),n.host=n.hostname||n.host,"string"==typeof n.port&&(n.port=parseInt(n.port,10)),!n.port&&n.host&&(n.port=this.secureProxy?443:80),n.host&&n.path&&(delete n.path,delete n.pathname),this.proxy=n}callback(e,t){return r(this,void 0,void 0,(function*(){const{proxy:n,secureProxy:r}=this,i=a.default.parse(e.path);let c;if(i.protocol||(i.protocol="http:"),i.hostname||(i.hostname=t.hostname||t.host||null),null==i.port&&(t.port,1)&&(i.port=String(t.port)),"80"===i.port&&(i.port=""),e.path=a.default.format(i),n.auth&&e.setHeader("Proxy-Authorization",`Basic ${Buffer.from(n.auth).toString("base64")}`),r?(d("Creating `tls.Socket`: %o",n),c=s.default.connect(n)):(d("Creating `net.Socket`: %o",n),c=o.default.connect(n)),e._header){let t,n;d("Regenerating stored HTTP header string for request"),e._header=null,e._implicitHeader(),e.output&&e.output.length>0?(d("Patching connection write() output buffer with updated header"),t=e.output[0],n=t.indexOf("\r\n\r\n")+4,e.output[0]=e._header+t.substring(n),d("Output buffer: %o",e.output)):e.outputData&&e.outputData.length>0&&(d("Patching connection write() output buffer with updated header"),t=e.outputData[0].data,n=t.indexOf("\r\n\r\n")+4,e.outputData[0].data=e._header+t.substring(n),d("Output buffer: %o",e.outputData[0].data))}return yield(0,l.default)(c,"connect"),c}))}}t.default=p},6645:function(e,t,n){"use strict";const r=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(9848));function i(e){return new r.default(e)}!function(e){e.HttpProxyAgent=r.default,e.prototype=r.default.prototype}(i||(i={})),e.exports=i},6329:function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function a(e){try{c(r.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}c((r=r.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const o=i(n(9278)),s=i(n(4756)),a=i(n(7016)),c=i(n(2613)),l=i(n(5753)),u=n(9724),d=i(n(3868)),p=l.default("https-proxy-agent:agent");class h extends u.Agent{constructor(e){let t;if(t="string"==typeof e?a.default.parse(e):e,!t)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");p("creating new HttpsProxyAgent instance: %o",t),super(t);const n=Object.assign({},t);var r;this.secureProxy=t.secureProxy||"string"==typeof(r=n.protocol)&&/^https:?$/i.test(r),n.host=n.hostname||n.host,"string"==typeof n.port&&(n.port=parseInt(n.port,10)),!n.port&&n.host&&(n.port=this.secureProxy?443:80),this.secureProxy&&!("ALPNProtocols"in n)&&(n.ALPNProtocols=["http 1.1"]),n.host&&n.path&&(delete n.path,delete n.pathname),this.proxy=n}callback(e,t){return r(this,void 0,void 0,(function*(){const{proxy:n,secureProxy:r}=this;let i;r?(p("Creating `tls.Socket`: %o",n),i=s.default.connect(n)):(p("Creating `net.Socket`: %o",n),i=o.default.connect(n));const a=Object.assign({},n.headers);let l=`CONNECT ${t.host}:${t.port} HTTP/1.1\r\n`;n.auth&&(a["Proxy-Authorization"]=`Basic ${Buffer.from(n.auth).toString("base64")}`);let{host:u,port:h,secureEndpoint:m}=t;(function(e,t){return Boolean(!t&&80===e||t&&443===e)})(h,m)||(u+=`:${h}`),a.Host=u,a.Connection="close";for(const e of Object.keys(a))l+=`${e}: ${a[e]}\r\n`;const g=d.default(i);i.write(`${l}\r\n`);const{statusCode:y,buffered:b}=yield g;if(200===y){if(e.once("socket",f),t.secureEndpoint){p("Upgrading socket connection to TLS");const e=t.servername||t.host;return s.default.connect(Object.assign(Object.assign({},function(e,...t){const n={};let r;for(r in e)t.includes(r)||(n[r]=e[r]);return n}(t,"host","hostname","path","port")),{socket:i,servername:e}))}return i}i.destroy();const v=new o.default.Socket({writable:!1});return v.readable=!0,e.once("socket",(e=>{p("replaying proxy buffer for failed request"),c.default(e.listenerCount("data")>0),e.push(b),e.push(null)})),v}))}}function f(e){e.resume()}t.default=h},2288:function(e,t,n){"use strict";const r=(this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(n(6329));function i(e){return new r.default(e)}!function(e){e.HttpsProxyAgent=r.default,e.prototype=r.default.prototype}(i||(i={})),e.exports=i},3868:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});const i=r(n(5753)).default("https-proxy-agent:parse-proxy-response");t.default=function(e){return new Promise(((t,n)=>{let r=0;const o=[];function s(){const n=e.read();n?function(e){o.push(e),r+=e.length;const n=Buffer.concat(o,r);if(-1===n.indexOf("\r\n\r\n"))return i("have not received end of HTTP headers yet..."),void s();const a=n.toString("ascii",0,n.indexOf("\r\n")),c=+a.split(" ")[1];i("got proxy server response: %o",a),t({statusCode:c,buffered:n})}(n):e.once("readable",s)}function a(e){i("onclose had error %o",e)}function c(){i("onend")}e.on("error",(function t(r){e.removeListener("end",c),e.removeListener("error",t),e.removeListener("close",a),e.removeListener("readable",s),i("onerror %o",r),n(r)})),e.on("close",a),e.on("end",c),s()}))}},3423:(e,t,n)=>{var r=n(6587),i=Object.create(null),o=n(3519);e.exports=r((function(e,t){return i[e]?(i[e].push(t),null):(i[e]=[t],function(e){return o((function t(){var n=i[e],r=n.length,o=function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r]=e[r];return n}(arguments);try{for(var s=0;s<r;s++)n[s].apply(null,o)}finally{n.length>r?(n.splice(0,r),process.nextTick((function(){t.apply(null,o)}))):delete i[e]}}))}(e))}))},2017:(e,t,n)=>{try{var r=n(9023);if("function"!=typeof r.inherits)throw"";e.exports=r.inherits}catch(t){e.exports=n(6698)}},6698: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}}},4027:(e,t,n)=>{e.exports=p,p.Minimatch=h;var r=function(){try{return n(6928)}catch(e){}}()||{sep:"/"};p.sep=r.sep;var i=p.GLOBSTAR=h.GLOBSTAR={},o=n(8928),s={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},a="[^/]",c=a+"*?",l="().*{}+?[]^$\\!".split("").reduce((function(e,t){return e[t]=!0,e}),{}),u=/\/+/;function d(e,t){t=t||{};var n={};return Object.keys(e).forEach((function(t){n[t]=e[t]})),Object.keys(t).forEach((function(e){n[e]=t[e]})),n}function p(e,t,n){return m(t),n||(n={}),!(!n.nocomment&&"#"===t.charAt(0))&&new h(t,n).match(e)}function h(e,t){if(!(this instanceof h))return new h(e,t);m(e),t||(t={}),e=e.trim(),t.allowWindowsEscape||"/"===r.sep||(e=e.split(r.sep).join("/")),this.options=t,this.set=[],this.pattern=e,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.make()}function f(e,t){return t||(t=this instanceof h?this.options:{}),e=void 0===e?this.pattern:e,m(e),t.nobrace||!/\{(?:(?!\{).)*\}/.test(e)?[e]:o(e)}p.filter=function(e,t){return t=t||{},function(n,r,i){return p(n,e,t)}},p.defaults=function(e){if(!e||"object"!=typeof e||!Object.keys(e).length)return p;var t=p,n=function(n,r,i){return t(n,r,d(e,i))};return(n.Minimatch=function(n,r){return new t.Minimatch(n,d(e,r))}).defaults=function(n){return t.defaults(d(e,n)).Minimatch},n.filter=function(n,r){return t.filter(n,d(e,r))},n.defaults=function(n){return t.defaults(d(e,n))},n.makeRe=function(n,r){return t.makeRe(n,d(e,r))},n.braceExpand=function(n,r){return t.braceExpand(n,d(e,r))},n.match=function(n,r,i){return t.match(n,r,d(e,i))},n},h.defaults=function(e){return p.defaults(e).Minimatch},h.prototype.debug=function(){},h.prototype.make=function(){var e=this.pattern,t=this.options;if(t.nocomment||"#"!==e.charAt(0))if(e){this.parseNegate();var n=this.globSet=this.braceExpand();t.debug&&(this.debug=function(){console.error.apply(console,arguments)}),this.debug(this.pattern,n),n=this.globParts=n.map((function(e){return e.split(u)})),this.debug(this.pattern,n),n=n.map((function(e,t,n){return e.map(this.parse,this)}),this),this.debug(this.pattern,n),n=n.filter((function(e){return-1===e.indexOf(!1)})),this.debug(this.pattern,n),this.set=n}else this.empty=!0;else this.comment=!0},h.prototype.parseNegate=function(){var e=this.pattern,t=!1,n=0;if(!this.options.nonegate){for(var r=0,i=e.length;r<i&&"!"===e.charAt(r);r++)t=!t,n++;n&&(this.pattern=e.substr(n)),this.negate=t}},p.braceExpand=function(e,t){return f(e,t)},h.prototype.braceExpand=f;var m=function(e){if("string"!=typeof e)throw new TypeError("invalid pattern");if(e.length>65536)throw new TypeError("pattern is too long")};h.prototype.parse=function(e,t){m(e);var n=this.options;if("**"===e){if(!n.noglobstar)return i;e="*"}if(""===e)return"";var r,o="",u=!!n.nocase,d=!1,p=[],h=[],f=!1,y=-1,b=-1,v="."===e.charAt(0)?"":n.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",S=this;function w(){if(r){switch(r){case"*":o+=c,u=!0;break;case"?":o+=a,u=!0;break;default:o+="\\"+r}S.debug("clearStateChar %j %j",r,o),r=!1}}for(var C,T=0,E=e.length;T<E&&(C=e.charAt(T));T++)if(this.debug("%s\t%s %s %j",e,T,o,C),d&&l[C])o+="\\"+C,d=!1;else switch(C){case"/":return!1;case"\\":w(),d=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s\t%s %s %j <-- stateChar",e,T,o,C),f){this.debug("  in class"),"!"===C&&T===b+1&&(C="^"),o+=C;continue}S.debug("call clearStateChar %j",r),w(),r=C,n.noext&&w();continue;case"(":if(f){o+="(";continue}if(!r){o+="\\(";continue}p.push({type:r,start:T-1,reStart:o.length,open:s[r].open,close:s[r].close}),o+="!"===r?"(?:(?!(?:":"(?:",this.debug("plType %j %j",r,o),r=!1;continue;case")":if(f||!p.length){o+="\\)";continue}w(),u=!0;var _=p.pop();o+=_.close,"!"===_.type&&h.push(_),_.reEnd=o.length;continue;case"|":if(f||!p.length||d){o+="\\|",d=!1;continue}w(),o+="|";continue;case"[":if(w(),f){o+="\\"+C;continue}f=!0,b=T,y=o.length,o+=C;continue;case"]":if(T===b+1||!f){o+="\\"+C,d=!1;continue}var x=e.substring(b+1,T);try{RegExp("["+x+"]")}catch(e){var R=this.parse(x,g);o=o.substr(0,y)+"\\["+R[0]+"\\]",u=u||R[1],f=!1;continue}u=!0,f=!1,o+=C;continue;default:w(),d?d=!1:!l[C]||"^"===C&&f||(o+="\\"),o+=C}for(f&&(x=e.substr(b+1),R=this.parse(x,g),o=o.substr(0,y)+"\\["+R[0],u=u||R[1]),_=p.pop();_;_=p.pop()){var I=o.slice(_.reStart+_.open.length);this.debug("setting tail",o,_),I=I.replace(/((?:\\{2}){0,64})(\\?)\|/g,(function(e,t,n){return n||(n="\\"),t+t+n+"|"})),this.debug("tail=%j\n   %s",I,I,_,o);var P="*"===_.type?c:"?"===_.type?a:"\\"+_.type;u=!0,o=o.slice(0,_.reStart)+P+"\\("+I}w(),d&&(o+="\\\\");var O=!1;switch(o.charAt(0)){case"[":case".":case"(":O=!0}for(var D=h.length-1;D>-1;D--){var A=h[D],k=o.slice(0,A.reStart),N=o.slice(A.reStart,A.reEnd-8),L=o.slice(A.reEnd-8,A.reEnd),j=o.slice(A.reEnd);L+=j;var M=k.split("(").length-1,F=j;for(T=0;T<M;T++)F=F.replace(/\)[+*?]?/,"");var q="";""===(j=F)&&t!==g&&(q="$"),o=k+N+j+q+L}if(""!==o&&u&&(o="(?=.)"+o),O&&(o=v+o),t===g)return[o,u];if(!u)return e.replace(/\\(.)/g,"$1");var B=n.nocase?"i":"";try{var U=new RegExp("^"+o+"$",B)}catch(e){return new RegExp("$.")}return U._glob=e,U._src=o,U};var g={};p.makeRe=function(e,t){return new h(e,t||{}).makeRe()},h.prototype.makeRe=function(){if(this.regexp||!1===this.regexp)return this.regexp;var e=this.set;if(!e.length)return this.regexp=!1,this.regexp;var t=this.options,n=t.noglobstar?c:t.dot?"(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?":"(?:(?!(?:\\/|^)\\.).)*?",r=t.nocase?"i":"",o=e.map((function(e){return e.map((function(e){return e===i?n:"string"==typeof e?e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"):e._src})).join("\\/")})).join("|");o="^(?:"+o+")$",this.negate&&(o="^(?!"+o+").*$");try{this.regexp=new RegExp(o,r)}catch(e){this.regexp=!1}return this.regexp},p.match=function(e,t,n){var r=new h(t,n=n||{});return e=e.filter((function(e){return r.match(e)})),r.options.nonull&&!e.length&&e.push(t),e},h.prototype.match=function(e,t){if(void 0===t&&(t=this.partial),this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return""===e;if("/"===e&&t)return!0;var n=this.options;"/"!==r.sep&&(e=e.split(r.sep).join("/")),e=e.split(u),this.debug(this.pattern,"split",e);var i,o,s=this.set;for(this.debug(this.pattern,"set",s),o=e.length-1;o>=0&&!(i=e[o]);o--);for(o=0;o<s.length;o++){var a=s[o],c=e;if(n.matchBase&&1===a.length&&(c=[i]),this.matchOne(c,a,t))return!!n.flipNegate||!this.negate}return!n.flipNegate&&this.negate},h.prototype.matchOne=function(e,t,n){var r=this.options;this.debug("matchOne",{this:this,file:e,pattern:t}),this.debug("matchOne",e.length,t.length);for(var o=0,s=0,a=e.length,c=t.length;o<a&&s<c;o++,s++){this.debug("matchOne loop");var l,u=t[s],d=e[o];if(this.debug(t,u,d),!1===u)return!1;if(u===i){this.debug("GLOBSTAR",[t,u,d]);var p=o,h=s+1;if(h===c){for(this.debug("** at the end");o<a;o++)if("."===e[o]||".."===e[o]||!r.dot&&"."===e[o].charAt(0))return!1;return!0}for(;p<a;){var f=e[p];if(this.debug("\nglobstar while",e,p,t,h,f),this.matchOne(e.slice(p),t.slice(h),n))return this.debug("globstar found match!",p,a,f),!0;if("."===f||".."===f||!r.dot&&"."===f.charAt(0)){this.debug("dot detected!",e,p,t,h);break}this.debug("globstar swallow a segment, and continue"),p++}return!(!n||(this.debug("\n>>> no match, partial?",e,p,t,h),p!==a))}if("string"==typeof u?(l=d===u,this.debug("string match",u,d,l)):(l=d.match(u),this.debug("pattern match",u,d,l)),!l)return!1}if(o===a&&s===c)return!0;if(o===a)return n;if(s===c)return o===a-1&&""===e[o];throw new Error("wtf?")}},1055:(e,t,n)=>{"use strict";const r="object"==typeof process&&process?process:{stdout:null,stderr:null},i=n(4434),o=n(2203),s=n(3193).StringDecoder,a=Symbol("EOF"),c=Symbol("maybeEmitEnd"),l=Symbol("emittedEnd"),u=Symbol("emittingEnd"),d=Symbol("emittedError"),p=Symbol("closed"),h=Symbol("read"),f=Symbol("flush"),m=Symbol("flushChunk"),g=Symbol("encoding"),y=Symbol("decoder"),b=Symbol("flowing"),v=Symbol("paused"),S=Symbol("resume"),w=Symbol("bufferLength"),C=Symbol("bufferPush"),T=Symbol("bufferShift"),E=Symbol("objectMode"),_=Symbol("destroyed"),x=Symbol("emitData"),R=Symbol("emitEnd"),I=Symbol("emitEnd2"),P=Symbol("async"),O=e=>Promise.resolve().then(e),D="1"!==global._MP_NO_ITERATOR_SYMBOLS_,A=D&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),k=D&&Symbol.iterator||Symbol("iterator not implemented");class N{constructor(e,t,n){this.src=e,this.dest=t,this.opts=n,this.ondrain=()=>e[S](),t.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(){}end(){this.unpipe(),this.opts.end&&this.dest.end()}}class L extends N{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,t,n){super(e,t,n),this.proxyErrors=e=>t.emit("error",e),e.on("error",this.proxyErrors)}}e.exports=class e extends o{constructor(e){super(),this[b]=!1,this[v]=!1,this.pipes=[],this.buffer=[],this[E]=e&&e.objectMode||!1,this[E]?this[g]=null:this[g]=e&&e.encoding||null,"buffer"===this[g]&&(this[g]=null),this[P]=e&&!!e.async||!1,this[y]=this[g]?new s(this[g]):null,this[a]=!1,this[l]=!1,this[u]=!1,this[p]=!1,this[d]=null,this.writable=!0,this.readable=!0,this[w]=0,this[_]=!1}get bufferLength(){return this[w]}get encoding(){return this[g]}set encoding(e){if(this[E])throw new Error("cannot set encoding in objectMode");if(this[g]&&e!==this[g]&&(this[y]&&this[y].lastNeed||this[w]))throw new Error("cannot change encoding");this[g]!==e&&(this[y]=e?new s(e):null,this.buffer.length&&(this.buffer=this.buffer.map((e=>this[y].write(e))))),this[g]=e}setEncoding(e){this.encoding=e}get objectMode(){return this[E]}set objectMode(e){this[E]=this[E]||!!e}get async(){return this[P]}set async(e){this[P]=this[P]||!!e}write(e,t,n){if(this[a])throw new Error("write after end");if(this[_])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;"function"==typeof t&&(n=t,t="utf8"),t||(t="utf8");const r=this[P]?O:e=>e();var i;return this[E]||Buffer.isBuffer(e)||(i=e,!Buffer.isBuffer(i)&&ArrayBuffer.isView(i)?e=Buffer.from(e.buffer,e.byteOffset,e.byteLength):(e=>e instanceof ArrayBuffer||"object"==typeof e&&e.constructor&&"ArrayBuffer"===e.constructor.name&&e.byteLength>=0)(e)?e=Buffer.from(e):"string"!=typeof e&&(this.objectMode=!0)),this[E]?(this.flowing&&0!==this[w]&&this[f](!0),this.flowing?this.emit("data",e):this[C](e),0!==this[w]&&this.emit("readable"),n&&r(n),this.flowing):e.length?("string"!=typeof e||t===this[g]&&!this[y].lastNeed||(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[g]&&(e=this[y].write(e)),this.flowing&&0!==this[w]&&this[f](!0),this.flowing?this.emit("data",e):this[C](e),0!==this[w]&&this.emit("readable"),n&&r(n),this.flowing):(0!==this[w]&&this.emit("readable"),n&&r(n),this.flowing)}read(e){if(this[_])return null;if(0===this[w]||0===e||e>this[w])return this[c](),null;this[E]&&(e=null),this.buffer.length>1&&!this[E]&&(this.encoding?this.buffer=[this.buffer.join("")]:this.buffer=[Buffer.concat(this.buffer,this[w])]);const t=this[h](e||null,this.buffer[0]);return this[c](),t}[h](e,t){return e===t.length||null===e?this[T]():(this.buffer[0]=t.slice(e),t=t.slice(0,e),this[w]-=e),this.emit("data",t),this.buffer.length||this[a]||this.emit("drain"),t}end(e,t,n){return"function"==typeof e&&(n=e,e=null),"function"==typeof t&&(n=t,t="utf8"),e&&this.write(e,t),n&&this.once("end",n),this[a]=!0,this.writable=!1,!this.flowing&&this[v]||this[c](),this}[S](){this[_]||(this[v]=!1,this[b]=!0,this.emit("resume"),this.buffer.length?this[f]():this[a]?this[c]():this.emit("drain"))}resume(){return this[S]()}pause(){this[b]=!1,this[v]=!0}get destroyed(){return this[_]}get flowing(){return this[b]}get paused(){return this[v]}[C](e){this[E]?this[w]+=1:this[w]+=e.length,this.buffer.push(e)}[T](){return this.buffer.length&&(this[E]?this[w]-=1:this[w]-=this.buffer[0].length),this.buffer.shift()}[f](e){do{}while(this[m](this[T]()));e||this.buffer.length||this[a]||this.emit("drain")}[m](e){return!!e&&(this.emit("data",e),this.flowing)}pipe(e,t){if(this[_])return;const n=this[l];return t=t||{},e===r.stdout||e===r.stderr?t.end=!1:t.end=!1!==t.end,t.proxyErrors=!!t.proxyErrors,n?t.end&&e.end():(this.pipes.push(t.proxyErrors?new L(this,e,t):new N(this,e,t)),this[P]?O((()=>this[S]())):this[S]()),e}unpipe(e){const t=this.pipes.find((t=>t.dest===e));t&&(this.pipes.splice(this.pipes.indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){const n=super.on(e,t);return"data"!==e||this.pipes.length||this.flowing?"readable"===e&&0!==this[w]?super.emit("readable"):(e=>"end"===e||"finish"===e||"prefinish"===e)(e)&&this[l]?(super.emit(e),this.removeAllListeners(e)):"error"===e&&this[d]&&(this[P]?O((()=>t.call(this,this[d]))):t.call(this,this[d])):this[S](),n}get emittedEnd(){return this[l]}[c](){this[u]||this[l]||this[_]||0!==this.buffer.length||!this[a]||(this[u]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[p]&&this.emit("close"),this[u]=!1)}emit(e,t,...n){if("error"!==e&&"close"!==e&&e!==_&&this[_])return;if("data"===e)return!!t&&(this[P]?O((()=>this[x](t))):this[x](t));if("end"===e)return this[R]();if("close"===e){if(this[p]=!0,!this[l]&&!this[_])return;const e=super.emit("close");return this.removeAllListeners("close"),e}if("error"===e){this[d]=t;const e=super.emit("error",t);return this[c](),e}if("resume"===e){const e=super.emit("resume");return this[c](),e}if("finish"===e||"prefinish"===e){const t=super.emit(e);return this.removeAllListeners(e),t}const r=super.emit(e,t,...n);return this[c](),r}[x](e){for(const t of this.pipes)!1===t.dest.write(e)&&this.pause();const t=super.emit("data",e);return this[c](),t}[R](){this[l]||(this[l]=!0,this.readable=!1,this[P]?O((()=>this[I]())):this[I]())}[I](){if(this[y]){const e=this[y].end();if(e){for(const t of this.pipes)t.dest.write(e);super.emit("data",e)}}for(const e of this.pipes)e.end();const e=super.emit("end");return this.removeAllListeners("end"),e}collect(){const e=[];this[E]||(e.dataLength=0);const t=this.promise();return this.on("data",(t=>{e.push(t),this[E]||(e.dataLength+=t.length)})),t.then((()=>e))}concat(){return this[E]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then((e=>this[E]?Promise.reject(new Error("cannot concat in objectMode")):this[g]?e.join(""):Buffer.concat(e,e.dataLength)))}promise(){return new Promise(((e,t)=>{this.on(_,(()=>t(new Error("stream destroyed")))),this.on("error",(e=>t(e))),this.on("end",(()=>e()))}))}[A](){return{next:()=>{const e=this.read();if(null!==e)return Promise.resolve({done:!1,value:e});if(this[a])return Promise.resolve({done:!0});let t=null,n=null;const r=e=>{this.removeListener("data",i),this.removeListener("end",o),n(e)},i=e=>{this.removeListener("error",r),this.removeListener("end",o),this.pause(),t({value:e,done:!!this[a]})},o=()=>{this.removeListener("error",r),this.removeListener("data",i),t({done:!0})},s=()=>r(new Error("stream destroyed"));return new Promise(((e,a)=>{n=a,t=e,this.once(_,s),this.once("error",r),this.once("end",o),this.once("data",i)}))}}}[k](){return{next:()=>{const e=this.read();return{value:e,done:null===e}}}}destroy(e){return this[_]?(e?this.emit("error",e):this.emit(_),this):(this[_]=!0,this.buffer.length=0,this[w]=0,"function"!=typeof this.close||this[p]||this.close(),e?this.emit("error",e):this.emit(_),this)}static isStream(t){return!!t&&(t instanceof e||t instanceof o||t instanceof i&&("function"==typeof t.pipe||"function"==typeof t.write&&"function"==typeof t.end))}}},262:(e,t,n)=>{const r=n(3106).constants||{ZLIB_VERNUM:4736};e.exports=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:1/0,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},r))},6259:(e,t,n)=>{"use strict";const r=n(2613),i=n(181).Buffer,o=n(3106),s=t.constants=n(262),a=n(1055),c=i.concat,l=Symbol("_superWrite");class u extends Error{constructor(e){super("zlib: "+e.message),this.code=e.code,this.errno=e.errno,this.code||(this.code="ZLIB_ERROR"),this.message="zlib: "+e.message,Error.captureStackTrace(this,this.constructor)}get name(){return"ZlibError"}}const d=Symbol("opts"),p=Symbol("flushFlag"),h=Symbol("finishFlushFlag"),f=Symbol("fullFlushFlag"),m=Symbol("handle"),g=Symbol("onError"),y=Symbol("sawError"),b=Symbol("level"),v=Symbol("strategy"),S=Symbol("ended");Symbol("_defaultFullFlush");class w extends a{constructor(e,t){if(!e||"object"!=typeof e)throw new TypeError("invalid options for ZlibBase constructor");super(e),this[y]=!1,this[S]=!1,this[d]=e,this[p]=e.flush,this[h]=e.finishFlush;try{this[m]=new o[t](e)}catch(e){throw new u(e)}this[g]=e=>{this[y]||(this[y]=!0,this.close(),this.emit("error",e))},this[m].on("error",(e=>this[g](new u(e)))),this.once("end",(()=>this.close))}close(){this[m]&&(this[m].close(),this[m]=null,this.emit("close"))}reset(){if(!this[y])return r(this[m],"zlib binding closed"),this[m].reset()}flush(e){this.ended||("number"!=typeof e&&(e=this[f]),this.write(Object.assign(i.alloc(0),{[p]:e})))}end(e,t,n){return e&&this.write(e,t),this.flush(this[h]),this[S]=!0,super.end(null,null,n)}get ended(){return this[S]}write(e,t,n){if("function"==typeof t&&(n=t,t="utf8"),"string"==typeof e&&(e=i.from(e,t)),this[y])return;r(this[m],"zlib binding closed");const o=this[m]._handle,s=o.close;o.close=()=>{};const a=this[m].close;let d,h;this[m].close=()=>{},i.concat=e=>e;try{const t="number"==typeof e[p]?e[p]:this[p];d=this[m]._processChunk(e,t),i.concat=c}catch(e){i.concat=c,this[g](new u(e))}finally{this[m]&&(this[m]._handle=o,o.close=s,this[m].close=a,this[m].removeAllListeners("error"))}if(this[m]&&this[m].on("error",(e=>this[g](new u(e)))),d)if(Array.isArray(d)&&d.length>0){h=this[l](i.from(d[0]));for(let e=1;e<d.length;e++)h=this[l](d[e])}else h=this[l](i.from(d));return n&&n(),h}[l](e){return super.write(e)}}class C extends w{constructor(e,t){(e=e||{}).flush=e.flush||s.Z_NO_FLUSH,e.finishFlush=e.finishFlush||s.Z_FINISH,super(e,t),this[f]=s.Z_FULL_FLUSH,this[b]=e.level,this[v]=e.strategy}params(e,t){if(!this[y]){if(!this[m])throw new Error("cannot switch params when binding is closed");if(!this[m].params)throw new Error("not supported in this implementation");if(this[b]!==e||this[v]!==t){this.flush(s.Z_SYNC_FLUSH),r(this[m],"zlib binding closed");const n=this[m].flush;this[m].flush=(e,t)=>{this.flush(e),t()};try{this[m].params(e,t)}finally{this[m].flush=n}this[m]&&(this[b]=e,this[v]=t)}}}}const T=Symbol("_portable");class E extends w{constructor(e,t){(e=e||{}).flush=e.flush||s.BROTLI_OPERATION_PROCESS,e.finishFlush=e.finishFlush||s.BROTLI_OPERATION_FINISH,super(e,t),this[f]=s.BROTLI_OPERATION_FLUSH}}t.Deflate=class extends C{constructor(e){super(e,"Deflate")}},t.Inflate=class extends C{constructor(e){super(e,"Inflate")}},t.Gzip=class extends C{constructor(e){super(e,"Gzip"),this[T]=e&&!!e.portable}[l](e){return this[T]?(this[T]=!1,e[9]=255,super[l](e)):super[l](e)}},t.Gunzip=class extends C{constructor(e){super(e,"Gunzip")}},t.DeflateRaw=class extends C{constructor(e){super(e,"DeflateRaw")}},t.InflateRaw=class extends C{constructor(e){super(e,"InflateRaw")}},t.Unzip=class extends C{constructor(e){super(e,"Unzip")}},"function"==typeof o.BrotliCompress?(t.BrotliCompress=class extends E{constructor(e){super(e,"BrotliCompress")}},t.BrotliDecompress=class extends E{constructor(e){super(e,"BrotliDecompress")}}):t.BrotliCompress=t.BrotliDecompress=class{constructor(){throw new Error("Brotli is not supported in this version of Node.js")}}},3480:(e,t,n)=>{const r=n(5737),i=n(1276),{mkdirpNative:o,mkdirpNativeSync:s}=n(3831),{mkdirpManual:a,mkdirpManualSync:c}=n(6990),{useNative:l,useNativeSync:u}=n(4443),d=(e,t)=>(e=i(e),t=r(t),l(t)?o(e,t):a(e,t));d.sync=(e,t)=>(e=i(e),t=r(t),u(t)?s(e,t):c(e,t)),d.native=(e,t)=>o(i(e),r(t)),d.manual=(e,t)=>a(i(e),r(t)),d.nativeSync=(e,t)=>s(i(e),r(t)),d.manualSync=(e,t)=>c(i(e),r(t)),e.exports=d},4523:(e,t,n)=>{const{dirname:r}=n(6928),i=(e,t,n=void 0)=>n===t?Promise.resolve():e.statAsync(t).then((e=>e.isDirectory()?n:void 0),(n=>"ENOENT"===n.code?i(e,r(t),t):void 0)),o=(e,t,n=void 0)=>{if(n!==t)try{return e.statSync(t).isDirectory()?n:void 0}catch(n){return"ENOENT"===n.code?o(e,r(t),t):void 0}};e.exports={findMade:i,findMadeSync:o}},6990:(e,t,n)=>{const{dirname:r}=n(6928),i=(e,t,n)=>{t.recursive=!1;const o=r(e);return o===e?t.mkdirAsync(e,t).catch((e=>{if("EISDIR"!==e.code)throw e})):t.mkdirAsync(e,t).then((()=>n||e),(r=>{if("ENOENT"===r.code)return i(o,t).then((n=>i(e,t,n)));if("EEXIST"!==r.code&&"EROFS"!==r.code)throw r;return t.statAsync(e).then((e=>{if(e.isDirectory())return n;throw r}),(()=>{throw r}))}))},o=(e,t,n)=>{const i=r(e);if(t.recursive=!1,i===e)try{return t.mkdirSync(e,t)}catch(e){if("EISDIR"!==e.code)throw e;return}try{return t.mkdirSync(e,t),n||e}catch(r){if("ENOENT"===r.code)return o(e,t,o(i,t,n));if("EEXIST"!==r.code&&"EROFS"!==r.code)throw r;try{if(!t.statSync(e).isDirectory())throw r}catch(e){throw r}}};e.exports={mkdirpManual:i,mkdirpManualSync:o}},3831:(e,t,n)=>{const{dirname:r}=n(6928),{findMade:i,findMadeSync:o}=n(4523),{mkdirpManual:s,mkdirpManualSync:a}=n(6990);e.exports={mkdirpNative:(e,t)=>(t.recursive=!0,r(e)===e?t.mkdirAsync(e,t):i(t,e).then((n=>t.mkdirAsync(e,t).then((()=>n)).catch((n=>{if("ENOENT"===n.code)return s(e,t);throw n}))))),mkdirpNativeSync:(e,t)=>{if(t.recursive=!0,r(e)===e)return t.mkdirSync(e,t);const n=o(t,e);try{return t.mkdirSync(e,t),n}catch(n){if("ENOENT"===n.code)return a(e,t);throw n}}}},5737:(e,t,n)=>{const{promisify:r}=n(9023),i=n(9896);e.exports=e=>{if(e)if("object"==typeof e)e={mode:511,fs:i,...e};else if("number"==typeof e)e={mode:e,fs:i};else{if("string"!=typeof e)throw new TypeError("invalid options argument");e={mode:parseInt(e,8),fs:i}}else e={mode:511,fs:i};return e.mkdir=e.mkdir||e.fs.mkdir||i.mkdir,e.mkdirAsync=r(e.mkdir),e.stat=e.stat||e.fs.stat||i.stat,e.statAsync=r(e.stat),e.statSync=e.statSync||e.fs.statSync||i.statSync,e.mkdirSync=e.mkdirSync||e.fs.mkdirSync||i.mkdirSync,e}},1276:(e,t,n)=>{const r=process.env.__TESTING_MKDIRP_PLATFORM__||process.platform,{resolve:i,parse:o}=n(6928);e.exports=e=>{if(/\0/.test(e))throw Object.assign(new TypeError("path must be a string without null bytes"),{path:e,code:"ERR_INVALID_ARG_VALUE"});if(e=i(e),"win32"===r){const t=/[*|"<>?:]/,{root:n}=o(e);if(t.test(e.substr(n.length)))throw Object.assign(new Error("Illegal characters in path."),{path:e,code:"EINVAL"})}return e}},4443:(e,t,n)=>{const r=n(9896),i=(process.env.__TESTING_MKDIRP_NODE_VERSION__||process.version).replace(/^v/,"").split("."),o=+i[0]>10||10==+i[0]&&+i[1]>=12,s=o?e=>e.mkdir===r.mkdir:()=>!1,a=o?e=>e.mkdirSync===r.mkdirSync:()=>!1;e.exports={useNative:s,useNativeSync:a}},6585:e=>{var t=1e3,n=60*t,r=60*n,i=24*r,o=7*i;function s(e,t,n,r){var i=t>=1.5*n;return Math.round(e/n)+" "+r+(i?"s":"")}e.exports=function(e,a){a=a||{};var c,l,u=typeof e;if("string"===u&&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*o;case"days":case"day":case"d":return a*i;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"===u&&isFinite(e))return a.long?(c=e,(l=Math.abs(c))>=i?s(c,l,i,"day"):l>=r?s(c,l,r,"hour"):l>=n?s(c,l,n,"minute"):l>=t?s(c,l,t,"second"):c+" ms"):function(e){var o=Math.abs(e);return o>=i?Math.round(e/i)+"d":o>=r?Math.round(e/r)+"h":o>=n?Math.round(e/n)+"m":o>=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))}},3519:(e,t,n)=>{var r=n(6587);function i(e){var t=function(){return t.called?t.value:(t.called=!0,t.value=e.apply(this,arguments))};return t.called=!1,t}function o(e){var t=function(){if(t.called)throw new Error(t.onceError);return t.called=!0,t.value=e.apply(this,arguments)},n=e.name||"Function wrapped with `once`";return t.onceError=n+" shouldn't be called more than once",t.called=!1,t}e.exports=r(i),e.exports.strict=r(o),i.proto=i((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return i(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return o(this)},configurable:!0})}))},3726:e=>{"use strict";var t="win32"===process.platform,n=t?/[^:]\\$/:/.\/$/;e.exports=function(){var e;return e=t?process.env.TEMP||process.env.TMP||(process.env.SystemRoot||process.env.windir)+"\\temp":process.env.TMPDIR||process.env.TMP||process.env.TEMP||"/tmp",n.test(e)&&(e=e.slice(0,-1)),e}},2641:e=>{"use strict";function t(e){return"/"===e.charAt(0)}function n(e){var t=/^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/.exec(e),n=t[1]||"",r=Boolean(n&&":"!==n.charAt(1));return Boolean(t[2]||r)}e.exports="win32"===process.platform?n:t,e.exports.posix=t,e.exports.win32=n},1436:e=>{function t(){this.pending=0,this.max=1/0,this.listeners=[],this.waiting=[],this.error=null}function n(e){e.pending+=1;var t=!1;return function(i){if(t)throw new Error("callback called twice");if(t=!0,e.error=e.error||i,e.pending-=1,e.waiting.length>0&&e.pending<e.max)r(e,e.waiting.shift());else if(0===e.pending){var o=e.listeners;e.listeners=[],o.forEach(n)}};function n(t){t(e.error)}}function r(e,t){t(n(e))}e.exports=t,t.prototype.go=function(e){this.pending<this.max?r(this,e):this.waiting.push(e)},t.prototype.wait=function(e){0===this.pending?e(this.error):this.listeners.push(e)},t.prototype.hold=function(){return n(this)}},5617:(e,t,n)=>{e.exports=n(8303)},8303:(e,t,n)=>{var r=n(3961);t.operation=function(e){var n=t.timeouts(e);return new r(n,{forever:e&&(e.forever||e.retries===1/0),unref:e&&e.unref,maxRetryTime:e&&e.maxRetryTime})},t.timeouts=function(e){if(e instanceof Array)return[].concat(e);var t={retries:10,factor:2,minTimeout:1e3,maxTimeout:1/0,randomize:!1};for(var n in e)t[n]=e[n];if(t.minTimeout>t.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var r=[],i=0;i<t.retries;i++)r.push(this.createTimeout(i,t));return e&&e.forever&&!r.length&&r.push(this.createTimeout(i,t)),r.sort((function(e,t){return e-t})),r},t.createTimeout=function(e,t){var n=t.randomize?Math.random()+1:1,r=Math.round(n*Math.max(t.minTimeout,1)*Math.pow(t.factor,e));return Math.min(r,t.maxTimeout)},t.wrap=function(e,n,r){if(n instanceof Array&&(r=n,n=null),!r)for(var i in r=[],e)"function"==typeof e[i]&&r.push(i);for(var o=0;o<r.length;o++){var s=r[o],a=e[s];e[s]=function(r){var i=t.operation(n),o=Array.prototype.slice.call(arguments,1),s=o.pop();o.push((function(e){i.retry(e)||(e&&(arguments[0]=i.mainError()),s.apply(this,arguments))})),i.attempt((function(){r.apply(e,o)}))}.bind(e,a),e[s].options=n}}},3961:e=>{function t(e,t){"boolean"==typeof t&&(t={forever:t}),this._originalTimeouts=JSON.parse(JSON.stringify(e)),this._timeouts=e,this._options=t||{},this._maxRetryTime=t&&t.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}e.exports=t,t.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)},t.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timer&&clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null},t.prototype.retry=function(e){if(this._timeout&&clearTimeout(this._timeout),!e)return!1;var t=(new Date).getTime();if(e&&t-this._operationStart>=this._maxRetryTime)return this._errors.push(e),this._errors.unshift(new Error("RetryOperation timeout occurred")),!1;this._errors.push(e);var n=this._timeouts.shift();if(void 0===n){if(!this._cachedTimeouts)return!1;this._errors.splice(0,this._errors.length-1),n=this._cachedTimeouts.slice(-1)}var r=this;return this._timer=setTimeout((function(){r._attempts++,r._operationTimeoutCb&&(r._timeout=setTimeout((function(){r._operationTimeoutCb(r._attempts)}),r._operationTimeout),r._options.unref&&r._timeout.unref()),r._fn(r._attempts)}),n),this._options.unref&&this._timer.unref(),!0},t.prototype.attempt=function(e,t){this._fn=e,t&&(t.timeout&&(this._operationTimeout=t.timeout),t.cb&&(this._operationTimeoutCb=t.cb));var n=this;this._operationTimeoutCb&&(this._timeout=setTimeout((function(){n._operationTimeoutCb()}),n._operationTimeout)),this._operationStart=(new Date).getTime(),this._fn(this._attempts)},t.prototype.try=function(e){console.log("Using RetryOperation.try() is deprecated"),this.attempt(e)},t.prototype.start=function(e){console.log("Using RetryOperation.start() is deprecated"),this.attempt(e)},t.prototype.start=t.prototype.try,t.prototype.errors=function(){return this._errors},t.prototype.attempts=function(){return this._attempts},t.prototype.mainError=function(){if(0===this._errors.length)return null;for(var e={},t=null,n=0,r=0;r<this._errors.length;r++){var i=this._errors[r],o=i.message,s=(e[o]||0)+1;e[o]=s,s>=n&&(t=i,n=s)}return t}},7983:e=>{const t=/^[-+]?0x[a-fA-F0-9]+$/,n=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const r={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};e.exports=function(e,i={}){if(i=Object.assign({},r,i),!e||"string"!=typeof e)return e;let o=e.trim();if(void 0!==i.skipLike&&i.skipLike.test(o))return e;if(i.hex&&t.test(o))return Number.parseInt(o,16);{const t=n.exec(o);if(t){const n=t[1],r=t[2];let a=(s=t[3])&&-1!==s.indexOf(".")?("."===(s=s.replace(/0+$/,""))?s="0":"."===s[0]?s="0"+s:"."===s[s.length-1]&&(s=s.substr(0,s.length-1)),s):s;const c=t[4]||t[6];if(!i.leadingZeros&&r.length>0&&n&&"."!==o[2])return e;if(!i.leadingZeros&&r.length>0&&!n&&"."!==o[1])return e;{const t=Number(o),s=""+t;return-1!==s.search(/[eE]/)||c?i.eNotation?t:e:-1!==o.indexOf(".")?"0"===s&&""===a||s===a||n&&s==="-"+a?t:e:r?a===s||n+a===s?t:e:o===s||o===n+s?t:e}}return e}var s}},7687:(e,t,n)=>{"use strict";const r=n(857),i=n(2018),o=n(5884),{env:s}=process;let a;function c(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function l(e,t){if(0===a)return 0;if(o("color=16m")||o("color=full")||o("color=truecolor"))return 3;if(o("color=256"))return 2;if(e&&!t&&void 0===a)return 0;const n=a||0;if("dumb"===s.TERM)return n;if("win32"===process.platform){const e=r.release().split(".");return Number(e[0])>=10&&Number(e[2])>=10586?Number(e[2])>=14931?3:2:1}if("CI"in s)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((e=>e in s))||"codeship"===s.CI_NAME?1:n;if("TEAMCITY_VERSION"in s)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(s.TEAMCITY_VERSION)?1:0;if("truecolor"===s.COLORTERM)return 3;if("TERM_PROGRAM"in s){const e=parseInt((s.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(s.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(s.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(s.TERM)||"COLORTERM"in s?1:n}o("no-color")||o("no-colors")||o("color=false")||o("color=never")?a=0:(o("color")||o("colors")||o("color=true")||o("color=always"))&&(a=1),"FORCE_COLOR"in s&&(a="true"===s.FORCE_COLOR?1:"false"===s.FORCE_COLOR?0:0===s.FORCE_COLOR.length?1:Math.min(parseInt(s.FORCE_COLOR,10),3)),e.exports={supportsColor:function(e){return c(l(e,e&&e.isTTY))},stdout:c(l(!0,i.isatty(1))),stderr:c(l(!0,i.isatty(2)))}},6244:(e,t,n)=>{"use strict";t.c=t.create=n(3206),t.r=t.replace=n(5624),t.t=t.list=n(6170),t.u=t.update=n(3739),t.x=t.extract=n(7257),t.Pack=n(2239),t.Unpack=n(9160),t.Parse=n(5683),t.ReadEntry=n(6643),t.WriteEntry=n(3662),t.Header=n(2215),t.Pax=n(1673),t.types=n(2133)},3206:(e,t,n)=>{"use strict";const r=n(3385),i=n(2239),o=n(1475),s=n(6170),a=n(6928);e.exports=(e,t,n)=>{if("function"==typeof t&&(n=t),Array.isArray(e)&&(t=e,e={}),!t||!Array.isArray(t)||!t.length)throw new TypeError("no files or directories specified");t=Array.from(t);const i=r(e);if(i.sync&&"function"==typeof n)throw new TypeError("callback not supported for sync tar functions");if(!i.file&&"function"==typeof n)throw new TypeError("callback only supported with file option");return i.file&&i.sync?c(i,t):i.file?l(i,t,n):i.sync?p(i,t):h(i,t)};const c=(e,t)=>{const n=new i.Sync(e),r=new o.WriteStreamSync(e.file,{mode:e.mode||438});n.pipe(r),u(n,t)},l=(e,t,n)=>{const r=new i(e),s=new o.WriteStream(e.file,{mode:e.mode||438});r.pipe(s);const a=new Promise(((e,t)=>{s.on("error",t),s.on("close",e),r.on("error",t)}));return d(r,t),n?a.then(n,n):a},u=(e,t)=>{t.forEach((t=>{"@"===t.charAt(0)?s({file:a.resolve(e.cwd,t.slice(1)),sync:!0,noResume:!0,onentry:t=>e.add(t)}):e.add(t)})),e.end()},d=(e,t)=>{for(;t.length;){const n=t.shift();if("@"===n.charAt(0))return s({file:a.resolve(e.cwd,n.slice(1)),noResume:!0,onentry:t=>e.add(t)}).then((n=>d(e,t)));e.add(n)}e.end()},p=(e,t)=>{const n=new i.Sync(e);return u(n,t),n},h=(e,t)=>{const n=new i(e);return d(n,t),n}},7257:(e,t,n)=>{"use strict";const r=n(3385),i=n(9160),o=n(9896),s=n(1475),a=n(6928),c=n(7963);e.exports=(e,t,n)=>{"function"==typeof e?(n=e,t=null,e={}):Array.isArray(e)&&(t=e,e={}),"function"==typeof t&&(n=t,t=null),t=t?Array.from(t):[];const i=r(e);if(i.sync&&"function"==typeof n)throw new TypeError("callback not supported for sync tar functions");if(!i.file&&"function"==typeof n)throw new TypeError("callback only supported with file option");return t.length&&l(i,t),i.file&&i.sync?u(i):i.file?d(i,n):i.sync?p(i):h(i)};const l=(e,t)=>{const n=new Map(t.map((e=>[c(e),!0]))),r=e.filter,i=(e,t)=>{const r=t||a.parse(e).root||".",o=e!==r&&(n.has(e)?n.get(e):i(a.dirname(e),r));return n.set(e,o),o};e.filter=r?(e,t)=>r(e,t)&&i(c(e)):e=>i(c(e))},u=e=>{const t=new i.Sync(e),n=e.file,r=o.statSync(n),a=e.maxReadSize||16777216;new s.ReadStreamSync(n,{readSize:a,size:r.size}).pipe(t)},d=(e,t)=>{const n=new i(e),r=e.maxReadSize||16777216,a=e.file,c=new Promise(((e,t)=>{n.on("error",t),n.on("close",e),o.stat(a,((e,i)=>{if(e)t(e);else{const e=new s.ReadStream(a,{readSize:r,size:i.size});e.on("error",t),e.pipe(n)}}))}));return t?c.then(t,t):c},p=e=>new i.Sync(e),h=e=>new i(e)},5865:(e,t,n)=>{const r="win32"===(process.env.__FAKE_PLATFORM__||process.platform),i=global.__FAKE_TESTING_FS__||n(9896),{O_CREAT:o,O_TRUNC:s,O_WRONLY:a,UV_FS_O_FILEMAP:c=0}=i.constants,l=r&&!!c,u=c|s|o|a;e.exports=l?e=>e<524288?u:"w":()=>"w"},2215:(e,t,n)=>{"use strict";const r=n(2133),i=n(6928).posix,o=n(4520),s=Symbol("slurp"),a=Symbol("type"),c=(e,t,n)=>e.slice(t,t+n).toString("utf8").replace(/\0.*/,""),l=(e,t,n)=>u(d(e,t,n)),u=e=>null===e?null:new Date(1e3*e),d=(e,t,n)=>128&e[t]?o.parse(e.slice(t,t+n)):p(e,t,n),p=(e,t,n)=>{return r=parseInt(e.slice(t,t+n).toString("utf8").replace(/\0.*$/,"").trim(),8),isNaN(r)?null:r;var r},h={12:8589934591,8:2097151},f=(e,t,n,r)=>null!==r&&(r>h[n]||r<0?(o.encode(r,e.slice(t,t+n)),!0):(m(e,t,n,r),!1)),m=(e,t,n,r)=>e.write(g(r,n),t,n,"ascii"),g=(e,t)=>y(Math.floor(e).toString(8),t),y=(e,t)=>(e.length===t-1?e:new Array(t-e.length-1).join("0")+e+" ")+"\0",b=(e,t,n,r)=>null!==r&&f(e,t,n,r.getTime()/1e3),v=new Array(156).join("\0"),S=(e,t,n,r)=>null!==r&&(e.write(r+v,t,n,"utf8"),r.length!==Buffer.byteLength(r)||r.length>n);e.exports=class{constructor(e,t,n,r){this.cksumValid=!1,this.needPax=!1,this.nullBlock=!1,this.block=null,this.path=null,this.mode=null,this.uid=null,this.gid=null,this.size=null,this.mtime=null,this.cksum=null,this[a]="0",this.linkpath=null,this.uname=null,this.gname=null,this.devmaj=0,this.devmin=0,this.atime=null,this.ctime=null,Buffer.isBuffer(e)?this.decode(e,t||0,n,r):e&&this.set(e)}decode(e,t,n,r){if(t||(t=0),!(e&&e.length>=t+512))throw new Error("need 512 bytes for header");if(this.path=c(e,t,100),this.mode=d(e,t+100,8),this.uid=d(e,t+108,8),this.gid=d(e,t+116,8),this.size=d(e,t+124,12),this.mtime=l(e,t+136,12),this.cksum=d(e,t+148,12),this[s](n),this[s](r,!0),this[a]=c(e,t+156,1),""===this[a]&&(this[a]="0"),"0"===this[a]&&"/"===this.path.slice(-1)&&(this[a]="5"),"5"===this[a]&&(this.size=0),this.linkpath=c(e,t+157,100),"ustar\x0000"===e.slice(t+257,t+265).toString())if(this.uname=c(e,t+265,32),this.gname=c(e,t+297,32),this.devmaj=d(e,t+329,8),this.devmin=d(e,t+337,8),0!==e[t+475]){const n=c(e,t+345,155);this.path=n+"/"+this.path}else{const n=c(e,t+345,130);n&&(this.path=n+"/"+this.path),this.atime=l(e,t+476,12),this.ctime=l(e,t+488,12)}let i=256;for(let n=t;n<t+148;n++)i+=e[n];for(let n=t+156;n<t+512;n++)i+=e[n];this.cksumValid=i===this.cksum,null===this.cksum&&256===i&&(this.nullBlock=!0)}[s](e,t){for(const n in e)null===e[n]||void 0===e[n]||t&&"path"===n||(this[n]=e[n])}encode(e,t){if(e||(e=this.block=Buffer.alloc(512),t=0),t||(t=0),!(e.length>=t+512))throw new Error("need 512 bytes for header");const n=this.ctime||this.atime?130:155,r=((e,t)=>{let n,r=e,o="";const s=i.parse(e).root||".";if(Buffer.byteLength(r)<100)n=[r,o,!1];else{o=i.dirname(r),r=i.basename(r);do{Buffer.byteLength(r)<=100&&Buffer.byteLength(o)<=t?n=[r,o,!1]:Buffer.byteLength(r)>100&&Buffer.byteLength(o)<=t?n=[r.slice(0,99),o,!0]:(r=i.join(i.basename(o),r),o=i.dirname(o))}while(o!==s&&!n);n||(n=[e.slice(0,99),"",!0])}return n})(this.path||"",n),o=r[0],s=r[1];this.needPax=r[2],this.needPax=S(e,t,100,o)||this.needPax,this.needPax=f(e,t+100,8,this.mode)||this.needPax,this.needPax=f(e,t+108,8,this.uid)||this.needPax,this.needPax=f(e,t+116,8,this.gid)||this.needPax,this.needPax=f(e,t+124,12,this.size)||this.needPax,this.needPax=b(e,t+136,12,this.mtime)||this.needPax,e[t+156]=this[a].charCodeAt(0),this.needPax=S(e,t+157,100,this.linkpath)||this.needPax,e.write("ustar\x0000",t+257,8),this.needPax=S(e,t+265,32,this.uname)||this.needPax,this.needPax=S(e,t+297,32,this.gname)||this.needPax,this.needPax=f(e,t+329,8,this.devmaj)||this.needPax,this.needPax=f(e,t+337,8,this.devmin)||this.needPax,this.needPax=S(e,t+345,n,s)||this.needPax,0!==e[t+475]?this.needPax=S(e,t+345,155,s)||this.needPax:(this.needPax=S(e,t+345,130,s)||this.needPax,this.needPax=b(e,t+476,12,this.atime)||this.needPax,this.needPax=b(e,t+488,12,this.ctime)||this.needPax);let c=256;for(let n=t;n<t+148;n++)c+=e[n];for(let n=t+156;n<t+512;n++)c+=e[n];return this.cksum=c,f(e,t+148,8,this.cksum),this.cksumValid=!0,this.needPax}set(e){for(const t in e)null!==e[t]&&void 0!==e[t]&&(this[t]=e[t])}get type(){return r.name.get(this[a])||this[a]}get typeKey(){return this[a]}set type(e){r.code.has(e)?this[a]=r.code.get(e):this[a]=e}}},3385:e=>{"use strict";const t=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"]]);e.exports=e=>e?Object.keys(e).map((n=>[t.has(n)?t.get(n):n,e[n]])).reduce(((e,t)=>(e[t[0]]=t[1],e)),Object.create(null)):{}},4520:e=>{"use strict";const t=e=>255&(255^e),n=e=>1+(255^e)&255;e.exports={encode:(e,r)=>{if(!Number.isSafeInteger(e))throw Error("cannot encode number outside of javascript safe integer range");return e<0?((e,r)=>{r[0]=255;var i=!1;e*=-1;for(var o=r.length;o>1;o--){var s=255&e;e=Math.floor(e/256),i?r[o-1]=t(s):0===s?r[o-1]=0:(i=!0,r[o-1]=n(s))}})(e,r):((e,t)=>{t[0]=128;for(var n=t.length;n>1;n--)t[n-1]=255&e,e=Math.floor(e/256)})(e,r),r},parse:e=>{const r=e[0],i=128===r?(e=>{for(var t=e.length,n=0,r=t-1;r>-1;r--){var i=e[r];0!==i&&(n+=i*Math.pow(256,t-r-1))}return n})(e.slice(1,e.length)):255===r?(e=>{for(var r=e.length,i=0,o=!1,s=r-1;s>-1;s--){var a,c=e[s];o?a=t(c):0===c?a=c:(o=!0,a=n(c)),0!==a&&(i-=a*Math.pow(256,r-s-1))}return i})(e):null;if(null===i)throw Error("invalid base256 encoding");if(!Number.isSafeInteger(i))throw Error("parsed number outside of javascript safe integer range");return i}}},6170:(e,t,n)=>{"use strict";const r=n(3385),i=n(5683),o=n(9896),s=n(1475),a=n(6928),c=n(7963);e.exports=(e,t,n)=>{"function"==typeof e?(n=e,t=null,e={}):Array.isArray(e)&&(t=e,e={}),"function"==typeof t&&(n=t,t=null),t=t?Array.from(t):[];const i=r(e);if(i.sync&&"function"==typeof n)throw new TypeError("callback not supported for sync tar functions");if(!i.file&&"function"==typeof n)throw new TypeError("callback only supported with file option");return t.length&&u(i,t),i.noResume||l(i),i.file&&i.sync?d(i):i.file?p(i,n):h(i)};const l=e=>{const t=e.onentry;e.onentry=t?e=>{t(e),e.resume()}:e=>e.resume()},u=(e,t)=>{const n=new Map(t.map((e=>[c(e),!0]))),r=e.filter,i=(e,t)=>{const r=t||a.parse(e).root||".",o=e!==r&&(n.has(e)?n.get(e):i(a.dirname(e),r));return n.set(e,o),o};e.filter=r?(e,t)=>r(e,t)&&i(c(e)):e=>i(c(e))},d=e=>{const t=h(e),n=e.file;let r,i=!0;try{const s=o.statSync(n),a=e.maxReadSize||16777216;if(s.size<a)t.end(o.readFileSync(n));else{let e=0;const i=Buffer.allocUnsafe(a);for(r=o.openSync(n,"r");e<s.size;){const n=o.readSync(r,i,0,a,e);e+=n,t.write(i.slice(0,n))}t.end()}i=!1}finally{if(i&&r)try{o.closeSync(r)}catch(e){}}},p=(e,t)=>{const n=new i(e),r=e.maxReadSize||16777216,a=e.file,c=new Promise(((e,t)=>{n.on("error",t),n.on("end",e),o.stat(a,((e,i)=>{if(e)t(e);else{const e=new s.ReadStream(a,{readSize:r,size:i.size});e.on("error",t),e.pipe(n)}}))}));return t?c.then(t,t):c},h=e=>new i(e)},1071:(e,t,n)=>{"use strict";const r=n(3480),i=n(9896),o=n(6928),s=n(911),a=n(1199);class c extends Error{constructor(e,t){super("Cannot extract through symbolic link"),this.path=t,this.symlink=e}get name(){return"SylinkError"}}class l extends Error{constructor(e,t){super(t+": Cannot cd into '"+e+"'"),this.path=e,this.code=t}get name(){return"CwdError"}}const u=(e,t)=>e.get(a(t)),d=(e,t,n)=>e.set(a(t),n);e.exports=(e,t,n)=>{e=a(e);const c=t.umask,h=448|t.mode,f=!!(h&c),m=t.uid,g=t.gid,y="number"==typeof m&&"number"==typeof g&&(m!==t.processUid||g!==t.processGid),b=t.preserve,v=t.unlink,S=t.cache,w=a(t.cwd),C=(t,r)=>{t?n(t):(d(S,e,!0),r&&y?s(r,m,g,(e=>C(e))):f?i.chmod(e,h,n):n())};if(S&&!0===u(S,e))return C();if(e===w)return((e,t)=>{i.stat(e,((n,r)=>{!n&&r.isDirectory()||(n=new l(e,n&&n.code||"ENOTDIR")),t(n)}))})(e,C);if(b)return r(e,{mode:h}).then((e=>C(null,e)),C);const T=a(o.relative(w,e)).split("/");p(w,T,h,S,v,w,null,C)};const p=(e,t,n,r,s,c,l,d)=>{if(!t.length)return d(null,l);const f=t.shift(),m=a(o.resolve(e+"/"+f));if(u(r,m))return p(m,t,n,r,s,c,l,d);i.mkdir(m,n,h(m,t,n,r,s,c,l,d))},h=(e,t,n,r,o,s,l,u)=>d=>{d?i.lstat(e,((f,m)=>{if(f)f.path=f.path&&a(f.path),u(f);else if(m.isDirectory())p(e,t,n,r,o,s,l,u);else if(o)i.unlink(e,(a=>{if(a)return u(a);i.mkdir(e,n,h(e,t,n,r,o,s,l,u))}));else{if(m.isSymbolicLink())return u(new c(e,e+"/"+t.join("/")));u(d)}})):p(e,t,n,r,o,s,l=l||e,u)};e.exports.sync=(e,t)=>{e=a(e);const n=t.umask,p=448|t.mode,h=!!(p&n),f=t.uid,m=t.gid,g="number"==typeof f&&"number"==typeof m&&(f!==t.processUid||m!==t.processGid),y=t.preserve,b=t.unlink,v=t.cache,S=a(t.cwd),w=t=>{d(v,e,!0),t&&g&&s.sync(t,f,m),h&&i.chmodSync(e,p)};if(v&&!0===u(v,e))return w();if(e===S)return(e=>{let t=!1,n="ENOTDIR";try{t=i.statSync(e).isDirectory()}catch(e){n=e.code}finally{if(!t)throw new l(e,n)}})(S),w();if(y)return w(r.sync(e,p));const C=a(o.relative(S,e)).split("/");let T=null;for(let e=C.shift(),t=S;e&&(t+="/"+e);e=C.shift())if(t=a(o.resolve(t)),!u(v,t))try{i.mkdirSync(t,p),T=T||t,d(v,t,!0)}catch(e){const n=i.lstatSync(t);if(n.isDirectory()){d(v,t,!0);continue}if(b){i.unlinkSync(t),i.mkdirSync(t,p),T=T||t,d(v,t,!0);continue}if(n.isSymbolicLink())return new c(t,t+"/"+C.join("/"))}return w(T)}},2447:e=>{"use strict";e.exports=(e,t,n)=>(e&=4095,n&&(e=-19&e|384),t&&(256&e&&(e|=64),32&e&&(e|=8),4&e&&(e|=1)),e)},9889:e=>{const t=Object.create(null),{hasOwnProperty:n}=Object.prototype;e.exports=e=>(n.call(t,e)||(t[e]=e.normalize("NFD")),t[e])},1199:e=>{const t=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;e.exports="win32"!==t?e=>e:e=>e&&e.replace(/\\/g,"/")},2239:(e,t,n)=>{"use strict";class r{constructor(e,t){this.path=e||"./",this.absolute=t,this.entry=null,this.stat=null,this.readdir=null,this.pending=!1,this.ignore=!1,this.piped=!1}}const{Minipass:i}=n(1566),o=n(6259),s=n(6643),a=n(3662),c=a.Sync,l=a.Tar,u=n(8799),d=Buffer.alloc(1024),p=Symbol("onStat"),h=Symbol("ended"),f=Symbol("queue"),m=Symbol("current"),g=Symbol("process"),y=Symbol("processing"),b=Symbol("processJob"),v=Symbol("jobs"),S=Symbol("jobDone"),w=Symbol("addFSEntry"),C=Symbol("addTarEntry"),T=Symbol("stat"),E=Symbol("readdir"),_=Symbol("onreaddir"),x=Symbol("pipe"),R=Symbol("entry"),I=Symbol("entryOpt"),P=Symbol("writeEntryClass"),O=Symbol("write"),D=Symbol("ondrain"),A=n(9896),k=n(6928),N=n(9262),L=n(1199),j=N(class extends i{constructor(e){if(super(e),e=e||Object.create(null),this.opt=e,this.file=e.file||"",this.cwd=e.cwd||process.cwd(),this.maxReadSize=e.maxReadSize,this.preservePaths=!!e.preservePaths,this.strict=!!e.strict,this.noPax=!!e.noPax,this.prefix=L(e.prefix||""),this.linkCache=e.linkCache||new Map,this.statCache=e.statCache||new Map,this.readdirCache=e.readdirCache||new Map,this[P]=a,"function"==typeof e.onwarn&&this.on("warn",e.onwarn),this.portable=!!e.portable,this.zip=null,e.gzip||e.brotli){if(e.gzip&&e.brotli)throw new TypeError("gzip and brotli are mutually exclusive");e.gzip&&("object"!=typeof e.gzip&&(e.gzip={}),this.portable&&(e.gzip.portable=!0),this.zip=new o.Gzip(e.gzip)),e.brotli&&("object"!=typeof e.brotli&&(e.brotli={}),this.zip=new o.BrotliCompress(e.brotli)),this.zip.on("data",(e=>super.write(e))),this.zip.on("end",(e=>super.end())),this.zip.on("drain",(e=>this[D]())),this.on("resume",(e=>this.zip.resume()))}else this.on("drain",this[D]);this.noDirRecurse=!!e.noDirRecurse,this.follow=!!e.follow,this.noMtime=!!e.noMtime,this.mtime=e.mtime||null,this.filter="function"==typeof e.filter?e.filter:e=>!0,this[f]=new u,this[v]=0,this.jobs=+e.jobs||4,this[y]=!1,this[h]=!1}[O](e){return super.write(e)}add(e){return this.write(e),this}end(e){return e&&this.write(e),this[h]=!0,this[g](),this}write(e){if(this[h])throw new Error("write after end");return e instanceof s?this[C](e):this[w](e),this.flowing}[C](e){const t=L(k.resolve(this.cwd,e.path));if(this.filter(e.path,e)){const n=new r(e.path,t,!1);n.entry=new l(e,this[I](n)),n.entry.on("end",(e=>this[S](n))),this[v]+=1,this[f].push(n)}else e.resume();this[g]()}[w](e){const t=L(k.resolve(this.cwd,e));this[f].push(new r(e,t)),this[g]()}[T](e){e.pending=!0,this[v]+=1;const t=this.follow?"stat":"lstat";A[t](e.absolute,((t,n)=>{e.pending=!1,this[v]-=1,t?this.emit("error",t):this[p](e,n)}))}[p](e,t){this.statCache.set(e.absolute,t),e.stat=t,this.filter(e.path,t)||(e.ignore=!0),this[g]()}[E](e){e.pending=!0,this[v]+=1,A.readdir(e.absolute,((t,n)=>{if(e.pending=!1,this[v]-=1,t)return this.emit("error",t);this[_](e,n)}))}[_](e,t){this.readdirCache.set(e.absolute,t),e.readdir=t,this[g]()}[g](){if(!this[y]){this[y]=!0;for(let e=this[f].head;null!==e&&this[v]<this.jobs;e=e.next)if(this[b](e.value),e.value.ignore){const t=e.next;this[f].removeNode(e),e.next=t}this[y]=!1,this[h]&&!this[f].length&&0===this[v]&&(this.zip?this.zip.end(d):(super.write(d),super.end()))}}get[m](){return this[f]&&this[f].head&&this[f].head.value}[S](e){this[f].shift(),this[v]-=1,this[g]()}[b](e){e.pending||(e.entry?e!==this[m]||e.piped||this[x](e):(e.stat||(this.statCache.has(e.absolute)?this[p](e,this.statCache.get(e.absolute)):this[T](e)),e.stat&&(e.ignore||(this.noDirRecurse||!e.stat.isDirectory()||e.readdir||(this.readdirCache.has(e.absolute)?this[_](e,this.readdirCache.get(e.absolute)):this[E](e),e.readdir))&&(e.entry=this[R](e),e.entry?e!==this[m]||e.piped||this[x](e):e.ignore=!0))))}[I](e){return{onwarn:(e,t,n)=>this.warn(e,t,n),noPax:this.noPax,cwd:this.cwd,absolute:e.absolute,preservePaths:this.preservePaths,maxReadSize:this.maxReadSize,strict:this.strict,portable:this.portable,linkCache:this.linkCache,statCache:this.statCache,noMtime:this.noMtime,mtime:this.mtime,prefix:this.prefix}}[R](e){this[v]+=1;try{return new this[P](e.path,this[I](e)).on("end",(()=>this[S](e))).on("error",(e=>this.emit("error",e)))}catch(e){this.emit("error",e)}}[D](){this[m]&&this[m].entry&&this[m].entry.resume()}[x](e){e.piped=!0,e.readdir&&e.readdir.forEach((t=>{const n=e.path,r="./"===n?"":n.replace(/\/*$/,"/");this[w](r+t)}));const t=e.entry,n=this.zip;n?t.on("data",(e=>{n.write(e)||t.pause()})):t.on("data",(e=>{super.write(e)||t.pause()}))}pause(){return this.zip&&this.zip.pause(),super.pause()}});j.Sync=class extends j{constructor(e){super(e),this[P]=c}pause(){}resume(){}[T](e){const t=this.follow?"statSync":"lstatSync";this[p](e,A[t](e.absolute))}[E](e,t){this[_](e,A.readdirSync(e.absolute))}[x](e){const t=e.entry,n=this.zip;e.readdir&&e.readdir.forEach((t=>{const n=e.path,r="./"===n?"":n.replace(/\/*$/,"/");this[w](r+t)})),n?t.on("data",(e=>{n.write(e)})):t.on("data",(e=>{super[O](e)}))}},e.exports=j},5683:(e,t,n)=>{"use strict";const r=n(9262),i=n(2215),o=n(4434),s=n(8799),a=n(6643),c=n(1673),l=n(6259),{nextTick:u}=n(932),d=Buffer.from([31,139]),p=Symbol("state"),h=Symbol("writeEntry"),f=Symbol("readEntry"),m=Symbol("nextEntry"),g=Symbol("processEntry"),y=Symbol("extendedHeader"),b=Symbol("globalExtendedHeader"),v=Symbol("meta"),S=Symbol("emitMeta"),w=Symbol("buffer"),C=Symbol("queue"),T=Symbol("ended"),E=Symbol("emittedEnd"),_=Symbol("emit"),x=Symbol("unzip"),R=Symbol("consumeChunk"),I=Symbol("consumeChunkSub"),P=Symbol("consumeBody"),O=Symbol("consumeMeta"),D=Symbol("consumeHeader"),A=Symbol("consuming"),k=Symbol("bufferConcat"),N=Symbol("maybeEnd"),L=Symbol("writing"),j=Symbol("aborted"),M=Symbol("onDone"),F=Symbol("sawValidEntry"),q=Symbol("sawNullBlock"),B=Symbol("sawEOF"),U=Symbol("closeStream"),z=e=>!0;e.exports=r(class extends o{constructor(e){super(e=e||{}),this.file=e.file||"",this[F]=null,this.on(M,(e=>{"begin"!==this[p]&&!1!==this[F]||this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")})),e.ondone?this.on(M,e.ondone):this.on(M,(e=>{this.emit("prefinish"),this.emit("finish"),this.emit("end")})),this.strict=!!e.strict,this.maxMetaEntrySize=e.maxMetaEntrySize||1048576,this.filter="function"==typeof e.filter?e.filter:z;const t=e.file&&(e.file.endsWith(".tar.br")||e.file.endsWith(".tbr"));this.brotli=e.gzip||void 0===e.brotli?!!t&&void 0:e.brotli,this.writable=!0,this.readable=!1,this[C]=new s,this[w]=null,this[f]=null,this[h]=null,this[p]="begin",this[v]="",this[y]=null,this[b]=null,this[T]=!1,this[x]=null,this[j]=!1,this[q]=!1,this[B]=!1,this.on("end",(()=>this[U]())),"function"==typeof e.onwarn&&this.on("warn",e.onwarn),"function"==typeof e.onentry&&this.on("entry",e.onentry)}[D](e,t){let n;null===this[F]&&(this[F]=!1);try{n=new i(e,t,this[y],this[b])}catch(e){return this.warn("TAR_ENTRY_INVALID",e)}if(n.nullBlock)this[q]?(this[B]=!0,"begin"===this[p]&&(this[p]="header"),this[_]("eof")):(this[q]=!0,this[_]("nullBlock"));else if(this[q]=!1,n.cksumValid)if(n.path){const e=n.type;if(/^(Symbolic)?Link$/.test(e)&&!n.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath required",{header:n});else if(!/^(Symbolic)?Link$/.test(e)&&n.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath forbidden",{header:n});else{const e=this[h]=new a(n,this[y],this[b]);if(!this[F])if(e.remain){const t=()=>{e.invalid||(this[F]=!0)};e.on("end",t)}else this[F]=!0;e.meta?e.size>this.maxMetaEntrySize?(e.ignore=!0,this[_]("ignoredEntry",e),this[p]="ignore",e.resume()):e.size>0&&(this[v]="",e.on("data",(e=>this[v]+=e)),this[p]="meta"):(this[y]=null,e.ignore=e.ignore||!this.filter(e.path,e),e.ignore?(this[_]("ignoredEntry",e),this[p]=e.remain?"ignore":"header",e.resume()):(e.remain?this[p]="body":(this[p]="header",e.end()),this[f]?this[C].push(e):(this[C].push(e),this[m]())))}}else this.warn("TAR_ENTRY_INVALID","path is required",{header:n});else this.warn("TAR_ENTRY_INVALID","checksum failure",{header:n})}[U](){u((()=>this.emit("close")))}[g](e){let t=!0;return e?Array.isArray(e)?this.emit.apply(this,e):(this[f]=e,this.emit("entry",e),e.emittedEnd||(e.on("end",(e=>this[m]())),t=!1)):(this[f]=null,t=!1),t}[m](){do{}while(this[g](this[C].shift()));if(!this[C].length){const e=this[f];!e||e.flowing||e.size===e.remain?this[L]||this.emit("drain"):e.once("drain",(e=>this.emit("drain")))}}[P](e,t){const n=this[h],r=n.blockRemain,i=r>=e.length&&0===t?e:e.slice(t,t+r);return n.write(i),n.blockRemain||(this[p]="header",this[h]=null,n.end()),i.length}[O](e,t){const n=this[h],r=this[P](e,t);return this[h]||this[S](n),r}[_](e,t,n){this[C].length||this[f]?this[C].push([e,t,n]):this.emit(e,t,n)}[S](e){switch(this[_]("meta",this[v]),e.type){case"ExtendedHeader":case"OldExtendedHeader":this[y]=c.parse(this[v],this[y],!1);break;case"GlobalExtendedHeader":this[b]=c.parse(this[v],this[b],!0);break;case"NextFileHasLongPath":case"OldGnuLongPath":this[y]=this[y]||Object.create(null),this[y].path=this[v].replace(/\0.*/,"");break;case"NextFileHasLongLinkpath":this[y]=this[y]||Object.create(null),this[y].linkpath=this[v].replace(/\0.*/,"");break;default:throw new Error("unknown meta: "+e.type)}}abort(e){this[j]=!0,this.emit("abort",e),this.warn("TAR_ABORT",e,{recoverable:!1})}write(e){if(this[j])return;if((null===this[x]||void 0===this.brotli&&!1===this[x])&&e){if(this[w]&&(e=Buffer.concat([this[w],e]),this[w]=null),e.length<d.length)return this[w]=e,!0;for(let t=0;null===this[x]&&t<d.length;t++)e[t]!==d[t]&&(this[x]=!1);const t=void 0===this.brotli;if(!1===this[x]&&t)if(e.length<512){if(!this[T])return this[w]=e,!0;this.brotli=!0}else try{new i(e.slice(0,512)),this.brotli=!1}catch(e){this.brotli=!0}if(null===this[x]||!1===this[x]&&this.brotli){const t=this[T];this[T]=!1,this[x]=null===this[x]?new l.Unzip:new l.BrotliDecompress,this[x].on("data",(e=>this[R](e))),this[x].on("error",(e=>this.abort(e))),this[x].on("end",(e=>{this[T]=!0,this[R]()})),this[L]=!0;const n=this[x][t?"end":"write"](e);return this[L]=!1,n}}this[L]=!0,this[x]?this[x].write(e):this[R](e),this[L]=!1;const t=!this[C].length&&(!this[f]||this[f].flowing);return t||this[C].length||this[f].once("drain",(e=>this.emit("drain"))),t}[k](e){e&&!this[j]&&(this[w]=this[w]?Buffer.concat([this[w],e]):e)}[N](){if(this[T]&&!this[E]&&!this[j]&&!this[A]){this[E]=!0;const e=this[h];if(e&&e.blockRemain){const t=this[w]?this[w].length:0;this.warn("TAR_BAD_ARCHIVE",`Truncated input (needed ${e.blockRemain} more bytes, only ${t} available)`,{entry:e}),this[w]&&e.write(this[w]),e.end()}this[_](M)}}[R](e){if(this[A])this[k](e);else if(e||this[w]){if(this[A]=!0,this[w]){this[k](e);const t=this[w];this[w]=null,this[I](t)}else this[I](e);for(;this[w]&&this[w].length>=512&&!this[j]&&!this[B];){const e=this[w];this[w]=null,this[I](e)}this[A]=!1}else this[N]();this[w]&&!this[T]||this[N]()}[I](e){let t=0;const n=e.length;for(;t+512<=n&&!this[j]&&!this[B];)switch(this[p]){case"begin":case"header":this[D](e,t),t+=512;break;case"ignore":case"body":t+=this[P](e,t);break;case"meta":t+=this[O](e,t);break;default:throw new Error("invalid state: "+this[p])}t<n&&(this[w]?this[w]=Buffer.concat([e.slice(t),this[w]]):this[w]=e.slice(t))}end(e){this[j]||(this[x]?this[x].end(e):(this[T]=!0,void 0===this.brotli&&(e=e||Buffer.alloc(0)),this.write(e)))}})},1557:(e,t,n)=>{const r=n(2613),i=n(9889),o=n(7963),{join:s}=n(6928),a="win32"===(process.env.TESTING_TAR_FAKE_PLATFORM||process.platform);e.exports=()=>{const e=new Map,t=new Map,n=new Set,c=n=>{const{paths:r,dirs:i}=(n=>{const r=t.get(n);if(!r)throw new Error("function does not have any path reservations");return{paths:r.paths.map((t=>e.get(t))),dirs:[...r.dirs].map((t=>e.get(t)))}})(n);return r.every((e=>e[0]===n))&&i.every((e=>e[0]instanceof Set&&e[0].has(n)))},l=e=>!(n.has(e)||!c(e)||(n.add(e),e((()=>u(e))),0)),u=i=>{if(!n.has(i))return!1;const{paths:o,dirs:s}=t.get(i),a=new Set;return o.forEach((t=>{const n=e.get(t);r.equal(n[0],i),1===n.length?e.delete(t):(n.shift(),"function"==typeof n[0]?a.add(n[0]):n[0].forEach((e=>a.add(e))))})),s.forEach((t=>{const n=e.get(t);r(n[0]instanceof Set),1===n[0].size&&1===n.length?e.delete(t):1===n[0].size?(n.shift(),a.add(n[0])):n[0].delete(i)})),n.delete(i),a.forEach((e=>l(e))),!0};return{check:c,reserve:(n,r)=>{n=a?["win32 parallelization disabled"]:n.map((e=>o(s(i(e))).toLowerCase()));const c=new Set(n.map((e=>(e=>{const t=e.split("/").slice(0,-1).reduce(((e,t)=>(e.length&&(t=s(e[e.length-1],t)),e.push(t||"/"),e)),[]);return t})(e))).reduce(((e,t)=>e.concat(t))));return t.set(r,{dirs:c,paths:n}),n.forEach((t=>{const n=e.get(t);n?n.push(r):e.set(t,[r])})),c.forEach((t=>{const n=e.get(t);n?n[n.length-1]instanceof Set?n[n.length-1].add(r):n.push(new Set([r])):e.set(t,[new Set([r])])})),l(r)}}}},1673:(e,t,n)=>{"use strict";const r=n(2215),i=n(6928);class o{constructor(e,t){this.atime=e.atime||null,this.charset=e.charset||null,this.comment=e.comment||null,this.ctime=e.ctime||null,this.gid=e.gid||null,this.gname=e.gname||null,this.linkpath=e.linkpath||null,this.mtime=e.mtime||null,this.path=e.path||null,this.size=e.size||null,this.uid=e.uid||null,this.uname=e.uname||null,this.dev=e.dev||null,this.ino=e.ino||null,this.nlink=e.nlink||null,this.global=t||!1}encode(){const e=this.encodeBody();if(""===e)return null;const t=Buffer.byteLength(e),n=512*Math.ceil(1+t/512),o=Buffer.allocUnsafe(n);for(let e=0;e<512;e++)o[e]=0;new r({path:("PaxHeader/"+i.basename(this.path)).slice(0,99),mode:this.mode||420,uid:this.uid||null,gid:this.gid||null,size:t,mtime:this.mtime||null,type:this.global?"GlobalExtendedHeader":"ExtendedHeader",linkpath:"",uname:this.uname||"",gname:this.gname||"",devmaj:0,devmin:0,atime:this.atime||null,ctime:this.ctime||null}).encode(o),o.write(e,512,t,"utf8");for(let e=t+512;e<o.length;e++)o[e]=0;return o}encodeBody(){return this.encodeField("path")+this.encodeField("ctime")+this.encodeField("atime")+this.encodeField("dev")+this.encodeField("ino")+this.encodeField("nlink")+this.encodeField("charset")+this.encodeField("comment")+this.encodeField("gid")+this.encodeField("gname")+this.encodeField("linkpath")+this.encodeField("mtime")+this.encodeField("size")+this.encodeField("uid")+this.encodeField("uname")}encodeField(e){if(null===this[e]||void 0===this[e])return"";const t=" "+("dev"===e||"ino"===e||"nlink"===e?"SCHILY.":"")+e+"="+(this[e]instanceof Date?this[e].getTime()/1e3:this[e])+"\n",n=Buffer.byteLength(t);let r=Math.floor(Math.log(n)/Math.log(10))+1;return n+r>=Math.pow(10,r)&&(r+=1),r+n+t}}o.parse=(e,t,n)=>new o(s(a(e),t),n);const s=(e,t)=>t?Object.keys(e).reduce(((t,n)=>(t[n]=e[n],t)),t):e,a=e=>e.replace(/\n$/,"").split("\n").reduce(c,Object.create(null)),c=(e,t)=>{const n=parseInt(t,10);if(n!==Buffer.byteLength(t)+1)return e;const r=(t=t.slice((n+" ").length)).split("="),i=r.shift().replace(/^SCHILY\.(dev|ino|nlink)/,"$1");if(!i)return e;const o=r.join("=");return e[i]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(i)?new Date(1e3*o):/^[0-9]+$/.test(o)?+o:o,e};e.exports=o},6643:(e,t,n)=>{"use strict";const{Minipass:r}=n(1566),i=n(1199),o=Symbol("slurp");e.exports=class extends r{constructor(e,t,n){switch(super(),this.pause(),this.extended=t,this.globalExtended=n,this.header=e,this.startBlockSize=512*Math.ceil(e.size/512),this.blockRemain=this.startBlockSize,this.remain=e.size,this.type=e.type,this.meta=!1,this.ignore=!1,this.type){case"File":case"OldFile":case"Link":case"SymbolicLink":case"CharacterDevice":case"BlockDevice":case"Directory":case"FIFO":case"ContiguousFile":case"GNUDumpDir":break;case"NextFileHasLongLinkpath":case"NextFileHasLongPath":case"OldGnuLongPath":case"GlobalExtendedHeader":case"ExtendedHeader":case"OldExtendedHeader":this.meta=!0;break;default:this.ignore=!0}this.path=i(e.path),this.mode=e.mode,this.mode&&(this.mode=4095&this.mode),this.uid=e.uid,this.gid=e.gid,this.uname=e.uname,this.gname=e.gname,this.size=e.size,this.mtime=e.mtime,this.atime=e.atime,this.ctime=e.ctime,this.linkpath=i(e.linkpath),this.uname=e.uname,this.gname=e.gname,t&&this[o](t),n&&this[o](n,!0)}write(e){const t=e.length;if(t>this.blockRemain)throw new Error("writing more to entry than is appropriate");const n=this.remain,r=this.blockRemain;return this.remain=Math.max(0,n-t),this.blockRemain=Math.max(0,r-t),!!this.ignore||(n>=t?super.write(e):super.write(e.slice(0,n)))}[o](e,t){for(const n in e)null===e[n]||void 0===e[n]||t&&"path"===n||(this[n]="path"===n||"linkpath"===n?i(e[n]):e[n])}}},5624:(e,t,n)=>{"use strict";const r=n(3385),i=n(2239),o=n(9896),s=n(1475),a=n(6170),c=n(6928),l=n(2215);e.exports=(e,t,n)=>{const i=r(e);if(!i.file)throw new TypeError("file is required");if(i.gzip||i.brotli||i.file.endsWith(".br")||i.file.endsWith(".tbr"))throw new TypeError("cannot append to compressed archives");if(!t||!Array.isArray(t)||!t.length)throw new TypeError("no files or directories specified");return t=Array.from(t),i.sync?u(i,t):p(i,t,n)};const u=(e,t)=>{const n=new i.Sync(e);let r,s,a=!0;try{try{r=o.openSync(e.file,"r+")}catch(t){if("ENOENT"!==t.code)throw t;r=o.openSync(e.file,"w+")}const i=o.fstatSync(r),c=Buffer.alloc(512);e:for(s=0;s<i.size;s+=512){for(let e=0,t=0;e<512;e+=t){if(t=o.readSync(r,c,e,c.length-e,s+e),0===s&&31===c[0]&&139===c[1])throw new Error("cannot append to compressed archives");if(!t)break e}const t=new l(c);if(!t.cksumValid)break;const n=512*Math.ceil(t.size/512);if(s+n+512>i.size)break;s+=n,e.mtimeCache&&e.mtimeCache.set(t.path,t.mtime)}a=!1,d(e,n,s,r,t)}finally{if(a)try{o.closeSync(r)}catch(e){}}},d=(e,t,n,r,i)=>{const o=new s.WriteStreamSync(e.file,{fd:r,start:n});t.pipe(o),h(t,i)},p=(e,t,n)=>{t=Array.from(t);const r=new i(e),a=new Promise(((n,i)=>{r.on("error",i);let a="r+";const c=(u,d)=>u&&"ENOENT"===u.code&&"r+"===a?(a="w+",o.open(e.file,a,c)):u?i(u):void o.fstat(d,((a,c)=>{if(a)return o.close(d,(()=>i(a)));((t,n,r)=>{const i=(e,n)=>{e?o.close(t,(t=>r(e))):r(null,n)};let s=0;if(0===n)return i(null,0);let a=0;const c=Buffer.alloc(512),u=(r,d)=>{if(r)return i(r);if(a+=d,a<512&&d)return o.read(t,c,a,c.length-a,s+a,u);if(0===s&&31===c[0]&&139===c[1])return i(new Error("cannot append to compressed archives"));if(a<512)return i(null,s);const p=new l(c);if(!p.cksumValid)return i(null,s);const h=512*Math.ceil(p.size/512);return s+h+512>n?i(null,s):(s+=h+512,s>=n?i(null,s):(e.mtimeCache&&e.mtimeCache.set(p.path,p.mtime),a=0,void o.read(t,c,0,512,s,u)))};o.read(t,c,0,512,s,u)})(d,c.size,((o,a)=>{if(o)return i(o);const c=new s.WriteStream(e.file,{fd:d,start:a});r.pipe(c),c.on("error",i),c.on("close",n),f(r,t)}))}));o.open(e.file,a,c)}));return n?a.then(n,n):a},h=(e,t)=>{t.forEach((t=>{"@"===t.charAt(0)?a({file:c.resolve(e.cwd,t.slice(1)),sync:!0,noResume:!0,onentry:t=>e.add(t)}):e.add(t)})),e.end()},f=(e,t)=>{for(;t.length;){const n=t.shift();if("@"===n.charAt(0))return a({file:c.resolve(e.cwd,n.slice(1)),noResume:!0,onentry:t=>e.add(t)}).then((n=>f(e,t)));e.add(n)}e.end()}},5496:(e,t,n)=>{const{isAbsolute:r,parse:i}=n(6928).win32;e.exports=e=>{let t="",n=i(e);for(;r(e)||n.root;){const r="/"===e.charAt(0)&&"//?/"!==e.slice(0,4)?"/":n.root;e=e.slice(r.length),t+=r,n=i(e)}return[t,e]}},7963:e=>{e.exports=e=>{let t=e.length-1,n=-1;for(;t>-1&&"/"===e.charAt(t);)n=t,t--;return-1===n?e:e.slice(0,n)}},2133:(e,t)=>{"use strict";t.name=new Map([["0","File"],["","OldFile"],["1","Link"],["2","SymbolicLink"],["3","CharacterDevice"],["4","BlockDevice"],["5","Directory"],["6","FIFO"],["7","ContiguousFile"],["g","GlobalExtendedHeader"],["x","ExtendedHeader"],["A","SolarisACL"],["D","GNUDumpDir"],["I","Inode"],["K","NextFileHasLongLinkpath"],["L","NextFileHasLongPath"],["M","ContinuationFile"],["N","OldGnuLongPath"],["S","SparseFile"],["V","TapeVolumeHeader"],["X","OldExtendedHeader"]]),t.code=new Map(Array.from(t.name).map((e=>[e[1],e[0]])))},9160:(e,t,n)=>{"use strict";const r=n(2613),i=n(5683),o=n(9896),s=n(1475),a=n(6928),c=n(1071),l=n(5745),u=n(1557),d=n(5496),p=n(1199),h=n(7963),f=n(9889),m=Symbol("onEntry"),g=Symbol("checkFs"),y=Symbol("checkFs2"),b=Symbol("pruneCache"),v=Symbol("isReusable"),S=Symbol("makeFs"),w=Symbol("file"),C=Symbol("directory"),T=Symbol("link"),E=Symbol("symlink"),_=Symbol("hardlink"),x=Symbol("unsupported"),R=Symbol("checkPath"),I=Symbol("mkdir"),P=Symbol("onError"),O=Symbol("pending"),D=Symbol("pend"),A=Symbol("unpend"),k=Symbol("ended"),N=Symbol("maybeClose"),L=Symbol("skip"),j=Symbol("doChown"),M=Symbol("uid"),F=Symbol("gid"),q=Symbol("checkedCwd"),B=n(6982),U=n(5865),z="win32"===(process.env.TESTING_TAR_FAKE_PLATFORM||process.platform),G=(e,t,n)=>e===e>>>0?e:t===t>>>0?t:n,H=e=>h(p(f(e))).toLowerCase();class V extends i{constructor(e){if(e||(e={}),e.ondone=e=>{this[k]=!0,this[N]()},super(e),this[q]=!1,this.reservations=u(),this.transform="function"==typeof e.transform?e.transform:null,this.writable=!0,this.readable=!1,this[O]=0,this[k]=!1,this.dirCache=e.dirCache||new Map,"number"==typeof e.uid||"number"==typeof e.gid){if("number"!=typeof e.uid||"number"!=typeof e.gid)throw new TypeError("cannot set owner without number uid and gid");if(e.preserveOwner)throw new TypeError("cannot preserve owner in archive and also set owner explicitly");this.uid=e.uid,this.gid=e.gid,this.setOwner=!0}else this.uid=null,this.gid=null,this.setOwner=!1;void 0===e.preserveOwner&&"number"!=typeof e.uid?this.preserveOwner=process.getuid&&0===process.getuid():this.preserveOwner=!!e.preserveOwner,this.processUid=(this.preserveOwner||this.setOwner)&&process.getuid?process.getuid():null,this.processGid=(this.preserveOwner||this.setOwner)&&process.getgid?process.getgid():null,this.maxDepth="number"==typeof e.maxDepth?e.maxDepth:1024,this.forceChown=!0===e.forceChown,this.win32=!!e.win32||z,this.newer=!!e.newer,this.keep=!!e.keep,this.noMtime=!!e.noMtime,this.preservePaths=!!e.preservePaths,this.unlink=!!e.unlink,this.cwd=p(a.resolve(e.cwd||process.cwd())),this.strip=+e.strip||0,this.processUmask=e.noChmod?0:process.umask(),this.umask="number"==typeof e.umask?e.umask:this.processUmask,this.dmode=e.dmode||511&~this.umask,this.fmode=e.fmode||438&~this.umask,this.on("entry",(e=>this[m](e)))}warn(e,t,n={}){return"TAR_BAD_ARCHIVE"!==e&&"TAR_ABORT"!==e||(n.recoverable=!1),super.warn(e,t,n)}[N](){this[k]&&0===this[O]&&(this.emit("prefinish"),this.emit("finish"),this.emit("end"))}[R](e){const t=p(e.path),n=t.split("/");if(this.strip){if(n.length<this.strip)return!1;if("Link"===e.type){const t=p(e.linkpath).split("/");if(!(t.length>=this.strip))return!1;e.linkpath=t.slice(this.strip).join("/")}n.splice(0,this.strip),e.path=n.join("/")}if(isFinite(this.maxDepth)&&n.length>this.maxDepth)return this.warn("TAR_ENTRY_ERROR","path excessively deep",{entry:e,path:t,depth:n.length,maxDepth:this.maxDepth}),!1;if(!this.preservePaths){if(n.includes("..")||z&&/^[a-z]:\.\.$/i.test(n[0]))return this.warn("TAR_ENTRY_ERROR","path contains '..'",{entry:e,path:t}),!1;const[r,i]=d(t);r&&(e.path=i,this.warn("TAR_ENTRY_INFO",`stripping ${r} from absolute path`,{entry:e,path:t}))}if(a.isAbsolute(e.path)?e.absolute=p(a.resolve(e.path)):e.absolute=p(a.resolve(this.cwd,e.path)),!this.preservePaths&&0!==e.absolute.indexOf(this.cwd+"/")&&e.absolute!==this.cwd)return this.warn("TAR_ENTRY_ERROR","path escaped extraction target",{entry:e,path:p(e.path),resolvedPath:e.absolute,cwd:this.cwd}),!1;if(e.absolute===this.cwd&&"Directory"!==e.type&&"GNUDumpDir"!==e.type)return!1;if(this.win32){const{root:t}=a.win32.parse(e.absolute);e.absolute=t+l.encode(e.absolute.slice(t.length));const{root:n}=a.win32.parse(e.path);e.path=n+l.encode(e.path.slice(n.length))}return!0}[m](e){if(!this[R](e))return e.resume();switch(r.equal(typeof e.absolute,"string"),e.type){case"Directory":case"GNUDumpDir":e.mode&&(e.mode=448|e.mode);case"File":case"OldFile":case"ContiguousFile":case"Link":case"SymbolicLink":return this[g](e);default:return this[x](e)}}[P](e,t){"CwdError"===e.name?this.emit("error",e):(this.warn("TAR_ENTRY_ERROR",e,{entry:t}),this[A](),t.resume())}[I](e,t,n){c(p(e),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:t,noChmod:this.noChmod},n)}[j](e){return this.forceChown||this.preserveOwner&&("number"==typeof e.uid&&e.uid!==this.processUid||"number"==typeof e.gid&&e.gid!==this.processGid)||"number"==typeof this.uid&&this.uid!==this.processUid||"number"==typeof this.gid&&this.gid!==this.processGid}[M](e){return G(this.uid,e.uid,this.processUid)}[F](e){return G(this.gid,e.gid,this.processGid)}[w](e,t){const n=4095&e.mode||this.fmode,r=new s.WriteStream(e.absolute,{flags:U(e.size),mode:n,autoClose:!1});r.on("error",(n=>{r.fd&&o.close(r.fd,(()=>{})),r.write=()=>!0,this[P](n,e),t()}));let i=1;const a=n=>{if(n)return r.fd&&o.close(r.fd,(()=>{})),this[P](n,e),void t();0==--i&&o.close(r.fd,(n=>{n?this[P](n,e):this[A](),t()}))};r.on("finish",(t=>{const n=e.absolute,s=r.fd;if(e.mtime&&!this.noMtime){i++;const t=e.atime||new Date,r=e.mtime;o.futimes(s,t,r,(e=>e?o.utimes(n,t,r,(t=>a(t&&e))):a()))}if(this[j](e)){i++;const t=this[M](e),r=this[F](e);o.fchown(s,t,r,(e=>e?o.chown(n,t,r,(t=>a(t&&e))):a()))}a()}));const c=this.transform&&this.transform(e)||e;c!==e&&(c.on("error",(n=>{this[P](n,e),t()})),e.pipe(c)),c.pipe(r)}[C](e,t){const n=4095&e.mode||this.dmode;this[I](e.absolute,n,(n=>{if(n)return this[P](n,e),void t();let r=1;const i=n=>{0==--r&&(t(),this[A](),e.resume())};e.mtime&&!this.noMtime&&(r++,o.utimes(e.absolute,e.atime||new Date,e.mtime,i)),this[j](e)&&(r++,o.chown(e.absolute,this[M](e),this[F](e),i)),i()}))}[x](e){e.unsupported=!0,this.warn("TAR_ENTRY_UNSUPPORTED",`unsupported entry type: ${e.type}`,{entry:e}),e.resume()}[E](e,t){this[T](e,e.linkpath,"symlink",t)}[_](e,t){const n=p(a.resolve(this.cwd,e.linkpath));this[T](e,n,"link",t)}[D](){this[O]++}[A](){this[O]--,this[N]()}[L](e){this[A](),e.resume()}[v](e,t){return"File"===e.type&&!this.unlink&&t.isFile()&&t.nlink<=1&&!z}[g](e){this[D]();const t=[e.path];e.linkpath&&t.push(e.linkpath),this.reservations.reserve(t,(t=>this[y](e,t)))}[b](e){"SymbolicLink"===e.type?(e=>{for(const t of e.keys())e.delete(t)})(this.dirCache):"Directory"!==e.type&&((e,t)=>{t=H(t);for(const n of e.keys()){const r=H(n);r!==t&&0!==r.indexOf(t+"/")||e.delete(n)}})(this.dirCache,e.absolute)}[y](e,t){this[b](e);const n=n=>{this[b](e),t(n)},r=()=>{if(e.absolute!==this.cwd){const t=p(a.dirname(e.absolute));if(t!==this.cwd)return this[I](t,this.dmode,(t=>{if(t)return this[P](t,e),void n();i()}))}i()},i=()=>{o.lstat(e.absolute,((t,r)=>{if(r&&(this.keep||this.newer&&r.mtime>e.mtime))return this[L](e),void n();if(t||this[v](e,r))return this[S](null,e,n);if(r.isDirectory()){if("Directory"===e.type){const t=t=>this[S](t,e,n);return!this.noChmod&&e.mode&&(4095&r.mode)!==e.mode?o.chmod(e.absolute,e.mode,t):t()}if(e.absolute!==this.cwd)return o.rmdir(e.absolute,(t=>this[S](t,e,n)))}if(e.absolute===this.cwd)return this[S](null,e,n);((e,t)=>{if(!z)return o.unlink(e,t);const n=e+".DELETE."+B.randomBytes(16).toString("hex");o.rename(e,n,(e=>{if(e)return t(e);o.unlink(n,t)}))})(e.absolute,(t=>this[S](t,e,n)))}))};this[q]?r():(()=>{this[I](this.cwd,this.dmode,(t=>{if(t)return this[P](t,e),void n();this[q]=!0,r()}))})()}[S](e,t,n){if(e)return this[P](e,t),void n();switch(t.type){case"File":case"OldFile":case"ContiguousFile":return this[w](t,n);case"Link":return this[_](t,n);case"SymbolicLink":return this[E](t,n);case"Directory":case"GNUDumpDir":return this[C](t,n)}}[T](e,t,n,r){o[n](t,e.absolute,(t=>{t?this[P](t,e):(this[A](),e.resume()),r()}))}}const $=e=>{try{return[null,e()]}catch(e){return[e,null]}};V.Sync=class extends V{[S](e,t){return super[S](e,t,(()=>{}))}[g](e){if(this[b](e),!this[q]){const t=this[I](this.cwd,this.dmode);if(t)return this[P](t,e);this[q]=!0}if(e.absolute!==this.cwd){const t=p(a.dirname(e.absolute));if(t!==this.cwd){const n=this[I](t,this.dmode);if(n)return this[P](n,e)}}const[t,n]=$((()=>o.lstatSync(e.absolute)));if(n&&(this.keep||this.newer&&n.mtime>e.mtime))return this[L](e);if(t||this[v](e,n))return this[S](null,e);if(n.isDirectory()){if("Directory"===e.type){const t=!this.noChmod&&e.mode&&(4095&n.mode)!==e.mode,[r]=t?$((()=>{o.chmodSync(e.absolute,e.mode)})):[];return this[S](r,e)}const[t]=$((()=>o.rmdirSync(e.absolute)));this[S](t,e)}const[r]=e.absolute===this.cwd?[]:$((()=>(e=>{if(!z)return o.unlinkSync(e);const t=e+".DELETE."+B.randomBytes(16).toString("hex");o.renameSync(e,t),o.unlinkSync(t)})(e.absolute)));this[S](r,e)}[w](e,t){const n=4095&e.mode||this.fmode,r=n=>{let r;try{o.closeSync(i)}catch(e){r=e}(n||r)&&this[P](n||r,e),t()};let i;try{i=o.openSync(e.absolute,U(e.size),n)}catch(e){return r(e)}const s=this.transform&&this.transform(e)||e;s!==e&&(s.on("error",(t=>this[P](t,e))),e.pipe(s)),s.on("data",(e=>{try{o.writeSync(i,e,0,e.length)}catch(e){r(e)}})),s.on("end",(t=>{let n=null;if(e.mtime&&!this.noMtime){const t=e.atime||new Date,r=e.mtime;try{o.futimesSync(i,t,r)}catch(i){try{o.utimesSync(e.absolute,t,r)}catch(e){n=i}}}if(this[j](e)){const t=this[M](e),r=this[F](e);try{o.fchownSync(i,t,r)}catch(i){try{o.chownSync(e.absolute,t,r)}catch(e){n=n||i}}}r(n)}))}[C](e,t){const n=4095&e.mode||this.dmode,r=this[I](e.absolute,n);if(r)return this[P](r,e),void t();if(e.mtime&&!this.noMtime)try{o.utimesSync(e.absolute,e.atime||new Date,e.mtime)}catch(r){}if(this[j](e))try{o.chownSync(e.absolute,this[M](e),this[F](e))}catch(r){}t(),e.resume()}[I](e,t){try{return c.sync(p(e),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:t})}catch(e){return e}}[T](e,t,n,r){try{o[n+"Sync"](t,e.absolute),r(),e.resume()}catch(t){return this[P](t,e)}}},e.exports=V},3739:(e,t,n)=>{"use strict";const r=n(3385),i=n(5624);e.exports=(e,t,n)=>{const s=r(e);if(!s.file)throw new TypeError("file is required");if(s.gzip||s.brotli||s.file.endsWith(".br")||s.file.endsWith(".tbr"))throw new TypeError("cannot append to compressed archives");if(!t||!Array.isArray(t)||!t.length)throw new TypeError("no files or directories specified");return t=Array.from(t),o(s),i(s,t,n)};const o=e=>{const t=e.filter;e.mtimeCache||(e.mtimeCache=new Map),e.filter=t?(n,r)=>t(n,r)&&!(e.mtimeCache.get(n)>r.mtime):(t,n)=>!(e.mtimeCache.get(t)>n.mtime)}},9262:e=>{"use strict";e.exports=e=>class extends e{warn(e,t,n={}){this.file&&(n.file=this.file),this.cwd&&(n.cwd=this.cwd),n.code=t instanceof Error&&t.code||e,n.tarCode=e,this.strict||!1===n.recoverable?t instanceof Error?this.emit("error",Object.assign(t,n)):this.emit("error",Object.assign(new Error(`${e}: ${t}`),n)):(t instanceof Error&&(n=Object.assign(t,n),t=t.message),this.emit("warn",n.tarCode,t,n))}}},5745:e=>{"use strict";const t=["|","<",">","?",":"],n=t.map((e=>String.fromCharCode(61440+e.charCodeAt(0)))),r=new Map(t.map(((e,t)=>[e,n[t]]))),i=new Map(n.map(((e,n)=>[e,t[n]])));e.exports={encode:e=>t.reduce(((e,t)=>e.split(t).join(r.get(t))),e),decode:e=>n.reduce(((e,t)=>e.split(t).join(i.get(t))),e)}},3662:(e,t,n)=>{"use strict";const{Minipass:r}=n(1566),i=n(1673),o=n(2215),s=n(9896),a=n(6928),c=n(1199),l=n(7963),u=(e,t)=>t?(e=c(e).replace(/^\.(\/|$)/,""),l(t)+"/"+e):c(e),d=Symbol("process"),p=Symbol("file"),h=Symbol("directory"),f=Symbol("symlink"),m=Symbol("hardlink"),g=Symbol("header"),y=Symbol("read"),b=Symbol("lstat"),v=Symbol("onlstat"),S=Symbol("onread"),w=Symbol("onreadlink"),C=Symbol("openfile"),T=Symbol("onopenfile"),E=Symbol("close"),_=Symbol("mode"),x=Symbol("awaitDrain"),R=Symbol("ondrain"),I=Symbol("prefix"),P=Symbol("hadError"),O=n(9262),D=n(5745),A=n(5496),k=n(2447),N=O(class extends r{constructor(e,t){if(super(t=t||{}),"string"!=typeof e)throw new TypeError("path is required");this.path=c(e),this.portable=!!t.portable,this.myuid=process.getuid&&process.getuid()||0,this.myuser=process.env.USER||"",this.maxReadSize=t.maxReadSize||16777216,this.linkCache=t.linkCache||new Map,this.statCache=t.statCache||new Map,this.preservePaths=!!t.preservePaths,this.cwd=c(t.cwd||process.cwd()),this.strict=!!t.strict,this.noPax=!!t.noPax,this.noMtime=!!t.noMtime,this.mtime=t.mtime||null,this.prefix=t.prefix?c(t.prefix):null,this.fd=null,this.blockLen=null,this.blockRemain=null,this.buf=null,this.offset=null,this.length=null,this.pos=null,this.remain=null,"function"==typeof t.onwarn&&this.on("warn",t.onwarn);let n=!1;if(!this.preservePaths){const[e,t]=A(this.path);e&&(this.path=t,n=e)}this.win32=!!t.win32||"win32"===process.platform,this.win32&&(this.path=D.decode(this.path.replace(/\\/g,"/")),e=e.replace(/\\/g,"/")),this.absolute=c(t.absolute||a.resolve(this.cwd,e)),""===this.path&&(this.path="./"),n&&this.warn("TAR_ENTRY_INFO",`stripping ${n} from absolute path`,{entry:this,path:n+this.path}),this.statCache.has(this.absolute)?this[v](this.statCache.get(this.absolute)):this[b]()}emit(e,...t){return"error"===e&&(this[P]=!0),super.emit(e,...t)}[b](){s.lstat(this.absolute,((e,t)=>{if(e)return this.emit("error",e);this[v](t)}))}[v](e){this.statCache.set(this.absolute,e),this.stat=e,e.isFile()||(e.size=0),this.type=j(e),this.emit("stat",e),this[d]()}[d](){switch(this.type){case"File":return this[p]();case"Directory":return this[h]();case"SymbolicLink":return this[f]();default:return this.end()}}[_](e){return k(e,"Directory"===this.type,this.portable)}[I](e){return u(e,this.prefix)}[g](){"Directory"===this.type&&this.portable&&(this.noMtime=!0),this.header=new o({path:this[I](this.path),linkpath:"Link"===this.type?this[I](this.linkpath):this.linkpath,mode:this[_](this.stat.mode),uid:this.portable?null:this.stat.uid,gid:this.portable?null:this.stat.gid,size:this.stat.size,mtime:this.noMtime?null:this.mtime||this.stat.mtime,type:this.type,uname:this.portable?null:this.stat.uid===this.myuid?this.myuser:"",atime:this.portable?null:this.stat.atime,ctime:this.portable?null:this.stat.ctime}),this.header.encode()&&!this.noPax&&super.write(new i({atime:this.portable?null:this.header.atime,ctime:this.portable?null:this.header.ctime,gid:this.portable?null:this.header.gid,mtime:this.noMtime?null:this.mtime||this.header.mtime,path:this[I](this.path),linkpath:"Link"===this.type?this[I](this.linkpath):this.linkpath,size:this.header.size,uid:this.portable?null:this.header.uid,uname:this.portable?null:this.header.uname,dev:this.portable?null:this.stat.dev,ino:this.portable?null:this.stat.ino,nlink:this.portable?null:this.stat.nlink}).encode()),super.write(this.header.block)}[h](){"/"!==this.path.slice(-1)&&(this.path+="/"),this.stat.size=0,this[g](),this.end()}[f](){s.readlink(this.absolute,((e,t)=>{if(e)return this.emit("error",e);this[w](t)}))}[w](e){this.linkpath=c(e),this[g](),this.end()}[m](e){this.type="Link",this.linkpath=c(a.relative(this.cwd,e)),this.stat.size=0,this[g](),this.end()}[p](){if(this.stat.nlink>1){const e=this.stat.dev+":"+this.stat.ino;if(this.linkCache.has(e)){const t=this.linkCache.get(e);if(0===t.indexOf(this.cwd))return this[m](t)}this.linkCache.set(e,this.absolute)}if(this[g](),0===this.stat.size)return this.end();this[C]()}[C](){s.open(this.absolute,"r",((e,t)=>{if(e)return this.emit("error",e);this[T](t)}))}[T](e){if(this.fd=e,this[P])return this[E]();this.blockLen=512*Math.ceil(this.stat.size/512),this.blockRemain=this.blockLen;const t=Math.min(this.blockLen,this.maxReadSize);this.buf=Buffer.allocUnsafe(t),this.offset=0,this.pos=0,this.remain=this.stat.size,this.length=this.buf.length,this[y]()}[y](){const{fd:e,buf:t,offset:n,length:r,pos:i}=this;s.read(e,t,n,r,i,((e,t)=>{if(e)return this[E]((()=>this.emit("error",e)));this[S](t)}))}[E](e){s.close(this.fd,e)}[S](e){if(e<=0&&this.remain>0){const e=new Error("encountered unexpected EOF");return e.path=this.absolute,e.syscall="read",e.code="EOF",this[E]((()=>this.emit("error",e)))}if(e>this.remain){const e=new Error("did not encounter expected EOF");return e.path=this.absolute,e.syscall="read",e.code="EOF",this[E]((()=>this.emit("error",e)))}if(e===this.remain)for(let t=e;t<this.length&&e<this.blockRemain;t++)this.buf[t+this.offset]=0,e++,this.remain++;const t=0===this.offset&&e===this.buf.length?this.buf:this.buf.slice(this.offset,this.offset+e);this.write(t)?this[R]():this[x]((()=>this[R]()))}[x](e){this.once("drain",e)}write(e){if(this.blockRemain<e.length){const e=new Error("writing more data than expected");return e.path=this.absolute,this.emit("error",e)}return this.remain-=e.length,this.blockRemain-=e.length,this.pos+=e.length,this.offset+=e.length,super.write(e)}[R](){if(!this.remain)return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),this[E]((e=>e?this.emit("error",e):this.end()));this.offset>=this.length&&(this.buf=Buffer.allocUnsafe(Math.min(this.blockRemain,this.buf.length)),this.offset=0),this.length=this.buf.length-this.offset,this[y]()}}),L=O(class extends r{constructor(e,t){super(t=t||{}),this.preservePaths=!!t.preservePaths,this.portable=!!t.portable,this.strict=!!t.strict,this.noPax=!!t.noPax,this.noMtime=!!t.noMtime,this.readEntry=e,this.type=e.type,"Directory"===this.type&&this.portable&&(this.noMtime=!0),this.prefix=t.prefix||null,this.path=c(e.path),this.mode=this[_](e.mode),this.uid=this.portable?null:e.uid,this.gid=this.portable?null:e.gid,this.uname=this.portable?null:e.uname,this.gname=this.portable?null:e.gname,this.size=e.size,this.mtime=this.noMtime?null:t.mtime||e.mtime,this.atime=this.portable?null:e.atime,this.ctime=this.portable?null:e.ctime,this.linkpath=c(e.linkpath),"function"==typeof t.onwarn&&this.on("warn",t.onwarn);let n=!1;if(!this.preservePaths){const[e,t]=A(this.path);e&&(this.path=t,n=e)}this.remain=e.size,this.blockRemain=e.startBlockSize,this.header=new o({path:this[I](this.path),linkpath:"Link"===this.type?this[I](this.linkpath):this.linkpath,mode:this.mode,uid:this.portable?null:this.uid,gid:this.portable?null:this.gid,size:this.size,mtime:this.noMtime?null:this.mtime,type:this.type,uname:this.portable?null:this.uname,atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime}),n&&this.warn("TAR_ENTRY_INFO",`stripping ${n} from absolute path`,{entry:this,path:n+this.path}),this.header.encode()&&!this.noPax&&super.write(new i({atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime,gid:this.portable?null:this.gid,mtime:this.noMtime?null:this.mtime,path:this[I](this.path),linkpath:"Link"===this.type?this[I](this.linkpath):this.linkpath,size:this.size,uid:this.portable?null:this.uid,uname:this.portable?null:this.uname,dev:this.portable?null:this.readEntry.dev,ino:this.portable?null:this.readEntry.ino,nlink:this.portable?null:this.readEntry.nlink}).encode()),super.write(this.header.block),e.pipe(this)}[I](e){return u(e,this.prefix)}[_](e){return k(e,"Directory"===this.type,this.portable)}write(e){const t=e.length;if(t>this.blockRemain)throw new Error("writing more to entry than is appropriate");return this.blockRemain-=t,super.write(e)}end(){return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),super.end()}});N.Sync=class extends N{[b](){this[v](s.lstatSync(this.absolute))}[f](){this[w](s.readlinkSync(this.absolute))}[C](){this[T](s.openSync(this.absolute,"r"))}[y](){let e=!0;try{const{fd:t,buf:n,offset:r,length:i,pos:o}=this,a=s.readSync(t,n,r,i,o);this[S](a),e=!1}finally{if(e)try{this[E]((()=>{}))}catch(e){}}}[x](e){e()}[E](e){s.closeSync(this.fd),e()}},N.Tar=L;const j=e=>e.isFile()?"File":e.isDirectory()?"Directory":e.isSymbolicLink()?"SymbolicLink":"Unsupported";e.exports=N},1566:(e,t,n)=>{"use strict";const r="object"==typeof process&&process?process:{stdout:null,stderr:null},i=n(4434),o=n(2203),s=n(3193).StringDecoder,a=Symbol("EOF"),c=Symbol("maybeEmitEnd"),l=Symbol("emittedEnd"),u=Symbol("emittingEnd"),d=Symbol("emittedError"),p=Symbol("closed"),h=Symbol("read"),f=Symbol("flush"),m=Symbol("flushChunk"),g=Symbol("encoding"),y=Symbol("decoder"),b=Symbol("flowing"),v=Symbol("paused"),S=Symbol("resume"),w=Symbol("buffer"),C=Symbol("pipes"),T=Symbol("bufferLength"),E=Symbol("bufferPush"),_=Symbol("bufferShift"),x=Symbol("objectMode"),R=Symbol("destroyed"),I=Symbol("error"),P=Symbol("emitData"),O=Symbol("emitEnd"),D=Symbol("emitEnd2"),A=Symbol("async"),k=Symbol("abort"),N=Symbol("aborted"),L=Symbol("signal"),j=e=>Promise.resolve().then(e),M="1"!==global._MP_NO_ITERATOR_SYMBOLS_,F=M&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),q=M&&Symbol.iterator||Symbol("iterator not implemented");class B{constructor(e,t,n){this.src=e,this.dest=t,this.opts=n,this.ondrain=()=>e[S](),t.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(){}end(){this.unpipe(),this.opts.end&&this.dest.end()}}class U extends B{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,t,n){super(e,t,n),this.proxyErrors=e=>t.emit("error",e),e.on("error",this.proxyErrors)}}class z extends o{constructor(e){super(),this[b]=!1,this[v]=!1,this[C]=[],this[w]=[],this[x]=e&&e.objectMode||!1,this[x]?this[g]=null:this[g]=e&&e.encoding||null,"buffer"===this[g]&&(this[g]=null),this[A]=e&&!!e.async||!1,this[y]=this[g]?new s(this[g]):null,this[a]=!1,this[l]=!1,this[u]=!1,this[p]=!1,this[d]=null,this.writable=!0,this.readable=!0,this[T]=0,this[R]=!1,e&&!0===e.debugExposeBuffer&&Object.defineProperty(this,"buffer",{get:()=>this[w]}),e&&!0===e.debugExposePipes&&Object.defineProperty(this,"pipes",{get:()=>this[C]}),this[L]=e&&e.signal,this[N]=!1,this[L]&&(this[L].addEventListener("abort",(()=>this[k]())),this[L].aborted&&this[k]())}get bufferLength(){return this[T]}get encoding(){return this[g]}set encoding(e){if(this[x])throw new Error("cannot set encoding in objectMode");if(this[g]&&e!==this[g]&&(this[y]&&this[y].lastNeed||this[T]))throw new Error("cannot change encoding");this[g]!==e&&(this[y]=e?new s(e):null,this[w].length&&(this[w]=this[w].map((e=>this[y].write(e))))),this[g]=e}setEncoding(e){this.encoding=e}get objectMode(){return this[x]}set objectMode(e){this[x]=this[x]||!!e}get async(){return this[A]}set async(e){this[A]=this[A]||!!e}[k](){this[N]=!0,this.emit("abort",this[L].reason),this.destroy(this[L].reason)}get aborted(){return this[N]}set aborted(e){}write(e,t,n){if(this[N])return!1;if(this[a])throw new Error("write after end");if(this[R])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;"function"==typeof t&&(n=t,t="utf8"),t||(t="utf8");const r=this[A]?j:e=>e();var i;return this[x]||Buffer.isBuffer(e)||(i=e,!Buffer.isBuffer(i)&&ArrayBuffer.isView(i)?e=Buffer.from(e.buffer,e.byteOffset,e.byteLength):(e=>e instanceof ArrayBuffer||"object"==typeof e&&e.constructor&&"ArrayBuffer"===e.constructor.name&&e.byteLength>=0)(e)?e=Buffer.from(e):"string"!=typeof e&&(this.objectMode=!0)),this[x]?(this.flowing&&0!==this[T]&&this[f](!0),this.flowing?this.emit("data",e):this[E](e),0!==this[T]&&this.emit("readable"),n&&r(n),this.flowing):e.length?("string"!=typeof e||t===this[g]&&!this[y].lastNeed||(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[g]&&(e=this[y].write(e)),this.flowing&&0!==this[T]&&this[f](!0),this.flowing?this.emit("data",e):this[E](e),0!==this[T]&&this.emit("readable"),n&&r(n),this.flowing):(0!==this[T]&&this.emit("readable"),n&&r(n),this.flowing)}read(e){if(this[R])return null;if(0===this[T]||0===e||e>this[T])return this[c](),null;this[x]&&(e=null),this[w].length>1&&!this[x]&&(this.encoding?this[w]=[this[w].join("")]:this[w]=[Buffer.concat(this[w],this[T])]);const t=this[h](e||null,this[w][0]);return this[c](),t}[h](e,t){return e===t.length||null===e?this[_]():(this[w][0]=t.slice(e),t=t.slice(0,e),this[T]-=e),this.emit("data",t),this[w].length||this[a]||this.emit("drain"),t}end(e,t,n){return"function"==typeof e&&(n=e,e=null),"function"==typeof t&&(n=t,t="utf8"),e&&this.write(e,t),n&&this.once("end",n),this[a]=!0,this.writable=!1,!this.flowing&&this[v]||this[c](),this}[S](){this[R]||(this[v]=!1,this[b]=!0,this.emit("resume"),this[w].length?this[f]():this[a]?this[c]():this.emit("drain"))}resume(){return this[S]()}pause(){this[b]=!1,this[v]=!0}get destroyed(){return this[R]}get flowing(){return this[b]}get paused(){return this[v]}[E](e){this[x]?this[T]+=1:this[T]+=e.length,this[w].push(e)}[_](){return this[x]?this[T]-=1:this[T]-=this[w][0].length,this[w].shift()}[f](e){do{}while(this[m](this[_]())&&this[w].length);e||this[w].length||this[a]||this.emit("drain")}[m](e){return this.emit("data",e),this.flowing}pipe(e,t){if(this[R])return;const n=this[l];return t=t||{},e===r.stdout||e===r.stderr?t.end=!1:t.end=!1!==t.end,t.proxyErrors=!!t.proxyErrors,n?t.end&&e.end():(this[C].push(t.proxyErrors?new U(this,e,t):new B(this,e,t)),this[A]?j((()=>this[S]())):this[S]()),e}unpipe(e){const t=this[C].find((t=>t.dest===e));t&&(this[C].splice(this[C].indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){const n=super.on(e,t);return"data"!==e||this[C].length||this.flowing?"readable"===e&&0!==this[T]?super.emit("readable"):(e=>"end"===e||"finish"===e||"prefinish"===e)(e)&&this[l]?(super.emit(e),this.removeAllListeners(e)):"error"===e&&this[d]&&(this[A]?j((()=>t.call(this,this[d]))):t.call(this,this[d])):this[S](),n}get emittedEnd(){return this[l]}[c](){this[u]||this[l]||this[R]||0!==this[w].length||!this[a]||(this[u]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[p]&&this.emit("close"),this[u]=!1)}emit(e,t,...n){if("error"!==e&&"close"!==e&&e!==R&&this[R])return;if("data"===e)return!(!this[x]&&!t)&&(this[A]?j((()=>this[P](t))):this[P](t));if("end"===e)return this[O]();if("close"===e){if(this[p]=!0,!this[l]&&!this[R])return;const e=super.emit("close");return this.removeAllListeners("close"),e}if("error"===e){this[d]=t,super.emit(I,t);const e=!(this[L]&&!this.listeners("error").length)&&super.emit("error",t);return this[c](),e}if("resume"===e){const e=super.emit("resume");return this[c](),e}if("finish"===e||"prefinish"===e){const t=super.emit(e);return this.removeAllListeners(e),t}const r=super.emit(e,t,...n);return this[c](),r}[P](e){for(const t of this[C])!1===t.dest.write(e)&&this.pause();const t=super.emit("data",e);return this[c](),t}[O](){this[l]||(this[l]=!0,this.readable=!1,this[A]?j((()=>this[D]())):this[D]())}[D](){if(this[y]){const e=this[y].end();if(e){for(const t of this[C])t.dest.write(e);super.emit("data",e)}}for(const e of this[C])e.end();const e=super.emit("end");return this.removeAllListeners("end"),e}collect(){const e=[];this[x]||(e.dataLength=0);const t=this.promise();return this.on("data",(t=>{e.push(t),this[x]||(e.dataLength+=t.length)})),t.then((()=>e))}concat(){return this[x]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then((e=>this[x]?Promise.reject(new Error("cannot concat in objectMode")):this[g]?e.join(""):Buffer.concat(e,e.dataLength)))}promise(){return new Promise(((e,t)=>{this.on(R,(()=>t(new Error("stream destroyed")))),this.on("error",(e=>t(e))),this.on("end",(()=>e()))}))}[F](){let e=!1;const t=()=>(this.pause(),e=!0,Promise.resolve({done:!0}));return{next:()=>{if(e)return t();const n=this.read();if(null!==n)return Promise.resolve({done:!1,value:n});if(this[a])return t();let r=null,i=null;const o=e=>{this.removeListener("data",s),this.removeListener("end",c),this.removeListener(R,l),t(),i(e)},s=e=>{this.removeListener("error",o),this.removeListener("end",c),this.removeListener(R,l),this.pause(),r({value:e,done:!!this[a]})},c=()=>{this.removeListener("error",o),this.removeListener("data",s),this.removeListener(R,l),t(),r({done:!0})},l=()=>o(new Error("stream destroyed"));return new Promise(((e,t)=>{i=t,r=e,this.once(R,l),this.once("error",o),this.once("end",c),this.once("data",s)}))},throw:t,return:t,[F](){return this}}}[q](){let e=!1;const t=()=>(this.pause(),this.removeListener(I,t),this.removeListener(R,t),this.removeListener("end",t),e=!0,{done:!0});return this.once("end",t),this.once(I,t),this.once(R,t),{next:()=>{if(e)return t();const n=this.read();return null===n?t():{value:n}},throw:t,return:t,[q](){return this}}}destroy(e){return this[R]?(e?this.emit("error",e):this.emit(R),this):(this[R]=!0,this[w].length=0,this[T]=0,"function"!=typeof this.close||this[p]||this.close(),e?this.emit("error",e):this.emit(R),this)}static isStream(e){return!!e&&(e instanceof z||e instanceof o||e instanceof i&&("function"==typeof e.pipe||"function"==typeof e.write&&"function"==typeof e.end))}}t.Minipass=z},5083:(e,t,n)=>{const r=n(9896),i=n(6928),o=n(6982),s=n(3726),a=process.binding("constants"),c=s(),l="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",u=/XXXXXX/,d=(a.O_CREAT||a.fs.O_CREAT)|(a.O_EXCL||a.fs.O_EXCL)|(a.O_RDWR||a.fs.O_RDWR),p=a.EBADF||a.os.errno.EBADF,h=a.ENOENT||a.os.errno.ENOENT,f=[];var m=!1,g=!1;function y(e){var t=[],n=null;try{n=o.randomBytes(e)}catch(t){n=o.pseudoRandomBytes(e)}for(var r=0;r<e;r++)t.push(l[n[r]%l.length]);return t.join("")}function b(e){return void 0===e}function v(e,t){return"function"==typeof e?[t||{},e]:b(e)?[{},t]:[e,t]}function S(e){if(e.name)return i.join(e.dir||c,e.name);if(e.template)return e.template.replace(u,y(6));const t=[e.prefix||"tmp-",process.pid,y(12),e.postfix||""].join("");return i.join(e.dir||c,t)}function w(e,t){var n=v(e,t),i=n[0],o=n[1],s=i.name?1:i.tries||3;return isNaN(s)||s<0?o(new Error("Invalid tries")):i.template&&!i.template.match(u)?o(new Error("Invalid template provided")):void function e(){const t=S(i);r.stat(t,(function(n){if(!n)return s-- >0?e():o(new Error("Could not get a unique tmp filename, max tries reached "+t));o(null,t)}))}()}function C(e){var t=v(e)[0],n=t.name?1:t.tries||3;if(isNaN(n)||n<0)throw new Error("Invalid tries");if(t.template&&!t.template.match(u))throw new Error("Invalid template provided");do{const e=S(t);try{r.statSync(e)}catch(t){return e}}while(n-- >0);throw new Error("Could not get a unique tmp filename, max tries reached")}function T(e){const t=[e];do{for(var n=t.pop(),o=!1,s=r.readdirSync(n),a=0,c=s.length;a<c;a++){var l=i.join(n,s[a]);r.lstatSync(l).isDirectory()?(o||(o=!0,t.push(n)),t.push(l)):r.unlinkSync(l)}o||r.rmdirSync(n)}while(0!==t.length)}function E(e,t,n){const i=x((function(e){try{0<=e[0]&&r.closeSync(e[0])}catch(e){if(!P(e,-p,"EBADF")&&!I(e))throw e}try{r.unlinkSync(e[1])}catch(e){if(!I(e))throw e}}),[t,e]);return n.keep||f.unshift(i),i}function _(e,t){const n=x(t.unsafeCleanup?T:r.rmdirSync.bind(r),e);return t.keep||f.unshift(n),n}function x(e,t){var n=!1;return function r(i){if(!n){const i=f.indexOf(r);i>=0&&f.splice(i,1),n=!0,e(t)}i&&i(null)}}function R(){if(!g||m)for(;f.length;)try{f[0].call(null)}catch(e){}}function I(e){return P(e,-h,"ENOENT")}function P(e,t,n){return e.code==t||e.code==n}const O=process.versions.node.split(".").map((function(e){return parseInt(e,10)}));0===O[0]&&(O[1]<9||9===O[1]&&O[2]<5)&&process.addListener("uncaughtException",(function(e){throw g=!0,R(),e})),process.addListener("exit",(function(e){e&&(g=!0),R()})),e.exports.tmpdir=c,e.exports.dir=function(e,t){var n=v(e,t),i=n[0],o=n[1];w(i,(function(e,t){if(e)return o(e);r.mkdir(t,i.mode||448,(function(e){if(e)return o(e);o(null,t,_(t,i))}))}))},e.exports.dirSync=function(e){var t=v(e)[0];const n=C(t);return r.mkdirSync(n,t.mode||448),{name:n,removeCallback:_(n,t)}},e.exports.file=function(e,t){var n=v(e,t),i=n[0],o=n[1];i.postfix=b(i.postfix)?".tmp":i.postfix,w(i,(function(e,t){if(e)return o(e);r.open(t,d,i.mode||384,(function(e,n){return e?o(e):i.discardDescriptor?r.close(n,(function(e){if(e){try{r.unlinkSync(t)}catch(t){I(t)||(e=t)}return o(e)}o(null,t,void 0,E(t,-1,i))})):i.detachDescriptor?o(null,t,n,E(t,-1,i)):void o(null,t,n,E(t,n,i))}))}))},e.exports.fileSync=function(e){var t=v(e)[0];t.postfix=t.postfix||".tmp";const n=t.discardDescriptor||t.detachDescriptor,i=C(t);var o=r.openSync(i,d,t.mode||384);return t.discardDescriptor&&(r.closeSync(o),o=void 0),{name:i,fd:o,removeCallback:E(i,n?-1:o,t)}},e.exports.tmpName=w,e.exports.tmpNameSync=C,e.exports.setGracefulCleanup=function(){m=!0}},5360:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(8898),i=n(311);var o;!function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:r.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:r.Event.None}),e.is=function(t){let n=t;return n&&(n===e.None||n===e.Cancelled||i.boolean(n.isCancellationRequested)&&!!n.onCancellationRequested)}}(o=t.CancellationToken||(t.CancellationToken={}));const s=Object.freeze((function(e,t){let n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}}));class a{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this._emitter=void 0))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?s:(this._emitter||(this._emitter=new r.Emitter),this._emitter.event)}}t.CancellationTokenSource=class{get token(){return this._token||(this._token=new a),this._token}cancel(){this._token?this._token.cancel():this._token=o.Cancelled}dispose(){this.cancel()}}},8898:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(t.Disposable||(t.Disposable={})).create=function(e){return{dispose:e}},function(e){const t={dispose(){}};e.None=function(){return t}}(t.Event||(t.Event={}));class n{add(e,t=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(n)&&n.push({dispose:()=>this.remove(e,t)})}remove(e,t=null){if(this._callbacks){for(var n=!1,r=0,i=this._callbacks.length;r<i;r++)if(this._callbacks[r]===e){if(this._contexts[r]===t)return this._callbacks.splice(r,1),void this._contexts.splice(r,1);n=!0}if(n)throw new Error("When adding a listener with a context, you should remove it with the same context")}}invoke(...e){if(!this._callbacks)return[];for(var t=[],n=this._callbacks.slice(0),r=this._contexts.slice(0),i=0,o=n.length;i<o;i++)try{t.push(n[i].apply(r[i],e))}catch(e){console.error(e)}return t}isEmpty(){return!this._callbacks||0===this._callbacks.length}dispose(){this._callbacks=void 0,this._contexts=void 0}}class r{constructor(e){this._options=e}get event(){return this._event||(this._event=(e,t,i)=>{let o;return this._callbacks||(this._callbacks=new n),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t),o={dispose:()=>{this._callbacks.remove(e,t),o.dispose=r._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this)}},Array.isArray(i)&&i.push(o),o}),this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}r._noop=function(){},t.Emitter=r},311:(e,t)=>{"use strict";function n(e){return"string"==typeof e||e instanceof String}function r(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=function(e){return"function"==typeof e},t.array=r,t.stringArray=function(e){return r(e)&&e.every((e=>n(e)))}},8446:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.None=0,e.First=1,e.Last=2}(n=t.Touch||(t.Touch={})),t.LinkedMap=class{constructor(){this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}has(e){return this._map.has(e)}get(e){const t=this._map.get(e);if(t)return t.value}set(e,t,r=n.None){let i=this._map.get(e);if(i)i.value=t,r!==n.None&&this.touch(i,r);else{switch(i={key:e,value:t,next:void 0,previous:void 0},r){case n.None:this.addItemLast(i);break;case n.First:this.addItemFirst(i);break;case n.Last:default:this.addItemLast(i)}this._map.set(e,i),this._size++}}delete(e){const t=this._map.get(e);return!!t&&(this._map.delete(e),this.removeItem(t),this._size--,!0)}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){let n=this._head;for(;n;)t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),n=n.next}forEachReverse(e,t){let n=this._tail;for(;n;)t?e.bind(t)(n.value,n.key,this):e(n.value,n.key,this),n=n.previous}values(){let e=[],t=this._head;for(;t;)e.push(t.value),t=t.next;return e}keys(){let e=[],t=this._head;for(;t;)e.push(t.key),t=t.next;return e}addItemFirst(e){if(this._head||this._tail){if(!this._head)throw new Error("Invalid list");e.next=this._head,this._head.previous=e}else this._tail=e;this._head=e}addItemLast(e){if(this._head||this._tail){if(!this._tail)throw new Error("Invalid list");e.previous=this._tail,this._tail.next=e}else this._head=e;this._tail=e}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head)this._head=e.next;else if(e===this._tail)this._tail=e.previous;else{const t=e.next,n=e.previous;if(!t||!n)throw new Error("Invalid list");t.previous=n,n.next=t}}touch(e,t){if(!this._head||!this._tail)throw new Error("Invalid list");if(t===n.First||t===n.Last)if(t===n.First){if(e===this._head)return;const t=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(t.previous=n,n.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e}else if(t===n.Last){if(e===this._tail)return;const t=e.next,n=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=n,n.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e}}}},4590:(e,t,n)=>{"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0});const i=n(311),o=n(5043);t.RequestType=o.RequestType,t.RequestType0=o.RequestType0,t.RequestType1=o.RequestType1,t.RequestType2=o.RequestType2,t.RequestType3=o.RequestType3,t.RequestType4=o.RequestType4,t.RequestType5=o.RequestType5,t.RequestType6=o.RequestType6,t.RequestType7=o.RequestType7,t.RequestType8=o.RequestType8,t.RequestType9=o.RequestType9,t.ResponseError=o.ResponseError,t.ErrorCodes=o.ErrorCodes,t.NotificationType=o.NotificationType,t.NotificationType0=o.NotificationType0,t.NotificationType1=o.NotificationType1,t.NotificationType2=o.NotificationType2,t.NotificationType3=o.NotificationType3,t.NotificationType4=o.NotificationType4,t.NotificationType5=o.NotificationType5,t.NotificationType6=o.NotificationType6,t.NotificationType7=o.NotificationType7,t.NotificationType8=o.NotificationType8,t.NotificationType9=o.NotificationType9;const s=n(8919);t.MessageReader=s.MessageReader,t.StreamMessageReader=s.StreamMessageReader,t.IPCMessageReader=s.IPCMessageReader,t.SocketMessageReader=s.SocketMessageReader;const a=n(7159);t.MessageWriter=a.MessageWriter,t.StreamMessageWriter=a.StreamMessageWriter,t.IPCMessageWriter=a.IPCMessageWriter,t.SocketMessageWriter=a.SocketMessageWriter;const c=n(8898);t.Disposable=c.Disposable,t.Event=c.Event,t.Emitter=c.Emitter;const l=n(5360);t.CancellationTokenSource=l.CancellationTokenSource,t.CancellationToken=l.CancellationToken;const u=n(8446);var d,p,h,f,m,g,y;r(n(3696)),r(n(5851)),function(e){e.type=new o.NotificationType("$/cancelRequest")}(d||(d={})),t.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}}),function(e){e[e.Off=0]="Off",e[e.Messages=1]="Messages",e[e.Verbose=2]="Verbose"}(p=t.Trace||(t.Trace={})),function(e){e.fromString=function(t){switch(t=t.toLowerCase()){case"off":default:return e.Off;case"messages":return e.Messages;case"verbose":return e.Verbose}},e.toString=function(t){switch(t){case e.Off:return"off";case e.Messages:return"messages";case e.Verbose:return"verbose";default:return"off"}}}(p=t.Trace||(t.Trace={})),function(e){e.Text="text",e.JSON="json"}(t.TraceFormat||(t.TraceFormat={})),function(e){e.fromString=function(t){return"json"===(t=t.toLowerCase())?e.JSON:e.Text}}(h=t.TraceFormat||(t.TraceFormat={})),function(e){e.type=new o.NotificationType("$/setTraceNotification")}(f=t.SetTraceNotification||(t.SetTraceNotification={})),function(e){e.type=new o.NotificationType("$/logTraceNotification")}(m=t.LogTraceNotification||(t.LogTraceNotification={})),function(e){e[e.Closed=1]="Closed",e[e.Disposed=2]="Disposed",e[e.AlreadyListening=3]="AlreadyListening"}(g=t.ConnectionErrors||(t.ConnectionErrors={}));class b extends Error{constructor(e,t){super(t),this.code=e,Object.setPrototypeOf(this,b.prototype)}}function v(e,t,n,r){let s=0,a=0,v=0;const S="2.0";let w,C,T,E,_=Object.create(null),x=Object.create(null),R=new u.LinkedMap,I=Object.create(null),P=Object.create(null),O=p.Off,D=h.Text,A=y.New,k=new c.Emitter,N=new c.Emitter,L=new c.Emitter,j=new c.Emitter;function M(e){return"req-"+e.toString()}function F(e){}function q(){return A===y.Listening}function B(){return A===y.Closed}function U(){return A===y.Disposed}function z(){A!==y.New&&A!==y.Listening||(A=y.Closed,N.fire(void 0))}function G(){T||0===R.size||(T=setImmediate((()=>{T=void 0,function(){if(0===R.size)return;let e=R.shift();try{o.isRequestMessage(e)?function(e){if(U())return;function n(n,r,i){let s={jsonrpc:S,id:e.id};n instanceof o.ResponseError?s.error=n.toJson():s.result=void 0===n?null:n,V(s,r,i),t.write(s)}function r(n,r,i){let o={jsonrpc:S,id:e.id,error:n.toJson()};V(o,r,i),t.write(o)}!function(e){if(O!==p.Off&&E)if(D===h.Text){let t;O===p.Verbose&&e.params&&(t=`Params: ${JSON.stringify(e.params,null,4)}\n\n`),E.log(`Received request '${e.method} - (${e.id})'.`,t)}else $("receive-request",e)}(e);let s,a,c=_[e.method];c&&(s=c.type,a=c.handler);let u=Date.now();if(a||w){let c=new l.CancellationTokenSource,d=String(e.id);P[d]=c;try{let l;l=void 0===e.params||void 0!==s&&0===s.numberOfParams?a?a(c.token):w(e.method,c.token):i.array(e.params)&&(void 0===s||s.numberOfParams>1)?a?a(...e.params,c.token):w(e.method,...e.params,c.token):a?a(e.params,c.token):w(e.method,e.params,c.token);let p=l;l?p.then?p.then((t=>{delete P[d],n(t,e.method,u)}),(t=>{delete P[d],t instanceof o.ResponseError?r(t,e.method,u):t&&i.string(t.message)?r(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,u):r(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,u)})):(delete P[d],n(l,e.method,u)):(delete P[d],function(n,r,i){void 0===n&&(n=null);let o={jsonrpc:S,id:e.id,result:n};V(o,r,i),t.write(o)}(l,e.method,u))}catch(t){delete P[d],t instanceof o.ResponseError?n(t,e.method,u):t&&i.string(t.message)?r(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,u):r(new o.ResponseError(o.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,u)}}else r(new o.ResponseError(o.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,u)}(e):o.isNotificationMessage(e)?function(e){if(U())return;let t,r;if(e.method===d.type.method)r=e=>{let t=e.id,n=P[String(t)];n&&n.cancel()};else{let n=x[e.method];n&&(r=n.handler,t=n.type)}if(r||C)try{!function(e){if(O!==p.Off&&E&&e.method!==m.type.method)if(D===h.Text){let t;O===p.Verbose&&(t=e.params?`Params: ${JSON.stringify(e.params,null,4)}\n\n`:"No parameters provided.\n\n"),E.log(`Received notification '${e.method}'.`,t)}else $("receive-notification",e)}(e),void 0===e.params||void 0!==t&&0===t.numberOfParams?r?r():C(e.method):i.array(e.params)&&(void 0===t||t.numberOfParams>1)?r?r(...e.params):C(e.method,...e.params):r?r(e.params):C(e.method,e.params)}catch(t){t.message?n.error(`Notification handler '${e.method}' failed with message: ${t.message}`):n.error(`Notification handler '${e.method}' failed unexpectedly.`)}else L.fire(e)}(e):o.isResponseMessage(e)?function(e){if(!U())if(null===e.id)e.error?n.error(`Received response message without id: Error is: \n${JSON.stringify(e.error,void 0,4)}`):n.error("Received response message without id. No further error information provided.");else{let t=String(e.id),r=I[t];if(function(e,t){if(O!==p.Off&&E)if(D===h.Text){let n;if(O===p.Verbose&&(e.error&&e.error.data?n=`Error data: ${JSON.stringify(e.error.data,null,4)}\n\n`:e.result?n=`Result: ${JSON.stringify(e.result,null,4)}\n\n`:void 0===e.error&&(n="No result returned.\n\n")),t){let r=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:"";E.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${r}`,n)}else E.log(`Received response ${e.id} without active response promise.`,n)}else $("receive-response",e)}(e,r),r){delete I[t];try{if(e.error){let t=e.error;r.reject(new o.ResponseError(t.code,t.message,t.data))}else{if(void 0===e.result)throw new Error("Should never happen.");r.resolve(e.result)}}catch(e){e.message?n.error(`Response handler '${r.method}' failed with message: ${e.message}`):n.error(`Response handler '${r.method}' failed unexpectedly.`)}}}}(e):function(e){if(!e)return void n.error("Received empty message.");n.error(`Received message which is neither a response nor a notification message:\n${JSON.stringify(e,null,4)}`);let t=e;if(i.string(t.id)||i.number(t.id)){let e=String(t.id),n=I[e];n&&n.reject(new Error("The received response has neither a result nor an error property."))}}(e)}finally{G()}}()})))}e.onClose(z),e.onError((function(e){k.fire([e,void 0,void 0])})),t.onClose(z),t.onError((function(e){k.fire(e)}));let H=e=>{try{if(o.isNotificationMessage(e)&&e.method===d.type.method){let n=M(e.params.id),i=R.get(n);if(o.isRequestMessage(i)){let o=r&&r.cancelUndispatched?r.cancelUndispatched(i,F):void 0;if(o&&(void 0!==o.error||void 0!==o.result))return R.delete(n),o.id=i.id,V(o,e.method,Date.now()),void t.write(o)}}!function(e,t){var n;o.isRequestMessage(t)?e.set(M(t.id),t):o.isResponseMessage(t)?e.set(null===(n=t.id)?"res-unknown-"+(++v).toString():"res-"+n.toString(),t):e.set("not-"+(++a).toString(),t)}(R,e)}finally{G()}};function V(e,t,n){if(O!==p.Off&&E)if(D===h.Text){let r;O===p.Verbose&&(e.error&&e.error.data?r=`Error data: ${JSON.stringify(e.error.data,null,4)}\n\n`:e.result?r=`Result: ${JSON.stringify(e.result,null,4)}\n\n`:void 0===e.error&&(r="No result returned.\n\n")),E.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-n}ms`,r)}else $("send-response",e)}function $(e,t){if(!E||O===p.Off)return;const n={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};E.log(n)}function W(){if(B())throw new b(g.Closed,"Connection is closed.");if(U())throw new b(g.Disposed,"Connection is disposed.")}function K(e){return void 0===e?null:e}function Q(e,t){let n,r=e.numberOfParams;switch(r){case 0:n=null;break;case 1:n=K(t[0]);break;default:n=[];for(let e=0;e<t.length&&e<r;e++)n.push(K(t[e]));if(t.length<r)for(let e=t.length;e<r;e++)n.push(null)}return n}let X={sendNotification:(e,...n)=>{let r,o;if(W(),i.string(e))switch(r=e,n.length){case 0:o=null;break;case 1:o=n[0];break;default:o=n}else r=e.method,o=Q(e,n);let s={jsonrpc:S,method:r,params:o};!function(e){if(O!==p.Off&&E)if(D===h.Text){let t;O===p.Verbose&&(t=e.params?`Params: ${JSON.stringify(e.params,null,4)}\n\n`:"No parameters provided.\n\n"),E.log(`Sending notification '${e.method}'.`,t)}else $("send-notification",e)}(s),t.write(s)},onNotification:(e,t)=>{W(),i.func(e)?C=e:t&&(i.string(e)?x[e]={type:void 0,handler:t}:x[e.method]={type:e,handler:t})},sendRequest:(e,...n)=>{let r,a,c;if(W(),function(){if(!q())throw new Error("Call listen() first.")}(),i.string(e))switch(r=e,n.length){case 0:a=null;break;case 1:l.CancellationToken.is(n[0])?(a=null,c=n[0]):a=K(n[0]);break;default:const e=n.length-1;l.CancellationToken.is(n[e])?(c=n[e],a=2===n.length?K(n[0]):n.slice(0,e).map((e=>K(e)))):a=n.map((e=>K(e)))}else{r=e.method,a=Q(e,n);let t=e.numberOfParams;c=l.CancellationToken.is(n[t])?n[t]:void 0}let u=s++,f=new Promise(((e,n)=>{let i={jsonrpc:S,id:u,method:r,params:a},s={method:r,timerStart:Date.now(),resolve:e,reject:n};!function(e){if(O!==p.Off&&E)if(D===h.Text){let t;O===p.Verbose&&e.params&&(t=`Params: ${JSON.stringify(e.params,null,4)}\n\n`),E.log(`Sending request '${e.method} - (${e.id})'.`,t)}else $("send-request",e)}(i);try{t.write(i)}catch(e){s.reject(new o.ResponseError(o.ErrorCodes.MessageWriteError,e.message?e.message:"Unknown reason")),s=null}s&&(I[String(u)]=s)}));return c&&c.onCancellationRequested((()=>{X.sendNotification(d.type,{id:u})})),f},onRequest:(e,t)=>{W(),i.func(e)?w=e:t&&(i.string(e)?_[e]={type:void 0,handler:t}:_[e.method]={type:e,handler:t})},trace:(e,t,n)=>{let r=!1,o=h.Text;void 0!==n&&(i.boolean(n)?r=n:(r=n.sendNotification||!1,o=n.traceFormat||h.Text)),O=e,D=o,E=O===p.Off?void 0:t,!r||B()||U()||X.sendNotification(f.type,{value:p.toString(e)})},onError:k.event,onClose:N.event,onUnhandledNotification:L.event,onDispose:j.event,dispose:()=>{if(U())return;A=y.Disposed,j.fire(void 0);let n=new Error("Connection got disposed.");Object.keys(I).forEach((e=>{I[e].reject(n)})),I=Object.create(null),P=Object.create(null),R=new u.LinkedMap,i.func(t.dispose)&&t.dispose(),i.func(e.dispose)&&e.dispose()},listen:()=>{W(),function(){if(q())throw new b(g.AlreadyListening,"Connection is already listening")}(),A=y.Listening,e.listen(H)},inspect:()=>{console.log("inspect")}};return X.onNotification(m.type,(e=>{O!==p.Off&&E&&E.log(e.message,O===p.Verbose?e.verbose:void 0)})),X}t.ConnectionError=b,(t.ConnectionStrategy||(t.ConnectionStrategy={})).is=function(e){let t=e;return t&&i.func(t.cancelUndispatched)},function(e){e[e.New=1]="New",e[e.Listening=2]="Listening",e[e.Closed=3]="Closed",e[e.Disposed=4]="Disposed"}(y||(y={})),t.createMessageConnection=function(e,n,r,i){r||(r=t.NullLogger);let o=void 0!==(c=e).listen&&void 0===c.read?e:new s.StreamMessageReader(e);var c;let l=function(e){return void 0!==e.write&&void 0===e.end}(n)?n:new a.StreamMessageWriter(n);return v(o,l,r,i)}},8919:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(8898),i=n(311);let o=8192,s=Buffer.from("\r","ascii")[0],a=Buffer.from("\n","ascii")[0];class c{constructor(e="utf8"){this.encoding=e,this.index=0,this.buffer=Buffer.allocUnsafe(o)}append(e){var t=e;if("string"==typeof e){var n=e,r=Buffer.byteLength(n,this.encoding);(t=Buffer.allocUnsafe(r)).write(n,0,r,this.encoding)}if(this.buffer.length-this.index>=t.length)t.copy(this.buffer,this.index,0,t.length);else{var i=(Math.ceil((this.index+t.length)/o)+1)*o;0===this.index?(this.buffer=Buffer.allocUnsafe(i),t.copy(this.buffer,0,0,t.length)):this.buffer=Buffer.concat([this.buffer.slice(0,this.index),t],i)}this.index+=t.length}tryReadHeaders(){let e,t=0;for(;t+3<this.index&&(this.buffer[t]!==s||this.buffer[t+1]!==a||this.buffer[t+2]!==s||this.buffer[t+3]!==a);)t++;if(t+3>=this.index)return e;e=Object.create(null),this.buffer.toString("ascii",0,t).split("\r\n").forEach((t=>{let n=t.indexOf(":");if(-1===n)throw new Error("Message header must separate key and value using :");let r=t.substr(0,n),i=t.substr(n+1).trim();e[r]=i}));let n=t+4;return this.buffer=this.buffer.slice(n),this.index=this.index-n,e}tryReadContent(e){if(this.index<e)return null;let t=this.buffer.toString(this.encoding,0,e),n=e;return this.buffer.copy(this.buffer,0,n),this.index=this.index-n,t}get numberOfBytes(){return this.index}}(t.MessageReader||(t.MessageReader={})).is=function(e){let t=e;return t&&i.func(t.listen)&&i.func(t.dispose)&&i.func(t.onError)&&i.func(t.onClose)&&i.func(t.onPartialMessage)};class l{constructor(){this.errorEmitter=new r.Emitter,this.closeEmitter=new r.Emitter,this.partialMessageEmitter=new r.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:new Error(`Reader recevied error. Reason: ${i.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageReader=l;class u extends l{constructor(e,t="utf8"){super(),this.readable=e,this.buffer=new c(t),this._partialMessageTimeout=1e4}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e,this.readable.on("data",(e=>{this.onData(e)})),this.readable.on("error",(e=>this.fireError(e))),this.readable.on("close",(()=>this.fireClose()))}onData(e){for(this.buffer.append(e);;){if(-1===this.nextMessageLength){let e=this.buffer.tryReadHeaders();if(!e)return;let t=e["Content-Length"];if(!t)throw new Error("Header must provide a Content-Length property.");let n=parseInt(t);if(isNaN(n))throw new Error("Content-Length value must be a number.");this.nextMessageLength=n}var t=this.buffer.tryReadContent(this.nextMessageLength);if(null===t)return void this.setPartialMessageTimer();this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.messageToken++;var n=JSON.parse(t);this.callback(n)}}clearPartialMessageTimer(){this.partialMessageTimer&&(clearTimeout(this.partialMessageTimer),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),this._partialMessageTimeout<=0||(this.partialMessageTimer=setTimeout(((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())}),this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}t.StreamMessageReader=u,t.IPCMessageReader=class extends l{constructor(e){super(),this.process=e;let t=this.process;t.on("error",(e=>this.fireError(e))),t.on("close",(()=>this.fireClose()))}listen(e){this.process.on("message",e)}},t.SocketMessageReader=class extends u{constructor(e,t="utf-8"){super(e,t)}}},7159:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(8898),i=n(311);let o="Content-Length: ",s="\r\n";(t.MessageWriter||(t.MessageWriter={})).is=function(e){let t=e;return t&&i.func(t.dispose)&&i.func(t.onClose)&&i.func(t.onError)&&i.func(t.write)};class a{constructor(){this.errorEmitter=new r.Emitter,this.closeEmitter=new r.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,n){this.errorEmitter.fire([this.asError(e),t,n])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:new Error(`Writer recevied error. Reason: ${i.string(e.message)?e.message:"unknown"}`)}}t.AbstractMessageWriter=a,t.StreamMessageWriter=class extends a{constructor(e,t="utf8"){super(),this.writable=e,this.encoding=t,this.errorCount=0,this.writable.on("error",(e=>this.fireError(e))),this.writable.on("close",(()=>this.fireClose()))}write(e){let t=JSON.stringify(e),n=Buffer.byteLength(t,this.encoding),r=[o,n.toString(),s,s];try{this.writable.write(r.join(""),"ascii"),this.writable.write(t,this.encoding),this.errorCount=0}catch(t){this.errorCount++,this.fireError(t,e,this.errorCount)}}},t.IPCMessageWriter=class extends a{constructor(e){super(),this.process=e,this.errorCount=0,this.queue=[],this.sending=!1;let t=this.process;t.on("error",(e=>this.fireError(e))),t.on("close",(()=>this.fireClose))}write(e){this.sending||0!==this.queue.length?this.queue.push(e):this.doWriteMessage(e)}doWriteMessage(e){try{this.process.send&&(this.sending=!0,this.process.send(e,void 0,void 0,(t=>{this.sending=!1,t?(this.errorCount++,this.fireError(t,e,this.errorCount)):this.errorCount=0,this.queue.length>0&&this.doWriteMessage(this.queue.shift())})))}catch(t){this.errorCount++,this.fireError(t,e,this.errorCount)}}},t.SocketMessageWriter=class extends a{constructor(e,t="utf8"){super(),this.socket=e,this.queue=[],this.sending=!1,this.encoding=t,this.errorCount=0,this.socket.on("error",(e=>this.fireError(e))),this.socket.on("close",(()=>this.fireClose()))}write(e){this.sending||0!==this.queue.length?this.queue.push(e):this.doWriteMessage(e)}doWriteMessage(e){let t=JSON.stringify(e),n=Buffer.byteLength(t,this.encoding),r=[o,n.toString(),s,s];try{this.sending=!0,this.socket.write(r.join(""),"ascii",(n=>{n&&this.handleError(n,e);try{this.socket.write(t,this.encoding,(t=>{this.sending=!1,t?this.handleError(t,e):this.errorCount=0,this.queue.length>0&&this.doWriteMessage(this.queue.shift())}))}catch(n){this.handleError(n,e)}}))}catch(t){this.handleError(t,e)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}}},5043:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(311);var i;!function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.serverErrorStart=-32099,e.serverErrorEnd=-32e3,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.RequestCancelled=-32800,e.MessageWriteError=1,e.MessageReadError=2}(i=t.ErrorCodes||(t.ErrorCodes={}));class o extends Error{constructor(e,t,n){super(t),this.code=r.number(e)?e:i.UnknownErrorCode,this.data=n,Object.setPrototypeOf(this,o.prototype)}toJson(){return{code:this.code,message:this.message,data:this.data}}}t.ResponseError=o;class s{constructor(e,t){this._method=e,this._numberOfParams=t}get method(){return this._method}get numberOfParams(){return this._numberOfParams}}t.AbstractMessageType=s,t.RequestType0=class extends s{constructor(e){super(e,0),this._=void 0}},t.RequestType=class extends s{constructor(e){super(e,1),this._=void 0}},t.RequestType1=class extends s{constructor(e){super(e,1),this._=void 0}},t.RequestType2=class extends s{constructor(e){super(e,2),this._=void 0}},t.RequestType3=class extends s{constructor(e){super(e,3),this._=void 0}},t.RequestType4=class extends s{constructor(e){super(e,4),this._=void 0}},t.RequestType5=class extends s{constructor(e){super(e,5),this._=void 0}},t.RequestType6=class extends s{constructor(e){super(e,6),this._=void 0}},t.RequestType7=class extends s{constructor(e){super(e,7),this._=void 0}},t.RequestType8=class extends s{constructor(e){super(e,8),this._=void 0}},t.RequestType9=class extends s{constructor(e){super(e,9),this._=void 0}},t.NotificationType=class extends s{constructor(e){super(e,1),this._=void 0}},t.NotificationType0=class extends s{constructor(e){super(e,0),this._=void 0}},t.NotificationType1=class extends s{constructor(e){super(e,1),this._=void 0}},t.NotificationType2=class extends s{constructor(e){super(e,2),this._=void 0}},t.NotificationType3=class extends s{constructor(e){super(e,3),this._=void 0}},t.NotificationType4=class extends s{constructor(e){super(e,4),this._=void 0}},t.NotificationType5=class extends s{constructor(e){super(e,5),this._=void 0}},t.NotificationType6=class extends s{constructor(e){super(e,6),this._=void 0}},t.NotificationType7=class extends s{constructor(e){super(e,7),this._=void 0}},t.NotificationType8=class extends s{constructor(e){super(e,8),this._=void 0}},t.NotificationType9=class extends s{constructor(e){super(e,9),this._=void 0}},t.isRequestMessage=function(e){let t=e;return t&&r.string(t.method)&&(r.string(t.id)||r.number(t.id))},t.isNotificationMessage=function(e){let t=e;return t&&r.string(t.method)&&void 0===e.id},t.isResponseMessage=function(e){let t=e;return t&&(void 0!==t.result||!!t.error)&&(r.string(t.id)||r.number(t.id)||null===t.id)}},3696:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(6928),i=n(857),o=n(6982),s=n(9278),a=n(8919),c=n(7159);t.generateRandomPipeName=function(){const e=o.randomBytes(21).toString("hex");return"win32"===process.platform?`\\\\.\\pipe\\vscode-jsonrpc-${e}-sock`:r.join(i.tmpdir(),`vscode-${e}.sock`)},t.createClientPipeTransport=function(e,t="utf-8"){let n,r=new Promise(((e,t)=>{n=e}));return new Promise(((i,o)=>{let l=s.createServer((e=>{l.close(),n([new a.SocketMessageReader(e,t),new c.SocketMessageWriter(e,t)])}));l.on("error",o),l.listen(e,(()=>{l.removeListener("error",o),i({onConnected:()=>r})}))}))},t.createServerPipeTransport=function(e,t="utf-8"){const n=s.createConnection(e);return[new a.SocketMessageReader(n,t),new c.SocketMessageWriter(n,t)]}},5851:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(9278),i=n(8919),o=n(7159);t.createClientSocketTransport=function(e,t="utf-8"){let n,s=new Promise(((e,t)=>{n=e}));return new Promise(((a,c)=>{let l=r.createServer((e=>{l.close(),n([new i.SocketMessageReader(e,t),new o.SocketMessageWriter(e,t)])}));l.on("error",c),l.listen(e,"127.0.0.1",(()=>{l.removeListener("error",c),a({onConnected:()=>s})}))}))},t.createServerSocketTransport=function(e,t="utf-8"){const n=r.createConnection(e,"127.0.0.1");return[new i.SocketMessageReader(n,t),new o.SocketMessageWriter(n,t)]}},7116:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1398),i=n(2037),o=n(8924),s=n(9519),a=n(5805),c=n(6669),l=n(6362);!function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(2037));class u{error(e){console.error(e)}warn(e){console.warn(e)}info(e){console.info(e)}log(e){console.log(e)}}var d,p,h,f,m;!function(e){e[e.Continue=1]="Continue",e[e.Shutdown=2]="Shutdown"}(d=t.ErrorAction||(t.ErrorAction={})),function(e){e[e.DoNotRestart=1]="DoNotRestart",e[e.Restart=2]="Restart"}(p=t.CloseAction||(t.CloseAction={}));class g{constructor(e){this.name=e,this.restarts=[]}error(e,t,n){return n&&n<=3?d.Continue:d.Shutdown}closed(){return this.restarts.push(Date.now()),this.restarts.length<5?p.Restart:this.restarts[this.restarts.length-1]-this.restarts[0]<=18e4?(r.window.showErrorMessage(`The ${this.name} server crashed 5 times in the last 3 minutes. The server will not be restarted.`),p.DoNotRestart):(this.restarts.shift(),p.Restart)}}!function(e){e[e.Info=1]="Info",e[e.Warn=2]="Warn",e[e.Error=3]="Error",e[e.Never=4]="Never"}(h=t.RevealOutputChannelOn||(t.RevealOutputChannelOn={})),function(e){e[e.Stopped=1]="Stopped",e[e.Starting=3]="Starting",e[e.Running=2]="Running"}(f=t.State||(t.State={})),function(e){e[e.Initial=0]="Initial",e[e.Starting=1]="Starting",e[e.StartFailed=2]="StartFailed",e[e.Running=3]="Running",e[e.Stopping=4]="Stopping",e[e.Stopped=5]="Stopped"}(m||(m={}));const y=[i.SymbolKind.File,i.SymbolKind.Module,i.SymbolKind.Namespace,i.SymbolKind.Package,i.SymbolKind.Class,i.SymbolKind.Method,i.SymbolKind.Property,i.SymbolKind.Field,i.SymbolKind.Constructor,i.SymbolKind.Enum,i.SymbolKind.Interface,i.SymbolKind.Function,i.SymbolKind.Variable,i.SymbolKind.Constant,i.SymbolKind.String,i.SymbolKind.Number,i.SymbolKind.Boolean,i.SymbolKind.Array,i.SymbolKind.Object,i.SymbolKind.Key,i.SymbolKind.Null,i.SymbolKind.EnumMember,i.SymbolKind.Struct,i.SymbolKind.Event,i.SymbolKind.Operator,i.SymbolKind.TypeParameter],b=[i.CompletionItemKind.Text,i.CompletionItemKind.Method,i.CompletionItemKind.Function,i.CompletionItemKind.Constructor,i.CompletionItemKind.Field,i.CompletionItemKind.Variable,i.CompletionItemKind.Class,i.CompletionItemKind.Interface,i.CompletionItemKind.Module,i.CompletionItemKind.Property,i.CompletionItemKind.Unit,i.CompletionItemKind.Value,i.CompletionItemKind.Enum,i.CompletionItemKind.Keyword,i.CompletionItemKind.Snippet,i.CompletionItemKind.Color,i.CompletionItemKind.File,i.CompletionItemKind.Reference,i.CompletionItemKind.Folder,i.CompletionItemKind.EnumMember,i.CompletionItemKind.Constant,i.CompletionItemKind.Struct,i.CompletionItemKind.Event,i.CompletionItemKind.Operator,i.CompletionItemKind.TypeParameter];function v(e,t){return void 0===e[t]&&(e[t]={}),e[t]}var S;!function(e){e.is=function(e){let t=e;return t&&a.func(t.register)&&a.func(t.unregister)&&a.func(t.dispose)&&void 0!==t.messages}}(S||(S={}));class w{constructor(e,t,n,r,i,o){this._client=e,this._event=t,this._type=n,this._middleware=r,this._createParams=i,this._selectorFilter=o,this._selectors=new Map}static textDocumentFilter(e,t){for(const n of e)if(r.languages.match(n,t))return!0;return!1}register(e,t){t.registerOptions.documentSelector&&(this._listener||(this._listener=this._event(this.callback,this)),this._selectors.set(t.id,t.registerOptions.documentSelector))}callback(e){this._selectorFilter&&!this._selectorFilter(this._selectors.values(),e)||(this._middleware?this._middleware(e,(e=>this._client.sendNotification(this._type,this._createParams(e)))):this._client.sendNotification(this._type,this._createParams(e)),this.notificationSent(e))}notificationSent(e){}unregister(e){this._selectors.delete(e),0===this._selectors.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)}dispose(){this._selectors.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}}class C extends w{constructor(e,t){super(e,r.workspace.onDidOpenTextDocument,i.DidOpenTextDocumentNotification.type,e.clientOptions.middleware.didOpen,(t=>e.code2ProtocolConverter.asOpenTextDocumentParams(t)),w.textDocumentFilter),this._syncedDocuments=t}get messages(){return i.DidOpenTextDocumentNotification.type}fillClientCapabilities(e){v(v(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&n.openClose&&this.register(this.messages,{id:l.generateUuid(),registerOptions:{documentSelector:t}})}register(e,t){if(super.register(e,t),!t.registerOptions.documentSelector)return;let n=t.registerOptions.documentSelector;r.workspace.textDocuments.forEach((e=>{let t=e.uri.toString();if(!this._syncedDocuments.has(t)&&r.languages.match(n,e)){let n=this._client.clientOptions.middleware,r=e=>{this._client.sendNotification(this._type,this._createParams(e))};n.didOpen?n.didOpen(e,r):r(e),this._syncedDocuments.set(t,e)}}))}notificationSent(e){super.notificationSent(e),this._syncedDocuments.set(e.uri.toString(),e)}}class T extends w{constructor(e,t){super(e,r.workspace.onDidCloseTextDocument,i.DidCloseTextDocumentNotification.type,e.clientOptions.middleware.didClose,(t=>e.code2ProtocolConverter.asCloseTextDocumentParams(t)),w.textDocumentFilter),this._syncedDocuments=t}get messages(){return i.DidCloseTextDocumentNotification.type}fillClientCapabilities(e){v(v(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&n.openClose&&this.register(this.messages,{id:l.generateUuid(),registerOptions:{documentSelector:t}})}notificationSent(e){super.notificationSent(e),this._syncedDocuments.delete(e.uri.toString())}unregister(e){let t=this._selectors.get(e);super.unregister(e);let n=this._selectors.values();this._syncedDocuments.forEach((e=>{if(r.languages.match(t,e)&&!this._selectorFilter(n,e)){let t=this._client.clientOptions.middleware,n=e=>{this._client.sendNotification(this._type,this._createParams(e))};this._syncedDocuments.delete(e.uri.toString()),t.didClose?t.didClose(e,n):n(e)}}))}}class E{constructor(e){this._client=e,this._changeData=new Map,this._forcingDelivery=!1}get messages(){return i.DidChangeTextDocumentNotification.type}fillClientCapabilities(e){v(v(e,"textDocument"),"synchronization").dynamicRegistration=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&void 0!==n.change&&n.change!==i.TextDocumentSyncKind.None&&this.register(this.messages,{id:l.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},{syncKind:n.change})})}register(e,t){t.registerOptions.documentSelector&&(this._listener||(this._listener=r.workspace.onDidChangeTextDocument(this.callback,this)),this._changeData.set(t.id,{documentSelector:t.registerOptions.documentSelector,syncKind:t.registerOptions.syncKind}))}callback(e){if(0!==e.contentChanges.length)for(const t of this._changeData.values())if(r.languages.match(t.documentSelector,e.document)){let n=this._client.clientOptions.middleware;if(t.syncKind===i.TextDocumentSyncKind.Incremental){let t=this._client.code2ProtocolConverter.asChangeTextDocumentParams(e);n.didChange?n.didChange(e,(()=>this._client.sendNotification(i.DidChangeTextDocumentNotification.type,t))):this._client.sendNotification(i.DidChangeTextDocumentNotification.type,t)}else if(t.syncKind===i.TextDocumentSyncKind.Full){let t=e=>{this._changeDelayer?(this._changeDelayer.uri!==e.document.uri.toString()&&(this.forceDelivery(),this._changeDelayer.uri=e.document.uri.toString()),this._changeDelayer.delayer.trigger((()=>{this._client.sendNotification(i.DidChangeTextDocumentNotification.type,this._client.code2ProtocolConverter.asChangeTextDocumentParams(e.document))}))):(this._changeDelayer={uri:e.document.uri.toString(),delayer:new c.Delayer(200)},this._changeDelayer.delayer.trigger((()=>{this._client.sendNotification(i.DidChangeTextDocumentNotification.type,this._client.code2ProtocolConverter.asChangeTextDocumentParams(e.document))}),-1))};n.didChange?n.didChange(e,t):t(e)}}}unregister(e){this._changeData.delete(e),0===this._changeData.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)}dispose(){this._changeDelayer=void 0,this._forcingDelivery=!1,this._changeData.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}forceDelivery(){if(!this._forcingDelivery&&this._changeDelayer)try{this._forcingDelivery=!0,this._changeDelayer.delayer.forceDelivery()}finally{this._forcingDelivery=!1}}}class _ extends w{constructor(e){super(e,r.workspace.onWillSaveTextDocument,i.WillSaveTextDocumentNotification.type,e.clientOptions.middleware.willSave,(t=>e.code2ProtocolConverter.asWillSaveTextDocumentParams(t)),((e,t)=>w.textDocumentFilter(e,t.document)))}get messages(){return i.WillSaveTextDocumentNotification.type}fillClientCapabilities(e){v(v(e,"textDocument"),"synchronization").willSave=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&n.willSave&&this.register(this.messages,{id:l.generateUuid(),registerOptions:{documentSelector:t}})}}class x{constructor(e){this._client=e,this._selectors=new Map}get messages(){return i.WillSaveTextDocumentWaitUntilRequest.type}fillClientCapabilities(e){v(v(e,"textDocument"),"synchronization").willSaveWaitUntil=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&n.willSaveWaitUntil&&this.register(this.messages,{id:l.generateUuid(),registerOptions:{documentSelector:t}})}register(e,t){t.registerOptions.documentSelector&&(this._listener||(this._listener=r.workspace.onWillSaveTextDocument(this.callback,this)),this._selectors.set(t.id,t.registerOptions.documentSelector))}callback(e){if(w.textDocumentFilter(this._selectors.values(),e.document)){let t=this._client.clientOptions.middleware,n=e=>this._client.sendRequest(i.WillSaveTextDocumentWaitUntilRequest.type,this._client.code2ProtocolConverter.asWillSaveTextDocumentParams(e)).then((e=>{let t=this._client.protocol2CodeConverter.asTextEdits(e);return void 0===t?[]:t}));e.waitUntil(t.willSaveWaitUntil?t.willSaveWaitUntil(e,n):n(e))}}unregister(e){this._selectors.delete(e),0===this._selectors.size&&this._listener&&(this._listener.dispose(),this._listener=void 0)}dispose(){this._selectors.clear(),this._listener&&(this._listener.dispose(),this._listener=void 0)}}class R extends w{constructor(e){super(e,r.workspace.onDidSaveTextDocument,i.DidSaveTextDocumentNotification.type,e.clientOptions.middleware.didSave,(t=>e.code2ProtocolConverter.asSaveTextDocumentParams(t,this._includeText)),w.textDocumentFilter)}get messages(){return i.DidSaveTextDocumentNotification.type}fillClientCapabilities(e){v(v(e,"textDocument"),"synchronization").didSave=!0}initialize(e,t){let n=e.resolvedTextDocumentSync;t&&n&&n.save&&this.register(this.messages,{id:l.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},{includeText:!!n.save.includeText})})}register(e,t){this._includeText=!!t.registerOptions.includeText,super.register(e,t)}}class I{constructor(e,t){this._client=e,this._notifyFileEvent=t,this._watchers=new Map}get messages(){return i.DidChangeWatchedFilesNotification.type}fillClientCapabilities(e){v(v(e,"workspace"),"didChangeWatchedFiles").dynamicRegistration=!0}initialize(e,t){}register(e,t){if(!Array.isArray(t.registerOptions.watchers))return;let n=[];for(let e of t.registerOptions.watchers){if(!a.string(e.globPattern))continue;let t=!0,o=!0,s=!0;void 0!==e.kind&&null!==e.kind&&(t=!!(e.kind&i.WatchKind.Create),o=!!(e.kind&i.WatchKind.Change),s=!!(e.kind&i.WatchKind.Delete));let c=r.workspace.createFileSystemWatcher(e.globPattern,!t,!o,!s);this.hookListeners(c,t,o,s),n.push(c)}this._watchers.set(t.id,n)}registerRaw(e,t){let n=[];for(let e of t)this.hookListeners(e,!0,!0,!0,n);this._watchers.set(e,n)}hookListeners(e,t,n,r,o){t&&e.onDidCreate((e=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(e),type:i.FileChangeType.Created})),null,o),n&&e.onDidChange((e=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(e),type:i.FileChangeType.Changed})),null,o),r&&e.onDidDelete((e=>this._notifyFileEvent({uri:this._client.code2ProtocolConverter.asUri(e),type:i.FileChangeType.Deleted})),null,o)}unregister(e){let t=this._watchers.get(e);if(t)for(let e of t)e.dispose()}dispose(){this._watchers.forEach((e=>{for(let t of e)t.dispose()})),this._watchers.clear()}}class P{constructor(e,t){this._client=e,this._message=t,this._providers=new Map}get messages(){return this._message}register(e,t){if(e.method!==this.messages.method)throw new Error(`Register called on wrong feature. Requested ${e.method} but reached feature ${this.messages.method}`);if(!t.registerOptions.documentSelector)return;let n=this.registerLanguageProvider(t.registerOptions);n&&this._providers.set(t.id,n)}unregister(e){let t=this._providers.get(e);t&&t.dispose()}dispose(){this._providers.forEach((e=>{e.dispose()})),this._providers.clear()}}t.TextDocumentFeature=P;class O{constructor(e,t){this._client=e,this._message=t,this._providers=new Map}get messages(){return this._message}register(e,t){if(e.method!==this.messages.method)throw new Error(`Register called on wron feature. Requested ${e.method} but reached feature ${this.messages.method}`);let n=this.registerLanguageProvider(t.registerOptions);n&&this._providers.set(t.id,n)}unregister(e){let t=this._providers.get(e);t&&t.dispose()}dispose(){this._providers.forEach((e=>{e.dispose()})),this._providers.clear()}}class D extends P{constructor(e){super(e,i.CompletionRequest.type)}fillClientCapabilities(e){let t=v(v(e,"textDocument"),"completion");t.dynamicRegistration=!0,t.contextSupport=!0,t.completionItem={snippetSupport:!0,commitCharactersSupport:!0,documentationFormat:[i.MarkupKind.Markdown,i.MarkupKind.PlainText],deprecatedSupport:!0,preselectSupport:!0},t.completionItemKind={valueSet:b}}initialize(e,t){e.completionProvider&&t&&this.register(this.messages,{id:l.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},e.completionProvider)})}registerLanguageProvider(e){let t=e.triggerCharacters||[],n=this._client,o=(e,t,r,o)=>n.sendRequest(i.CompletionRequest.type,n.code2ProtocolConverter.asCompletionParams(e,t,r),o).then(n.protocol2CodeConverter.asCompletionResult,(e=>(n.logFailedRequest(i.CompletionRequest.type,e),Promise.resolve([])))),s=(e,t)=>n.sendRequest(i.CompletionResolveRequest.type,n.code2ProtocolConverter.asCompletionItem(e),t).then(n.protocol2CodeConverter.asCompletionItem,(t=>(n.logFailedRequest(i.CompletionResolveRequest.type,t),Promise.resolve(e)))),a=this._client.clientOptions.middleware;return r.languages.registerCompletionItemProvider(e.documentSelector,{provideCompletionItems:(e,t,n,r)=>a.provideCompletionItem?a.provideCompletionItem(e,t,r,n,o):o(e,t,r,n),resolveCompletionItem:e.resolveProvider?(e,t)=>a.resolveCompletionItem?a.resolveCompletionItem(e,t,s):s(e,t):void 0},...t)}}class A extends P{constructor(e){super(e,i.HoverRequest.type)}fillClientCapabilities(e){const t=v(v(e,"textDocument"),"hover");t.dynamicRegistration=!0,t.contentFormat=[i.MarkupKind.Markdown,i.MarkupKind.PlainText]}initialize(e,t){e.hoverProvider&&t&&this.register(this.messages,{id:l.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})}registerLanguageProvider(e){let t=this._client,n=(e,n,r)=>t.sendRequest(i.HoverRequest.type,t.code2ProtocolConverter.asTextDocumentPositionParams(e,n),r).then(t.protocol2CodeConverter.asHover,(e=>(t.logFailedRequest(i.HoverRequest.type,e),Promise.resolve(null)))),o=t.clientOptions.middleware;return r.languages.registerHoverProvider(e.documentSelector,{provideHover:(e,t,r)=>o.provideHover?o.provideHover(e,t,r,n):n(e,t,r)})}}class k extends P{constructor(e){super(e,i.SignatureHelpRequest.type)}fillClientCapabilities(e){let t=v(v(e,"textDocument"),"signatureHelp");t.dynamicRegistration=!0,t.signatureInformation={documentationFormat:[i.MarkupKind.Markdown,i.MarkupKind.PlainText]},t.signatureInformation.parameterInformation={labelOffsetSupport:!0}}initialize(e,t){e.signatureHelpProvider&&t&&this.register(this.messages,{id:l.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},e.signatureHelpProvider)})}registerLanguageProvider(e){let t=this._client,n=(e,n,r)=>t.sendRequest(i.SignatureHelpRequest.type,t.code2ProtocolConverter.asTextDocumentPositionParams(e,n),r).then(t.protocol2CodeConverter.asSignatureHelp,(e=>(t.logFailedRequest(i.SignatureHelpRequest.type,e),Promise.resolve(null)))),o=t.clientOptions.middleware,s=e.triggerCharacters||[];return r.languages.registerSignatureHelpProvider(e.documentSelector,{provideSignatureHelp:(e,t,r)=>o.provideSignatureHelp?o.provideSignatureHelp(e,t,r,n):n(e,t,r)},...s)}}class N extends P{constructor(e){super(e,i.DefinitionRequest.type)}fillClientCapabilities(e){let t=v(v(e,"textDocument"),"definition");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){e.definitionProvider&&t&&this.register(this.messages,{id:l.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})}registerLanguageProvider(e){let t=this._client,n=(e,n,r)=>t.sendRequest(i.DefinitionRequest.type,t.code2ProtocolConverter.asTextDocumentPositionParams(e,n),r).then(t.protocol2CodeConverter.asDefinitionResult,(e=>(t.logFailedRequest(i.DefinitionRequest.type,e),Promise.resolve(null)))),o=t.clientOptions.middleware;return r.languages.registerDefinitionProvider(e.documentSelector,{provideDefinition:(e,t,r)=>o.provideDefinition?o.provideDefinition(e,t,r,n):n(e,t,r)})}}class L extends P{constructor(e){super(e,i.ReferencesRequest.type)}fillClientCapabilities(e){v(v(e,"textDocument"),"references").dynamicRegistration=!0}initialize(e,t){e.referencesProvider&&t&&this.register(this.messages,{id:l.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})}registerLanguageProvider(e){let t=this._client,n=(e,n,r,o)=>t.sendRequest(i.ReferencesRequest.type,t.code2ProtocolConverter.asReferenceParams(e,n,r),o).then(t.protocol2CodeConverter.asReferences,(e=>(t.logFailedRequest(i.ReferencesRequest.type,e),Promise.resolve([])))),o=t.clientOptions.middleware;return r.languages.registerReferenceProvider(e.documentSelector,{provideReferences:(e,t,r,i)=>o.provideReferences?o.provideReferences(e,t,r,i,n):n(e,t,r,i)})}}class j extends P{constructor(e){super(e,i.DocumentHighlightRequest.type)}fillClientCapabilities(e){v(v(e,"textDocument"),"documentHighlight").dynamicRegistration=!0}initialize(e,t){e.documentHighlightProvider&&t&&this.register(this.messages,{id:l.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})}registerLanguageProvider(e){let t=this._client,n=(e,n,r)=>t.sendRequest(i.DocumentHighlightRequest.type,t.code2ProtocolConverter.asTextDocumentPositionParams(e,n),r).then(t.protocol2CodeConverter.asDocumentHighlights,(e=>(t.logFailedRequest(i.DocumentHighlightRequest.type,e),Promise.resolve([])))),o=t.clientOptions.middleware;return r.languages.registerDocumentHighlightProvider(e.documentSelector,{provideDocumentHighlights:(e,t,r)=>o.provideDocumentHighlights?o.provideDocumentHighlights(e,t,r,n):n(e,t,r)})}}class M extends P{constructor(e){super(e,i.DocumentSymbolRequest.type)}fillClientCapabilities(e){let t=v(v(e,"textDocument"),"documentSymbol");t.dynamicRegistration=!0,t.symbolKind={valueSet:y},t.hierarchicalDocumentSymbolSupport=!0}initialize(e,t){e.documentSymbolProvider&&t&&this.register(this.messages,{id:l.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})}registerLanguageProvider(e){let t=this._client,n=(e,n)=>t.sendRequest(i.DocumentSymbolRequest.type,t.code2ProtocolConverter.asDocumentSymbolParams(e),n).then((e=>{if(null!==e){if(0===e.length)return[];{let n=e[0];return i.DocumentSymbol.is(n)?t.protocol2CodeConverter.asDocumentSymbols(e):t.protocol2CodeConverter.asSymbolInformations(e)}}}),(e=>(t.logFailedRequest(i.DocumentSymbolRequest.type,e),Promise.resolve([])))),o=t.clientOptions.middleware;return r.languages.registerDocumentSymbolProvider(e.documentSelector,{provideDocumentSymbols:(e,t)=>o.provideDocumentSymbols?o.provideDocumentSymbols(e,t,n):n(e,t)})}}class F extends O{constructor(e){super(e,i.WorkspaceSymbolRequest.type)}fillClientCapabilities(e){let t=v(v(e,"workspace"),"symbol");t.dynamicRegistration=!0,t.symbolKind={valueSet:y}}initialize(e){e.workspaceSymbolProvider&&this.register(this.messages,{id:l.generateUuid(),registerOptions:void 0})}registerLanguageProvider(e){let t=this._client,n=(e,n)=>t.sendRequest(i.WorkspaceSymbolRequest.type,{query:e},n).then(t.protocol2CodeConverter.asSymbolInformations,(e=>(t.logFailedRequest(i.WorkspaceSymbolRequest.type,e),Promise.resolve([])))),o=t.clientOptions.middleware;return r.languages.registerWorkspaceSymbolProvider({provideWorkspaceSymbols:(e,t)=>o.provideWorkspaceSymbols?o.provideWorkspaceSymbols(e,t,n):n(e,t)})}}class q extends P{constructor(e){super(e,i.CodeActionRequest.type)}fillClientCapabilities(e){const t=v(v(e,"textDocument"),"codeAction");t.dynamicRegistration=!0,t.codeActionLiteralSupport={codeActionKind:{valueSet:["",i.CodeActionKind.QuickFix,i.CodeActionKind.Refactor,i.CodeActionKind.RefactorExtract,i.CodeActionKind.RefactorInline,i.CodeActionKind.RefactorRewrite,i.CodeActionKind.Source,i.CodeActionKind.SourceOrganizeImports]}}}initialize(e,t){if(!e.codeActionProvider||!t)return;let n;a.boolean(e.codeActionProvider)||(n=e.codeActionProvider.codeActionKinds),this.register(this.messages,{id:l.generateUuid(),registerOptions:{documentSelector:t,codeActionKinds:n}})}registerLanguageProvider(e){let t=this._client,n=(e,n,r,o)=>{let s={textDocument:t.code2ProtocolConverter.asTextDocumentIdentifier(e),range:t.code2ProtocolConverter.asRange(n),context:t.code2ProtocolConverter.asCodeActionContext(r)};return t.sendRequest(i.CodeActionRequest.type,s,o).then((e=>{if(null===e)return;let n=[];for(let r of e)i.Command.is(r)?n.push(t.protocol2CodeConverter.asCommand(r)):n.push(t.protocol2CodeConverter.asCodeAction(r));return n}),(e=>(t.logFailedRequest(i.CodeActionRequest.type,e),Promise.resolve([]))))},o=t.clientOptions.middleware;return r.languages.registerCodeActionsProvider(e.documentSelector,{provideCodeActions:(e,t,r,i)=>o.provideCodeActions?o.provideCodeActions(e,t,r,i,n):n(e,t,r,i)},e.codeActionKinds?{providedCodeActionKinds:t.protocol2CodeConverter.asCodeActionKinds(e.codeActionKinds)}:void 0)}}class B extends P{constructor(e){super(e,i.CodeLensRequest.type)}fillClientCapabilities(e){v(v(e,"textDocument"),"codeLens").dynamicRegistration=!0}initialize(e,t){e.codeLensProvider&&t&&this.register(this.messages,{id:l.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},e.codeLensProvider)})}registerLanguageProvider(e){let t=this._client,n=(e,n)=>t.sendRequest(i.CodeLensRequest.type,t.code2ProtocolConverter.asCodeLensParams(e),n).then(t.protocol2CodeConverter.asCodeLenses,(e=>(t.logFailedRequest(i.CodeLensRequest.type,e),Promise.resolve([])))),o=(e,n)=>t.sendRequest(i.CodeLensResolveRequest.type,t.code2ProtocolConverter.asCodeLens(e),n).then(t.protocol2CodeConverter.asCodeLens,(n=>(t.logFailedRequest(i.CodeLensResolveRequest.type,n),e))),s=t.clientOptions.middleware;return r.languages.registerCodeLensProvider(e.documentSelector,{provideCodeLenses:(e,t)=>s.provideCodeLenses?s.provideCodeLenses(e,t,n):n(e,t),resolveCodeLens:e.resolveProvider?(e,t)=>s.resolveCodeLens?s.resolveCodeLens(e,t,o):o(e,t):void 0})}}class U extends P{constructor(e){super(e,i.DocumentFormattingRequest.type)}fillClientCapabilities(e){v(v(e,"textDocument"),"formatting").dynamicRegistration=!0}initialize(e,t){e.documentFormattingProvider&&t&&this.register(this.messages,{id:l.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})}registerLanguageProvider(e){let t=this._client,n=(e,n,r)=>{let o={textDocument:t.code2ProtocolConverter.asTextDocumentIdentifier(e),options:t.code2ProtocolConverter.asFormattingOptions(n)};return t.sendRequest(i.DocumentFormattingRequest.type,o,r).then(t.protocol2CodeConverter.asTextEdits,(e=>(t.logFailedRequest(i.DocumentFormattingRequest.type,e),Promise.resolve([]))))},o=t.clientOptions.middleware;return r.languages.registerDocumentFormattingEditProvider(e.documentSelector,{provideDocumentFormattingEdits:(e,t,r)=>o.provideDocumentFormattingEdits?o.provideDocumentFormattingEdits(e,t,r,n):n(e,t,r)})}}class z extends P{constructor(e){super(e,i.DocumentRangeFormattingRequest.type)}fillClientCapabilities(e){v(v(e,"textDocument"),"rangeFormatting").dynamicRegistration=!0}initialize(e,t){e.documentRangeFormattingProvider&&t&&this.register(this.messages,{id:l.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})}registerLanguageProvider(e){let t=this._client,n=(e,n,r,o)=>{let s={textDocument:t.code2ProtocolConverter.asTextDocumentIdentifier(e),range:t.code2ProtocolConverter.asRange(n),options:t.code2ProtocolConverter.asFormattingOptions(r)};return t.sendRequest(i.DocumentRangeFormattingRequest.type,s,o).then(t.protocol2CodeConverter.asTextEdits,(e=>(t.logFailedRequest(i.DocumentRangeFormattingRequest.type,e),Promise.resolve([]))))},o=t.clientOptions.middleware;return r.languages.registerDocumentRangeFormattingEditProvider(e.documentSelector,{provideDocumentRangeFormattingEdits:(e,t,r,i)=>o.provideDocumentRangeFormattingEdits?o.provideDocumentRangeFormattingEdits(e,t,r,i,n):n(e,t,r,i)})}}class G extends P{constructor(e){super(e,i.DocumentOnTypeFormattingRequest.type)}fillClientCapabilities(e){v(v(e,"textDocument"),"onTypeFormatting").dynamicRegistration=!0}initialize(e,t){e.documentOnTypeFormattingProvider&&t&&this.register(this.messages,{id:l.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},e.documentOnTypeFormattingProvider)})}registerLanguageProvider(e){let t=this._client,n=e.moreTriggerCharacter||[],o=(e,n,r,o,s)=>{let a={textDocument:t.code2ProtocolConverter.asTextDocumentIdentifier(e),position:t.code2ProtocolConverter.asPosition(n),ch:r,options:t.code2ProtocolConverter.asFormattingOptions(o)};return t.sendRequest(i.DocumentOnTypeFormattingRequest.type,a,s).then(t.protocol2CodeConverter.asTextEdits,(e=>(t.logFailedRequest(i.DocumentOnTypeFormattingRequest.type,e),Promise.resolve([]))))},s=t.clientOptions.middleware;return r.languages.registerOnTypeFormattingEditProvider(e.documentSelector,{provideOnTypeFormattingEdits:(e,t,n,r,i)=>s.provideOnTypeFormattingEdits?s.provideOnTypeFormattingEdits(e,t,n,r,i,o):o(e,t,n,r,i)},e.firstTriggerCharacter,...n)}}class H extends P{constructor(e){super(e,i.RenameRequest.type)}fillClientCapabilities(e){let t=v(v(e,"textDocument"),"rename");t.dynamicRegistration=!0,t.prepareSupport=!0}initialize(e,t){if(!e.renameProvider||!t)return;let n=Object.assign({},{documentSelector:t});a.boolean(e.renameProvider)?n.prepareProvider=!1:n.prepareProvider=e.renameProvider.prepareProvider,this.register(this.messages,{id:l.generateUuid(),registerOptions:n})}registerLanguageProvider(e){let t=this._client,n=(e,n,r,o)=>{let s={textDocument:t.code2ProtocolConverter.asTextDocumentIdentifier(e),position:t.code2ProtocolConverter.asPosition(n),newName:r};return t.sendRequest(i.RenameRequest.type,s,o).then(t.protocol2CodeConverter.asWorkspaceEdit,(e=>(t.logFailedRequest(i.RenameRequest.type,e),Promise.reject(new Error(e.message)))))},o=(e,n,r)=>{let o={textDocument:t.code2ProtocolConverter.asTextDocumentIdentifier(e),position:t.code2ProtocolConverter.asPosition(n)};return t.sendRequest(i.PrepareRenameRequest.type,o,r).then((e=>i.Range.is(e)?t.protocol2CodeConverter.asRange(e):e&&e.range?{range:t.protocol2CodeConverter.asRange(e.range),placeholder:e.placeholder}:null),(e=>(t.logFailedRequest(i.PrepareRenameRequest.type,e),Promise.reject(new Error(e.message)))))},s=t.clientOptions.middleware;return r.languages.registerRenameProvider(e.documentSelector,{provideRenameEdits:(e,t,r,i)=>s.provideRenameEdits?s.provideRenameEdits(e,t,r,i,n):n(e,t,r,i),prepareRename:e.prepareProvider?(e,t,n)=>s.prepareRename?s.prepareRename(e,t,n,o):o(e,t,n):void 0})}}class V extends P{constructor(e){super(e,i.DocumentLinkRequest.type)}fillClientCapabilities(e){v(v(e,"textDocument"),"documentLink").dynamicRegistration=!0}initialize(e,t){e.documentLinkProvider&&t&&this.register(this.messages,{id:l.generateUuid(),registerOptions:Object.assign({},{documentSelector:t},e.documentLinkProvider)})}registerLanguageProvider(e){let t=this._client,n=(e,n)=>t.sendRequest(i.DocumentLinkRequest.type,t.code2ProtocolConverter.asDocumentLinkParams(e),n).then(t.protocol2CodeConverter.asDocumentLinks,(e=>{t.logFailedRequest(i.DocumentLinkRequest.type,e),Promise.resolve(new Error(e.message))})),o=(e,n)=>t.sendRequest(i.DocumentLinkResolveRequest.type,t.code2ProtocolConverter.asDocumentLink(e),n).then(t.protocol2CodeConverter.asDocumentLink,(e=>{t.logFailedRequest(i.DocumentLinkResolveRequest.type,e),Promise.resolve(new Error(e.message))})),s=t.clientOptions.middleware;return r.languages.registerDocumentLinkProvider(e.documentSelector,{provideDocumentLinks:(e,t)=>s.provideDocumentLinks?s.provideDocumentLinks(e,t,n):n(e,t),resolveDocumentLink:e.resolveProvider?(e,t)=>s.resolveDocumentLink?s.resolveDocumentLink(e,t,o):o(e,t):void 0})}}class ${constructor(e){this._client=e,this._listeners=new Map}get messages(){return i.DidChangeConfigurationNotification.type}fillClientCapabilities(e){v(v(e,"workspace"),"didChangeConfiguration").dynamicRegistration=!0}initialize(){let e=this._client.clientOptions.synchronize.configurationSection;void 0!==e&&this.register(this.messages,{id:l.generateUuid(),registerOptions:{section:e}})}register(e,t){let n=r.workspace.onDidChangeConfiguration((e=>{this.onDidChangeConfiguration(t.registerOptions.section,e)}));this._listeners.set(t.id,n),void 0!==t.registerOptions.section&&this.onDidChangeConfiguration(t.registerOptions.section,void 0)}unregister(e){let t=this._listeners.get(e);t&&(this._listeners.delete(e),t.dispose())}dispose(){for(let e of this._listeners.values())e.dispose();this._listeners.clear()}onDidChangeConfiguration(e,t){let n;if(n=a.string(e)?[e]:e,void 0!==n&&void 0!==t&&!n.some((e=>t.affectsConfiguration(e))))return;let r=e=>{void 0!==e?this._client.sendNotification(i.DidChangeConfigurationNotification.type,{settings:this.extractSettingsInformation(e)}):this._client.sendNotification(i.DidChangeConfigurationNotification.type,{settings:null})},o=this.getMiddleware();o?o(n,r):r(n)}extractSettingsInformation(e){function t(e,t){let n=e;for(let e=0;e<t.length-1;e++){let r=n[t[e]];r||(r=Object.create(null),n[t[e]]=r),n=r}return n}let n=this._client.clientOptions.workspaceFolder?this._client.clientOptions.workspaceFolder.uri:void 0,i=Object.create(null);for(let o=0;o<e.length;o++){let s=e[o],a=s.indexOf("."),c=null;if(c=a>=0?r.workspace.getConfiguration(s.substr(0,a),n).get(s.substr(a+1)):r.workspace.getConfiguration(s,n),c){let n=e[o].split(".");t(i,n)[n[n.length-1]]=c}}return i}getMiddleware(){let e=this._client.clientOptions.middleware;return e.workspace&&e.workspace.didChangeConfiguration?e.workspace.didChangeConfiguration:void 0}}class W{constructor(e){this._client=e,this._commands=new Map}get messages(){return i.ExecuteCommandRequest.type}fillClientCapabilities(e){v(v(e,"workspace"),"executeCommand").dynamicRegistration=!0}initialize(e){e.executeCommandProvider&&this.register(this.messages,{id:l.generateUuid(),registerOptions:Object.assign({},e.executeCommandProvider)})}register(e,t){let n=this._client;if(t.registerOptions.commands){let e=[];for(const o of t.registerOptions.commands)e.push(r.commands.registerCommand(o,((...e)=>{let t={command:o,arguments:e};return n.sendRequest(i.ExecuteCommandRequest.type,t).then(void 0,(e=>{n.logFailedRequest(i.ExecuteCommandRequest.type,e)}))})));this._commands.set(t.id,e)}}unregister(e){let t=this._commands.get(e);t&&t.forEach((e=>e.dispose()))}dispose(){this._commands.forEach((e=>{e.forEach((e=>e.dispose()))})),this._commands.clear()}}(t.MessageTransports||(t.MessageTransports={})).is=function(e){return e&&i.MessageReader.is(e.reader)&&i.MessageWriter.is(e.writer)};class K{constructor(e,t){this._resolve=e,this._reject=t,this._used=!1}get isUsed(){return this._used}resolve(){this._used=!0,this._resolve()}reject(e){this._used=!0,this._reject(e)}}t.BaseLanguageClient=class{constructor(e,t,n){this._traceFormat=i.TraceFormat.Text,this._features=[],this._method2Message=new Map,this._dynamicFeatures=new Map,this._id=e,this._name=t,n=n||{},this._clientOptions={documentSelector:n.documentSelector||[],synchronize:n.synchronize||{},diagnosticCollectionName:n.diagnosticCollectionName,outputChannelName:n.outputChannelName||this._name,revealOutputChannelOn:n.revealOutputChannelOn||h.Error,stdioEncoding:n.stdioEncoding||"utf8",initializationOptions:n.initializationOptions,initializationFailedHandler:n.initializationFailedHandler,errorHandler:n.errorHandler||new g(this._name),middleware:n.middleware||{},uriConverters:n.uriConverters,workspaceFolder:n.workspaceFolder},this._clientOptions.synchronize=this._clientOptions.synchronize||{},this.state=m.Initial,this._connectionPromise=void 0,this._resolvedConnection=void 0,this._initializeResult=void 0,n.outputChannel?(this._outputChannel=n.outputChannel,this._disposeOutputChannel=!1):(this._outputChannel=void 0,this._disposeOutputChannel=!0),this._listeners=void 0,this._providers=void 0,this._diagnostics=void 0,this._fileEvents=[],this._fileEventDelayer=new c.Delayer(250),this._onReady=new Promise(((e,t)=>{this._onReadyCallbacks=new K(e,t)})),this._onStop=void 0,this._telemetryEmitter=new i.Emitter,this._stateChangeEmitter=new i.Emitter,this._tracer={log:(e,t)=>{a.string(e)?this.logTrace(e,t):this.logObjectTrace(e)}},this._c2p=o.createConverter(n.uriConverters?n.uriConverters.code2Protocol:void 0),this._p2c=s.createConverter(n.uriConverters?n.uriConverters.protocol2Code:void 0),this._syncedDocuments=new Map,this.registerBuiltinFeatures()}get state(){return this._state}set state(e){let t=this.getPublicState();this._state=e;let n=this.getPublicState();n!==t&&this._stateChangeEmitter.fire({oldState:t,newState:n})}getPublicState(){return this.state===m.Running?f.Running:this.state===m.Starting?f.Starting:f.Stopped}get initializeResult(){return this._initializeResult}sendRequest(e,...t){if(!this.isConnectionActive())throw new Error("Language client is not ready yet");this.forceDocumentSync();try{return this._resolvedConnection.sendRequest(e,...t)}catch(t){throw this.error(`Sending request ${a.string(e)?e:e.method} failed.`,t),t}}onRequest(e,t){if(!this.isConnectionActive())throw new Error("Language client is not ready yet");try{this._resolvedConnection.onRequest(e,t)}catch(t){throw this.error(`Registering request handler ${a.string(e)?e:e.method} failed.`,t),t}}sendNotification(e,t){if(!this.isConnectionActive())throw new Error("Language client is not ready yet");this.forceDocumentSync();try{this._resolvedConnection.sendNotification(e,t)}catch(t){throw this.error(`Sending notification ${a.string(e)?e:e.method} failed.`,t),t}}onNotification(e,t){if(!this.isConnectionActive())throw new Error("Language client is not ready yet");try{this._resolvedConnection.onNotification(e,t)}catch(t){throw this.error(`Registering notification handler ${a.string(e)?e:e.method} failed.`,t),t}}get clientOptions(){return this._clientOptions}get protocol2CodeConverter(){return this._p2c}get code2ProtocolConverter(){return this._c2p}get onTelemetry(){return this._telemetryEmitter.event}get onDidChangeState(){return this._stateChangeEmitter.event}get outputChannel(){return this._outputChannel||(this._outputChannel=r.window.createOutputChannel(this._clientOptions.outputChannelName?this._clientOptions.outputChannelName:this._name)),this._outputChannel}get diagnostics(){return this._diagnostics}createDefaultErrorHandler(){return new g(this._name)}set trace(e){this._trace=e,this.onReady().then((()=>{this.resolveConnection().then((e=>{e.trace(this._trace,this._tracer,{sendNotification:!1,traceFormat:this._traceFormat})}))}),(()=>{}))}data2String(e){if(e instanceof i.ResponseError){const t=e;return`  Message: ${t.message}\n  Code: ${t.code} ${t.data?"\n"+t.data.toString():""}`}return e instanceof Error?a.string(e.stack)?e.stack:e.message:a.string(e)?e:e.toString()}info(e,t){this.outputChannel.appendLine(`[Info  - ${(new Date).toLocaleTimeString()}] ${e}`),t&&this.outputChannel.appendLine(this.data2String(t)),this._clientOptions.revealOutputChannelOn<=h.Info&&this.outputChannel.show(!0)}warn(e,t){this.outputChannel.appendLine(`[Warn  - ${(new Date).toLocaleTimeString()}] ${e}`),t&&this.outputChannel.appendLine(this.data2String(t)),this._clientOptions.revealOutputChannelOn<=h.Warn&&this.outputChannel.show(!0)}error(e,t){this.outputChannel.appendLine(`[Error - ${(new Date).toLocaleTimeString()}] ${e}`),t&&this.outputChannel.appendLine(this.data2String(t)),this._clientOptions.revealOutputChannelOn<=h.Error&&this.outputChannel.show(!0)}logTrace(e,t){this.outputChannel.appendLine(`[Trace - ${(new Date).toLocaleTimeString()}] ${e}`),t&&this.outputChannel.appendLine(this.data2String(t))}logObjectTrace(e){e.isLSPMessage&&e.type?this.outputChannel.append(`[LSP   - ${(new Date).toLocaleTimeString()}] `):this.outputChannel.append(`[Trace - ${(new Date).toLocaleTimeString()}] `),e&&this.outputChannel.appendLine(`${JSON.stringify(e)}`)}needsStart(){return this.state===m.Initial||this.state===m.Stopping||this.state===m.Stopped}needsStop(){return this.state===m.Starting||this.state===m.Running}onReady(){return this._onReady}isConnectionActive(){return this.state===m.Running&&!!this._resolvedConnection}start(){return this._onReadyCallbacks.isUsed&&(this._onReady=new Promise(((e,t)=>{this._onReadyCallbacks=new K(e,t)}))),this._listeners=[],this._providers=[],this._diagnostics||(this._diagnostics=this._clientOptions.diagnosticCollectionName?r.languages.createDiagnosticCollection(this._clientOptions.diagnosticCollectionName):r.languages.createDiagnosticCollection()),this.state=m.Starting,this.resolveConnection().then((e=>(e.onLogMessage((e=>{switch(e.type){case i.MessageType.Error:this.error(e.message);break;case i.MessageType.Warning:this.warn(e.message);break;case i.MessageType.Info:this.info(e.message);break;default:this.outputChannel.appendLine(e.message)}})),e.onShowMessage((e=>{switch(e.type){case i.MessageType.Error:r.window.showErrorMessage(e.message);break;case i.MessageType.Warning:r.window.showWarningMessage(e.message);break;case i.MessageType.Info:default:r.window.showInformationMessage(e.message)}})),e.onRequest(i.ShowMessageRequest.type,(e=>{let t;switch(e.type){case i.MessageType.Error:t=r.window.showErrorMessage;break;case i.MessageType.Warning:t=r.window.showWarningMessage;break;case i.MessageType.Info:default:t=r.window.showInformationMessage}let n=e.actions||[];return t(e.message,...n)})),e.onTelemetry((e=>{this._telemetryEmitter.fire(e)})),e.listen(),this.initialize(e)))).then(void 0,(e=>{this.state=m.StartFailed,this._onReadyCallbacks.reject(e),this.error("Starting client failed",e),r.window.showErrorMessage(`Couldn't start client ${this._name}`)})),new r.Disposable((()=>{this.needsStop()&&this.stop()}))}resolveConnection(){return this._connectionPromise||(this._connectionPromise=this.createConnection()),this._connectionPromise}initialize(e){this.refreshTrace(e,!1);let t=this._clientOptions.initializationOptions,n=this._clientOptions.workspaceFolder?this._clientOptions.workspaceFolder.uri.fsPath:this._clientGetRootPath(),o={processId:process.pid,rootPath:n||null,rootUri:n?this._c2p.asUri(r.Uri.file(n)):null,capabilities:this.computeClientCapabilities(),initializationOptions:a.func(t)?t():t,trace:i.Trace.toString(this._trace),workspaceFolders:null};return this.fillInitializeParams(o),e.initialize(o).then((t=>{let n;return this._resolvedConnection=e,this._initializeResult=t,this.state=m.Running,a.number(t.capabilities.textDocumentSync)?n=t.capabilities.textDocumentSync===i.TextDocumentSyncKind.None?{openClose:!1,change:i.TextDocumentSyncKind.None,save:void 0}:{openClose:!0,change:t.capabilities.textDocumentSync,save:{includeText:!1}}:void 0!==t.capabilities.textDocumentSync&&null!==t.capabilities.textDocumentSync&&(n=t.capabilities.textDocumentSync),this._capabilities=Object.assign({},t.capabilities,{resolvedTextDocumentSync:n}),e.onDiagnostics((e=>this.handleDiagnostics(e))),e.onRequest(i.RegistrationRequest.type,(e=>this.handleRegistrationRequest(e))),e.onRequest("client/registerFeature",(e=>this.handleRegistrationRequest(e))),e.onRequest(i.UnregistrationRequest.type,(e=>this.handleUnregistrationRequest(e))),e.onRequest("client/unregisterFeature",(e=>this.handleUnregistrationRequest(e))),e.onRequest(i.ApplyWorkspaceEditRequest.type,(e=>this.handleApplyWorkspaceEdit(e))),e.sendNotification(i.InitializedNotification.type,{}),this.hookFileEvents(e),this.hookConfigurationChanged(e),this.initializeFeatures(e),this._onReadyCallbacks.resolve(),t})).then(void 0,(t=>{this._clientOptions.initializationFailedHandler?this._clientOptions.initializationFailedHandler(t)?this.initialize(e):(this.stop(),this._onReadyCallbacks.reject(t)):t instanceof i.ResponseError&&t.data&&t.data.retry?r.window.showErrorMessage(t.message,{title:"Retry",id:"retry"}).then((n=>{n&&"retry"===n.id?this.initialize(e):(this.stop(),this._onReadyCallbacks.reject(t))})):(t&&t.message&&r.window.showErrorMessage(t.message),this.error("Server initialization failed.",t),this.stop(),this._onReadyCallbacks.reject(t))}))}_clientGetRootPath(){let e=r.workspace.workspaceFolders;if(!e||0===e.length)return;let t=e[0];return"file"===t.uri.scheme?t.uri.fsPath:void 0}stop(){return this._initializeResult=void 0,this._connectionPromise?this.state===m.Stopping&&this._onStop?this._onStop:(this.state=m.Stopping,this.cleanUp(),this._onStop=this.resolveConnection().then((e=>e.shutdown().then((()=>{e.exit(),e.dispose(),this.state=m.Stopped,this._onStop=void 0,this._connectionPromise=void 0,this._resolvedConnection=void 0}))))):(this.state=m.Stopped,Promise.resolve())}cleanUp(e=!0,t=!0){this._listeners&&(this._listeners.forEach((e=>e.dispose())),this._listeners=void 0),this._providers&&(this._providers.forEach((e=>e.dispose())),this._providers=void 0),this._syncedDocuments&&this._syncedDocuments.clear();for(let e of this._dynamicFeatures.values())e.dispose();e&&this._outputChannel&&this._disposeOutputChannel&&(this._outputChannel.dispose(),this._outputChannel=void 0),t&&this._diagnostics&&(this._diagnostics.dispose(),this._diagnostics=void 0)}notifyFileEvent(e){this._fileEvents.push(e),this._fileEventDelayer.trigger((()=>{this.onReady().then((()=>{this.resolveConnection().then((e=>{this.isConnectionActive()&&e.didChangeWatchedFiles({changes:this._fileEvents}),this._fileEvents=[]}))}),(e=>{this.error("Notify file events failed.",e)}))}))}forceDocumentSync(){this._dynamicFeatures.get(i.DidChangeTextDocumentNotification.type.method).forceDelivery()}handleDiagnostics(e){if(!this._diagnostics)return;let t=this._p2c.asUri(e.uri),n=this._p2c.asDiagnostics(e.diagnostics),r=this.clientOptions.middleware.handleDiagnostics;r?r(t,n,((e,t)=>this.setDiagnostics(e,t))):this.setDiagnostics(t,n)}setDiagnostics(e,t){this._diagnostics&&this._diagnostics.set(e,t)}createConnection(){let e=(e,t,n)=>{this.handleConnectionError(e,t,n)},t=()=>{this.handleConnectionClosed()};return this.createMessageTransports(this._clientOptions.stdioEncoding||"utf8").then((n=>function(e,t,n,r){let o=new u,s=i.createProtocolConnection(e,t,o);return s.onError((e=>{n(e[0],e[1],e[2])})),s.onClose(r),{listen:()=>s.listen(),sendRequest:(e,...t)=>s.sendRequest(a.string(e)?e:e.method,...t),onRequest:(e,t)=>s.onRequest(a.string(e)?e:e.method,t),sendNotification:(e,t)=>s.sendNotification(a.string(e)?e:e.method,t),onNotification:(e,t)=>s.onNotification(a.string(e)?e:e.method,t),trace:(e,t,n)=>{const r={sendNotification:!1,traceFormat:i.TraceFormat.Text};void 0===n?s.trace(e,t,r):(a.boolean(n),s.trace(e,t,n))},initialize:e=>s.sendRequest(i.InitializeRequest.type,e),shutdown:()=>s.sendRequest(i.ShutdownRequest.type,void 0),exit:()=>s.sendNotification(i.ExitNotification.type),onLogMessage:e=>s.onNotification(i.LogMessageNotification.type,e),onShowMessage:e=>s.onNotification(i.ShowMessageNotification.type,e),onTelemetry:e=>s.onNotification(i.TelemetryEventNotification.type,e),didChangeConfiguration:e=>s.sendNotification(i.DidChangeConfigurationNotification.type,e),didChangeWatchedFiles:e=>s.sendNotification(i.DidChangeWatchedFilesNotification.type,e),didOpenTextDocument:e=>s.sendNotification(i.DidOpenTextDocumentNotification.type,e),didChangeTextDocument:e=>s.sendNotification(i.DidChangeTextDocumentNotification.type,e),didCloseTextDocument:e=>s.sendNotification(i.DidCloseTextDocumentNotification.type,e),didSaveTextDocument:e=>s.sendNotification(i.DidSaveTextDocumentNotification.type,e),onDiagnostics:e=>s.onNotification(i.PublishDiagnosticsNotification.type,e),dispose:()=>s.dispose()}}(n.reader,n.writer,e,t)))}handleConnectionClosed(){if(this.state===m.Stopping||this.state===m.Stopped)return;try{this._resolvedConnection&&this._resolvedConnection.dispose()}catch(e){}let e=p.DoNotRestart;try{e=this._clientOptions.errorHandler.closed()}catch(e){}this._connectionPromise=void 0,this._resolvedConnection=void 0,e===p.DoNotRestart?(this.error("Connection to server got closed. Server will not be restarted."),this.state=m.Stopped,this.cleanUp(!1,!0)):e===p.Restart&&(this.info("Connection to server got closed. Server will restart."),this.cleanUp(!1,!1),this.state=m.Initial,this.start())}handleConnectionError(e,t,n){this._clientOptions.errorHandler.error(e,t,n)===d.Shutdown&&(this.error("Connection to server is erroring. Shutting down server."),this.stop())}hookConfigurationChanged(e){r.workspace.onDidChangeConfiguration((()=>{this.refreshTrace(e,!0)}))}refreshTrace(e,t=!1){let n=r.workspace.getConfiguration(this._id),o=i.Trace.Off,s=i.TraceFormat.Text;if(n){const e=n.get("trace.server","off");"string"==typeof e?o=i.Trace.fromString(e):(o=i.Trace.fromString(n.get("trace.server.verbosity","off")),s=i.TraceFormat.fromString(n.get("trace.server.format","text")))}this._trace=o,this._traceFormat=s,e.trace(this._trace,this._tracer,{sendNotification:t,traceFormat:this._traceFormat})}hookFileEvents(e){let t,n=this._clientOptions.synchronize.fileEvents;n&&(t=a.array(n)?n:[n],t&&this._dynamicFeatures.get(i.DidChangeWatchedFilesNotification.type.method).registerRaw(l.generateUuid(),t))}registerFeatures(e){for(let t of e)this.registerFeature(t)}registerFeature(e){if(this._features.push(e),S.is(e)){let t=e.messages;if(Array.isArray(t))for(let n of t)this._method2Message.set(n.method,n),this._dynamicFeatures.set(n.method,e);else this._method2Message.set(t.method,t),this._dynamicFeatures.set(t.method,e)}}registerBuiltinFeatures(){this.registerFeature(new $(this)),this.registerFeature(new C(this,this._syncedDocuments)),this.registerFeature(new E(this)),this.registerFeature(new _(this)),this.registerFeature(new x(this)),this.registerFeature(new R(this)),this.registerFeature(new T(this,this._syncedDocuments)),this.registerFeature(new I(this,(e=>this.notifyFileEvent(e)))),this.registerFeature(new D(this)),this.registerFeature(new A(this)),this.registerFeature(new k(this)),this.registerFeature(new N(this)),this.registerFeature(new L(this)),this.registerFeature(new j(this)),this.registerFeature(new M(this)),this.registerFeature(new F(this)),this.registerFeature(new q(this)),this.registerFeature(new B(this)),this.registerFeature(new U(this)),this.registerFeature(new z(this)),this.registerFeature(new G(this)),this.registerFeature(new H(this)),this.registerFeature(new V(this)),this.registerFeature(new W(this))}fillInitializeParams(e){for(let t of this._features)a.func(t.fillInitializeParams)&&t.fillInitializeParams(e)}computeClientCapabilities(){let e={};v(e,"workspace").applyEdit=!0;let t=v(v(e,"workspace"),"workspaceEdit");t.documentChanges=!0,t.resourceOperations=[i.ResourceOperationKind.Create,i.ResourceOperationKind.Rename,i.ResourceOperationKind.Delete],t.failureHandling=i.FailureHandlingKind.TextOnlyTransactional,v(v(e,"textDocument"),"publishDiagnostics").relatedInformation=!0;for(let t of this._features)t.fillClientCapabilities(e);return e}initializeFeatures(e){let t=this._clientOptions.documentSelector;for(let e of this._features)e.initialize(this._capabilities,t)}handleRegistrationRequest(e){return new Promise(((t,n)=>{for(let t of e.registrations){const e=this._dynamicFeatures.get(t.method);if(!e)return void n(new Error(`No feature implementation for ${t.method} found. Registration failed.`));const r=t.registerOptions||{};r.documentSelector=r.documentSelector||this._clientOptions.documentSelector;const i={id:t.id,registerOptions:r};e.register(this._method2Message.get(t.method),i)}t()}))}handleUnregistrationRequest(e){return new Promise(((t,n)=>{for(let t of e.unregisterations){const e=this._dynamicFeatures.get(t.method);if(!e)return void n(new Error(`No feature implementation for ${t.method} found. Unregistration failed.`));e.unregister(t.id)}t()}))}handleApplyWorkspaceEdit(e){let t=e.edit,n=new Map;r.workspace.textDocuments.forEach((e=>n.set(e.uri.toString(),e)));let o=!1;if(t.documentChanges)for(const e of t.documentChanges)if(i.TextDocumentEdit.is(e)&&e.textDocument.version&&e.textDocument.version>=0){let t=n.get(e.textDocument.uri);if(t&&t.version!==e.textDocument.version){o=!0;break}}return o?Promise.resolve({applied:!1}):r.workspace.applyEdit(this._p2c.asWorkspaceEdit(e.edit)).then((e=>({applied:e})))}logFailedRequest(e,t){t instanceof i.ResponseError&&t.code===i.ErrorCodes.RequestCancelled||this.error(`Request ${e.method} failed.`,t)}}},8924:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1398),i=n(2037),o=n(5805),s=n(2642),a=n(3938),c=n(7778);t.createConverter=function(e){const t=e||(e=>e.toString());function n(e){return t(e)}function l(e){return{uri:t(e.uri)}}function u(e){return{uri:t(e.uri),version:e.version}}function d(e){switch(e){case r.TextDocumentSaveReason.Manual:return i.TextDocumentSaveReason.Manual;case r.TextDocumentSaveReason.AfterDelay:return i.TextDocumentSaveReason.AfterDelay;case r.TextDocumentSaveReason.FocusOut:return i.TextDocumentSaveReason.FocusOut}return i.TextDocumentSaveReason.Manual}function p(e){switch(e){case r.CompletionTriggerKind.TriggerCharacter:return i.CompletionTriggerKind.TriggerCharacter;case r.CompletionTriggerKind.TriggerForIncompleteCompletions:return i.CompletionTriggerKind.TriggerForIncompleteCompletions;default:return i.CompletionTriggerKind.Invoked}}function h(e){return{line:e.line,character:e.character}}function f(e){if(void 0!==e)return null===e?null:{line:e.line,character:e.character}}function m(e){return null==e?e:{start:f(e.start),end:f(e.end)}}function g(e){switch(e){case r.DiagnosticSeverity.Error:return i.DiagnosticSeverity.Error;case r.DiagnosticSeverity.Warning:return i.DiagnosticSeverity.Warning;case r.DiagnosticSeverity.Information:return i.DiagnosticSeverity.Information;case r.DiagnosticSeverity.Hint:return i.DiagnosticSeverity.Hint}}function y(e){let t=i.Diagnostic.create(m(e.range),e.message);return o.number(e.severity)&&(t.severity=g(e.severity)),(o.number(e.code)||o.string(e.code))&&(t.code=e.code),e.source&&(t.source=e.source),t}function b(e){return null==e?e:e.map(y)}function v(e){return{range:m(e.range),newText:e.newText}}function S(e){let t=i.Command.create(e.title,e.command);return e.arguments&&(t.arguments=e.arguments),t}return{asUri:n,asTextDocumentIdentifier:l,asVersionedTextDocumentIdentifier:u,asOpenTextDocumentParams:function(e){return{textDocument:{uri:t(e.uri),languageId:e.languageId,version:e.version,text:e.getText()}}},asChangeTextDocumentParams:function(e){if(function(e){let t=e;return!!t.uri&&!!t.version}(e))return{textDocument:{uri:t(e.uri),version:e.version},contentChanges:[{text:e.getText()}]};if(function(e){let t=e;return!!t.document&&!!t.contentChanges}(e)){let n=e.document;return{textDocument:{uri:t(n.uri),version:n.version},contentChanges:e.contentChanges.map((e=>{let t=e.range;return{range:{start:{line:t.start.line,character:t.start.character},end:{line:t.end.line,character:t.end.character}},rangeLength:e.rangeLength,text:e.text}}))}}throw Error("Unsupported text document change parameter")},asCloseTextDocumentParams:function(e){return{textDocument:l(e)}},asSaveTextDocumentParams:function(e,t=!1){let n={textDocument:u(e)};return t&&(n.text=e.getText()),n},asWillSaveTextDocumentParams:function(e){return{textDocument:l(e.document),reason:d(e.reason)}},asTextDocumentPositionParams:function(e,t){return{textDocument:l(e),position:h(t)}},asCompletionParams:function(e,t,n){return{textDocument:l(e),position:h(t),context:{triggerKind:p(n.triggerKind),triggerCharacter:n.triggerCharacter}}},asWorkerPosition:h,asRange:m,asPosition:f,asDiagnosticSeverity:g,asDiagnostic:y,asDiagnostics:b,asCompletionItem:function(e){let t={label:e.label},n=e instanceof s.default?e:void 0;var a,c,l;return e.detail&&(t.detail=e.detail),e.documentation&&(n&&"$string"!==n.documentationFormat?t.documentation=function(e,t){switch(e){case"$string":return t;case i.MarkupKind.PlainText:return{kind:e,value:t};case i.MarkupKind.Markdown:return{kind:e,value:t.value};default:return`Unsupported Markup content received. Kind is: ${e}`}}(n.documentationFormat,e.documentation):t.documentation=e.documentation),e.filterText&&(t.filterText=e.filterText),function(e,t){let n,o,s=i.InsertTextFormat.PlainText;t.textEdit?(n=t.textEdit.newText,o=m(t.textEdit.range)):t.insertText instanceof r.SnippetString?(s=i.InsertTextFormat.Snippet,n=t.insertText.value):n=t.insertText,t.range&&(o=m(t.range)),e.insertTextFormat=s,t.fromEdit&&n&&o?e.textEdit={newText:n,range:o}:e.insertText=n}(t,e),o.number(e.kind)&&(t.kind=(a=e.kind,void 0!==(c=n&&n.originalItemKind)?c:a+1)),e.sortText&&(t.sortText=e.sortText),e.additionalTextEdits&&(t.additionalTextEdits=null==(l=e.additionalTextEdits)?l:l.map(v)),e.commitCharacters&&(t.commitCharacters=e.commitCharacters.slice()),e.command&&(t.command=S(e.command)),!0!==e.preselect&&!1!==e.preselect||(t.preselect=e.preselect),n&&(void 0!==n.data&&(t.data=n.data),!0!==n.deprecated&&!1!==n.deprecated||(t.deprecated=n.deprecated)),t},asTextEdit:v,asReferenceParams:function(e,t,n){return{textDocument:l(e),position:h(t),context:{includeDeclaration:n.includeDeclaration}}},asCodeActionContext:function(e){return null==e?e:i.CodeActionContext.create(b(e.diagnostics),o.string(e.only)?[e.only]:void 0)},asCommand:S,asCodeLens:function(e){let t=i.CodeLens.create(m(e.range));return e.command&&(t.command=S(e.command)),e instanceof a.default&&e.data&&(t.data=e.data),t},asFormattingOptions:function(e){return{tabSize:e.tabSize,insertSpaces:e.insertSpaces}},asDocumentSymbolParams:function(e){return{textDocument:l(e)}},asCodeLensParams:function(e){return{textDocument:l(e)}},asDocumentLink:function(e){let t=i.DocumentLink.create(m(e.range));e.target&&(t.target=n(e.target));let r=e instanceof c.default?e:void 0;return r&&r.data&&(t.data=r.data),t},asDocumentLinkParams:function(e){return{textDocument:l(e)}}}}},9729:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(6362),i=n(5805),o=n(1398),s=n(2037),a=n(7116);function c(e,t){return void 0===e[t]&&(e[t]={}),e[t]}class l extends a.TextDocumentFeature{constructor(e){super(e,s.DocumentColorRequest.type)}fillClientCapabilities(e){c(c(e,"textDocument"),"colorProvider").dynamicRegistration=!0}initialize(e,t){if(!e.colorProvider)return;const n=e.colorProvider,o=i.string(n.id)&&n.id.length>0?n.id:r.generateUuid(),s=n.documentSelector||t;s&&this.register(this.messages,{id:o,registerOptions:Object.assign({},{documentSelector:s})})}registerLanguageProvider(e){let t=this._client,n=(e,n,r)=>{const i={color:e,textDocument:t.code2ProtocolConverter.asTextDocumentIdentifier(n.document),range:t.code2ProtocolConverter.asRange(n.range)};return t.sendRequest(s.ColorPresentationRequest.type,i,r).then(this.asColorPresentations.bind(this),(e=>(t.logFailedRequest(s.ColorPresentationRequest.type,e),Promise.resolve(null))))},r=(e,n)=>{const r={textDocument:t.code2ProtocolConverter.asTextDocumentIdentifier(e)};return t.sendRequest(s.DocumentColorRequest.type,r,n).then(this.asColorInformations.bind(this),(e=>(t.logFailedRequest(s.ColorPresentationRequest.type,e),Promise.resolve(null))))},i=t.clientOptions.middleware;return o.languages.registerColorProvider(e.documentSelector,{provideColorPresentations:(e,t,r)=>i.provideColorPresentations?i.provideColorPresentations(e,t,r,n):n(e,t,r),provideDocumentColors:(e,t)=>i.provideDocumentColors?i.provideDocumentColors(e,t,r):r(e,t)})}asColor(e){return new o.Color(e.red,e.green,e.blue,e.alpha)}asColorInformations(e){return Array.isArray(e)?e.map((e=>new o.ColorInformation(this._client.protocol2CodeConverter.asRange(e.range),this.asColor(e.color)))):[]}asColorPresentations(e){return Array.isArray(e)?e.map((e=>{let t=new o.ColorPresentation(e.label);return t.additionalTextEdits=this._client.protocol2CodeConverter.asTextEdits(e.additionalTextEdits),t.textEdit=this._client.protocol2CodeConverter.asTextEdit(e.textEdit),t})):[]}}t.ColorProviderFeature=l},2237:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1398),i=n(2037);t.ConfigurationFeature=class{constructor(e){this._client=e}fillClientCapabilities(e){e.workspace=e.workspace||{},e.workspace.configuration=!0}initialize(){let e=this._client;e.onRequest(i.ConfigurationRequest.type,((t,n)=>{let r=e=>{let t=[];for(let n of e.items){let e=void 0!==n.scopeUri&&null!==n.scopeUri?this._client.protocol2CodeConverter.asUri(n.scopeUri):void 0;t.push(this.getConfiguration(e,null!==n.section?n.section:void 0))}return t},i=e.clientOptions.middleware.workspace;return i&&i.configuration?i.configuration(t,n,r):r(t)}))}getConfiguration(e,t){let n=null;if(t){let i=t.lastIndexOf(".");if(-1===i)n=r.workspace.getConfiguration(void 0,e).get(t);else{let e=r.workspace.getConfiguration(t.substr(0,i));e&&(n=e.get(t.substr(i+1)))}}else{let t=r.workspace.getConfiguration(void 0,e);n={};for(let e of Object.keys(t))t.has(e)&&(n[e]=t.get(e))}return n||null}}},3155:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(6362),i=n(5805),o=n(1398),s=n(2037),a=n(7116);function c(e,t){return void 0===e[t]&&(e[t]={}),e[t]}class l extends a.TextDocumentFeature{constructor(e){super(e,s.DeclarationRequest.type)}fillClientCapabilities(e){let t=c(c(e,"textDocument"),"declaration");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){if(e.declarationProvider)if(!0===e.declarationProvider){if(!t)return;this.register(this.messages,{id:r.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})}else{const n=e.declarationProvider,o=i.string(n.id)&&n.id.length>0?n.id:r.generateUuid(),s=n.documentSelector||t;s&&this.register(this.messages,{id:o,registerOptions:Object.assign({},{documentSelector:s})})}}registerLanguageProvider(e){let t=this._client,n=(e,n,r)=>t.sendRequest(s.DeclarationRequest.type,t.code2ProtocolConverter.asTextDocumentPositionParams(e,n),r).then(t.protocol2CodeConverter.asDeclarationResult,(e=>(t.logFailedRequest(s.DeclarationRequest.type,e),Promise.resolve(null)))),r=t.clientOptions.middleware;return o.languages.registerDeclarationProvider(e.documentSelector,{provideDeclaration:(e,t,i)=>r.provideDeclaration?r.provideDeclaration(e,t,i,n):n(e,t,i)})}}t.DeclarationFeature=l},3289:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(6362),i=n(5805),o=n(1398),s=n(2037),a=n(7116);function c(e,t){return void 0===e[t]&&(e[t]={}),e[t]}class l extends a.TextDocumentFeature{constructor(e){super(e,s.FoldingRangeRequest.type)}fillClientCapabilities(e){let t=c(c(e,"textDocument"),"foldingRange");t.dynamicRegistration=!0,t.rangeLimit=5e3,t.lineFoldingOnly=!0}initialize(e,t){if(!e.foldingRangeProvider)return;const n=e.foldingRangeProvider,o=i.string(n.id)&&n.id.length>0?n.id:r.generateUuid(),s=n.documentSelector||t;s&&this.register(this.messages,{id:o,registerOptions:Object.assign({},{documentSelector:s})})}registerLanguageProvider(e){let t=this._client,n=(e,n,r)=>{const i={textDocument:t.code2ProtocolConverter.asTextDocumentIdentifier(e)};return t.sendRequest(s.FoldingRangeRequest.type,i,r).then(this.asFoldingRanges.bind(this),(e=>(t.logFailedRequest(s.FoldingRangeRequest.type,e),Promise.resolve(null))))},r=t.clientOptions.middleware;return o.languages.registerFoldingRangeProvider(e.documentSelector,{provideFoldingRanges:(e,t,i)=>r.provideFoldingRanges?r.provideFoldingRanges(e,t,i,n):n(e,0,i)})}asFoldingRangeKind(e){if(e)switch(e){case s.FoldingRangeKind.Comment:return o.FoldingRangeKind.Comment;case s.FoldingRangeKind.Imports:return o.FoldingRangeKind.Imports;case s.FoldingRangeKind.Region:return o.FoldingRangeKind.Region}}asFoldingRanges(e){return Array.isArray(e)?e.map((e=>new o.FoldingRange(e.startLine,e.endLine,this.asFoldingRangeKind(e.kind)))):[]}}t.FoldingRangeFeature=l},8789:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(6362),i=n(5805),o=n(1398),s=n(2037),a=n(7116);function c(e,t){return void 0===e[t]&&(e[t]={}),e[t]}class l extends a.TextDocumentFeature{constructor(e){super(e,s.ImplementationRequest.type)}fillClientCapabilities(e){let t=c(c(e,"textDocument"),"implementation");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){if(e.implementationProvider)if(!0===e.implementationProvider){if(!t)return;this.register(this.messages,{id:r.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})}else{const n=e.implementationProvider,o=i.string(n.id)&&n.id.length>0?n.id:r.generateUuid(),s=n.documentSelector||t;s&&this.register(this.messages,{id:o,registerOptions:Object.assign({},{documentSelector:s})})}}registerLanguageProvider(e){let t=this._client,n=(e,n,r)=>t.sendRequest(s.ImplementationRequest.type,t.code2ProtocolConverter.asTextDocumentPositionParams(e,n),r).then(t.protocol2CodeConverter.asDefinitionResult,(e=>(t.logFailedRequest(s.ImplementationRequest.type,e),Promise.resolve(null)))),r=t.clientOptions.middleware;return o.languages.registerImplementationProvider(e.documentSelector,{provideImplementation:(e,t,i)=>r.provideImplementation?r.provideImplementation(e,t,i,n):n(e,t,i)})}}t.ImplementationFeature=l},4382:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(5317),i=n(9896),o=n(4251),s=n(7116),a=n(1398),c=n(2037),l=n(9729),u=n(2237),d=n(8789),p=n(8218),h=n(6885),f=n(3289),m=n(3155),g=n(5805),y=n(8688);!function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(7116));const b="^1.30";var v,S,w,C,T,E,_;!function(e){e.is=function(e){return g.string(e.command)}}(v||(v={})),function(e){e[e.stdio=0]="stdio",e[e.ipc=1]="ipc",e[e.pipe=2]="pipe",e[e.socket=3]="socket"}(S=t.TransportKind||(t.TransportKind={})),function(e){e.isSocket=function(e){let t=e;return t&&t.kind===S.socket&&g.number(t.port)}}(w||(w={})),function(e){e.is=function(e){return g.string(e.module)}}(C||(C={})),function(e){e.is=function(e){let t=e;return t&&void 0!==t.writer&&void 0!==t.reader}}(T||(T={})),function(e){e.is=function(e){let t=e;return t&&void 0!==t.process&&"boolean"==typeof t.detached}}(E||(E={}));class x extends s.BaseLanguageClient{constructor(e,t,n,r,i){let o,s,a,c,l;g.string(t)?(o=e,s=t,a=n,c=r,l=!!i):(o=e.toLowerCase(),s=e,a=t,c=n,l=r),void 0===l&&(l=!1),super(o,s,c),this._serverOptions=a,this._forceDebug=l;try{this.checkVersion()}catch(e){throw g.string(e.message)&&this.outputChannel.appendLine(e.message),e}}checkVersion(){let e=o.parse(a.version);if(!e)throw new Error(`No valid VS Code version detected. Version string is: ${a.version}`);if(e.prerelease&&e.prerelease.length>0&&(e.prerelease=[]),!o.satisfies(e,b))throw new Error(`The language client requires VS Code version ${b} but received version ${a.version}`)}stop(){return super.stop().then((()=>{if(this._serverProcess){let e=this._serverProcess;this._serverProcess=void 0,void 0!==this._isDetached&&this._isDetached||this.checkProcessDied(e),this._isDetached=void 0}}))}checkProcessDied(e){e&&setTimeout((()=>{try{process.kill(e.pid,0),y.terminate(e)}catch(e){}}),2e3)}handleConnectionClosed(){this._serverProcess=void 0,super.handleConnectionClosed()}createMessageTransports(e){let t,n=this._serverOptions;if(g.func(n))return n().then((t=>{if(s.MessageTransports.is(t))return this._isDetached=!!t.detached,t;if(T.is(t))return this._isDetached=!!t.detached,{reader:new c.StreamMessageReader(t.reader),writer:new c.StreamMessageWriter(t.writer)};{let n;return E.is(t)?(n=t.process,this._isDetached=t.detached):(n=t,this._isDetached=!1),n.stderr.on("data",(t=>this.outputChannel.append(g.string(t)?t:t.toString(e)))),{reader:new c.StreamMessageReader(n.stdout),writer:new c.StreamMessageWriter(n.stdin)}}}));let i=n;return t=i.run||i.debug?"object"==typeof v8debug||this._forceDebug||function(){let e=process.execArgv;return!!e&&e.some((e=>/^--debug=?/.test(e)||/^--debug-brk=?/.test(e)||/^--inspect=?/.test(e)||/^--inspect-brk=?/.test(e)))}()?i.debug:i.run:n,this._getServerWorkingDir(t.options).then((i=>{if(C.is(t)&&t.module){let n=t,o=n.transport||S.stdio;if(!n.runtime){let t;return new Promise(((s,a)=>{let l=n.args&&n.args.slice()||[];o===S.ipc?l.push("--node-ipc"):o===S.stdio?l.push("--stdio"):o===S.pipe?(t=c.generateRandomPipeName(),l.push(`--pipe=${t}`)):w.isSocket(o)&&l.push(`--socket=${o.port}`),l.push(`--clientProcessId=${process.pid.toString()}`);let u=n.options||Object.create(null);if(u.execArgv=u.execArgv||[],u.cwd=i,u.silent=!0,o===S.ipc||o===S.stdio){let t=r.fork(n.module,l||[],u);this._serverProcess=t,t.stderr.on("data",(t=>this.outputChannel.append(g.string(t)?t:t.toString(e)))),o===S.ipc?(t.stdout.on("data",(t=>this.outputChannel.append(g.string(t)?t:t.toString(e)))),s({reader:new c.IPCMessageReader(this._serverProcess),writer:new c.IPCMessageWriter(this._serverProcess)})):s({reader:new c.StreamMessageReader(t.stdout),writer:new c.StreamMessageWriter(t.stdin)})}else o===S.pipe?c.createClientPipeTransport(t).then((t=>{let i=r.fork(n.module,l||[],u);this._serverProcess=i,i.stderr.on("data",(t=>this.outputChannel.append(g.string(t)?t:t.toString(e)))),i.stdout.on("data",(t=>this.outputChannel.append(g.string(t)?t:t.toString(e)))),t.onConnected().then((e=>{s({reader:e[0],writer:e[1]})}))})):w.isSocket(o)&&c.createClientSocketTransport(o.port).then((t=>{let i=r.fork(n.module,l||[],u);this._serverProcess=i,i.stderr.on("data",(t=>this.outputChannel.append(g.string(t)?t:t.toString(e)))),i.stdout.on("data",(t=>this.outputChannel.append(g.string(t)?t:t.toString(e)))),t.onConnected().then((e=>{s({reader:e[0],writer:e[1]})}))}))}))}{let t=[],s=n.options||Object.create(null);s.execArgv&&s.execArgv.forEach((e=>t.push(e))),t.push(n.module),n.args&&n.args.forEach((e=>t.push(e)));let a,l=Object.create(null);if(l.cwd=i,l.env=function(e){if(!e)return process.env;let t=Object.create(null);return Object.keys(process.env).forEach((e=>t[e]=process.env[e])),Object.keys(e).forEach((n=>t[n]=e[n])),t}(s.env),o===S.ipc?(l.stdio=[null,null,null,"ipc"],t.push("--node-ipc")):o===S.stdio?t.push("--stdio"):o===S.pipe?(a=c.generateRandomPipeName(),t.push(`--pipe=${a}`)):w.isSocket(o)&&t.push(`--socket=${o.port}`),t.push(`--clientProcessId=${process.pid.toString()}`),o===S.ipc||o===S.stdio){let i=r.spawn(n.runtime,t,l);return i&&i.pid?(this._serverProcess=i,i.stderr.on("data",(t=>this.outputChannel.append(g.string(t)?t:t.toString(e)))),o===S.ipc?(i.stdout.on("data",(t=>this.outputChannel.append(g.string(t)?t:t.toString(e)))),Promise.resolve({reader:new c.IPCMessageReader(i),writer:new c.IPCMessageWriter(i)})):Promise.resolve({reader:new c.StreamMessageReader(i.stdout),writer:new c.StreamMessageWriter(i.stdin)})):Promise.reject(`Launching server using runtime ${n.runtime} failed.`)}if(o==S.pipe)return c.createClientPipeTransport(a).then((i=>{let o=r.spawn(n.runtime,t,l);return o&&o.pid?(this._serverProcess=o,o.stderr.on("data",(t=>this.outputChannel.append(g.string(t)?t:t.toString(e)))),o.stdout.on("data",(t=>this.outputChannel.append(g.string(t)?t:t.toString(e)))),i.onConnected().then((e=>({reader:e[0],writer:e[1]})))):Promise.reject(`Launching server using runtime ${n.runtime} failed.`)}));if(w.isSocket(o))return c.createClientSocketTransport(o.port).then((i=>{let o=r.spawn(n.runtime,t,l);return o&&o.pid?(this._serverProcess=o,o.stderr.on("data",(t=>this.outputChannel.append(g.string(t)?t:t.toString(e)))),o.stdout.on("data",(t=>this.outputChannel.append(g.string(t)?t:t.toString(e)))),i.onConnected().then((e=>({reader:e[0],writer:e[1]})))):Promise.reject(`Launching server using runtime ${n.runtime} failed.`)}))}}else if(v.is(t)&&t.command){let n=t,o=n.args||[],s=Object.assign({},n.options);s.cwd=s.cwd||i;let a=r.spawn(n.command,o,s);return a&&a.pid?(a.stderr.on("data",(t=>this.outputChannel.append(g.string(t)?t:t.toString(e)))),this._serverProcess=a,this._isDetached=!!s.detached,Promise.resolve({reader:new c.StreamMessageReader(a.stdout),writer:new c.StreamMessageWriter(a.stdin)})):Promise.reject(`Launching server using command ${n.command} failed.`)}return Promise.reject(new Error("Unsupported server configuration "+JSON.stringify(n,null,4)))}))}registerProposedFeatures(){this.registerFeatures(_.createAll(this))}registerBuiltinFeatures(){super.registerBuiltinFeatures(),this.registerFeature(new u.ConfigurationFeature(this)),this.registerFeature(new p.TypeDefinitionFeature(this)),this.registerFeature(new d.ImplementationFeature(this)),this.registerFeature(new l.ColorProviderFeature(this)),this.registerFeature(new h.WorkspaceFoldersFeature(this)),this.registerFeature(new f.FoldingRangeFeature(this)),this.registerFeature(new m.DeclarationFeature(this))}_mainGetRootPath(){let e=a.workspace.workspaceFolders;if(!e||0===e.length)return;let t=e[0];return"file"===t.uri.scheme?t.uri.fsPath:void 0}_getServerWorkingDir(e){let t=e&&e.cwd;return t||(t=this.clientOptions.workspaceFolder?this.clientOptions.workspaceFolder.uri.fsPath:this._mainGetRootPath()),t?new Promise((e=>{i.lstat(t,((n,r)=>{e(!n&&r.isDirectory()?t:void 0)}))})):Promise.resolve(void 0)}}t.LanguageClient=x,t.SettingMonitor=class{constructor(e,t){this._client=e,this._setting=t,this._listeners=[]}start(){return a.workspace.onDidChangeConfiguration(this.onDidChangeConfiguration,this,this._listeners),this.onDidChangeConfiguration(),new a.Disposable((()=>{this._client.needsStop()&&this._client.stop()}))}onDidChangeConfiguration(){let e=this._setting.indexOf("."),t=e>=0?this._setting.substr(0,e):this._setting,n=e>=0?this._setting.substr(e+1):void 0,r=n?a.workspace.getConfiguration(t).get(n,!1):a.workspace.getConfiguration(t);r&&this._client.needsStart()?this._client.start():!r&&this._client.needsStop()&&this._client.stop()}},function(e){e.createAll=function(e){return[]}}(_=t.ProposedFeatures||(t.ProposedFeatures={}))},3938:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1398);class i extends r.CodeLens{constructor(e){super(e)}}t.default=i},2642:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1398);class i extends r.CompletionItem{constructor(e){super(e)}}t.default=i},9519:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1398),i=n(2037),o=n(5805),s=n(2642),a=n(3938),c=n(7778);var l;!function(e){e.is=function(e){let t=e;return t&&o.string(t.language)&&o.string(t.value)}}(l||(l={})),t.createConverter=function(e){const t=e||(e=>r.Uri.parse(e));function n(e){return t(e)}function u(e){return e.map(d)}function d(e){let t=new r.Diagnostic(f(e.range),e.message,m(e.severity));return(o.number(e.code)||o.string(e.code))&&(t.code=e.code),e.source&&(t.source=e.source),e.relatedInformation&&(t.relatedInformation=e.relatedInformation.map(p)),t}function p(e){return new r.DiagnosticRelatedInformation(E(e.location),e.message)}function h(e){if(e)return new r.Position(e.line,e.character)}function f(e){if(e)return new r.Range(h(e.start),h(e.end))}function m(e){if(null==e)return r.DiagnosticSeverity.Error;switch(e){case i.DiagnosticSeverity.Error:return r.DiagnosticSeverity.Error;case i.DiagnosticSeverity.Warning:return r.DiagnosticSeverity.Warning;case i.DiagnosticSeverity.Information:return r.DiagnosticSeverity.Information;case i.DiagnosticSeverity.Hint:return r.DiagnosticSeverity.Hint}return r.DiagnosticSeverity.Error}function g(e){if(o.string(e))return e;switch(e.kind){case i.MarkupKind.Markdown:return new r.MarkdownString(e.value);case i.MarkupKind.PlainText:return e.value;default:return`Unsupported Markup content received. Kind is: ${e.kind}`}}function y(e){let t=new s.default(e.label);e.detail&&(t.detail=e.detail),e.documentation&&(t.documentation=g(e.documentation),t.documentationFormat=o.string(e.documentation)?"$string":e.documentation.kind),e.filterText&&(t.filterText=e.filterText);let n=function(e){return e.textEdit?e.insertTextFormat===i.InsertTextFormat.Snippet?{text:new r.SnippetString(e.textEdit.newText),range:f(e.textEdit.range),fromEdit:!0}:{text:e.textEdit.newText,range:f(e.textEdit.range),fromEdit:!0}:e.insertText?e.insertTextFormat===i.InsertTextFormat.Snippet?{text:new r.SnippetString(e.insertText),fromEdit:!1}:{text:e.insertText,fromEdit:!1}:void 0}(e);if(n&&(t.insertText=n.text,t.range=n.range,t.fromEdit=n.fromEdit),o.number(e.kind)){let[n,o]=(a=e.kind,i.CompletionItemKind.Text<=a&&a<=i.CompletionItemKind.TypeParameter?[a-1,void 0]:[r.CompletionItemKind.Text,a]);t.kind=n,o&&(t.originalItemKind=o)}var a;return e.sortText&&(t.sortText=e.sortText),e.additionalTextEdits&&(t.additionalTextEdits=v(e.additionalTextEdits)),o.stringArray(e.commitCharacters)&&(t.commitCharacters=e.commitCharacters.slice()),e.command&&(t.command=A(e.command)),!0!==e.deprecated&&!1!==e.deprecated||(t.deprecated=e.deprecated),!0!==e.preselect&&!1!==e.preselect||(t.preselect=e.preselect),void 0!==e.data&&(t.data=e.data),t}function b(e){if(e)return new r.TextEdit(f(e.range),e.newText)}function v(e){if(e)return e.map(b)}function S(e){return e.map(w)}function w(e){let t=new r.SignatureInformation(e.label);return e.documentation&&(t.documentation=g(e.documentation)),e.parameters&&(t.parameters=C(e.parameters)),t}function C(e){return e.map(T)}function T(e){let t=new r.ParameterInformation(e.label);return e.documentation&&(t.documentation=g(e.documentation)),t}function E(e){if(e)return new r.Location(t(e.uri),f(e.range))}function _(e){if(e)return{targetUri:t(e.targetUri),targetRange:f(e.targetSelectionRange),originSelectionRange:f(e.originSelectionRange),targetSelectionRange:f(e.targetSelectionRange)}}function x(e){if(e)return o.array(e)?0===e.length?[]:i.LocationLink.is(e[0])?e.map((e=>_(e))):e.map((e=>E(e))):i.LocationLink.is(e)?[_(e)]:E(e)}function R(e){let t=new r.DocumentHighlight(f(e.range));return o.number(e.kind)&&(t.kind=I(e.kind)),t}function I(e){switch(e){case i.DocumentHighlightKind.Text:return r.DocumentHighlightKind.Text;case i.DocumentHighlightKind.Read:return r.DocumentHighlightKind.Read;case i.DocumentHighlightKind.Write:return r.DocumentHighlightKind.Write}return r.DocumentHighlightKind.Text}function P(e){return e<=i.SymbolKind.TypeParameter?e-1:r.SymbolKind.Property}function O(e,n){let i=new r.SymbolInformation(e.name,P(e.kind),f(e.location.range),e.location.uri?t(e.location.uri):n);return e.containerName&&(i.containerName=e.containerName),i}function D(e){let t=new r.DocumentSymbol(e.name,e.detail||"",P(e.kind),f(e.range),f(e.selectionRange));if(void 0!==e.children&&e.children.length>0){let n=[];for(let t of e.children)n.push(D(t));t.children=n}return t}function A(e){let t={title:e.title,command:e.command};return e.arguments&&(t.arguments=e.arguments),t}const k=new Map;function N(e){if(null==e)return;let t=k.get(e);if(t)return t;let n=e.split(".");t=r.CodeActionKind.Empty;for(let e of n)t=t.append(e);return t}function L(e){if(!e)return;let t=new a.default(f(e.range));return e.command&&(t.command=A(e.command)),void 0!==e.data&&null!==e.data&&(t.data=e.data),t}function j(e){if(!e)return;let n=new r.WorkspaceEdit;return e.documentChanges?e.documentChanges.forEach((e=>{i.CreateFile.is(e)?n.createFile(t(e.uri),e.options):i.RenameFile.is(e)?n.renameFile(t(e.oldUri),t(e.newUri),e.options):i.DeleteFile.is(e)?n.deleteFile(t(e.uri),e.options):i.TextDocumentEdit.is(e)?n.set(t(e.textDocument.uri),v(e.edits)):console.error(`Unknown workspace edit change received:\n${JSON.stringify(e,void 0,4)}`)})):e.changes&&Object.keys(e.changes).forEach((r=>{n.set(t(r),v(e.changes[r]))})),n}function M(e){let t=f(e.range),r=e.target?n(e.target):void 0,i=new c.default(t,r);return void 0!==e.data&&null!==e.data&&(i.data=e.data),i}function F(e){return new r.Color(e.red,e.green,e.blue,e.alpha)}function q(e){return new r.ColorInformation(f(e.range),F(e.color))}function B(e){let t=new r.ColorPresentation(e.label);return t.additionalTextEdits=v(e.additionalTextEdits),e.textEdit&&(t.textEdit=b(e.textEdit)),t}function U(e){if(e)switch(e){case i.FoldingRangeKind.Comment:return r.FoldingRangeKind.Comment;case i.FoldingRangeKind.Imports:return r.FoldingRangeKind.Imports;case i.FoldingRangeKind.Region:return r.FoldingRangeKind.Region}}function z(e){return new r.FoldingRange(e.startLine,e.endLine,U(e.kind))}return k.set("",r.CodeActionKind.Empty),k.set(i.CodeActionKind.QuickFix,r.CodeActionKind.QuickFix),k.set(i.CodeActionKind.Refactor,r.CodeActionKind.Refactor),k.set(i.CodeActionKind.RefactorExtract,r.CodeActionKind.RefactorExtract),k.set(i.CodeActionKind.RefactorInline,r.CodeActionKind.RefactorInline),k.set(i.CodeActionKind.RefactorRewrite,r.CodeActionKind.RefactorRewrite),k.set(i.CodeActionKind.Source,r.CodeActionKind.Source),k.set(i.CodeActionKind.SourceOrganizeImports,r.CodeActionKind.SourceOrganizeImports),{asUri:n,asDiagnostics:u,asDiagnostic:d,asRange:f,asPosition:h,asDiagnosticSeverity:m,asHover:function(e){if(e)return new r.Hover(function(e){if(o.string(e))return new r.MarkdownString(e);if(l.is(e))return(new r.MarkdownString).appendCodeblock(e.value,e.language);if(Array.isArray(e)){let t=[];for(let n of e){let e=new r.MarkdownString;l.is(n)?e.appendCodeblock(n.value,n.language):e.appendMarkdown(n),t.push(e)}return t}{let t;switch(e.kind){case i.MarkupKind.Markdown:return new r.MarkdownString(e.value);case i.MarkupKind.PlainText:return t=new r.MarkdownString,t.appendText(e.value),t;default:return t=new r.MarkdownString,t.appendText(`Unsupported Markup content received. Kind is: ${e.kind}`),t}}}(e.contents),f(e.range))},asCompletionResult:function(e){if(!e)return;if(Array.isArray(e))return e.map(y);let t=e;return new r.CompletionList(t.items.map(y),t.isIncomplete)},asCompletionItem:y,asTextEdit:b,asTextEdits:v,asSignatureHelp:function(e){if(!e)return;let t=new r.SignatureHelp;return o.number(e.activeSignature)?t.activeSignature=e.activeSignature:t.activeSignature=0,o.number(e.activeParameter)?t.activeParameter=e.activeParameter:t.activeParameter=0,e.signatures&&(t.signatures=S(e.signatures)),t},asSignatureInformations:S,asSignatureInformation:w,asParameterInformations:C,asParameterInformation:T,asDeclarationResult:function(e){if(e)return x(e)},asDefinitionResult:function(e){if(e)return x(e)},asLocation:E,asReferences:function(e){if(e)return e.map((e=>E(e)))},asDocumentHighlights:function(e){if(e)return e.map(R)},asDocumentHighlight:R,asDocumentHighlightKind:I,asSymbolInformations:function(e,t){if(e)return e.map((e=>O(e,t)))},asSymbolInformation:O,asDocumentSymbols:function(e){if(null!=e)return e.map(D)},asDocumentSymbol:D,asCommand:A,asCommands:function(e){if(e)return e.map(A)},asCodeAction:function(e){if(null==e)return;let t=new r.CodeAction(e.title);return void 0!==e.kind&&(t.kind=N(e.kind)),e.diagnostics&&(t.diagnostics=u(e.diagnostics)),e.edit&&(t.edit=j(e.edit)),e.command&&(t.command=A(e.command)),t},asCodeActionKind:N,asCodeActionKinds:function(e){if(null!=e)return e.map((e=>N(e)))},asCodeLens:L,asCodeLenses:function(e){if(e)return e.map((e=>L(e)))},asWorkspaceEdit:j,asDocumentLink:M,asDocumentLinks:function(e){if(e)return e.map(M)},asFoldingRangeKind:U,asFoldingRange:z,asFoldingRanges:function(e){if(Array.isArray(e))return e.map(z)},asColor:F,asColorInformation:q,asColorInformations:function(e){if(Array.isArray(e))return e.map(q)},asColorPresentation:B,asColorPresentations:function(e){if(Array.isArray(e))return e.map(B)}}}},7778:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1398);class i extends r.DocumentLink{constructor(e,t){super(e,t)}}t.default=i},8218:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(6362),i=n(5805),o=n(1398),s=n(2037),a=n(7116);function c(e,t){return void 0===e[t]&&(e[t]={}),e[t]}class l extends a.TextDocumentFeature{constructor(e){super(e,s.TypeDefinitionRequest.type)}fillClientCapabilities(e){c(c(e,"textDocument"),"typeDefinition").dynamicRegistration=!0;let t=c(c(e,"textDocument"),"typeDefinition");t.dynamicRegistration=!0,t.linkSupport=!0}initialize(e,t){if(e.typeDefinitionProvider)if(!0===e.typeDefinitionProvider){if(!t)return;this.register(this.messages,{id:r.generateUuid(),registerOptions:Object.assign({},{documentSelector:t})})}else{const n=e.typeDefinitionProvider,o=i.string(n.id)&&n.id.length>0?n.id:r.generateUuid(),s=n.documentSelector||t;s&&this.register(this.messages,{id:o,registerOptions:Object.assign({},{documentSelector:s})})}}registerLanguageProvider(e){let t=this._client,n=(e,n,r)=>t.sendRequest(s.TypeDefinitionRequest.type,t.code2ProtocolConverter.asTextDocumentPositionParams(e,n),r).then(t.protocol2CodeConverter.asDefinitionResult,(e=>(t.logFailedRequest(s.TypeDefinitionRequest.type,e),Promise.resolve(null)))),r=t.clientOptions.middleware;return o.languages.registerTypeDefinitionProvider(e.documentSelector,{provideTypeDefinition:(e,t,i)=>r.provideTypeDefinition?r.provideTypeDefinition(e,t,i,n):n(e,t,i)})}}t.TypeDefinitionFeature=l},6669:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Delayer=class{constructor(e){this.defaultDelay=e,this.timeout=void 0,this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0}trigger(e,t=this.defaultDelay){return this.task=e,t>=0&&this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((e=>{this.onSuccess=e})).then((()=>{this.completionPromise=void 0,this.onSuccess=void 0;var e=this.task();return this.task=void 0,e}))),(t>=0||void 0===this.timeout)&&(this.timeout=setTimeout((()=>{this.timeout=void 0,this.onSuccess(void 0)}),t>=0?t:this.defaultDelay)),this.completionPromise}forceDelivery(){if(!this.completionPromise)return;this.cancelTimeout();let e=this.task();return this.completionPromise=void 0,this.onSuccess=void 0,this.task=void 0,e}isTriggered(){return void 0!==this.timeout}cancel(){this.cancelTimeout(),this.completionPromise=void 0}cancelTimeout(){void 0!==this.timeout&&(clearTimeout(this.timeout),this.timeout=void 0)}}},5805:(e,t)=>{"use strict";function n(e){return"string"==typeof e||e instanceof String}function r(e){return"function"==typeof e}function i(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=r,t.array=i,t.stringArray=function(e){return i(e)&&e.every((e=>n(e)))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.thenable=function(e){return e&&r(e.then)}},8688:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(5317),i=n(6928),o="win32"===process.platform,s="darwin"===process.platform,a="linux"===process.platform;t.terminate=function(e,t){if(o)try{let n={stdio:["pipe","pipe","ignore"]};return t&&(n.cwd=t),r.execFileSync("taskkill",["/T","/F","/PID",e.pid.toString()],n),!0}catch(e){return!1}else{if(!a&&!s)return e.kill("SIGKILL"),!0;try{var n=i.join(__dirname,"terminateProcess.sh");return!r.spawnSync(n,[e.pid.toString()]).error}catch(e){return!1}}}},6362:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class n{constructor(e){this._value=e}asHex(){return this._value}equals(e){return this.asHex()===e.asHex()}}class r extends n{constructor(){super([r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),"-",r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),"-","4",r._randomHex(),r._randomHex(),r._randomHex(),"-",r._oneOf(r._timeHighBits),r._randomHex(),r._randomHex(),r._randomHex(),"-",r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex(),r._randomHex()].join(""))}static _oneOf(e){return e[Math.floor(e.length*Math.random())]}static _randomHex(){return r._oneOf(r._chars)}}function i(){return new r}r._chars=["0","1","2","3","4","5","6","6","7","8","9","a","b","c","d","e","f"],r._timeHighBits=["8","9","a","b"],t.empty=new n("00000000-0000-0000-0000-000000000000"),t.v4=i;const o=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function s(e){return o.test(e)}t.isUUID=s,t.parse=function(e){if(!s(e))throw new Error("invalid uuid");return new n(e)},t.generateUuid=function(){return i().asHex()}},6885:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(6362),i=n(1398),o=n(2037);function s(e,t){if(void 0!==e)return e[t]}t.WorkspaceFoldersFeature=class{constructor(e){this._client=e,this._listeners=new Map}get messages(){return o.DidChangeWorkspaceFoldersNotification.type}fillInitializeParams(e){let t=i.workspace.workspaceFolders;e.workspaceFolders=void 0===t?null:t.map((e=>this.asProtocol(e)))}fillClientCapabilities(e){e.workspace=e.workspace||{},e.workspace.workspaceFolders=!0}initialize(e){let t=this._client;t.onRequest(o.WorkspaceFoldersRequest.type,(e=>{let n=()=>{let e=i.workspace.workspaceFolders;return void 0===e?null:e.map((e=>this.asProtocol(e)))},r=t.clientOptions.middleware.workspace;return r&&r.workspaceFolders?r.workspaceFolders(e,n):n()}));let n,a=s(s(s(e,"workspace"),"workspaceFolders"),"changeNotifications");"string"==typeof a?n=a:!0===a&&(n=r.generateUuid()),n&&this.register(this.messages,{id:n,registerOptions:void 0})}register(e,t){let n=t.id,r=this._client,s=i.workspace.onDidChangeWorkspaceFolders((e=>{let t=e=>{let t={event:{added:e.added.map((e=>this.asProtocol(e))),removed:e.removed.map((e=>this.asProtocol(e)))}};this._client.sendNotification(o.DidChangeWorkspaceFoldersNotification.type,t)},n=r.clientOptions.middleware.workspace;n&&n.didChangeWorkspaceFolders?n.didChangeWorkspaceFolders(e,t):t(e)}));this._listeners.set(n,s)}unregister(e){let t=this._listeners.get(e);void 0!==t&&(this._listeners.delete(e),t.dispose())}dispose(){for(let e of this._listeners.values())e.dispose();this._listeners.clear()}asProtocol(e){return void 0===e?null:{uri:this._client.code2ProtocolConverter.asUri(e.uri),name:e.name}}}},4251:(e,t)=>{var n;t=e.exports=J,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,i=Number.MAX_SAFE_INTEGER||9007199254740991,o=r-6,s=t.re=[],a=t.safeRe=[],c=t.src=[],l=0,u="[a-zA-Z0-9-]",d=[["\\s",1],["\\d",r],[u,o]];function p(e){for(var t=0;t<d.length;t++){var n=d[t][0],r=d[t][1];e=e.split(n+"*").join(n+"{0,"+r+"}").split(n+"+").join(n+"{1,"+r+"}")}return e}var h=l++;c[h]="0|[1-9]\\d*";var f=l++;c[f]="\\d+";var m=l++;c[m]="\\d*[a-zA-Z-]"+u+"*";var g=l++;c[g]="("+c[h]+")\\.("+c[h]+")\\.("+c[h]+")";var y=l++;c[y]="("+c[f]+")\\.("+c[f]+")\\.("+c[f]+")";var b=l++;c[b]="(?:"+c[h]+"|"+c[m]+")";var v=l++;c[v]="(?:"+c[f]+"|"+c[m]+")";var S=l++;c[S]="(?:-("+c[b]+"(?:\\."+c[b]+")*))";var w=l++;c[w]="(?:-?("+c[v]+"(?:\\."+c[v]+")*))";var C=l++;c[C]=u+"+";var T=l++;c[T]="(?:\\+("+c[C]+"(?:\\."+c[C]+")*))";var E=l++,_="v?"+c[g]+c[S]+"?"+c[T]+"?";c[E]="^"+_+"$";var x="[v=\\s]*"+c[y]+c[w]+"?"+c[T]+"?",R=l++;c[R]="^"+x+"$";var I=l++;c[I]="((?:<|>)?=?)";var P=l++;c[P]=c[f]+"|x|X|\\*";var O=l++;c[O]=c[h]+"|x|X|\\*";var D=l++;c[D]="[v=\\s]*("+c[O]+")(?:\\.("+c[O]+")(?:\\.("+c[O]+")(?:"+c[S]+")?"+c[T]+"?)?)?";var A=l++;c[A]="[v=\\s]*("+c[P]+")(?:\\.("+c[P]+")(?:\\.("+c[P]+")(?:"+c[w]+")?"+c[T]+"?)?)?";var k=l++;c[k]="^"+c[I]+"\\s*"+c[D]+"$";var N=l++;c[N]="^"+c[I]+"\\s*"+c[A]+"$";var L=l++;c[L]="(?:^|[^\\d])(\\d{1,16})(?:\\.(\\d{1,16}))?(?:\\.(\\d{1,16}))?(?:$|[^\\d])";var j=l++;c[j]="(?:~>?)";var M=l++;c[M]="(\\s*)"+c[j]+"\\s+",s[M]=new RegExp(c[M],"g"),a[M]=new RegExp(p(c[M]),"g");var F=l++;c[F]="^"+c[j]+c[D]+"$";var q=l++;c[q]="^"+c[j]+c[A]+"$";var B=l++;c[B]="(?:\\^)";var U=l++;c[U]="(\\s*)"+c[B]+"\\s+",s[U]=new RegExp(c[U],"g"),a[U]=new RegExp(p(c[U]),"g");var z=l++;c[z]="^"+c[B]+c[D]+"$";var G=l++;c[G]="^"+c[B]+c[A]+"$";var H=l++;c[H]="^"+c[I]+"\\s*("+x+")$|^$";var V=l++;c[V]="^"+c[I]+"\\s*("+_+")$|^$";var $=l++;c[$]="(\\s*)"+c[I]+"\\s*("+x+"|"+c[D]+")",s[$]=new RegExp(c[$],"g"),a[$]=new RegExp(p(c[$]),"g");var W=l++;c[W]="^\\s*("+c[D]+")\\s+-\\s+("+c[D]+")\\s*$";var K=l++;c[K]="^\\s*("+c[A]+")\\s+-\\s+("+c[A]+")\\s*$";var Q=l++;c[Q]="(<|>)?=?\\s*\\*";for(var X=0;X<35;X++)n(X,c[X]),s[X]||(s[X]=new RegExp(c[X]),a[X]=new RegExp(p(c[X])));function Y(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof J)return e;if("string"!=typeof e)return null;if(e.length>r)return null;if(!(t.loose?a[R]:a[E]).test(e))return null;try{return new J(e,t)}catch(e){return null}}function J(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof J){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 J))return new J(e,t);n("SemVer",e,t),this.options=t,this.loose=!!t.loose;var o=e.trim().match(t.loose?a[R]:a[E]);if(!o)throw new TypeError("Invalid Version: "+e);if(this.raw=e,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>i||this.major<0)throw new TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map((function(e){if(/^[0-9]+$/.test(e)){var t=+e;if(t>=0&&t<i)return t}return e})):this.prerelease=[],this.build=o[5]?o[5].split("."):[],this.format()}t.parse=Y,t.valid=function(e,t){var n=Y(e,t);return n?n.version:null},t.clean=function(e,t){var n=Y(e.trim().replace(/^[=v]+/,""),t);return n?n.version:null},t.SemVer=J,J.prototype.format=function(){return this.version=this.major+"."+this.minor+"."+this.patch,this.prerelease.length&&(this.version+="-"+this.prerelease.join(".")),this.version},J.prototype.toString=function(){return this.version},J.prototype.compare=function(e){return n("SemVer.compare",this.version,this.options,e),e instanceof J||(e=new J(e,this.options)),this.compareMain(e)||this.comparePre(e)},J.prototype.compareMain=function(e){return e instanceof J||(e=new J(e,this.options)),ee(this.major,e.major)||ee(this.minor,e.minor)||ee(this.patch,e.patch)},J.prototype.comparePre=function(e){if(e instanceof J||(e=new J(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;var t=0;do{var r=this.prerelease[t],i=e.prerelease[t];if(n("prerelease compare",t,r,i),void 0===r&&void 0===i)return 0;if(void 0===i)return 1;if(void 0===r)return-1;if(r!==i)return ee(r,i)}while(++t)},J.prototype.inc=function(e,t){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t),this.inc("pre",t);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t),this.inc("pre",t);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":if(0===this.prerelease.length)this.prerelease=[0];else{for(var n=this.prerelease.length;--n>=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 J(e,n).inc(t,r).version}catch(e){return null}},t.diff=function(e,t){if(ie(e,t))return null;var n=Y(e),r=Y(t),i="";if(n.prerelease.length||r.prerelease.length){i="pre";var o="prerelease"}for(var s in n)if(("major"===s||"minor"===s||"patch"===s)&&n[s]!==r[s])return i+s;return o},t.compareIdentifiers=ee;var Z=/^[0-9]+$/;function ee(e,t){var n=Z.test(e),r=Z.test(t);return n&&r&&(e=+e,t=+t),e===t?0:n&&!r?-1:r&&!n?1:e<t?-1:1}function te(e,t,n){return new J(e,n).compare(new J(t,n))}function ne(e,t,n){return te(e,t,n)>0}function re(e,t,n){return te(e,t,n)<0}function ie(e,t,n){return 0===te(e,t,n)}function oe(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 ce(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 ie(e,n,r);case"!=":return oe(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 le(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof le){if(e.loose===!!t.loose)return e;e=e.value}if(!(this instanceof le))return new le(e,t);e=e.trim().split(/\s+/).join(" "),n("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===ue?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 J(e,t).major},t.minor=function(e,t){return new J(e,t).minor},t.patch=function(e,t){return new J(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=ie,t.neq=oe,t.gte=se,t.lte=ae,t.cmp=ce,t.Comparator=le;var ue={};function de(e,t){if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),e instanceof de)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new de(e.raw,t);if(e instanceof le)return new de(e.value,t);if(!(this instanceof de))return new de(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 pe(e){return!e||"x"===e.toLowerCase()||"*"===e}function he(e,t,n,r,i,o,s,a,c,l,u,d,p){return((t=pe(n)?"":pe(r)?">="+n+".0.0":pe(i)?">="+n+"."+r+".0":">="+t)+" "+(a=pe(c)?"":pe(l)?"<"+(+c+1)+".0.0":pe(u)?"<"+c+"."+(+l+1)+".0":d?"<="+c+"."+l+"."+u+"-"+d:"<="+a)).trim()}function fe(e,t,r){for(var i=0;i<e.length;i++)if(!e[i].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(i=0;i<e.length;i++)if(n(e[i].semver),e[i].semver!==ue&&e[i].semver.prerelease.length>0){var o=e[i].semver;if(o.major===t.major&&o.minor===t.minor&&o.patch===t.patch)return!0}return!1}return!0}function me(e,t,n){try{t=new de(t,n)}catch(e){return!1}return t.test(e)}function ge(e,t,n,r){var i,o,s,a,c;switch(e=new J(e,r),t=new de(t,r),n){case">":i=ne,o=ae,s=re,a=">",c=">=";break;case"<":i=re,o=se,s=ne,a="<",c="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(me(e,t,r))return!1;for(var l=0;l<t.set.length;++l){var u=t.set[l],d=null,p=null;if(u.forEach((function(e){e.semver===ue&&(e=new le(">=0.0.0")),d=d||e,p=p||e,i(e.semver,d.semver,r)?d=e:s(e.semver,p.semver,r)&&(p=e)})),d.operator===a||d.operator===c)return!1;if((!p.operator||p.operator===a)&&o(e,p.semver))return!1;if(p.operator===c&&s(e,p.semver))return!1}return!0}le.prototype.parse=function(e){var t=this.options.loose?a[H]:a[V],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 J(n[2],this.options.loose):this.semver=ue},le.prototype.toString=function(){return this.value},le.prototype.test=function(e){return n("Comparator.test",e,this.options.loose),this.semver===ue||("string"==typeof e&&(e=new J(e,this.options)),ce(e,this.operator,this.semver,this.options))},le.prototype.intersects=function(e,t){if(!(e instanceof le))throw new TypeError("a Comparator is required");var n;if(t&&"object"==typeof t||(t={loose:!!t,includePrerelease:!1}),""===this.operator)return n=new de(e.value,t),me(this.value,n,t);if(""===e.operator)return n=new de(this.value,t),me(e.semver,n,t);var r=!(">="!==this.operator&&">"!==this.operator||">="!==e.operator&&">"!==e.operator),i=!("<="!==this.operator&&"<"!==this.operator||"<="!==e.operator&&"<"!==e.operator),o=this.semver.version===e.semver.version,s=!(">="!==this.operator&&"<="!==this.operator||">="!==e.operator&&"<="!==e.operator),a=ce(this.semver,"<",e.semver,t)&&(">="===this.operator||">"===this.operator)&&("<="===e.operator||"<"===e.operator),c=ce(this.semver,">",e.semver,t)&&("<="===this.operator||"<"===this.operator)&&(">="===e.operator||">"===e.operator);return r||i||o&&s||a||c},t.Range=de,de.prototype.format=function(){return this.range=this.set.map((function(e){return e.join(" ").trim()})).join("||").trim(),this.range},de.prototype.toString=function(){return this.range},de.prototype.parseRange=function(e){var t=this.options.loose,r=t?a[K]:a[W];e=e.replace(r,he),n("hyphen replace",e),e=e.replace(a[$],"$1$2$3"),n("comparator trim",e,a[$]),e=(e=e.replace(a[M],"$1~")).replace(a[U],"$1^");var i=t?a[H]:a[V],o=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[G]:a[z];return e.replace(r,(function(t,r,i,o,s){var a;return n("caret",e,t,r,i,o,s),pe(r)?a="":pe(i)?a=">="+r+".0.0 <"+(+r+1)+".0.0":pe(o)?a="0"===r?">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":">="+r+"."+i+".0 <"+(+r+1)+".0.0":s?(n("replaceCaret pr",s),a="0"===r?"0"===i?">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+i+"."+(+o+1):">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+o+"-"+s+" <"+(+r+1)+".0.0"):(n("no pr"),a="0"===r?"0"===i?">="+r+"."+i+"."+o+" <"+r+"."+i+"."+(+o+1):">="+r+"."+i+"."+o+" <"+r+"."+(+i+1)+".0":">="+r+"."+i+"."+o+" <"+(+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[q]:a[F];return e.replace(r,(function(t,r,i,o,s){var a;return n("tilde",e,t,r,i,o,s),pe(r)?a="":pe(i)?a=">="+r+".0.0 <"+(+r+1)+".0.0":pe(o)?a=">="+r+"."+i+".0 <"+r+"."+(+i+1)+".0":s?(n("replaceTilde pr",s),a=">="+r+"."+i+"."+o+"-"+s+" <"+r+"."+(+i+1)+".0"):a=">="+r+"."+i+"."+o+" <"+r+"."+(+i+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[k];return e.replace(r,(function(t,r,i,o,s,a){n("xRange",e,t,r,i,o,s,a);var c=pe(i),l=c||pe(o),u=l||pe(s);return"="===r&&u&&(r=""),c?t=">"===r||"<"===r?"<0.0.0":"*":r&&u?(l&&(o=0),s=0,">"===r?(r=">=",l?(i=+i+1,o=0,s=0):(o=+o+1,s=0)):"<="===r&&(r="<",l?i=+i+1:o=+o+1),t=r+i+"."+o+"."+s):l?t=">="+i+".0.0 <"+(+i+1)+".0.0":u&&(t=">="+i+"."+o+".0 <"+i+"."+(+o+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[Q],"")}(e,t),n("stars",e),e}(e,this.options)}),this).join(" ").split(/\s+/);return this.options.loose&&(o=o.filter((function(e){return!!e.match(i)}))),o.map((function(e){return new le(e,this.options)}),this)},de.prototype.intersects=function(e,t){if(!(e instanceof de))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 de(e,t).set.map((function(e){return e.map((function(e){return e.value})).join(" ").trim().split(" ")}))},de.prototype.test=function(e){if(!e)return!1;"string"==typeof e&&(e=new J(e,this.options));for(var t=0;t<this.set.length;t++)if(fe(this.set[t],e,this.options))return!0;return!1},t.satisfies=me,t.maxSatisfying=function(e,t,n){var r=null,i=null;try{var o=new de(t,n)}catch(e){return null}return e.forEach((function(e){o.test(e)&&(r&&-1!==i.compare(e)||(i=new J(r=e,n)))})),r},t.minSatisfying=function(e,t,n){var r=null,i=null;try{var o=new de(t,n)}catch(e){return null}return e.forEach((function(e){o.test(e)&&(r&&1!==i.compare(e)||(i=new J(r=e,n)))})),r},t.minVersion=function(e,t){e=new de(e,t);var n=new J("0.0.0");if(e.test(n))return n;if(n=new J("0.0.0-0"),e.test(n))return n;n=null;for(var r=0;r<e.set.length;++r)e.set[r].forEach((function(e){var t=new J(e.semver.version);switch(e.operator){case">":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 de(e,t).range||"*"}catch(e){return null}},t.ltr=function(e,t,n){return ge(e,t,"<",n)},t.gtr=function(e,t,n){return ge(e,t,">",n)},t.outside=ge,t.prerelease=function(e,t){var n=Y(e,t);return n&&n.prerelease.length?n.prerelease:null},t.intersects=function(e,t,n){return e=new de(e,n),t=new de(t,n),e.intersects(t)},t.coerce=function(e){if(e instanceof J)return e;if("string"!=typeof e)return null;var t=e.match(a[L]);return null==t?null:Y(t[1]+"."+(t[2]||"0")+"."+(t[3]||"0"))}},2037:(e,t,n)=>{"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0});const i=n(4590);t.ErrorCodes=i.ErrorCodes,t.ResponseError=i.ResponseError,t.CancellationToken=i.CancellationToken,t.CancellationTokenSource=i.CancellationTokenSource,t.Disposable=i.Disposable,t.Event=i.Event,t.Emitter=i.Emitter,t.Trace=i.Trace,t.TraceFormat=i.TraceFormat,t.SetTraceNotification=i.SetTraceNotification,t.LogTraceNotification=i.LogTraceNotification,t.RequestType=i.RequestType,t.RequestType0=i.RequestType0,t.NotificationType=i.NotificationType,t.NotificationType0=i.NotificationType0,t.MessageReader=i.MessageReader,t.MessageWriter=i.MessageWriter,t.ConnectionStrategy=i.ConnectionStrategy,t.StreamMessageReader=i.StreamMessageReader,t.StreamMessageWriter=i.StreamMessageWriter,t.IPCMessageReader=i.IPCMessageReader,t.IPCMessageWriter=i.IPCMessageWriter,t.createClientPipeTransport=i.createClientPipeTransport,t.createServerPipeTransport=i.createServerPipeTransport,t.generateRandomPipeName=i.generateRandomPipeName,t.createClientSocketTransport=i.createClientSocketTransport,t.createServerSocketTransport=i.createServerSocketTransport,r(n(7806)),r(n(1180)),t.createProtocolConnection=function(e,t,n,r){return i.createMessageConnection(e,t,n,r)}},2508:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(4590);(t.DocumentColorRequest||(t.DocumentColorRequest={})).type=new r.RequestType("textDocument/documentColor"),(t.ColorPresentationRequest||(t.ColorPresentationRequest={})).type=new r.RequestType("textDocument/colorPresentation")},3832:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(4590);(t.ConfigurationRequest||(t.ConfigurationRequest={})).type=new r.RequestType("workspace/configuration")},9742:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(4590);(t.DeclarationRequest||(t.DeclarationRequest={})).type=new r.RequestType("textDocument/declaration")},4310:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(4590);var i;(i=t.FoldingRangeKind||(t.FoldingRangeKind={})).Comment="comment",i.Imports="imports",i.Region="region",(t.FoldingRangeRequest||(t.FoldingRangeRequest={})).type=new r.RequestType("textDocument/foldingRange")},1610:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(4590);(t.ImplementationRequest||(t.ImplementationRequest={})).type=new r.RequestType("textDocument/implementation")},1180:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(818),i=n(4590),o=n(1610);t.ImplementationRequest=o.ImplementationRequest;const s=n(9609);t.TypeDefinitionRequest=s.TypeDefinitionRequest;const a=n(9838);t.WorkspaceFoldersRequest=a.WorkspaceFoldersRequest,t.DidChangeWorkspaceFoldersNotification=a.DidChangeWorkspaceFoldersNotification;const c=n(3832);t.ConfigurationRequest=c.ConfigurationRequest;const l=n(2508);t.DocumentColorRequest=l.DocumentColorRequest,t.ColorPresentationRequest=l.ColorPresentationRequest;const u=n(4310);t.FoldingRangeRequest=u.FoldingRangeRequest;const d=n(9742);var p,h,f,m,g,y,b;t.DeclarationRequest=d.DeclarationRequest,(t.DocumentFilter||(t.DocumentFilter={})).is=function(e){let t=e;return r.string(t.language)||r.string(t.scheme)||r.string(t.pattern)},(t.RegistrationRequest||(t.RegistrationRequest={})).type=new i.RequestType("client/registerCapability"),(t.UnregistrationRequest||(t.UnregistrationRequest={})).type=new i.RequestType("client/unregisterCapability"),(b=t.ResourceOperationKind||(t.ResourceOperationKind={})).Create="create",b.Rename="rename",b.Delete="delete",(y=t.FailureHandlingKind||(t.FailureHandlingKind={})).Abort="abort",y.Transactional="transactional",y.TextOnlyTransactional="textOnlyTransactional",y.Undo="undo",(g=t.TextDocumentSyncKind||(t.TextDocumentSyncKind={})).None=0,g.Full=1,g.Incremental=2,(t.InitializeRequest||(t.InitializeRequest={})).type=new i.RequestType("initialize"),(t.InitializeError||(t.InitializeError={})).unknownProtocolVersion=1,(t.InitializedNotification||(t.InitializedNotification={})).type=new i.NotificationType("initialized"),(t.ShutdownRequest||(t.ShutdownRequest={})).type=new i.RequestType0("shutdown"),(t.ExitNotification||(t.ExitNotification={})).type=new i.NotificationType0("exit"),(t.DidChangeConfigurationNotification||(t.DidChangeConfigurationNotification={})).type=new i.NotificationType("workspace/didChangeConfiguration"),(m=t.MessageType||(t.MessageType={})).Error=1,m.Warning=2,m.Info=3,m.Log=4,(t.ShowMessageNotification||(t.ShowMessageNotification={})).type=new i.NotificationType("window/showMessage"),(t.ShowMessageRequest||(t.ShowMessageRequest={})).type=new i.RequestType("window/showMessageRequest"),(t.LogMessageNotification||(t.LogMessageNotification={})).type=new i.NotificationType("window/logMessage"),(t.TelemetryEventNotification||(t.TelemetryEventNotification={})).type=new i.NotificationType("telemetry/event"),(t.DidOpenTextDocumentNotification||(t.DidOpenTextDocumentNotification={})).type=new i.NotificationType("textDocument/didOpen"),(t.DidChangeTextDocumentNotification||(t.DidChangeTextDocumentNotification={})).type=new i.NotificationType("textDocument/didChange"),(t.DidCloseTextDocumentNotification||(t.DidCloseTextDocumentNotification={})).type=new i.NotificationType("textDocument/didClose"),(t.DidSaveTextDocumentNotification||(t.DidSaveTextDocumentNotification={})).type=new i.NotificationType("textDocument/didSave"),(t.WillSaveTextDocumentNotification||(t.WillSaveTextDocumentNotification={})).type=new i.NotificationType("textDocument/willSave"),(t.WillSaveTextDocumentWaitUntilRequest||(t.WillSaveTextDocumentWaitUntilRequest={})).type=new i.RequestType("textDocument/willSaveWaitUntil"),(t.DidChangeWatchedFilesNotification||(t.DidChangeWatchedFilesNotification={})).type=new i.NotificationType("workspace/didChangeWatchedFiles"),(f=t.FileChangeType||(t.FileChangeType={})).Created=1,f.Changed=2,f.Deleted=3,(h=t.WatchKind||(t.WatchKind={})).Create=1,h.Change=2,h.Delete=4,(t.PublishDiagnosticsNotification||(t.PublishDiagnosticsNotification={})).type=new i.NotificationType("textDocument/publishDiagnostics"),(p=t.CompletionTriggerKind||(t.CompletionTriggerKind={})).Invoked=1,p.TriggerCharacter=2,p.TriggerForIncompleteCompletions=3,(t.CompletionRequest||(t.CompletionRequest={})).type=new i.RequestType("textDocument/completion"),(t.CompletionResolveRequest||(t.CompletionResolveRequest={})).type=new i.RequestType("completionItem/resolve"),(t.HoverRequest||(t.HoverRequest={})).type=new i.RequestType("textDocument/hover"),(t.SignatureHelpRequest||(t.SignatureHelpRequest={})).type=new i.RequestType("textDocument/signatureHelp"),(t.DefinitionRequest||(t.DefinitionRequest={})).type=new i.RequestType("textDocument/definition"),(t.ReferencesRequest||(t.ReferencesRequest={})).type=new i.RequestType("textDocument/references"),(t.DocumentHighlightRequest||(t.DocumentHighlightRequest={})).type=new i.RequestType("textDocument/documentHighlight"),(t.DocumentSymbolRequest||(t.DocumentSymbolRequest={})).type=new i.RequestType("textDocument/documentSymbol"),(t.WorkspaceSymbolRequest||(t.WorkspaceSymbolRequest={})).type=new i.RequestType("workspace/symbol"),(t.CodeActionRequest||(t.CodeActionRequest={})).type=new i.RequestType("textDocument/codeAction"),(t.CodeLensRequest||(t.CodeLensRequest={})).type=new i.RequestType("textDocument/codeLens"),(t.CodeLensResolveRequest||(t.CodeLensResolveRequest={})).type=new i.RequestType("codeLens/resolve"),(t.DocumentFormattingRequest||(t.DocumentFormattingRequest={})).type=new i.RequestType("textDocument/formatting"),(t.DocumentRangeFormattingRequest||(t.DocumentRangeFormattingRequest={})).type=new i.RequestType("textDocument/rangeFormatting"),(t.DocumentOnTypeFormattingRequest||(t.DocumentOnTypeFormattingRequest={})).type=new i.RequestType("textDocument/onTypeFormatting"),(t.RenameRequest||(t.RenameRequest={})).type=new i.RequestType("textDocument/rename"),(t.PrepareRenameRequest||(t.PrepareRenameRequest={})).type=new i.RequestType("textDocument/prepareRename"),(t.DocumentLinkRequest||(t.DocumentLinkRequest={})).type=new i.RequestType("textDocument/documentLink"),(t.DocumentLinkResolveRequest||(t.DocumentLinkResolveRequest={})).type=new i.RequestType("documentLink/resolve"),(t.ExecuteCommandRequest||(t.ExecuteCommandRequest={})).type=new i.RequestType("workspace/executeCommand"),(t.ApplyWorkspaceEditRequest||(t.ApplyWorkspaceEditRequest={})).type=new i.RequestType("workspace/applyEdit")},9609:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(4590);(t.TypeDefinitionRequest||(t.TypeDefinitionRequest={})).type=new r.RequestType("textDocument/typeDefinition")},9838:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(4590);(t.WorkspaceFoldersRequest||(t.WorkspaceFoldersRequest={})).type=new r.RequestType0("workspace/workspaceFolders"),(t.DidChangeWorkspaceFoldersNotification||(t.DidChangeWorkspaceFoldersNotification={})).type=new r.NotificationType("workspace/didChangeWorkspaceFolders")},818:(e,t)=>{"use strict";function n(e){return"string"==typeof e||e instanceof String}function r(e){return"function"==typeof e}function i(e){return Array.isArray(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.boolean=function(e){return!0===e||!1===e},t.string=n,t.number=function(e){return"number"==typeof e||e instanceof Number},t.error=function(e){return e instanceof Error},t.func=r,t.array=i,t.stringArray=function(e){return i(e)&&e.every((e=>n(e)))},t.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)},t.thenable=function(e){return e&&r(e.then)}},7806:(e,t,n)=>{"use strict";var r,i,o,s,a,c,l,u,d,p,h,f,m,g,y,b,v,S,w;n.r(t),n.d(t,{CodeAction:()=>G,CodeActionContext:()=>z,CodeActionKind:()=>U,CodeLens:()=>H,Color:()=>a,ColorInformation:()=>c,ColorPresentation:()=>l,Command:()=>m,CompletionItem:()=>P,CompletionItemKind:()=>R,CompletionList:()=>O,CreateFile:()=>b,DeleteFile:()=>S,Diagnostic:()=>f,DiagnosticRelatedInformation:()=>p,DiagnosticSeverity:()=>h,DocumentHighlight:()=>j,DocumentHighlightKind:()=>L,DocumentLink:()=>W,DocumentSymbol:()=>$,EOL:()=>X,FoldingRange:()=>d,FoldingRangeKind:()=>u,FormattingOptions:()=>V,Hover:()=>A,InsertTextFormat:()=>I,Location:()=>o,LocationLink:()=>s,MarkedString:()=>D,MarkupContent:()=>x,MarkupKind:()=>_,ParameterInformation:()=>k,Position:()=>r,Range:()=>i,RenameFile:()=>v,SignatureInformation:()=>N,SymbolInformation:()=>F,SymbolKind:()=>M,TextDocument:()=>K,TextDocumentEdit:()=>y,TextDocumentIdentifier:()=>C,TextDocumentItem:()=>E,TextDocumentSaveReason:()=>Q,TextEdit:()=>g,VersionedTextDocumentIdentifier:()=>T,WorkspaceChange:()=>B,WorkspaceEdit:()=>w}),function(e){e.create=function(e,t){return{line:e,character:t}},e.is=function(e){var t=e;return Y.objectLiteral(t)&&Y.number(t.line)&&Y.number(t.character)}}(r||(r={})),function(e){e.create=function(e,t,n,i){if(Y.number(e)&&Y.number(t)&&Y.number(n)&&Y.number(i))return{start:r.create(e,t),end:r.create(n,i)};if(r.is(e)&&r.is(t))return{start:e,end:t};throw new Error("Range#create called with invalid arguments["+e+", "+t+", "+n+", "+i+"]")},e.is=function(e){var t=e;return Y.objectLiteral(t)&&r.is(t.start)&&r.is(t.end)}}(i||(i={})),function(e){e.create=function(e,t){return{uri:e,range:t}},e.is=function(e){var t=e;return Y.defined(t)&&i.is(t.range)&&(Y.string(t.uri)||Y.undefined(t.uri))}}(o||(o={})),function(e){e.create=function(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}},e.is=function(e){var t=e;return Y.defined(t)&&i.is(t.targetRange)&&Y.string(t.targetUri)&&(i.is(t.targetSelectionRange)||Y.undefined(t.targetSelectionRange))&&(i.is(t.originSelectionRange)||Y.undefined(t.originSelectionRange))}}(s||(s={})),function(e){e.create=function(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}},e.is=function(e){var t=e;return Y.number(t.red)&&Y.number(t.green)&&Y.number(t.blue)&&Y.number(t.alpha)}}(a||(a={})),function(e){e.create=function(e,t){return{range:e,color:t}},e.is=function(e){var t=e;return i.is(t.range)&&a.is(t.color)}}(c||(c={})),function(e){e.create=function(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}},e.is=function(e){var t=e;return Y.string(t.label)&&(Y.undefined(t.textEdit)||g.is(t))&&(Y.undefined(t.additionalTextEdits)||Y.typedArray(t.additionalTextEdits,g.is))}}(l||(l={})),function(e){e.Comment="comment",e.Imports="imports",e.Region="region"}(u||(u={})),function(e){e.create=function(e,t,n,r,i){var o={startLine:e,endLine:t};return Y.defined(n)&&(o.startCharacter=n),Y.defined(r)&&(o.endCharacter=r),Y.defined(i)&&(o.kind=i),o},e.is=function(e){var t=e;return Y.number(t.startLine)&&Y.number(t.startLine)&&(Y.undefined(t.startCharacter)||Y.number(t.startCharacter))&&(Y.undefined(t.endCharacter)||Y.number(t.endCharacter))&&(Y.undefined(t.kind)||Y.string(t.kind))}}(d||(d={})),function(e){e.create=function(e,t){return{location:e,message:t}},e.is=function(e){var t=e;return Y.defined(t)&&o.is(t.location)&&Y.string(t.message)}}(p||(p={})),function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4}(h||(h={})),function(e){e.create=function(e,t,n,r,i,o){var s={range:e,message:t};return Y.defined(n)&&(s.severity=n),Y.defined(r)&&(s.code=r),Y.defined(i)&&(s.source=i),Y.defined(o)&&(s.relatedInformation=o),s},e.is=function(e){var t=e;return Y.defined(t)&&i.is(t.range)&&Y.string(t.message)&&(Y.number(t.severity)||Y.undefined(t.severity))&&(Y.number(t.code)||Y.string(t.code)||Y.undefined(t.code))&&(Y.string(t.source)||Y.undefined(t.source))&&(Y.undefined(t.relatedInformation)||Y.typedArray(t.relatedInformation,p.is))}}(f||(f={})),function(e){e.create=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i={title:e,command:t};return Y.defined(n)&&n.length>0&&(i.arguments=n),i},e.is=function(e){var t=e;return Y.defined(t)&&Y.string(t.title)&&Y.string(t.command)}}(m||(m={})),function(e){e.replace=function(e,t){return{range:e,newText:t}},e.insert=function(e,t){return{range:{start:e,end:e},newText:t}},e.del=function(e){return{range:e,newText:""}},e.is=function(e){var t=e;return Y.objectLiteral(t)&&Y.string(t.newText)&&i.is(t.range)}}(g||(g={})),function(e){e.create=function(e,t){return{textDocument:e,edits:t}},e.is=function(e){var t=e;return Y.defined(t)&&T.is(t.textDocument)&&Array.isArray(t.edits)}}(y||(y={})),function(e){e.create=function(e,t){var n={kind:"create",uri:e};return void 0===t||void 0===t.overwrite&&void 0===t.ignoreIfExists||(n.options=t),n},e.is=function(e){var t=e;return t&&"create"===t.kind&&Y.string(t.uri)&&(void 0===t.options||(void 0===t.options.overwrite||Y.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Y.boolean(t.options.ignoreIfExists)))}}(b||(b={})),function(e){e.create=function(e,t,n){var r={kind:"rename",oldUri:e,newUri:t};return void 0===n||void 0===n.overwrite&&void 0===n.ignoreIfExists||(r.options=n),r},e.is=function(e){var t=e;return t&&"rename"===t.kind&&Y.string(t.oldUri)&&Y.string(t.newUri)&&(void 0===t.options||(void 0===t.options.overwrite||Y.boolean(t.options.overwrite))&&(void 0===t.options.ignoreIfExists||Y.boolean(t.options.ignoreIfExists)))}}(v||(v={})),function(e){e.create=function(e,t){var n={kind:"delete",uri:e};return void 0===t||void 0===t.recursive&&void 0===t.ignoreIfNotExists||(n.options=t),n},e.is=function(e){var t=e;return t&&"delete"===t.kind&&Y.string(t.uri)&&(void 0===t.options||(void 0===t.options.recursive||Y.boolean(t.options.recursive))&&(void 0===t.options.ignoreIfNotExists||Y.boolean(t.options.ignoreIfNotExists)))}}(S||(S={})),function(e){e.is=function(e){var t=e;return t&&(void 0!==t.changes||void 0!==t.documentChanges)&&(void 0===t.documentChanges||t.documentChanges.every((function(e){return Y.string(e.kind)?b.is(e)||v.is(e)||S.is(e):y.is(e)})))}}(w||(w={}));var C,T,E,_,x,R,I,P,O,D,A,k,N,L,j,M,F,q=function(){function e(e){this.edits=e}return e.prototype.insert=function(e,t){this.edits.push(g.insert(e,t))},e.prototype.replace=function(e,t){this.edits.push(g.replace(e,t))},e.prototype.delete=function(e){this.edits.push(g.del(e))},e.prototype.add=function(e){this.edits.push(e)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e}(),B=function(){function e(e){var t=this;this._textEditChanges=Object.create(null),e&&(this._workspaceEdit=e,e.documentChanges?e.documentChanges.forEach((function(e){if(y.is(e)){var n=new q(e.edits);t._textEditChanges[e.textDocument.uri]=n}})):e.changes&&Object.keys(e.changes).forEach((function(n){var r=new q(e.changes[n]);t._textEditChanges[n]=r})))}return Object.defineProperty(e.prototype,"edit",{get:function(){return this._workspaceEdit},enumerable:!0,configurable:!0}),e.prototype.getTextEditChange=function(e){if(T.is(e)){if(this._workspaceEdit||(this._workspaceEdit={documentChanges:[]}),!this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.");var t=e;if(!(r=this._textEditChanges[t.uri])){var n={textDocument:t,edits:i=[]};this._workspaceEdit.documentChanges.push(n),r=new q(i),this._textEditChanges[t.uri]=r}return r}if(this._workspaceEdit||(this._workspaceEdit={changes:Object.create(null)}),!this._workspaceEdit.changes)throw new Error("Workspace edit is not configured for normal text edit changes.");var r;if(!(r=this._textEditChanges[e])){var i=[];this._workspaceEdit.changes[e]=i,r=new q(i),this._textEditChanges[e]=r}return r},e.prototype.createFile=function(e,t){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(b.create(e,t))},e.prototype.renameFile=function(e,t,n){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(v.create(e,t,n))},e.prototype.deleteFile=function(e,t){this.checkDocumentChanges(),this._workspaceEdit.documentChanges.push(S.create(e,t))},e.prototype.checkDocumentChanges=function(){if(!this._workspaceEdit||!this._workspaceEdit.documentChanges)throw new Error("Workspace edit is not configured for document changes.")},e}();!function(e){e.create=function(e){return{uri:e}},e.is=function(e){var t=e;return Y.defined(t)&&Y.string(t.uri)}}(C||(C={})),function(e){e.create=function(e,t){return{uri:e,version:t}},e.is=function(e){var t=e;return Y.defined(t)&&Y.string(t.uri)&&(null===t.version||Y.number(t.version))}}(T||(T={})),function(e){e.create=function(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}},e.is=function(e){var t=e;return Y.defined(t)&&Y.string(t.uri)&&Y.string(t.languageId)&&Y.number(t.version)&&Y.string(t.text)}}(E||(E={})),function(e){e.PlainText="plaintext",e.Markdown="markdown"}(_||(_={})),function(e){e.is=function(t){var n=t;return n===e.PlainText||n===e.Markdown}}(_||(_={})),function(e){e.is=function(e){var t=e;return Y.objectLiteral(e)&&_.is(t.kind)&&Y.string(t.value)}}(x||(x={})),function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25}(R||(R={})),function(e){e.PlainText=1,e.Snippet=2}(I||(I={})),function(e){e.create=function(e){return{label:e}}}(P||(P={})),function(e){e.create=function(e,t){return{items:e||[],isIncomplete:!!t}}}(O||(O={})),function(e){e.fromPlainText=function(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")},e.is=function(e){var t=e;return Y.string(t)||Y.objectLiteral(t)&&Y.string(t.language)&&Y.string(t.value)}}(D||(D={})),function(e){e.is=function(e){var t=e;return!!t&&Y.objectLiteral(t)&&(x.is(t.contents)||D.is(t.contents)||Y.typedArray(t.contents,D.is))&&(void 0===e.range||i.is(e.range))}}(A||(A={})),function(e){e.create=function(e,t){return t?{label:e,documentation:t}:{label:e}}}(k||(k={})),function(e){e.create=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i={label:e};return Y.defined(t)&&(i.documentation=t),Y.defined(n)?i.parameters=n:i.parameters=[],i}}(N||(N={})),function(e){e.Text=1,e.Read=2,e.Write=3}(L||(L={})),function(e){e.create=function(e,t){var n={range:e};return Y.number(t)&&(n.kind=t),n}}(j||(j={})),function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26}(M||(M={})),function(e){e.create=function(e,t,n,r,i){var o={name:e,kind:t,location:{uri:r,range:n}};return i&&(o.containerName=i),o}}(F||(F={}));var U,z,G,H,V,$=function(){};!function(e){e.create=function(e,t,n,r,i,o){var s={name:e,detail:t,kind:n,range:r,selectionRange:i};return void 0!==o&&(s.children=o),s},e.is=function(e){var t=e;return t&&Y.string(t.name)&&Y.number(t.kind)&&i.is(t.range)&&i.is(t.selectionRange)&&(void 0===t.detail||Y.string(t.detail))&&(void 0===t.deprecated||Y.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))}}($||($={})),function(e){e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports"}(U||(U={})),function(e){e.create=function(e,t){var n={diagnostics:e};return null!=t&&(n.only=t),n},e.is=function(e){var t=e;return Y.defined(t)&&Y.typedArray(t.diagnostics,f.is)&&(void 0===t.only||Y.typedArray(t.only,Y.string))}}(z||(z={})),function(e){e.create=function(e,t,n){var r={title:e};return m.is(t)?r.command=t:r.edit=t,void 0!==n&&(r.kind=n),r},e.is=function(e){var t=e;return t&&Y.string(t.title)&&(void 0===t.diagnostics||Y.typedArray(t.diagnostics,f.is))&&(void 0===t.kind||Y.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||m.is(t.command))&&(void 0===t.edit||w.is(t.edit))}}(G||(G={})),function(e){e.create=function(e,t){var n={range:e};return Y.defined(t)&&(n.data=t),n},e.is=function(e){var t=e;return Y.defined(t)&&i.is(t.range)&&(Y.undefined(t.command)||m.is(t.command))}}(H||(H={})),function(e){e.create=function(e,t){return{tabSize:e,insertSpaces:t}},e.is=function(e){var t=e;return Y.defined(t)&&Y.number(t.tabSize)&&Y.boolean(t.insertSpaces)}}(V||(V={}));var W=function(){};!function(e){e.create=function(e,t,n){return{range:e,target:t,data:n}},e.is=function(e){var t=e;return Y.defined(t)&&i.is(t.range)&&(Y.undefined(t.target)||Y.string(t.target))}}(W||(W={}));var K,Q,X=["\n","\r\n","\r"];!function(e){function t(e,n){if(e.length<=1)return e;var r=e.length/2|0,i=e.slice(0,r),o=e.slice(r);t(i,n),t(o,n);for(var s=0,a=0,c=0;s<i.length&&a<o.length;){var l=n(i[s],o[a]);e[c++]=l<=0?i[s++]:o[a++]}for(;s<i.length;)e[c++]=i[s++];for(;a<o.length;)e[c++]=o[a++];return e}e.create=function(e,t,n,r){return new J(e,t,n,r)},e.is=function(e){var t=e;return!!(Y.defined(t)&&Y.string(t.uri)&&(Y.undefined(t.languageId)||Y.string(t.languageId))&&Y.number(t.lineCount)&&Y.func(t.getText)&&Y.func(t.positionAt)&&Y.func(t.offsetAt))},e.applyEdits=function(e,n){for(var r=e.getText(),i=t(n,(function(e,t){var n=e.range.start.line-t.range.start.line;return 0===n?e.range.start.character-t.range.start.character:n})),o=r.length,s=i.length-1;s>=0;s--){var a=i[s],c=e.offsetAt(a.range.start),l=e.offsetAt(a.range.end);if(!(l<=o))throw new Error("Overlapping edit");r=r.substring(0,c)+a.newText+r.substring(l,r.length),o=c}return r}}(K||(K={})),function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3}(Q||(Q={}));var Y,J=function(){function e(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=null}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!0,configurable:!0}),e.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content},e.prototype.update=function(e,t){this._content=e.text,this._version=t,this._lineOffsets=null},e.prototype.getLineOffsets=function(){if(null===this._lineOffsets){for(var e=[],t=this._content,n=!0,r=0;r<t.length;r++){n&&(e.push(r),n=!1);var i=t.charAt(r);n="\r"===i||"\n"===i,"\r"===i&&r+1<t.length&&"\n"===t.charAt(r+1)&&r++}n&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},e.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),n=0,i=t.length;if(0===i)return r.create(0,e);for(;n<i;){var o=Math.floor((n+i)/2);t[o]>e?i=o:n=o+1}var s=n-1;return r.create(s,e-t[s])},e.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var n=t[e.line],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),n)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!0,configurable:!0}),e}();!function(e){var t=Object.prototype.toString;e.defined=function(e){return void 0!==e},e.undefined=function(e){return void 0===e},e.boolean=function(e){return!0===e||!1===e},e.string=function(e){return"[object String]"===t.call(e)},e.number=function(e){return"[object Number]"===t.call(e)},e.func=function(e){return"[object Function]"===t.call(e)},e.objectLiteral=function(e){return null!==e&&"object"==typeof e},e.typedArray=function(e,t){return Array.isArray(e)&&e.every(t)}}(Y||(Y={}))},4200:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i,o,s,a,c,l=n(6928),u=n(9896),d=Object.prototype.toString;function p(e){return void 0!==e}function h(e){return"[object String]"===d.call(e)}function f(e){return JSON.parse(u.readFileSync(e,"utf8"))}function m(e,t){return c&&(e="["+e.replace(/[aouei]/g,"$&$&")+"]"),0===t.length?e:e.replace(/\{(\d+)\}/g,(function(e,n){var r=n[0],i=t[r],o=e;return"string"==typeof i?o=i:"number"!=typeof i&&"boolean"!=typeof i&&null!=i||(o=String(i)),o}))}function g(e){return function(t,n){for(var r,i=[],o=2;o<arguments.length;o++)i[o-2]=arguments[o];return r=t,"[object Number]"===d.call(r)?t>=e.length?void console.error("Broken localize call found. Index out of bounds. Stacktrace is\n: "+new Error("").stack):m(e[t],i):h(n)?(console.warn("Message "+n+" didn't get externalized correctly."),m(n,i)):void console.error("Broken localize call found. Stacktrace is\n: "+new Error("").stack)}}function y(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return m(t,n)}function b(e,t){return s[e]=t,t}function v(e){try{return function(e){var t=f(l.join(e,"nls.metadata.json")),n=Object.create(null);for(var r in t){var i=t[r];n[r]=i.messages}return n}(e)}catch(e){return void console.log("Generating default bundle from meta data failed.",e)}}function S(e,t){var n;if(!0===a.languagePackSupport&&void 0!==a.cacheRoot&&void 0!==a.languagePackId&&void 0!==a.translationsConfigFile&&void 0!==a.translationsConfig)try{n=function(e,t){var n,r,i,o=l.join(a.cacheRoot,e.id+"-"+e.hash+".json"),s=!1,c=!1;try{return n=JSON.parse(u.readFileSync(o,{encoding:"utf8",flag:"r"})),r=o,i=new Date,u.utimes(r,i,i,(function(){})),n}catch(e){if("ENOENT"===e.code)c=!0;else{if(!(e instanceof SyntaxError))throw e;console.log("Syntax error parsing message bundle: "+e.message+"."),u.unlink(o,(function(e){e&&console.error("Deleting corrupted bundle "+o+" failed.")})),s=!0}}if(n=function(e,t){var n=a.translationsConfig[e.id];if(n){var r=f(n).contents,i=f(l.join(t,"nls.metadata.json")),o=Object.create(null);for(var s in i){var c=i[s],u=r[e.outDir+"/"+s];if(u){for(var d=[],p=0;p<c.keys.length;p++){var m=c.keys[p],g=u[h(m)?m:m.key];void 0===g&&(g=c.messages[p]),d.push(g)}o[s]=d}else o[s]=c.messages}return o}}(e,t),!n||s)return n;if(c)try{u.writeFileSync(o,JSON.stringify(n),{encoding:"utf8",flag:"wx"})}catch(e){if("EEXIST"===e.code)return n;throw e}return n}(e,t)}catch(e){console.log("Load or create bundle failed ",e)}if(!n){if(a.languagePackSupport)return v(t);var r=function(e){for(var t=a.language;t;){var n=l.join(e,"nls.bundle."+t+".json");if(u.existsSync(n))return n;var r=t.lastIndexOf("-");t=r>0?t.substring(0,r):void 0}if(void 0===t&&(n=l.join(e,"nls.bundle.json"),u.existsSync(n)))return n}(t);if(r)try{return f(r)}catch(e){console.log("Loading in the box message bundle failed.",e)}n=v(t)}return n}function w(e){if(!e)return y;var t=l.extname(e);if(t&&(e=e.substr(0,e.length-t.length)),a.messageFormat===r.both||a.messageFormat===r.bundle){var n=function(e){for(var t,n=l.dirname(e);t=l.join(n,"nls.metadata.header.json"),!u.existsSync(t);){var r=l.dirname(n);if(r===n){t=void 0;break}n=r}return t}(e);if(n){var i=l.dirname(n),o=s[i];if(void 0===o)try{var d=JSON.parse(u.readFileSync(n,"utf8"));try{var h=S(d,i);o=b(i,h?{header:d,nlsBundle:h}:null)}catch(e){console.error("Failed to load nls bundle",e),o=b(i,null)}}catch(e){console.error("Failed to read header file",e),o=b(i,null)}if(o){var m=e.substr(i.length+1).replace(/\\/g,"/"),v=o.nlsBundle[m];return void 0===v?(console.error("Messages for file "+e+" not found. See console for details."),function(){return"Messages not found."}):g(v)}}}if(a.messageFormat===r.both||a.messageFormat===r.file)try{var w=f(function(e){var t;if(a.cacheLanguageResolution&&t);else{if(c||!a.language)t=".nls.json";else for(var n=a.language;n;){var r=".nls."+n+".json";if(u.existsSync(e+r)){t=r;break}var i=n.lastIndexOf("-");i>0?n=n.substring(0,i):(t=".nls.json",n=null)}a.cacheLanguageResolution}return e+t}(e));return Array.isArray(w)?g(w):p(w.messages)&&p(w.keys)?g(w.messages):(console.error("String bundle '"+e+"' uses an unsupported format."),function(){return"File bundle has unsupported format. See console for details"})}catch(e){"ENOENT"!==e.code&&console.error("Failed to load single file bundle",e)}return console.error("Failed to load message bundle for file "+e),function(){return"Failed to load message bundle. See console for details."}}!function(e){e.file="file",e.bundle="bundle",e.both="both"}(r=t.MessageFormat||(t.MessageFormat={})),function(e){e.standalone="standalone",e.languagePack="languagePack"}(i=t.BundleFormat||(t.BundleFormat={})),function(e){e.is=function(e){var t=e;return t&&p(t.key)&&p(t.comment)}}(o||(o={})),function(){if(a={locale:void 0,language:void 0,languagePackSupport:!1,cacheLanguageResolution:!0,messageFormat:r.bundle},h(process.env.VSCODE_NLS_CONFIG))try{var e=JSON.parse(process.env.VSCODE_NLS_CONFIG),t=void 0;if(e.availableLanguages){var n=e.availableLanguages["*"];h(n)&&(t=n)}if(h(e.locale)&&(a.locale=e.locale.toLowerCase()),void 0===t?a.language=a.locale:"en"!==t&&(a.language=t),function(e){return!0===e||!1===e}(e._languagePackSupport)&&(a.languagePackSupport=e._languagePackSupport),h(e._cacheRoot)&&(a.cacheRoot=e._cacheRoot),h(e._languagePackId)&&(a.languagePackId=e._languagePackId),h(e._translationsConfigFile)){a.translationsConfigFile=e._translationsConfigFile;try{a.translationsConfig=f(a.translationsConfigFile)}catch(t){if(e._corruptedFile){var i=l.dirname(e._corruptedFile);u.exists(i,(function(t){t&&u.writeFile(e._corruptedFile,"corrupted","utf8",(function(e){console.error(e)}))}))}}}}catch(e){}c="pseudo"===a.locale,s=Object.create(null)}(),t.loadMessageBundle=w,t.config=function(e){return e&&(h(e.locale)&&(a.locale=e.locale.toLowerCase(),a.language=a.locale,s=Object.create(null)),void 0!==e.messageFormat&&(a.messageFormat=e.messageFormat),e.bundleFormat===i.standalone&&!0===a.languagePackSupport&&(a.languagePackSupport=!1)),c="pseudo"===a.locale,w}},6587:e=>{e.exports=function e(t,n){if(t&&n)return e(t)(n);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){r[e]=t[e]})),r;function r(){for(var e=new Array(arguments.length),n=0;n<e.length;n++)e[n]=arguments[n];var r=t.apply(this,e),i=e[e.length-1];return"function"==typeof r&&r!==i&&Object.keys(i).forEach((function(e){r[e]=i[e]})),r}}},259:e=>{"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},8799:(e,t,n)=>{"use strict";function r(e){var t=this;if(t instanceof r||(t=new r),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var n=0,i=arguments.length;n<i;n++)t.push(arguments[n]);return t}function i(e,t,n){var r=t===e.head?new a(n,null,t,e):new a(n,t,t.next,e);return null===r.next&&(e.tail=r),null===r.prev&&(e.head=r),e.length++,r}function o(e,t){e.tail=new a(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function s(e,t){e.head=new a(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function a(e,t,n,r){if(!(this instanceof a))return new a(e,t,n,r);this.list=r,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,n?(n.prev=this,this.next=n):this.next=null}e.exports=r,r.Node=a,r.create=r,r.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,n=e.prev;return t&&(t.prev=n),n&&(n.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=n),e.list.length--,e.next=null,e.prev=null,e.list=null,t},r.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},r.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},r.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)o(this,arguments[e]);return this.length},r.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)s(this,arguments[e]);return this.length},r.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},r.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},r.prototype.forEach=function(e,t){t=t||this;for(var n=this.head,r=0;null!==n;r++)e.call(t,n.value,r,this),n=n.next},r.prototype.forEachReverse=function(e,t){t=t||this;for(var n=this.tail,r=this.length-1;null!==n;r--)e.call(t,n.value,r,this),n=n.prev},r.prototype.get=function(e){for(var t=0,n=this.head;null!==n&&t<e;t++)n=n.next;if(t===e&&null!==n)return n.value},r.prototype.getReverse=function(e){for(var t=0,n=this.tail;null!==n&&t<e;t++)n=n.prev;if(t===e&&null!==n)return n.value},r.prototype.map=function(e,t){t=t||this;for(var n=new r,i=this.head;null!==i;)n.push(e.call(t,i.value,this)),i=i.next;return n},r.prototype.mapReverse=function(e,t){t=t||this;for(var n=new r,i=this.tail;null!==i;)n.push(e.call(t,i.value,this)),i=i.prev;return n},r.prototype.reduce=function(e,t){var n,r=this.head;if(arguments.length>1)n=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");r=this.head.next,n=this.head.value}for(var i=0;null!==r;i++)n=e(n,r.value,i),r=r.next;return n},r.prototype.reduceReverse=function(e,t){var n,r=this.tail;if(arguments.length>1)n=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");r=this.tail.prev,n=this.tail.value}for(var i=this.length-1;null!==r;i--)n=e(n,r.value,i),r=r.prev;return n},r.prototype.toArray=function(){for(var e=new Array(this.length),t=0,n=this.head;null!==n;t++)e[t]=n.value,n=n.next;return e},r.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,n=this.tail;null!==n;t++)e[t]=n.value,n=n.prev;return e},r.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new r;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=0,o=this.head;null!==o&&i<e;i++)o=o.next;for(;null!==o&&i<t;i++,o=o.next)n.push(o.value);return n},r.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var n=new r;if(t<e||t<0)return n;e<0&&(e=0),t>this.length&&(t=this.length);for(var i=this.length,o=this.tail;null!==o&&i>t;i--)o=o.prev;for(;null!==o&&i>e;i--,o=o.prev)n.push(o.value);return n},r.prototype.splice=function(e,t,...n){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var r=0,o=this.head;null!==o&&r<e;r++)o=o.next;var s=[];for(r=0;o&&r<t;r++)s.push(o.value),o=this.removeNode(o);for(null===o&&(o=this.tail),o!==this.head&&o!==this.tail&&(o=o.prev),r=0;r<n.length;r++)o=i(this,o,n[r]);return s},r.prototype.reverse=function(){for(var e=this.head,t=this.tail,n=e;null!==n;n=n.prev){var r=n.prev;n.prev=n.next,n.next=r}return this.head=t,this.tail=e,this};try{n(259)(r)}catch(e){}},4824:(e,t,n)=>{var r=n(9896),i=n(3106),o=n(3070),s=n(4025),a=n(9023),c=n(4434).EventEmitter,l=n(2203).Transform,u=n(2203).PassThrough,d=n(2203).Writable;function p(e,t,n){"function"==typeof t&&(n=t,t=null),null==t&&(t={}),null==t.autoClose&&(t.autoClose=!1),null==t.lazyEntries&&(t.lazyEntries=!1),null==t.decodeStrings&&(t.decodeStrings=!0),null==t.validateEntrySizes&&(t.validateEntrySizes=!0),null==t.strictFileNames&&(t.strictFileNames=!1),null==n&&(n=I),r.fstat(e,(function(r,i){if(r)return n(r);h(o.createFromFd(e,{autoClose:!0}),i.size,t,n)}))}function h(e,t,n,r){"function"==typeof n&&(r=n,n=null),null==n&&(n={}),null==n.autoClose&&(n.autoClose=!0),null==n.lazyEntries&&(n.lazyEntries=!1),null==n.decodeStrings&&(n.decodeStrings=!0);var i=!!n.decodeStrings;if(null==n.validateEntrySizes&&(n.validateEntrySizes=!0),null==n.strictFileNames&&(n.strictFileNames=!1),null==r&&(r=I),"number"!=typeof t)throw new Error("expected totalSize parameter to be a number");if(t>Number.MAX_SAFE_INTEGER)throw new Error("zip file too large. only file sizes up to 2^52 are supported due to JavaScript's Number type being an IEEE 754 double.");e.ref();var o=Math.min(65557,t),s=E(o),a=t-s.length;S(e,s,0,o,a,(function(c){if(c)return r(c);for(var l=o-22;l>=0;l-=1)if(101010256===s.readUInt32LE(l)){var u=s.slice(l),d=u.readUInt16LE(4);if(0!==d)return r(new Error("multi-disk zip files are not supported: found disk number: "+d));var p=u.readUInt16LE(10),h=u.readUInt32LE(16),m=u.readUInt16LE(20),g=u.length-22;if(m!==g)return r(new Error("invalid comment length. expected: "+g+". found: "+m));var y=i?x(u,22,u.length,!1):u.slice(22);if(65535!==p&&4294967295!==h)return r(null,new f(e,h,t,p,y,n.autoClose,n.lazyEntries,i,n.validateEntrySizes,n.strictFileNames));var b=E(20),v=a+l-b.length;return void S(e,b,0,b.length,v,(function(o){if(o)return r(o);if(117853008!==b.readUInt32LE(0))return r(new Error("invalid zip64 end of central directory locator signature"));var s=R(b,8),a=E(56);S(e,a,0,a.length,s,(function(o){return o?r(o):101075792!==a.readUInt32LE(0)?r(new Error("invalid zip64 end of central directory record signature")):(p=R(a,32),h=R(a,48),r(null,new f(e,h,t,p,y,n.autoClose,n.lazyEntries,i,n.validateEntrySizes,n.strictFileNames)))}))}))}r(new Error("end of central directory record signature not found"))}))}function f(e,t,n,r,i,o,s,a,l,u){var d=this;c.call(d),d.reader=e,d.reader.on("error",(function(e){g(d,e)})),d.reader.once("close",(function(){d.emit("close")})),d.readEntryCursor=t,d.fileSize=n,d.entryCount=r,d.comment=i,d.entriesRead=0,d.autoClose=!!o,d.lazyEntries=!!s,d.decodeStrings=!!a,d.validateEntrySizes=!!l,d.strictFileNames=!!u,d.isOpen=!0,d.emittedError=!1,d.lazyEntries||d._readEntry()}function m(e,t){e.autoClose&&e.close(),g(e,t)}function g(e,t){e.emittedError||(e.emittedError=!0,e.emit("error",t))}function y(){}function b(e,t){return new Date(1980+(e>>9&127),(e>>5&15)-1,31&e,t>>11&31,t>>5&63,2*(31&t),0)}function v(e){return-1!==e.indexOf("\\")?"invalid characters in fileName: "+e:/^[a-zA-Z]:/.test(e)||/^\//.test(e)?"absolute path: "+e:-1!==e.split("/").indexOf("..")?"invalid relative path: "+e:null}function S(e,t,n,r,i,o){if(0===r)return setImmediate((function(){o(null,E(0))}));e.read(t,n,r,i,(function(e,t){return e?o(e):t<r?o(new Error("unexpected EOF")):void o()}))}function w(e){l.call(this),this.actualByteCount=0,this.expectedByteCount=e}function C(){c.call(this),this.refCount=0}function T(e){u.call(this),this.context=e,this.context.ref(),this.unreffedYet=!1}t.open=function(e,t,n){"function"==typeof t&&(n=t,t=null),null==t&&(t={}),null==t.autoClose&&(t.autoClose=!0),null==t.lazyEntries&&(t.lazyEntries=!1),null==t.decodeStrings&&(t.decodeStrings=!0),null==t.validateEntrySizes&&(t.validateEntrySizes=!0),null==t.strictFileNames&&(t.strictFileNames=!1),null==n&&(n=I),r.open(e,"r",(function(e,i){if(e)return n(e);p(i,t,(function(e,t){e&&r.close(i,I),n(e,t)}))}))},t.fromFd=p,t.fromBuffer=function(e,t,n){"function"==typeof t&&(n=t,t=null),null==t&&(t={}),t.autoClose=!1,null==t.lazyEntries&&(t.lazyEntries=!1),null==t.decodeStrings&&(t.decodeStrings=!0),null==t.validateEntrySizes&&(t.validateEntrySizes=!0),null==t.strictFileNames&&(t.strictFileNames=!1),h(o.createFromBuffer(e,{maxChunkSize:65536}),e.length,t,n)},t.fromRandomAccessReader=h,t.dosDateTimeToDate=b,t.validateFileName=v,t.ZipFile=f,t.Entry=y,t.RandomAccessReader=C,a.inherits(f,c),f.prototype.close=function(){this.isOpen&&(this.isOpen=!1,this.reader.unref())},f.prototype.readEntry=function(){if(!this.lazyEntries)throw new Error("readEntry() called without lazyEntries:true");this._readEntry()},f.prototype._readEntry=function(){var e=this;if(e.entryCount!==e.entriesRead){if(!e.emittedError){var t=E(46);S(e.reader,t,0,t.length,e.readEntryCursor,(function(n){if(n)return m(e,n);if(!e.emittedError){var r=new y,i=t.readUInt32LE(0);if(33639248!==i)return m(e,new Error("invalid central directory file header signature: 0x"+i.toString(16)));if(r.versionMadeBy=t.readUInt16LE(4),r.versionNeededToExtract=t.readUInt16LE(6),r.generalPurposeBitFlag=t.readUInt16LE(8),r.compressionMethod=t.readUInt16LE(10),r.lastModFileTime=t.readUInt16LE(12),r.lastModFileDate=t.readUInt16LE(14),r.crc32=t.readUInt32LE(16),r.compressedSize=t.readUInt32LE(20),r.uncompressedSize=t.readUInt32LE(24),r.fileNameLength=t.readUInt16LE(28),r.extraFieldLength=t.readUInt16LE(30),r.fileCommentLength=t.readUInt16LE(32),r.internalFileAttributes=t.readUInt16LE(36),r.externalFileAttributes=t.readUInt32LE(38),r.relativeOffsetOfLocalHeader=t.readUInt32LE(42),64&r.generalPurposeBitFlag)return m(e,new Error("strong encryption is not supported"));e.readEntryCursor+=46,t=E(r.fileNameLength+r.extraFieldLength+r.fileCommentLength),S(e.reader,t,0,t.length,e.readEntryCursor,(function(n){if(n)return m(e,n);if(!e.emittedError){var i=!!(2048&r.generalPurposeBitFlag);r.fileName=e.decodeStrings?x(t,0,r.fileNameLength,i):t.slice(0,r.fileNameLength);var o=r.fileNameLength+r.extraFieldLength,a=t.slice(r.fileNameLength,o);r.extraFields=[];for(var c=0;c<a.length-3;){var l=a.readUInt16LE(c+0),u=a.readUInt16LE(c+2),d=c+4,p=d+u;if(p>a.length)return m(e,new Error("extra field length exceeds extra field buffer size"));var h=E(u);a.copy(h,0,d,p),r.extraFields.push({id:l,data:h}),c=p}if(r.fileComment=e.decodeStrings?x(t,o,o+r.fileCommentLength,i):t.slice(o,o+r.fileCommentLength),r.comment=r.fileComment,e.readEntryCursor+=t.length,e.entriesRead+=1,4294967295===r.uncompressedSize||4294967295===r.compressedSize||4294967295===r.relativeOffsetOfLocalHeader){var f=null;for(c=0;c<r.extraFields.length;c++)if(1===(y=r.extraFields[c]).id){f=y.data;break}if(null==f)return m(e,new Error("expected zip64 extended information extra field"));var g=0;if(4294967295===r.uncompressedSize){if(g+8>f.length)return m(e,new Error("zip64 extended information extra field does not include uncompressed size"));r.uncompressedSize=R(f,g),g+=8}if(4294967295===r.compressedSize){if(g+8>f.length)return m(e,new Error("zip64 extended information extra field does not include compressed size"));r.compressedSize=R(f,g),g+=8}if(4294967295===r.relativeOffsetOfLocalHeader){if(g+8>f.length)return m(e,new Error("zip64 extended information extra field does not include relative header offset"));r.relativeOffsetOfLocalHeader=R(f,g),g+=8}}if(e.decodeStrings)for(c=0;c<r.extraFields.length;c++){var y;if(28789===(y=r.extraFields[c]).id){if(y.data.length<6)continue;if(1!==y.data.readUInt8(0))continue;var b=y.data.readUInt32LE(1);if(s.unsigned(t.slice(0,r.fileNameLength))!==b)continue;r.fileName=x(y.data,5,y.data.length,!0);break}}if(e.validateEntrySizes&&0===r.compressionMethod){var S=r.uncompressedSize;if(r.isEncrypted()&&(S+=12),r.compressedSize!==S){var w="compressed/uncompressed size mismatch for stored file: "+r.compressedSize+" != "+r.uncompressedSize;return m(e,new Error(w))}}if(e.decodeStrings){e.strictFileNames||(r.fileName=r.fileName.replace(/\\/g,"/"));var C=v(r.fileName,e.validateFileNameOptions);if(null!=C)return m(e,new Error(C))}e.emit("entry",r),e.lazyEntries||e._readEntry()}}))}}))}}else setImmediate((function(){e.autoClose&&e.close(),e.emittedError||e.emit("end")}))},f.prototype.openReadStream=function(e,t,n){var r=this,o=0,s=e.compressedSize;if(null==n)n=t,t={};else{if(null!=t.decrypt){if(!e.isEncrypted())throw new Error("options.decrypt can only be specified for encrypted entries");if(!1!==t.decrypt)throw new Error("invalid options.decrypt value: "+t.decrypt);if(e.isCompressed()&&!1!==t.decompress)throw new Error("entry is encrypted and compressed, and options.decompress !== false")}if(null!=t.decompress){if(!e.isCompressed())throw new Error("options.decompress can only be specified for compressed entries");if(!1!==t.decompress&&!0!==t.decompress)throw new Error("invalid options.decompress value: "+t.decompress)}if(null!=t.start||null!=t.end){if(e.isCompressed()&&!1!==t.decompress)throw new Error("start/end range not allowed for compressed entry without options.decompress === false");if(e.isEncrypted()&&!1!==t.decrypt)throw new Error("start/end range not allowed for encrypted entry without options.decrypt === false")}if(null!=t.start){if((o=t.start)<0)throw new Error("options.start < 0");if(o>e.compressedSize)throw new Error("options.start > entry.compressedSize")}if(null!=t.end){if((s=t.end)<0)throw new Error("options.end < 0");if(s>e.compressedSize)throw new Error("options.end > entry.compressedSize");if(s<o)throw new Error("options.end < options.start")}}if(!r.isOpen)return n(new Error("closed"));if(e.isEncrypted()&&!1!==t.decrypt)return n(new Error("entry is encrypted, and options.decrypt !== false"));r.reader.ref();var a=E(30);S(r.reader,a,0,a.length,e.relativeOffsetOfLocalHeader,(function(c){try{if(c)return n(c);var l=a.readUInt32LE(0);if(67324752!==l)return n(new Error("invalid local file header signature: 0x"+l.toString(16)));var u,d=a.readUInt16LE(26),p=a.readUInt16LE(28),h=e.relativeOffsetOfLocalHeader+a.length+d+p;if(0===e.compressionMethod)u=!1;else{if(8!==e.compressionMethod)return n(new Error("unsupported compression method: "+e.compressionMethod));u=null==t.decompress||t.decompress}var f=h,m=f+e.compressedSize;if(0!==e.compressedSize&&m>r.fileSize)return n(new Error("file data overflows file bounds: "+f+" + "+e.compressedSize+" > "+r.fileSize));var g=r.reader.createReadStream({start:f+o,end:f+s}),y=g;if(u){var b=!1,v=i.createInflateRaw();g.on("error",(function(e){setImmediate((function(){b||v.emit("error",e)}))})),g.pipe(v),r.validateEntrySizes?(y=new w(e.uncompressedSize),v.on("error",(function(e){setImmediate((function(){b||y.emit("error",e)}))})),v.pipe(y)):y=v,y.destroy=function(){b=!0,v!==y&&v.unpipe(y),g.unpipe(v),g.destroy()}}n(null,y)}finally{r.reader.unref()}}))},y.prototype.getLastModDate=function(){return b(this.lastModFileDate,this.lastModFileTime)},y.prototype.isEncrypted=function(){return!!(1&this.generalPurposeBitFlag)},y.prototype.isCompressed=function(){return 8===this.compressionMethod},a.inherits(w,l),w.prototype._transform=function(e,t,n){if(this.actualByteCount+=e.length,this.actualByteCount>this.expectedByteCount){var r="too many bytes in the stream. expected "+this.expectedByteCount+". got at least "+this.actualByteCount;return n(new Error(r))}n(null,e)},w.prototype._flush=function(e){if(this.actualByteCount<this.expectedByteCount){var t="not enough bytes in the stream. expected "+this.expectedByteCount+". got only "+this.actualByteCount;return e(new Error(t))}e()},a.inherits(C,c),C.prototype.ref=function(){this.refCount+=1},C.prototype.unref=function(){var e=this;if(e.refCount-=1,!(e.refCount>0)){if(e.refCount<0)throw new Error("invalid unref");e.close((function(t){if(t)return e.emit("error",t);e.emit("close")}))}},C.prototype.createReadStream=function(e){var t=e.start,n=e.end;if(t===n){var r=new u;return setImmediate((function(){r.end()})),r}var i=this._readStreamForRange(t,n),o=!1,s=new T(this);i.on("error",(function(e){setImmediate((function(){o||s.emit("error",e)}))})),s.destroy=function(){i.unpipe(s),s.unref(),i.destroy()};var a=new w(n-t);return s.on("error",(function(e){setImmediate((function(){o||a.emit("error",e)}))})),a.destroy=function(){o=!0,s.unpipe(a),s.destroy()},i.pipe(s).pipe(a)},C.prototype._readStreamForRange=function(e,t){throw new Error("not implemented")},C.prototype.read=function(e,t,n,r,i){var o=this.createReadStream({start:r,end:r+n}),s=new d,a=0;s._write=function(n,r,i){n.copy(e,t+a,0,n.length),a+=n.length,i()},s.on("finish",i),o.on("error",(function(e){i(e)})),o.pipe(s)},C.prototype.close=function(e){setImmediate(e)},a.inherits(T,u),T.prototype._flush=function(e){this.unref(),e()},T.prototype.unref=function(e){this.unreffedYet||(this.unreffedYet=!0,this.context.unref())};var E,_="\0☺☻♥♦♣♠•◘○◙♂♀♪♫☼►◄↕‼¶§▬↨↑↓→←∟↔▲▼ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~⌂ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ ";function x(e,t,n,r){if(r)return e.toString("utf8",t,n);for(var i="",o=t;o<n;o++)i+=_[e[o]];return i}function R(e,t){var n=e.readUInt32LE(t);return 4294967296*e.readUInt32LE(t+4)+n}function I(e){if(e)throw e}E="function"==typeof Buffer.allocUnsafe?function(e){return Buffer.allocUnsafe(e)}:function(e){return new Buffer(e)}},1318:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AppInsightsCore:()=>ae,BaseCore:()=>ue,BaseTelemetryPlugin:()=>Te.s,CoreUtils:()=>re,DiagnosticLogger:()=>m.wq,ESPromise:()=>fe,ESPromiseScheduler:()=>Se,EventHelper:()=>E.fs,EventLatency:()=>l,EventPersistence:()=>d,EventPropertyType:()=>u,EventsDiscardedReason:()=>xe.x,FullVersionString:()=>O,InternalAppInsightsCore:()=>b._,InternalBaseCore:()=>ce.F,LoggingSeverity:()=>a.b,MinChannelPriorty:()=>_e.T,NotificationManager:()=>Ce.h,PerfEvent:()=>g.Q6,PerfManager:()=>g.NS,ProcessTelemetryContext:()=>Ee.W0,TraceLevel:()=>p,Undefined:()=>_.bA,Utils:()=>ne,ValueKind:()=>c,ValueSanitizer:()=>we,Version:()=>P,_ExtendedInternalMessageId:()=>h,_InternalLogMessage:()=>m.WD,_InternalMessageId:()=>a.$,__getRegisteredEvents:()=>x.El,_logInternalMessage:()=>m.Oc,_throwInternal:()=>m.ZP,_warnToConsole:()=>m.OG,addEventHandler:()=>x.So,addEventListeners:()=>x.lQ,addPageHideEventListener:()=>x.Fc,addPageShowEventListener:()=>x.oS,addPageUnloadEventListener:()=>x.ee,areCookiesSupported:()=>T.gi,arrForEach:()=>s.Iu,arrIndexOf:()=>s.rD,arrMap:()=>s.W$,arrReduce:()=>s.KT,attachEvent:()=>x.Q3,cookieAvailable:()=>T.gi,createCookieMgr:()=>T.xN,createEnumStyle:()=>o.Hj,createGuid:()=>Q,createProcessTelemetryContext:()=>Ee.i8,createTraceParent:()=>Pe.wk,createUniqueNamespace:()=>Re.Z,createUnloadHandlerContainer:()=>Ie.P,dateNow:()=>s.x3,deleteCookie:()=>$,detachEvent:()=>x.Ym,disableCookies:()=>H,disallowsSameSiteNone:()=>T.It,doPerf:()=>g.r2,dumpObj:()=>y.mm,eventOff:()=>x.ML,eventOn:()=>x.mB,extend:()=>X,findW3cTraceParent:()=>Pe.ef,formatTraceParent:()=>Pe.L0,generateW3CId:()=>E.cL,getCommonSchemaMetaData:()=>G,getConsole:()=>y.U5,getCookie:()=>W,getCookieValue:()=>K,getCrypto:()=>y.MY,getDocument:()=>y.YE,getExceptionName:()=>s.lL,getFieldValueType:()=>te,getGlobal:()=>I.mS,getGlobalInst:()=>y.EH,getHistory:()=>y.JK,getIEVersion:()=>y.L0,getISOString:()=>s._u,getJSON:()=>y.hm,getLocation:()=>y.g$,getMsCrypto:()=>y.iN,getNavigator:()=>y.w3,getPerformance:()=>y.FJ,getSetValue:()=>s.c2,getTenantId:()=>q,getTime:()=>Y,getWindow:()=>y.zk,hasDocument:()=>y.Wt,hasHistory:()=>y.tw,hasJSON:()=>y.Z,hasNavigator:()=>y.w9,hasOwnProperty:()=>s.mQ,hasWindow:()=>y.Vd,isArray:()=>s.cy,isArrayValid:()=>Z,isBeaconsSupported:()=>y.Uf,isBoolean:()=>s.Lm,isChromium:()=>ie,isDate:()=>s.$P,isDocumentObjectAvailable:()=>j,isError:()=>s.bJ,isFetchSupported:()=>y.R7,isFunction:()=>s.Tn,isIE:()=>y.lT,isLatency:()=>U,isNotTruthy:()=>s.wo,isNullOrUndefined:()=>s.hX,isNumber:()=>s.Et,isObject:()=>s.Gv,isReactNative:()=>y.lV,isSampledFlag:()=>Pe.N7,isString:()=>s.Kg,isTruthy:()=>s.zz,isTypeof:()=>s.Ed,isUint8ArrayAvailable:()=>B,isUndefined:()=>s.b0,isValidSpanId:()=>Pe.wN,isValidTraceId:()=>Pe.hX,isValidTraceParent:()=>Pe.mJ,isValueAssigned:()=>F,isValueKind:()=>J,isWindowObjectAvailable:()=>M,isXhrSupported:()=>y.xk,mergeEvtNamespace:()=>x.Hm,newGuid:()=>E.aq,newId:()=>R.Si,normalizeJsName:()=>s.cH,objCreate:()=>I.AQ,objDefineAccessors:()=>s.r,objForEachKey:()=>s.z,objFreeze:()=>s.N6,objKeys:()=>s.cG,objSeal:()=>s.js,openXhr:()=>oe,optimizeObject:()=>s.hW,parseTraceParent:()=>Pe.ZI,perfNow:()=>E.UU,proxyAssign:()=>s.qz,proxyFunctionAs:()=>s.RF,proxyFunctions:()=>s.o$,random32:()=>R.VN,randomValue:()=>R.Z1,removeEventHandler:()=>x.zh,removeEventListeners:()=>x.Wg,removePageHideEventListener:()=>x.sq,removePageShowEventListener:()=>x.vF,removePageUnloadEventListener:()=>x.Ds,safeGetCookieMgr:()=>T.um,safeGetLogger:()=>m.y0,sanitizeProperty:()=>z,setCookie:()=>V,setEnableEnvMocks:()=>y.cU,setProcessTelemetryTimings:()=>ee,setValue:()=>s.KY,strContains:()=>s.Ju,strEndsWith:()=>s.Cv,strFunction:()=>_.hW,strObject:()=>_._1,strPrototype:()=>_.vR,strStartsWith:()=>s.tG,strTrim:()=>s.EH,strUndefined:()=>_.bA,throwError:()=>s.$8,toISOString:()=>s._u,useXDomainRequest:()=>y.PV});var r,i=n(212),o=n(3435),s=n(2504),a=n(6166),c=(0,o.Hj)({NotSet:0,Pii_DistinguishedName:1,Pii_GenericData:2,Pii_IPV4Address:3,Pii_IPv6Address:4,Pii_MailSubject:5,Pii_PhoneNumber:6,Pii_QueryString:7,Pii_SipAddress:8,Pii_SmtpAddress:9,Pii_Identity:10,Pii_Uri:11,Pii_Fqdn:12,Pii_IPV4AddressLegacy:13,CustomerContent_GenericContent:32}),l=(0,o.Hj)({Normal:1,CostDeferred:2,RealTime:3,Immediate:4}),u=(0,o.Hj)({Unspecified:0,String:1,Int32:2,UInt32:3,Int64:4,UInt64:5,Double:6,Bool:7,Guid:8,DateTime:9}),d=(0,o.Hj)({Normal:1,Critical:2}),p=(0,o.Hj)({NONE:0,ERROR:1,WARNING:2,INFORMATION:3}),h=(0,s.N6)((0,i.Im)((0,i.Im)({},a.$),(0,o.Hj)({AuthHandShakeError:501,AuthRedirectFail:502,BrowserCannotReadLocalStorage:503,BrowserCannotWriteLocalStorage:504,BrowserDoesNotSupportLocalStorage:505,CannotParseBiBlobValue:506,CannotParseDataAttribute:507,CVPluginNotAvailable:508,DroppedEvent:509,ErrorParsingAISessionCookie:510,ErrorProvidedChannels:511,FailedToGetCookies:512,FailedToInitializeCorrelationVector:513,FailedToInitializeSDK:514,InvalidContentBlob:515,InvalidCorrelationValue:516,SessionRenewalDateIsZero:517,SendPostOnCompleteFailure:518,PostResponseHandler:519,SDKNotInitialized:520}))),f=n(1356),m=n(6392),g=n(5441),y=n(8323),b=n(6382),v="",S="https://browser.events.data.microsoft.com/OneCollector/1.0/",w="version",C="properties",T=n(5691),E=n(5955),_=n(7245),x=n(4838),R=n(9668),I=n(9381),P="3.2.13",O="1DS-Web-JS-"+P,D="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",A="withCredentials",k="timeout",N=((r={})[0]=0,r[2]=6,r[1]=1,r[3]=7,r[4098]=6,r[4097]=1,r[4099]=7,r),L=null,j=Boolean((0,y.YE)()),M=Boolean((0,y.zk)());function F(e){return!(e===v||(0,s.hX)(e))}function q(e){if(e){var t=e.indexOf("-");if(t>-1)return e.substring(0,t)}return v}function B(){return null===L&&(L=!(0,s.b0)(Uint8Array)&&!function(){var e=(0,y.w3)();if(!(0,s.b0)(e)&&e.userAgent){var t=e.userAgent.toLowerCase();if((t.indexOf("safari")>=0||t.indexOf("firefox")>=0)&&t.indexOf("chrome")<0)return!0}return!1}()&&!(0,y.lV)()),L}function U(e){return!!(e&&(0,s.Et)(e)&&e>=1&&e<=4)}function z(e,t,n){if(!t&&!F(t)||"string"!=typeof e)return null;var r=typeof t;if("string"===r||"number"===r||"boolean"===r||(0,s.cy)(t))t={value:t};else if("object"!==r||_.J$.call(t,"value")){if((0,s.hX)(t.value)||t.value===v||!(0,s.Kg)(t.value)&&!(0,s.Et)(t.value)&&!(0,s.Lm)(t.value)&&!(0,s.cy)(t.value))return null}else t={value:n?JSON.stringify(t):t};if((0,s.cy)(t.value)&&!Z(t.value))return null;if(!(0,s.hX)(t.kind)){if((0,s.cy)(t.value)||!J(t.kind))return null;t.value=t.value.toString()}return t}function G(e,t,n){var r=-1;if(!(0,s.b0)(e))if(t>0&&(32===t?r=8192:t<=13&&(r=t<<5)),function(e){return e>=0&&e<=9}(n))-1===r&&(r=0),r|=n;else{var i=N[te(e)]||-1;-1!==r&&-1!==i?r|=i:6===i&&(r=i)}return r}function H(){(0,T.um)(null).setEnabled(!1)}function V(e,t,n){(0,T.gi)(null)&&(0,T.um)(null).set(e,t,86400*n,null,"/")}function $(e){(0,T.gi)(null)&&(0,T.um)(null).del(e)}function W(e){return(0,T.gi)(null)?K((0,T.um)(null),e):v}function K(e,t,n){var r;return void 0===n&&(n=!0),e&&(r=e.get(t),n&&r&&decodeURIComponent&&(r=decodeURIComponent(r))),r||v}function Q(e){void 0===e&&(e="D");var t=(0,E.aq)();return"B"===e?t="{"+t+"}":"P"===e?t="("+t+")":"N"===e&&(t=t.replace(/-/g,v)),t}function X(e,t,n,r,i){var o={},a=!1,c=0,l=arguments.length,u=arguments;for("[object Boolean]"===Object[_.vR].toString.call(u[0])&&(a=u[0],c++);c<l;c++)e=u[c],(0,s.z)(e,(function(e,t){a&&t&&(0,s.Gv)(t)?(0,s.cy)(t)?(o[e]=o[e]||[],(0,s.Iu)(t,(function(t,n){t&&(0,s.Gv)(t)?o[e][n]=X(!0,o[e][n],t):o[e][n]=t}))):o[e]=X(!0,o[e],t):o[e]=t}));return o}var Y=E.UU;function J(e){return 0===e||e>0&&e<=13||32===e}function Z(e){return e.length>0}function ee(e,t){var n=e;n.timings=n.timings||{},n.timings.processTelemetryStart=n.timings.processTelemetryStart||{},n.timings.processTelemetryStart[t]=Y()}function te(e){var t=0;if(null!=e){var n=typeof e;"string"===n?t=1:"number"===n?t=2:"boolean"===n?t=3:n===_._1&&(t=4,(0,s.cy)(e)?(t=4096,e.length>0&&(t|=te(e[0]))):_.J$.call(e,"value")&&(t=8192|te(e.value)))}return t}var ne={Version:P,FullVersionString:O,strUndefined:_.bA,strObject:_._1,Undefined:_.bA,arrForEach:s.Iu,arrIndexOf:s.rD,arrMap:s.W$,arrReduce:s.KT,objKeys:s.cG,toISOString:s._u,isReactNative:y.lV,isString:s.Kg,isNumber:s.Et,isBoolean:s.Lm,isFunction:s.Tn,isArray:s.cy,isObject:s.Gv,strTrim:s.EH,isDocumentObjectAvailable:j,isWindowObjectAvailable:M,isValueAssigned:F,getTenantId:q,isBeaconsSupported:y.Uf,isUint8ArrayAvailable:B,isLatency:U,sanitizeProperty:z,getISOString:s._u,useXDomainRequest:y.PV,getCommonSchemaMetaData:G,cookieAvailable:T.gi,disallowsSameSiteNone:T.It,setCookie:V,deleteCookie:$,getCookie:W,createGuid:Q,extend:X,getTime:Y,isValueKind:J,isArrayValid:Z,objDefineAccessors:s.r,addPageUnloadEventListener:x.ee,setProcessTelemetryTimings:ee,addEventHandler:x.So,getFieldValueType:te,strEndsWith:s.Cv,objForEachKey:s.z},re={_canUseCookies:void 0,isTypeof:s.Ed,isUndefined:s.b0,isNullOrUndefined:s.hX,hasOwnProperty:s.mQ,isFunction:s.Tn,isObject:s.Gv,isDate:s.$P,isArray:s.cy,isError:s.bJ,isString:s.Kg,isNumber:s.Et,isBoolean:s.Lm,toISOString:s._u,arrForEach:s.Iu,arrIndexOf:s.rD,arrMap:s.W$,arrReduce:s.KT,strTrim:s.EH,objCreate:I.AQ,objKeys:s.cG,objDefineAccessors:s.r,addEventHandler:x.So,dateNow:s.x3,isIE:y.lT,disableCookies:H,newGuid:E.aq,perfNow:E.UU,newId:R.Si,randomValue:R.Z1,random32:R.VN,mwcRandomSeed:R.yc,mwcRandom32:R.k5,generateW3CId:E.cL};function ie(){return!!(0,y.EH)("chrome")}function oe(e,t,n,r,i,o){function s(e,t,n){try{e[t]=n}catch(e){}}void 0===r&&(r=!1),void 0===i&&(i=!1);var a=new XMLHttpRequest;return r&&s(a,D,r),n&&s(a,A,n),a.open(e,t,!i),n&&s(a,A,n),!i&&o&&s(a,k,o),a}var se=function(e){function t(){var n=e.call(this)||this;return n.pluginVersionStringArr=[],(0,f.default)(t,n,(function(e,t){e.logger&&e.logger.queue||(e.logger=new m.wq({loggingLevelConsole:1})),e.initialize=function(n,r,i,o){(0,g.r2)(e,(function(){return"AppInsightsCore.initialize"}),(function(){var a=e.pluginVersionStringArr;if(n){n.endpointUrl||(n.endpointUrl=S);var c=n.propertyStorageOverride;!c||c.getProperty&&c.setProperty||(0,s.$8)("Invalid property storage override passed."),n.channels&&(0,s.Iu)(n.channels,(function(e){e&&(0,s.Iu)(e,(function(e){if(e.identifier&&e.version){var t=e.identifier+"="+e.version;a.push(t)}}))}))}e.getWParam=function(){return"undefined"!=typeof document||n.enableWParam?0:-1},r&&(0,s.Iu)(r,(function(e){if(e&&e.identifier&&e.version){var t=e.identifier+"="+e.version;a.push(t)}})),e.pluginVersionString=a.join(";"),e.pluginVersionStringArr=a;try{t.initialize(n,r,i,o),e.pollInternalLogs("InternalLog")}catch(t){var l=e.logger,u=(0,y.mm)(t);-1!==u.indexOf("channels")&&(u+="\n - Channels must be provided through config.channels only!"),(0,m.ZP)(l,1,514,"SDK Initialization Failed - no telemetry will be sent: "+u)}}),(function(){return{config:n,extensions:r,logger:i,notificationManager:o}}))},e.track=function(n){(0,g.r2)(e,(function(){return"AppInsightsCore.track"}),(function(){var r=n;if(r){r.timings=r.timings||{},r.timings.trackStart=Y(),U(r.latency)||(r.latency=1);var i=r.ext=r.ext||{};i.sdk=i.sdk||{},i.sdk.ver=O;var o=r.baseData=r.baseData||{};o[C]=o[C]||{};var s=o[C];s[w]=s[w]||e.pluginVersionString||v}t.track(r)}),(function(){return{item:n}}),!n.sync)}})),n}return(0,i.qU)(t,e),t.__ieDyn=1,t}(b._);const ae=se;var ce=n(3227),le=function(e){function t(){var n=e.call(this)||this;return(0,f.default)(t,n,(function(e,t){e.initialize=function(n,r,i,o){n&&!n.endpointUrl&&(n.endpointUrl=S),e.getWParam=function(){return j||n.enableWParam?0:-1};try{t.initialize(n,r,i,o)}catch(t){(0,m.ZP)(e.logger,1,514,"Initialization Failed: "+(0,y.mm)(t)+"\n - Note: Channels must be provided through config.channels only")}},e.track=function(e){var n=e;if(n){var r=n.ext=n.ext||{};r.sdk=r.sdk||{},r.sdk.ver=O}t.track(n)}})),n}return(0,i.qU)(t,e),t.__ieDyn=1,t}(ce.F);const ue=le;var de=s.Tn;function pe(e,t,n){return function(r){e[t]=r,n()}}var he=function(){function e(t){var n=0,r=null,i=[];function o(){if(i.length>0){var e=i.slice();i=[],setTimeout((function(){for(var t=0,n=e.length;t<n;++t)try{e[t]()}catch(e){}}),0)}}function s(e){0===n&&(r=e,n=1,o())}function a(e){0===n&&(r=e,n=2,o())}(0,f.default)(e,this,(function(t){t.then=function(t,s){return new e((function(a,c){!function(t,s,a,c){i.push((function(){var i;try{(i=1===n?de(t)?t(r):r:de(s)?s(r):r)instanceof e?i.then(a,c):2!==n||de(s)?a(i):c(i)}catch(e){return void c(e)}})),0!==n&&o()}(t,s,a,c)}))},t.catch=function(e){return t.then(null,e)}})),function(){if(!de(t))throw new TypeError("ESPromise: resolvedFunc argument is not a Function");try{t(s,a)}catch(e){a(e)}}()}return e.resolve=function(t){return t instanceof e?t:t&&de(t.then)?new e((function(e,n){try{t.then(e,n)}catch(e){n(e)}})):new e((function(e){e(t)}))},e.reject=function(t){return new e((function(e,n){n(t)}))},e.all=function(t){if(t&&t.length)return new e((function(e,n){try{for(var r=[],i=0,o=0;o<t.length;o++){var s=t[o];s&&de(s.then)?(i++,s.then(pe(r,o,(function(){0==--i&&e(r)})),n)):r[o]=s}0===i&&setTimeout((function(){e(r)}),0)}catch(e){n(e)}}))},e.race=function(t){return new e((function(e,n){if(t&&t.length)try{for(var r=function(r){var i=t[r];i&&de(i.then)?i.then(e,n):setTimeout((function(){e(i)}),0)},i=0;i<t.length;i++)r(i)}catch(e){n(e)}}))},e}();const fe=he;var me=0,ge=[],ye=[],be=[];function ve(){return(new Date).getTime()}const Se=function(){function e(t,n){var r=0,i=(t||"<unnamed>")+"."+me;function o(e){var t=(0,I.mS)();t&&t.QUnit&&console&&console.log("ESPromiseScheduler["+i+"] "+e)}function s(e){(0,m.OG)(n,"ESPromiseScheduler["+i+"] "+e)}me++,(0,f.default)(e,this,(function(e){var t=null,n=0;function a(e,t){for(var n=0;n<e.length;n++)if(e[n].id===t)return e.splice(n,1)[0];return null}e.scheduleEvent=function(e,c,l){var u=i+"."+n;n++,c&&(u+="-("+c+")");var d=u+"{"+r+"}";r++;var p,h,f,m={evt:null,tm:ve(),id:d,isRunning:!1,isAborted:!1};return m.evt=t?(p=m,h=t,f=new fe((function(e,t){var n=ve()-h.tm,r=h.id;o("["+u+"] is waiting for ["+r+":"+n+" ms] to complete before starting -- ["+ye.length+"] waiting and ["+ge.length+"] running"),p.abort=function(e){p.abort=null,a(ye,u),p.isAborted=!0,t(new Error(e))},h.evt.then((function(n){a(ye,u),w(p).then(e,t)}),(function(n){a(ye,u),w(p).then(e,t)}))})),ye.push(p),f):w(m),(t=m).evt._schId=d,m.evt;function g(e){for(var t=ve(),n=t-6e5,r=e.length,i=0;i<r;){var o=e[i];if(o&&o.tm<n){var a=null;o.abort?(a="Aborting ["+o.id+"] due to Excessive runtime ("+(t-o.tm)+" ms)",o.abort(a)):a="Removing ["+o.id+"] due to Excessive runtime ("+(t-o.tm)+" ms)",s(a),e.splice(i,1),r--}else i++}}function y(e,n){var r=!1,i=a(ge,e);if(i||(i=a(be,e),r=!0),i){i.to&&(clearTimeout(i.to),i.to=null);var c=ve()-i.tm;n?r?s("Timed out event ["+e+"] finally complete -- "+c+" ms"):o("Promise ["+e+"] Complete -- "+c+" ms"):(be.push(i),s("Event ["+e+"] Timed out and removed -- "+c+" ms"))}else o("Failed to remove ["+e+"] from running queue");t&&t.id===e&&(t=null),g(ge),g(ye),g(be)}function b(e,t){return function(n){return y(e,!0),t&&t(n),n}}function v(e,t,n,r){t.then((function(t){return t instanceof fe?(o("Event ["+e+"] returned a promise -- waiting"),v(e,t,n,r),t):b(e,n)(t)}),b(e,r))}function S(e,t){var n=e.id;return new fe((function(r,i){o("Event ["+n+"] Starting -- waited for "+(e.wTm||"--")+" ms"),e.isRunning=!0,e.abort=function(t){e.abort=null,e.isAborted=!0,y(n,!1),i(new Error(t))};var s=t(n);s instanceof fe?(l&&(e.to=setTimeout((function(){y(n,!1),i(new Error("Timed out after ["+l+"] ms"))}),l)),v(n,s,(function(t){o("Event ["+n+"] Resolving after "+(ve()-e.tm)+" ms"),r(t)}),i)):(o("Promise ["+n+"] Auto completed as the start action did not return a promise"),r())}))}function w(t){var n=ve();return t.wTm=n-t.tm,t.tm=n,t.isAborted?fe.reject(new Error("["+u+"] was aborted")):(ge.push(t),S(t,e))}}}))}return e.incomplete=function(){return ge},e.waitingToStart=function(){return ye},e}();var we=function(){function e(e){var t=this,n={},r=[],i=[];function o(e,t){var o,a=n[e];if(a&&(o=a[t]),!o&&null!==o){if((0,s.Kg)(e)&&(0,s.Kg)(t))if(i.length>0){for(var c=0;c<i.length;c++)if(i[c].handleField(e,t)){o={canHandle:!0,fieldHandler:i[c]};break}}else 0===r.length&&(o={canHandle:!0});if(!o&&null!==o)for(o=null,c=0;c<r.length;c++)if(r[c].handleField(e,t)){o={canHandle:!0,handler:r[c],fieldHandler:null};break}a||(a=n[e]={}),a[t]=o}return o}function a(e,t,n,r,i,o){if(e.handler)return e.handler.property(t,n,i,o);if(!(0,s.hX)(i.kind)){if(!(4096&~r&&J(i.kind)))return null;i.value=i.value.toString()}return l(e.fieldHandler,t,n,r,i)}function c(e,t,n){return F(n)?{value:n}:null}function l(e,n,r,i,o){if(o&&e){var a=e.getSanitizer(n,r,i,o.kind,o.propertyType);if(a)if(4===i){var u={},d=o.value;(0,s.z)(d,(function(t,i){var o=n+"."+r;if(F(i)){var s=c(0,0,i);(s=l(e,o,t,te(i),s))&&(u[t]=s.value)}})),o.value=u}else{var p={path:n,name:r,type:i,prop:o,sanitizer:t};o=a.call(t,p)}}return o}e&&i.push(e),t.addSanitizer=function(e){e&&(r.push(e),n={})},t.addFieldSanitizer=function(e){e&&(i.push(e),n={})},t.handleField=function(e,t){var n=o(e,t);return!!n&&n.canHandle},t.value=function(e,t,n,r){var i=o(e,t);if(i&&i.canHandle){if(!i||!i.canHandle)return null;if(i.handler)return i.handler.value(e,t,n,r);if(!(0,s.Kg)(t)||(0,s.hX)(n)||n===v)return null;var l=null,u=te(n);if(8192&~u)1!==u&&2!==u&&3!==u&&4096&~u?4===u&&(l=c(0,0,r?JSON.stringify(n):n)):l=c(0,0,n);else{var d=-8193&u;if(!F((l=n).value)||1!==d&&2!==d&&3!==d&&4096&~d)return null}if(l)return a(i,e,t,u,l,r)}return null},t.property=function(e,t,n,r){var i=o(e,t);if(!i||!i.canHandle)return null;if(!(0,s.Kg)(t)||(0,s.hX)(n)||!F(n.value))return null;var c=te(n.value);return 0===c?null:a(i,e,t,c,n,r)}}return e.getFieldType=te,e}(),Ce=n(4013),Te=n(7428),Ee=n(8012),_e=n(8963),xe=n(4343),Re=n(2429),Ie=n(2755),Pe=n(2675)},3435:(e,t,n)=>{"use strict";n.d(t,{Hj:()=>i,oP:()=>s,oc:()=>o});var r=n(2504);function i(e){var t={};return(0,r.z)(e,(function(e,n){t[e]=n,t[n]=e})),(0,r.ol)(t)}function o(e){var t={};return(0,r.z)(e,(function(e,n){t[e]=e,t[n]=e})),(0,r.ol)(t)}function s(e){var t={};return(0,r.z)(e,(function(e,n){t[e]=n[1],t[n[0]]=n[1]})),(0,r.ol)(t)}},4343:(e,t,n)=>{"use strict";n.d(t,{x:()=>r});var r=(0,n(3435).Hj)({Unknown:0,NonRetryableStatus:1,InvalidEvent:2,SizeLimitExceeded:3,KillSwitch:4,QueueFull:5})},6166:(e,t,n)=>{"use strict";n.d(t,{$:()=>w,b:()=>S});var r,i=n(3435),o="Failed",s=o+"MonitorAjax",a="Track",c="Start",l="Stop",u="Event",d="AuthContext",p="Exception",h="Local",f="Session",m="Storage",g="Browser",y="Cannot",b="Buffer",v="InstrumentationKey",S=(0,i.Hj)({CRITICAL:1,WARNING:2}),w=(0,i.Hj)(((r={})[g+"DoesNotSupport"+h+m]=0,r[g+y+"Read"+h+m]=1,r[g+y+"Read"+f+m]=2,r[g+y+"Write"+h+m]=3,r[g+y+"Write"+f+m]=4,r[g+o+"RemovalFrom"+h+m]=5,r[g+o+"RemovalFrom"+f+m]=6,r[y+"SendEmptyTelemetry"]=7,r.ClientPerformanceMathError=8,r["ErrorParsingAI"+f+"Cookie"]=9,r.ErrorPVCalc=10,r[p+"WhileLoggingError"]=11,r[o+"AddingTelemetryTo"+b]=12,r[s+"Abort"]=13,r[s+"Dur"]=14,r[s+"Open"]=15,r[s+"RSC"]=16,r[s+"Send"]=17,r[s+"GetCorrelationHeader"]=18,r[o+"ToAddHandlerForOnBeforeUnload"]=19,r[o+"ToSendQueuedTelemetry"]=20,r[o+"ToReportDataLoss"]=21,r["Flush"+o]=22,r.MessageLimitPerPVExceeded=23,r.MissingRequiredFieldSpecification=24,r.NavigationTimingNotSupported=25,r.OnError=26,r[f+"RenewalDateIsZero"]=27,r.SenderNotInitialized=28,r[c+a+u+o]=29,r[l+a+u+o]=30,r[c+a+o]=31,r[l+a+o]=32,r.TelemetrySampledAndNotSent=33,r[a+u+o]=34,r[a+p+o]=35,r[a+"Metric"+o]=36,r[a+"PV"+o]=37,r[a+"PV"+o+"Calc"]=38,r[a+"Trace"+o]=39,r["Transmission"+o]=40,r[o+"ToSet"+m+b]=41,r[o+"ToRestore"+m+b]=42,r.InvalidBackendResponse=43,r[o+"ToFixDepricatedValues"]=44,r.InvalidDurationValue=45,r.TelemetryEnvelopeInvalid=46,r.CreateEnvelopeError=47,r[y+"SerializeObject"]=48,r[y+"SerializeObjectNonSerializable"]=49,r.CircularReferenceDetected=50,r["Clear"+d+o]=51,r[p+"Truncated"]=52,r.IllegalCharsInName=53,r.ItemNotInArray=54,r.MaxAjaxPerPVExceeded=55,r.MessageTruncated=56,r.NameTooLong=57,r.SampleRateOutOfRange=58,r["Set"+d+o]=59,r["Set"+d+o+"AccountName"]=60,r.StringValueTooLong=61,r.StartCalledMoreThanOnce=62,r.StopCalledWithoutStart=63,r["TelemetryInitializer"+o]=64,r.TrackArgumentsNotSpecified=65,r.UrlTooLong=66,r[f+m+b+"Full"]=67,r[y+"AccessCookie"]=68,r.IdTooLong=69,r.InvalidEvent=70,r[s+"SetRequestHeader"]=71,r["Send"+g+"InfoOnUserInit"]=72,r["Plugin"+p]=73,r["Notification"+p]=74,r.SnippetScriptLoadFailure=99,r["Invalid"+v]=100,r[y+"ParseAiBlobValue"]=101,r.InvalidContentBlob=102,r[a+"PageAction"+u+o]=103,r[o+"AddingCustomDefinedRequestContext"]=104,r["InMemory"+m+b+"Full"]=105,r[v+"Deprecation"]=106,r))},8963:(e,t,n)=>{"use strict";n.d(t,{T:()=>r});var r=100},6382:(e,t,n)=>{"use strict";n.d(t,{_:()=>p});var r=n(212),i=n(9284),o=n(3229),s=n(3227),a=n(6392),c=n(2504),l=n(5397),u=n(4013),d=n(5441),p=function(e){function t(){var n=e.call(this)||this;return(0,i.A)(t,n,(function(e,t){function n(t){var n=e[o.RF]();n&&n[l.Yp]([t],2)}e[o.mE]=function(e,n,r,i){t[o.mE](e,n,r||new a.wq(e),i||new u.h(e))},e.track=function(r){(0,d.r2)(e[l.kI](),(function(){return"AppInsightsCore:track"}),(function(){null===r&&(n(r),(0,c.$8)("Invalid telemetry item")),function(e){(0,c.hX)(e[o.RS])&&(n(e),(0,c.$8)("telemetry name required"))}(r),t.track(r)}),(function(){return{item:r}}),!r.sync)}})),n}return(0,r.qU)(t,e),t.__ieDyn=1,t}(s.F)},3227:(e,t,n)=>{"use strict";n.d(t,{F:()=>I});var r=n(212),i=n(9284),o=n(9381),s=n(3229),a=n(2504),c=n(5397),l=n(8012),u=n(1267),d=500;function p(e,t,n){t&&(0,a.cy)(t)&&t[s.oI]>0&&(t=t.sort((function(e,t){return e[c.Vo]-t[c.Vo]})),(0,a.Iu)(t,(function(e){e[c.Vo]<d&&(0,a.$8)("Channel has invalid priority - "+e[s.Ju])})),e[s.y5]({queue:(0,a.N6)(t),chain:(0,l.PV)(t,n[s.GA],n)}))}var h=n(5691),f=n(2429),m=n(8074),g=n(6392),y=n(5441),b=n(7428),v=n(8323),S=function(e){function t(){var n,r,o=e.call(this)||this;function l(){n=0,r=[]}return o.identifier="TelemetryInitializerPlugin",o.priority=199,l(),(0,i.A)(t,o,(function(e,t){e.addTelemetryInitializer=function(e){var t={id:n++,fn:e};return r[s.y5](t),{remove:function(){(0,a.Iu)(r,(function(e,n){if(e.id===t.id)return r[s.Ic](n,1),-1}))}}},e[c.qT]=function(t,n){for(var i=!1,o=r[s.oI],c=0;c<o;++c){var l=r[c];if(l)try{if(!1===l.fn[s.y9](null,[t])){i=!0;break}}catch(e){(0,g.ZP)(n[s.e4](),1,64,"One of telemetry initializers failed, telemetry item will not be sent: "+(0,a.lL)(e),{exception:(0,v.mm)(e)},!0)}}i||e[s.$5](t,n)},e[s.tn]=function(){l()}})),o}return(0,r.qU)(t,e),t.__ieDyn=1,t}(b.s),w=n(2755),C="Plugins must provide initialize method",T="_notificationManager",E="SDK is still unloading...",_={loggingLevelConsole:1};function x(e,t){return new y.NS(t)}function R(e,t){var n=!1;return(0,a.Iu)(t,(function(t){if(t===e)return n=!0,-1})),n}var I=function(){function e(){var t,n,b,v,I,P,O,D,A,k,N,L,j,M,F,q,B,U,z,G,H=0,V=!1;(0,i.A)(e,this,(function(e){function i(n){if(!H&&!V&&(n||e[s.Uw]&&e[s.Uw].queue[s.oI]>0)){var r=(0,a.SA)(t.diagnosticLogInterval);r&&r>0||(r=1e4),H=setInterval((function(){clearInterval(H),H=0,J()}),r)}return H}function $(){n=!1,t=(0,a.CP)(!0,{},_),e[s.GA]=t,e[s.Uw]=new g.wq(t),e[s.H7]=[],F=new S,b=[],v=null,I=null,P=null,O=null,D=null,k=null,A=[],N=null,L=null,j=null,M=!1,q=null,B=(0,f.Z)("AIBaseCore",!0),U=(0,w.P)(),G=null}function W(){var n=(0,l.i8)(X(),t,e);return n[s.by](i),n}function K(n){var r=function(e,t,n){var r,i=[],o={};return(0,a.Iu)(n,(function(t){((0,a.hX)(t)||(0,a.hX)(t[s.mE]))&&(0,a.$8)(C);var n=t[c.Vo],r=t[s.Ju];t&&n&&((0,a.hX)(o[n])?o[n]=r:(0,g.OG)(e,"Two extensions have same priority #"+n+" - "+o[n]+", "+r)),(!n||n<500)&&i[s.y5](t)})),(r={all:n})[c.eT]=i,r}(e[s.Uw],0,A);k=r[c.eT],D=null;var o=r.all;if(j=(0,a.N6)(function(e,t,n){var r=[];if(e&&(0,a.Iu)(e,(function(e){return p(r,e,n)})),t){var i=[];(0,a.Iu)(t,(function(e){e[c.Vo]>d&&i[s.y5](e)})),p(r,i,n)}return r}(L,o,e)),N){var h=(0,a.rD)(o,N);-1!==h&&o[s.Ic](h,1),-1!==(h=(0,a.rD)(k,N))&&k[s.Ic](h,1),N._setQueue(j)}else N=function(e,t){function n(){return(0,l.i8)(null,t[s.GA],t,null)}function r(e,t,n,r){var i=e?e[s.oI]+1:1;function o(){0==--i&&(r&&r(),r=null)}i>0&&(0,a.Iu)(e,(function(e){if(e&&e.queue[s.oI]>0){var r=e.chain,a=t[s.$o](r);a[s.by](o),n(a)}else i--})),o()}var i=!1,o={identifier:"ChannelControllerPlugin",priority:d,initialize:function(t,n,r,o){i=!0,(0,a.Iu)(e,(function(e){e&&e.queue[s.oI]>0&&(0,u.pI)((0,l.i8)(e.chain,t,n),r)}))},isInitialized:function(){return i},processTelemetry:function(t,i){r(e,i||n(),(function(e){e[s.$5](t)}),(function(){i[s.$5](t)}))},update:function(t,n){var i=n||{reason:0};return r(e,t,(function(e){e[s.$5](i)}),(function(){t[s.$5](i)})),!0},pause:function(){r(e,n(),(function(e){e.iterate((function(e){e.pause&&e.pause()}))}),null)},resume:function(){r(e,n(),(function(e){e.iterate((function(e){e.resume&&e.resume()}))}),null)},teardown:function(t,n){var o=n||{reason:0,isAsync:!1};return r(e,t,(function(e){e[s.$5](o)}),(function(){t[s.$5](o),i=!1})),!0},getChannel:function(t){var n=null;return e&&e[s.oI]>0&&(0,a.Iu)(e,(function(e){if(e&&e.queue[s.oI]>0&&((0,a.Iu)(e.queue,(function(e){if(e[s.Ju]===t)return n=e,-1})),n))return-1})),n},flush:function(t,i,o,a){var c=1,l=!1,u=null;function d(){c--,l&&0===c&&(u&&(clearTimeout(u),u=null),i&&i(l),i=null)}return a=a||5e3,r(e,n(),(function(e){e.iterate((function(e){if(e[s.EX]){c++;var n=!1;e[s.EX](t,(function(){n=!0,d()}),o)||n||(t&&null==u?u=setTimeout((function(){u=null,d()}),a):d())}}))}),(function(){l=!0,d()})),!0},_setQueue:function(t){e=t}};return o}(j,e);o[s.y5](N),k[s.y5](N),e[s.H7]=(0,u.Xc)(o),N[s.mE](t,e,o);var f=W();(0,u.pI)(f,o),e[s.H7]=(0,a.N6)((0,u.Xc)(k||[])).slice(),n&&function(t){var n=(0,l.nU)(X(),e);n[s.by](i),e._updateHook&&!0===e._updateHook(n,t)||n[s.$5](t)}(n)}function Q(t){var n,r=null,i=null;return(0,a.Iu)(e[s.H7],(function(e){if(e[s.Ju]===t&&e!==N&&e!==F)return i=e,-1})),!i&&N&&(i=N.getChannel(t)),i&&((n={plugin:i})[s.kt]=function(e){(0,u.Cr)(i)[c.Hr]=!e},n.isEnabled=function(){var e=(0,u.Cr)(i);return!e[s.Ik]&&!e[c.Hr]},n.remove=function(e,t){var n;void 0===e&&(e=!0);var r=[i],o=((n={reason:1})[s.tI]=e,n);Y(r,o,(function(e){e&&K({reason:32,removed:r}),t&&t(e)}))},r=n),r}function X(){if(!D){var n=(k||[]).slice();-1===(0,a.rD)(n,F)&&n[s.y5](F),D=(0,l.PV)((0,u.Xc)(n),t,e)}return D}function Y(n,r,o){if(n&&n[s.oI]>0){var c=(0,l.PV)(n,t,e),u=(0,l.tS)(c,e);u[s.by]((function(){var e=!1,t=[];(0,a.Iu)(A,(function(r,i){R(r,n)?e=!0:t[s.y5](r)})),A=t;var r=[];L&&((0,a.Iu)(L,(function(t,i){var o=[];(0,a.Iu)(t,(function(t){R(t,n)?e=!0:o[s.y5](t)})),r[s.y5](o)})),L=r),o&&o(e),i()})),u[s.$5](r)}else o(!1)}function J(){if(e[s.Uw]&&e[s.Uw].queue){var n=e[s.Uw].queue.slice(0);e[s.Uw].queue[s.oI]=0,(0,a.Iu)(n,(function(n){var r,i=((r={})[s.RS]=q||"InternalMessageId: "+n[s.JR],r.iKey=(0,a.SA)(t[s.sl]),r.time=(0,a._u)(new Date),r.baseType=g.WD.dataType,r.baseData={message:n[s.pM]},r);e.track(i)}))}}function Z(e,t,n,r){return N?N[s.EX](e,t,n||6,r):(t&&t(!1),!0)}function ee(t){var n=e[s.Uw];n?((0,g.ZP)(n,2,73,t),i()):(0,a.$8)(t)}$(),e[s.tZ]=function(){return n},e[s.mE]=function(i,o,l,u){var d,p;M&&(0,a.$8)(E),e[s.tZ]()&&(0,a.$8)("Core should not be initialized more than once"),t=i||{},e[s.GA]=t,(0,a.hX)(i[s.sl])&&(0,a.$8)("Please provide instrumentation key"),v=u,e[T]=u,!0===(p=(0,a.SA)(t.disableDbgExt))&&z&&(v[s.TP](z),z=null),v&&!z&&!0!==p&&(z=(0,m.M)(t),v[s.vR](z)),!(d=(0,a.SA)(t.enablePerfMgr))&&P&&(P=null),d&&(0,a.c2)(t,c.Yd,x),(0,a.c2)(t,c.Bw,{}).NotificationManager=v,l&&(e[s.Uw]=l);var h=(0,a.c2)(t,c.jy,[]);(A=[])[s.y5].apply(A,(0,r.vz)((0,r.vz)([],o,!1),h,!1)),L=(0,a.c2)(t,c.LZ,[]),K(null),j&&0!==j[s.oI]||(0,a.$8)("No "+c.LZ+" available"),n=!0,e.releaseQueue()},e.getTransmissionControls=function(){var e=[];return j&&(0,a.Iu)(j,(function(t){e[s.y5](t.queue)})),(0,a.N6)(e)},e.track=function(n){n.iKey=n.iKey||t[s.sl],n[s.fA]=n[s.fA]||(0,a._u)(new Date),n.ver=n.ver||"4.0",!M&&e[s.tZ]()?W()[s.$5](n):b[s.y5](n)},e[s.ps]=W,e[s.RF]=function(){var t;return v||(v=(0,o.AQ)(((t={})[s.vR]=function(e){},t[s.TP]=function(e){},t[c.fc]=function(e){},t[c.Yp]=function(e,t){},t[c.dI]=function(e,t){},t)),e[T]=v),v},e[s.vR]=function(e){v&&v[s.vR](e)},e[s.TP]=function(e){v&&v[s.TP](e)},e.getCookieMgr=function(){return O||(O=(0,h.xN)(t,e[s.Uw])),O},e.setCookieMgr=function(e){O=e},e[c.kI]=function(){if(!I&&!P&&(0,a.SA)(t.enablePerfMgr)){var n=(0,a.SA)(t[c.Yd]);(0,a.Tn)(n)&&(P=n(e,e[s.RF]()))}return I||P||(0,y.Z4)()},e.setPerfMgr=function(e){I=e},e.eventCnt=function(){return b[s.oI]},e.releaseQueue=function(){if(n&&b[s.oI]>0){var e=b;b=[],(0,a.Iu)(e,(function(e){W()[s.$5](e)}))}},e.pollInternalLogs=function(e){return q=e||null,V=!1,H&&(clearInterval(H),H=null),i(!0)},e[s.Di]=function(){V=!0,H&&(clearInterval(H),H=0,J())},(0,a.o$)(e,(function(){return F}),["addTelemetryInitializer"]),e.unload=function(t,r,i){var o;void 0===t&&(t=!0),n||(0,a.$8)("SDK is not initialized"),M&&(0,a.$8)(E);var c=((o={reason:50})[s.tI]=t,o.flushComplete=!1,o),u=(0,l.tS)(X(),e);function d(t){c.flushComplete=t,M=!0,U.run(u,c),e[s.Di](),u[s.$5](c)}u[s.by]((function(){$(),r&&r(c)}),e),J(),Z(t,d,6,i)||d(!1)},e[s.AP]=Q,e.addPlugin=function(e,t,n,r){if(!e)return r&&r(!1),void ee(C);var i=Q(e[s.Ju]);if(i&&!t)return r&&r(!1),void ee("Plugin ["+e[s.Ju]+"] is already loaded!");var o={reason:16};function a(t){A[s.y5](e),o.added=[e],K(o),r&&r(!0)}if(i){var c=[i.plugin];Y(c,{reason:2,isAsync:!!n},(function(e){e?(o.removed=c,o.reason|=32,a()):r&&r(!1)}))}else a()},e.evtNamespace=function(){return B},e[s.EX]=Z,e.getTraceCtx=function(e){return G||(G=(0,u.u7)()),G},e.setTraceCtx=function(e){G=e||null},(0,a.RF)(e,"addUnloadCb",(function(){return U}),"add")}))}return e.__ieDyn=1,e}()},7428:(e,t,n)=>{"use strict";n.d(t,{s:()=>u});var r=n(9284),i=n(3229),o=n(2504),s=n(5397),a=n(8012),c=n(2755),l="getPlugin",u=function(){function e(){var t,n,u,d,p,h=this;function f(e){void 0===e&&(e=null);var t=e;if(!t){var r=n||(0,a.i8)(null,{},h[s.eT]);t=u&&u[l]?r[i.$o](null,u[l]):r[i.$o](null,u)}return t}function m(e,t,r){e&&(0,o.KY)(e,s.Bw,[],null,o.hX),!r&&t&&(r=t[i.ps]()[i.uR]());var c=u;u&&u[l]&&(c=u[l]()),h[s.eT]=t,n=(0,a.i8)(r,e,t,c)}function g(){t=!1,h[s.eT]=null,n=null,u=null,p=[],d=(0,c.P)()}g(),(0,r.A)(e,h,(function(e){e[i.mE]=function(e,n,r,i){m(e,n,i),t=!0},e[i.Ik]=function(t,n){var r,c=e[s.eT];if(c&&(!t||c===t[s.eT]())){var h,f=!1,m=t||(0,a.tS)(null,c,u&&u[l]?u[l]():u),y=n||((r={reason:0})[i.tI]=!1,r);return e[i.tn]&&!0===e[i.tn](m,y,b)?h=!0:b(),h}function b(){if(!f){f=!0,d.run(m,n);var e=p;p=[],(0,o.Iu)(e,(function(e){e.rm()})),!0===h&&m[i.$5](y),g()}}},e[i.HC]=function(t,n){var r=e[s.eT];if(r&&(!t||r===t[s.eT]())){var o,c=!1,d=t||(0,a.nU)(null,r,u&&u[l]?u[l]():u),p=n||{reason:0};return e._doUpdate&&!0===e._doUpdate(d,p,h)?o=!0:h(),o}function h(){c||(c=!0,m(d.getCfg(),d.core(),d[i.uR]()))}},e._addHook=function(e){e&&((0,o.cy)(e)?p=p.concat(e):p[i.y5](e))},(0,o.RF)(e,"_addUnloadCb",(function(){return d}),"add")})),h[i.e4]=function(e){return f(e)[i.e4]()},h[i.tZ]=function(){return t},h.setInitialized=function(e){t=e},h[i.YH]=function(e){u=e},h[i.$5]=function(e,t){t?t[i.$5](e):u&&(0,o.Tn)(u[s.qT])&&u[s.qT](e,null)},h._getTelCtx=f}return e.__ieDyn=1,e}()},5691:(e,t,n)=>{"use strict";n.d(t,{It:()=>k,d5:()=>C,gi:()=>R,um:()=>_,xN:()=>x});var r=n(3229),i=n(6392),o=n(8323),s=n(2504),a=n(5397),c="toGMTString",l="toUTCString",u="cookie",d="expires",p="enabled",h="isCookieUseDisabled",f="disableCookiesUsage",m="_ckMgr",g=null,y=null,b=null,v=(0,o.YE)(),S={},w={};function C(e,t){var n=x[m]||w[m];return n||(n=x[m]=x(e,t),w[m]=n),n}function T(e){return!e||e.isEnabled()}function E(e,t){return!!(t&&e&&(0,s.cy)(e.ignoreCookies))&&-1!==e.ignoreCookies[r.Sj](t)}function _(e,t){var n;if(e)n=e.getCookieMgr();else if(t){var i=t[r.lK];n=i[m]?i[m]:x(t)}return n||(n=C(t,(e||{})[r.Uw])),n}function x(e,t){var n,i=function(e){var t=e[r.lK]=e[r.lK]||{};if((0,s.KY)(t,"domain",e.cookieDomain,s.Gh,s.hX),(0,s.KY)(t,"path",e.cookiePath||"/",null,s.hX),(0,s.hX)(t[p])){var n=void 0;(0,s.b0)(e[h])||(n=!e[h]),(0,s.b0)(e[f])||(n=!e[f]),t[p]=n}return t}(e||w),u=i.path||"/",g=i.domain,b=!1!==i[p],v=((n={isEnabled:function(){var e=b&&R(t),n=w[m];return e&&n&&v!==n&&(e=T(n)),e}})[r.kt]=function(e){b=!1!==e},n.set=function(e,t,n,p,h){var f=!1;if(T(v)&&!function(e,t){return!!(t&&e&&(0,s.cy)(e.blockedCookies)&&-1!==e.blockedCookies[r.Sj](t))||E(e,t)}(i,e)){var m={},b=(0,s.EH)(t||a.m5),S=b[r.Sj](";");if(-1!==S&&(b=(0,s.EH)(t[r.Re](0,S)),m=I(t[r.Re](S+1))),(0,s.KY)(m,"domain",p||g,s.zz,s.b0),!(0,s.hX)(n)){var w=(0,o.lT)();if((0,s.b0)(m[d])){var C=(0,s.x3)()+1e3*n;if(C>0){var _=new Date;_.setTime(C),(0,s.KY)(m,d,P(_,w?c:l)||P(_,w?c:l)||a.m5,s.zz)}}w||(0,s.KY)(m,"max-age",a.m5+n,null,s.b0)}var x=(0,o.g$)();x&&"https:"===x.protocol&&((0,s.KY)(m,"secure",null,null,s.b0),null===y&&(y=!k(((0,o.w3)()||{})[r.tX])),y&&(0,s.KY)(m,"SameSite","None",null,s.b0)),(0,s.KY)(m,"path",h||u,null,s.b0),(i.setCookie||A)(e,O(b,m)),f=!0}return f},n.get=function(e){var t=a.m5;return T(v)&&!E(i,e)&&(t=(i.getCookie||D)(e)),t},n.del=function(e,t){var n=!1;return T(v)&&(n=v.purge(e,t)),n},n.purge=function(e,n){var r,s=!1;if(R(t)){var c=((r={}).path=n||"/",r[d]="Thu, 01 Jan 1970 00:00:01 GMT",r);(0,o.lT)()||(c["max-age"]="0"),(i.delCookie||A)(e,O(a.m5,c)),s=!0}return s},n);return v[m]=v,v}function R(e){if(null===g){g=!1;try{g=void 0!==(v||{})[u]}catch(t){(0,i.ZP)(e,2,68,"Cannot access document.cookie - "+(0,s.lL)(t),{exception:(0,o.mm)(t)})}}return g}function I(e){var t={};if(e&&e[r.oI]){var n=(0,s.EH)(e)[r.sY](";");(0,s.Iu)(n,(function(e){if(e=(0,s.EH)(e||a.m5)){var n=e[r.Sj]("=");-1===n?t[e]=null:t[(0,s.EH)(e[r.Re](0,n))]=(0,s.EH)(e[r.Re](n+1))}}))}return t}function P(e,t){return(0,s.Tn)(e[t])?e[t]():null}function O(e,t){var n=e||a.m5;return(0,s.z)(t,(function(e,t){n+="; "+e+((0,s.hX)(t)?a.m5:"="+t)})),n}function D(e){var t=a.m5;if(v){var n=v[u]||a.m5;b!==n&&(S=I(n),b=n),t=(0,s.EH)(S[e]||a.m5)}return t}function A(e,t){v&&(v[u]=e+"="+t)}function k(e){return!(!(0,s.Kg)(e)||!(0,s.Ju)(e,"CPU iPhone OS 12")&&!(0,s.Ju)(e,"iPad; CPU OS 12")&&!((0,s.Ju)(e,"Macintosh; Intel Mac OS X 10_14")&&(0,s.Ju)(e,"Version/")&&(0,s.Ju)(e,"Safari"))&&(!(0,s.Ju)(e,"Macintosh; Intel Mac OS X 10_14")||!(0,s.Cv)(e,"AppleWebKit/605.1.15 (KHTML, like Gecko)"))&&!(0,s.Ju)(e,"Chrome/5")&&!(0,s.Ju)(e,"Chrome/6")&&(!(0,s.Ju)(e,"UnrealEngine")||(0,s.Ju)(e,"Chrome"))&&!(0,s.Ju)(e,"UCBrowser/12")&&!(0,s.Ju)(e,"UCBrowser/11"))}},5955:(e,t,n)=>{"use strict";n.d(t,{Rb:()=>S,Ri:()=>T,TV:()=>E,UU:()=>g,WD:()=>w,Yj:()=>_,aq:()=>m,cL:()=>y,fs:()=>v,ht:()=>C,jS:()=>b,rK:()=>f});var r,i=n(7245),o=n(9381),s=n(3229),a=n(5691),c=n(8323),l=n(4838),u=n(2504),d=n(5397),p=n(9668),h=null,f=i.bA;function m(){var e=y();return e[s.Re](0,8)+"-"+e[s.Re](8,12)+"-"+e[s.Re](12,16)+"-"+e[s.Re](16,20)+"-"+e[s.Re](20)}function g(){var e=(0,c.FJ)();return e&&e.now?e.now():(0,u.x3)()}function y(){for(var e,t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],n=d.m5,r=0;r<4;r++)n+=t[15&(e=(0,p.VN)())]+t[e>>4&15]+t[e>>8&15]+t[e>>12&15]+t[e>>16&15]+t[e>>20&15]+t[e>>24&15]+t[e>>28&15];var i=t[8+(3&(0,p.VN)())|0];return n[s.$4](0,8)+n[s.$4](9,4)+"4"+n[s.$4](13,3)+i+n[s.$4](16,3)+n[s.$4](19,12)}var b={_canUseCookies:void 0,isTypeof:u.Ed,isUndefined:u.b0,isNullOrUndefined:u.hX,hasOwnProperty:u.mQ,isFunction:u.Tn,isObject:u.Gv,isDate:u.$P,isArray:u.cy,isError:u.bJ,isString:u.Kg,isNumber:u.Et,isBoolean:u.Lm,toISOString:u._u,arrForEach:u.Iu,arrIndexOf:u.rD,arrMap:u.W$,arrReduce:u.KT,strTrim:u.EH,objCreate:o.AQ,objKeys:u.cG,objDefineAccessors:u.r,addEventHandler:l.So,dateNow:u.x3,isIE:c.lT,disableCookies:w,newGuid:m,perfNow:g,newId:p.Si,randomValue:p.Z1,random32:p.VN,mwcRandomSeed:p.yc,mwcRandom32:p.k5,generateW3CId:y},v={Attach:l.Q3,AttachEvent:l.Q3,Detach:l.Ym,DetachEvent:l.Ym};function S(e,t){var n=(0,a.d5)(e,t),i=b._canUseCookies;return null===h&&(h=[],r=i,(0,u.r)(b,"_canUseCookies",(function(){return r}),(function(e){r=e,(0,u.Iu)(h,(function(t){t[s.kt](e)}))}))),-1===(0,u.rD)(h,n)&&h[s.y5](n),(0,u.Lm)(i)&&n[s.kt](i),(0,u.Lm)(r)&&n[s.kt](r),n}function w(){S()[s.kt](!1)}function C(e){return S(null,e).isEnabled()}function T(e,t){return S(null,e).get(t)}function E(e,t,n,r){S(null,e).set(t,n,null,r)}function _(e,t){return S(null,e).del(t)}},2429:(e,t,n)=>{"use strict";n.d(t,{T:()=>f,Z:()=>h});var r=n(7245),i=n(3229),o=n(2504),s=n(5397),a=n(9668),c=r.KU,l="2.8.15",u="."+(0,a.Si)(6),d=0;function p(e){return 1===e[i.re]||9===e[i.re]||!+e[i.re]}function h(e,t){return void 0===t&&(t=!1),(0,o.cH)(e+d+++(t?"."+l:s.m5)+u)}function f(e){var t={id:h("_aiData-"+(e||s.m5)+"."+l),accept:function(e){return p(e)},get:function(e,n,r,i){var s=e[t.id];return s?s[(0,o.cH)(n)]:(i&&((s=function(e,t){var n=t[e.id];if(!n){n={};try{p(t)&&(function(e,t,n){if(c)try{return c(e,t,{value:n,enumerable:!1,configurable:!0}),!0}catch(e){}return!1}(t,e.id,n)||(t[e.id]=n))}catch(e){}}return n}(t,e))[(0,o.cH)(n)]=r),r)},kill:function(e,t){if(e&&e[t])try{delete e[t]}catch(e){}}};return t}},8074:(e,t,n)=>{"use strict";n.d(t,{$:()=>l,M:()=>u});var r,i=n(3229),o=n(8323),s=["eventsSent","eventsDiscarded","eventsSendRequest","perfEvent"],a=null;function c(e,t){return function(){var n=arguments,r=l(t);if(r){var o=r.listener;o&&o[e]&&o[e][i.y9](o,n)}}}function l(e){var t,n=a;return n||!0===e.disableDbgExt||(n=a||((t=(0,o.EH)("Microsoft"))&&(a=t.ApplicationInsights),a)),n?n.ChromeDbgExt:null}function u(e){if(!r){r={};for(var t=0;t<s[i.oI];t++)r[s[t]]=c(s[t],e)}return r}},6392:(e,t,n)=>{"use strict";n.d(t,{OG:()=>g,Oc:()=>y,WD:()=>d,ZP:()=>m,wq:()=>h,y0:()=>p});var r=n(9284),i=n(3229),o=n(8074),s=n(8323),a=n(2504),c=n(5397);function l(e){return e?'"'+e[i.W7](/\"/g,c.m5)+'"':c.m5}function u(e,t){var n=(0,s.U5)();if(n){var r="log";n[e]&&(r=e),(0,a.Tn)(n[r])&&n[r](t)}}var d=function(){function e(e,t,n,r){void 0===n&&(n=!1);var o=this;o[i.JR]=e,o[i.pM]=(n?"AI: ":"AI (Internal): ")+e;var a=c.m5;(0,s.Z)()&&(a=(0,s.hm)().stringify(r));var u=(t?" message:"+l(t):c.m5)+(r?" props:"+l(a):c.m5);o[i.pM]+=u}return e.dataType="MessageData",e}();function p(e,t){return(e||{})[i.Uw]||new h(t)}var h=function(){function e(t){this.identifier="DiagnosticLogger",this.queue=[];var n,l,p,h,f=0,m={};(0,r.A)(e,this,(function(e){function r(t,n){if(!(f>=p)){var r=!0,o="AITR_"+n[i.JR];if(m[o]?r=!1:m[o]=!0,r&&(t<=l&&(e.queue[i.y5](n),f++,g(1===t?"error":"warn",n)),f===p)){var s="Internal events throttle limit per PageView reached for this app.",a=new d(23,s,!1);e.queue[i.y5](a),1===t?e[c.Zi](s):e[c.Tj](s)}}}function g(e,n){var r=(0,o.$)(t||{});r&&r[i.e4]&&r[i.e4](e,n)}!function(e){n=(0,a.SA)(e.loggingLevelConsole,0),l=(0,a.SA)(e.loggingLevelTelemetry,1),p=(0,a.SA)(e.maxMessageLimit,25),h=(0,a.SA)(e.enableDebug,(0,a.SA)(e[i.a$],!1))}(t||{}),e.consoleLoggingLevel=function(){return n},e.telemetryLoggingLevel=function(){return l},e.maxInternalMessageLimit=function(){return p},e[i.a$]=function(){return h},e.throwInternal=function(t,o,l,u,p){void 0===p&&(p=!1);var f=new d(o,l,p,u);if(h)throw(0,s.mm)(f);var y=1===t?c.Zi:c.Tj;if((0,a.b0)(f[i.pM]))g("throw"+(1===t?"Critical":"Warning"),f);else{if(p){var b=+f[i.JR];!m[b]&&n>=t&&(e[y](f[i.pM]),m[b]=!0)}else n>=t&&e[y](f[i.pM]);r(t,f)}},e[c.Tj]=function(e){u("warn",e),g("warning",e)},e[c.Zi]=function(e){u("error",e),g("error",e)},e.resetInternalMessageCount=function(){f=0,m={}},e[i.sx]=r}))}return e.__ieDyn=1,e}();function f(e){return e||new h}function m(e,t,n,r,i,o){void 0===o&&(o=!1),f(e).throwInternal(t,n,r,i,o)}function g(e,t){f(e)[c.Tj](t)}function y(e,t,n){f(e)[i.sx](t,n)}},8323:(e,t,n)=>{"use strict";n.d(t,{$Z:()=>ne,EH:()=>O,FJ:()=>U,Iu:()=>re,JK:()=>F,L0:()=>K,MY:()=>H,PV:()=>Z,Pt:()=>ie,R7:()=>J,Sf:()=>oe,U5:()=>B,Uf:()=>Y,Vd:()=>D,Wt:()=>k,YE:()=>N,Z:()=>z,cU:()=>P,g$:()=>q,hm:()=>G,iN:()=>V,lT:()=>W,lV:()=>$,mm:()=>Q,nr:()=>X,sN:()=>se,tw:()=>M,w3:()=>j,w9:()=>L,xk:()=>ee,zk:()=>A});var r=n(7245),i=n(9381),o=n(3229),s=n(2504),a=n(5397),c="window",l="document",u="documentMode",d="navigator",p="history",h="location",f="console",m="performance",g="JSON",y="crypto",b="msCrypto",v="ReactNative",S="msie",w="trident/",C="XMLHttpRequest",T=null,E=null,_=!1,x=null,R=null;function I(e,t){var n=!1;if(e){try{if(!(n=t in e)){var i=e[r.vR];i&&(n=t in i)}}catch(e){}if(!n)try{var o=new e;n=!(0,s.b0)(o[t])}catch(e){}}return n}function P(e){_=e}function O(e){var t=(0,i.mS)();return t&&t[e]?t[e]:e===c&&D()?window:null}function D(){return Boolean(typeof window===r._1&&window)}function A(){return D()?window:O(c)}function k(){return Boolean(typeof document===r._1&&document)}function N(){return k()?document:O(l)}function L(){return Boolean(typeof navigator===r._1&&navigator)}function j(){return L()?navigator:O(d)}function M(){return Boolean(typeof history===r._1&&history)}function F(){return M()?history:O(p)}function q(e){if(e&&_){var t=O("__mockLocation");if(t)return t}return typeof location===r._1&&location?location:O(h)}function B(){return typeof console!==r.bA?console:O(f)}function U(){return O(m)}function z(){return Boolean(typeof JSON===r._1&&JSON||null!==O(g))}function G(){return z()?JSON||O(g):null}function H(){return O(y)}function V(){return O(b)}function $(){var e=j();return!(!e||!e.product)&&e.product===v}function W(){var e=j();if(e&&(e[o.tX]!==E||null===T)){var t=((E=e[o.tX])||a.m5)[o.OL]();T=(0,s.Ju)(t,S)||(0,s.Ju)(t,w)}return T}function K(e){if(void 0===e&&(e=null),!e){var t=j()||{};e=t?(t[o.tX]||a.m5)[o.OL]():a.m5}var n=(e||a.m5)[o.OL]();if((0,s.Ju)(n,S)){var r=N()||{};return Math.max(parseInt(n[o.sY](S)[1]),r[u]||0)}if((0,s.Ju)(n,w)){var i=parseInt(n[o.sY](w)[1]);if(i)return i+4}return null}function Q(e){var t=Object[r.vR].toString[o.Ek](e),n=a.m5;return"[object Error]"===t?n="{ stack: '"+e.stack+"', message: '"+e.message+"', name: '"+e[o.RS]+"'":z()&&(n=G().stringify(e)),t+n}function X(e){if(!e||!(0,s.Kg)(e)){var t=j()||{};e=t?(t[o.tX]||a.m5)[o.OL]():a.m5}return(e||a.m5)[o.OL]()[o.Sj]("safari")>=0}function Y(){return null===R&&(R=L()&&Boolean(j().sendBeacon)),R}function J(e){var t=!1;try{t=!!O("fetch");var n=O("Request");t&&e&&n&&(t=I(n,"keepalive"))}catch(e){}return t}function Z(){return null===x&&(x=typeof XDomainRequest!==r.bA)&&ee()&&(x=x&&!I(O(C),"withCredentials")),x}function ee(){var e=!1;try{e=!!O(C)}catch(e){}return e}function te(e,t){if(e)for(var n=0;n<e[o.oI];n++){var r=e[n];if(r[o.RS]&&r[o.RS]===t)return r}return{}}function ne(e){var t=N();return t&&e?te(t.querySelectorAll("meta"),e).content:null}function re(e){var t,n=U();if(n){var r=n.getEntriesByType("navigation")||[];t=te((r[o.oI]>0?r[0]:{}).serverTiming,e).description}return t}function ie(e,t){return!!(e&&e.dispatchEvent&&t)&&(e.dispatchEvent(t),!0)}function oe(e,t){var n=null,r={detail:t||null};if((0,s.Tn)(CustomEvent))n=new CustomEvent(e,r);else{var i=N();i&&i.createEvent&&(n=i.createEvent("CustomEvent")).initCustomEvent(e,!0,!0,r)}return n}function se(e,t,n){var r=(0,i.mS)();if(r&&r.CustomEvent)try{return ie(r,oe(e,{cfg:t||null,customDetails:n||null}))}catch(e){}return!1}},4838:(e,t,n)=>{"use strict";n.d(t,{Ds:()=>G,El:()=>I,Fc:()=>H,Hm:()=>A,ML:()=>N,Q3:()=>L,So:()=>M,Wg:()=>U,Ym:()=>j,ee:()=>z,lQ:()=>B,mB:()=>k,oS:()=>$,sq:()=>V,vF:()=>W,zh:()=>F});var r=n(3229),i=n(2429),o=n(8323),s=n(2504),a=n(5397),c="on",l="attachEvent",u="addEventListener",d="detachEvent",p="removeEventListener",h="events",f="visibilitychange",m="pagehide",g="pageshow",y="unload",b="beforeunload",v=(0,i.Z)("aiEvtPageHide"),S=(0,i.Z)("aiEvtPageShow"),w=/\.[\.]+/g,C=/[\.]+$/,T=1,E=(0,i.T)("events"),_=/^([^.]*)(?:\.(.+)|)/;function x(e){return e&&e[r.W7]?e[r.W7](/^[\s\.]+|(?=[\s\.])[\.\s]+$/g,a.m5):e}function R(e,t){var n;if(t){var i=a.m5;(0,s.cy)(t)?(i=a.m5,(0,s.Iu)(t,(function(e){(e=x(e))&&("."!==e[0]&&(e="."+e),i+=e)}))):i=x(t),i&&("."!==i[0]&&(i="."+i),e=(e||a.m5)+i)}var o=_.exec(e||a.m5)||[];return(n={})[r.QM]=o[1],n.ns=(o[2]||a.m5).replace(w,".").replace(C,a.m5)[r.sY](".").sort().join("."),n}function I(e,t,n){var i=[],o=E.get(e,h,{},!1),c=R(t,n);return(0,s.z)(o,(function(e,t){(0,s.Iu)(t,(function(e){var t;c[r.QM]&&c[r.QM]!==e.evtName[r.QM]||c.ns&&c.ns!=c.ns||i[r.y5](((t={})[r.RS]=e.evtName[r.QM]+(e.evtName.ns?"."+e.evtName.ns:a.m5),t.handler=e[r.Yo],t))}))})),i}function P(e,t,n){void 0===n&&(n=!0);var r=E.get(e,h,{},n),i=r[t];return i||(i=r[t]=[]),i}function O(e,t,n,i){e&&t&&t[r.QM]&&(e[p]?e[p](t[r.QM],n,i):e[d]&&e[d](c+t[r.QM],n))}function D(e,t,n,i){for(var o=t[r.oI];o--;){var s=t[o];s&&(n.ns&&n.ns!==s.evtName.ns||i&&!i(s)||(O(e,s.evtName,s[r.Yo],s.capture),t[r.Ic](o,1)))}}function A(e,t){return t?R("xx",(0,s.cy)(t)?[e].concat(t):[e,t]).ns[r.sY]("."):e}function k(e,t,n,i,o){var s;void 0===o&&(o=!1);var a=!1;if(e)try{var d=R(t,i);if(a=function(e,t,n,i){var o=!1;return e&&t&&t[r.QM]&&n&&(e[u]?(e[u](t[r.QM],n,i),o=!0):e[l]&&(e[l](c+t[r.QM],n),o=!0)),o}(e,d,n,o),a&&E.accept(e)){var p=((s={guid:T++,evtName:d})[r.Yo]=n,s.capture=o,s);P(e,d.type)[r.y5](p)}}catch(e){}return a}function N(e,t,n,i,o){if(void 0===o&&(o=!1),e)try{var a=R(t,i),c=!1;!function(e,t,n){if(t[r.QM])D(e,P(e,t[r.QM]),t,n);else{var i=E.get(e,h,{});(0,s.z)(i,(function(r,i){D(e,i,t,n)})),0===(0,s.cG)(i)[r.oI]&&E.kill(e,h)}}(e,a,(function(e){return!((!a.ns||n)&&e[r.Yo]!==n||(c=!0,0))})),c||O(e,a,n,o)}catch(e){}}function L(e,t,n,r){return void 0===r&&(r=!1),k(e,t,n,null,r)}function j(e,t,n,r){void 0===r&&(r=!1),N(e,t,n,null,r)}function M(e,t,n){var r=!1,i=(0,o.zk)();i&&(r=k(i,e,t,n),r=k(i.body,e,t,n)||r);var s=(0,o.YE)();return s&&(r=k(s,e,t,n)||r),r}function F(e,t,n){var r=(0,o.zk)();r&&(N(r,e,t,n),N(r.body,e,t,n));var i=(0,o.YE)();i&&N(i,e,t,n)}function q(e,t,n,i){var o=!1;return t&&e&&e[r.oI]>0&&(0,s.Iu)(e,(function(e){e&&(n&&-1!==(0,s.rD)(n,e)||(o=M(e,t,i)||o))})),o}function B(e,t,n,i){var o=!1;return t&&e&&(0,s.cy)(e)&&!(o=q(e,t,n,i))&&n&&n[r.oI]>0&&(o=q(e,t,null,i)),o}function U(e,t,n){e&&(0,s.cy)(e)&&(0,s.Iu)(e,(function(e){e&&F(e,t,n)}))}function z(e,t,n){return B([b,y,m],e,t,n)}function G(e,t){U([b,y,m],e,t)}function H(e,t,n){var r=A(v,n),i=q([m],e,t,r);return t&&-1!==(0,s.rD)(t,f)||(i=q([f],(function(t){var n=(0,o.YE)();e&&n&&"hidden"===n.visibilityState&&e(t)}),t,r)||i),!i&&t&&(i=H(e,null,n)),i}function V(e,t){var n=A(v,t);U([m],e,n),U([f],null,n)}function $(e,t,n){var r=A(S,n),i=q([g],e,t,r);return!(i=q([f],(function(t){var n=(0,o.YE)();e&&n&&"visible"===n.visibilityState&&e(t)}),t,r)||i)&&t&&(i=$(e,null,n)),i}function W(e,t){var n=A(S,t);U([g],e,n),U([f],null,n)}},2504:(e,t,n)=>{"use strict";n.d(t,{$8:()=>Ee,$P:()=>Q,Bm:()=>te,CP:()=>De,Cv:()=>$,EA:()=>F,EH:()=>ce,Ed:()=>j,Et:()=>Z,Gh:()=>B,Gv:()=>z,Iu:()=>ie,Ju:()=>K,KT:()=>ae,KY:()=>ve,Kg:()=>J,Lm:()=>ee,N6:()=>me,Qd:()=>ne,RF:()=>Re,SA:()=>we,SZ:()=>Pe,Tn:()=>G,W$:()=>se,_u:()=>re,b0:()=>M,bJ:()=>Y,c2:()=>Se,cG:()=>de,cH:()=>H,cy:()=>X,fw:()=>N,hW:()=>Oe,hX:()=>q,js:()=>ge,lL:()=>be,mQ:()=>U,o$:()=>Ie,ol:()=>fe,qz:()=>xe,r:()=>pe,rD:()=>oe,tG:()=>W,wo:()=>Ce,x3:()=>ye,z:()=>V,zC:()=>L,zz:()=>Te});var r=n(7245),i=n(9381),o=n(3229),s=n(5397),a="toISOString",c="endsWith",l="startsWith",u="indexOf",d="map",p="reduce",h="trim",f="toString",m="__proto__",g="constructor",y=r.KU,b=r.s6.freeze,v=r.s6.seal,S=r.s6.keys,w=String[r.vR],C=w[h],T=w[c],E=w[l],_=Date[r.vR][a],x=Array.isArray,R=r.Wy[f],I=r.J$[f],P=I[o.Ek](r.s6),O=/-([a-z])/g,D=/([^\w\d_$])/g,A=/^(\d+[\w\d_$])/,k=Object.getPrototypeOf;function N(e){if(e){if(k)return k(e);var t=e[m]||e[r.vR]||e[g];if(t)return t}return null}function L(e){return R[o.Ek](e)}function j(e,t){return typeof e===t}function M(e){return void 0===e||typeof e===r.bA}function F(e){return!M(e)}function q(e){return null===e||M(e)}function B(e){return!q(e)}function U(e,t){return!(!e||!r.J$[o.Ek](e,t))}function z(e){return!(!e||typeof e!==r._1)}function G(e){return!(!e||typeof e!==r.hW)}function H(e){var t=e;return t&&J(t)&&(t=(t=(t=t[o.W7](O,(function(e,t){return t.toUpperCase()})))[o.W7](D,"_"))[o.W7](A,(function(e,t){return"_"+t}))),t}function V(e,t){if(e)for(var n in e)r.J$[o.Ek](e,n)&&t[o.Ek](e,n,e[n])}function $(e,t){var n=!1;return e&&t&&!(n=e===t)&&(n=T?e[c](t):function(e,t){var n=!1,r=t?t[o.oI]:0,i=e?e[o.oI]:0;if(r&&i&&i>=r&&!(n=e===t)){for(var s=i-1,a=r-1;a>=0;a--){if(e[s]!=t[a])return!1;s--}n=!0}return n}(e,t)),n}function W(e,t){var n=!1;return e&&t&&!(n=e===t)&&(n=E?e[l](t):function(e,t){var n=!1,r=t?t[o.oI]:0;if(e&&r&&e[o.oI]>=r&&!(n=e===t)){for(var i=0;i<r;i++)if(e[i]!==t[i])return!1;n=!0}return n}(e,t)),n}function K(e,t){return!(!e||!t)&&-1!==e[o.Sj](t)}function Q(e){return!(!e||"[object Date]"!==R[o.Ek](e))}var X=x||function(e){return!(!e||"[object Array]"!==R[o.Ek](e))};function Y(e){return!(!e||"[object Error]"!==R[o.Ek](e))}function J(e){return"string"==typeof e}function Z(e){return"number"==typeof e}function ee(e){return"boolean"==typeof e}function te(e){return"symbol"==typeof e}function ne(e){var t=!1;if(e&&"object"==typeof e){var n=k?k(e):N(e);n?(n[g]&&r.J$[o.Ek](n,g)&&(n=n[g]),t=typeof n===r.hW&&I[o.Ek](n)===P):t=!0}return t}function re(e){if(e)return _?e[a]():function(e){if(e&&e.getUTCFullYear){var t=function(e){var t=String(e);return 1===t[o.oI]&&(t="0"+t),t};return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())+"."+String((e.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}}(e)}function ie(e,t,n){var r=e[o.oI];try{for(var i=0;i<r&&(!(i in e)||-1!==t[o.Ek](n||e,e[i],i,e));i++);}catch(e){}}function oe(e,t,n){if(e){if(e[u])return e[u](t,n);var r=e[o.oI],i=n||0;try{for(var s=Math.max(i>=0?i:r-Math.abs(i),0);s<r;s++)if(s in e&&e[s]===t)return s}catch(e){}}return-1}function se(e,t,n){var r;if(e){if(e[d])return e[d](t,n);var i=e[o.oI],s=n||e;r=new Array(i);try{for(var a=0;a<i;a++)a in e&&(r[a]=t[o.Ek](s,e[a],e))}catch(e){}}return r}function ae(e,t,n){var r;if(e){if(e[p])return e[p](t,n);var i=e[o.oI],s=0;if(arguments[o.oI]>=3)r=arguments[2];else{for(;s<i&&!(s in e);)s++;r=e[s++]}for(;s<i;)s in e&&(r=t(r,e[s],s,e)),s++}return r}function ce(e){return e&&(e=C&&e[h]?e[h]():e[o.W7]?e[o.W7](/^\s+|(?=\s)\s+$/g,s.m5):e),e}var le=!{toString:null}.propertyIsEnumerable("toString"),ue=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"];function de(e){var t=typeof e;if(t===r.hW||t===r._1&&null!==e||(0,i.zk)("objKeys called on non-object"),!le&&S)return S(e);var n=[];for(var s in e)e&&r.J$[o.Ek](e,s)&&n[o.y5](s);if(le)for(var a=ue[o.oI],c=0;c<a;c++)e&&r.J$[o.Ek](e,ue[c])&&n[o.y5](ue[c]);return n}function pe(e,t,n,r){if(y)try{var i={enumerable:!0,configurable:!0};return n&&(i.get=n),r&&(i.set=r),y(e,t,i),!0}catch(e){}return!1}function he(e){return e}function fe(e){return b&&V(e,(function(e,t){(X(t)||z(t))&&b(t)})),me(e)}var me=b||he,ge=v||he;function ye(){var e=Date;return e.now?e.now():(new e).getTime()}function be(e){return Y(e)?e[o.RS]:s.m5}function ve(e,t,n,r,i){var o=n;return e&&((o=e[t])===n||i&&!i(o)||r&&!r(n)||(o=n,e[t]=o)),o}function Se(e,t,n){var r;return e?!(r=e[t])&&q(r)&&(r=M(n)?{}:n,e[t]=r):r=M(n)?{}:n,r}function we(e,t){return q(e)?t:e}function Ce(e){return!e}function Te(e){return!!e}function Ee(e){throw new Error(e)}function _e(e,t){var n=null,r=null;return G(e)?n=e:r=e,function(){var e=arguments;if(n&&(r=n()),r)return r[t][o.y9](r,e)}}function xe(e,t,n){if(e&&t&&z(e)&&z(t)){var r=function(r){if(J(r)){var i=t[r];G(i)?n&&!n(r,!0,t,e)||(e[r]=_e(t,r)):n&&!n(r,!1,t,e)||(U(e,r)&&delete e[r],pe(e,r,(function(){return t[r]}),(function(e){t[r]=e}))||(e[r]=i))}};for(var i in t)r(i)}return e}function Re(e,t,n,r,i){e&&t&&n&&(!1!==i||M(e[t]))&&(e[t]=_e(n,r))}function Ie(e,t,n,r){return e&&t&&z(e)&&X(n)&&ie(n,(function(n){J(n)&&Re(e,n,t,n,r)})),e}function Pe(e){return function(){var t=this;e&&V(e,(function(e,n){t[e]=n}))}}function Oe(e){return e&&r.zi&&(e=(0,r.s6)((0,r.zi)({},e))),e}function De(e,t,n,i,s,a){var c=arguments,l=c[0]||{},u=c[o.oI],d=!1,p=1;for(u>0&&ee(l)&&(d=l,l=c[p]||{},p++),z(l)||(l={});p<u;p++){var h=c[p],f=X(h),m=z(h);for(var g in h)if(f&&g in h||m&&r.J$[o.Ek](h,g)){var y=h[g],b=void 0;if(d&&y&&((b=X(y))||ne(y))){var v=l[g];b?X(v)||(v=[]):ne(v)||(v={}),y=De(d,v,y)}void 0!==y&&(l[g]=y)}}return l}},5397:(e,t,n)=>{"use strict";n.d(t,{Bw:()=>c,Hr:()=>a,LZ:()=>i,Tj:()=>y,Vo:()=>d,Yd:()=>s,Yp:()=>h,Zi:()=>g,dI:()=>f,eT:()=>o,fc:()=>p,jy:()=>l,kI:()=>b,l0:()=>m,m5:()=>r,qT:()=>u});var r="",i="channels",o="core",s="createPerfMgr",a="disabled",c="extensionConfig",l="extensions",u="processTelemetry",d="priority",p="eventsSent",h="eventsDiscarded",f="eventsSendRequest",m="perfEvent",g="errorToConsole",y="warnToConsole",b="getPerfMgr"},4013:(e,t,n)=>{"use strict";n.d(t,{h:()=>c});var r=n(9284),i=n(3229),o=n(2504),s=n(5397);function a(e,t,n,r){(0,o.Iu)(e,(function(e){if(e&&e[t])if(n)setTimeout((function(){return r(e)}),0);else try{r(e)}catch(e){}}))}var c=function(){function e(t){this.listeners=[];var n=!!(t||{}).perfEvtsSendAll;(0,r.A)(e,this,(function(e){e[i.vR]=function(t){e.listeners[i.y5](t)},e[i.TP]=function(t){for(var n=(0,o.rD)(e[i.lJ],t);n>-1;)e.listeners[i.Ic](n,1),n=(0,o.rD)(e[i.lJ],t)},e[s.fc]=function(t){a(e[i.lJ],s.fc,!0,(function(e){e[s.fc](t)}))},e[s.Yp]=function(t,n){a(e[i.lJ],s.Yp,!0,(function(e){e[s.Yp](t,n)}))},e[s.dI]=function(t,n){a(e[i.lJ],s.dI,n,(function(e){e[s.dI](t,n)}))},e[s.l0]=function(t){t&&(!n&&t[i.Zu]()||a(e[i.lJ],s.l0,!1,(function(e){t[i.tI]?setTimeout((function(){return e[s.l0](t)}),0):e[s.l0](t)})))}}))}return e.__ieDyn=1,e}()},5441:(e,t,n)=>{"use strict";n.d(t,{NS:()=>p,Q6:()=>d,Z4:()=>g,jv:()=>m,r2:()=>f});var r=n(9284),i=n(3229),o=n(2504),s=n(5397),a="ctx",c="ParentContextKey",l="ChildrenContextKey",u=null,d=function(){function e(t,n,r){var s,u=this,d=!1;u.start=(0,o.x3)(),u[i.RS]=t,u[i.tI]=r,u[i.Zu]=function(){return!1},(0,o.Tn)(n)&&(d=(0,o.r)(u,"payload",(function(){return!s&&(0,o.Tn)(n)&&(s=n(),n=null),s}))),u[i.O_]=function(t){return t?t===e[c]||t===e[l]?u[t]:(u[a]||{})[t]:null},u[i.e_]=function(t,n){t&&(t===e[c]?(u[t]||(u[i.Zu]=function(){return!0}),u[t]=n):t===e[l]?u[t]=n:(u[a]=u[a]||{})[t]=n)},u[i.Ru]=function(){var t=0,r=u[i.O_](e[l]);if((0,o.cy)(r))for(var s=0;s<r[i.oI];s++){var a=r[s];a&&(t+=a[i.fA])}u[i.fA]=(0,o.x3)()-u.start,u.exTime=u[i.fA]-t,u[i.Ru]=function(){},!d&&(0,o.Tn)(n)&&(u.payload=n())}}return e.ParentContextKey="parent",e.ChildrenContextKey="childEvts",e}(),p=function(){function e(t){this.ctx={},(0,r.A)(e,this,(function(e){e.create=function(e,t,n){return new d(e,t,n)},e.fire=function(e){e&&(e[i.Ru](),t&&(0,o.Tn)(t[s.l0])&&t[s.l0](e))},e[i.e_]=function(t,n){t&&((e[a]=e[a]||{})[t]=n)},e[i.O_]=function(t){return(e[a]||{})[t]}}))}return e.__ieDyn=1,e}(),h="CoreUtils.doPerf";function f(e,t,n,r,o){if(e){var a=e;if(a[s.kI]&&(a=a[s.kI]()),a){var u=void 0,p=a[i.O_](h);try{if(u=a.create(t(),r,o)){if(p&&u[i.e_]&&(u[i.e_](d[c],p),p[i.O_]&&p[i.e_])){var f=p[i.O_](d[l]);f||(f=[],p[i.e_](d[l],f)),f[i.y5](u)}return a[i.e_](h,u),n(u)}}catch(e){u&&u[i.e_]&&u[i.e_]("exception",e)}finally{u&&a.fire(u),a[i.e_](h,p)}}}return n()}function m(e){u=e}function g(){return u}},8012:(e,t,n)=>{"use strict";n.d(t,{PV:()=>b,W0:()=>v,i8:()=>m,nU:()=>y,tS:()=>g});var r=n(3229),i=n(6392),o=n(8323),s=n(2504),a=n(5397),c=n(5441),l=n(1267),u="TelemetryPluginChain",d="_hasRun",p="_getTelCtx",h=0;function f(e,t,n,c){var l=null,u=[];null!==c&&(l=c?function(e,t,n){for(;e;){if(e[r.AP]()===n)return e;e=e[r.uR]()}return b([n],t[r.GA]||{},t)}(e,n,c):e);var d={_next:function(){var e=l;if(l=e?e[r.uR]():null,!e){var t=u;t&&t[r.oI]>0&&((0,s.Iu)(t,(function(e){try{e.func[r.Ek](e.self,e.args)}catch(e){(0,i.ZP)(n[r.Uw],2,73,"Unexpected Exception during onComplete - "+(0,o.mm)(e))}})),u=[])}return e},ctx:{core:function(){return n},diagLog:function(){return(0,i.y0)(n,t)},getCfg:function(){return t},getExtCfg:p,getConfig:function(e,n,r){void 0===r&&(r=!1);var i,o=p(e,null);return o&&!(0,s.hX)(o[n])?i=o[n]:t&&!(0,s.hX)(t[n])&&(i=t[n]),(0,s.hX)(i)?r:i},hasNext:function(){return!!l},getNext:function(){return l},setNext:function(e){l=e},iterate:function(e){for(var t;t=d._next();){var n=t[r.AP]();n&&e(n)}},onComplete:function(e,t){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];e&&u[r.y5]({func:e,self:(0,s.b0)(t)?d.ctx:t,args:n})}}};function p(e,n,r){var i;if(void 0===n&&(n={}),void 0===r&&(r=0),t){var o=t[a.Bw];o&&e&&(i=o[e])}if(i){if((0,s.Gv)(n)&&0!==r){var c=(0,s.CP)(!0,n,i);t&&2===r&&(0,s.z)(n,(function(e){if((0,s.hX)(c[e])){var n=t[e];(0,s.hX)(n)||(c[e]=n)}})),i=c}}else i=n;return i}return d}function m(e,t,n,i){var o=f(e,t,n,i),c=o.ctx;return c[r.$5]=function(e){var t=o._next();return t&&t[a.qT](e,c),!t},c[r.$o]=function(e,i){return void 0===e&&(e=null),(0,s.cy)(e)&&(e=b(e,t,n,i)),m(e||c[r.uR](),t,n,i)},c}function g(e,t,n){var i=t[r.GA]||{},o=f(e,i,t,n),a=o.ctx;return a[r.$5]=function(e){var t=o._next();return t&&t.unload(a,e),!t},a[r.$o]=function(e,n){return void 0===e&&(e=null),(0,s.cy)(e)&&(e=b(e,i,t,n)),g(e||a[r.uR](),t,n)},a}function y(e,t,n){var i=t[r.GA]||{},o=f(e,i,t,n).ctx;return o[r.$5]=function(e){return o.iterate((function(t){(0,s.Tn)(t[r.HC])&&t[r.HC](o,e)}))},o[r.$o]=function(e,n){return void 0===e&&(e=null),(0,s.cy)(e)&&(e=b(e,i,t,n)),y(e||o[r.uR](),t,n)},o}function b(e,t,n,f){var g=null,y=!f;if((0,s.cy)(e)&&e[r.oI]>0){var v=null;(0,s.Iu)(e,(function(e){if(y||f!==e||(y=!0),y&&e&&(0,s.Tn)(e[a.qT])){var b=function(e,t,n){var f,g=null,y=(0,s.Tn)(e[a.qT]),b=(0,s.Tn)(e[r.YH]),v={getPlugin:function(){return e},getNext:function(){return g},processTelemetry:function(i,o){S(o=o||function(){var r;return e&&(0,s.Tn)(e[p])&&(r=e[p]()),r||(r=m(v,t,n)),r}(),(function(t){if(!e||!y)return!1;var n=(0,l.Cr)(e);return!n[r.Ik]&&!n[a.Hr]&&(b&&e[r.YH](g),e[a.qT](i,t),!0)}),"processTelemetry",(function(){return{item:i}}),!i.sync)||o[r.$5](i)},unload:function(t,n){S(t,(function(){var i=!1;if(e){var o=(0,l.Cr)(e),s=e[a.eT]||o[a.eT];!e||s&&s!==t.core()||o[r.Ik]||(o[a.eT]=null,o[r.Ik]=!0,o[r.tZ]=!1,e[r.Ik]&&!0===e[r.Ik](t,n)&&(i=!0))}return i}),"unload",(function(){}),n[r.tI])||t[r.$5](n)},update:function(t,n){S(t,(function(){var i=!1;if(e){var o=(0,l.Cr)(e),s=e[a.eT]||o[a.eT];!e||s&&s!==t.core()||o[r.Ik]||e[r.HC]&&!0===e[r.HC](t,n)&&(i=!0)}return i}),"update",(function(){}),!1)||t[r.$5](n)},_id:f=e?e[r.Ju]+"-"+e[a.Vo]+"-"+h++:"Unknown-0-"+h++,_setNext:function(e){g=e}};function S(t,n,s,l,p){var h=!1,m=e?e[r.Ju]:u,y=t[d];return y||(y=t[d]={}),t.setNext(g),e&&(0,c.r2)(t[a.eT](),(function(){return m+":"+s}),(function(){y[f]=!0;try{var e=g?g._id:a.m5;e&&(y[e]=!1),h=n(t)}catch(e){var c=!g||y[g._id];c&&(h=!0),g&&c||(0,i.ZP)(t[r.e4](),1,73,"Plugin ["+m+"] failed during "+s+" - "+(0,o.mm)(e)+", run flags: "+(0,o.mm)(y))}}),l,p),h}return(0,s.N6)(v)}(e,t,n);g||(g=b),v&&v._setNext(b),v=b}}))}return f&&!g?b([f],t,n):g}var v=function(e,t,n,r){var i=m(e,t,n,r);(0,s.o$)(this,i,(0,s.cG)(i))}},9668:(e,t,n)=>{"use strict";n.d(t,{Si:()=>b,VN:()=>m,Z1:()=>f,k5:()=>y,yc:()=>g});var r=n(3229),i=n(8323),o=n(2504),s=n(5397),a=4294967296,c=4294967295,l=!1,u=123456789,d=987654321;function p(e){e<0&&(e>>>=0),u=123456789+e&c,d=987654321-e&c,l=!0}function h(){try{var e=2147483647&(0,o.x3)();p((Math.random()*a^e)+e)}catch(e){}}function f(e){return e>0?Math.floor(m()/c*(e+1))>>>0:0}function m(e){var t=0,n=(0,i.MY)()||(0,i.iN)();return n&&n.getRandomValues&&(t=n.getRandomValues(new Uint32Array(1))[0]&c),0===t&&(0,i.lT)()&&(l||h(),t=y()&c),0===t&&(t=Math.floor(a*Math.random()|0)),e||(t>>>=0),t}function g(e){e?p(e):h()}function y(e){var t=((d=36969*(65535&d)+(d>>16)&c)<<16)+(65535&(u=18e3*(65535&u)+(u>>16)&c))>>>0&c;return e||(t>>>=0),t}function b(e){void 0===e&&(e=22);for(var t=m()>>>0,n=0,i=s.m5;i[r.oI]<e;)n++,i+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(63&t),t>>>=6,5===n&&(t=(m()<<2&4294967295|3&t)>>>0,n=0);return i}},1267:(e,t,n)=>{"use strict";n.d(t,{Cr:()=>l,Xc:()=>d,pI:()=>u,s4:()=>p,u7:()=>h});var r=n(3229),i=n(2429),o=n(2504),s=n(5397),a=n(2675),c=(0,i.T)("plugin");function l(e){return c.get(e,"state",{},!0)}function u(e,t){for(var n,i=[],a=null,c=e[r.uR]();c;){var u=c[r.AP]();u&&(a&&(0,o.Tn)(a[r.YH])&&(0,o.Tn)(u[s.qT])&&a[r.YH](u),((0,o.Tn)(u[r.tZ])?u[r.tZ]():(n=l(u))[r.tZ])||i[r.y5](u),a=u,c=c[r.uR]())}(0,o.Iu)(i,(function(i){var o=e[s.eT]();i[r.mE](e.getCfg(),o,t,e[r.uR]()),n=l(i),i[s.eT]||n[s.eT]||(n[s.eT]=o),n[r.tZ]=!0,delete n[r.Ik]}))}function d(e){return e.sort((function(e,t){var n=0;if(t){var r=(0,o.Tn)(t[s.qT]);(0,o.Tn)(e[s.qT])?n=r?e[s.Vo]-t[s.Vo]:1:r&&(n=-1)}else n=e?1:-1;return n}))}function p(e,t,n,i){var s=0;return function i(){for(;s<e[r.oI];){var a=e[s++];if(a){var c=a._doUnload||a[r.tn];if((0,o.Tn)(c)&&!0===c[r.Ek](a,t,n,i))return!0}}}()}function h(e){var t={};return{getName:function(){return t[r.RS]},setName:function(n){e&&e.setName(n),t[r.RS]=n},getTraceId:function(){return t[r.P5]},setTraceId:function(n){e&&e.setTraceId(n),(0,a.hX)(n)&&(t[r.P5]=n)},getSpanId:function(){return t[r.wi]},setSpanId:function(n){e&&e.setSpanId(n),(0,a.wN)(n)&&(t[r.wi]=n)},getTraceFlags:function(){return t[r.Rr]},setTraceFlags:function(n){e&&e.setTraceFlags(n),t[r.Rr]=n}}}},2755:(e,t,n)=>{"use strict";n.d(t,{P:()=>a});var r=n(3229),i=n(6392),o=n(8323),s=n(2504);function a(){var e=[];return{add:function(t){t&&e[r.y5](t)},run:function(t,n){(0,s.Iu)(e,(function(e){try{e(t,n)}catch(e){(0,i.ZP)(t[r.e4](),2,73,"Unexpected error calling unload handler - "+(0,o.mm)(e))}})),e=[]}}}},2675:(e,t,n)=>{"use strict";n.d(t,{L0:()=>C,N7:()=>w,ZI:()=>y,ef:()=>T,hX:()=>b,mJ:()=>S,wN:()=>v,wk:()=>g});var r=n(3229),i=n(5955),o=n(8323),s=n(2504),a=/^([\da-f]{2})-([\da-f]{32})-([\da-f]{16})-([\da-f]{2})(-[^\s]*)?$/,c="00",l="ff",u="00000000000000000000000000000000",d="0000000000000000",p=1;function h(e,t,n){return!(!e||e[r.oI]!==t||e===n||!e.match(/^[\da-f]*$/))}function f(e,t,n){return h(e,t)?e:n}function m(e){(isNaN(e)||e<0||e>255)&&(e=1);for(var t=e.toString(16);t[r.oI]<2;)t="0"+t;return t}function g(e,t,n,o){var s;return(s={})[r.s]=h(o,2,l)?o:c,s[r.P5]=b(e)?e:(0,i.cL)(),s.spanId=v(t)?t:(0,i.cL)()[r.$4](0,16),s.traceFlags=n>=0&&n<=255?n:1,s}function y(e){var t;if(!e)return null;if((0,s.cy)(e)&&(e=e[0]||""),!e||!(0,s.Kg)(e)||e[r.oI]>8192)return null;var n=a.exec((0,s.EH)(e));return n&&n[1]!==l&&n[2]!==u&&n[3]!==d?((t={})[r.s]=n[1],t[r.P5]=n[2],t[r.wi]=n[3],t[r.Rr]=parseInt(n[4],16),t):null}function b(e){return h(e,32,u)}function v(e){return h(e,16,d)}function S(e){return!!(e&&h(e[r.s],2,l)&&h(e[r.P5],32,u)&&h(e[r.wi],16,d)&&h(m(e[r.Rr]),2))}function w(e){return!!S(e)&&(e[r.Rr]&p)===p}function C(e){if(e){var t=m(e[r.Rr]);h(t,2)||(t="01");var n=e[r.s]||c;return"00"!==n&&"ff"!==n&&(n=c),"".concat(n,"-").concat(f(e.traceId,32,u),"-").concat(f(e.spanId,16,d),"-").concat(t)}return""}function T(){var e="traceparent",t=y((0,o.$Z)(e));return t||(t=y((0,o.Iu)(e))),t}},3229:(e,t,n)=>{"use strict";n.d(t,{$4:()=>B,$5:()=>f,$o:()=>k,AP:()=>S,Di:()=>b,EX:()=>w,Ek:()=>W,GA:()=>l,H7:()=>C,HC:()=>P,Ic:()=>T,Ik:()=>E,JR:()=>_,Ju:()=>s,OL:()=>$,O_:()=>J,P5:()=>te,QM:()=>K,RF:()=>o,RS:()=>i,Re:()=>j,Rr:()=>re,Ru:()=>ee,Sj:()=>L,TP:()=>y,Uw:()=>d,W7:()=>G,YH:()=>A,Yo:()=>Q,Zu:()=>Y,a$:()=>H,by:()=>v,e4:()=>D,e_:()=>Z,fA:()=>h,kt:()=>q,lJ:()=>X,lK:()=>N,mE:()=>r,oI:()=>p,pM:()=>x,ps:()=>m,re:()=>U,s:()=>ie,sY:()=>F,sl:()=>u,sx:()=>V,tI:()=>R,tX:()=>M,tZ:()=>c,tn:()=>I,uR:()=>O,vR:()=>g,wi:()=>ne,y5:()=>a,y9:()=>z});var r="initialize",i="name",o="getNotifyMgr",s="identifier",a="push",c="isInitialized",l="config",u="instrumentationKey",d="logger",p="length",h="time",f="processNext",m="getProcessTelContext",g="addNotificationListener",y="removeNotificationListener",b="stopPollingInternalLogs",v="onComplete",S="getPlugin",w="flush",C="_extensions",T="splice",E="teardown",_="messageId",x="message",R="isAsync",I="_doTeardown",P="update",O="getNext",D="diagLog",A="setNextPlugin",k="createNew",N="cookieCfg",L="indexOf",j="substring",M="userAgent",F="split",q="setEnabled",B="substr",U="nodeType",z="apply",G="replace",H="enableDebugExceptions",V="logInternalMessage",$="toLowerCase",W="call",K="type",Q="handler",X="listeners",Y="isChildEvt",J="getCtx",Z="setCtx",ee="complete",te="traceId",ne="spanId",re="traceFlags",ie="version"},3695:(e,t,n)=>{"use strict";n.r(t),n.d(t,{AppInsightsCore:()=>o._,BaseCore:()=>s.F,BaseTelemetryPlugin:()=>a.s,CoreUtils:()=>l.jS,DiagnosticLogger:()=>b.wq,EventHelper:()=>l.fs,EventsDiscardedReason:()=>i.x,InstrumentEvent:()=>k,InstrumentFunc:()=>D,InstrumentFuncs:()=>A,InstrumentProto:()=>I,InstrumentProtos:()=>P,LoggingSeverity:()=>w.b,MinChannelPriorty:()=>r.T,NotificationManager:()=>g.h,PerfEvent:()=>y.Q6,PerfManager:()=>y.NS,ProcessTelemetryContext:()=>v.W0,Undefined:()=>l.rK,_InternalLogMessage:()=>b.WD,_InternalMessageId:()=>w.$,__getRegisteredEvents:()=>p.El,_legacyCookieMgr:()=>l.Rb,_logInternalMessage:()=>b.Oc,_throwInternal:()=>b.ZP,_warnToConsole:()=>b.OG,addEventHandler:()=>p.So,addEventListeners:()=>p.lQ,addPageHideEventListener:()=>p.Fc,addPageShowEventListener:()=>p.oS,addPageUnloadEventListener:()=>p.ee,areCookiesSupported:()=>N.gi,arrForEach:()=>u.Iu,arrIndexOf:()=>u.rD,arrMap:()=>u.W$,arrReduce:()=>u.KT,attachEvent:()=>p.Q3,canUseCookies:()=>l.ht,createClassFromInterface:()=>u.SZ,createCookieMgr:()=>N.xN,createCustomDomEvent:()=>h.Sf,createEnumMap:()=>d.oc,createEnumStyle:()=>d.Hj,createProcessTelemetryContext:()=>v.i8,createTraceParent:()=>F.wk,createUniqueNamespace:()=>j.Z,createUnloadHandlerContainer:()=>M.P,createValueMap:()=>d.oP,dateNow:()=>u.x3,deepFreeze:()=>u.ol,deleteCookie:()=>l.Yj,detachEvent:()=>p.Ym,disableCookies:()=>l.WD,dispatchEvent:()=>h.Pt,doPerf:()=>y.r2,dumpObj:()=>h.mm,eventOff:()=>p.ML,eventOn:()=>p.mB,findMetaTag:()=>h.$Z,findNamedServerTiming:()=>h.Iu,findW3cTraceParent:()=>F.ef,formatTraceParent:()=>F.L0,generateW3CId:()=>l.cL,getConsole:()=>h.U5,getCookie:()=>l.Ri,getCrypto:()=>h.MY,getDebugExt:()=>L.$,getDebugListener:()=>L.M,getDocument:()=>h.YE,getExceptionName:()=>u.lL,getGblPerfMgr:()=>y.Z4,getGlobal:()=>f.mS,getGlobalInst:()=>h.EH,getHistory:()=>h.JK,getIEVersion:()=>h.L0,getJSON:()=>h.hm,getLocation:()=>h.g$,getMsCrypto:()=>h.iN,getNavigator:()=>h.w3,getPerformance:()=>h.FJ,getSetValue:()=>u.c2,getWindow:()=>h.zk,hasDocument:()=>h.Wt,hasHistory:()=>h.tw,hasJSON:()=>h.Z,hasNavigator:()=>h.w9,hasOwnProperty:()=>u.mQ,hasWindow:()=>h.Vd,initializePlugins:()=>S.pI,isArray:()=>u.cy,isBeaconsSupported:()=>h.Uf,isBoolean:()=>u.Lm,isDate:()=>u.$P,isError:()=>u.bJ,isFetchSupported:()=>h.R7,isFunction:()=>u.Tn,isIE:()=>h.lT,isNotNullOrUndefined:()=>u.Gh,isNotTruthy:()=>u.wo,isNotUndefined:()=>u.EA,isNullOrUndefined:()=>u.hX,isNumber:()=>u.Et,isObject:()=>u.Gv,isPlainObject:()=>u.Qd,isReactNative:()=>h.lV,isSafari:()=>h.nr,isSampledFlag:()=>F.N7,isString:()=>u.Kg,isSymbol:()=>u.Bm,isTruthy:()=>u.zz,isTypeof:()=>u.Ed,isUndefined:()=>u.b0,isValidSpanId:()=>F.wN,isValidTraceId:()=>F.hX,isValidTraceParent:()=>F.mJ,isXhrSupported:()=>h.xk,mergeEvtNamespace:()=>p.Hm,mwcRandom32:()=>c.k5,mwcRandomSeed:()=>c.yc,newGuid:()=>l.aq,newId:()=>c.Si,normalizeJsName:()=>u.cH,objCreate:()=>f.AQ,objDefineAccessors:()=>u.r,objExtend:()=>u.CP,objForEachKey:()=>u.z,objFreeze:()=>u.N6,objKeys:()=>u.cG,objSeal:()=>u.js,objToString:()=>u.zC,optimizeObject:()=>u.hW,parseTraceParent:()=>F.ZI,perfNow:()=>l.UU,proxyAssign:()=>u.qz,proxyFunctionAs:()=>u.RF,proxyFunctions:()=>u.o$,random32:()=>c.VN,randomValue:()=>c.Z1,removeEventHandler:()=>p.zh,removeEventListeners:()=>p.Wg,removePageHideEventListener:()=>p.sq,removePageShowEventListener:()=>p.vF,removePageUnloadEventListener:()=>p.Ds,safeGetCookieMgr:()=>N.um,safeGetLogger:()=>b.y0,sendCustomEvent:()=>h.sN,setCookie:()=>l.TV,setEnableEnvMocks:()=>h.cU,setGblPerfMgr:()=>y.jv,setValue:()=>u.KY,sortPlugins:()=>S.Xc,strContains:()=>u.Ju,strEndsWith:()=>u.Cv,strFunction:()=>m.hW,strObject:()=>m._1,strPrototype:()=>m.vR,strStartsWith:()=>u.tG,strTrim:()=>u.EH,strUndefined:()=>m.bA,throwError:()=>u.$8,toISOString:()=>u._u,uaDisallowsSameSiteNone:()=>N.It,unloadComponents:()=>S.s4,useXDomainRequest:()=>h.PV});var r=n(8963),i=n(4343),o=n(6382),s=n(3227),a=n(7428),c=n(9668),l=n(5955),u=n(2504),d=n(3435),p=n(4838),h=n(8323),f=n(9381),m=n(7245),g=n(4013),y=n(5441),b=n(6392),v=n(8012),S=n(1267),w=n(6166),C=n(3229),T="_aiHooks",E=["req","rsp","hkErr","fnErr"];function _(e,t){if(e)for(var n=0;n<e[C.oI]&&!t(e[n],n);n++);}function x(e,t,n,r,i){i>=0&&i<=2&&_(e,(function(e,o){var s=e.cbks,a=s[E[i]];if(a){t.ctx=function(){return r[o]=r[o]||{}};try{a[C.y9](t.inst,n)}catch(e){var c=t.err;try{var l=s[E[2]];l&&(t.err=e,l[C.y9](t.inst,n))}catch(e){}finally{t.err=c}}}}))}function R(e,t,n,r){var i=null;return e&&((0,u.mQ)(e,t)?i=e:n&&(i=R((0,u.fw)(e),t,r,!1))),i}function I(e,t,n){return e?D(e[m.vR],t,n,!1):null}function P(e,t,n){return e?A(e[m.vR],t,n,!1):null}function O(e,t,n,r){var i=n&&n[T];if(!i){var o=function(e){return function(){var t,n=arguments,r=e.h,i=((t={})[C.RS]=e.n,t.inst=this,t.ctx=null,t.set=function(e,t){(n=a([],n))[e]=t,s=a([i],n)},t),o=[],s=a([i],n);function a(e,t){return _(t,(function(t){e[C.y5](t)})),e}i.evt=(0,h.EH)("event"),x(r,i,s,o,0);var c=e.f;if(c)try{i.rslt=c[C.y9](this,n)}catch(e){throw i.err=e,x(r,i,s,o,3),e}return x(r,i,s,o,1),i.rslt}}(i={i:0,n:t,f:n,h:[]});o[T]=i,e[t]=o}var s={id:i.i,cbks:r,rm:function(){var e=this.id;_(i.h,(function(t,n){if(t.id===e)return i.h[C.Ic](n,1),1}))}};return i.i++,i.h[C.y5](s),s}function D(e,t,n,r,i){if(void 0===r&&(r=!0),e&&t&&n){var o=R(e,t,r,i);if(o){var s=o[t];if(typeof s===m.hW)return O(o,t,s,n)}}return null}function A(e,t,n,r,i){void 0===r&&(r=!0);var o=null;return _(t,(function(t){var s=D(e,t,n,r,i);s&&(o||(o=[]),o[C.y5](s))})),o}function k(e,t,n,r,i){if(e&&t&&n){var o=R(e,t,r,i)||e;if(o)return O(o,t,o[t],n)}return null}var N=n(5691),L=n(8074),j=n(2429),M=n(2755),F=n(2675)},9284:(e,t,n)=>{"use strict";var r;n.d(t,{A:()=>F});var i,o="undefined",s="constructor",a="prototype",c="function",l="_dynInstFuncs",u="_isDynProxy",d="_dynClass",p="_dynCls$",h="_dynInstChk",f=h,m="_dfOpts",g="_unknown_",y="__proto__",b="_dyn"+y,v="__dynProto$Gbl",S="_dynInstProto",w="useBaseInst",C="setInstFuncs",T=Object,E=T.getPrototypeOf,_=T.getOwnPropertyNames,x=(typeof globalThis!==o&&(i=globalThis),i||typeof self===o||(i=self),i||typeof window===o||(i=window),i||typeof global===o||(i=global),i||{}),R=x[v]||(x[v]={o:(r={},r[C]=!0,r[w]=!0,r),n:1e3});function I(e,t){return e&&T[a].hasOwnProperty.call(e,t)}function P(e){return e&&(e===T[a]||e===Array[a])}function O(e){return P(e)||e===Function[a]}function D(e){var t;if(e){if(E)return E(e);var n=e[y]||e[a]||(e[s]?e[s][a]:null);t=e[b]||n,I(e,b)||(delete e[S],t=e[b]=e[S]||e[b],e[S]=n)}return t}function A(e,t){var n=[];if(_)n=_(e);else for(var r in e)"string"==typeof r&&I(e,r)&&n.push(r);if(n&&n.length>0)for(var i=0;i<n.length;i++)t(n[i])}function k(e,t,n){return t!==s&&typeof e[t]===c&&(n||I(e,t))}function N(e){throw new TypeError("DynamicProto: "+e)}function L(e,t){for(var n=e.length-1;n>=0;n--)if(e[n]===t)return!0;return!1}function j(e,t,n,r,i){if(!P(e)){var o=n[l]=n[l]||{},s=o[t]=o[t]||{};!1!==o[f]&&(o[f]=!!i),A(n,(function(t){k(n,t,!1)&&n[t]!==r[t]&&(s[t]=n[t],delete n[t],(!I(e,t)||e[t]&&!e[t][u])&&(e[t]=function(e,t){var n=function(){var r=function(e,t,n,r){var i=null;if(e&&I(n,d)){var o=e[l]||{};if((i=(o[n[d]]||{})[t])||N("Missing ["+t+"] "+c),!i[h]&&!1!==o[f]){for(var s=!I(e,t),a=D(e),u=[];s&&a&&!O(a)&&!L(u,a);){var p=a[t];if(p){s=p===r;break}u.push(a),a=D(a)}try{s&&(e[t]=i),i[h]=1}catch(e){o[f]=!1}}}return i}(this,t,e,n)||function(e,t,n){var r=t[e];return r===n&&(r=D(t)[e]),typeof r!==c&&N("["+e+"] is not a "+c),r}(t,e,n);return r.apply(this,arguments)};return n[u]=1,n}(e,t)))}))}}function M(e,t){return I(e,a)?e.name||t||g:((e||{})[s]||{}).name||t||g}function F(e,t,n,r){I(e,a)||N("theClass is an invalid class definition.");var i=e[a];(function(e,t){if(E){for(var n=[],r=D(t);r&&!O(r)&&!L(n,r);){if(r===e)return!0;n.push(r),r=D(r)}return!1}return!0})(i,t)||N("["+M(e)+"] not in hierarchy of ["+M(t)+"]");var o=null;I(i,d)?o=i[d]:(o=p+M(e,"_")+"$"+R.n,R.n++,i[d]=o);var s=F[m],c=!!s[w];c&&r&&void 0!==r[w]&&(c=!!r[w]);var h=function(e){var t={};return A(e,(function(n){!t[n]&&k(e,n,!1)&&(t[n]=e[n])})),t}(t),g=function(e,t,n,r){function i(e,t,n){var i=t[n];if(i[u]&&r){var o=e[l]||{};!1!==o[f]&&(i=(o[t[d]]||{})[n]||i)}return function(){return i.apply(e,arguments)}}var o={};A(n,(function(e){o[e]=i(t,n,e)}));for(var s=D(e),a=[];s&&!O(s)&&!L(a,s);)A(s,(function(e){!o[e]&&k(s,e,!E)&&(o[e]=i(t,s,e))})),a.push(s),s=D(s);return o}(i,t,h,c);n(t,g);var y=!!E&&!!s[C];y&&r&&(y=!!r[C]),j(i,o,t,h,!1!==y)}F[m]=R.o},7245:(e,t,n)=>{"use strict";n.d(t,{FC:()=>c,J$:()=>f,KU:()=>h,OR:()=>p,QV:()=>a,Wy:()=>u,_1:()=>i,bA:()=>o,hW:()=>r,s6:()=>l,vR:()=>s,zi:()=>d});var r="function",i="object",o="undefined",s="prototype",a="hasOwnProperty",c="default",l=Object,u=l[s],d=l.assign,p=l.create,h=l.defineProperty,f=u[a]},9381:(e,t,n)=>{"use strict";n.d(t,{AQ:()=>a,mS:()=>o,zk:()=>s});var r=n(7245),i=null;function o(e){void 0===e&&(e=!0);var t=!1===e?null:i;return t||(typeof globalThis!==r.bA&&(t=globalThis),t||typeof self===r.bA||(t=self),t||typeof window===r.bA||(t=window),t||typeof global===r.bA||(t=global),i=t),t}function s(e){throw new TypeError(e)}function a(e){var t=r.OR;if(t)return t(e);if(null==e)return{};var n=typeof e;function i(){}return n!==r._1&&n!==r.hW&&s("Object prototype may only be an Object:"+e),i[r.vR]=e,new i}},212:(e,t,n)=>{"use strict";n.d(t,{BY:()=>v,G4:()=>S,I3:()=>g,Im:()=>p,JA:()=>m,Ri:()=>w,_J:()=>T,m6:()=>_,pP:()=>R,qU:()=>f,s4:()=>x,sx:()=>y,tl:()=>C,u7:()=>b,vz:()=>E});var r=n(7245),i=n(9381),o=((0,i.mS)()||{}).Symbol,s=((0,i.mS)()||{}).Reflect,a=!!s,c="decorate",l="metadata",u="getOwnPropertySymbols",d="iterator",p=r.zi||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var o in t=arguments[n])r.Wy[r.QV].call(t,o)&&(e[o]=t[o]);return e},h=function(e,t){return h=r.s6.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t[r.QV](n)&&(e[n]=t[n])},h(e,t)};function f(e,t){function n(){this.constructor=e}typeof t!==r.hW&&null!==t&&(0,i.zk)("Class extends value "+String(t)+" is not a constructor or null"),h(e,t),e[r.vR]=null===t?(0,i.AQ)(t):(n[r.vR]=t[r.vR],new n)}function m(e,t){var n={};for(var i in e)r.J$.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&typeof r.s6[u]===r.hW)for(var o=0,s=r.s6[u](e);o<s.length;o++)t.indexOf(s[o])<0&&r.Wy.propertyIsEnumerable.call(e,s[o])&&(n[s[o]]=e[s[o]]);return n}function g(e,t,n,i){var o,l=arguments.length,u=l<3?t:null===i?i=r.s6.getOwnPropertyDescriptor(t,n):i;if(a&&typeof s[c]===r.hW)u=s[c](e,t,n,i);else for(var d=e.length-1;d>=0;d--)(o=e[d])&&(u=(l<3?o(u):l>3?o(t,n,u):o(t,n))||u);return l>3&&u&&(0,r.KU)(t,n,u),u}function y(e,t){return function(n,r){t(n,r,e)}}function b(e,t){if(a&&s[l]===r.hW)return s[l](e,t)}function v(e,t){for(var n in e)n===r.FC||r.J$.call(t,n)||S(t,e,n)}function S(e,t,n,i){void 0===i&&(i=n),r.OR?(0,r.KU)(e,i,{enumerable:!0,get:function(){return t[n]}}):e[i]=t[n]}function w(e){var t=typeof o===r.hW&&o[d],n=t&&e[t],s=0;return n?n.call(e):e&&"number"==typeof e.length?{next:function(){return e&&s>=e.length&&(e=void 0),{value:e&&e[s++],done:!e}}}:void(0,i.zk)(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function C(e,t){var n=typeof o===r.hW&&e[o[d]];if(!n)return e;var i,s,a=n.call(e),c=[];try{for(;(void 0===t||t-- >0)&&!(i=a.next()).done;)c.push(i.value)}catch(e){s={error:e}}finally{try{i&&!i.done&&(n=a.return)&&n.call(a)}finally{if(s)throw s.error}}return c}function T(){for(var e=arguments,t=0,n=0,r=e.length;n<r;n++)t+=e[n].length;var i=Array(t),o=0;for(n=0;n<r;n++)for(var s=e[n],a=0,c=s.length;a<c;a++,o++)i[o]=s[a];return i}function E(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e}function _(e,t){return r.KU?(0,r.KU)(e,"raw",{value:t}):e.raw=t,e}function x(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)n!==r.FC&&Object.prototype.hasOwnProperty.call(e,n)&&S(t,e,n);return r.OR?(0,r.KU)(t,r.FC,{enumerable:!0,value:e}):t[r.FC]=e,t}function R(e){return e&&e.__esModule?e:{strDefault:e}}},2284:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ObjAssign:()=>r.zi,ObjClass:()=>r.s6,ObjCreate:()=>r.OR,ObjDefineProperty:()=>r.KU,ObjHasOwnProperty:()=>r.J$,ObjProto:()=>r.Wy,__assignFn:()=>o.Im,__createBindingFn:()=>o.G4,__decorateFn:()=>o.I3,__exportStarFn:()=>o.BY,__exposeGlobalTsLib:()=>s,__extendsFn:()=>o.qU,__importDefaultFn:()=>o.pP,__importStarFn:()=>o.s4,__makeTemplateObjectFn:()=>o.m6,__metadataFn:()=>o.u7,__paramFn:()=>o.sx,__readFn:()=>o.tl,__restFn:()=>o.JA,__spreadArrayFn:()=>o.vz,__spreadArraysFn:()=>o._J,__valuesFn:()=>o.Ri,getGlobal:()=>i.mS,objCreateFn:()=>i.AQ,strDefault:()=>r.FC,strShimFunction:()=>r.hW,strShimHasOwnProperty:()=>r.QV,strShimObject:()=>r._1,strShimPrototype:()=>r.vR,strShimUndefined:()=>r.bA,throwTypeError:()=>i.zk});var r=n(7245),i=n(9381),o=n(212);function s(){var e,t,n,s,a=(0,i.mS)()||{};e=a,t=o.Im,n=o.qU,s=o.G4,e.__assign||(e.__assign=r.zi||t),e.__extends||(e.__extends=n),e.__createBinding||(e.__createBinding=s),__assign||(__assign=a.__assign),__extends||(__extends=a.__extends),__createBinding||(__createBinding=a.__createBinding)}},1356:(e,t,n)=>{"use strict";var r;n.r(t),n.d(t,{default:()=>F});var i,o="undefined",s="constructor",a="prototype",c="function",l="_dynInstFuncs",u="_isDynProxy",d="_dynClass",p="_dynCls$",h="_dynInstChk",f=h,m="_dfOpts",g="_unknown_",y="__proto__",b="_dyn"+y,v="__dynProto$Gbl",S="_dynInstProto",w="useBaseInst",C="setInstFuncs",T=Object,E=T.getPrototypeOf,_=T.getOwnPropertyNames,x=(typeof globalThis!==o&&(i=globalThis),i||typeof self===o||(i=self),i||typeof window===o||(i=window),i||typeof global===o||(i=global),i||{}),R=x[v]||(x[v]={o:(r={},r[C]=!0,r[w]=!0,r),n:1e3});function I(e,t){return e&&T[a].hasOwnProperty.call(e,t)}function P(e){return e&&(e===T[a]||e===Array[a])}function O(e){return P(e)||e===Function[a]}function D(e){var t;if(e){if(E)return E(e);var n=e[y]||e[a]||(e[s]?e[s][a]:null);t=e[b]||n,I(e,b)||(delete e[S],t=e[b]=e[S]||e[b],e[S]=n)}return t}function A(e,t){var n=[];if(_)n=_(e);else for(var r in e)"string"==typeof r&&I(e,r)&&n.push(r);if(n&&n.length>0)for(var i=0;i<n.length;i++)t(n[i])}function k(e,t,n){return t!==s&&typeof e[t]===c&&(n||I(e,t))}function N(e){throw new TypeError("DynamicProto: "+e)}function L(e,t){for(var n=e.length-1;n>=0;n--)if(e[n]===t)return!0;return!1}function j(e,t,n,r,i){if(!P(e)){var o=n[l]=n[l]||{},s=o[t]=o[t]||{};!1!==o[f]&&(o[f]=!!i),A(n,(function(t){k(n,t,!1)&&n[t]!==r[t]&&(s[t]=n[t],delete n[t],(!I(e,t)||e[t]&&!e[t][u])&&(e[t]=function(e,t){var n=function(){var r=function(e,t,n,r){var i=null;if(e&&I(n,d)){var o=e[l]||{};if((i=(o[n[d]]||{})[t])||N("Missing ["+t+"] "+c),!i[h]&&!1!==o[f]){for(var s=!I(e,t),a=D(e),u=[];s&&a&&!O(a)&&!L(u,a);){var p=a[t];if(p){s=p===r;break}u.push(a),a=D(a)}try{s&&(e[t]=i),i[h]=1}catch(e){o[f]=!1}}}return i}(this,t,e,n)||function(e,t,n){var r=t[e];return r===n&&(r=D(t)[e]),typeof r!==c&&N("["+e+"] is not a "+c),r}(t,e,n);return r.apply(this,arguments)};return n[u]=1,n}(e,t)))}))}}function M(e,t){return I(e,a)?e.name||t||g:((e||{})[s]||{}).name||t||g}function F(e,t,n,r){I(e,a)||N("theClass is an invalid class definition.");var i=e[a];(function(e,t){if(E){for(var n=[],r=D(t);r&&!O(r)&&!L(n,r);){if(r===e)return!0;n.push(r),r=D(r)}return!1}return!0})(i,t)||N("["+M(e)+"] not in hierarchy of ["+M(t)+"]");var o=null;I(i,d)?o=i[d]:(o=p+M(e,"_")+"$"+R.n,R.n++,i[d]=o);var s=F[m],c=!!s[w];c&&r&&void 0!==r[w]&&(c=!!r[w]);var h=function(e){var t={};return A(e,(function(n){!t[n]&&k(e,n,!1)&&(t[n]=e[n])})),t}(t),g=function(e,t,n,r){function i(e,t,n){var i=t[n];if(i[u]&&r){var o=e[l]||{};!1!==o[f]&&(i=(o[t[d]]||{})[n]||i)}return function(){return i.apply(e,arguments)}}var o={};A(n,(function(e){o[e]=i(t,n,e)}));for(var s=D(e),a=[];s&&!O(s)&&!L(a,s);)A(s,(function(e){!o[e]&&k(s,e,!E)&&(o[e]=i(t,s,e))})),a.push(s),s=D(s);return o}(i,t,h,c);n(t,g);var y=!!E&&!!s[C];y&&r&&(y=!!r[C]),j(i,o,t,h,!1!==y)}F[m]=R.o},9699:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AppContext=void 0,t.AppContext=class{constructor(e){this.extensionContext=e,this.serviceMap=new Map}getService(e){const t=this.serviceMap.get(e);return t||console.warn("Service ",e," is not registered"),t}registerService(e,t){this.serviceMap.has(e)?console.warn("Multiple services ",e," registered!"):this.serviceMap.set(e,t)}}},5055:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AzureBlobService=void 0;const r=n(6290),i=n(5702);class o extends i.BaseService{constructor(e){super(e)}async createSas(e,t,n,i,o){const s={ownerUri:e,blobContainerUri:t,blobContainerKey:n,storageAccountName:i,expirationDate:o};return this.runWithErrorHandling(r.CreateSasRequest.type,s)}}t.AzureBlobService=o},7219:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CmsService=void 0;const r=n(3508),i=n(6290),o=n(76),s=n(5702);class a extends s.BaseService{static asFeature(e){return class extends a{constructor(t){super(e,t)}fillClientCapabilities(e){o.ensure(e,"cms").cms=!0}initialize(){}}}constructor(e,t){super(t),e.registerService(r.CmsService,this)}async createCmsServer(e,t,n,r){const o={registeredServerName:e,registeredServerDescription:t,connectParams:{ownerUri:r,connection:n}};return this.runWithErrorHandling(i.CreateCentralManagementServerRequest.type,o)}async getRegisteredServers(e,t){const n={parentOwnerUri:e,relativePath:t};return this.runWithErrorHandling(i.ListRegisteredServersRequest.type,n)}async addRegisteredServer(e,t,n,r,o){const s={parentOwnerUri:e,relativePath:t,registeredServerName:n,registeredServerDescription:r,registeredServerConnectionDetails:o};return this.runWithErrorHandling(i.AddRegisteredServerRequest.type,s)}async removeRegisteredServer(e,t,n){const r={parentOwnerUri:e,relativePath:t,registeredServerName:n};return this.runWithErrorHandling(i.RemoveRegisteredServerRequest.type,r)}async addServerGroup(e,t,n,r){const o={parentOwnerUri:e,relativePath:t,groupName:n,groupDescription:r};return this.runWithErrorHandling(i.AddServerGroupRequest.type,o)}async removeServerGroup(e,t,n){const r={parentOwnerUri:e,relativePath:t,groupName:n};return this.runWithErrorHandling(i.RemoveServerGroupRequest.type,r)}dispose(){}}t.CmsService=a},8546:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerConnectionCommands=void 0;const r=n(1398),i=n(5363);t.registerConnectionCommands=function(e){e.extensionContext.subscriptions.push(r.commands.registerCommand("mssql.clearPooledConnections",(async()=>{await function(e){return e.getService(i.ConnectionService)}(e).clearPooledConnections()})))}},3729:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectionService=void 0;const r=n(5363),i=n(6290),o=n(5702);class s extends o.BaseService{static asFeature(e){return class extends s{constructor(t){super(e,t)}fillClientCapabilities(e){}initialize(){}}}constructor(e,t){super(t),e.registerService(r.ConnectionService,this)}async clearPooledConnections(){return this.runWithErrorHandling(i.ClearPooledConnectionsRequest.type,{})}}t.ConnectionService=s},5363:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectionService=void 0,t.ConnectionService="ConnectionService"},3508:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.cmdObjectExplorerDisableGroupBySchemaTitleCommand=t.cmdObjectExplorerEnabbleGroupBySchemaTitleCommand=t.cmdObjectExplorerDisableGroupBySchemaCommand=t.cmdObjectExplorerEnableGroupBySchemaCommand=t.configHttpProxyStrictSSL=t.configHttpProxy=t.configEnableConnectionPoolingName=t.configEnableSqlAuthenticationProviderName=t.configParallelMessageProcessingLimitName=t.configParallelMessageProcessingName=t.configObjectExplorerGroupBySchemaFlagName=t.QueryStoreService=t.ObjectManagementService=t.AzureBlobService=t.NotebookConvertService=t.SqlAssessmentService=t.objectExplorerPrefix=t.LanguageExtensionService=t.SchemaCompareService=t.SqlProjectsService=t.DacFxService=t.CmsService=t.ObjectExplorerService=t.sqlProviderName=t.packageName=t.queryEditorConfigSectionName=t.telemetryConfigSectionName=t.extensionConfigSectionName=t.serviceCrashLink=t.providerId=t.serviceName=void 0,t.serviceName="SQL Tools Service",t.providerId="MSSQL",t.serviceCrashLink="https://github.com/Microsoft/vscode-mssql/wiki/SqlToolsService-Known-Issues",t.extensionConfigSectionName="mssql",t.telemetryConfigSectionName="telemetry",t.queryEditorConfigSectionName="queryEditor",t.packageName="Microsoft.mssql",t.sqlProviderName="MSSQL",t.ObjectExplorerService="objectexplorer",t.CmsService="cmsService",t.DacFxService="dacfxService",t.SqlProjectsService="sqlProjectsService",t.SchemaCompareService="schemaCompareService",t.LanguageExtensionService="languageExtensionService",t.objectExplorerPrefix="objectexplorer://",t.SqlAssessmentService="sqlAssessmentService",t.NotebookConvertService="notebookConvertService",t.AzureBlobService="azureBlobService",t.ObjectManagementService="objectManagementService",t.QueryStoreService="queryStoreService",t.configObjectExplorerGroupBySchemaFlagName="mssql.objectExplorer.groupBySchema",t.configParallelMessageProcessingName="mssql.parallelMessageProcessing",t.configParallelMessageProcessingLimitName="mssql.parallelMessageProcessingLimit",t.configEnableSqlAuthenticationProviderName="mssql.enableSqlAuthenticationProvider",t.configEnableConnectionPoolingName="mssql.enableConnectionPooling",t.configHttpProxy="http.proxy",t.configHttpProxyStrictSSL="http.proxyStrictSSL",t.cmdObjectExplorerEnableGroupBySchemaCommand="mssql.enableGroupBySchema",t.cmdObjectExplorerDisableGroupBySchemaCommand="mssql.disableGroupBySchema",t.cmdObjectExplorerEnabbleGroupBySchemaTitleCommand="mssql.enableGroupBySchemaTitle",t.cmdObjectExplorerDisableGroupBySchemaTitleCommand="mssql.disableGroupBySchemaTitle"},8835:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=n(1398),i=n(235),o=n(4848);var s,a;!function(e){e.SetContext="setContext"}(s||(s={})),function(e){e.ISCLOUD="mssql:iscloud",e.EDITIONID="mssql:engineedition",e.SERVERMAJORVERSION="mssql:servermajorversion"}(a||(a={}));const c=[i.DatabaseEngineEdition.SqlDatabase,i.DatabaseEngineEdition.SqlDataWarehouse,i.DatabaseEngineEdition.SqlOnDemand];function l(e,t){return r.commands.executeCommand(s.SetContext,e,t)}t.default=class{constructor(){this._disposables=new Array,this._disposables.push(i.workspace.onDidOpenDashboard(this.onDashboardOpen,this)),this._disposables.push(i.workspace.onDidChangeToDashboard(this.onDashboardOpen,this))}onDashboardOpen(e){let t,n,r=!1;"mssql"!==e.profile.providerName.toLowerCase()||o.isUndefinedOrNull(e.serverInfo)||o.isUndefinedOrNull(e.serverInfo.engineEditionId)||(r=c.some((t=>t===e.serverInfo.engineEditionId)),t=e.serverInfo.engineEditionId,n=e.serverInfo.serverMajorVersion),!0!==r&&!1!==r||l(a.ISCLOUD,r),o.isUndefinedOrNull(t)||l(a.EDITIONID,t),o.isUndefinedOrNull(n)||l(a.SERVERMAJORVERSION,n)}dispose(){this._disposables.forEach((e=>e.dispose())),this._disposables=[]}}},6290:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GetOptionsFromProfileRequest=t.GenerateDeployPlanRequest=t.GenerateDeployScriptRequest=t.DeployRequest=t.ExtractRequest=t.ImportRequest=t.ExportRequest=t.TaskExecutionMode=t.DeleteAgentJobScheduleRequest=t.UpdateAgentJobScheduleRequest=t.CreateAgentJobScheduleRequest=t.AgentJobSchedulesRequest=t.AgentCredentialsRequest=t.DeleteAgentProxyRequest=t.UpdateAgentProxyRequest=t.CreateAgentProxyRequest=t.AgentProxiesRequest=t.DeleteAgentOperatorRequest=t.UpdateAgentOperatorRequest=t.CreateAgentOperatorRequest=t.AgentOperatorsRequest=t.DeleteAgentAlertRequest=t.UpdateAgentAlertRequest=t.CreateAgentAlertRequest=t.AgentAlertsRequest=t.UpdateAgentNotebookRequest=t.DeleteAgentNotebookRequest=t.CreateAgentNotebookRequest=t.AgentNotebookTemplateRequest=t.UpdateAgentNotebookRunPinRequest=t.DeleteMaterializedNotebookRequest=t.UpdateAgentNotebookRunNameRequest=t.AgentNotebookMaterializedRequest=t.AgentNotebookHistoryRequest=t.AgentNotebooksRequest=t.DeleteAgentJobStepRequest=t.UpdateAgentJobStepRequest=t.CreateAgentJobStepRequest=t.AgentJobDefaultsRequest=t.DeleteAgentJobRequest=t.UpdateAgentJobRequest=t.CreateAgentJobRequest=t.AgentJobActionRequest=t.AgentJobHistoryRequest=t.AgentJobsRequest=t.TokenRefreshedNotification=t.RefreshTokenNotification=t.SecurityTokenRequest=t.TelemetryParams=t.TelemetryNotification=void 0,t.RemoveRegisteredServerRequest=t.AddRegisteredServerRequest=t.ListRegisteredServersRequest=t.CreateCentralManagementServerRequest=t.GetDatabaseReferencesRequest=t.DeleteDatabaseReferenceRequest=t.AddNugetPackageReferenceRequest=t.AddSystemDatabaseReferenceRequest=t.AddSqlProjectReferenceRequest=t.AddDacpacReferenceRequest=t.GetSqlCmdVariablesRequest=t.UpdateSqlCmdVariableRequest=t.DeleteSqlCmdVariableRequest=t.AddSqlCmdVariableRequest=t.MoveNoneItemRequest=t.GetNoneItemsRequest=t.ExcludeNoneItemRequest=t.DeleteNoneItemRequest=t.AddNoneItemRequest=t.GetPreDeploymentScriptsRequest=t.MovePreDeploymentScriptRequest=t.MovePostDeploymentScriptRequest=t.ExcludePreDeploymentScriptRequest=t.GetPostDeploymentScriptsRequest=t.ExcludePostDeploymentScriptRequest=t.DeletePreDeploymentScriptRequest=t.DeletePostDeploymentScriptRequest=t.AddPreDeploymentScriptRequest=t.AddPostDeploymentScriptRequest=t.GetFoldersRequest=t.DeleteFolderRequest=t.AddFolderRequest=t.MoveFolderRequest=t.ExcludeFolderRequest=t.GetSqlObjectScriptsRequest=t.MoveSqlObjectScriptRequest=t.ExcludeSqlObjectScriptRequest=t.DeleteSqlObjectScriptRequest=t.AddSqlObjectScriptRequest=t.SetDatabaseSchemaProviderRequest=t.SetDatabaseSourceRequest=t.GetProjectPropertiesRequest=t.UpdateProjectForCrossPlatformRequest=t.GetCrossPlatformCompatibilityRequest=t.CloseSqlProjectRequest=t.OpenSqlProjectRequest=t.CreateSqlProjectRequest=t.SavePublishProfileRequest=t.ParseTSqlScriptRequest=t.ValidateStreamingJobRequest=void 0,t.DetachDatabaseRequest=t.SearchObjectRequest=t.DropObjectRequest=t.RenameObjectRequest=t.DisposeViewRequest=t.ScriptObjectRequest=t.SaveObjectRequest=t.InitializeViewRequest=t.GetServerContextualizationRequest=t.ExecutionPlanComparisonRequest=t.GetExecutionPlanRequest=t.CreateSasRequest=t.DisposeTableDesignerRequest=t.TableDesignerGenerateChangePreviewReportRequest=t.TableDesignerGenerateScriptRequest=t.PublishTableDesignerChangesRequest=t.ProcessTableDesignerEditRequest=t.InitializeTableDesignerRequest=t.ProfilerSessionCreatedNotification=t.ProfilerSessionStoppedNotification=t.ProfilerEventsAvailableNotification=t.DisconnectSessionRequest=t.GetXEventSessionsRequest=t.PauseProfilingRequest=t.StopProfilingRequest=t.StartProfilingRequest=t.CreateXEventSessionRequest=t.ConvertSqlToNotebookRequest=t.ConvertNotebookToSqlRequest=t.CompletionExtLoadRequest=t.CompletionExtensionParams=t.SerializeDataContinueRequest=t.SerializeDataStartRequest=t.GenerateSqlAssessmentScriptRequest=t.GetSqlAssessmentItemsRequest=t.SqlAssessmentInvokeRequest=t.SchemaCompareCancellationRequest=t.SchemaCompareSaveScmpRequest=t.SchemaCompareOpenScmpRequest=t.SchemaCompareIncludeExcludeNodeRequest=t.SchemaCompareGetDefaultOptionsRequest=t.SchemaComparePublishProjectChangesRequest=t.SchemaComparePublishDatabaseChangesRequest=t.SchemaCompareGenerateScriptRequest=t.SchemaCompareRequest=t.LanguageExtensibilityUpdateRequest=t.LanguageExtensibilityDeleteRequest=t.LanguageExtensibilityListRequest=t.RemoveServerGroupRequest=t.AddServerGroupRequest=void 0,t.GetOverallResourceConsumptionReportRequest=t.GetForcedPlanQueriesReportRequest=t.GetForcedPlanRequest=t.GetPlanSummaryGridViewRequest=t.GetPlanSummaryChartViewRequest=t.GetTopResourceConsumersDetailedSummaryWithWaitStatsRequest=t.GetTopResourceConsumersDetailedSummaryRequest=t.GetTopResourceConsumersSummaryRequest=t.GetHighVariationQueriesDetailedSummaryWithWaitStatsRequest=t.GetHighVariationQueriesDetailedSummaryRequest=t.GetHighVariationQueriesSummaryRequest=t.GetTrackedQueriesReportRequest=t.GetRegressedQueriesDetailedSummaryRequest=t.GetRegressedQueriesSummaryRequest=t.ClearPooledConnectionsRequest=t.EncryptionKeysChangedNotification=t.DidChangeEncryptionIVKeyParams=t.GetCredentialNamesRequest=t.CreateCredentialRequest=t.PurgeQueryStoreDataRequest=t.GetAssociatedFilesRequest=t.BackupDatabaseRequest=t.GetBackupFolderRequest=t.GetDataFolderRequest=t.AttachDatabaseRequest=t.DropDatabaseRequest=void 0;const r=n(4382);var i,o,s,a,c,l,u,d,p,h,f,m,g,y,b,v,S,w,C,T,E,_,x,R,I,P,O,D,A,k,N,L,j,M,F,q,B,U,z,G,H,V,$,W,K,Q,X,Y,J,Z,ee,te,ne,re,ie,oe,se,ae,ce,le,ue,de,pe,he,fe,me,ge,ye,be,ve,Se,we,Ce,Te,Ee,_e,xe,Re,Ie,Pe,Oe,De,Ae,ke,Ne,Le,je,Me,Fe,qe,Be,Ue,ze,Ge,He,Ve,$e,We,Ke,Qe,Xe,Ye,Je,Ze,et,tt,nt,rt,it,ot,st,at,ct,lt,ut,dt,pt,ht,ft,mt,gt,yt,bt,vt,St,wt,Ct,Tt,Et,_t,xt,Rt,It,Pt,Ot,Dt,At,kt,Nt,Lt,jt,Mt,Ft,qt,Bt,Ut,zt,Gt,Ht,Vt,$t,Wt,Kt,Qt,Xt,Yt,Jt,Zt,en,tn,nn,rn,on,sn,an,cn,ln,un,dn,pn,hn,fn,mn;!function(e){e.type=new r.NotificationType("telemetry/sqlevent")}(i||(t.TelemetryNotification=i={})),t.TelemetryParams=class{},function(e){e.type=new r.RequestType("account/securityTokenRequest")}(o||(t.SecurityTokenRequest=o={})),function(e){e.type=new r.NotificationType("account/refreshToken")}(s||(t.RefreshTokenNotification=s={})),function(e){e.type=new r.NotificationType("account/tokenRefreshed")}(a||(t.TokenRefreshedNotification=a={})),function(e){e.type=new r.RequestType("agent/jobs")}(c||(t.AgentJobsRequest=c={})),function(e){e.type=new r.RequestType("agent/jobhistory")}(l||(t.AgentJobHistoryRequest=l={})),function(e){e.type=new r.RequestType("agent/jobaction")}(u||(t.AgentJobActionRequest=u={})),function(e){e.type=new r.RequestType("agent/createjob")}(d||(t.CreateAgentJobRequest=d={})),function(e){e.type=new r.RequestType("agent/updatejob")}(p||(t.UpdateAgentJobRequest=p={})),function(e){e.type=new r.RequestType("agent/deletejob")}(h||(t.DeleteAgentJobRequest=h={})),function(e){e.type=new r.RequestType("agent/jobdefaults")}(f||(t.AgentJobDefaultsRequest=f={})),function(e){e.type=new r.RequestType("agent/createjobstep")}(m||(t.CreateAgentJobStepRequest=m={})),function(e){e.type=new r.RequestType("agent/updatejobstep")}(g||(t.UpdateAgentJobStepRequest=g={})),function(e){e.type=new r.RequestType("agent/deletejobstep")}(y||(t.DeleteAgentJobStepRequest=y={})),function(e){e.type=new r.RequestType("agent/notebooks")}(b||(t.AgentNotebooksRequest=b={})),function(e){e.type=new r.RequestType("agent/notebookhistory")}(v||(t.AgentNotebookHistoryRequest=v={})),function(e){e.type=new r.RequestType("agent/notebookmaterialized")}(S||(t.AgentNotebookMaterializedRequest=S={})),function(e){e.type=new r.RequestType("agent/updatenotebookname")}(w||(t.UpdateAgentNotebookRunNameRequest=w={})),function(e){e.type=new r.RequestType("agent/deletematerializednotebook")}(C||(t.DeleteMaterializedNotebookRequest=C={})),function(e){e.type=new r.RequestType("agent/updatenotebookpin")}(T||(t.UpdateAgentNotebookRunPinRequest=T={})),function(e){e.type=new r.RequestType("agent/notebooktemplate")}(E||(t.AgentNotebookTemplateRequest=E={})),function(e){e.type=new r.RequestType("agent/createnotebook")}(_||(t.CreateAgentNotebookRequest=_={})),function(e){e.type=new r.RequestType("agent/deletenotebook")}(x||(t.DeleteAgentNotebookRequest=x={})),function(e){e.type=new r.RequestType("agent/updatenotebook")}(R||(t.UpdateAgentNotebookRequest=R={})),function(e){e.type=new r.RequestType("agent/alerts")}(I||(t.AgentAlertsRequest=I={})),function(e){e.type=new r.RequestType("agent/createalert")}(P||(t.CreateAgentAlertRequest=P={})),function(e){e.type=new r.RequestType("agent/updatealert")}(O||(t.UpdateAgentAlertRequest=O={})),function(e){e.type=new r.RequestType("agent/deletealert")}(D||(t.DeleteAgentAlertRequest=D={})),function(e){e.type=new r.RequestType("agent/operators")}(A||(t.AgentOperatorsRequest=A={})),function(e){e.type=new r.RequestType("agent/createoperator")}(k||(t.CreateAgentOperatorRequest=k={})),function(e){e.type=new r.RequestType("agent/updateoperator")}(N||(t.UpdateAgentOperatorRequest=N={})),function(e){e.type=new r.RequestType("agent/deleteoperator")}(L||(t.DeleteAgentOperatorRequest=L={})),function(e){e.type=new r.RequestType("agent/proxies")}(j||(t.AgentProxiesRequest=j={})),function(e){e.type=new r.RequestType("agent/createproxy")}(M||(t.CreateAgentProxyRequest=M={})),function(e){e.type=new r.RequestType("agent/updateproxy")}(F||(t.UpdateAgentProxyRequest=F={})),function(e){e.type=new r.RequestType("agent/deleteproxy")}(q||(t.DeleteAgentProxyRequest=q={})),function(e){e.type=new r.RequestType("security/credentials")}(B||(t.AgentCredentialsRequest=B={})),function(e){e.type=new r.RequestType("agent/schedules")}(U||(t.AgentJobSchedulesRequest=U={})),function(e){e.type=new r.RequestType("agent/createschedule")}(z||(t.CreateAgentJobScheduleRequest=z={})),function(e){e.type=new r.RequestType("agent/updateschedule")}(G||(t.UpdateAgentJobScheduleRequest=G={})),function(e){e.type=new r.RequestType("agent/deleteschedule")}(H||(t.DeleteAgentJobScheduleRequest=H={})),function(e){e[e.execute=0]="execute",e[e.script=1]="script",e[e.executeAndScript=2]="executeAndScript"}(V||(t.TaskExecutionMode=V={})),function(e){e.type=new r.RequestType("dacfx/export")}($||(t.ExportRequest=$={})),function(e){e.type=new r.RequestType("dacfx/import")}(W||(t.ImportRequest=W={})),function(e){e.type=new r.RequestType("dacfx/extract")}(K||(t.ExtractRequest=K={})),function(e){e.type=new r.RequestType("dacfx/deploy")}(Q||(t.DeployRequest=Q={})),function(e){e.type=new r.RequestType("dacfx/generateDeploymentScript")}(X||(t.GenerateDeployScriptRequest=X={})),function(e){e.type=new r.RequestType("dacfx/generateDeployPlan")}(Y||(t.GenerateDeployPlanRequest=Y={})),function(e){e.type=new r.RequestType("dacfx/getOptionsFromProfile")}(J||(t.GetOptionsFromProfileRequest=J={})),function(e){e.type=new r.RequestType("dacfx/validateStreamingJob")}(Z||(t.ValidateStreamingJobRequest=Z={})),function(e){e.type=new r.RequestType("dacfx/parseTSqlScript")}(ee||(t.ParseTSqlScriptRequest=ee={})),function(e){e.type=new r.RequestType("dacfx/savePublishProfile")}(te||(t.SavePublishProfileRequest=te={})),function(e){e.type=new r.RequestType("sqlProjects/createProject")}(ne||(t.CreateSqlProjectRequest=ne={})),function(e){e.type=new r.RequestType("sqlProjects/openProject")}(re||(t.OpenSqlProjectRequest=re={})),function(e){e.type=new r.RequestType("sqlProjects/closeProject")}(ie||(t.CloseSqlProjectRequest=ie={})),function(e){e.type=new r.RequestType("sqlProjects/getCrossPlatformCompatibility")}(oe||(t.GetCrossPlatformCompatibilityRequest=oe={})),function(e){e.type=new r.RequestType("sqlProjects/updateProjectForCrossPlatform")}(se||(t.UpdateProjectForCrossPlatformRequest=se={})),function(e){e.type=new r.RequestType("sqlProjects/getProjectProperties")}(ae||(t.GetProjectPropertiesRequest=ae={})),function(e){e.type=new r.RequestType("sqlProjects/setDatabaseSource")}(ce||(t.SetDatabaseSourceRequest=ce={})),function(e){e.type=new r.RequestType("sqlProjects/setDatabaseSchemaProvider")}(le||(t.SetDatabaseSchemaProviderRequest=le={})),function(e){e.type=new r.RequestType("sqlProjects/addSqlObjectScript")}(ue||(t.AddSqlObjectScriptRequest=ue={})),function(e){e.type=new r.RequestType("sqlProjects/deleteSqlObjectScript")}(de||(t.DeleteSqlObjectScriptRequest=de={})),function(e){e.type=new r.RequestType("sqlProjects/excludeSqlObjectScript")}(pe||(t.ExcludeSqlObjectScriptRequest=pe={})),function(e){e.type=new r.RequestType("sqlProjects/moveSqlObjectScript")}(he||(t.MoveSqlObjectScriptRequest=he={})),function(e){e.type=new r.RequestType("sqlProjects/getSqlObjectScripts")}(fe||(t.GetSqlObjectScriptsRequest=fe={})),function(e){e.type=new r.RequestType("sqlProjects/excludeFolder")}(me||(t.ExcludeFolderRequest=me={})),function(e){e.type=new r.RequestType("sqlProjects/moveFolder")}(ge||(t.MoveFolderRequest=ge={})),function(e){e.type=new r.RequestType("sqlProjects/addFolder")}(ye||(t.AddFolderRequest=ye={})),function(e){e.type=new r.RequestType("sqlProjects/deleteFolder")}(be||(t.DeleteFolderRequest=be={})),function(e){e.type=new r.RequestType("sqlProjects/getFolders")}(ve||(t.GetFoldersRequest=ve={})),function(e){e.type=new r.RequestType("sqlProjects/addPostDeploymentScript")}(Se||(t.AddPostDeploymentScriptRequest=Se={})),function(e){e.type=new r.RequestType("sqlProjects/addPreDeploymentScript")}(we||(t.AddPreDeploymentScriptRequest=we={})),function(e){e.type=new r.RequestType("sqlProjects/deletePostDeploymentScript")}(Ce||(t.DeletePostDeploymentScriptRequest=Ce={})),function(e){e.type=new r.RequestType("sqlProjects/deletePreDeploymentScript")}(Te||(t.DeletePreDeploymentScriptRequest=Te={})),function(e){e.type=new r.RequestType("sqlProjects/excludePostDeploymentScript")}(Ee||(t.ExcludePostDeploymentScriptRequest=Ee={})),function(e){e.type=new r.RequestType("sqlProjects/getPostDeploymentScripts")}(_e||(t.GetPostDeploymentScriptsRequest=_e={})),function(e){e.type=new r.RequestType("sqlProjects/excludePreDeploymentScript")}(xe||(t.ExcludePreDeploymentScriptRequest=xe={})),function(e){e.type=new r.RequestType("sqlProjects/movePostDeploymentScript")}(Re||(t.MovePostDeploymentScriptRequest=Re={})),function(e){e.type=new r.RequestType("sqlProjects/movePreDeploymentScript")}(Ie||(t.MovePreDeploymentScriptRequest=Ie={})),function(e){e.type=new r.RequestType("sqlProjects/getPreDeploymentScripts")}(Pe||(t.GetPreDeploymentScriptsRequest=Pe={})),function(e){e.type=new r.RequestType("sqlProjects/addNoneItem")}(Oe||(t.AddNoneItemRequest=Oe={})),function(e){e.type=new r.RequestType("sqlProjects/deleteNoneItem")}(De||(t.DeleteNoneItemRequest=De={})),function(e){e.type=new r.RequestType("sqlProjects/excludeNoneItem")}(Ae||(t.ExcludeNoneItemRequest=Ae={})),function(e){e.type=new r.RequestType("sqlProjects/getNoneItems")}(ke||(t.GetNoneItemsRequest=ke={})),function(e){e.type=new r.RequestType("sqlProjects/moveNoneItem")}(Ne||(t.MoveNoneItemRequest=Ne={})),function(e){e.type=new r.RequestType("sqlProjects/addSqlCmdVariable")}(Le||(t.AddSqlCmdVariableRequest=Le={})),function(e){e.type=new r.RequestType("sqlProjects/deleteSqlCmdVariable")}(je||(t.DeleteSqlCmdVariableRequest=je={})),function(e){e.type=new r.RequestType("sqlProjects/updateSqlCmdVariable")}(Me||(t.UpdateSqlCmdVariableRequest=Me={})),function(e){e.type=new r.RequestType("sqlProjects/getSqlCmdVariables")}(Fe||(t.GetSqlCmdVariablesRequest=Fe={})),function(e){e.type=new r.RequestType("sqlprojects/addDacpacReference")}(qe||(t.AddDacpacReferenceRequest=qe={})),function(e){e.type=new r.RequestType("sqlprojects/addSqlProjectReference")}(Be||(t.AddSqlProjectReferenceRequest=Be={})),function(e){e.type=new r.RequestType("sqlprojects/addSystemDatabaseReference")}(Ue||(t.AddSystemDatabaseReferenceRequest=Ue={})),function(e){e.type=new r.RequestType("sqlprojects/addNugetPackageReference")}(ze||(t.AddNugetPackageReferenceRequest=ze={})),function(e){e.type=new r.RequestType("sqlprojects/deleteDatabaseReference")}(Ge||(t.DeleteDatabaseReferenceRequest=Ge={})),function(e){e.type=new r.RequestType("sqlProjects/getDatabaseReferences")}(He||(t.GetDatabaseReferencesRequest=He={})),function(e){e.type=new r.RequestType("cms/createCms")}(Ve||(t.CreateCentralManagementServerRequest=Ve={})),function(e){e.type=new r.RequestType("cms/listRegisteredServers")}($e||(t.ListRegisteredServersRequest=$e={})),function(e){e.type=new r.RequestType("cms/addRegisteredServer")}(We||(t.AddRegisteredServerRequest=We={})),function(e){e.type=new r.RequestType("cms/removeRegisteredServer")}(Ke||(t.RemoveRegisteredServerRequest=Ke={})),function(e){e.type=new r.RequestType("cms/addCmsServerGroup")}(Qe||(t.AddServerGroupRequest=Qe={})),function(e){e.type=new r.RequestType("cms/removeCmsServerGroup")}(Xe||(t.RemoveServerGroupRequest=Xe={})),function(e){e.type=new r.RequestType("languageExtension/list")}(Ye||(t.LanguageExtensibilityListRequest=Ye={})),function(e){e.type=new r.RequestType("languageExtension/delete")}(Je||(t.LanguageExtensibilityDeleteRequest=Je={})),function(e){e.type=new r.RequestType("languageExtension/update")}(Ze||(t.LanguageExtensibilityUpdateRequest=Ze={})),function(e){e.type=new r.RequestType("schemaCompare/compare")}(et||(t.SchemaCompareRequest=et={})),function(e){e.type=new r.RequestType("schemaCompare/generateScript")}(tt||(t.SchemaCompareGenerateScriptRequest=tt={})),function(e){e.type=new r.RequestType("schemaCompare/publishDatabase")}(nt||(t.SchemaComparePublishDatabaseChangesRequest=nt={})),function(e){e.type=new r.RequestType("schemaCompare/publishProject")}(rt||(t.SchemaComparePublishProjectChangesRequest=rt={})),function(e){e.type=new r.RequestType("schemaCompare/getDefaultOptions")}(it||(t.SchemaCompareGetDefaultOptionsRequest=it={})),function(e){e.type=new r.RequestType("schemaCompare/includeExcludeNode")}(ot||(t.SchemaCompareIncludeExcludeNodeRequest=ot={})),function(e){e.type=new r.RequestType("schemaCompare/openScmp")}(st||(t.SchemaCompareOpenScmpRequest=st={})),function(e){e.type=new r.RequestType("schemaCompare/saveScmp")}(at||(t.SchemaCompareSaveScmpRequest=at={})),function(e){e.type=new r.RequestType("schemaCompare/cancel")}(ct||(t.SchemaCompareCancellationRequest=ct={})),function(e){e.type=new r.RequestType("assessment/invoke")}(lt||(t.SqlAssessmentInvokeRequest=lt={})),function(e){e.type=new r.RequestType("assessment/getAssessmentItems")}(ut||(t.GetSqlAssessmentItemsRequest=ut={})),function(e){e.type=new r.RequestType("assessment/generateScript")}(dt||(t.GenerateSqlAssessmentScriptRequest=dt={})),function(e){e.type=new r.RequestType("serialize/start")}(pt||(t.SerializeDataStartRequest=pt={})),function(e){e.type=new r.RequestType("serialize/continue")}(ht||(t.SerializeDataContinueRequest=ht={})),t.CompletionExtensionParams=class{},function(e){e.type=new r.RequestType("completion/extLoad")}(ft||(t.CompletionExtLoadRequest=ft={})),function(e){e.type=new r.RequestType("notebookconvert/convertnotebooktosql")}(mt||(t.ConvertNotebookToSqlRequest=mt={})),function(e){e.type=new r.RequestType("notebookconvert/convertsqltonotebook")}(gt||(t.ConvertSqlToNotebookRequest=gt={})),function(e){e.type=new r.RequestType("profiler/createsession")}(yt||(t.CreateXEventSessionRequest=yt={})),function(e){e.type=new r.RequestType("profiler/start")}(bt||(t.StartProfilingRequest=bt={})),function(e){e.type=new r.RequestType("profiler/stop")}(vt||(t.StopProfilingRequest=vt={})),function(e){e.type=new r.RequestType("profiler/pause")}(St||(t.PauseProfilingRequest=St={})),function(e){e.type=new r.RequestType("profiler/getsessions")}(wt||(t.GetXEventSessionsRequest=wt={})),function(e){e.type=new r.RequestType("profiler/disconnect")}(Ct||(t.DisconnectSessionRequest=Ct={})),function(e){e.type=new r.NotificationType("profiler/eventsavailable")}(Tt||(t.ProfilerEventsAvailableNotification=Tt={})),function(e){e.type=new r.NotificationType("profiler/sessionstopped")}(Et||(t.ProfilerSessionStoppedNotification=Et={})),function(e){e.type=new r.NotificationType("profiler/sessioncreated")}(_t||(t.ProfilerSessionCreatedNotification=_t={})),function(e){e.type=new r.RequestType("tabledesigner/initialize")}(xt||(t.InitializeTableDesignerRequest=xt={})),function(e){e.type=new r.RequestType("tabledesigner/processedit")}(Rt||(t.ProcessTableDesignerEditRequest=Rt={})),function(e){e.type=new r.RequestType("tabledesigner/publish")}(It||(t.PublishTableDesignerChangesRequest=It={})),function(e){e.type=new r.RequestType("tabledesigner/script")}(Pt||(t.TableDesignerGenerateScriptRequest=Pt={})),function(e){e.type=new r.RequestType("tabledesigner/generatepreviewreport")}(Ot||(t.TableDesignerGenerateChangePreviewReportRequest=Ot={})),function(e){e.type=new r.RequestType("tabledesigner/dispose")}(Dt||(t.DisposeTableDesignerRequest=Dt={})),function(e){e.type=new r.RequestType("blob/createSas")}(At||(t.CreateSasRequest=At={})),function(e){e.type=new r.RequestType("queryExecutionPlan/getExecutionPlan")}(kt||(t.GetExecutionPlanRequest=kt={})),function(e){e.type=new r.RequestType("queryExecutionPlan/compareExecutionPlanGraph")}(Nt||(t.ExecutionPlanComparisonRequest=Nt={})),function(e){e.type=new r.RequestType("metadata/getServerContext")}(Lt||(t.GetServerContextualizationRequest=Lt={})),function(e){e.type=new r.RequestType("objectManagement/initializeView")}(jt||(t.InitializeViewRequest=jt={})),function(e){e.type=new r.RequestType("objectManagement/save")}(Mt||(t.SaveObjectRequest=Mt={})),function(e){e.type=new r.RequestType("objectManagement/script")}(Ft||(t.ScriptObjectRequest=Ft={})),function(e){e.type=new r.RequestType("objectManagement/disposeView")}(qt||(t.DisposeViewRequest=qt={})),function(e){e.type=new r.RequestType("objectManagement/rename")}(Bt||(t.RenameObjectRequest=Bt={})),function(e){e.type=new r.RequestType("objectManagement/drop")}(Ut||(t.DropObjectRequest=Ut={})),function(e){e.type=new r.RequestType("objectManagement/search")}(zt||(t.SearchObjectRequest=zt={})),function(e){e.type=new r.RequestType("objectManagement/detachDatabase")}(Gt||(t.DetachDatabaseRequest=Gt={})),function(e){e.type=new r.RequestType("objectManagement/dropDatabase")}(Ht||(t.DropDatabaseRequest=Ht={})),function(e){e.type=new r.RequestType("objectManagement/attachDatabase")}(Vt||(t.AttachDatabaseRequest=Vt={})),function(e){e.type=new r.RequestType("admin/getdatafolder")}($t||(t.GetDataFolderRequest=$t={})),function(e){e.type=new r.RequestType("admin/getbackupfolder")}(Wt||(t.GetBackupFolderRequest=Wt={})),function(e){e.type=new r.RequestType("backup/backup")}(Kt||(t.BackupDatabaseRequest=Kt={})),function(e){e.type=new r.RequestType("admin/getassociatedfiles")}(Qt||(t.GetAssociatedFilesRequest=Qt={})),function(e){e.type=new r.RequestType("objectManagement/purgeQueryStoreData")}(Xt||(t.PurgeQueryStoreDataRequest=Xt={})),function(e){e.type=new r.RequestType("objectManagement/createCredentialRequest")}(Yt||(t.CreateCredentialRequest=Yt={})),function(e){e.type=new r.RequestType("objectManagement/getCredentialNamesRequest")}(Jt||(t.GetCredentialNamesRequest=Jt={})),t.DidChangeEncryptionIVKeyParams=class{},function(e){e.type=new r.NotificationType("connection/encryptionKeysChanged")}(Zt||(t.EncryptionKeysChangedNotification=Zt={})),function(e){e.type=new r.RequestType("connection/clearpooledconnections")}(en||(t.ClearPooledConnectionsRequest=en={})),function(e){e.type=new r.RequestType("queryStore/getRegressedQueriesSummary")}(tn||(t.GetRegressedQueriesSummaryRequest=tn={})),function(e){e.type=new r.RequestType("queryStore/getRegressedQueriesDetailedSummary")}(nn||(t.GetRegressedQueriesDetailedSummaryRequest=nn={})),function(e){e.type=new r.RequestType("queryStore/getTrackedQueriesReport")}(rn||(t.GetTrackedQueriesReportRequest=rn={})),function(e){e.type=new r.RequestType("queryStore/getHighVariationQueriesSummary")}(on||(t.GetHighVariationQueriesSummaryRequest=on={})),function(e){e.type=new r.RequestType("queryStore/getHighVariationQueriesDetailedSummary")}(sn||(t.GetHighVariationQueriesDetailedSummaryRequest=sn={})),function(e){e.type=new r.RequestType("queryStore/getHighVariationQueriesDetailedSummaryWithWaitStats")}(an||(t.GetHighVariationQueriesDetailedSummaryWithWaitStatsRequest=an={})),function(e){e.type=new r.RequestType("queryStore/getTopResourceConsumersSummary")}(cn||(t.GetTopResourceConsumersSummaryRequest=cn={})),function(e){e.type=new r.RequestType("queryStore/getTopResourceConsumersDetailedSummary")}(ln||(t.GetTopResourceConsumersDetailedSummaryRequest=ln={})),function(e){e.type=new r.RequestType("queryStore/getTopResourceConsumersDetailedSummaryWithWaitStats")}(un||(t.GetTopResourceConsumersDetailedSummaryWithWaitStatsRequest=un={})),function(e){e.type=new r.RequestType("queryStore/getPlanSummaryChartView")}(dn||(t.GetPlanSummaryChartViewRequest=dn={})),function(e){e.type=new r.RequestType("queryStore/getPlanSummaryGridView")}(pn||(t.GetPlanSummaryGridViewRequest=pn={})),function(e){e.type=new r.RequestType("queryStore/getForcedPlan")}(hn||(t.GetForcedPlanRequest=hn={})),function(e){e.type=new r.RequestType("queryStore/getForcedPlanQueriesReport")}(fn||(t.GetForcedPlanQueriesReportRequest=fn={})),function(e){e.type=new r.RequestType("queryStore/getOverallResourceConsumptionReport")}(mn||(t.GetOverallResourceConsumptionReportRequest=mn={}))},6673:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.providerId=t.serviceName=void 0,t.serviceName="SerilizationProvider",t.providerId="serilizationProvider"},2143:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeleteCredentialRequest=t.SaveCredentialRequest=t.ReadCredentialRequest=void 0;const r=n(4382);var i,o,s;!function(e){e.type=new r.RequestType("credential/read")}(i||(t.ReadCredentialRequest=i={})),function(e){e.type=new r.RequestType("credential/save")}(o||(t.SaveCredentialRequest=o={})),function(e){e.type=new r.RequestType("credential/delete")}(s||(t.DeleteCredentialRequest=s={}))},1958:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CredentialStore=void 0;const r=n(5702),i=n(4382),o=n(6673),s=n(76),a=n(5710);t.CredentialStore=class{constructor(e,t){this.context=e,t&&(this._config=JSON.parse(JSON.stringify(t)),this._config.executableFiles=["MicrosoftSqlToolsCredentials.exe","MicrosoftSqlToolsCredentials"]),this.context=e,this._logPath=this.context.extensionContext.logUri.fsPath}async start(){let e={providerId:o.providerId,features:[a.SqlCredentialService.asFeature(this.context)]};const t=await s.getOrDownloadServer(this._config),n=this.generateServerOptions(t);this._client=new r.SqlOpsDataClient(o.serviceName,n,e),this._client.start()}async dispose(){this._client&&await this._client.stop()}generateServerOptions(e){return{command:e,args:s.getCommonLaunchArgsAndCleanupOldLogFiles(this._logPath,"credentialstore.log",e),transport:i.TransportKind.stdio}}}},5710:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SqlCredentialService=void 0;const r=n(5702),i=n(76),o=n(2143),s=n(235),a=n(6362);class c extends r.SqlOpsFeature{static asFeature(e){return class extends c{constructor(t){super(e,t),this._secretStorage=e.extensionContext.secrets}fillClientCapabilities(e){i.ensure(i.ensure(e,"credentials"),"credentials").dynamicRegistration=!0}async initialize(e){this.register(this.messages,{id:a.generateUuid(),registerOptions:void 0})}registerProvider(e){return s.credentials.registerProvider({deleteCredential:async e=>{if(i.isLinux)try{return await this._secretStorage.delete(e),!0}catch(e){console.log("credential does not exist in native secret store")}return this._client.sendRequest(o.DeleteCredentialRequest.type,{credentialId:e})},readCredential:async e=>i.isLinux?{credentialId:e,password:await this._secretStorage.get(e)||""}:this._client.sendRequest(o.ReadCredentialRequest.type,{credentialId:e}),saveCredential:async(e,t)=>i.isLinux?(await this._secretStorage.store(e,t),!0):this._client.sendRequest(o.SaveCredentialRequest.type,{credentialId:e,password:t}),handle:0})}}}fillClientCapabilities(e){}initialize(e){}registerProvider(e){return{dispose:()=>{}}}constructor(e,t){super(t,c.messagesTypes),this.client=t}}t.SqlCredentialService=c,c.messagesTypes=[o.DeleteCredentialRequest.type,o.SaveCredentialRequest.type,o.ReadCredentialRequest.type]},5563:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DacFxService=void 0;const r=n(3508),i=n(76),o=n(6290),s=n(5702);class a extends s.BaseService{static asFeature(e){return class extends a{constructor(t){super(e,t)}fillClientCapabilities(e){i.ensure(e,"dacfx").dacfx=!0}initialize(){}}}constructor(e,t){super(t),e.registerService(r.DacFxService,this)}async exportBacpac(e,t,n,r){const i={databaseName:e,packageFilePath:t,ownerUri:n,taskExecutionMode:r};return this.runWithErrorHandling(o.ExportRequest.type,i)}async importBacpac(e,t,n,r){const i={packageFilePath:e,databaseName:t,ownerUri:n,taskExecutionMode:r};return this.runWithErrorHandling(o.ImportRequest.type,i)}async extractDacpac(e,t,n,r,i,s){const a={databaseName:e,packageFilePath:t,applicationName:n,applicationVersion:r,ownerUri:i,extractTarget:0,taskExecutionMode:s};return this.runWithErrorHandling(o.ExtractRequest.type,a)}async createProjectFromDatabase(e,t,n,r,i,s,a,c){const l={databaseName:e,packageFilePath:t,applicationName:n,applicationVersion:r,ownerUri:i,extractTarget:s,taskExecutionMode:a,includePermissions:c};return this.runWithErrorHandling(o.ExtractRequest.type,l)}async deployDacpac(e,t,n,r,i,s,a){const c={packageFilePath:e,databaseName:t,upgradeExisting:n,sqlCommandVariableValues:s?Object.fromEntries(s):void 0,deploymentOptions:a,ownerUri:r,taskExecutionMode:i};return this.runWithErrorHandling(o.DeployRequest.type,c)}async generateDeployScript(e,t,n,r,i,s){const a={packageFilePath:e,databaseName:t,sqlCommandVariableValues:i?Object.fromEntries(i):void 0,deploymentOptions:s,ownerUri:n,taskExecutionMode:r};return this.runWithErrorHandling(o.GenerateDeployScriptRequest.type,a)}async generateDeployPlan(e,t,n,r){const i={packageFilePath:e,databaseName:t,ownerUri:n,taskExecutionMode:r};return this.runWithErrorHandling(o.GenerateDeployPlanRequest.type,i)}async getOptionsFromProfile(e){const t={profilePath:e};return this.runWithErrorHandling(o.GetOptionsFromProfileRequest.type,t)}async validateStreamingJob(e,t){const n={packageFilePath:e,createStreamingJobTsql:t};return this.runWithErrorHandling(o.ValidateStreamingJobRequest.type,n)}async parseTSqlScript(e,t){const n={filePath:e,databaseSchemaProvider:t};return this.runWithErrorHandling(o.ParseTSqlScriptRequest.type,n)}async savePublishProfile(e,t,n,r,i){const s={profilePath:e,databaseName:t,connectionString:n,sqlCommandVariableValues:r?Object.fromEntries(r):void 0,deploymentOptions:i};return this.runWithErrorHandling(o.SavePublishProfileRequest.type,s)}}t.DacFxService=a},8415:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getBookExtensionContributions=void 0;const r=n(1398),i=n(6928),o=n(5586),s=n(7643);var a;!function(e){e.merge=function(e,t){return e?t?e.concat(t):e:t},e.equal=function(e,t){return e.name===t.name&&e.path===t.path&&e.when===t.when},e.fromExtension=function(e){const t=e.packageJSON?.contributes;return t?function(e,t){return e["notebook.books"]?((e,t)=>{if(!t)return[];Array.isArray(t)||(t=[t]);let n=t.map((t=>{try{t.path=((e,t)=>r.Uri.file(i.join(e.extensionPath,t)))(e,t.path).fsPath}catch(e){}return t}));return n})(t,e["notebook.books"]):[]}(t,e):[]}}(a||(a={}));class c extends s.Disposable{constructor(e){super(),this.extensionPath=e,this._contributionCommands=[],this._onContributionsChanged=this._register(new r.EventEmitter),this.onContributionsChanged=this._onContributionsChanged.event,r.extensions.onDidChange((async()=>{const e=this.getCurrentContributions(),t=this._contributions||void 0;t&&o.equals(t,e,a.equal)||(await this.unregisterCommands(),this._contributions=e,await this.registerCommands(),this._onContributionsChanged.fire(this))}),void 0,this._disposables),this.registerCommands().catch((e=>console.log(`Error registering contributed book commands : ${e}`)))}get contributions(){return this._contributions||(this._contributions=this.getCurrentContributions()),this._contributions}getCurrentContributions(){return r.extensions.all.map(a.fromExtension).reduce(a.merge,[])}async registerCommands(){await Promise.all(this.contributions.map((async e=>{let t=i.basename(e.path);await r.commands.executeCommand("setContext",t,!0),this._contributionCommands.push(r.commands.registerCommand("books."+t,(async t=>{await r.commands.executeCommand("bookTreeView.openBook",e.path,!0,t)})))})))}async unregisterCommands(){this._contributionCommands.forEach((e=>e.dispose())),this._contributionCommands=[],await Promise.all(this.contributions.map((async e=>{let t=i.basename(e.path);await r.commands.executeCommand("setContext",t,!1)})))}}t.getBookExtensionContributions=function(e){return new c(e.extensionPath)}},8481:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerBooksWidget=void 0;const r=n(1398),i=n(235);t.registerBooksWidget=function(e){i.ui.registerModelViewProvider("books-widget",(async t=>{const n=t.modelBuilder.flexContainer().withLayout({flexFlow:"column",width:"100%",height:"100%"}).component(),i=t.modelBuilder.flexContainer().withLayout({flexFlow:"column",width:"270px",height:"100%",position:"absolute"}).component();let o=e.contributions.map((e=>{const n=t.modelBuilder.flexContainer().withLayout({flexFlow:"row"}).component(),i=t.modelBuilder.button().withProps({label:e.name,title:e.name,secondary:!0}).component();return i.onDidClick((()=>{var t;t=r.Uri.file(e.path),r.commands.executeCommand("bookTreeView.openBook",t.fsPath,!0,void 0)})),n.addItem(i,{CSSStyles:{width:"100%",color:"#0078d4","text-decoration":"underline","padding-top":"10px","text-align":"left"}}),n}));n.addItems(o,{CSSStyles:{"padding-left":"10px","border-top":"solid 1px #ccc","box-sizing":"border-box","user-select":"text"}}),i.addItem(n,{CSSStyles:{"padding-top":"25px","padding-left":"5px"}}),await t.initializeModel(i)}))}},6223:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TSC_ReadMoreLink=t.TSC_InstructionText=t.TSC_EnableTrustServerCert=t.TSC_OptionName=t.TSC_ActionId=t.ConnectionErrorDialogTitle=t.MssqlConnectionTelemetryView=t.MssqlCertValidationFailedErrorCode=t.MssqlPasswordResetErrorCode=void 0;const r=n(4200).loadMessageBundle(n(6928).join(__dirname,"errorDiagnostics\\errorDiagnosticsConstants.ts"));t.MssqlPasswordResetErrorCode=[18488,18487],t.MssqlCertValidationFailedErrorCode=-2146893019,t.MssqlConnectionTelemetryView="MssqlConnectionErrorDialog",t.ConnectionErrorDialogTitle=r(0,null),t.TSC_ActionId="enableTrustServerCertificate",t.TSC_OptionName="trustServerCertificate",t.TSC_EnableTrustServerCert=r(1,null),t.TSC_InstructionText=r(2,null),t.TSC_ReadMoreLink="https://learn.microsoft.com/sql/database-engine/configure-windows/enable-encrypted-connections-to-the-database-engine"},1089:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorDiagnosticsProvider=void 0;const r=n(235),i=n(5702),o=n(6362),s=n(3508),a=n(6223),c=n(76);class l extends i.SqlOpsFeature{static asFeature(e){return class extends l{constructor(t){super(e,t)}fillClientCapabilities(e){}initialize(){this.register(this.messages,{id:o.generateUuid(),registerOptions:void 0})}convertToIConnectionProfile(e){return{providerName:e.providerId,id:e.connectionId,connectionName:e.connectionName,serverName:e.serverName,databaseName:e.databaseName,userName:e.userName,password:e.password,authenticationType:e.authenticationType,savePassword:e.savePassword,groupFullName:e.groupFullName,groupId:e.groupId,saveProfile:e.savePassword,azureTenantId:e.azureTenantId,options:e.options}}registerProvider(e){return r.diagnostics.registerDiagnosticsProvider({targetProviderId:s.providerId},{handleConnectionError:async(e,t)=>{let n=this.convertToIConnectionProfile(t);return a.MssqlPasswordResetErrorCode.includes(e.errorCode)?((0,c.logDebug)(`ErrorDiagnosticsProvider: Error Code ${e.errorCode} requires user to change their password, launching change password dialog.`),await this.handleChangePassword(n)):e.errorCode===a.MssqlCertValidationFailedErrorCode?((0,c.logDebug)(`ErrorDiagnosticsProvider: Error Code ${e.errorCode} indicates certificate validation has failed, launching error dialog with instructionText.`),await this.showCertValidationDialog(n,e.errorMessage,e.messageDetails)):((0,c.logDebug)(`ErrorDiagnosticsProvider: No error handler found for errorCode ${e.errorCode}.`),{handled:!1})}})}async showCertValidationDialog(e,t,n){try{let i=[],o={id:a.TSC_ActionId,label:a.TSC_EnableTrustServerCert,isPrimary:!0};return i.push(o),await r.window.openCustomErrorDialog({severity:r.window.MessageLevel.Error,headerTitle:a.ConnectionErrorDialogTitle,message:t,messageDetails:n,telemetryView:a.MssqlConnectionTelemetryView,instructionText:a.TSC_InstructionText,readMoreLink:a.TSC_ReadMoreLink,actions:i})===a.TSC_ActionId?(e.options[a.TSC_OptionName]=!0,{handled:!0,reconnect:!0,options:e.options}):{handled:!0,reconnect:!1}}catch(e){console.error(`Unexpected exception occurred when showing certificate validation custom dialog: ${e}`)}return{handled:!1}}async handleChangePassword(e){try{const t=await r.connection.openChangePasswordDialog(e);if(t)return e.options.password=t,{handled:!0,reconnect:!0,options:e.options}}catch(e){console.error(`Change password failed unexpectedly with error: ${e}`)}return{handled:!1}}}}fillClientCapabilities(e){}initialize(e){}constructor(e,t){super(t,l.messagesTypes),this.client=t}registerProvider(e){return{dispose:()=>{}}}}t.ErrorDiagnosticsProvider=l,l.messagesTypes=[]},2166:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ServerContextualizationServiceFeature=t.ExecutionPlanServiceFeature=t.TableDesignerFeature=t.ProfilerFeature=t.SqlAssessmentServicesFeature=t.SerializationFeature=t.AgentServicesFeature=t.AccountFeature=t.TelemetryFeature=void 0;const r=n(4200),i=n(5702),o=n(1398),s=n(6734),a=n(6290),c=n(235),l=n(76),u=n(6362),d=n(8712),p=n(1651),h=r.loadMessageBundle(n(6928).join(__dirname,"features.ts"));t.TelemetryFeature=class{constructor(e){this._client=e}fillClientCapabilities(e){l.ensure(e,"telemetry").telemetry=!0}initialize(){this._client.onNotification(a.TelemetryNotification.type,(e=>{s.TelemetryReporter.sendTelemetryEvent(e.params.eventName,e.params.properties,e.params.measures)}))}};class f{constructor(e){this._client=e}fillClientCapabilities(e){}initialize(){this.tokenCache=new d.DataItemCache(this.getToken,10),this._client.onRequest(a.SecurityTokenRequest.type,(async e=>await this.tokenCache.getData(e))),this._client.onNotification(a.RefreshTokenNotification.type,(async e=>{let t=await this.refreshToken(e);if(!t)throw o.window.showErrorMessage(p.tokenRefreshFailed("autocompletion")),console.log(`Token Refresh Failed ${e.toString()}`),Error(p.tokenRefreshFailed("autocompletion"));this._client.sendNotification(a.TokenRefreshedNotification.type,t)}))}async getToken(e){const t=await c.accounts.getAllAccounts();let n;if(t.length<1)return void o.window.showErrorMessage(h(0,null));if(t.length>1){let e={ignoreFocusOut:!0,placeHolder:h(1,null)},r=t.map((e=>new f.AccountQuickPickItem(e))),i=await o.window.showQuickPick(r,e);if(!i)return void o.window.showErrorMessage(h(2,null));n=i.account}else n=t[0];const r=n.properties.tenants.find((t=>e.authority.includes(t.id))),i=h(3,null,n.key.accountId);if(!r)return void o.window.showErrorMessage(i);const s=await c.accounts.getAccountSecurityToken(n,r.id,c.AzureResource.AzureKeyVault);if(s?.token)return{accountKey:JSON.stringify(n.key),token:s.token};o.window.showErrorMessage(i)}async refreshToken(e){const t=(await c.accounts.getAllAccounts()).find((t=>t.key.accountId===e.accountId));if(!t)throw console.log(`Failed to find azure account ${e.accountId} when executing token refresh`),Error(p.failedToFindAccount(e.accountId));const n=t.properties.tenants.find((t=>t.id===e.tenantId));if(!n)throw console.log(`Failed to find tenant ${e.tenantId} in account ${t.displayInfo.displayName} when refreshing security token`),Error(p.failedToFindTenants(e.tenantId,t.displayInfo.displayName));const r=await c.accounts.getAccountSecurityToken(t,n.id,c.AzureResource.ResourceManagement);if(!r)throw console.log("Editor token refresh failed, autocompletion will be disabled until the editor is disconnected and reconnected"),Error(p.tokenRefreshFailedNoSecurityToken);return{token:r.token,expiresOn:r.expiresOn,uri:e.uri}}}t.AccountFeature=f,f.AccountQuickPickItem=class{constructor(e){this.account=e,this.label=e.displayInfo.displayName}};class m extends i.SqlOpsFeature{constructor(e){super(e,m.messagesTypes)}fillClientCapabilities(e){}initialize(e){this.register(this.messages,{id:u.generateUuid(),registerOptions:void 0})}registerProvider(e){const t=this._client;let n=this,r=()=>{n.onUpdatedHandler&&n.onUpdatedHandler()};return c.dataprotocol.registerAgentServicesProvider({providerId:t.providerId,getJobs:e=>{let n={ownerUri:e,jobId:""};return t.sendRequest(a.AgentJobsRequest.type,n).then((e=>e),(e=>(t.logFailedRequest(a.AgentJobsRequest.type,e),Promise.reject(e))))},getJobHistory:(e,n,r)=>{let i={ownerUri:e,jobId:n,jobName:r};return t.sendRequest(a.AgentJobHistoryRequest.type,i).then((e=>e),(e=>(t.logFailedRequest(a.AgentJobHistoryRequest.type,e),Promise.reject(e))))},jobAction:(e,n,r)=>{let i={ownerUri:e,jobName:n,action:r};return t.sendRequest(a.AgentJobActionRequest.type,i).then((e=>e),(e=>(t.logFailedRequest(a.AgentJobActionRequest.type,e),Promise.reject(e))))},createJob:(e,n)=>{let i={ownerUri:e,job:n},o=a.CreateAgentJobRequest.type;return t.sendRequest(o,i).then((e=>(r(),e)),(e=>(t.logFailedRequest(o,e),Promise.reject(e))))},updateJob:(e,n,i)=>{let o={ownerUri:e,originalJobName:n,job:i},s=a.UpdateAgentJobRequest.type;return t.sendRequest(s,o).then((e=>(r(),e)),(e=>(t.logFailedRequest(s,e),Promise.reject(e))))},deleteJob:(e,n)=>{let i={ownerUri:e,job:n},o=a.DeleteAgentJobRequest.type;return t.sendRequest(o,i).then((e=>(r(),e)),(e=>(t.logFailedRequest(o,e),Promise.reject(e))))},getJobDefaults:e=>{let n={ownerUri:e},r=a.AgentJobDefaultsRequest.type;return t.sendRequest(r,n).then((e=>e),(e=>(t.logFailedRequest(r,e),Promise.reject(e))))},createJobStep:(e,n)=>{let i={ownerUri:e,step:n},o=a.CreateAgentJobStepRequest.type;return t.sendRequest(o,i).then((e=>(r(),e)),(e=>(t.logFailedRequest(o,e),Promise.reject(e))))},updateJobStep:(e,n,i)=>{let o={ownerUri:e,originalJobStepName:n,step:i},s=a.UpdateAgentJobStepRequest.type;return t.sendRequest(s,o).then((e=>(r(),e)),(e=>(t.logFailedRequest(s,e),Promise.reject(e))))},deleteJobStep:(e,n)=>{let i={ownerUri:e,step:n},o=a.DeleteAgentJobStepRequest.type;return t.sendRequest(o,i).then((e=>(r(),e)),(e=>(t.logFailedRequest(o,e),Promise.reject(e))))},getNotebooks:e=>{let n={ownerUri:e};return t.sendRequest(a.AgentNotebooksRequest.type,n).then((e=>e),(e=>(t.logFailedRequest(a.AgentNotebooksRequest.type,e),Promise.reject(e))))},getNotebookHistory:(e,n,r,i)=>{let o={ownerUri:e,jobId:n,jobName:r,targetDatabase:i};return t.sendRequest(a.AgentNotebookHistoryRequest.type,o).then((e=>e),(e=>(t.logFailedRequest(a.AgentNotebookHistoryRequest.type,e),Promise.reject(e))))},getMaterializedNotebook:(e,n,r)=>{let i={ownerUri:e,targetDatabase:n,notebookMaterializedId:r};return t.sendRequest(a.AgentNotebookMaterializedRequest.type,i).then((e=>e),(e=>(t.logFailedRequest(a.AgentNotebookMaterializedRequest.type,e),Promise.reject(e))))},getTemplateNotebook:(e,n,r)=>{let i={ownerUri:e,targetDatabase:n,jobId:r};return t.sendRequest(a.AgentNotebookTemplateRequest.type,i).then((e=>e),(e=>(t.logFailedRequest(a.AgentNotebookTemplateRequest.type,e),Promise.reject(e))))},createNotebook:(e,n,i)=>{let o={ownerUri:e,notebook:n,templateFilePath:i},s=a.CreateAgentNotebookRequest.type;return t.sendRequest(s,o).then((e=>(r(),e)),(e=>(t.logFailedRequest(s,e),Promise.reject(e))))},updateNotebook:(e,n,i,o)=>{let s={ownerUri:e,originalNotebookName:n,notebook:i,templateFilePath:o},c=a.UpdateAgentNotebookRequest.type;return t.sendRequest(c,s).then((e=>(r(),e)),(e=>(t.logFailedRequest(c,e),Promise.reject(e))))},deleteMaterializedNotebook:(e,n,r)=>{let i={ownerUri:e,targetDatabase:r,agentNotebookHistory:n};return t.sendRequest(a.DeleteMaterializedNotebookRequest.type,i).then((e=>e),(e=>(t.logFailedRequest(a.DeleteMaterializedNotebookRequest.type,e),Promise.reject(e))))},updateNotebookMaterializedName:(e,n,r,i)=>{let o={ownerUri:e,targetDatabase:r,agentNotebookHistory:n,materializedNotebookName:i};return t.sendRequest(a.UpdateAgentNotebookRunNameRequest.type,o).then((e=>e),(e=>(t.logFailedRequest(a.UpdateAgentNotebookRunNameRequest.type,e),Promise.reject(e))))},updateNotebookMaterializedPin:(e,n,r,i)=>{let o={ownerUri:e,targetDatabase:r,agentNotebookHistory:n,materializedNotebookPin:i};return t.sendRequest(a.UpdateAgentNotebookRunPinRequest.type,o).then((e=>e),(e=>(t.logFailedRequest(a.UpdateAgentNotebookRunPinRequest.type,e),Promise.reject(e))))},deleteNotebook:(e,n)=>{let i={ownerUri:e,notebook:n},o=a.DeleteAgentNotebookRequest.type;return t.sendRequest(o,i).then((e=>(r(),e)),(e=>(t.logFailedRequest(o,e),Promise.reject(e))))},getAlerts:e=>{let n={ownerUri:e},r=a.AgentAlertsRequest.type;return t.sendRequest(r,n).then((e=>e),(e=>(t.logFailedRequest(r,e),Promise.reject(e))))},createAlert:(e,n)=>{let i={ownerUri:e,alert:n},o=a.CreateAgentAlertRequest.type;return t.sendRequest(o,i).then((e=>(r(),e)),(e=>(t.logFailedRequest(o,e),Promise.reject(e))))},updateAlert:(e,n,i)=>{let o={ownerUri:e,originalAlertName:n,alert:i},s=a.UpdateAgentAlertRequest.type;return t.sendRequest(s,o).then((e=>(r(),e)),(e=>(t.logFailedRequest(s,e),Promise.reject(e))))},deleteAlert:(e,n)=>{let i={ownerUri:e,alert:n},o=a.DeleteAgentAlertRequest.type;return t.sendRequest(o,i).then((e=>(r(),e)),(e=>(t.logFailedRequest(o,e),Promise.reject(e))))},getOperators:e=>{let n={ownerUri:e},r=a.AgentOperatorsRequest.type;return t.sendRequest(r,n).then((e=>e),(e=>(t.logFailedRequest(r,e),Promise.reject(e))))},createOperator:(e,n)=>{let i={ownerUri:e,operator:n},o=a.CreateAgentOperatorRequest.type;return t.sendRequest(o,i).then((e=>(r(),e)),(e=>(t.logFailedRequest(o,e),Promise.reject(e))))},updateOperator:(e,n,i)=>{let o={ownerUri:e,originalOperatorName:n,operator:i},s=a.UpdateAgentOperatorRequest.type;return t.sendRequest(s,o).then((e=>(r(),e)),(e=>(t.logFailedRequest(s,e),Promise.reject(e))))},deleteOperator:(e,n)=>{let i={ownerUri:e,operator:n},o=a.DeleteAgentOperatorRequest.type;return t.sendRequest(o,i).then((e=>(r(),e)),(e=>(t.logFailedRequest(o,e),Promise.reject(e))))},getProxies:e=>{let n={ownerUri:e},r=a.AgentProxiesRequest.type;return t.sendRequest(r,n).then((e=>e),(e=>(t.logFailedRequest(r,e),Promise.reject(e))))},createProxy:(e,n)=>{let i={ownerUri:e,proxy:n},o=a.CreateAgentProxyRequest.type;return t.sendRequest(o,i).then((e=>(r(),e)),(e=>(t.logFailedRequest(o,e),Promise.reject(e))))},updateProxy:(e,n,i)=>{let o={ownerUri:e,originalProxyName:n,proxy:i},s=a.UpdateAgentProxyRequest.type;return t.sendRequest(s,o).then((e=>(r(),e)),(e=>(t.logFailedRequest(s,e),Promise.reject(e))))},deleteProxy:(e,n)=>{let i={ownerUri:e,proxy:n},o=a.DeleteAgentProxyRequest.type;return t.sendRequest(o,i).then((e=>(r(),e)),(e=>(t.logFailedRequest(o,e),Promise.reject(e))))},getCredentials:e=>{let n={ownerUri:e},r=a.AgentCredentialsRequest.type;return t.sendRequest(r,n).then((e=>e),(e=>(t.logFailedRequest(r,e),Promise.reject(e))))},getJobSchedules:e=>{let n={ownerUri:e},r=a.AgentJobSchedulesRequest.type;return t.sendRequest(r,n).then((e=>e),(e=>(t.logFailedRequest(r,e),Promise.reject(e))))},createJobSchedule:(e,n)=>{let i={ownerUri:e,schedule:n},o=a.CreateAgentJobScheduleRequest.type;return t.sendRequest(o,i).then((e=>(r(),e)),(e=>(t.logFailedRequest(o,e),Promise.reject(e))))},updateJobSchedule:(e,n,i)=>{let o={ownerUri:e,originalScheduleName:n,schedule:i},s=a.UpdateAgentJobScheduleRequest.type;return t.sendRequest(s,o).then((e=>(r(),e)),(e=>(t.logFailedRequest(s,e),Promise.reject(e))))},deleteJobSchedule:(e,n)=>{let i={ownerUri:e,schedule:n},o=a.DeleteAgentJobScheduleRequest.type;return t.sendRequest(o,i).then((e=>(r(),e)),(e=>(t.logFailedRequest(o,e),Promise.reject(e))))},registerOnUpdated:e=>{n.onUpdatedHandler=e}})}}t.AgentServicesFeature=m,m.messagesTypes=[a.AgentJobsRequest.type,a.AgentJobHistoryRequest.type,a.AgentJobActionRequest.type];class g extends i.SqlOpsFeature{constructor(e){super(e,g.messageTypes)}fillClientCapabilities(e){}initialize(e){this.register(this.messages,{id:u.generateUuid(),registerOptions:void 0})}registerProvider(e){const t=this._client;return c.dataprotocol.registerSerializationProvider({providerId:t.providerId,startSerialization:e=>t.sendRequest(a.SerializeDataStartRequest.type,e).then((e=>e),(e=>(t.logFailedRequest(a.SerializeDataStartRequest.type,e),Promise.resolve({succeeded:!1,messages:l.getErrorMessage(e)})))),continueSerialization:e=>t.sendRequest(a.SerializeDataContinueRequest.type,e).then((e=>e),(e=>(t.logFailedRequest(a.SerializeDataContinueRequest.type,e),Promise.resolve({succeeded:!1,messages:l.getErrorMessage(e)}))))})}}t.SerializationFeature=g,g.messageTypes=[a.SerializeDataStartRequest.type,a.SerializeDataContinueRequest.type];class y extends i.SqlOpsFeature{constructor(e){super(e,y.messagesTypes)}fillClientCapabilities(e){}initialize(e){this.register(this.messages,{id:u.generateUuid(),registerOptions:void 0})}registerProvider(e){const t=this._client;return c.dataprotocol.registerSqlAssessmentServicesProvider({providerId:t.providerId,assessmentInvoke:async(e,n)=>{let r={ownerUri:e,targetType:n};try{return t.sendRequest(a.SqlAssessmentInvokeRequest.type,r)}catch(e){throw t.logFailedRequest(a.SqlAssessmentInvokeRequest.type,e),e}},getAssessmentItems:async(e,n)=>{let r={ownerUri:e,targetType:n};try{return t.sendRequest(a.GetSqlAssessmentItemsRequest.type,r)}catch(e){throw t.logFailedRequest(a.GetSqlAssessmentItemsRequest.type,e),e}},generateAssessmentScript:async e=>{let n={items:e,taskExecutionMode:c.TaskExecutionMode.script,targetServerName:"",targetDatabaseName:""};try{return t.sendRequest(a.GenerateSqlAssessmentScriptRequest.type,n)}catch(e){throw t.logFailedRequest(a.GenerateSqlAssessmentScriptRequest.type,e),e}}})}}t.SqlAssessmentServicesFeature=y,y.messagesTypes=[a.SqlAssessmentInvokeRequest.type,a.GetSqlAssessmentItemsRequest.type];class b extends i.SqlOpsFeature{constructor(e){super(e,b.messagesTypes)}fillClientCapabilities(e){}initialize(e){this.register(this.messages,{id:u.generateUuid(),registerOptions:void 0})}registerProvider(e){const t=this._client,n=this.registerNotificationEmitter(a.ProfilerEventsAvailableNotification.type),r=this.registerNotificationEmitter(a.ProfilerSessionStoppedNotification.type),i=this.registerNotificationEmitter(a.ProfilerSessionCreatedNotification.type);return c.dataprotocol.registerProfilerProvider({providerId:t.providerId,connectSession:e=>Promise.resolve(!1),disconnectSession:e=>{let n={ownerUri:e};return t.sendRequest(a.DisconnectSessionRequest.type,n).then((e=>!0),(e=>(t.logFailedRequest(a.DisconnectSessionRequest.type,e),Promise.reject(e))))},registerOnSessionEventsAvailable:e=>{n.event((t=>{e({sessionId:t.ownerUri,events:t.events,eventsLost:t.eventsLost})}))},registerOnSessionStopped:e=>{r.event((t=>{e({ownerUri:t.ownerUri,sessionId:t.sessionId})}))},registerOnProfilerSessionCreated:e=>{i.event((t=>{e({ownerUri:t.ownerUri,sessionName:t.sessionName,templateName:t.templateName})}))},createSession:(e,n,r)=>{let i={ownerUri:e,sessionName:n,template:r};return t.sendRequest(a.CreateXEventSessionRequest.type,i).then((e=>!0),(e=>(t.logFailedRequest(a.CreateXEventSessionRequest.type,e),Promise.reject(e))))},startSession:(e,n,r=c.ProfilingSessionType.RemoteSession)=>{let i={ownerUri:e,sessionName:n,sessionType:r};return t.sendRequest(a.StartProfilingRequest.type,i).then((e=>!0),(e=>(t.logFailedRequest(a.StartProfilingRequest.type,e),Promise.reject(e))))},stopSession:e=>{let n={ownerUri:e};return t.sendRequest(a.StopProfilingRequest.type,n).then((e=>!0),(e=>(t.logFailedRequest(a.StopProfilingRequest.type,e),Promise.reject(e))))},pauseSession:e=>{let n={ownerUri:e};return t.sendRequest(a.PauseProfilingRequest.type,n).then((e=>!0),(e=>(t.logFailedRequest(a.PauseProfilingRequest.type,e),Promise.reject(e))))},getXEventSessions:e=>{let n={ownerUri:e};return t.sendRequest(a.GetXEventSessionsRequest.type,n).then((e=>e.sessions),(e=>(t.logFailedRequest(a.GetXEventSessionsRequest.type,e),Promise.reject(e))))}})}}t.ProfilerFeature=b,b.messagesTypes=[a.StartProfilingRequest.type,a.StopProfilingRequest.type,a.ProfilerEventsAvailableNotification.type];class v extends i.SqlOpsFeature{constructor(e){super(e,v.messagesTypes)}fillClientCapabilities(e){}initialize(e){this.register(this.messages,{id:u.generateUuid(),registerOptions:void 0})}registerProvider(e){const t=this._client;return c.dataprotocol.registerTableDesignerProvider({providerId:t.providerId,initializeTableDesigner:e=>{try{return t.sendRequest(a.InitializeTableDesignerRequest.type,e)}catch(e){return t.logFailedRequest(a.InitializeTableDesignerRequest.type,e),Promise.reject(e)}},processTableEdit:(e,n)=>{let r={tableInfo:e,tableChangeInfo:n};try{return t.sendRequest(a.ProcessTableDesignerEditRequest.type,r)}catch(e){return t.logFailedRequest(a.ProcessTableDesignerEditRequest.type,e),Promise.reject(e)}},publishChanges:e=>{try{return t.sendRequest(a.PublishTableDesignerChangesRequest.type,e)}catch(e){return t.logFailedRequest(a.PublishTableDesignerChangesRequest.type,e),Promise.reject(e)}},generateScript:e=>{try{return t.sendRequest(a.TableDesignerGenerateScriptRequest.type,e)}catch(e){return t.logFailedRequest(a.TableDesignerGenerateScriptRequest.type,e),Promise.reject(e)}},generatePreviewReport:e=>{try{return t.sendRequest(a.TableDesignerGenerateChangePreviewReportRequest.type,e)}catch(e){return t.logFailedRequest(a.TableDesignerGenerateChangePreviewReportRequest.type,e),Promise.reject(e)}},disposeTableDesigner:e=>{try{return t.sendRequest(a.DisposeTableDesignerRequest.type,e)}catch(e){return t.logFailedRequest(a.DisposeTableDesignerRequest.type,e),Promise.reject(e)}}})}}t.TableDesignerFeature=v,v.messagesTypes=[a.ProcessTableDesignerEditRequest.type];class S extends i.SqlOpsFeature{constructor(e){super(e,S.messagesTypes)}fillClientCapabilities(e){}initialize(e){this.register(this.messages,{id:u.generateUuid(),registerOptions:void 0})}registerProvider(e){const t=this._client;return c.dataprotocol.registerExecutionPlanProvider({providerId:t.providerId,getExecutionPlan:e=>{const n={graphInfo:e};return t.sendRequest(a.GetExecutionPlanRequest.type,n).then((e=>e),(e=>(t.logFailedRequest(a.GetExecutionPlanRequest.type,e),Promise.reject(e))))},compareExecutionPlanGraph:(e,n)=>{const r={firstExecutionPlanGraphInfo:e,secondExecutionPlanGraphInfo:n};return t.sendRequest(a.ExecutionPlanComparisonRequest.type,r).then((e=>e),(e=>(t.logFailedRequest(a.ExecutionPlanComparisonRequest.type,e),Promise.reject(e))))},isExecutionPlan:e=>new Promise((t=>{let n=!1,r="";return e.includes("ShowPlanXML")&&(n=!0,r="sqlplan"),t({isExecutionPlan:n,queryExecutionPlanFileExtension:r})}))})}}t.ExecutionPlanServiceFeature=S,S.messagesTypes=[a.GetExecutionPlanRequest.type];class w extends i.SqlOpsFeature{constructor(e){super(e,w.messagesTypes)}fillClientCapabilities(e){}initialize(e){this.register(this.messages,{id:u.generateUuid(),registerOptions:void 0})}registerProvider(e){const t=this._client;return c.dataprotocol.registerServerContextualizationProvider({providerId:t.providerId,getServerContextualization:e=>{const n={ownerUri:e};return t.sendRequest(a.GetServerContextualizationRequest.type,n).then((e=>e),(e=>(t.logFailedRequest(a.GetServerContextualizationRequest.type,e),Promise.reject(e))))}})}}t.ServerContextualizationServiceFeature=w,w.messagesTypes=[a.GetServerContextualizationRequest.type]},3344:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IconPathHelper=void 0;class n{static setExtensionContext(e){n.extensionContext=e,n.delete={dark:n.extensionContext.asAbsolutePath("resources/dark/delete_inverse.svg"),light:n.extensionContext.asAbsolutePath("resources/light/delete.svg")},n.user={dark:n.extensionContext.asAbsolutePath("resources/dark/user_inverse.svg"),light:n.extensionContext.asAbsolutePath("resources/light/user.svg")},n.group={dark:n.extensionContext.asAbsolutePath("resources/dark/group_inverse.svg"),light:n.extensionContext.asAbsolutePath("resources/light/group.svg")},n.folder={dark:n.extensionContext.asAbsolutePath("resources/folder.svg"),light:n.extensionContext.asAbsolutePath("resources/folder.svg")}}}t.IconPathHelper=n},6705:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MssqlIconProvider=void 0;const r=n(235),i=n(3508);t.MssqlIconProvider=class{constructor(){this.providerId=i.sqlProviderName}getConnectionIconId(e,t){let n;return e.providerName===i.sqlProviderName&&(t.engineEditionId===r.DatabaseEngineEdition.SqlManagedInstance&&(n="mssql:managedInstance"),t.isCloud&&(n="mssql:cloud")),Promise.resolve(n)}}},755:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LanguageExtensionService=void 0;const r=n(3508),i=n(76),o=n(6290),s=n(5702);class a extends s.BaseService{static asFeature(e){return class extends a{constructor(t){super(e,t)}fillClientCapabilities(e){i.ensure(e,"languageExtension").languageExtension=!0}initialize(){}}}constructor(e,t){super(t),e.registerService(r.LanguageExtensionService,this)}async listLanguages(e){const t={ownerUri:e};return this.runWithErrorHandling(o.LanguageExtensibilityListRequest.type,t).then((e=>e.languages))}async updateLanguage(e,t){const n={ownerUri:e,language:t};return this.runWithErrorHandling(o.LanguageExtensibilityUpdateRequest.type,n).then()}async deleteLanguage(e,t){const n={ownerUri:e,languageName:t};return this.runWithErrorHandling(o.LanguageExtensibilityDeleteRequest.type,n).then()}}t.LanguageExtensionService=a},1651:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unsupportedPlatform=t.noDocumentFound=t.noConvertResult=t.failedToFindAccount=t.tokenRefreshFailedNoSecurityToken=t.tokenRefreshFailed=t.failedToFindTenants=void 0;const r=n(4200).loadMessageBundle(n(6928).join(__dirname,"localizedConstants.ts"));t.failedToFindTenants=function(e,t){return r(0,null,e,t)},t.tokenRefreshFailed=function(e){return r(1,null,e)},t.tokenRefreshFailedNoSecurityToken=r(2,null),t.failedToFindAccount=function(e){return r(3,null,e)},t.noConvertResult=r(4,null),t.noDocumentFound=function(e){return r(5,null,e)},t.unsupportedPlatform=function(e){return r(6,null,e)}},5063:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createMssqlApi=void 0;const r=n(3508);t.createMssqlApi=function(e,t){return{get sqlToolsServicePath(){return t.installDirectory},get cmsService(){return e.getService(r.CmsService)},get dacFx(){return e.getService(r.DacFxService)},get sqlProjects(){return e.getService(r.SqlProjectsService)},get schemaCompare(){return e.getService(r.SchemaCompareService)},get languageExtension(){return e.getService(r.LanguageExtensionService)},get sqlAssessment(){return e.getService(r.SqlAssessmentService)},get azureBlob(){return e.getService(r.AzureBlobService)},get queryStore(){return e.getService(r.QueryStoreService)}}}},4037:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotebookConvertService=void 0;const r=n(3508),i=n(6290),o=n(5702);class s extends o.BaseService{static asFeature(e){return class extends s{constructor(t){super(e,t)}fillClientCapabilities(e){}initialize(){}}}constructor(e,t){super(t),e.registerService(r.NotebookConvertService,this)}async convertNotebookToSql(e){let t={content:e};return this.runWithErrorHandling(i.ConvertNotebookToSqlRequest.type,t)}async convertSqlToNotebook(e){let t={clientUri:e};return this.runWithErrorHandling(i.ConvertSqlToNotebookRequest.type,t)}}t.NotebookConvertService=s},2142:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerObjectManagementCommands=void 0;const r=n(235),i=n(1398),o=n(1496),s=(n(3349),n(76)),a=n(1159),c=n(8430),l=n(1776),u=n(7734),d=n(3508),p=n(9523),h=n(6734),f=n(8450),m=n(9500),g=n(415),y=n(8344),b=n(555),v=n(9419),S=n(5649),w=n(8134),C=n(4770),T=n(6806);async function E(e,t){const n=await I(e);if(!n)return;let r;if(e.nodeInfo){switch(e.nodeInfo.objectType){case"ApplicationRoles":r="ApplicationRole";break;case"DatabaseRoles":r="DatabaseRole";break;case"ServerLevelLogins":r="ServerLevelLogin";break;case"ServerLevelServerRoles":r="ServerLevelServerRole";break;case"Users":r="User";break;case"Databases":r="Database"}if(!r)switch(e.nodeInfo.nodeType){case"ApplicationRole":case"DatabaseRole":case"ServerLevelLogin":case"ServerLevelServerRole":case"User":case"Database":r=e.nodeInfo.nodeType;break;default:throw new Error(c.NoDialogFoundError(e.nodeInfo.nodeType,e.nodeInfo.objectType))}}else{if(!(e.connectionProfile?.databaseName?.length>0))throw new Error(c.NotSupportedError("Server"));r="Database"}try{const i=await P(e),o=R(t,{connectionUri:n,isNewObject:!0,database:e.connectionProfile?.databaseName,objectType:r,objectName:"",parentUrn:i,objectExplorerContext:e}),s=Date.now();await o.open(),h.TelemetryReporter.sendTelemetryEvent("OpenNewObjectDialog",{objectType:r},{elapsedTimeMs:Date.now()-s})}catch(e){h.TelemetryReporter.createErrorEvent2(a.ObjectManagementViewName,"OpenNewObjectDialog",e).withAdditionalProperties({objectType:r}).send(),console.error(e),await i.window.showErrorMessage(c.OpenNewObjectDialogError(c.getNodeTypeDisplayName(r),(0,s.getErrorMessage)(e)))}}async function _(e,t){try{const n=new T.BackupDatabaseDialog(t,e),r=Date.now();await n.open(),h.TelemetryReporter.sendTelemetryEvent("OpenBackupDatabaseDialog",{objectType:e.objectType},{elapsedTimeMs:Date.now()-r})}catch(t){h.TelemetryReporter.createErrorEvent2(a.ObjectManagementViewName,"OpenBackupDatabaseDialog",t).withAdditionalProperties({objectType:e.objectType}).send(),console.error(t),await i.window.showErrorMessage(c.OpenBackupDatabaseDialogError((0,s.getErrorMessage)(t)))}}async function x(e,t){try{const n=new C.RestoreDatabaseDialog(t,e),r=Date.now();await n.open(),h.TelemetryReporter.sendTelemetryEvent("OpenRestoreDatabaseDialog",{objectType:"Database"},{elapsedTimeMs:Date.now()-r})}catch(t){h.TelemetryReporter.createErrorEvent2(a.ObjectManagementViewName,"OpenRestoreDatabaseDialog",t).withAdditionalProperties({objectType:e.objectType}).send(),console.error(t),i.window.showErrorMessage(c.OpenRestoreDatabaseDialogError((0,s.getErrorMessage)(t)))}}function R(e,t){const n="750px";switch(t.objectType){case"ApplicationRole":return new g.ApplicationRoleDialog(e,t);case"DatabaseRole":return new m.DatabaseRoleDialog(e,t);case"ServerLevelLogin":return new o.LoginDialog(e,t);case"ServerLevelServerRole":return new f.ServerRoleDialog(e,t);case"Server":return t.width=t.isNewObject?void 0:n,new b.ServerPropertiesDialog(e,t);case"User":return new u.UserDialog(e,t);case"Database":return t.width=t.isNewObject?void 0:n,new y.DatabaseDialog(e,t);default:throw new Error(`Unsupported object type: ${t.objectType}`)}}async function I(e){const t=await r.connection.getUriForConnection(e.connectionProfile.id);return t||await i.window.showErrorMessage(c.FailedToRetrieveConnectionInfoErrorMessage,{modal:!0}),t}async function P(e){let t;if(e.nodeInfo){let n,i=e.nodeInfo.parentNodePath;do{n=await r.objectexplorer.getNode(e.connectionProfile.id,i),i=n?.parentNodePath}while(n&&i&&!n.metadata?.urn);t=n?.metadata?.urn}return t}async function O(e){let t,n,r;return e.nodeInfo?(t=e.nodeInfo.nodeType,n=e.nodeInfo.metadata?.name,r=e.nodeInfo.metadata?.urn):e.connectionProfile?.databaseName?.length>0?(t="Database",n=e.connectionProfile.databaseName,r=`Server/Database[@Name='${(0,p.escapeSingleQuotes)(n)}']`):(t="Server",n=e.connectionProfile.serverName,r="Server"),{parentUrn:await P(e),name:n,type:t,urn:r}}t.registerObjectManagementCommands=function(e){const t=function(e){return e.getService(d.ObjectManagementService)}(e);e.extensionContext.subscriptions.push(i.commands.registerCommand("mssql.newObject",(async e=>{await E(e,t)}))),e.extensionContext.subscriptions.push(i.commands.registerCommand("mssql.newDatabase",(async e=>{await E(e,t)}))),e.extensionContext.subscriptions.push(i.commands.registerCommand("mssql.newDatabaseRole",(async e=>{await E(e,t)}))),e.extensionContext.subscriptions.push(i.commands.registerCommand("mssql.newApplicationRole",(async e=>{await E(e,t)}))),e.extensionContext.subscriptions.push(i.commands.registerCommand("mssql.newLogin",(async e=>{await E(e,t)}))),e.extensionContext.subscriptions.push(i.commands.registerCommand("mssql.newUser",(async e=>{await E(e,t)}))),e.extensionContext.subscriptions.push(i.commands.registerCommand("mssql.newServerRole",(async e=>{await E(e,t)}))),e.extensionContext.subscriptions.push(i.commands.registerCommand("mssql.objectProperties",(async e=>{await async function(e,t){const n=await I(e);if(!n)return;const r=await O(e);try{const i=R(t,{connectionUri:n,isNewObject:!1,database:e.connectionProfile?.databaseName,objectType:r.type,objectName:r.name,parentUrn:r.parentUrn,objectUrn:r.urn,objectExplorerContext:e}),o=Date.now();await i.open(),h.TelemetryReporter.sendTelemetryEvent("OpenPropertiesDialog",{objectType:r.type},{elapsedTimeMs:Date.now()-o})}catch(e){h.TelemetryReporter.createErrorEvent2(a.ObjectManagementViewName,"OpenPropertiesDialog",e).withAdditionalProperties({objectType:r.type}).send(),console.error(e),await i.window.showErrorMessage(c.OpenObjectPropertiesDialogError(c.getNodeTypeDisplayName(r.type),r.name,(0,s.getErrorMessage)(e)))}}(e,t)}))),e.extensionContext.subscriptions.push(i.commands.registerCommand("mssql.dropObject",(async e=>{await async function(e,t){const n=await I(e);if(!n)return;const o=await O(e);let u;"ServerLevelLogin"===o.type&&(u=c.DropLoginConfirmationText);const d=c.getNodeTypeDisplayName(o.type);let f=c.DropObjectConfirmationText(d,o.name);u&&(f=`${u} ${f}`),await i.window.showWarningMessage(f,{modal:!0},l.YesText)===l.YesText&&r.tasks.startBackgroundOperation({displayName:c.DropObjectOperationDisplayName(d,o.name),description:"",isCancelable:!1,operation:async i=>{try{const e=Date.now();await t.drop(n,o.type,o.urn),h.TelemetryReporter.sendTelemetryEvent("DropObject",{objectType:o.type},{elapsedTimeMs:Date.now()-e})}catch(e){return i.updateStatus(r.TaskStatus.Failed,c.DropObjectError(d,o.name,(0,s.getErrorMessage)(e))),h.TelemetryReporter.createErrorEvent2(a.ObjectManagementViewName,"DropObject",e).withAdditionalProperties({objectType:o.type}).send(),void console.error(e)}i.updateStatus(r.TaskStatus.Succeeded),await(0,p.refreshParentNode)(e)}})}(e,t)}))),e.extensionContext.subscriptions.push(i.commands.registerCommand("mssql.renameObject",(async e=>{await async function(e,t){const n=await I(e);if(!n)return;const o=await O(e),l=c.getNodeTypeDisplayName(o.type),u=await i.window.showInputBox({title:c.RenameObjectDialogTitle,value:o.name,validateInput:e=>e?void 0:c.NameCannotBeEmptyError});u!==o.name&&u&&r.tasks.startBackgroundOperation({displayName:c.RenameObjectOperationDisplayName(l,o.name,u),description:"",isCancelable:!1,operation:async i=>{try{const e=Date.now();await t.rename(n,o.type,o.urn,u),h.TelemetryReporter.sendTelemetryEvent("RenameObject",{objectType:o.type},{elapsedTimeMs:Date.now()-e})}catch(e){return i.updateStatus(r.TaskStatus.Failed,c.RenameObjectError(l,o.name,u,(0,s.getErrorMessage)(e))),h.TelemetryReporter.createErrorEvent2(a.ObjectManagementViewName,"RenameObject",e).withAdditionalProperties({objectType:o.type}).send(),void console.error(e)}i.updateStatus(r.TaskStatus.Succeeded),await(0,p.refreshParentNode)(e)}})}(e,t)}))),e.extensionContext.subscriptions.push(i.commands.registerCommand("mssql.detachDatabase",(async e=>{await async function(e,t){const n=await I(e);if(!n)return;const r=await O(e);try{if("Database"!==r.type)throw new Error(c.NotSupportedError("Database"));const i={connectionUri:n,isNewObject:!1,database:r.name,objectType:r.type,objectName:r.name,parentUrn:r.parentUrn,objectUrn:r.urn,objectExplorerContext:e},o=new v.DetachDatabaseDialog(t,i),s=Date.now();await o.open(),h.TelemetryReporter.sendTelemetryEvent("OpenDetachDatabaseDialog",{objectType:r.type},{elapsedTimeMs:Date.now()-s})}catch(e){h.TelemetryReporter.createErrorEvent2(a.ObjectManagementViewName,"OpenDetachDatabaseDialog",e).withAdditionalProperties({objectType:r.type}).send(),console.error(e),await i.window.showErrorMessage(c.OpenDetachDatabaseDialogError((0,s.getErrorMessage)(e)))}}(e,t)}))),e.extensionContext.subscriptions.push(i.commands.registerCommand("mssql.attachDatabase",(async e=>{await async function(e,t){const n=await I(e);if(n)try{const r=await P(e),i={connectionUri:n,isNewObject:!0,database:e.connectionProfile.databaseName,objectType:"Database",objectName:"",parentUrn:r,objectExplorerContext:e},o=new w.AttachDatabaseDialog(t,i),s=Date.now();await o.open(),h.TelemetryReporter.sendTelemetryEvent("OpenAttachDatabaseDialog",{objectType:"Database"},{elapsedTimeMs:Date.now()-s})}catch(t){h.TelemetryReporter.createErrorEvent2(a.ObjectManagementViewName,"OpenAttachDatabaseDialog",t).withAdditionalProperties({objectType:e.nodeInfo.nodeType}).send(),console.error(t),await i.window.showErrorMessage(c.OpenAttachDatabaseDialogError((0,s.getErrorMessage)(t)))}}(e,t)}))),e.extensionContext.subscriptions.push(i.commands.registerCommand("mssql.backupDatabase",(async e=>{await async function(e,t){const n=await O(e);if("Database"!==n.type)throw new Error(c.NotSupportedError("Database"));const r=await I(e);if(!r)return;const i={connectionUri:r,isNewObject:!1,database:n.name,objectType:n.type,objectName:n.name,parentUrn:n.parentUrn,objectUrn:n.urn,objectExplorerContext:e};await _(i,t)}(e,t)}))),e.extensionContext.subscriptions.push(i.commands.registerCommand("mssql.restoreDatabase",(async e=>{await async function(e,t){const n=await I(e);if(!n)return;const r=await P(e),i={connectionUri:n,isNewObject:!1,database:e.connectionProfile.databaseName,objectType:"Database",objectName:"",parentUrn:r,objectExplorerContext:e};await x(i,t)}(e,t)}))),e.extensionContext.subscriptions.push(i.commands.registerCommand("mssql.dropDatabase",(async e=>{await async function(e,t){const n=await I(e);if(!n)return;const r=await O(e);try{if("Database"!==r.type)throw new Error(c.NotSupportedError("Database"));const i={connectionUri:n,isNewObject:!1,database:r.name,objectType:r.type,objectName:r.name,parentUrn:r.parentUrn,objectUrn:r.urn,objectExplorerContext:e},o=new S.DropDatabaseDialog(t,i),s=Date.now();await o.open(),h.TelemetryReporter.sendTelemetryEvent("OpenDropDatabaseDialog",{objectType:r.type},{elapsedTimeMs:Date.now()-s})}catch(e){h.TelemetryReporter.createErrorEvent2(a.ObjectManagementViewName,"OpenDropDatabaseDialog",e).withAdditionalProperties({objectType:r.type}).send(),console.error(e),await i.window.showErrorMessage(c.OpenDropDatabaseDialogError((0,s.getErrorMessage)(e)))}}(e,t)}))),e.extensionContext.subscriptions.push(r.tasks.registerTask("mssql.backupDatabaseTask",(async e=>{await async function(e,t){const n={connectionUri:await r.connection.getUriForConnection(e.id),isNewObject:!1,database:e.databaseName,objectType:"Database",objectName:e.databaseName,parentUrn:void 0,objectUrn:void 0,objectExplorerContext:void 0};await _(n,t)}(e,t)}))),e.extensionContext.subscriptions.push(r.tasks.registerTask("mssql.restoreDatabaseTask",(async e=>{await async function(e,t){const n={connectionUri:await r.connection.getUriForConnection(e.id),isNewObject:!1,database:e.databaseName,objectType:"Database",objectName:e.databaseName,parentUrn:void 0,objectUrn:void 0,objectExplorerContext:void 0};await x(n,t)}(e,t)})))}},1159:(e,t)=>{"use strict";var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.PhysicalDeviceType=t.MediaDeviceType=t.ObjectManagementViewName=t.RestoreDatabaseOptionsTabDocUrl=t.RestoreDatabaseFilesTabDocUrl=t.RestoreDatabaseGeneralTabDocUrl=t.DatabaseFileGroupsPropertiesDocUrl=t.DatabaseFilesPropertiesDocUrl=t.QueryStorePropertiesDocUrl=t.DatabaseScopedConfigurationPropertiesDocUrl=t.DropDatabaseDocUrl=t.DatabaseOptionsPropertiesDocUrl=t.DatabaseGeneralPropertiesDocUrl=t.BackupDatabaseDocUrl=t.AttachDatabaseDocUrl=t.DetachDatabaseDocUrl=t.ViewAdvancedServerPropertiesDocUrl=t.ViewDatabaseSettingsPropertiesDocUrl=t.ViewSecurityServerPropertiesDocUrl=t.ViewProcessorsServerPropertiesDocUrl=t.ViewMemoryServerPropertiesDocUrl=t.ViewGeneralServerPropertiesDocUrl=t.CreateDatabaseDocUrl=t.AlterDatabaseRoleDocUrl=t.CreateDatabaseRoleDocUrl=t.AlterApplicationRoleDocUrl=t.CreateApplicationRoleDocUrl=t.AlterServerRoleDocUrl=t.CreateServerRoleDocUrl=t.AlterLoginDocUrl=t.CreateLoginDocUrl=t.AlterUserDocUrl=t.CreateUserDocUrl=t.Windows=t.PublicServerRoleName=void 0,t.PublicServerRoleName="public",t.Windows="Windows",t.CreateUserDocUrl="https://learn.microsoft.com/sql/t-sql/statements/create-user-transact-sql",t.AlterUserDocUrl="https://learn.microsoft.com/sql/t-sql/statements/alter-user-transact-sql",t.CreateLoginDocUrl="https://learn.microsoft.com/sql/t-sql/statements/create-login-transact-sql",t.AlterLoginDocUrl="https://learn.microsoft.com/sql/t-sql/statements/alter-login-transact-sql",t.CreateServerRoleDocUrl="https://learn.microsoft.com/sql/t-sql/statements/create-server-role-transact-sql",t.AlterServerRoleDocUrl="https://learn.microsoft.com/sql/t-sql/statements/alter-server-role-transact-sql",t.CreateApplicationRoleDocUrl="https://learn.microsoft.com/sql/t-sql/statements/create-application-role-transact-sql",t.AlterApplicationRoleDocUrl="https://learn.microsoft.com/sql/t-sql/statements/alter-application-role-transact-sql",t.CreateDatabaseRoleDocUrl="https://learn.microsoft.com/sql/t-sql/statements/create-role-transact-sql",t.AlterDatabaseRoleDocUrl="https://learn.microsoft.com/sql/t-sql/statements/alter-role-transact-sql",t.CreateDatabaseDocUrl="https://learn.microsoft.com/sql/t-sql/statements/create-database-transact-sql",t.ViewGeneralServerPropertiesDocUrl="https://learn.microsoft.com/sql/t-sql/functions/serverproperty-transact-sql",t.ViewMemoryServerPropertiesDocUrl="https://learn.microsoft.com/sql/database-engine/configure-windows/server-properties-memory-page",t.ViewProcessorsServerPropertiesDocUrl="https://learn.microsoft.com/sql/database-engine/configure-windows/server-properties-processors-page",t.ViewSecurityServerPropertiesDocUrl="https://learn.microsoft.com/sql/database-engine/configure-windows/server-properties-security-page",t.ViewDatabaseSettingsPropertiesDocUrl="https://learn.microsoft.com/sql/database-engine/configure-windows/server-properties-database-settings-page",t.ViewAdvancedServerPropertiesDocUrl="https://learn.microsoft.com/sql/database-engine/configure-windows/server-properties-advanced-page",t.DetachDatabaseDocUrl="https://go.microsoft.com/fwlink/?linkid=2240322",t.AttachDatabaseDocUrl="https://learn.microsoft.com/sql/relational-databases/databases/attach-a-database#to-attach-a-database",t.BackupDatabaseDocUrl="https://learn.microsoft.com/sql/t-sql/statements/backup-transact-sql",t.DatabaseGeneralPropertiesDocUrl="https://learn.microsoft.com/sql/relational-databases/databases/database-properties-general-page",t.DatabaseOptionsPropertiesDocUrl="https://learn.microsoft.com/sql/relational-databases/databases/database-properties-options-page",t.DropDatabaseDocUrl="https://learn.microsoft.com/sql/t-sql/statements/drop-database-transact-sql",t.DatabaseScopedConfigurationPropertiesDocUrl="https://learn.microsoft.com/sql/t-sql/statements/alter-database-scoped-configuration-transact-sql",t.QueryStorePropertiesDocUrl="https://learn.microsoft.com/sql/relational-databases/databases/database-properties-query-store-page",t.DatabaseFilesPropertiesDocUrl="https://learn.microsoft.com/sql/relational-databases/databases/database-properties-files-page",t.DatabaseFileGroupsPropertiesDocUrl="https://learn.microsoft.com/sql/relational-databases/databases/database-properties-filegroups-page",t.RestoreDatabaseGeneralTabDocUrl="https://learn.microsoft.com/sql/relational-databases/backup-restore/restore-database-general-page",t.RestoreDatabaseFilesTabDocUrl="https://learn.microsoft.com/sql/relational-databases/backup-restore/restore-database-files-page",t.RestoreDatabaseOptionsTabDocUrl="https://learn.microsoft.com/sql/relational-databases/backup-restore/restore-database-options-page",t.ObjectManagementViewName="ObjectManagement",function(e){e[e.LogicalDevice=0]="LogicalDevice",e[e.Tape=1]="Tape",e[e.File=2]="File",e[e.Pipe=3]="Pipe",e[e.VirtualDevice=4]="VirtualDevice",e[e.Url=5]="Url"}(n||(t.MediaDeviceType=n={})),function(e){e[e.Disk=2]="Disk",e[e.FloppyA=3]="FloppyA",e[e.FloppyB=4]="FloppyB",e[e.Tape=5]="Tape",e[e.Pipe=6]="Pipe",e[e.CDRom=7]="CDRom",e[e.Url=9]="Url",e[e.Unknown=100]="Unknown"}(r||(t.PhysicalDeviceType=r={}))},5524:(e,t)=>{"use strict";var n;Object.defineProperty(t,"__esModule",{value:!0}),t.AffinityType=void 0,function(e){e[e.ProcessorAffinity=1]="ProcessorAffinity",e[e.IOAffinity=2]="IOAffinity"}(n||(t.AffinityType=n={}))},8430:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RefreshObjectExplorerError=t.EffectivePermissionsTableLabelSelected=t.ExplicitPermissionsTableLabelSelected=t.BrowseFilesLabel=t.NoSecurableObjectsFoundInfoMessage=t.BackButtonLabel=t.LogFileLabel=t.DataFileLabel=t.labelSelectFolder=t.allFiles=t.ApplyUpdatesLabel=t.CreateObjectLabel=t.RemoveFileAriaLabel=t.AddFileAriaLabel=t.SelectSecurablesDialogTitle=t.DenyColumnHeader=t.WithGrantColumnHeader=t.GrantColumnHeader=t.GrantorColumnHeader=t.PermissionColumnHeader=t.EffectivePermissionsTableLabel=t.ExplicitPermissionsTableLabel=t.SecurablesText=t.RemoveSecurableAriaLabel=t.AddSecurableAriaLabel=t.RemoveMemberAriaLabel=t.AddMemberAriaLabel=t.BrowseOwnerButtonAriaLabel=t.BrowseText=t.OwnerText=t.RenameObjectDialogTitle=t.FailedToRetrieveConnectionInfoErrorMessage=t.NotSupportedError=t.NoDialogFoundError=t.DatabaseTypeDisplayNameInTitle=t.DatabaseRoleTypeDisplayNameInTitle=t.DatabaseRoleTypeDisplayName=t.ApplicationRoleTypeDisplayNameInTitle=t.ApplicationRoleTypeDisplayName=t.ServerTypeDisplayName=t.ServerRoleTypeDisplayNameInTitle=t.ServerRoleTypeDisplayName=t.DatabaseTypeDisplayName=t.ColumnTypeDisplayName=t.ViewTypeDisplayName=t.TableTypeDisplayName=t.UserTypeDisplayNameInTitle=t.LoginTypeDisplayNameInTitle=t.UserTypeDisplayName=t.LoginTypeDisplayName=void 0,t.RestoreDatabaseDialogTitle=t.DetachDatabaseDialogTitle=t.AzurePricingLinkText=t.MaxSizeText=t.EditionText=t.CurrentSLOText=t.BackupRedundancyText=t.ConfigureSLOSectionHeader=t.ContainmentTypeText=t.CompatibilityLevelText=t.RecoveryModelText=t.CollationText=t.CollationNotValidError=t.SchemaText=t.MemberSectionHeader=t.MembershipSectionHeader=t.LoginNotSelectedError=t.InvalidPasswordError=t.PasswordsNotMatchError=t.PasswordCannotBeEmptyError=t.NameCannotBeEmptyError=t.EnabledText=t.ConfirmPasswordText=t.PasswordText=t.FileGroupsSectionHeader=t.FilesSectionHeader=t.OptionsSectionHeader=t.AdvancedSectionHeader=t.GeneralSectionHeader=t.NameText=t.RenameObjectError=t.RenameObjectOperationDisplayName=t.ObjectPropertiesDialogTitle=t.NewObjectDialogTitle=t.OpenNewObjectDialogError=t.OpenObjectPropertiesDialogError=t.RestoreDatabaseOperationDisplayName=t.OpenRestoreDatabaseDialogError=t.BackupDatabaseOperationDisplayName=t.AttachDatabaseOperationDisplayName=t.OpenAttachDatabaseDialogError=t.OpenDropDatabaseDialogError=t.DetachDatabaseOperationDisplayName=t.OpenBackupDatabaseDialogError=t.OpenDetachDatabaseDialogError=t.DropObjectError=t.DropObjectOperationDisplayName=t.UpdateObjectOperationDisplayName=t.CreateObjectOperationDisplayName=t.DropObjectConfirmationText=void 0,t.OverwriteExistingBackups=t.AppendToExistingBackup=t.BackupToExistingMedia=t.BackupDifferential=t.BackupFull=t.BackupAsymmetricKey=t.BackupServerCertificate=t.BackupToLabel=t.BackupUrlLabel=t.BackupDiskLabel=t.BackupCopyLabel=t.BackupTypeLabel=t.BackupRecoveryLabel=t.BackupNameLabel=t.BackupToUrlLabel=t.BackupFilesLabel=t.RemoveBackupFileAriaLabel=t.AddBackupFileAriaLabel=t.BackupExpirationLabel=t.BackupReliabilityLabel=t.BackupTransactionLog=t.BackupEncryptionLabel=t.BackupCompressionLabel=t.BackupOverwriteMediaLabel=t.BackupButtonLabel=t.BackupDatabaseDialogTitle=t.DatabaseDetailsLabel=t.DeleteBackupHistory=t.CloseConnections=t.DropDatabaseOptions=t.DropButtonLabel=t.DropDatabaseDialogTitle=t.AttachButtonLabel=t.AttachAsText=t.DatabaseName=t.DatabaseFilesFilterLabel=t.MdfFileLocation=t.AssociatedFilesLabel=t.DatabasesToAttachLabel=t.NoDatabaseFilesError=t.AttachDatabaseDialogTitle=t.DetachButtonLabel=t.DetachDatabaseOptions=t.DatabaseFileGroupLabel=t.DatabaseFilePathLabel=t.DatabaseFileTypeLabel=t.DatabaseFileNameLabel=t.DatabaseFilesLabel=t.DetachUpdateStatistics=t.DetachDropConnections=void 0,t.RestoreFromDatabaseOptionText=t.RestoreFromBackupFileOptionText=t.RestorePlanSectionText=t.DestinationSectionText=t.SourceSectionText=t.RestoreToText=t.TargetDatabaseText=t.DatabaseText=t.BackupFilePathText=t.RestoreFromText=t.OldPasswordCannotBeEmptyError=t.AADAuthenticationTypeDisplayText=t.SQLAuthenticationTypeDisplayText=t.WindowsAuthenticationTypeDisplayText=t.LoginLockedOutText=t.PermissionToConnectText=t.DefaultLanguageText=t.DefaultDatabaseText=t.MustChangePasswordText=t.EnforcePasswordExpirationText=t.EnforcePasswordPolicyText=t.OldPasswordText=t.SpecifyOldPasswordText=t.AuthTypeText=t.ServerRoleSectionHeader=t.SQLAuthenticationSectionHeader=t.DropLoginConfirmationText=t.BlankPasswordConfirmationText=t.BackupFailedError=t.ScriptingFailedError=t.PathAlreadyAddedError=t.RecoveryModelSimple=t.DontCompressBackup=t.CompressBackup=t.BackupDefaultSetting=t.BackupEncryptNotice=t.NoEncryptorWarning=t.BackupCertificate=t.BackupAlgorithm=t.EncryptBackup=t.BackupSetCompression=t.TransactionLogNotice=t.BackupLogTail=t.BackupTruncateLog=t.BackupContinueOnError=t.BackupPerformChecksum=t.VerifyBackupWhenFinished=t.BackupNewMediaDescription=t.BackupNewMediaName=t.BackupAndEraseExisting=void 0,t.SelectServerRoleOwnerDialogTitle=t.SelectServerRoleMemberDialogTitle=t.SelectDatabaseRoleOwnerDialogTitle=t.SelectDatabaseRoleMemberDialogTitle=t.OwnedSchemaSectionHeader=t.LoginText=t.DefaultSchemaText=t.UserType_NoLoginAccess=t.UserType_AADAuthentication=t.UserType_SqlAuthentication=t.UserType_WindowsUser=t.UserType_LoginMapped=t.UserTypeText=t.DatabaseAlreadyExists=t.RestoreAsText=t.OriginalFileNameText=t.LogicalFileNameText=t.ExpirationText=t.UserNameText=t.FinishDateText=t.StartDateText=t.FullLSNText=t.CheckpointLSNText=t.LastLSNText=t.FirstLSNText=t.PositionText=t.ServerText=t.TypeText=t.ComponentText=t.RestoreText=t.CloseExistingConnectionText=t.TailLogBackupFileText=t.LeaveSourceDBText=t.TakeTailLogBackupBeforeRestoreText=t.StandbyFileText=t.RecoveryStateText=t.RestrictAccessToRestoredDBText=t.PreserveReplicationSettingsText=t.OverwriteTheExistingDatabaseText=t.LogFileFolderText=t.DataFileFolderText=t.RelocateAllFilesText=t.RestoreServerConnectionsOptionsText=t.RestoreTailLogBackupText=t.RestoreOptionsText=t.RestoreDatabaseFileDetailsText=t.RestoreDatabaseFilesAsText=t.BackupFolderPathTitle=t.RestoreFromS3UrlText=t.RestoreFromUrlText=void 0,t.noLoginAuditingText=t.loginAuditingText=t.sqlServerAndWindowsAuthText=t.onlyWindowsAuthModeText=t.serverAuthenticationText=t.securityText=t.serverCPULabel=t.serverNumaNodeLabel=t.serverMemoryMaxLowerThanMinInputError=t.processorLabel=t.processorIOAffinityColumnText=t.processorAffinityColumnText=t.processorColumnText=t.autoSetProcessorAffinityIOMaskForAllText=t.autoSetProcessorAffinityMaskForAllText=t.maxServerMemoryText=t.minServerMemoryText=t.VersionText=t.StorageSpaceUsageInMBText=t.ServiceTierText=t.ServerCollationText=t.RootDirectoryText=t.ReservedStorageSizeInMBText=t.ProductText=t.IsXTPSupportedText=t.IsPolyBaseInstalledText=t.IsHadrEnabledText=t.IsClusteredText=t.ProcessorsText=t.PlatformText=t.OperatingSystemText=t.MemoryText=t.LanguageText=t.HardwareGenerationText=t.PropertiesHeader=t.ObjectSelectionMethodDialog_SelectSchemaDropdownLabel=t.ObjectSelectionMethodDialog_AllObjectsOfSchema=t.ObjectSelectionMethodDialog_AllObjectsOfTypes=t.ObjectSelectionMethodDialog_SpecificObjects=t.ObjectSelectionMethodDialog_TypeLabel=t.ObjectSelectionMethodDialogTitle=t.LoadingObjectsCompletedText=t.LoadingObjectsText=t.ObjectsText=t.SelectText=t.FindText=t.SearchTextLabel=t.ObjectTypeText=t.FilterSectionTitle=t.ObjectTypesText=void 0,t.AutoUpdateStatisticsAsynchronouslyText=t.AutoUpdateStatisticsText=t.AutoShrinkText=t.AutoCreateStatisticsText=t.AutoCreateIncrementalStatisticsText=t.StringValueInMB=t.MemoryUsedText=t.MemoryAllocatedText=t.NumberOfUsersText=t.SpaceAvailableText=t.SizeText=t.DateCreatedText=t.OwnerPropertyText=t.StatusText=t.NamePropertyText=t.DatabaseSectionHeader=t.StateSectionHeader=t.RecoverySectionHeader=t.LedgerSectionHeader=t.AutomaticSectionHeader=t.BackupSectionHeader=t.LastDatabaseLogBackupText=t.LastDatabaseBackupText=t.queryWaitLabel=t.maxDegreeParallelismLabel=t.locksValidation=t.locksLabel=t.costThresholdParallelismLabel=t.twoDigitYearCutoffLabel=t.scanStartupProcsLabel=t.optimizeAdHocWorkloadsLabel=t.maxTextReplicationSizeLabel=t.fullTextUpgradeOptionLabel=t.defaultLanguageLabel=t.defaultFullTextLanguageLabel=t.cursorThresholdLabel=t.blockedProcThresholdLabel=t.allowTriggerToFireOthersLabel=t.backupAndRestoreText=t.backupChecksumText=t.compressBackupText=t.databaseSettingsText=t.defaultLocationsLabel=t.backupLocationText=t.dataLocationText=t.logLocationText=t.needToRestartServer=t.bothFailedAndSuccessfulLoginsText=t.successfulLoginsOnlyText=t.failedLoginsOnlyText=void 0,t.MemoryOptimizedFileGroupsSectionText=t.FileStreamFileGroupsSectionText=t.RowsFileGroupsSectionText=t.FilestreamFileType=t.LogFiletype=t.RowsDataFileType=t.FilegrowthLimitError=t.FileSizeLimitError=t.FileAlreadyExistsError=t.FileNameExistsError=t.DuplicateLogicalNameError=t.FileGroupForFilestreamTypeText=t.FileGroupForLogTypeText=t.AutoGrowthValueStringGenerator=t.NoneText=t.UnlimitedFileSizeText=t.LimitedToMBFileSizeText=t.InMegabytesAutogrowthText=t.InPercentAutogrowthText=t.MaximumFileSizeText=t.FileGrowthText=t.EnableAutogrowthText=t.SizeInMbText=t.RemoveButton=t.EditButton=t.AddButton=t.EditDatabaseFilesText=t.AddDatabaseFilesText=t.DatabaseFilesText=t.FileNameText=t.PathText=t.AutogrowthMaxsizeText=t.FilegroupText=t.FileTypeText=t.LogicalNameText=t.UseFullTextIndexingText=t.DatabaseNameText=t.SetSecondaryText=t.ValueForSecondaryColumnHeader=t.ValueForPrimaryColumnHeader=t.DatabaseScopedOptionsColumnHeader=t.QueryStoreTabHeader=t.DatabaseScopedConfigurationTabHeader=t.RestrictAccessText=t.EncryptionEnabledText=t.DatabaseStateText=t.DatabaseReadOnlyText=t.TargetRecoveryTimeInSecondsText=t.PageVerifyText=t.IsLedgerDatabaseText=void 0,t.getObjectTypeInfo=t.getUserTypeByDisplayName=t.getUserTypeDisplayName=t.getAuthenticationTypeByDisplayName=t.getAuthenticationTypeDisplayName=t.getNodeTypeDisplayName=t.InvalidS3UrlError=t.SelectBackupFileText=t.SelectS3BucketText=t.AddCredentialsText=t.RegionText=t.AccessKeyText=t.SecretKeyText=t.RegionSpecificEndpointText=t.SelectS3BackupFileDialogTitle=t.fileGroupsNameInput=t.PurgeQueryStoreDataMessage=t.NotAvailableText=t.YesText=t.PurgeQueryDataButtonText=t.QueryStoreAvailableText=t.QueryStoreUsedText=t.QueryStoreCapturemodeCustomText=t.TotalExecutionCPUTimeInMsText=t.TotalCompileCPUTimeInMsText=t.StaleThresholdText=t.ExecutionCountText=t.QueryStoreCurrentDiskUsageSectionText=t.QueryStoreCapturePolicySectionText=t.QueryStoreRetentionSectionText=t.MonitoringSectionText=t.WaitStatisticsCaptureModeText=t.StateQueryThresholdInDaysText=t.SizeBasedCleanupModeText=t.QueryStoreCaptureModeText=t.MaxSizeInMbText=t.MaxPlansPerQueryText=t.StatisticsCollectionInterval=t.DataFlushIntervalInMinutesText=t.RequestedOperationModeText=t.ActualOperationModeText=t.EmptyFilegroupNameError=t.FilegroupExistsError=t.AddFilegroupText=t.FilestreamFilesText=t.AutogrowAllFilesText=t.DefaultText=t.ReadOnlyText=t.FilesText=void 0;const r=n(4200).loadMessageBundle(n(6928).join(__dirname,"objectManagement\\localizedConstants.ts"));function i(e,n=!1){switch(e){case"ApplicationRole":return n?t.ApplicationRoleTypeDisplayNameInTitle:t.ApplicationRoleTypeDisplayName;case"DatabaseRole":return n?t.DatabaseRoleTypeDisplayNameInTitle:t.DatabaseRoleTypeDisplayName;case"ServerLevelLogin":return n?t.LoginTypeDisplayNameInTitle:t.LoginTypeDisplayName;case"ServerLevelServerRole":return n?t.ServerRoleTypeDisplayNameInTitle:t.ServerRoleTypeDisplayName;case"Server":return t.ServerTypeDisplayName;case"User":return n?t.UserTypeDisplayNameInTitle:t.UserTypeDisplayName;case"Table":return t.TableTypeDisplayName;case"View":return t.ViewTypeDisplayName;case"Column":return t.ColumnTypeDisplayName;case"Database":return n?t.DatabaseTypeDisplayNameInTitle:t.DatabaseTypeDisplayName;default:throw new Error(`Unknown node type: ${e}`)}}t.LoginTypeDisplayName=r(0,null),t.UserTypeDisplayName=r(1,null),t.LoginTypeDisplayNameInTitle=r(2,null),t.UserTypeDisplayNameInTitle=r(3,null),t.TableTypeDisplayName=r(4,null),t.ViewTypeDisplayName=r(5,null),t.ColumnTypeDisplayName=r(6,null),t.DatabaseTypeDisplayName=r(7,null),t.ServerRoleTypeDisplayName=r(8,null),t.ServerRoleTypeDisplayNameInTitle=r(9,null),t.ServerTypeDisplayName=r(10,null),t.ApplicationRoleTypeDisplayName=r(11,null),t.ApplicationRoleTypeDisplayNameInTitle=r(12,null),t.DatabaseRoleTypeDisplayName=r(13,null),t.DatabaseRoleTypeDisplayNameInTitle=r(14,null),t.DatabaseTypeDisplayNameInTitle=r(15,null),t.NoDialogFoundError=function(e,t){return r(16,null,e,t)},t.NotSupportedError=function(e){return r(17,null,e)},t.FailedToRetrieveConnectionInfoErrorMessage=r(18,null),t.RenameObjectDialogTitle=r(19,null),t.OwnerText=r(20,null),t.BrowseText=r(21,null),t.BrowseOwnerButtonAriaLabel=r(22,null),t.AddMemberAriaLabel=r(23,null),t.RemoveMemberAriaLabel=r(24,null),t.AddSecurableAriaLabel=r(25,null),t.RemoveSecurableAriaLabel=r(26,null),t.SecurablesText=r(27,null),t.ExplicitPermissionsTableLabel=r(28,null),t.EffectivePermissionsTableLabel=r(29,null),t.PermissionColumnHeader=r(30,null),t.GrantorColumnHeader=r(31,null),t.GrantColumnHeader=r(32,null),t.WithGrantColumnHeader=r(33,null),t.DenyColumnHeader=r(34,null),t.SelectSecurablesDialogTitle=r(35,null),t.AddFileAriaLabel=r(36,null),t.RemoveFileAriaLabel=r(37,null),t.CreateObjectLabel=r(38,null),t.ApplyUpdatesLabel=r(39,null),t.allFiles=r(40,null),t.labelSelectFolder=r(41,null),t.DataFileLabel=r(42,null),t.LogFileLabel=r(43,null),t.BackButtonLabel=r(44,null),t.NoSecurableObjectsFoundInfoMessage=r(45,null),t.BrowseFilesLabel=r(46,null),t.ExplicitPermissionsTableLabelSelected=function(e){return r(47,null,e)},t.EffectivePermissionsTableLabelSelected=function(e){return r(48,null,e)},t.RefreshObjectExplorerError=function(e){return r(49,null,e)},t.DropObjectConfirmationText=function(e,t){return r(50,null,e,t)},t.CreateObjectOperationDisplayName=function(e){return r(51,null,e)},t.UpdateObjectOperationDisplayName=function(e,t){return r(52,null,e,t)},t.DropObjectOperationDisplayName=function(e,t){return r(53,null,e,t)},t.DropObjectError=function(e,t,n){return r(54,null,e,t,n)},t.OpenDetachDatabaseDialogError=function(e){return r(55,null,e)},t.OpenBackupDatabaseDialogError=function(e){return r(56,null,e)},t.DetachDatabaseOperationDisplayName=function(e){return r(57,null,e)},t.OpenDropDatabaseDialogError=function(e){return r(58,null,e)},t.OpenAttachDatabaseDialogError=function(e){return r(59,null,e)},t.AttachDatabaseOperationDisplayName=r(60,null),t.BackupDatabaseOperationDisplayName=function(e){return r(61,null,e)},t.OpenRestoreDatabaseDialogError=function(e){return r(62,null,e)},t.RestoreDatabaseOperationDisplayName=function(e){return r(63,null,e)},t.OpenObjectPropertiesDialogError=function(e,t,n){return r(64,null,e,t,n)},t.OpenNewObjectDialogError=function(e,t){return r(65,null,e,t)},t.NewObjectDialogTitle=function(e){return r(66,null,e)},t.ObjectPropertiesDialogTitle=function(e,t){return r(67,null,e,t)},t.RenameObjectOperationDisplayName=function(e,t,n){return r(68,null,e,t,n)},t.RenameObjectError=function(e,t,n,i){return r(69,null,e,t,n,i)},t.NameText=r(70,null),t.GeneralSectionHeader=r(71,null),t.AdvancedSectionHeader=r(72,null),t.OptionsSectionHeader=r(73,null),t.FilesSectionHeader=r(74,null),t.FileGroupsSectionHeader=r(75,null),t.PasswordText=r(76,null),t.ConfirmPasswordText=r(77,null),t.EnabledText=r(78,null),t.NameCannotBeEmptyError=r(79,null),t.PasswordCannotBeEmptyError=r(80,null),t.PasswordsNotMatchError=r(81,null),t.InvalidPasswordError=r(82,null),t.LoginNotSelectedError=r(83,null),t.MembershipSectionHeader=r(84,null),t.MemberSectionHeader=r(85,null),t.SchemaText=r(86,null),t.CollationNotValidError=e=>r(87,null,e),t.CollationText=r(88,null),t.RecoveryModelText=r(89,null),t.CompatibilityLevelText=r(90,null),t.ContainmentTypeText=r(91,null),t.ConfigureSLOSectionHeader=r(92,null),t.BackupRedundancyText=r(93,null),t.CurrentSLOText=r(94,null),t.EditionText=r(95,null),t.MaxSizeText=r(96,null),t.AzurePricingLinkText=r(97,null),t.DetachDatabaseDialogTitle=e=>r(98,null,e),t.RestoreDatabaseDialogTitle=r(99,null),t.DetachDropConnections=r(100,null),t.DetachUpdateStatistics=r(101,null),t.DatabaseFilesLabel=r(102,null),t.DatabaseFileNameLabel=r(103,null),t.DatabaseFileTypeLabel=r(104,null),t.DatabaseFilePathLabel=r(105,null),t.DatabaseFileGroupLabel=r(106,null),t.DetachDatabaseOptions=r(107,null),t.DetachButtonLabel=r(108,null),t.AttachDatabaseDialogTitle=r(109,null),t.NoDatabaseFilesError=r(110,null),t.DatabasesToAttachLabel=r(111,null),t.AssociatedFilesLabel=r(112,null),t.MdfFileLocation=r(113,null),t.DatabaseFilesFilterLabel=r(114,null),t.DatabaseName=r(115,null),t.AttachAsText=r(116,null),t.AttachButtonLabel=r(117,null),t.DropDatabaseDialogTitle=e=>r(118,null,e),t.DropButtonLabel=r(119,null),t.DropDatabaseOptions=r(120,null),t.CloseConnections=r(121,null),t.DeleteBackupHistory=r(122,null),t.DatabaseDetailsLabel=r(123,null),t.BackupDatabaseDialogTitle=e=>r(124,null,e),t.BackupButtonLabel=r(125,null),t.BackupOverwriteMediaLabel=r(126,null),t.BackupCompressionLabel=r(127,null),t.BackupEncryptionLabel=r(128,null),t.BackupTransactionLog=r(129,null),t.BackupReliabilityLabel=r(130,null),t.BackupExpirationLabel=r(131,null),t.AddBackupFileAriaLabel=r(132,null),t.RemoveBackupFileAriaLabel=r(133,null),t.BackupFilesLabel=r(134,null),t.BackupToUrlLabel=r(135,null),t.BackupNameLabel=r(136,null),t.BackupRecoveryLabel=r(137,null),t.BackupTypeLabel=r(138,null),t.BackupCopyLabel=r(139,null),t.BackupDiskLabel=r(140,null),t.BackupUrlLabel=r(141,null),t.BackupToLabel=r(142,null),t.BackupServerCertificate=r(143,null),t.BackupAsymmetricKey=r(144,null),t.BackupFull=r(145,null),t.BackupDifferential=r(146,null),t.BackupToExistingMedia=r(147,null),t.AppendToExistingBackup=r(148,null),t.OverwriteExistingBackups=r(149,null),t.BackupAndEraseExisting=r(150,null),t.BackupNewMediaName=r(151,null),t.BackupNewMediaDescription=r(152,null),t.VerifyBackupWhenFinished=r(153,null),t.BackupPerformChecksum=r(154,null),t.BackupContinueOnError=r(155,null),t.BackupTruncateLog=r(156,null),t.BackupLogTail=r(157,null),t.TransactionLogNotice=r(158,null),t.BackupSetCompression=r(159,null),t.EncryptBackup=r(160,null),t.BackupAlgorithm=r(161,null),t.BackupCertificate=r(162,null),t.NoEncryptorWarning=r(163,null),t.BackupEncryptNotice=r(164,null),t.BackupDefaultSetting=r(165,null),t.CompressBackup=r(166,null),t.DontCompressBackup=r(167,null),t.RecoveryModelSimple=r(168,null),t.PathAlreadyAddedError=r(169,null),t.ScriptingFailedError=r(170,null),t.BackupFailedError=r(171,null),t.BlankPasswordConfirmationText=r(172,null),t.DropLoginConfirmationText=r(173,null),t.SQLAuthenticationSectionHeader=r(174,null),t.ServerRoleSectionHeader=r(175,null),t.AuthTypeText=r(176,null),t.SpecifyOldPasswordText=r(177,null),t.OldPasswordText=r(178,null),t.EnforcePasswordPolicyText=r(179,null),t.EnforcePasswordExpirationText=r(180,null),t.MustChangePasswordText=r(181,null),t.DefaultDatabaseText=r(182,null),t.DefaultLanguageText=r(183,null),t.PermissionToConnectText=r(184,null),t.LoginLockedOutText=r(185,null),t.WindowsAuthenticationTypeDisplayText=r(186,null),t.SQLAuthenticationTypeDisplayText=r(187,null),t.AADAuthenticationTypeDisplayText=r(188,null),t.OldPasswordCannotBeEmptyError=r(189,null),t.RestoreFromText=r(190,null),t.BackupFilePathText=r(191,null),t.DatabaseText=r(192,null),t.TargetDatabaseText=r(193,null),t.RestoreToText=r(194,null),t.SourceSectionText=r(195,null),t.DestinationSectionText=r(196,null),t.RestorePlanSectionText=r(197,null),t.RestoreFromBackupFileOptionText=r(198,null),t.RestoreFromDatabaseOptionText=r(199,null),t.RestoreFromUrlText=r(200,null),t.RestoreFromS3UrlText=r(201,null),t.BackupFolderPathTitle=r(202,null),t.RestoreDatabaseFilesAsText=r(203,null),t.RestoreDatabaseFileDetailsText=r(204,null),t.RestoreOptionsText=r(205,null),t.RestoreTailLogBackupText=r(206,null),t.RestoreServerConnectionsOptionsText=r(207,null),t.RelocateAllFilesText=r(208,null),t.DataFileFolderText=r(209,null),t.LogFileFolderText=r(210,null),t.OverwriteTheExistingDatabaseText=r(211,null),t.PreserveReplicationSettingsText=r(212,null),t.RestrictAccessToRestoredDBText=r(213,null),t.RecoveryStateText=r(214,null),t.StandbyFileText=r(215,null),t.TakeTailLogBackupBeforeRestoreText=r(216,null),t.LeaveSourceDBText=r(217,null),t.TailLogBackupFileText=r(218,null),t.CloseExistingConnectionText=r(219,null),t.RestoreText=r(220,null),t.ComponentText=r(221,null),t.TypeText=r(222,null),t.ServerText=r(223,null),t.PositionText=r(224,null),t.FirstLSNText=r(225,null),t.LastLSNText=r(226,null),t.CheckpointLSNText=r(227,null),t.FullLSNText=r(228,null),t.StartDateText=r(229,null),t.FinishDateText=r(230,null),t.UserNameText=r(231,null),t.ExpirationText=r(232,null),t.LogicalFileNameText=r(233,null),t.OriginalFileNameText=r(234,null),t.RestoreAsText=r(235,null),t.DatabaseAlreadyExists=e=>r(236,null,e),t.UserTypeText=r(237,null),t.UserType_LoginMapped=r(238,null),t.UserType_WindowsUser=r(239,null),t.UserType_SqlAuthentication=r(240,null),t.UserType_AADAuthentication=r(241,null),t.UserType_NoLoginAccess=r(242,null),t.DefaultSchemaText=r(243,null),t.LoginText=r(244,null),t.OwnedSchemaSectionHeader=r(245,null),t.SelectDatabaseRoleMemberDialogTitle=r(246,null),t.SelectDatabaseRoleOwnerDialogTitle=r(247,null),t.SelectServerRoleMemberDialogTitle=r(248,null),t.SelectServerRoleOwnerDialogTitle=r(249,null),t.ObjectTypesText=r(250,null),t.FilterSectionTitle=r(251,null),t.ObjectTypeText=r(252,null),t.SearchTextLabel=r(253,null),t.FindText=r(254,null),t.SelectText=r(255,null),t.ObjectsText=r(256,null),t.LoadingObjectsText=r(257,null),t.LoadingObjectsCompletedText=function(e){return r(258,null,e)},t.ObjectSelectionMethodDialogTitle=r(259,null),t.ObjectSelectionMethodDialog_TypeLabel=r(260,null),t.ObjectSelectionMethodDialog_SpecificObjects=r(261,null),t.ObjectSelectionMethodDialog_AllObjectsOfTypes=r(262,null),t.ObjectSelectionMethodDialog_AllObjectsOfSchema=r(263,null),t.ObjectSelectionMethodDialog_SelectSchemaDropdownLabel=r(264,null),t.PropertiesHeader=r(265,null),t.HardwareGenerationText=r(266,null),t.LanguageText=r(267,null),t.MemoryText=r(268,null),t.OperatingSystemText=r(269,null),t.PlatformText=r(270,null),t.ProcessorsText=r(271,null),t.IsClusteredText=r(272,null),t.IsHadrEnabledText=r(273,null),t.IsPolyBaseInstalledText=r(274,null),t.IsXTPSupportedText=r(275,null),t.ProductText=r(276,null),t.ReservedStorageSizeInMBText=r(277,null),t.RootDirectoryText=r(278,null),t.ServerCollationText=r(279,null),t.ServiceTierText=r(280,null),t.StorageSpaceUsageInMBText=r(281,null),t.VersionText=r(282,null),t.minServerMemoryText=r(283,null),t.maxServerMemoryText=r(284,null),t.autoSetProcessorAffinityMaskForAllText=r(285,null),t.autoSetProcessorAffinityIOMaskForAllText=r(286,null),t.processorColumnText=r(287,null),t.processorAffinityColumnText=r(288,null),t.processorIOAffinityColumnText=r(289,null),t.processorLabel=r(290,null),t.serverMemoryMaxLowerThanMinInputError=r(291,null),t.serverNumaNodeLabel=e=>r(292,null,e),t.serverCPULabel=e=>r(293,null,e),t.securityText=r(294,null),t.serverAuthenticationText=r(295,null),t.onlyWindowsAuthModeText=r(296,null),t.sqlServerAndWindowsAuthText=r(297,null),t.loginAuditingText=r(298,null),t.noLoginAuditingText=r(299,null),t.failedLoginsOnlyText=r(300,null),t.successfulLoginsOnlyText=r(301,null),t.bothFailedAndSuccessfulLoginsText=r(302,null),t.needToRestartServer=r(303,null),t.logLocationText=r(304,null),t.dataLocationText=r(305,null),t.backupLocationText=r(306,null),t.defaultLocationsLabel=r(307,null),t.databaseSettingsText=r(308,null),t.compressBackupText=r(309,null),t.backupChecksumText=r(310,null),t.backupAndRestoreText=r(311,null),t.allowTriggerToFireOthersLabel=r(312,null),t.blockedProcThresholdLabel=r(313,null),t.cursorThresholdLabel=r(314,null),t.defaultFullTextLanguageLabel=r(315,null),t.defaultLanguageLabel=r(316,null),t.fullTextUpgradeOptionLabel=r(317,null),t.maxTextReplicationSizeLabel=r(318,null),t.optimizeAdHocWorkloadsLabel=r(319,null),t.scanStartupProcsLabel=r(320,null),t.twoDigitYearCutoffLabel=r(321,null),t.costThresholdParallelismLabel=r(322,null),t.locksLabel=r(323,null),t.locksValidation=function(e){return r(324,null,e)},t.maxDegreeParallelismLabel=r(325,null),t.queryWaitLabel=r(326,null),t.LastDatabaseBackupText=r(327,null),t.LastDatabaseLogBackupText=r(328,null),t.BackupSectionHeader=r(329,null),t.AutomaticSectionHeader=r(330,null),t.LedgerSectionHeader=r(331,null),t.RecoverySectionHeader=r(332,null),t.StateSectionHeader=r(333,null),t.DatabaseSectionHeader=r(334,null),t.NamePropertyText=r(335,null),t.StatusText=r(336,null),t.OwnerPropertyText=r(337,null),t.DateCreatedText=r(338,null),t.SizeText=r(339,null),t.SpaceAvailableText=r(340,null),t.NumberOfUsersText=r(341,null),t.MemoryAllocatedText=r(342,null),t.MemoryUsedText=r(343,null),t.StringValueInMB=e=>r(344,null,e),t.AutoCreateIncrementalStatisticsText=r(345,null),t.AutoCreateStatisticsText=r(346,null),t.AutoShrinkText=r(347,null),t.AutoUpdateStatisticsText=r(348,null),t.AutoUpdateStatisticsAsynchronouslyText=r(349,null),t.IsLedgerDatabaseText=r(350,null),t.PageVerifyText=r(351,null),t.TargetRecoveryTimeInSecondsText=r(352,null),t.DatabaseReadOnlyText=r(353,null),t.DatabaseStateText=r(354,null),t.EncryptionEnabledText=r(355,null),t.RestrictAccessText=r(356,null),t.DatabaseScopedConfigurationTabHeader=r(357,null),t.QueryStoreTabHeader=r(358,null),t.DatabaseScopedOptionsColumnHeader=r(359,null),t.ValueForPrimaryColumnHeader=r(360,null),t.ValueForSecondaryColumnHeader=r(361,null),t.SetSecondaryText=r(362,null),t.DatabaseNameText=r(363,null),t.UseFullTextIndexingText=r(364,null),t.LogicalNameText=r(365,null),t.FileTypeText=r(366,null),t.FilegroupText=r(367,null),t.AutogrowthMaxsizeText=r(368,null),t.PathText=r(369,null),t.FileNameText=r(370,null),t.DatabaseFilesText=r(371,null),t.AddDatabaseFilesText=r(372,null),t.EditDatabaseFilesText=e=>r(373,null,e),t.AddButton=r(374,null),t.EditButton=r(375,null),t.RemoveButton=r(376,null),t.SizeInMbText=r(377,null),t.EnableAutogrowthText=r(378,null),t.FileGrowthText=r(379,null),t.MaximumFileSizeText=r(380,null),t.InPercentAutogrowthText=r(381,null),t.InMegabytesAutogrowthText=r(382,null),t.LimitedToMBFileSizeText=r(383,null),t.UnlimitedFileSizeText=r(384,null),t.NoneText=r(385,null),t.AutoGrowthValueStringGenerator=function(e,t,n,i){const o=-1===i?r(386,null):r(387,null,i);return e?r(388,null,t,n?"Percent":"MB",o):r(389,null,o)},t.FileGroupForLogTypeText=r(390,null),t.FileGroupForFilestreamTypeText=r(391,null),t.DuplicateLogicalNameError=e=>r(392,null,e),t.FileNameExistsError=e=>r(393,null,e),t.FileAlreadyExistsError=e=>r(394,null,e),t.FileSizeLimitError=r(395,null),t.FilegrowthLimitError=r(396,null),t.RowsDataFileType=r(397,null),t.LogFiletype=r(398,null),t.FilestreamFileType=r(399,null),t.RowsFileGroupsSectionText=r(400,null),t.FileStreamFileGroupsSectionText=r(401,null),t.MemoryOptimizedFileGroupsSectionText=r(402,null),t.FilesText=r(403,null),t.ReadOnlyText=r(404,null),t.DefaultText=r(405,null),t.AutogrowAllFilesText=r(406,null),t.FilestreamFilesText=r(407,null),t.AddFilegroupText=r(408,null),t.FilegroupExistsError=e=>r(409,null,e),t.EmptyFilegroupNameError=r(410,null),t.ActualOperationModeText=r(411,null),t.RequestedOperationModeText=r(412,null),t.DataFlushIntervalInMinutesText=r(413,null),t.StatisticsCollectionInterval=r(414,null),t.MaxPlansPerQueryText=r(415,null),t.MaxSizeInMbText=r(416,null),t.QueryStoreCaptureModeText=r(417,null),t.SizeBasedCleanupModeText=r(418,null),t.StateQueryThresholdInDaysText=r(419,null),t.WaitStatisticsCaptureModeText=r(420,null),t.MonitoringSectionText=r(421,null),t.QueryStoreRetentionSectionText=r(422,null),t.QueryStoreCapturePolicySectionText=r(423,null),t.QueryStoreCurrentDiskUsageSectionText=r(424,null),t.ExecutionCountText=r(425,null),t.StaleThresholdText=r(426,null),t.TotalCompileCPUTimeInMsText=r(427,null),t.TotalExecutionCPUTimeInMsText=r(428,null),t.QueryStoreCapturemodeCustomText=r(429,null),t.QueryStoreUsedText=r(430,null),t.QueryStoreAvailableText=r(431,null),t.PurgeQueryDataButtonText=r(432,null),t.YesText=r(433,null),t.NotAvailableText=r(434,null),t.PurgeQueryStoreDataMessage=e=>r(435,null,e),t.fileGroupsNameInput=r(436,null),t.SelectS3BackupFileDialogTitle=r(437,null),t.RegionSpecificEndpointText=r(438,null),t.SecretKeyText=r(439,null),t.AccessKeyText=r(440,null),t.RegionText=r(441,null),t.AddCredentialsText=r(442,null),t.SelectS3BucketText=r(443,null),t.SelectBackupFileText=r(444,null),t.InvalidS3UrlError=r(445,null),t.getNodeTypeDisplayName=i;const o=new Map;o.set("Windows",t.WindowsAuthenticationTypeDisplayText),o.set("Sql",t.SQLAuthenticationTypeDisplayText),o.set("AAD",t.AADAuthenticationTypeDisplayText),t.getAuthenticationTypeDisplayName=function(e){if(o.has(e))return o.get(e);throw new Error(`Unknown authentication type: ${e}`)},t.getAuthenticationTypeByDisplayName=function(e){for(let[t,n]of o.entries())if(n===e)return t;throw new Error(`Unknown authentication type display name: ${e}`)};const s=new Map;s.set("LoginMapped",t.UserType_LoginMapped),s.set("WindowsUser",t.UserType_WindowsUser),s.set("SqlAuthentication",t.UserType_SqlAuthentication),s.set("AADAuthentication",t.UserType_AADAuthentication),s.set("NoLoginAccess",t.UserType_NoLoginAccess),t.getUserTypeDisplayName=function(e){if(s.has(e))return s.get(e);throw new Error(`Unknown user type: ${e}`)},t.getUserTypeByDisplayName=function(e){for(let[t,n]of s.entries())if(n===e)return t;throw new Error(`Unknown user type display name: ${e}`)},t.getObjectTypeInfo=function(e){return e.map((e=>({name:e,displayName:i(e,!0)})))}},3349:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestObjectManagementService=t.ObjectManagementService=void 0;const r=n(76),i=n(3508),o=n(6290),s=n(5702);class a extends s.BaseService{static asFeature(e){return class extends a{constructor(t){super(e,t)}fillClientCapabilities(e){r.ensure(e,"objectManagement").objectManagement=!0}initialize(){}}}async initializeView(e,t,n,r,i,s,a){const c={connectionUri:n,contextId:e,isNewObject:i,objectType:t,database:r,parentUrn:s,objectUrn:a};return this.runWithErrorHandling(o.InitializeViewRequest.type,c)}constructor(e,t){super(t),e.registerService(i.ObjectManagementService,this)}async save(e,t){const n={contextId:e,object:t};return this.runWithErrorHandling(o.SaveObjectRequest.type,n)}async script(e,t){const n={contextId:e,object:t};return this.runWithErrorHandling(o.ScriptObjectRequest.type,n)}async disposeView(e){const t={contextId:e};return this.runWithErrorHandling(o.DisposeViewRequest.type,t)}async rename(e,t,n,r){const i={connectionUri:e,objectUrn:n,newName:r,objectType:t};return this.runWithErrorHandling(o.RenameObjectRequest.type,i)}async drop(e,t,n){const r={connectionUri:e,objectUrn:n,objectType:t};return this.runWithErrorHandling(o.DropObjectRequest.type,r)}async search(e,t,n,r){const i={contextId:e,searchText:n,objectTypes:t,schema:r};return this.runWithErrorHandling(o.SearchObjectRequest.type,i)}async detachDatabase(e,t,n,r,i){const s={connectionUri:e,database:t,dropConnections:n,updateStatistics:r,generateScript:i};return this.runWithErrorHandling(o.DetachDatabaseRequest.type,s)}async dropDatabase(e,t,n,r,i){const s={connectionUri:e,database:t,dropConnections:n,deleteBackupHistory:r,generateScript:i};return this.runWithErrorHandling(o.DropDatabaseRequest.type,s)}async attachDatabases(e,t,n){const r={connectionUri:e,databases:t,generateScript:n};return this.runWithErrorHandling(o.AttachDatabaseRequest.type,r)}async backupDatabase(e,t,n){const r={ownerUri:e,backupInfo:t,taskExecutionMode:n};return this.runWithErrorHandling(o.BackupDatabaseRequest.type,r)}async getDataFolder(e){const t={connectionUri:e};return this.runWithErrorHandling(o.GetDataFolderRequest.type,t)}async getBackupFolder(e){const t={connectionUri:e};return this.runWithErrorHandling(o.GetBackupFolderRequest.type,t)}async getAssociatedFiles(e,t){const n={connectionUri:e,primaryFilePath:t};return this.runWithErrorHandling(o.GetAssociatedFilesRequest.type,n)}async purgeQueryStoreData(e,t){const n={connectionUri:e,database:t};return this.runWithErrorHandling(o.PurgeQueryStoreDataRequest.type,n)}async createCredential(e,t){const n={connectionUri:e,credentialInfo:t};return this.runWithErrorHandling(o.CreateCredentialRequest.type,n)}async getCredentialNames(e){const t={connectionUri:e};return this.runWithErrorHandling(o.GetCredentialNamesRequest.type,t)}}t.ObjectManagementService=a;const c=[{name:"Server",displayName:"Server",permissions:[{name:"CONNECT SQL",displayName:"CONNECT SQL"},{name:"VIEW ANY DATABASE",displayName:"VIEW ANY DATABASE"}]},{name:"ServerRole",displayName:"Server Role",permissions:[{name:"ALTER",displayName:"ALTER"},{name:"CONTROL",displayName:"CONTROL"},{name:"TAKE OWNERSHIP",displayName:"TAKE OWNERSHIP"}]}],l=[{name:"AggregateFunction",displayName:"Aggregate Function",permissions:[{name:"EXECUTE",displayName:"EXECUTE"},{name:"ALTER",displayName:"ALTER"}]},{name:"Table",displayName:"Table",permissions:[{name:"SELECT",displayName:"SELECT"},{name:"ALTER",displayName:"ALTER"},{name:"CONTROL",displayName:"CONTROL"},{name:"TAKE OWNERSHIP",displayName:"TAKE OWNERSHIP"}]},{name:"View",displayName:"View",permissions:[{name:"ALTER",displayName:"ALTER"},{name:"CONTROL",displayName:"CONTROL"},{name:"TAKE OWNERSHIP",displayName:"TAKE OWNERSHIP"}]}],u=[{name:"Server",type:"Server",permissions:[{permission:"CONNECT SQL",grant:!0,grantor:"sa",withGrant:void 0},{permission:"VIEW ANY DATABASE",grant:!1,grantor:"sa",withGrant:void 0}],effectivePermissions:["CONNECT SQL","VIEW ANY DATABASE"]}],d=[{name:"table1",type:"Table",schema:"dbo",permissions:[{permission:"SELECT",grant:!0,grantor:"",withGrant:void 0}],effectivePermissions:["SELECT"]},{name:"view1",type:"View",schema:"Sales",permissions:[{permission:"ALTER",grant:!0,grantor:"",withGrant:void 0}],effectivePermissions:["ALTER"]}];t.TestObjectManagementService=class{initializeView(e,t,n,r,i,o,s){let a;if("ApplicationRole"===t)a=this.getApplicationRoleView(i,s);else if("DatabaseRole"===t)a=this.getDatabaseRoleView(i,s);else if("Database"===t)a=this.getDatabaseView(i,s);else if("ServerLevelLogin"===t)a=this.getLoginView(i,s);else if("ServerLevelServerRole"===t)a=this.getServerRoleView(i,s);else{if("User"!==t)throw Error("Not implemented");a=this.getUserView(i,s)}return this.delayAndResolve(a)}save(e,t){return this.delayAndResolve()}script(e,t){return this.delayAndResolve("test script")}disposeView(e){return this.delayAndResolve()}async rename(e,t,n,r){return this.delayAndResolve()}async drop(e,t,n){return this.delayAndResolve()}async search(e,t,n,r){const i=[];return t.forEach((e=>{i.push(...this.generateSearchResult(e,r,15))})),this.delayAndResolve(i)}async detachDatabase(e,t,n,r,i){return this.delayAndResolve("")}async attachDatabases(e,t,n){return this.delayAndResolve("")}async backupDatabase(e,t,n){return this.delayAndResolve({result:!0,taskId:0})}dropDatabase(e,t,n,r,i){return this.delayAndResolve("")}async getDataFolder(e){return this.delayAndResolve("")}async getBackupFolder(e){return this.delayAndResolve("")}async getAssociatedFiles(e,t){return this.delayAndResolve([])}async purgeQueryStoreData(e,t){return this.delayAndResolve([])}async createCredential(e,t){return this.delayAndResolve()}async getCredentialNames(e){return this.delayAndResolve([])}generateSearchResult(e,t,n){let r=[];for(let i=0;i<n;i++)r.push({name:`${e} ${i}`,schema:t,type:e});return r}getLoginView(e,t){const n=["sysadmin","public","bulkadmin","dbcreator","diskadmin","processadmin","securityadmin","serveradmin"],r=["<default>","English"],i=["master","db1","db2"];let o;return o=e?{objectInfo:{name:"",authenticationType:"Sql",enforcePasswordPolicy:!0,enforcePasswordExpiration:!0,mustChangePassword:!0,defaultDatabase:"master",defaultLanguage:"<default>",serverRoles:["public","bulkadmin"],connectPermission:!0,isEnabled:!0,isLockedOut:!1,securablePermissions:[]},authenticationTypes:["Sql","Windows"],supportAdvancedOptions:!0,supportAdvancedPasswordOptions:!0,canEditLockedOutState:!1,languages:r,databases:i,serverRoles:n,supportedSecurableTypes:c}:{objectInfo:{name:t,authenticationType:"Sql",enforcePasswordPolicy:!0,enforcePasswordExpiration:!0,mustChangePassword:!0,defaultDatabase:"master",defaultLanguage:"<default>",serverRoles:["public"],connectPermission:!0,isEnabled:!0,isLockedOut:!1,password:"******************",securablePermissions:u},authenticationTypes:["Sql","Windows"],supportAdvancedOptions:!0,supportAdvancedPasswordOptions:!0,canEditLockedOutState:!1,languages:r,databases:i,serverRoles:n,supportedSecurableTypes:c},o}getUserView(e,t){let n;const r=["<default>","English"],i=["dbo","sys","alanren"],o=["sa","alanren","alanren@microsoft.com"],s=["dbmanager","loginmanager","bulkadmin","sysadmin","tablemanager","viewmanager"];return n=e?{objectInfo:{name:"",type:"LoginMapped",defaultSchema:"dbo",defaultLanguage:"<default>",authenticationType:"Sql",loginName:"sa",ownedSchemas:[],databaseRoles:[],password:"",securablePermissions:[]},languages:r,schemas:i,logins:o,databaseRoles:s,userTypes:["LoginMapped","AADAuthentication","SqlAuthentication","NoLoginAccess"],supportedSecurableTypes:l}:{objectInfo:{name:t,type:"LoginMapped",defaultSchema:"dbo",defaultLanguage:"<default>",loginName:"sa",ownedSchemas:["dbo"],databaseRoles:["dbmanager","bulkadmin"],securablePermissions:d},languages:r,schemas:i,logins:o,databaseRoles:s,userTypes:["LoginMapped","AADAuthentication","SqlAuthentication","NoLoginAccess"],supportedSecurableTypes:l},n}getServerRoleView(e,t){return e?{objectInfo:{name:"",members:[],owner:"",memberships:[],securablePermissions:[]},isFixedRole:!1,serverRoles:["ServerLevelServerRole 1","ServerLevelServerRole 2","ServerLevelServerRole 3","ServerLevelServerRole 4"],supportedSecurableTypes:c}:{objectInfo:{name:"ServerLevelServerRole 1",members:["ServerLevelLogin 1","ServerLevelServerRole 2"],owner:"ServerLevelLogin 2",memberships:["ServerLevelServerRole 3","ServerLevelServerRole 4"],securablePermissions:u},isFixedRole:!1,serverRoles:["ServerLevelServerRole 2","ServerLevelServerRole 3","ServerLevelServerRole 4"],supportedSecurableTypes:c}}getApplicationRoleView(e,t){return e?{objectInfo:{name:"",defaultSchema:"dbo",ownedSchemas:[],securablePermissions:[]},schemas:["dbo","sys","admin"],supportedSecurableTypes:[]}:{objectInfo:{name:"app role1",password:"******************",defaultSchema:"dbo",ownedSchemas:["dbo"],securablePermissions:d},schemas:["dbo","sys","admin"],supportedSecurableTypes:l}}getDatabaseRoleView(e,t){return e?{objectInfo:{name:"",owner:"",members:[],ownedSchemas:[],securablePermissions:[]},schemas:["dbo","sys","admin"],supportedSecurableTypes:l}:{objectInfo:{name:"db role1",owner:"",members:[],ownedSchemas:["dbo"],securablePermissions:d},schemas:["dbo","sys","admin"],supportedSecurableTypes:l}}getDatabaseView(e,t){return e?{objectInfo:{name:"New Database Name",owner:"",collationName:"",compatibilityLevel:"",containmentType:"",recoveryModel:"",azureEdition:"",azureMaxSize:"",azureBackupRedundancyLevel:"",azureServiceLevelObjective:""}}:{collationNames:{defaultValueIndex:0,options:["Latin1_General_100_CI_AS_KS_WS","Latin1_General_100_CI_AS_KS_WS_SC"]},compatibilityLevels:{defaultValueIndex:0,options:["SQL Server 2008","SQL Server 2012","SQL Server 2014","SQL Server 2016","SQL Server 2017","SQL Server 2019"]},containmentTypes:{defaultValueIndex:0,options:["NONE","PARTIAL"]},loginNames:{defaultValueIndex:0,options:["user1","user2","user3"]},restrictAccessOptions:["MULTI_USER","RESTRICTED_USER","SINGLE_USER"],recoveryModels:{defaultValueIndex:0,options:["FULL","SIMPLE","BULK_LOGGED"]},pageVerifyOptions:["CHECKSUM","NONE","TORN_PAGE_DETECTION"],dscElevateOptions:["OFF","WHEN_SUPPORTED","FAIL_UNSUPPORTED"],dscEnableDisableOptions:["ENABLED","DISABLED"],propertiesOnOffOptions:["ON","OFF"],rowDataFileGroupsOptions:["PRIMARY","RowDataGroup1","RowDataGroup2"],fileStreamFileGroupsOptions:["PRIMARY","FileStreamGroup1","FileStreamGroup2"],fileTypesOptions:["ROWS","LOG","FILESTREAM"],objectInfo:{name:"Database Properties1",collationName:"Latin1_General_100_CI_AS_KS_WS",dateCreated:"5/31/2023 8:05:55 AM",lastDatabaseBackup:"None",lastDatabaseLogBackup:"None",memoryAllocatedToMemoryOptimizedObjectsInMb:0,memoryUsedByMemoryOptimizedObjectsInMb:0,numberOfUsers:5,owner:"databaseProperties 1",sizeInMb:16,spaceAvailableInMb:1.15,status:"Normal",autoCreateIncrementalStatistics:!1,autoCreateStatistics:!0,autoShrink:!1,autoUpdateStatistics:!0,autoUpdateStatisticsAsynchronously:!1,isLedgerDatabase:!1,pageVerify:"CHECKSUM",targetRecoveryTimeInSec:60,databaseReadOnly:!0,encryptionEnabled:!1,restrictAccess:"SINGLE_USER",databaseScopedConfigurations:[{name:"MAXDOP",valueForPrimary:"",valueForSecondary:""},{name:"legacy_cardinality_estimation",valueForPrimary:"ON",valueForSecondary:"ON"},{name:"parameter_sniffing",valueForPrimary:"ON",valueForSecondary:"OFF"},{name:"query_optimizer_hotfixes",valueForPrimary:"ON",valueForSecondary:"OFF"},{name:"identity_cache",valueForPrimary:"ON",valueForSecondary:"ON"},{name:"interleaved_execution_tvf",valueForPrimary:"ON",valueForSecondary:"ON"},{name:"batch_mode_memory_grant_feedback",valueForPrimary:"OFF",valueForSecondary:"OFF"},{name:"batch_mode_adaptive_joins",valueForPrimary:"OFF",valueForSecondary:"ON"},{name:"tsql_scalar_udf_inlining",valueForPrimary:"ON",valueForSecondary:"ON"}],isFilesTabSupported:!0,files:[{id:1,name:"databasefile1",type:"ROWS Data",path:"C:\\Temp\\",fileGroup:"PRIMARY",fileNameWithExtension:"databasefile1.mdf",sizeInMb:62,isAutoGrowthEnabled:!0,autoFileGrowth:64,autoFileGrowthType:0,maxSizeLimitInMb:-1},{id:2,name:"databasefile1_Log",type:"Log",path:"C:\\Temp\\",fileGroup:"Not Applicable",fileNameWithExtension:"databasefile1_log.ldf",sizeInMb:62,isAutoGrowthEnabled:!0,autoFileGrowth:64,autoFileGrowthType:1,maxSizeLimitInMb:-1}]}}}delayAndResolve(e){return new Promise(((t,n)=>{setTimeout((()=>{t(e)}),1e3)}))}}},1428:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.S3AddBackupFileDialog=void 0;const r=n(1398),i=n(8430),o=n(8991),s=n(7170);class a extends o.DialogBase{constructor(e,t){super(i.SelectS3BackupFileDialogTitle,i.SelectS3BackupFileDialogTitle),this.result={s3Url:void 0,secretKey:void 0,accessKey:void 0,backupFilePath:void 0},this.dialogObject.cancelButton.label=i.BackButtonLabel,this.dialogObject.okButton.label=i.AddButton,this.dialogObject.okButton.enabled=!1,this.objectManagementService=e,this.connectionUri=t,this.dialogObject.okButton.onClick((async()=>{this.result.backupFilePath=encodeURI(`s3://${this.bucketDropdown.value}.s3.${this.regionInputBox.value}.amazonaws.com/${this.backupFilesDropdown.value}`),this.credentialInfo={secret:`${this.result.accessKey}:${this.result.secretKey}`,identity:"S3 Access Key",name:this.result.backupFilePath,createDate:void 0,dateLastModified:void 0,providerName:"MSSQL",id:void 0},await this.objectManagementService.createCredential(this.connectionUri,this.credentialInfo)}))}async initialize(){this.s3UrlInputBox=this.createInputBox((async e=>{this.result.s3Url=r.Uri.parse(e),this.regionInputBox.value=this.result.s3Url.toString().split(".")[1],this.enableCredentialButton()}),{ariaLabel:i.RegionSpecificEndpointText,inputType:"text",placeHolder:"https://s3.{region}.{server}.com"});const e=this.createLabelInputContainer(i.RegionSpecificEndpointText,this.s3UrlInputBox,!0);this.secretKeyInputBox=this.createInputBox((async e=>{this.result.secretKey=e,this.enableCredentialButton()}),{ariaLabel:i.SecretKeyText,inputType:"password"});const t=this.createLabelInputContainer(i.SecretKeyText,this.secretKeyInputBox,!0);this.accessKeyInputBox=this.createInputBox((async e=>{this.result.accessKey=e,this.enableCredentialButton()}),{ariaLabel:i.AccessKeyText,inputType:"password"});const n=this.createLabelInputContainer(i.AccessKeyText,this.accessKeyInputBox,!0);this.credentialButton=this.createButton(i.AddCredentialsText,i.AddCredentialsText,(async()=>{this.createS3Client(),await this.setBucketDropdown()}),!1,o.DefaultInputWidth);const s=this.createLabelInputContainer(" ",this.credentialButton);this.regionInputBox=this.createInputBox((async()=>{}),{ariaLabel:i.RegionText,inputType:"text",enabled:!1});const a=this.createLabelInputContainer(i.RegionText,this.regionInputBox,!0);this.bucketDropdown=this.createDropdown(i.SelectS3BucketText,(async e=>{await this.setBackupFilesDropdown(e)}),[],"",!1);const c=this.createLabelInputContainer(i.SelectS3BucketText,this.bucketDropdown,!0);this.backupFilesDropdown=this.createDropdown(i.SelectBackupFileText,(async()=>{this.dialogObject.okButton.enabled=!0}),[],"",!1);const l=this.createLabelInputContainer(i.SelectBackupFileText,this.backupFilesDropdown,!0);this.formContainer.addItems([e,t,n,s,a,c,l])}async validateInput(){const e=await super.validateInput();return this.result.s3Url&&!this.result.s3Url.toString().includes("s3")&&"http"!==this.result.s3Url.scheme&&"https"!==this.result.s3Url.scheme&&e.push(i.InvalidS3UrlError),e}createS3Client(){this.s3Client=new s.S3Client({forcePathStyle:!0,region:this.regionInputBox.value,endpoint:encodeURI(this.result.s3Url.toString()),credentials:{accessKeyId:this.dialogResult.accessKey,secretAccessKey:this.dialogResult.secretKey}})}async getBucketList(){let e=new s.ListBucketsCommand({});return(await this.s3Client.send(e)).Buckets.map((e=>e.Name))}async getBackupFiles(e){const t={Bucket:e};let n=new s.ListObjectsV2Command(t);return(await this.s3Client.send(n)).Contents.filter((e=>e.Key.endsWith(".bak"))).map((e=>e.Key))}async setBackupFilesDropdown(e){this.backupFilesDropdown.values=await this.getBackupFiles(e),this.backupFilesDropdown.enabled=!0}async setBucketDropdown(){this.bucketDropdown.values=await this.getBucketList(),this.bucketDropdown.enabled=!0}enableCredentialButton(){this.credentialButton.enabled=void 0!==(this.result.s3Url&&this.result.accessKey&&this.result.secretKey)}get dialogResult(){return this.result}}t.S3AddBackupFileDialog=a},415:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ApplicationRoleDialog=void 0;const r=n(8430),i=n(1159),o=n(9523),s=n(8991),a=n(8358);class c extends a.PrincipalDialogBase{constructor(e,t){super(e,{...t,isDatabaseLevelPrincipal:!0,supportEffectivePermissions:!1})}postInitializeData(){this.objectInfo.password=this.objectInfo.password??""}get helpUrl(){return this.options.isNewObject?i.CreateApplicationRoleDocUrl:i.AlterApplicationRoleDocUrl}async validateInput(){const e=await super.validateInput();return this.objectInfo.password||e.push(r.PasswordCannotBeEmptyError),!this.objectInfo.password||(0,o.isValidSQLPassword)(this.objectInfo.password,this.objectInfo.name)||!this.options.isNewObject&&this.objectInfo.password===this.originalObjectInfo.password||e.push(r.InvalidPasswordError),this.objectInfo.password!==this.confirmPasswordInput.value&&e.push(r.PasswordsNotMatchError),e}async initializeUI(){await super.initializeUI(),this.initializeGeneralSection(),this.initializeOwnedSchemasSection(),this.formContainer.addItems([this.generalSection,this.ownedSchemasSection,this.securableSection],this.getSectionItemLayout())}initializeGeneralSection(){this.nameInput=this.createInputBox((async e=>{this.objectInfo.name=e}),{ariaLabel:r.NameText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.name,required:!0});const e=this.createLabelInputContainer(r.NameText,this.nameInput,!0);this.defaultSchemaDropdown=this.createDropdown(r.DefaultSchemaText,(async e=>{this.objectInfo.defaultSchema=e}),this.viewInfo.schemas,this.objectInfo.defaultSchema);const t=this.createLabelInputContainer(r.DefaultSchemaText,this.defaultSchemaDropdown);this.passwordInput=this.createInputBox((async e=>{this.objectInfo.password=e}),{ariaLabel:r.PasswordText,inputType:"password",value:this.objectInfo.password??"",required:!0});const n=this.createLabelInputContainer(r.PasswordText,this.passwordInput,!0);this.confirmPasswordInput=this.createInputBox((async()=>{}),{ariaLabel:r.ConfirmPasswordText,inputType:"password",value:this.objectInfo.password??"",required:!0});const i=this.createLabelInputContainer(r.ConfirmPasswordText,this.confirmPasswordInput,!0);this.generalSection=this.createGroup(r.GeneralSectionHeader,[e,t,n,i],!1)}initializeOwnedSchemasSection(){this.ownedSchemaTable=this.createTableList(r.OwnedSchemaSectionHeader,[r.SchemaText],this.viewInfo.schemas,this.objectInfo.ownedSchemas,s.DefaultMaxTableRowCount,(e=>-1===this.objectInfo.ownedSchemas.indexOf(e))),this.ownedSchemasSection=this.createGroup(r.OwnedSchemaSectionHeader,[this.ownedSchemaTable])}}t.ApplicationRoleDialog=c},8134:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttachDatabaseDialog=void 0;const r=n(235),i=n(5824),o=n(1159),s=n(8430),a=n(1776),c=n(8991),l=n(6928),u=n(76);class d extends i.ObjectManagementDialogBase{constructor(e,t){super(e,t,s.AttachDatabaseDialogTitle,"AttachDatabase"),this._databasesToAttach=[],this._databaseFiles=[],this._fileFilters=[{label:s.DatabaseFilesFilterLabel,filters:["*.mdf"]}],this.dialogObject.okButton.label=s.AttachButtonLabel}get isDirty(){return this._databasesToAttach.length>0}get saveChangesTaskLabel(){return s.AttachDatabaseOperationDisplayName}async initializeUI(){let e=this.initializeAttachSection(),t=this.initializeAssociatedFilesSection();this.formContainer.addItems([e,t])}initializeAttachSection(){const e=[s.MdfFileLocation,s.DatabaseName];this._databasesTable=this.createTable(s.DatabasesToAttachLabel,e,[]),this.disposables.push(this._databasesTable.onRowSelected((()=>this.onFileRowSelected())));let t={buttonAriaLabel:s.AddFileAriaLabel,buttonHandler:async()=>await this.onAddFilesButtonClicked()},n={buttonAriaLabel:a.RemoveText,buttonHandler:async()=>await this.onRemoveFilesButtonClicked()};const r=this.addButtonsForTable(this._databasesTable,t,n);return this._nameField=this.createInputBox((async e=>{if(this._databasesTable.selectedRows?.length>0){let t=this._databasesTable.selectedRows[0];this._databasesToAttach[t].databaseName=e}}),{}),this._nameContainer=this.createLabelInputContainer(s.AttachAsText,this._nameField),this._ownerDropdown=this.createDropdown(s.OwnerText,(async e=>{if(this._databasesTable.selectedRows?.length>0){let t=this._databasesTable.selectedRows[0];this._databasesToAttach[t].owner=e}}),this.viewInfo.loginNames.options,this.viewInfo.loginNames.options[this.viewInfo.loginNames.defaultValueIndex]),this._ownerContainer=this.createLabelInputContainer(s.OwnerText,this._ownerDropdown),this._nameContainer.display="none",this._ownerContainer.display="none",this.createGroup(s.DatabasesToAttachLabel,[this._databasesTable,r,this._nameContainer,this._ownerContainer],!1)}initializeAssociatedFilesSection(){const e=[s.DatabaseFileNameLabel,s.DatabaseFileTypeLabel,s.DatabaseFilePathLabel];return this._associatedFilesTable=this.createTable(s.DatabaseFilesLabel,e,[]),this.createGroup(s.AssociatedFilesLabel,[this._associatedFilesTable],!1)}async onFileRowSelected(){if(this._databasesTable.selectedRows?.length>0){let e=this._databasesTable.selectedRows[0],t=this._databasesToAttach[e];this._nameField.value=t.databaseName,this._ownerDropdown.value=t.owner,await this.updateAssociatedFilesTable(t.databaseFilePaths)}else await this.updateAssociatedFilesTable([])}async updateAssociatedFilesTable(e){let t=e.map((e=>{let t=l.extname(e),n=".ldf"===t?s.LogFileLabel:s.DataFileLabel;return[l.basename(e,t),n,e]}));await this._associatedFilesTable.updateProperties({data:t,height:(0,c.getTableHeight)(t.length,c.DefaultMinTableRowCount)})}async onAddFilesButtonClicked(){try{let e=await this.objectManagementService.getDataFolder(this.options.connectionUri),t=await r.window.openServerFileBrowserDialog(this.options.connectionUri,e,this._fileFilters);if(t){let e=this.viewInfo.loginNames?.options[this.viewInfo.loginNames.defaultValueIndex],n=l.basename(t,l.extname(t)),r=[t,n],i=await this.objectManagementService.getAssociatedFiles(this.options.connectionUri,t)??[];this._databaseFiles.push(r),this._databasesToAttach.push({databaseName:n,databaseFilePaths:i,owner:e}),this._nameContainer.display="block",this._ownerContainer.display="block",await this.updateTableData(),this._databasesTable.setActiveCell(this._databasesToAttach.length-1,0)}}catch(e){this.dialogObject.message={text:(0,u.getErrorMessage)(e),level:r.window.MessageLevel.Error}}}async onRemoveFilesButtonClicked(){let e=this._databasesTable.selectedRows,t=0;for(let n of e){let e=n-t;this._databaseFiles.splice(e,1),this._databasesToAttach.splice(e,1),t++}0===this._databasesToAttach.length?(this._nameContainer.display="none",this._ownerContainer.display="none"):this._databasesTable.setActiveCell(0,0),await this.updateTableData()}async updateTableData(){await this._databasesTable.updateProperties({data:this._databaseFiles,height:(0,c.getTableHeight)(this._databaseFiles.length,c.DefaultMinTableRowCount)}),this.onFormFieldChange()}get helpUrl(){return o.AttachDatabaseDocUrl}get actionName(){return"AttachDatabase"}async validateInput(){let e=[];return 0===this._databasesToAttach.length&&e.push(s.NoDatabaseFilesError),e}async saveChanges(e,t){await this.objectManagementService.attachDatabases(this.options.connectionUri,this._databasesToAttach,!1)}async generateScript(){return await this.objectManagementService.attachDatabases(this.options.connectionUri,this._databasesToAttach,!0)}}t.AttachDatabaseDialog=d},6806:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BackupDatabaseDialog=void 0;const r=n(235),i=n(5824),o=n(1159),s=n(8430),a=n(8991),c=n(4848),l=n(235),u=n(76),d=n(1159);class p extends i.ObjectManagementDialogBase{constructor(e,t){t.width="550px",super(e,t,s.BackupDatabaseDialogTitle(t.database),"BackupDatabase"),this._fileFilters=[{label:s.BackupFilesLabel,filters:["*.bak","*.tm"]}],this._backupFilePaths=[],this.dialogObject.okButton.label=s.BackupButtonLabel}get helpUrl(){return o.BackupDatabaseDocUrl}get isDirty(){return(this.useUrlMode?this._backupUrlInput.value?.length>0:this._backupFilePaths?.length>0)&&this._backupSetNameInput?.value?.length>0}get saveChangesTaskLabel(){return s.BackupDatabaseOperationDisplayName(this.objectInfo.name)}get opensEditorSeparately(){return!0}get startTaskOnApply(){return!1}get encryptionSupported(){return this._encryptorOptions.length>0}get useUrlMode(){return this._backupDestDropdown?this._backupDestDropdown.value===s.BackupUrlLabel:this.viewInfo.isManagedInstance}async initializeUI(){this._defaultBackupFolderPath=await this.objectManagementService.getBackupFolder(this.options.connectionUri),this._defaultBackupPathSeparator="/"===this._defaultBackupFolderPath[0]?"/":"\\",this._encryptorOptions=this.getEncryptorOptions();let e=await this.initializeGeneralSection(),t=this.initializeOptionsSection();this.formContainer.addItems([e,t])}async initializeGeneralSection(){let e=this.viewInfo.isManagedInstance,t=[];const n=[s.BackupFull];"master"!==this.objectInfo.name&&(n.push(s.BackupDifferential),this.objectInfo.recoveryModel!==s.RecoveryModelSimple&&n.push(s.BackupTransactionLog));let r=this.getDefaultBackupName();this._backupSetNameInput=this.createInputBox((()=>{}),{ariaLabel:r,inputType:"text",enabled:!0,value:r,width:a.DefaultInputWidth});let i=this.createLabelInputContainer(s.BackupNameLabel,this._backupSetNameInput);t.push(i);let o=this.createInputBox((()=>{}),{ariaLabel:this.objectInfo.recoveryModel,inputType:"text",enabled:!1,value:this.objectInfo.recoveryModel,width:a.DefaultInputWidth}),c=this.createLabelInputContainer(s.BackupRecoveryLabel,o);t.push(c),this._backupTypeDropdown=this.createDropdown(s.BackupTypeLabel,(async e=>{e===s.BackupTransactionLog?(this._truncateLogButton.enabled=!0,this._backupLogTailButton.enabled=!0):(this._truncateLogButton.enabled=!1,this._backupLogTailButton.enabled=!1)}),n,n[0],!e);let l=this.createLabelInputContainer(s.BackupTypeLabel,this._backupTypeDropdown);t.push(l),this._copyBackupCheckbox=this.createCheckbox(s.BackupCopyLabel,(()=>{}),e,!e),t.push(this._copyBackupCheckbox);const u=[s.BackupDiskLabel,s.BackupUrlLabel];let d=e?u[1]:u[0];this._oldDestination=d,this._backupDestDropdown=this.createDropdown(s.BackupToLabel,(e=>this.toggleBackupDestination(e)),u,d,!e);let p=this.createLabelInputContainer(s.BackupToLabel,this._backupDestDropdown);t.push(p),this._backupUrlInput=this.createInputBox((()=>{}),{inputType:"text",width:a.DefaultLongInputWidth});let h=this.createButton(s.BrowseText,s.BrowseText,(()=>this.onBrowseUrlButtonClicked()));h.width=a.DefaultButtonWidth,await h.updateCssStyles({"margin-left":"0px"});let f=this.createGroup(s.BackupToUrlLabel,[this._backupUrlInput,h],!1);this._urlInputContainer=this.modelView.modelBuilder.flexContainer().withItems([f]).component(),await this._urlInputContainer.updateCssStyles({"flex-flow":"column"}),t.push(this._urlInputContainer);let m=`${this._defaultBackupFolderPath}${this._defaultBackupPathSeparator}${r}.bak`;this._backupFilePaths.push(m),this._backupFilesTable=this.createTable(s.BackupFilesLabel,[s.BackupFilesLabel],[[m]]);let g={buttonAriaLabel:s.AddBackupFileAriaLabel,buttonHandler:async()=>await this.onAddFilesButtonClicked()},y={buttonAriaLabel:s.RemoveBackupFileAriaLabel,buttonHandler:async()=>await this.onRemoveFilesButtonClicked()},b=this.addButtonsForTable(this._backupFilesTable,g,y);return this._filesTableContainer=this.modelView.modelBuilder.flexContainer().withItems([this._backupFilesTable,b]).component(),await this._filesTableContainer.updateCssStyles({"flex-flow":"column"}),t.push(this._filesTableContainer),this.useUrlMode?this._filesTableContainer.display="none":this._urlInputContainer.display="none",this.createGroup(s.GeneralSectionHeader,t,!1)}initializeOptionsSection(){const e="BackupExistingMedia";this._appendExistingMediaButton=this.createRadioButton(s.AppendToExistingBackup,e,!0,(()=>{}),!this.useUrlMode),this._overwriteExistingMediaButton=this.createRadioButton(s.OverwriteExistingBackups,e,!1,(()=>{}),!this.useUrlMode),this._mediaNameInput=this.createInputBox((()=>{}),{enabled:!1});let t=this.createLabelInputContainer(s.BackupNewMediaName,this._mediaNameInput);this._mediaDescriptionInput=this.createInputBox((()=>{}),{enabled:!1});let n=this.createLabelInputContainer(s.BackupNewMediaDescription,this._mediaDescriptionInput),r=this.createGroup("",[t,n]);const i="BackupOverwriteMedia";this._existingMediaButton=this.createRadioButton(s.BackupToExistingMedia,i,!0,(async e=>{e&&!this.useUrlMode&&(this._appendExistingMediaButton.enabled=!0,this._overwriteExistingMediaButton.enabled=!0,this._mediaNameInput.enabled=!1,this._mediaDescriptionInput.enabled=!1,this.encryptionSupported&&(this._encryptCheckbox.enabled=!1,this._algorithmDropdown.enabled=!1,this._encryptorDropdown.enabled=!1))}),!this.useUrlMode);let o=this.createGroup("",[this._appendExistingMediaButton,this._overwriteExistingMediaButton]);this._newMediaButton=this.createRadioButton(s.BackupAndEraseExisting,i,!1,(async e=>{e&&!this.useUrlMode&&(this._appendExistingMediaButton.enabled=!1,this._overwriteExistingMediaButton.enabled=!1,this._mediaNameInput.enabled=!0,this._mediaDescriptionInput.enabled=!0,this.encryptionSupported&&(this._encryptCheckbox.enabled=!0,this._encryptCheckbox.checked&&(this._algorithmDropdown.enabled=!0,this._encryptorDropdown.enabled=!0)))}),!this.useUrlMode);let a=this.createGroup(s.BackupOverwriteMediaLabel,[this._existingMediaButton,o,this._newMediaButton,r],!1);this._verifyCheckbox=this.createCheckbox(s.VerifyBackupWhenFinished,(()=>{})),this._checksumCheckbox=this.createCheckbox(s.BackupPerformChecksum,(()=>{})),this._continueOnErrorCheckbox=this.createCheckbox(s.BackupContinueOnError,(()=>{}));let c=this.createGroup(s.BackupReliabilityLabel,[this._verifyCheckbox,this._checksumCheckbox,this._continueOnErrorCheckbox],!1),l=[];const u="BackupTransactionLog";this._truncateLogButton=this.createRadioButton(s.BackupTruncateLog,u,!0,(()=>{}),!1),l.push(this._truncateLogButton),this._backupLogTailButton=this.createRadioButton(s.BackupLogTail,u,!1,(()=>{}),!1),l.push(this._backupLogTailButton);let d=this.modelView.modelBuilder.text().withProps({value:s.TransactionLogNotice}).component();l.push(d);let p=this.createGroup(s.BackupTransactionLog,l,!1),y=[s.BackupDefaultSetting,s.CompressBackup,s.DontCompressBackup];this._compressionTypeDropdown=this.createDropdown(s.BackupSetCompression,(()=>{}),y,y[0]);let b=this.createLabelInputContainer(s.BackupSetCompression,this._compressionTypeDropdown),v=this.createGroup(s.BackupCompressionLabel,[b],!1),S=[];if(this._encryptCheckbox=this.createCheckbox(s.EncryptBackup,(async e=>{this.encryptionSupported&&(this._algorithmDropdown.enabled=e,this._encryptorDropdown.enabled=e)}),!1,this.useUrlMode&&this.encryptionSupported),S.push(this._encryptCheckbox),this.encryptionSupported){let e=[],t=[h,f,m,g];this._algorithmDropdown=this.createDropdown(s.BackupAlgorithm,(()=>{}),t,t[0],!1);let n=this.createLabelInputContainer(s.BackupAlgorithm,this._algorithmDropdown);e.push(n),this._encryptorDropdown=this.createDropdown(s.BackupCertificate,(()=>{}),this._encryptorOptions,this._encryptorOptions[0],!1);let r=this.createLabelInputContainer(s.BackupCertificate,this._encryptorDropdown);if(e.push(r),!this.useUrlMode){let t=this.modelView.modelBuilder.text().withProps({value:s.BackupEncryptNotice}).component();e.push(t)}let i=this.createGroup("",e);S.push(i)}else{let e=this.modelView.modelBuilder.text().withProps({value:s.NoEncryptorWarning}).component();S.push(e)}let w=this.createGroup(s.BackupEncryptionLabel,S,!1);return this.createGroup(s.OptionsSectionHeader,[a,c,p,v,w],!0,!0)}async onAddFilesButtonClicked(){try{let e=await r.window.openServerFileBrowserDialog(this.options.connectionUri,this._defaultBackupFolderPath,this._fileFilters);await this.addNewFilePath(e)}catch(e){this.dialogObject.message={text:(0,u.getErrorMessage)(e),level:r.window.MessageLevel.Error}}}async addNewFilePath(e){e&&(this._backupFilePaths.includes(e)?this.dialogObject.message={text:s.PathAlreadyAddedError,level:r.window.MessageLevel.Error}:(this._backupFilePaths.push(e),await this.updateTableData()))}async onRemoveFilesButtonClicked(){let e=this._backupFilesTable.selectedRows,t=0;for(let n of e){let e=n-t;this._backupFilePaths.splice(e,1),t++}await this.updateTableData()}async updateTableData(){await this._backupFilesTable.updateProperties({data:this._backupFilePaths.map((e=>[e])),height:(0,a.getTableHeight)(this._backupFilePaths.length,a.DefaultMinTableRowCount)}),this.onFormFieldChange()}async onBrowseUrlButtonClicked(){let e=`${this.getDefaultBackupName()}.bak`,t=await r.window.openBackupUrlBrowserDialog(this.options.connectionUri,e,!1);t&&(this._backupUrlInput.value=t)}async generateScript(){let e=this.createBackupInfo();if(!(await this.objectManagementService.backupDatabase(this.options.connectionUri,e,l.TaskExecutionMode.script)).result)throw new Error(s.ScriptingFailedError)}async saveChanges(e,t){let n=this.createBackupInfo();if(!(await this.objectManagementService.backupDatabase(this.options.connectionUri,n,l.TaskExecutionMode.execute)).result)throw new Error(s.BackupFailedError)}getEncryptorOptions(){let e=[];return this.objectInfo.backupEncryptors&&this.objectInfo.backupEncryptors.forEach((t=>{let n=0===t.encryptorType?s.BackupServerCertificate:s.BackupAsymmetricKey;e.push(`${t.encryptorName} (${n})`)})),e}getDefaultBackupName(){let e=new Date,t=`-${e.getFullYear()}${e.getMonth()+1}${e.getDate()}-${e.getHours()}-${e.getMinutes()}-${e.getSeconds()}`;return`${this.objectInfo.name}${t}`}createBackupInfo(){let e,t="",n=0;if(this._encryptCheckbox.checked&&this.encryptionSupported){if(!(0,c.isUndefinedOrNull)(this._encryptorDropdown.value)){let n=this._encryptorDropdown.value;e=n.substring(n.lastIndexOf("(")+1,n.lastIndexOf(")"))===s.BackupServerCertificate?0:1,t=n.substring(0,n.lastIndexOf("("))}n=this._algorithmDropdown.values.indexOf(this._algorithmDropdown.value)}let r=this.useUrlMode?[this._backupUrlInput.value]:this._backupFilePaths,i=this._newMediaButton.checked,o=this._overwriteExistingMediaButton.enabled&&this._overwriteExistingMediaButton.checked,a=this.getBackupDeviceType();return{databaseName:this.objectInfo.name,backupType:this.getBackupTypeNumber(),backupComponent:0,backupDeviceType:a,backupPathList:r,selectedFiles:void 0,backupsetName:this._backupSetNameInput.value,selectedFileGroup:void 0,backupPathDevices:this.getBackupMediaTypePairs(r),isCopyOnly:this._copyBackupCheckbox.checked,formatMedia:i,initialize:i||o,skipTapeHeader:i,mediaName:i?this._mediaNameInput.value:"",mediaDescription:i?this._mediaDescriptionInput.value:"",checksum:this._checksumCheckbox.checked,continueAfterError:this._continueOnErrorCheckbox.checked,logTruncation:!!this._truncateLogButton.enabled&&this._truncateLogButton.checked,tailLogBackup:!!this._backupLogTailButton.enabled&&this._backupLogTailButton.checked,retainDays:0,compressionOption:this._compressionTypeDropdown.values.indexOf(this._compressionTypeDropdown.value),verifyBackupRequired:this._verifyCheckbox.checked,encryptionAlgorithm:n,encryptorType:e,encryptorName:t}}getBackupTypeNumber(){let e;switch(this._backupTypeDropdown.value){case s.BackupFull:e=0;break;case s.BackupDifferential:e=1;break;case s.BackupTransactionLog:e=2}return e}getBackupDeviceType(){return this.useUrlMode?d.PhysicalDeviceType.Url:d.PhysicalDeviceType.Disk}getBackupMediaTypePairs(e){let t=this.useUrlMode?d.MediaDeviceType.Url:d.MediaDeviceType.File,n={};return e.forEach((e=>{n[e]=t})),n}async toggleBackupDestination(e){if(!this._oldDestination||this._oldDestination!==e){this._oldDestination=e;let t=e===s.BackupUrlLabel;this._existingMediaButton.enabled=!t,this._newMediaButton.enabled=!t;let n=this._existingMediaButton.checked;this._appendExistingMediaButton.enabled=n&&!t,this._overwriteExistingMediaButton.enabled=n&&!t,this._mediaNameInput.enabled=!n&&!t,this._mediaDescriptionInput.enabled=!n&&!t,t?(this._urlInputContainer.display="flex",this._filesTableContainer.display="none"):(this._urlInputContainer.display="none",this._filesTableContainer.display="flex")}}}t.BackupDatabaseDialog=p;const h="AES 128",f="AES 192",m="AES 256",g="Triple DES"},8344:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DatabaseDialog=void 0;const r=n(235),i=n(5824),o=n(8991),s=n(8430),a=n(1159),c=n(9523),l=n(4848),u=n(3598),d=n(1398);class p extends i.ObjectManagementDialogBase{constructor(e,t){super(e,t),this.optionsTabSectionsContainer=[],this.generalTabId="generalDatabaseId",this.filesTabId="filesDatabaseId",this.fileGroupsTabId="fileGroupsDatabaseId",this.newFileGroupTemporaryId=0,this.rowDataFileGroupsTableRows=[],this.filestreamDataFileGroupsTableRows=[],this.memoryoptimizedFileGroupsTableRows=[],this.optionsTabId="optionsDatabaseId",this.dscTabId="dscDatabaseId",this.dscTabSectionsContainer=[],this.setFocusToInput=void 0,this.queryStoreTabId="queryStoreTabId",this.queryStoreTabSectionsContainer=[]}get helpUrl(){return this.options.isNewObject?a.CreateDatabaseDocUrl:this.getDatabasePropertiesDocUrl()}getDatabasePropertiesDocUrl(){let e="";switch(this.activeTabId){case this.generalTabId:e=a.DatabaseGeneralPropertiesDocUrl;break;case this.filesTabId:e=a.DatabaseFilesPropertiesDocUrl;break;case this.fileGroupsTabId:e=a.DatabaseFileGroupsPropertiesDocUrl;break;case this.optionsTabId:e=a.DatabaseOptionsPropertiesDocUrl;break;case this.dscTabId:e=a.DatabaseScopedConfigurationPropertiesDocUrl;break;case this.queryStoreTabId:e=a.QueryStorePropertiesDocUrl}return e}async initializeUI(){if(this.options.isNewObject){let e=[];e.push(this.initializeGeneralSection()),e.push(this.initializeOptionsSection()),this.viewInfo.isAzureDB&&e.push(this.initializeConfigureSLOSection()),this.formContainer.addItems(e)}else{this.initializeBackupSection(),this.initializeDatabaseSection(),this.initializeOptionsGeneralSection(),this.initializeAutomaticSection(),(0,l.isUndefinedOrNull)(this.objectInfo.isLedgerDatabase)||this.initializeLedgerSection(),(0,l.isUndefinedOrNull)(this.objectInfo.pageVerify)||(0,l.isUndefinedOrNull)(this.objectInfo.targetRecoveryTimeInSec)||this.initializeRecoverySection(),this.initializeStateSection();const e=[];if(this.generalTab={title:s.GeneralSectionHeader,id:this.generalTabId,content:this.createGroup("",[this.databaseSection,this.backupSection],!1)},e.push(this.generalTab),(0,l.isUndefinedOrNull)(this.objectInfo.filegroups)||this.updateFileGroupsOptionsAndTableRows(),!(0,l.isUndefinedOrNull)(this.objectInfo.isFilesTabSupported)){const t=this.initializeFilesGeneralSection(),n=this.initializeDatabaseFilesSection();this.filesTab={title:s.FilesSectionHeader,id:this.filesTabId,content:this.createGroup("",[t,n],!1)},e.push(this.filesTab)}if(!(0,l.isUndefinedOrNull)(this.objectInfo.filegroups)){const t=await this.initializeRowsFileGroupSection(),n=await this.initializeFileStreamFileGroupSection(),r=await this.initializeMemoryOptimizedFileGroupSection();this.fileGroupsTab={title:s.FileGroupsSectionHeader,id:this.fileGroupsTabId,content:this.createGroup("",[t,n,r],!1)},e.push(this.fileGroupsTab)}this.optionsTab={title:s.OptionsSectionHeader,id:this.optionsTabId,content:this.createGroup("",this.optionsTabSectionsContainer,!1)},e.push(this.optionsTab),(0,l.isUndefinedOrNull)(this.objectInfo.databaseScopedConfigurations)||(await this.initializeDatabaseScopedConfigurationSection(),this.dscTabSectionsContainer.push(await this.initializeDscValueDropdownTypeSection()),this.dscTabSectionsContainer.push(await this.initializeDscValueInputTypeSection()),this.dscTab={title:s.DatabaseScopedConfigurationTabHeader,id:this.dscTabId,content:this.createGroup("",this.dscTabSectionsContainer,!1)},e.push(this.dscTab)),(0,l.isUndefinedOrNull)(this.objectInfo.queryStoreOptions)||(this.initializeQueryStoreGeneralSection(),this.initializeQueryStoreMonitoringSection(),this.initializeQueryStoreRetentionSection(),(0,l.isUndefinedOrNull)(this.objectInfo.queryStoreOptions.capturePolicyOptions)||this.initializeQueryStoreCapturePolicySection(),await this.initializeQueryStoreCurrentDiskStorageSection(),this.queryStoreTab={title:s.QueryStoreTabHeader,id:this.queryStoreTabId,content:this.createGroup("",this.queryStoreTabSectionsContainer,!1)},e.push(this.queryStoreTab));const t={title:"",tabs:e},n=this.modelView.modelBuilder.tabbedPanel().withTabs([t]).withLayout({orientation:r.TabOrientation.Vertical}).withProps({CSSStyles:{margin:"-10px 0px 0px -10px"}}).component();this.disposables.push(n.onTabChanged((async e=>{this.activeTabId=e}))),this.formContainer.addItem(n)}}async validateInput(){let e=await super.validateInput(),t=this.viewInfo.collationNames?.options;if(t?.length>0&&!t.some((e=>e.toLowerCase()===this.objectInfo.collationName?.toLowerCase()))&&e.push(s.CollationNotValidError(this.objectInfo.collationName??"")),this.objectInfo.filegroups?.length>0){let t=new Set;this.objectInfo.filegroups.map((function(n){""===n.name?e.push(s.EmptyFilegroupNameError):t.has(n.name)?e.push(s.FilegroupExistsError(n.name)):t.add(n.name)}))}return e}initializeGeneralSection(){let e=[];const t={ariaLabel:s.NameText,required:!0,maxLength:128};this.nameInput=this.createInputBox((async()=>{this.objectInfo.name=this.nameInput.value}),t),e.push(this.createLabelInputContainer(s.NameText,this.nameInput,!0));let n=this.viewInfo.loginNames?.options;if(n?.length>0){let t=this.viewInfo.loginNames.defaultValueIndex;this.objectInfo.owner=n[t];let r=this.createDropdown(s.OwnerText,(async()=>{this.objectInfo.owner=r.value}),n,n[t]);e.push(this.createLabelInputContainer(s.OwnerText,r))}return this.createGroup(s.GeneralSectionHeader,e,!1)}initializeOptionsSection(){let e=[],t=this.viewInfo.collationNames?.options;if(t?.length>0){let n=this.viewInfo.collationNames.defaultValueIndex;this.objectInfo.collationName=t[n];let r=this.createDropdown(s.CollationText,(async()=>{this.objectInfo.collationName=r.value}),t,t[n],!0,o.DefaultInputWidth,!0,!0);e.push(this.createLabelInputContainer(s.CollationText,r))}let n=this.viewInfo.recoveryModels?.options;if(n?.length>0){let t=this.viewInfo.recoveryModels.defaultValueIndex;this.objectInfo.recoveryModel=n[t];let r=this.createDropdown(s.RecoveryModelText,(async()=>{this.objectInfo.recoveryModel=r.value}),n,n[t]);e.push(this.createLabelInputContainer(s.RecoveryModelText,r))}let r=this.viewInfo.compatibilityLevels?.options;if(r?.length>0){let t=this.viewInfo.compatibilityLevels.defaultValueIndex;this.objectInfo.compatibilityLevel=r[t];let n=this.createDropdown(s.CompatibilityLevelText,(async()=>{this.objectInfo.compatibilityLevel=n.value}),r,r[t]);e.push(this.createLabelInputContainer(s.CompatibilityLevelText,n))}let i=this.viewInfo.containmentTypes?.options;if(i?.length>0){let t=this.viewInfo.containmentTypes.defaultValueIndex;this.objectInfo.containmentType=i[t];let n=this.createDropdown(s.ContainmentTypeText,(async()=>{this.objectInfo.containmentType=n.value}),i,i[t]);e.push(this.createLabelInputContainer(s.ContainmentTypeText,n))}if(!(0,l.isUndefinedOrNull)(this.objectInfo.isLedgerDatabase)){let t=this.createCheckbox(s.IsLedgerDatabaseText,(async()=>{this.objectInfo.isLedgerDatabase=t.checked}),this.objectInfo.isLedgerDatabase);e.push(t)}return this.createGroup(s.OptionsSectionHeader,e,!0,!0)}initializeBackupSection(){this.lastDatabaseBackupInput=this.createInputBox((async()=>{}),{ariaLabel:s.LastDatabaseBackupText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.lastDatabaseBackup});const e=this.createLabelInputContainer(s.LastDatabaseBackupText,this.lastDatabaseBackupInput);this.lastDatabaseLogBackupInput=this.createInputBox((async()=>{}),{ariaLabel:s.LastDatabaseLogBackupText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.lastDatabaseLogBackup});const t=this.createLabelInputContainer(s.LastDatabaseLogBackupText,this.lastDatabaseLogBackupInput);this.backupSection=this.createGroup(s.BackupSectionHeader,[e,t],!0)}initializeDatabaseSection(){this.nameInput=this.createInputBox((async()=>{}),{ariaLabel:s.NamePropertyText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.name});const e=this.createLabelInputContainer(s.NamePropertyText,this.nameInput);this.statusInput=this.createInputBox((async()=>{}),{ariaLabel:s.StatusText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.status});const t=this.createLabelInputContainer(s.StatusText,this.statusInput);this.ownerInput=this.createInputBox((async()=>{}),{ariaLabel:s.OwnerPropertyText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.owner});const n=this.createLabelInputContainer(s.OwnerPropertyText,this.ownerInput);this.dateCreatedInput=this.createInputBox((async()=>{}),{ariaLabel:s.DateCreatedText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.dateCreated});const r=this.createLabelInputContainer(s.DateCreatedText,this.dateCreatedInput);this.sizeInput=this.createInputBox((async()=>{}),{ariaLabel:s.SizeText,inputType:"text",enabled:this.options.isNewObject,value:(0,c.convertNumToTwoDecimalStringInMB)(this.objectInfo.sizeInMb)});const i=this.createLabelInputContainer(s.SizeText,this.sizeInput);this.spaceAvailabeInput=this.createInputBox((async()=>{}),{ariaLabel:s.SpaceAvailableText,inputType:"text",enabled:this.options.isNewObject,value:(0,c.convertNumToTwoDecimalStringInMB)(this.objectInfo.spaceAvailableInMb)});const o=this.createLabelInputContainer(s.SpaceAvailableText,this.spaceAvailabeInput);this.numberOfUsersInput=this.createInputBox((async()=>{}),{ariaLabel:s.NumberOfUsersText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.numberOfUsers.toString()});const a=this.createLabelInputContainer(s.NumberOfUsersText,this.numberOfUsersInput);this.memoryAllocatedInput=this.createInputBox((async()=>{}),{ariaLabel:s.MemoryAllocatedText,inputType:"text",enabled:this.options.isNewObject,value:(0,c.convertNumToTwoDecimalStringInMB)(this.objectInfo.memoryAllocatedToMemoryOptimizedObjectsInMb)});const l=this.createLabelInputContainer(s.MemoryAllocatedText,this.memoryAllocatedInput);this.memoryUsedInput=this.createInputBox((async()=>{}),{ariaLabel:s.MemoryUsedText,inputType:"text",enabled:this.options.isNewObject,value:(0,c.convertNumToTwoDecimalStringInMB)(this.objectInfo.memoryUsedByMemoryOptimizedObjectsInMb)});const u=this.createLabelInputContainer(s.MemoryUsedText,this.memoryUsedInput);this.collationInput=this.createInputBox((async()=>{}),{ariaLabel:s.CollationText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.collationName});const d=this.createLabelInputContainer(s.CollationText,this.collationInput);this.databaseSection=this.createGroup(s.DatabaseSectionHeader,[e,t,n,d,r,i,o,a,l,u],!0)}initializeFilesGeneralSection(){let e=[];this.nameInput=this.createInputBox((async()=>{}),{ariaLabel:s.DatabaseNameText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.name}),e.push(this.createLabelInputContainer(s.DatabaseNameText,this.nameInput));let t=this.viewInfo.loginNames?.options;if(t?.length>0){this.viewInfo.loginNames?.options.find((e=>e===this.objectInfo.owner))?t.splice(0,1):t[0]=this.objectInfo.owner;let n=this.createDropdown(s.OwnerText,(async()=>{this.objectInfo.owner=n.value}),t,this.objectInfo.owner);e.push(this.createLabelInputContainer(s.OwnerText,n))}return this.createGroup("",e,!1)}initializeDatabaseFilesSection(){this.databaseFilesTable=this.modelView.modelBuilder.table().withProps({columns:[{type:r.ColumnType.text,value:s.LogicalNameText},{type:r.ColumnType.text,value:s.FileTypeText},{type:r.ColumnType.text,value:s.FilegroupText},{type:r.ColumnType.text,value:s.SizeInMbText},{type:r.ColumnType.text,value:s.AutogrowthMaxsizeText},{type:r.ColumnType.text,value:s.PathText},{type:r.ColumnType.text,value:s.FileNameText}],data:this.objectInfo.files?.map((e=>this.convertToDataView(e))),height:(0,o.getTableHeight)(this.objectInfo.files?.length,o.DefaultMinTableRowCount,o.DefaultMaxTableRowCount),width:o.DefaultTableWidth,forceFitColumns:r.ColumnSizingMode.DataFit,CSSStyles:{"margin-left":"10px"}}).component();const e={buttonAriaLabel:s.AddButton,buttonHandler:e=>this.onAddDatabaseFilesButtonClicked(e)},t={buttonAriaLabel:s.RemoveButton,buttonHandler:()=>this.onRemoveDatabaseFilesButtonClicked()},n={buttonAriaLabel:s.EditButton,buttonHandler:e=>this.onEditDatabaseFilesButtonClicked(e)},i=this.addButtonsForTable(this.databaseFilesTable,e,t,n);return this.createGroup(s.DatabaseFilesText,[this.databaseFilesTable,i],!0)}convertToDataView(e){return[e.name,e.type,e.fileGroup,e.sizeInMb,e.isAutoGrowthEnabled?s.AutoGrowthValueStringGenerator(e.type!==s.FilestreamFileType,e.autoFileGrowth.toString(),1===e.autoFileGrowthType,e.maxSizeLimitInMb):s.NoneText,e.path,e.fileNameWithExtension]}async onAddDatabaseFilesButtonClicked(e){const t=await this.openDatabaseFileDialog(e);if(!(0,l.isUndefinedOrNull)(t)){this.objectInfo.files?.push(t);var n=this.objectInfo.files?.map((e=>this.convertToDataView(e)));await this.setTableData(this.databaseFilesTable,n,o.DefaultMaxTableRowCount),await this.updateFileGroupsTablesfileCount(t.type)}}async onEditDatabaseFilesButtonClicked(e){if(1===this.databaseFilesTable.selectedRows.length){const n=await this.openDatabaseFileDialog(e);if(!(0,l.isUndefinedOrNull)(n)){this.objectInfo.files[this.databaseFilesTable.selectedRows[0]]=n;var t=this.objectInfo.files?.map((e=>this.convertToDataView(e)));await this.setTableData(this.databaseFilesTable,t,o.DefaultMaxTableRowCount),await this.updateFileGroupsTablesfileCount(n.type)}}}async onRemoveDatabaseFilesButtonClicked(){if(1===this.databaseFilesTable.selectedRows.length){await this.updateFileGroupsTablesfileCount(this.objectInfo.files[this.databaseFilesTable.selectedRows[0]].type),this.objectInfo.files?.splice(this.databaseFilesTable.selectedRows[0],1);var e=this.objectInfo.files?.map((e=>this.convertToDataView(e)));await this.setTableData(this.databaseFilesTable,e,o.DefaultMaxTableRowCount)}}async updateFileGroupsTablesfileCount(e){if(e===s.RowsDataFileType){let e=this.getDeclarativeTableData(0);await this.setDeclarativeTableData(this.rowsFilegroupsTable,e)}else if(e===s.FilestreamFileType){let e=this.getDeclarativeTableData(2);await this.setDeclarativeTableData(this.filestreamFilegroupsTable,e),e=this.getTableData(3),await this.setTableData(this.memoryOptimizedFilegroupsTable,e)}}removeButtonEnabled(e){let t=!0;if(e===this.databaseFilesTable&&void 0!==this.databaseFilesTable.selectedRows){const e=this.objectInfo.files[this.databaseFilesTable.selectedRows[0]].id;1===this.databaseFilesTable.selectedRows.length&&1===e?t=!1:this.objectInfo.files[this.databaseFilesTable.selectedRows[0]].type===s.LogFiletype&&(t=!1,this.objectInfo.files.forEach((n=>{n.id!==e&&n.type===s.LogFiletype&&(t=!0)})))}else if(e===this.rowsFilegroupsTable&&this.rowsFilegroupsTable.selectedRow>-1){const e=this.rowDataFileGroupsTableRows[this.rowsFilegroupsTable.selectedRow];"PRIMARY"===e.name&&e.id>0&&(t=!1)}else e===this.filestreamFilegroupsTable&&this.filestreamFilegroupsTable.selectedRow>-1&&(this.serverFilestreamEnabled||(t=!1));return t}async openDatabaseFileDialog(e){const t=void 0!==this.databaseFilesTable.selectedRows?this.objectInfo.files[this.databaseFilesTable?.selectedRows[0]]:void 0;(0,l.isUndefinedOrNull)(t)||t.type!==s.FilestreamFileType||(t.autoFileGrowth=64);const n=e.ariaLabel===s.AddButton,r=e.ariaLabel===s.EditButton&&void 0===t.id,i=n?{id:void 0,name:"",type:s.RowsDataFileType,path:this.objectInfo.files[0].path,fileGroup:this.rowDatafileGroupsOptions.find((e=>"PRIMARY"===e)),fileNameWithExtension:"",sizeInMb:8,isAutoGrowthEnabled:!0,autoFileGrowth:64,autoFileGrowthType:0,maxSizeLimitInMb:100}:t,o=new u.DatabaseFileDialog({title:n||r?s.AddDatabaseFilesText:s.EditDatabaseFilesText(i.name),viewInfo:this.viewInfo,files:this.objectInfo.files,rowFilegroups:this.rowDatafileGroupsOptions,filestreamFilegroups:this.filestreamDatafileGroupsOptions,isNewFile:n,isEditingNewFile:r,databaseFile:i,defaultFileConstants:{defaultFileSizeInMb:8,defaultFileGrowthInMb:64,defaultFileGrowthInPercent:10,defaultMaxFileSizeLimitedToInMb:100},connectionUri:this.options.connectionUri},this.objectManagementService);return await o.open(),await o.waitForClose()}async initializeRowsFileGroupSection(){const e=this.getDeclarativeTableData(0);this.rowsFilegroupsTable=this.modelView.modelBuilder.declarativeTable().withProps({enableRowSelection:!0,columns:[{valueType:r.DeclarativeDataType.string,width:120,isReadOnly:!0,displayName:s.NameText,headerCssStyles:o.tableHeader},{valueType:r.DeclarativeDataType.string,width:60,isReadOnly:!0,displayName:s.FilesText,headerCssStyles:o.tableHeader},{valueType:r.DeclarativeDataType.boolean,width:80,displayName:s.ReadOnlyText,isReadOnly:!1,headerCssStyles:o.tableHeader},{valueType:r.DeclarativeDataType.boolean,width:80,displayName:s.DefaultText,isReadOnly:!1,headerCssStyles:o.tableHeader},{valueType:r.DeclarativeDataType.boolean,width:110,displayName:s.AutogrowAllFilesText,isReadOnly:!1,headerCssStyles:o.tableHeader}],width:o.DefaultTableWidth,height:(0,o.getTableHeight)(e.length,o.DefaultMinTableRowCount,o.DefaultMaxTableRowCount),dataValues:e,CSSStyles:{"margin-left":"10px"}}).component(),this.rowsFilegroupNameContainer=await this.getFilegroupNameGroupDeclarative(this.rowsFilegroupsTable,0);const t={buttonAriaLabel:s.AddFilegroupText,buttonHandler:()=>this.onAddDatabaseFileGroupsButtonClickedDeclarative(this.rowsFilegroupsTable)},n={buttonAriaLabel:s.RemoveButton,buttonHandler:()=>this.onRemoveDatabaseFileGroupsButtonClickedDeclarative(this.rowsFilegroupsTable)};return this.rowsFileGroupButtonContainer=this.addButtonsForDeclarativeTable(this.rowsFilegroupsTable,t,n),this.disposables.push(this.rowsFilegroupsTable.onDataChanged((async e=>{if(e.row>-1){let t=this.rowDataFileGroupsTableRows[e.row];2===e.column&&(t.isReadOnly=e.value),3===e.column&&this.updateFilegroupsDefaultColumnValuesDeclarative(e,t,0),4===e.column&&(t.autogrowAllFiles=e.value);let n=this.getDeclarativeTableData(0);await this.setDeclarativeTableData(this.rowsFilegroupsTable,n),this.onFormFieldChange()}})),this.rowsFilegroupsTable.onRowSelected((()=>{if(this.rowsFilegroupsTable.selectedRow>-1){const e=this.rowDataFileGroupsTableRows[this.rowsFilegroupsTable.selectedRow];this.rowsFilegroupNameContainer.display=e.id<0?"inline-flex":"none",this.rowsFilegroupNameInput.value=e.name,this.onFormFieldChange()}}))),this.createGroup(s.RowsFileGroupsSectionText,[this.rowsFilegroupsTable,this.rowsFilegroupNameContainer,this.rowsFileGroupButtonContainer],!0)}async initializeFileStreamFileGroupSection(){const e=this.getDeclarativeTableData(2);this.filestreamFilegroupsTable=this.modelView.modelBuilder.declarativeTable().withProps({enableRowSelection:!0,columns:[{valueType:r.DeclarativeDataType.string,width:145,isReadOnly:!0,displayName:s.NameText,headerCssStyles:o.tableHeader},{valueType:r.DeclarativeDataType.string,width:145,isReadOnly:!0,displayName:s.FilestreamFilesText,headerCssStyles:o.tableHeader},{valueType:r.DeclarativeDataType.boolean,width:80,displayName:s.ReadOnlyText,isReadOnly:!1,headerCssStyles:o.tableHeader},{valueType:r.DeclarativeDataType.boolean,width:80,displayName:s.DefaultText,isReadOnly:!1,headerCssStyles:o.tableHeader}],width:o.DefaultTableWidth,height:(0,o.getTableHeight)(e.length,o.DefaultMinTableRowCount,o.DefaultMaxTableRowCount),dataValues:e,CSSStyles:{"margin-left":"10px"}}).component(),this.filestreamFilegroupNameContainer=await this.getFilegroupNameGroupDeclarative(this.filestreamFilegroupsTable,2);const t={buttonAriaLabel:s.AddFilegroupText,buttonHandler:()=>this.onAddDatabaseFileGroupsButtonClickedDeclarative(this.filestreamFilegroupsTable),enabled:this.serverFilestreamEnabled},n={buttonAriaLabel:s.RemoveButton,buttonHandler:()=>this.onRemoveDatabaseFileGroupsButtonClickedDeclarative(this.filestreamFilegroupsTable)};return this.filestreamFileGroupButtonContainer=this.addButtonsForDeclarativeTable(this.filestreamFilegroupsTable,t,n),this.disposables.push(this.filestreamFilegroupsTable.onDataChanged((async e=>{if(e.row>-1){let t=this.filestreamDataFileGroupsTableRows[e.row];2===e.column&&(t.isReadOnly=e.value),3===e.column&&this.updateFilegroupsDefaultColumnValuesDeclarative(e,t,2);let n=this.getDeclarativeTableData(2);await this.setDeclarativeTableData(this.filestreamFilegroupsTable,n),this.onFormFieldChange()}})),this.filestreamFilegroupsTable.onRowSelected((()=>{if(this.filestreamFilegroupsTable.selectedRow>-1){const e=this.filestreamDataFileGroupsTableRows[this.filestreamFilegroupsTable.selectedRow];this.filestreamFilegroupNameContainer.display=e.id<0?"inline-flex":"none",this.filestreamFilegroupNameInput.value=e.name,this.onFormFieldChange()}}))),this.createGroup(s.FileStreamFileGroupsSectionText,[this.filestreamFilegroupsTable,this.filestreamFilegroupNameContainer,this.filestreamFileGroupButtonContainer],!0)}async initializeMemoryOptimizedFileGroupSection(){const e=this.getTableData(3);this.memoryOptimizedFilegroupsTable=this.modelView.modelBuilder.table().withProps({columns:[{type:r.ColumnType.text,value:s.NameText},{type:r.ColumnType.text,value:s.FilestreamFilesText}],data:e,height:(0,o.getTableHeight)(e.length,o.DefaultMinTableRowCount,o.DefaultMaxTableRowCount),width:o.DefaultTableWidth,forceFitColumns:r.ColumnSizingMode.DataFit,CSSStyles:{"margin-left":"10px"}}).component(),this.memoryOptimizedFilegroupNameContainer=await this.getFilegroupNameGroup(this.memoryOptimizedFilegroupsTable,3);const t={buttonAriaLabel:s.AddFilegroupText,buttonHandler:()=>this.onAddDatabaseFileGroupsButtonClicked(this.memoryOptimizedFilegroupsTable),enabled:this.memoryoptimizedFileGroupsTableRows.length<1},n={buttonAriaLabel:s.RemoveButton,buttonHandler:()=>this.onRemoveDatabaseFileGroupsButtonClicked(this.memoryOptimizedFilegroupsTable)};return this.memoryOptimizedFileGroupButtonContainer=this.addButtonsForTable(this.memoryOptimizedFilegroupsTable,t,n),this.disposables.push(this.memoryOptimizedFilegroupsTable.onRowSelected((()=>{if(1===this.memoryOptimizedFilegroupsTable.selectedRows.length){const e=this.memoryoptimizedFileGroupsTableRows[this.memoryOptimizedFilegroupsTable.selectedRows[0]];this.memoryOptimizedFilegroupNameContainer.display=e.id<0?"inline-flex":"none",this.memoryOptimizedFilegroupNameInput.value=e.name,this.onFormFieldChange()}}))),this.createGroup(s.MemoryOptimizedFileGroupsSectionText,[this.memoryOptimizedFilegroupsTable,this.memoryOptimizedFilegroupNameContainer,this.memoryOptimizedFileGroupButtonContainer],!0)}addButtonEnabled(e){let t=!0;return e===this.memoryOptimizedFilegroupsTable&&(t=this.memoryoptimizedFileGroupsTableRows.length<1),t}updateFilegroupsDefaultColumnValuesDeclarative(e,t,n){e.value?this.objectInfo.filegroups.forEach((r=>{r.type===n&&(r.isDefault=r.name===t.name&&r.id===t.id?e.value:!e.value)})):t.isDefault=e.value}async onAddDatabaseFileGroupsButtonClicked(e){let t,n={id:--this.newFileGroupTemporaryId,name:"",type:void 0,isReadOnly:!1,isDefault:!1,autogrowAllFiles:!1};e===this.memoryOptimizedFilegroupsTable&&this.memoryoptimizedFileGroupsTableRows.length<1&&(n.type=3,this.objectInfo.filegroups?.push(n),t=this.getTableData(3)),void 0!==t&&(this.updateFileGroupsOptionsAndTableRows(),await this.setTableData(e,t,o.DefaultMaxTableRowCount),e.setActiveCell(e.data?.length-1,0))}async onAddDatabaseFileGroupsButtonClickedDeclarative(e){let t,n={id:--this.newFileGroupTemporaryId,name:"",type:void 0,isReadOnly:!1,isDefault:!1,autogrowAllFiles:!1};e===this.rowsFilegroupsTable?(n.type=0,n.isReadOnly=!1,n.isDefault=!1,n.autogrowAllFiles=!1,this.objectInfo.filegroups?.push(n),t=this.getDeclarativeTableData(0)):e===this.filestreamFilegroupsTable&&(n.type=2,n.isReadOnly=!1,n.isDefault=!1,this.objectInfo.filegroups?.push(n),t=this.getDeclarativeTableData(2)),t&&(this.updateFileGroupsOptionsAndTableRows(),await this.setDeclarativeTableData(e,t,o.DefaultMaxTableRowCount),e.selectedRow=e.dataValues?.length-1)}updateFileGroupsOptionsAndTableRows(){let e;this.rowDataFileGroupsTableRows=this.objectInfo.filegroups?.filter((e=>0===e.type)),this.filestreamDataFileGroupsTableRows=this.objectInfo.filegroups?.filter((e=>2===e.type)),this.memoryoptimizedFileGroupsTableRows=this.objectInfo.filegroups?.filter((e=>3===e.type)),this.filestreamDatafileGroupsOptions=this.objectInfo.filegroups?.filter((e=>2===e.type||3===e.type)).map((e=>e.name)),this.rowDatafileGroupsOptions=this.objectInfo.filegroups?.filter((e=>0===e.type)).map((e=>e.name)),-1!==(e=this.rowDatafileGroupsOptions.indexOf("PRIMARY"))&&this.rowDatafileGroupsOptions.unshift(this.rowDatafileGroupsOptions.splice(e,1)[0])}async onRemoveDatabaseFileGroupsButtonClicked(e){if(e===this.memoryOptimizedFilegroupsTable&&1===this.memoryOptimizedFilegroupsTable.selectedRows.length){const e=this.objectInfo.filegroups.indexOf(this.memoryoptimizedFileGroupsTableRows[this.memoryOptimizedFilegroupsTable.selectedRows[0]]);this.objectInfo.filegroups?.splice(e,1);var t=this.getTableData(3);this.memoryOptimizedFilegroupNameContainer.display="none"}this.updateFileGroupsOptionsAndTableRows(),await this.setTableData(e,t),void 0!==e.selectedRows&&void 0!==e.selectedRows[0]&&e.selectedRows[0]<e.data?.length&&e.setActiveCell(e.selectedRows[0],0)}async onRemoveDatabaseFileGroupsButtonClickedDeclarative(e){if(e===this.rowsFilegroupsTable){if(this.rowsFilegroupsTable.selectedRow>-1){const e=this.objectInfo.filegroups.indexOf(this.rowDataFileGroupsTableRows[this.rowsFilegroupsTable.selectedRow]);this.objectInfo.filegroups?.splice(e,1);var t=this.getDeclarativeTableData(0);this.rowsFilegroupNameContainer.display="none"}}else if(e===this.filestreamFilegroupsTable&&this.filestreamFilegroupsTable.selectedRow>-1){const e=this.objectInfo.filegroups.indexOf(this.filestreamDataFileGroupsTableRows[this.filestreamFilegroupsTable.selectedRow]);this.objectInfo.filegroups?.splice(e,1),t=this.getDeclarativeTableData(2),this.filestreamFilegroupNameContainer.display="none"}this.updateFileGroupsOptionsAndTableRows();let n=e.selectedRow;await this.setDeclarativeTableData(e,t),n>-1&&n<e.dataValues?.length&&(e.selectedRow=n)}async getFilegroupNameGroup(e,t){const n=this.getFilegroupNameInput(e,t);e===this.memoryOptimizedFilegroupsTable&&(this.memoryOptimizedFilegroupNameInput=n);let r=this.createLabelInputContainer(s.fileGroupsNameInput,[n],!1);return await r.updateCssStyles({margin:"0px 0px -10px 10px"}),r.display="none",r}async getFilegroupNameGroupDeclarative(e,t){const n=this.getFilegroupNameInputDeclarative(e,t);e===this.rowsFilegroupsTable?this.rowsFilegroupNameInput=n:e===this.filestreamFilegroupsTable&&(this.filestreamFilegroupNameInput=n);let r=this.createLabelInputContainer(s.fileGroupsNameInput,[n],!1);return await r.updateCssStyles({margin:"0px 0px -10px 10px"}),r.display="none",r}getFilegroupNameInput(e,t){return this.createInputBox((async n=>{if(1===e.selectedRows.length){let r=null;if(e===this.memoryOptimizedFilegroupsTable&&(r=this.memoryoptimizedFileGroupsTableRows[e.selectedRows[0]]),null!==r&&r.id<0){r.name=n;let i=this.getTableData(t);await this.setTableData(e,i),this.updateFileGroupsOptionsAndTableRows()}}}),{ariaLabel:s.fileGroupsNameInput,inputType:"text",enabled:!0,value:"",width:o.DefaultInputWidth})}getFilegroupNameInputDeclarative(e,t){return this.createInputBox((async n=>{if(e.selectedRow>-1){let r=null;if(e===this.rowsFilegroupsTable?r=this.rowDataFileGroupsTableRows[e.selectedRow]:e===this.filestreamFilegroupsTable&&(r=this.filestreamDataFileGroupsTableRows[e.selectedRow]),r?.id<0){r.name=n;let i=this.getDeclarativeTableData(t);await this.setDeclarativeTableData(e,i),this.updateFileGroupsOptionsAndTableRows()}}}),{ariaLabel:s.fileGroupsNameInput,inputType:"text",enabled:!0,value:"",width:o.DefaultInputWidth})}getTableData(e){let t=[];return this.objectInfo.filegroups?.map((n=>{const r=this.objectInfo.files?.filter((e=>e.fileGroup===n.name)).length;3===n.type&&n.type===e&&t.push([n.name,r])})),t}getDeclarativeTableData(e){let t=[];return this.objectInfo.filegroups?.map((n=>{const r=this.objectInfo.files?.filter((e=>e.fileGroup===n.name)).length;0===e&&n.type===e?t.push([{value:n.name,style:o.tableRow},{value:r,style:o.tableRow},{value:n.isReadOnly,enabled:"PRIMARY"!==n.name&&r>0,style:o.tableRow},{value:n.isDefault,enabled:r>0,style:o.tableRow},{value:n.autogrowAllFiles,enabled:r>0,style:o.tableRow}]):2===n.type&&n.type===e&&t.push([{value:n.name,style:o.tableRow},{value:r,style:o.tableRow},{value:n.isReadOnly,enabled:r>0&&this.serverFilestreamEnabled,style:o.tableRow},{value:n.isDefault,enabled:this.serverFilestreamEnabled,style:o.tableRow}])})),t}get serverFilestreamEnabled(){return null!==this.viewInfo.serverFilestreamAccessLevel&&0!==this.viewInfo.serverFilestreamAccessLevel}initializeOptionsGeneralSection(){let e=[],t=this.viewInfo.collationNames.options,n=this.createDropdown(s.CollationText,(async e=>{this.objectInfo.collationName=e}),t,this.objectInfo.collationName,!0,o.DefaultInputWidth,!0,!0);e.push(this.createLabelInputContainer(s.CollationText,n));let r=this.viewInfo.recoveryModels.options,i=0===r.length?[this.objectInfo.recoveryModel]:r,a=0!==r.length,c=this.createDropdown(s.RecoveryModelText,(async e=>{this.objectInfo.recoveryModel=e}),i,this.objectInfo.recoveryModel,a);e.push(this.createLabelInputContainer(s.RecoveryModelText,c));let l=this.viewInfo.compatibilityLevels.options,u=this.createDropdown(s.CompatibilityLevelText,(async e=>{this.objectInfo.compatibilityLevel=e}),l,this.objectInfo.compatibilityLevel);e.push(this.createLabelInputContainer(s.CompatibilityLevelText,u));let d=this.viewInfo.containmentTypes.options;i=0===d.length?[this.objectInfo.containmentType]:d,a=0!==d.length;let p=this.createDropdown(s.ContainmentTypeText,(async e=>{this.objectInfo.containmentType=e}),i,this.objectInfo.containmentType,a);e.push(this.createLabelInputContainer(s.ContainmentTypeText,p));const h=this.createGroup("",e,!0,!0);this.optionsTabSectionsContainer.push(h)}initializeAutomaticSection(){this.autoCreateIncrementalStatisticsInput=this.createCheckbox(s.AutoCreateIncrementalStatisticsText,(async e=>{this.objectInfo.autoCreateIncrementalStatistics=e}),this.objectInfo.autoCreateIncrementalStatistics),this.autoCreateStatisticsInput=this.createCheckbox(s.AutoCreateStatisticsText,(async e=>{this.objectInfo.autoCreateStatistics=e}),this.objectInfo.autoCreateStatistics),this.autoShrinkInput=this.createCheckbox(s.AutoShrinkText,(async e=>{this.objectInfo.autoShrink=e}),this.objectInfo.autoShrink),this.autoUpdateStatisticsInput=this.createCheckbox(s.AutoUpdateStatisticsText,(async e=>{this.objectInfo.autoUpdateStatistics=e}),this.objectInfo.autoUpdateStatistics),this.autoUpdateStatisticsAsynchronouslyInput=this.createCheckbox(s.AutoUpdateStatisticsAsynchronouslyText,(async e=>{this.objectInfo.autoUpdateStatisticsAsynchronously=e}),this.objectInfo.autoUpdateStatisticsAsynchronously);const e=this.createGroup(s.AutomaticSectionHeader,[this.autoCreateIncrementalStatisticsInput,this.autoCreateStatisticsInput,this.autoShrinkInput,this.autoUpdateStatisticsInput,this.autoUpdateStatisticsAsynchronouslyInput],!0);this.optionsTabSectionsContainer.push(e)}initializeLedgerSection(){this.isLedgerDatabaseInput=this.createCheckbox(s.IsLedgerDatabaseText,(async()=>{}),this.objectInfo.isLedgerDatabase,!1);const e=this.createGroup(s.LedgerSectionHeader,[this.isLedgerDatabaseInput],!0);this.optionsTabSectionsContainer.push(e)}initializeRecoverySection(){this.pageVerifyInput=this.createDropdown(s.PageVerifyText,(async e=>{this.objectInfo.pageVerify=e}),this.viewInfo.pageVerifyOptions,this.objectInfo.pageVerify,!0);const e=this.createLabelInputContainer(s.PageVerifyText,this.pageVerifyInput),t={ariaLabel:s.TargetRecoveryTimeInSecondsText,inputType:"number",enabled:!0,min:0};this.targetRecoveryTimeInSecInput=this.createInputBox((async e=>{this.objectInfo.targetRecoveryTimeInSec=Number(e)}),t);const n=this.createLabelInputContainer(s.TargetRecoveryTimeInSecondsText,this.targetRecoveryTimeInSecInput),r=this.createGroup(s.RecoverySectionHeader,[e,n],!0);this.optionsTabSectionsContainer.push(r)}initializeStateSection(){let e=[];(0,l.isUndefinedOrNull)(this.objectInfo.databaseReadOnly)||(this.databaseReadOnlyInput=this.createCheckbox(s.DatabaseReadOnlyText,(async e=>{this.objectInfo.databaseReadOnly=e}),this.objectInfo.databaseReadOnly),e.push(this.databaseReadOnlyInput)),this.statusInput=this.createInputBox((async()=>{}),{ariaLabel:s.StatusText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.status}),e.push(this.createLabelInputContainer(s.DatabaseStateText,this.statusInput)),this.encryptionEnabledInput=this.createCheckbox(s.EncryptionEnabledText,(async e=>{this.objectInfo.encryptionEnabled=e}),this.objectInfo.encryptionEnabled),e.push(this.encryptionEnabledInput),(0,l.isUndefinedOrNull)(this.objectInfo.restrictAccess)||(this.restrictAccessInput=this.createDropdown(s.RestrictAccessText,(async e=>{this.objectInfo.restrictAccess=e}),this.viewInfo.restrictAccessOptions,this.objectInfo.restrictAccess,!0),e.push(this.createLabelInputContainer(s.RestrictAccessText,this.restrictAccessInput)));const t=this.createGroup(s.StateSectionHeader,e,!0);this.optionsTabSectionsContainer.push(t)}async initializeDatabaseScopedConfigurationSection(){let e=new Set([11,12,25,6,21]);const t={type:r.ColumnType.text,value:s.DatabaseScopedOptionsColumnHeader,width:220},n={type:r.ColumnType.text,value:s.ValueForPrimaryColumnHeader,width:105},i={type:r.ColumnType.text,value:s.ValueForSecondaryColumnHeader,width:105};this.dscTable=this.modelView.modelBuilder.table().withProps({columns:[t,n,i],data:this.objectInfo.databaseScopedConfigurations.map((t=>[t.name.toLocaleUpperCase(),t.valueForPrimary,e.has(t.id)?s.NotAvailableText:t.valueForSecondary])),height:(0,o.getTableHeight)(this.objectInfo.databaseScopedConfigurations.length,1,40),width:o.DefaultTableWidth}).component(),this.dscTabSectionsContainer.push(this.createGroup("",[this.dscTable],!0)),this.disposables.push(this.dscTable.onRowSelected((async()=>{this.currentRowId!==this.dscTable.selectedRows[0]&&(this.currentRowId=this.dscTable.selectedRows[0],await this.validateUpdateToggleDscPrimaryAndSecondaryOptions()),(0,l.isUndefinedOrNull)(this.setFocusToInput)||await this.setFocusToInput.focus()})))}async validateUpdateToggleDscPrimaryAndSecondaryOptions(){this.currentRowObjectInfo=this.objectInfo.databaseScopedConfigurations[this.currentRowId];const e=this.currentRowObjectInfo.valueForPrimary===this.currentRowObjectInfo.valueForSecondary;await this.hideDropdownAndInputSections(),11===this.currentRowObjectInfo.id||12===this.currentRowObjectInfo.id?(await this.dscPrimaryValueDropdown.updateCssStyles({display:"inline-flex"}),JSON.stringify(this.valueForPrimaryDropdown.values)===JSON.stringify(this.viewInfo.dscElevateOptions)&&this.valueForPrimaryDropdown.value===this.currentRowObjectInfo.valueForPrimary||await this.valueForPrimaryDropdown.updateProperties({values:this.viewInfo.dscElevateOptions,value:this.currentRowObjectInfo.valueForPrimary})):1===this.currentRowObjectInfo.id?(await this.showInputSection(e),await this.valueForPrimaryInput.updateProperties({value:this.currentRowObjectInfo.valueForPrimary,max:32767}),await this.valueForSecondaryInput.updateProperties({value:this.currentRowObjectInfo.valueForSecondary,max:32767})):25===this.currentRowObjectInfo.id?(await this.dscPrimaryValueInput.updateCssStyles({display:"inline-flex"}),await this.valueForPrimaryInput.updateProperties({value:this.currentRowObjectInfo.valueForPrimary,max:71582})):38===this.currentRowObjectInfo.id?(await this.showDropdownsSection(e),JSON.stringify(this.valueForPrimaryDropdown.values)===JSON.stringify([this.viewInfo.propertiesOnOffOptions[1]])&&this.valueForPrimaryDropdown.value===this.currentRowObjectInfo.valueForPrimary||await this.valueForPrimaryDropdown.updateProperties({values:[this.viewInfo.propertiesOnOffOptions[1]],value:this.currentRowObjectInfo.valueForPrimary,editable:!0}),JSON.stringify(this.valueForSecondaryDropdown.values)===JSON.stringify([this.viewInfo.propertiesOnOffOptions[1]])&&this.valueForSecondaryDropdown.value===this.currentRowObjectInfo.valueForSecondary||await this.valueForSecondaryDropdown.updateProperties({values:[this.viewInfo.propertiesOnOffOptions[1]],value:this.currentRowObjectInfo.valueForSecondary,editable:!0})):6===this.currentRowObjectInfo.id||21===this.currentRowObjectInfo.id?(await this.dscPrimaryValueDropdown.updateCssStyles({display:"inline-flex"}),JSON.stringify(this.valueForPrimaryDropdown.values)===JSON.stringify(this.viewInfo.propertiesOnOffOptions)&&this.valueForPrimaryDropdown.value===this.currentRowObjectInfo.valueForPrimary||await this.valueForPrimaryDropdown.updateProperties({values:this.viewInfo.propertiesOnOffOptions,value:this.currentRowObjectInfo.valueForPrimary})):26===this.currentRowObjectInfo.id?(await this.showDropdownsSection(e),JSON.stringify(this.valueForPrimaryDropdown.values)===JSON.stringify(this.viewInfo.dscEnableDisableOptions)&&this.valueForPrimaryDropdown.value===this.currentRowObjectInfo.valueForPrimary||await this.valueForPrimaryDropdown.updateProperties({values:this.viewInfo.dscEnableDisableOptions,value:this.currentRowObjectInfo.valueForPrimary}),JSON.stringify(this.valueForSecondaryDropdown.values)===JSON.stringify(this.viewInfo.dscEnableDisableOptions)&&this.valueForSecondaryDropdown.value===this.currentRowObjectInfo.valueForSecondary||await this.valueForSecondaryDropdown.updateProperties({values:this.viewInfo.dscEnableDisableOptions,value:this.currentRowObjectInfo.valueForSecondary})):(await this.showDropdownsSection(e),JSON.stringify(this.valueForPrimaryDropdown.values)===JSON.stringify(this.viewInfo.propertiesOnOffOptions)&&this.valueForPrimaryDropdown.value===this.currentRowObjectInfo.valueForPrimary||await this.valueForPrimaryDropdown.updateProperties({values:this.viewInfo.propertiesOnOffOptions,value:this.currentRowObjectInfo.valueForPrimary}),JSON.stringify(this.valueForSecondaryDropdown.values)===JSON.stringify(this.viewInfo.propertiesOnOffOptions)&&this.valueForSecondaryDropdown.value===this.currentRowObjectInfo.valueForSecondary||await this.valueForSecondaryDropdown.updateProperties({values:this.viewInfo.propertiesOnOffOptions,value:this.currentRowObjectInfo.valueForSecondary}))}async initializeDscValueInputTypeSection(){this.valueForPrimaryInput=this.createInputBox((async e=>{this.currentRowObjectInfo.valueForPrimary!==e&&(this.currentRowObjectInfo.valueForPrimary=e,this.dscTable.data[this.currentRowId][1]!==e&&(this.dscTable.data[this.currentRowId][1]=e),this.setSecondaryCheckboxForInputType.checked&&25!==this.currentRowObjectInfo.id&&(this.currentRowObjectInfo.valueForSecondary=e,this.dscTable.data[this.currentRowId][2]=e),await this.updateDscTable(this.dscTable.data,this.valueForPrimaryInput))}),{ariaLabel:s.ValueForPrimaryColumnHeader,inputType:"number",enabled:!0,value:"",width:150,min:0}),this.dscPrimaryValueInput=this.createLabelInputContainer(s.ValueForPrimaryColumnHeader,this.valueForPrimaryInput),this.dscPrimaryValueInput.display="none",this.setSecondaryCheckboxForInputType=this.createCheckbox(s.SetSecondaryText,(async e=>{await this.dscSecondaryValueInput.updateCssStyles({display:e?"none":"inline-flex"}),this.currentRowObjectInfo.valueForSecondary=this.currentRowObjectInfo.valueForPrimary,await this.valueForSecondaryInput.updateProperties({value:this.currentRowObjectInfo.valueForSecondary}),this.dscTable.data[this.currentRowId][2]!==this.currentRowObjectInfo.valueForSecondary&&(this.dscTable.data[this.currentRowId][2]=this.currentRowObjectInfo.valueForSecondary,await this.updateDscTable(this.dscTable.data))}),!0),this.setSecondaryCheckboxForInputType.display="none",this.valueForSecondaryInput=this.createInputBox((async e=>{this.currentRowObjectInfo.valueForSecondary=e,this.dscTable.data[this.currentRowId][2]!==e&&(this.dscTable.data[this.currentRowId][2]=e,await this.updateDscTable(this.dscTable.data,this.valueForSecondaryInput))}),{ariaLabel:s.ValueForSecondaryColumnHeader,inputType:"number",enabled:!0,value:"",width:150,min:0}),this.dscSecondaryValueInput=this.createLabelInputContainer(s.ValueForSecondaryColumnHeader,this.valueForSecondaryInput),this.dscSecondaryValueInput.display="none";const e=this.createGroup("",[this.dscPrimaryValueInput,this.setSecondaryCheckboxForInputType,this.dscSecondaryValueInput],!1,!0);return await e.updateCssStyles({"margin-top":"-30px"}),e}async initializeDscValueDropdownTypeSection(){const e=[6,11,12,21];return this.valueForPrimaryDropdown=this.createDropdown(s.ValueForPrimaryColumnHeader,(async t=>{this.currentRowObjectInfo.valueForPrimary!==t&&(this.currentRowObjectInfo.valueForPrimary=t,this.dscTable.data[this.currentRowId][1]=t,this.setSecondaryCheckboxForDropdowns.checked&&!e.includes(this.currentRowObjectInfo.id)&&(this.currentRowObjectInfo.valueForSecondary=t,this.dscTable.data[this.currentRowId][2]=t),await this.updateDscTable(this.dscTable.data))}),[],"",!0,150),this.dscPrimaryValueDropdown=this.createLabelInputContainer(s.ValueForPrimaryColumnHeader,this.valueForPrimaryDropdown),this.dscPrimaryValueDropdown.display="none",this.setSecondaryCheckboxForDropdowns=this.createCheckbox(s.SetSecondaryText,(async e=>{await this.dscSecondaryValueDropdown.updateCssStyles({display:e?"none":"inline-flex"}),this.currentRowObjectInfo.valueForSecondary=this.currentRowObjectInfo.valueForPrimary,await this.valueForSecondaryDropdown.updateProperties({value:this.currentRowObjectInfo.valueForSecondary})}),!0),this.setSecondaryCheckboxForDropdowns.display="none",this.valueForSecondaryDropdown=this.createDropdown(s.ValueForSecondaryColumnHeader,(async e=>{(0,l.isUndefinedOrNull)(e)||(this.currentRowObjectInfo.valueForSecondary=e,this.dscTable.data[this.currentRowId][2]!==e&&(this.dscTable.data[this.currentRowId][2]=e,await this.updateDscTable(this.dscTable.data)))}),[],"",!0,150),this.dscSecondaryValueDropdown=this.createLabelInputContainer(s.ValueForSecondaryColumnHeader,this.valueForSecondaryDropdown),this.dscSecondaryValueDropdown.display="none",this.createGroup("",[this.dscPrimaryValueDropdown,this.setSecondaryCheckboxForDropdowns,this.dscSecondaryValueDropdown],!0,!0)}async showDropdownsSection(e){this.setSecondaryCheckboxForDropdowns.checked=e,this.setSecondaryCheckboxForDropdowns.display="inline-flex",await this.dscPrimaryValueDropdown.updateCssStyles({display:"inline-flex"}),await this.dscSecondaryValueDropdown.updateCssStyles({display:e?"none":"inline-flex"})}async showInputSection(e){this.setSecondaryCheckboxForInputType.checked=e,this.setSecondaryCheckboxForInputType.display="inline-flex",await this.dscPrimaryValueInput.updateCssStyles({display:"inline-flex"}),await this.dscSecondaryValueInput.updateCssStyles({display:e?"none":"inline-flex"})}async hideDropdownAndInputSections(){await this.dscPrimaryValueInput.updateCssStyles({display:"none"}),this.setSecondaryCheckboxForInputType.display="none",await this.dscSecondaryValueInput.updateCssStyles({display:"none"}),await this.dscPrimaryValueDropdown.updateCssStyles({display:"none"}),this.setSecondaryCheckboxForDropdowns.display="none",await this.dscSecondaryValueDropdown.updateCssStyles({display:"none"})}async updateDscTable(e,t=void 0){this.setFocusToInput=t,await this.setTableData(this.dscTable,e,40),this.dscTable.setActiveCell(this.currentRowId,0)}initializeQueryStoreGeneralSection(){let e=[];const t=this.objectInfo.queryStoreOptions.actualMode;this.operationModeOffOption="Off",this.areQueryStoreOptionsEnabled=this.objectInfo.queryStoreOptions.actualMode!==this.operationModeOffOption;const n=this.createInputBox((async()=>{}),{ariaLabel:s.ActualOperationModeText,inputType:"text",enabled:!1,value:t});e.push(this.createLabelInputContainer(s.ActualOperationModeText,n)),this.requestedOperationMode=this.createDropdown(s.RequestedOperationModeText,(async e=>{this.objectInfo.queryStoreOptions.actualMode=e,this.areQueryStoreOptionsEnabled=e!==this.operationModeOffOption,await this.toggleQueryStoreOptions()}),this.viewInfo.operationModeOptions,String(this.objectInfo.queryStoreOptions.actualMode),!0,o.DefaultInputWidth),e.push(this.createLabelInputContainer(s.RequestedOperationModeText,this.requestedOperationMode));const r=this.createGroup(s.GeneralSectionHeader,e,!0);this.queryStoreTabSectionsContainer.push(r)}initializeQueryStoreMonitoringSection(){let e=[];this.dataFlushIntervalInMinutes=this.createInputBox((async e=>{this.objectInfo.queryStoreOptions.dataFlushIntervalInMinutes=Number(e)}),{ariaLabel:s.DataFlushIntervalInMinutesText,inputType:"number",enabled:this.areQueryStoreOptionsEnabled,value:String(this.objectInfo.queryStoreOptions.dataFlushIntervalInMinutes),min:0}),e.push(this.createLabelInputContainer(s.DataFlushIntervalInMinutesText,this.dataFlushIntervalInMinutes)),this.statisticsCollectionInterval=this.createDropdown(s.StatisticsCollectionInterval,(async e=>{this.objectInfo.queryStoreOptions.statisticsCollectionInterval=String(e)}),this.viewInfo.statisticsCollectionIntervalOptions,this.objectInfo.queryStoreOptions.statisticsCollectionInterval,this.areQueryStoreOptionsEnabled,o.DefaultInputWidth),e.push(this.createLabelInputContainer(s.StatisticsCollectionInterval,this.statisticsCollectionInterval));const t=this.createGroup(s.MonitoringSectionText,e,!0);this.queryStoreTabSectionsContainer.push(t)}initializeQueryStoreRetentionSection(){let e=[];this.maxPlansPerQuery=this.createInputBox((async e=>{this.objectInfo.queryStoreOptions.maxPlansPerQuery=Number(e)}),{ariaLabel:s.MaxPlansPerQueryText,inputType:"number",enabled:this.areQueryStoreOptionsEnabled,value:String(this.objectInfo.queryStoreOptions.maxPlansPerQuery),min:0}),e.push(this.createLabelInputContainer(s.MaxPlansPerQueryText,this.maxPlansPerQuery)),this.maxSizeinMB=this.createInputBox((async e=>{this.objectInfo.queryStoreOptions.maxSizeInMB=Number(e)}),{ariaLabel:s.MaxSizeInMbText,inputType:"number",enabled:this.areQueryStoreOptionsEnabled,value:String(this.objectInfo.queryStoreOptions.maxSizeInMB),min:0}),e.push(this.createLabelInputContainer(s.MaxSizeInMbText,this.maxSizeinMB)),this.queryStoreCaptureMode=this.createDropdown(s.QueryStoreCaptureModeText,(async e=>{this.objectInfo.queryStoreOptions.queryStoreCaptureMode=e,await this.toggleQueryCapturePolicySection(e===s.QueryStoreCapturemodeCustomText&&this.requestedOperationMode.value!==this.operationModeOffOption)}),this.viewInfo.queryStoreCaptureModeOptions,this.objectInfo.queryStoreOptions.queryStoreCaptureMode,this.areQueryStoreOptionsEnabled,o.DefaultInputWidth),e.push(this.createLabelInputContainer(s.QueryStoreCaptureModeText,this.queryStoreCaptureMode)),this.sizeBasedCleanupMode=this.createDropdown(s.SizeBasedCleanupModeText,(async e=>{this.objectInfo.queryStoreOptions.sizeBasedCleanupMode=e}),this.viewInfo.sizeBasedCleanupModeOptions,this.objectInfo.queryStoreOptions.sizeBasedCleanupMode,this.areQueryStoreOptionsEnabled,o.DefaultInputWidth),e.push(this.createLabelInputContainer(s.SizeBasedCleanupModeText,this.sizeBasedCleanupMode)),this.stateQueryThresholdInDays=this.createInputBox((async e=>{this.objectInfo.queryStoreOptions.staleQueryThresholdInDays=Number(e)}),{ariaLabel:s.StateQueryThresholdInDaysText,inputType:"number",enabled:this.areQueryStoreOptionsEnabled,value:String(this.objectInfo.queryStoreOptions.staleQueryThresholdInDays),min:0}),e.push(this.createLabelInputContainer(s.StateQueryThresholdInDaysText,this.stateQueryThresholdInDays)),(0,l.isUndefinedOrNull)(this.objectInfo.queryStoreOptions.waitStatisticsCaptureMode)||(this.waitStatisticsCaptureMode=this.createDropdown(s.WaitStatisticsCaptureModeText,(async e=>{this.objectInfo.queryStoreOptions.waitStatisticsCaptureMode=e.charAt(0)+e.slice(1).toLowerCase()}),this.viewInfo.propertiesOnOffOptions,this.objectInfo.queryStoreOptions.waitStatisticsCaptureMode.toUpperCase(),this.areQueryStoreOptionsEnabled,o.DefaultInputWidth),e.push(this.createLabelInputContainer(s.WaitStatisticsCaptureModeText,this.waitStatisticsCaptureMode)));const t=this.createGroup(s.QueryStoreRetentionSectionText,e,!0);this.queryStoreTabSectionsContainer.push(t)}initializeQueryStoreCapturePolicySection(){let e=[];this.executionCount=this.createInputBox((async e=>{this.objectInfo.queryStoreOptions.capturePolicyOptions.executionCount=Number(e)}),{ariaLabel:s.ExecutionCountText,inputType:"number",enabled:this.areQueryStoreOptionsEnabled,value:String(this.objectInfo.queryStoreOptions.capturePolicyOptions.executionCount),min:0}),e.push(this.createLabelInputContainer(s.ExecutionCountText,this.executionCount)),this.staleThreshold=this.createDropdown(s.StaleThresholdText,(async e=>{this.objectInfo.queryStoreOptions.capturePolicyOptions.staleThreshold=e}),this.viewInfo.staleThresholdOptions,this.objectInfo.queryStoreOptions.capturePolicyOptions.staleThreshold,this.areQueryStoreOptionsEnabled,o.DefaultInputWidth),e.push(this.createLabelInputContainer(s.StaleThresholdText,this.staleThreshold)),this.totalCompileCPUTimeInMS=this.createInputBox((async e=>{this.objectInfo.queryStoreOptions.capturePolicyOptions.totalCompileCPUTimeInMS=Number(e)}),{ariaLabel:s.TotalCompileCPUTimeInMsText,inputType:"number",enabled:this.areQueryStoreOptionsEnabled,value:String(this.objectInfo.queryStoreOptions.capturePolicyOptions.totalCompileCPUTimeInMS),min:0}),e.push(this.createLabelInputContainer(s.TotalCompileCPUTimeInMsText,this.totalCompileCPUTimeInMS)),this.totalExecutionCPUTimeInMS=this.createInputBox((async e=>{this.objectInfo.queryStoreOptions.capturePolicyOptions.totalExecutionCPUTimeInMS=Number(e)}),{ariaLabel:s.TotalExecutionCPUTimeInMsText,inputType:"number",enabled:this.areQueryStoreOptionsEnabled,value:String(this.objectInfo.queryStoreOptions.capturePolicyOptions.totalExecutionCPUTimeInMS),min:0}),e.push(this.createLabelInputContainer(s.TotalExecutionCPUTimeInMsText,this.totalExecutionCPUTimeInMS));const t=this.createGroup(s.QueryStoreCapturePolicySectionText,e,!0);this.queryStoreTabSectionsContainer.push(t)}async initializeQueryStoreCurrentDiskStorageSection(){let e=[];const t=this.createInputBox((async()=>{}),{ariaLabel:this.objectInfo.name,inputType:"text",enabled:!1,value:s.StringValueInMB(String(this.objectInfo.sizeInMb))});e.push(this.createLabelInputContainer(this.objectInfo.name,t));const n=this.createInputBox((async()=>{}),{ariaLabel:s.QueryStoreUsedText,inputType:"text",enabled:!1,value:s.StringValueInMB(String(this.objectInfo.queryStoreOptions.currentStorageSizeInMB))});e.push(this.createLabelInputContainer(s.QueryStoreUsedText,n));const r=this.createInputBox((async()=>{}),{ariaLabel:s.QueryStoreAvailableText,inputType:"text",enabled:!1,value:s.StringValueInMB(String(this.objectInfo.queryStoreOptions.maxSizeInMB-this.objectInfo.queryStoreOptions.currentStorageSizeInMB))});e.push(this.createLabelInputContainer(s.QueryStoreAvailableText,r)),this.purgeQueryDataButton=this.createButton(s.PurgeQueryDataButtonText,s.PurgeQueryDataButtonText,(async()=>{await this.purgeQueryStoreDataButtonClick()})),this.purgeQueryDataButton.width=o.DefaultInputWidth,await this.purgeQueryDataButton.updateCssStyles({margin:"10px 0px, 0px, 0px"}),e.push(this.createLabelInputContainer("",this.purgeQueryDataButton));const i=this.createGroup(s.QueryStoreCurrentDiskUsageSectionText,e,!0);this.queryStoreTabSectionsContainer.push(i)}async purgeQueryStoreDataButtonClick(){await d.window.showWarningMessage(s.PurgeQueryStoreDataMessage(this.objectInfo.name),s.YesText)===s.YesText&&await this.objectManagementService.purgeQueryStoreData(this.options.connectionUri,this.options.database)}async toggleQueryStoreOptions(){this.dataFlushIntervalInMinutes.enabled=this.statisticsCollectionInterval.enabled=this.maxPlansPerQuery.enabled=this.maxSizeinMB.enabled=this.queryStoreCaptureMode.enabled=this.sizeBasedCleanupMode.enabled=this.stateQueryThresholdInDays.enabled=this.areQueryStoreOptionsEnabled,(0,l.isUndefinedOrNull)(this.objectInfo.queryStoreOptions.waitStatisticsCaptureMode)||(this.waitStatisticsCaptureMode.enabled=this.areQueryStoreOptionsEnabled),await this.toggleQueryCapturePolicySection(this.areQueryStoreOptionsEnabled&&this.queryStoreCaptureMode.value===s.QueryStoreCapturemodeCustomText)}async toggleQueryCapturePolicySection(e){(0,l.isUndefinedOrNull)(this.objectInfo.queryStoreOptions.capturePolicyOptions)||(this.executionCount.enabled=this.staleThreshold.enabled=this.totalCompileCPUTimeInMS.enabled=this.totalExecutionCPUTimeInMS.enabled=e)}initializeConfigureSLOSection(){let e=[];if(this.viewInfo.azureEditions?.length>0){let t=this.viewInfo.azureEditions[0];this.objectInfo.azureEdition=t;let n=this.viewInfo.azureServiceLevelObjectives.find((e=>e.editionDisplayName===t)),r=n?.editionOptions.options??[],i=n?.editionOptions.defaultValueIndex??0;this.objectInfo.azureServiceLevelObjective=r[i];let o=this.createDropdown(s.CurrentSLOText,(async()=>{this.objectInfo.azureServiceLevelObjective=o.value}),r,r[i]),a=this.viewInfo.azureMaxSizes.find((e=>e.editionDisplayName===t)),c=a?.editionOptions.options??[];i=a?.editionOptions.defaultValueIndex??0,this.objectInfo.azureMaxSize=c[i];let l=this.createDropdown(s.MaxSizeText,(async()=>{this.objectInfo.azureMaxSize=l.value}),c,c[i]),u=this.createDropdown(s.EditionText,(async()=>{let e=u.value;this.objectInfo.azureEdition=e,n=this.viewInfo.azureServiceLevelObjectives?.find((t=>t.editionDisplayName===e)),r=n?.editionOptions.options??[],i=n?.editionOptions.defaultValueIndex??0,o.loading=!0,await o.updateProperties({value:r[i],values:r}),o.loading=!1,a=this.viewInfo.azureMaxSizes?.find((t=>t.editionDisplayName===e)),c=a?.editionOptions.options??[],i=a?.editionOptions.defaultValueIndex??0,l.loading=!0,await l.updateProperties({value:c[i],values:c}),l.loading=!1}),this.viewInfo.azureEditions,t);e.push(this.createLabelInputContainer(s.EditionText,u)),e.push(this.createLabelInputContainer(s.CurrentSLOText,o)),e.push(this.createLabelInputContainer(s.MaxSizeText,l))}if(this.viewInfo.azureBackupRedundancyLevels?.length>0){let t=this.createDropdown(s.BackupRedundancyText,(async()=>{this.objectInfo.azureBackupRedundancyLevel=t.value}),this.viewInfo.azureBackupRedundancyLevels,this.viewInfo.azureBackupRedundancyLevels[0]);e.push(this.createLabelInputContainer(s.BackupRedundancyText,t))}return e.push(this.createHyperlink(s.AzurePricingLinkText,"https://go.microsoft.com/fwlink/?linkid=2239183")),this.createGroup(s.ConfigureSLOSectionHeader,e,!0,!0)}}t.DatabaseDialog=p},3598:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DatabaseFileDialog=void 0;const r=n(235),i=n(6928),o=n(8991),s=n(8430),a=n(4848),c=n(9934),l=16776192,u=2097152;class d extends o.DialogBase{constructor(e,t){super(e.title,"DatabaseFileDialog"),this.options=e,this.objectManagementService=t}async initialize(){this.dialogObject.okButton.enabled=!1,this.autogrowthInPercentValue=this.options.defaultFileConstants.defaultFileGrowthInPercent,this.autogrowthInMegabytesValue=this.options.defaultFileConstants.defaultFileGrowthInMb,this.result=(0,c.deepClone)(this.options.databaseFile),this.originalName=this.options.databaseFile.name,this.originalFileName=this.options.databaseFile.fileNameWithExtension,this.isEditingFile=this.options.isNewFile||this.options.isEditingNewFile,await this.initializeAddDatabaseFileDialog()}async validateInput(){const e=await super.validateInput();return this.result.name!==this.originalName&&((this.options.isNewFile&&this.options.files.find((e=>e.name===this.result.name.trim()))||this.options.isEditingNewFile&&0!==this.options.files.filter((e=>e.name===this.result.name.trim())).length)&&e.push(s.DuplicateLogicalNameError(this.result.name.trim())),this.options.isNewFile||this.options.isEditingNewFile||!this.options.files.find((e=>this.result.id!==e.id&&e.name===this.result.name.trim()))||e.push(s.FileNameExistsError(this.result.name.trim())),this.options.isNewFile&&this.options.files.find((e=>this.result.name===e.name&&i.join(e.path,e.fileNameWithExtension)===i.join(this.result.path,this.result.fileNameWithExtension)))&&e.push(s.FileAlreadyExistsError(i.join(this.result.path,this.result.fileNameWithExtension)))),this.options.isEditingNewFile&&this.result.fileNameWithExtension!==this.originalFileName&&0!==this.options.files.filter((e=>i.join(e.path,e.fileNameWithExtension)===i.join(this.result.path,this.result.fileNameWithExtension))).length&&e.push(s.FileAlreadyExistsError(i.join(this.result.path,this.result.fileNameWithExtension))),-1!==this.result.maxSizeLimitInMb&&this.result.maxSizeLimitInMb<this.result.sizeInMb&&e.push(s.FileSizeLimitError),-1!==this.result.maxSizeLimitInMb&&1!==this.result.autoFileGrowthType&&this.result.maxSizeLimitInMb<this.result.autoFileGrowth&&e.push(s.FilegrowthLimitError),e}async initializeAddDatabaseFileDialog(){let e=[];const t=this.createInputBox((async e=>{""!==e.trim()&&(this.result.name=e.trim(),this.fileNameWithExtension.value=this.generateFileNameWithExtension())}),{ariaLabel:s.LogicalNameText,inputType:"text",enabled:!0,value:this.options.databaseFile.name,required:!0}),n=this.createLabelInputContainer(s.LogicalNameText,t);e.push(n);const r=this.createDropdown(s.FileTypeText,(async e=>{await this.updateOptionsForSelectedFileType(e),this.result.type=e,this.fileNameWithExtension.value=this.generateFileNameWithExtension()}),this.options.viewInfo.fileTypesOptions,this.result.type,this.isEditingFile,o.DefaultInputWidth),i=this.createLabelInputContainer(s.FileTypeText,r);e.push(i),this.fileGroupDropdown=this.createDropdown(s.FilegroupText,(async e=>{this.result.fileGroup=e}),this.options.rowFilegroups,this.options.databaseFile.fileGroup,this.isEditingFile,o.DefaultInputWidth);const a=this.createLabelInputContainer(s.FilegroupText,this.fileGroupDropdown);e.push(a),this.fileSizeInput=this.createInputBox((async e=>{this.result.sizeInMb=Number(e)}),{ariaLabel:s.SizeInMbText,inputType:"number",enabled:this.options.databaseFile.type!==s.FilestreamFileType,value:String(this.options.databaseFile.sizeInMb),min:1});const c=this.createLabelInputContainer(s.SizeInMbText,this.fileSizeInput);e.push(c),e.push(await this.initializeAutogrowthSection()),this.filePathTextBox=this.createInputBox((async e=>{this.result.path=e}),{ariaLabel:s.PathText,inputType:"text",enabled:this.isEditingFile,value:this.options.databaseFile.path,width:o.DefaultInputWidth-30}),this.filePathButton=this.createButton("...",s.BrowseFilesLabel,(async()=>{await this.createFileBrowser()}),this.options.isNewFile),this.filePathButton.width=25,this.pathContainer=this.createLabelInputContainer(s.PathText,this.filePathTextBox),this.pathContainer.addItems([this.filePathButton],{flex:"10 0 auto"}),e.push(this.pathContainer);let l=this.isEditingFile;l&&(l=!(this.result.type===s.FilestreamFileType)),this.fileNameWithExtension=this.createInputBox((async e=>{this.result.fileNameWithExtension=e}),{ariaLabel:s.FileNameText,inputType:"text",enabled:l,value:this.options.databaseFile.fileNameWithExtension,width:o.DefaultInputWidth});const u=this.createLabelInputContainer(s.FileNameText,this.fileNameWithExtension);e.push(u),this.formContainer.addItems(e)}async initializeAutogrowthSection(){this.enableAutoGrowthCheckbox=this.createCheckbox(s.EnableAutogrowthText,(async e=>{this.inPercentAutogrowth.enabled=this.inMegabytesAutogrowth.enabled=this.autoFilegrowthInput.enabled=this.limitedToMbFileSize.enabled=this.unlimitedFileSize.enabled=this.result.isAutoGrowthEnabled=e,this.limitedToMbFileSizeInput.enabled=e&&this.limitedToMbFileSize.checked}),!0,!0);let e="autogrowthRadioGroup";const t=0===this.options.databaseFile.autoFileGrowthType;this.inPercentAutogrowth=this.createRadioButton(s.InPercentAutogrowthText,e,!t,(async e=>{await this.handleAutogrowthTypeChange(e)})),this.inMegabytesAutogrowth=this.createRadioButton(s.InMegabytesAutogrowthText,e,t,(async e=>{await this.handleAutogrowthTypeChange(e)})),this.autoFilegrowthInput=this.createInputBox((async e=>{(0,a.isUndefinedOrNull)(e)||""===e||(this.inPercentAutogrowth.checked?this.autogrowthInPercentValue=Number(e):this.autogrowthInMegabytesValue=Number(e),this.result.autoFileGrowth=this.inPercentAutogrowth.checked?this.autogrowthInPercentValue:this.autogrowthInMegabytesValue)}),{ariaLabel:s.FileGrowthText,inputType:"number",enabled:!0,value:String(this.options.databaseFile.autoFileGrowth),width:o.DefaultInputWidth-10,min:1});const n=this.createLabelInputContainer(s.FileGrowthText,this.autoFilegrowthInput);this.fileGrowthGroup=this.createGroup("",[this.enableAutoGrowthCheckbox,n,this.inPercentAutogrowth,this.inMegabytesAutogrowth],!0),await this.fileGrowthGroup.updateCssStyles({margin:"10px 0px -10px -10px"}),e="maxFileSizeRadioGroup";const r=!this.options.isNewFile&&-1!==this.options.databaseFile.maxSizeLimitInMb;this.limitedToMbFileSize=this.createRadioButton(s.LimitedToMBFileSizeText,e,r,(async e=>{await this.handleMaxFileSizeTypeChange(e)})),this.unlimitedFileSize=this.createRadioButton(s.UnlimitedFileSizeText,e,!r,(async e=>{await this.handleMaxFileSizeTypeChange(e)})),this.limitedToMbFileSizeInput=this.createInputBox((async e=>{this.fileSizeValue=Number(e),this.result.maxSizeLimitInMb=this.fileSizeValue,this.unlimitedFileSize.checked&&(this.result.maxSizeLimitInMb=-1)}),{ariaLabel:s.MaximumFileSizeText,inputType:"number",enabled:!0,value:-1===this.options.databaseFile.maxSizeLimitInMb?String(this.options.defaultFileConstants.defaultMaxFileSizeLimitedToInMb):String(this.options.databaseFile.maxSizeLimitInMb),width:o.DefaultInputWidth-10,min:1,max:this.options.databaseFile.type===s.LogFiletype?u:l});const i=this.createLabelInputContainer(s.MaximumFileSizeText,this.limitedToMbFileSizeInput);return this.maxSizeGroup=this.createGroup("",[i,this.limitedToMbFileSize,this.unlimitedFileSize],!0),await this.maxSizeGroup.updateCssStyles({margin:"10px 0px -10px -10px"}),this.AutogrowthGroup=this.createGroup(s.AutogrowthMaxsizeText,[this.fileGrowthGroup,this.maxSizeGroup],!1),this.AutogrowthGroup}async handleAutogrowthTypeChange(e){this.autoFilegrowthInput.value=this.options.isNewFile?this.inPercentAutogrowth.checked?this.autogrowthInPercentValue?.toString():this.autogrowthInMegabytesValue?.toString():this.options.databaseFile.autoFileGrowth?.toString(),this.autoFilegrowthInput.max=this.inPercentAutogrowth.checked?100:this.result.type===s.LogFiletype?1048576:8388096,this.result.autoFileGrowthType=this.inPercentAutogrowth.checked?1:0}async handleMaxFileSizeTypeChange(e){this.limitedToMbFileSize.checked?(this.limitedToMbFileSizeInput.enabled=!0,this.result.maxSizeLimitInMb=this.fileSizeValue):this.unlimitedFileSize.checked&&(this.limitedToMbFileSizeInput.enabled=!1,this.result.maxSizeLimitInMb=-1)}async createFileBrowser(){let e=await this.objectManagementService.getDataFolder(this.options.connectionUri),t=await r.window.openServerFileBrowserDialog(this.options.connectionUri,e,[{label:s.allFiles,filters:["*"]}],!0);t?.length>0&&(this.filePathTextBox.value=t,this.result.path=t)}async updateOptionsForSelectedFileType(e){let t=this.options.rowFilegroups,n=this.result.fileGroup,r="visible",i="0px",o="0px",a=!0,c=l;e===s.LogFiletype?(t=[s.FileGroupForLogTypeText],n=s.FileGroupForLogTypeText,c=u):e===s.FilestreamFileType&&(t=this.options.filestreamFilegroups.length>0?this.options.filestreamFilegroups:[s.FileGroupForFilestreamTypeText],n=this.result.fileGroup,r="hidden",i="-130px",o="-35px",a=!1,this.fileNameWithExtension.value=""),await this.fileGroupDropdown.updateProperties({values:t,value:n}),await this.fileGrowthGroup.updateCssStyles({visibility:r}),await this.maxSizeGroup.updateCssStyles({"margin-top":i}),await this.pathContainer.updateCssStyles({"margin-top":o}),this.fileNameWithExtension.enabled=this.fileSizeInput.enabled=this.isEditingFile&&a,this.autoFilegrowthInput.max=this.inPercentAutogrowth.checked?100:c/2,this.fileSizeInput.max=c}generateFileNameWithExtension(){let e=this.result.fileNameWithExtension;if(""!==this.result.name&&this.options.isNewFile)switch(this.result.type){case s.RowsDataFileType:e=this.result.name+".ndf";break;case s.LogFiletype:e=this.result.name+".ldf";break;case s.FilestreamFileType:e=""}return e}async onFormFieldChange(){this.dialogObject.okButton.enabled=JSON.stringify(this.result)!==JSON.stringify(this.options.databaseFile)}get dialogResult(){return this.result}}t.DatabaseFileDialog=d},9500:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DatabaseRoleDialog=void 0;const r=n(8430),i=n(1159),o=n(6385),s=n(8991),a=n(8358);class c extends a.PrincipalDialogBase{constructor(e,t){super(e,{...t,isDatabaseLevelPrincipal:!0,supportEffectivePermissions:!1})}get helpUrl(){return this.options.isNewObject?i.CreateDatabaseRoleDocUrl:i.AlterDatabaseRoleDocUrl}async initializeUI(){await super.initializeUI(),this.initializeGeneralSection(),this.initializeOwnedSchemasSection(),this.initializeMemberSection(),this.formContainer.addItems([this.generalSection,this.ownedSchemasSection,this.memberSection,this.securableSection],this.getSectionItemLayout())}initializeGeneralSection(){this.nameInput=this.createInputBox((async e=>{this.objectInfo.name=e}),{ariaLabel:r.NameText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.name});const e=this.createLabelInputContainer(r.NameText,this.nameInput);this.ownerInput=this.createInputBox((async e=>{this.objectInfo.owner=e}),{ariaLabel:r.OwnerText,inputType:"text",enabled:!0,value:this.objectInfo.owner,width:210});const t=this.createButton(r.BrowseText,r.BrowseOwnerButtonAriaLabel,(async()=>{const e=new o.FindObjectDialog(this.objectManagementService,{objectTypes:r.getObjectTypeInfo(["ApplicationRole","DatabaseRole","User"]),selectAllObjectTypes:!0,multiSelect:!1,contextId:this.contextId,title:r.SelectDatabaseRoleOwnerDialogTitle,showSchemaColumn:!1});await e.open();const t=await e.waitForClose();t.selectedObjects.length>0&&(this.ownerInput.value=t.selectedObjects[0].name)})),n=this.createLabelInputContainer(r.OwnerText,this.ownerInput);n.addItems([t],{flex:"0 0 auto"}),this.generalSection=this.createGroup(r.GeneralSectionHeader,[e,n],!1)}initializeMemberSection(){this.memberTable=this.createTable(r.MemberSectionHeader,[r.NameText],this.objectInfo.members.map((e=>[e])));const e=this.addButtonsForTable(this.memberTable,{buttonAriaLabel:r.AddMemberAriaLabel,buttonHandler:async()=>{const e=new o.FindObjectDialog(this.objectManagementService,{objectTypes:r.getObjectTypeInfo(["DatabaseRole","User"]),selectAllObjectTypes:!0,multiSelect:!0,contextId:this.contextId,title:r.SelectDatabaseRoleMemberDialogTitle,showSchemaColumn:!1});await e.open();const t=await e.waitForClose();await this.addMembers(t.selectedObjects.map((e=>e.name)))}},{buttonAriaLabel:r.RemoveMemberAriaLabel,buttonHandler:async()=>{1===this.memberTable.selectedRows.length&&await this.removeMember(this.memberTable.selectedRows[0])}});this.memberSection=this.createGroup(r.MemberSectionHeader,[this.memberTable,e])}async addMembers(e){e.forEach((e=>{-1===this.objectInfo.members.indexOf(e)&&this.objectInfo.members.push(e)})),await this.updateMembersTable()}async removeMember(e){this.objectInfo.members.splice(e,1),await this.updateMembersTable()}async updateMembersTable(){await this.setTableData(this.memberTable,this.objectInfo.members.map((e=>[e]))),this.onFormFieldChange()}initializeOwnedSchemasSection(){this.ownedSchemaTable=this.createTableList(r.OwnedSchemaSectionHeader,[r.SchemaText],this.viewInfo.schemas,this.objectInfo.ownedSchemas,s.DefaultMaxTableRowCount,(e=>-1===this.objectInfo.ownedSchemas.indexOf(e))),this.ownedSchemasSection=this.createGroup(r.OwnedSchemaSectionHeader,[this.ownedSchemaTable])}}t.DatabaseRoleDialog=c},9419:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DetachDatabaseDialog=void 0;const r=n(5824),i=n(1159),o=n(8430);class s extends r.ObjectManagementDialogBase{constructor(e,t){super(e,t,o.DetachDatabaseDialogTitle(t.database),"DetachDatabase"),this._dropConnections=!1,this._updateStatistics=!1,this.dialogObject.okButton.label=o.DetachButtonLabel}get isDirty(){return!0}get saveChangesTaskLabel(){return o.DetachDatabaseOperationDisplayName(this.objectInfo.name)}async initializeUI(){let e=this.objectInfo.files.map((e=>[e.name,e.type,e.fileGroup,e.path])),t=[o.DatabaseFileNameLabel,o.DatabaseFileTypeLabel,o.DatabaseFileGroupLabel,o.DatabaseFilePathLabel],n=this.createTable(o.DatabaseFilesLabel,t,e),r=this.createGroup(o.DatabaseFilesLabel,[n],!1),i=this.createCheckbox(o.DetachDropConnections,(async e=>{this._dropConnections=e})),s=this.createCheckbox(o.DetachUpdateStatistics,(async e=>{this._updateStatistics=e})),a=[r,this.createGroup(o.DetachDatabaseOptions,[i,s],!1)];this.formContainer.addItems(a)}get helpUrl(){return i.DetachDatabaseDocUrl}get actionName(){return"DetachDatabase"}async saveChanges(e,t){await this.objectManagementService.detachDatabase(this.options.connectionUri,this.options.database,this._dropConnections,this._updateStatistics,!1)}async generateScript(){return await this.objectManagementService.detachDatabase(this.options.connectionUri,this.options.database,this._dropConnections,this._updateStatistics,!0)}async validateInput(){return[]}}t.DetachDatabaseDialog=s},5649:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DropDatabaseDialog=void 0;const r=n(5824),i=n(1159),o=n(8430);class s extends r.ObjectManagementDialogBase{constructor(e,t){super(e,t,o.DropDatabaseDialogTitle(t.database),"DropDatabase"),this._dropConnections=!1,this._deleteBackupHistory=!1,this.dialogObject.okButton.label=o.DropButtonLabel}get isDirty(){return!0}get saveChangesTaskLabel(){return o.DropObjectOperationDisplayName(o.DatabaseTypeDisplayName,this.objectInfo.name)}async initializeUI(){let e=[],t=[[this.objectInfo.name,this.objectInfo.owner??"",this.objectInfo.status??""]],n=[o.NameText,o.OwnerText,o.StatusText],r=this.createTable(o.DatabaseDetailsLabel,n,t),i=this.createGroup(o.DatabaseDetailsLabel,[r],!1);if(e.push(i),!this.viewInfo.isAzureDB&&!this.viewInfo.isManagedInstance&&!this.viewInfo.isSqlOnDemand){let t=this.createCheckbox(o.CloseConnections,(async e=>{this._dropConnections=e})),n=this.createCheckbox(o.DeleteBackupHistory,(async e=>{this._deleteBackupHistory=e})),r=this.createGroup(o.DropDatabaseOptions,[t,n],!1);e.push(r)}this.formContainer.addItems(e)}get helpUrl(){return i.DropDatabaseDocUrl}get actionName(){return"DropObject"}async saveChanges(e,t){await this.objectManagementService.dropDatabase(this.options.connectionUri,this.options.database,this._dropConnections,this._deleteBackupHistory,!1)}async generateScript(){return await this.objectManagementService.dropDatabase(this.options.connectionUri,this.options.database,this._dropConnections,this._deleteBackupHistory,!0)}async validateInput(){return[]}}t.DropDatabaseDialog=s},6385:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FindObjectDialog=void 0;const r=n(235),i=n(8991),o=n(8430),s=n(76),a=(e,t)=>e.name===t.name&&e.type===t.type&&e.schema===t.schema;class c extends i.DialogBase{constructor(e,t){super(t.title,"FindObjectDialog"),this.objectManagementService=e,this.options=t,this.selectedObjectTypes=[],this.allObjects=[],this.dialogObject.okButton.label=o.SelectText,this.dialogObject.okButton.enabled=!1,this.dialogObject.cancelButton.label=o.BackButtonLabel,this.result={selectedObjects:[]},this.selectedObjectTypes=t.selectAllObjectTypes?[...t.objectTypes]:[]}async initialize(){this.objectTypesTable=this.createTableList(o.ObjectTypesText,[o.ObjectTypeText],this.options.objectTypes,this.selectedObjectTypes,i.DefaultMaxTableRowCount,i.DefaultTableListItemEnabledStateGetter,(e=>[e.displayName]),((e,t)=>e.name===t.name)),this.searchTextInputBox=this.createInputBox((async()=>{}),{ariaLabel:o.SearchTextLabel,inputType:"text"});const e=this.createLabelInputContainer(o.SearchTextLabel,this.searchTextInputBox);this.findButton=this.createButton(o.FindText,o.FindText,(async()=>{await this.onFindObjectButtonClick()}),this.options.selectAllObjectTypes);const t=this.createButtonContainer([this.findButton]),n=this.createGroup(o.FilterSectionTitle,[e,this.objectTypesTable,t]),r=[o.NameText,o.ObjectTypeText];this.options.showSchemaColumn&&r.splice(1,0,o.SchemaText),this.options.multiSelect?this.objectsTable=this.createTableList(o.ObjectsText,r,this.allObjects,this.result.selectedObjects,20,i.DefaultTableListItemEnabledStateGetter,(e=>this.getObjectRowValue(e)),a):(this.objectsTable=this.createTable(o.ObjectsText,r,[],20),this.disposables.push(this.objectsTable.onRowSelected((async()=>{this.objectsTable.selectedRows.length>0&&(this.result.selectedObjects=[this.allObjects[this.objectsTable.selectedRows[0]]]),await this.onFormFieldChange()})))),this.objectsLoadingComponent=this.modelView.modelBuilder.loadingComponent().withItem(this.objectsTable).withProps({loadingText:o.LoadingObjectsText,showText:!0,loading:!1}).component();const s=this.createGroup(o.ObjectsText,[this.objectsLoadingComponent]);this.formContainer.addItems([n,s],this.getSectionItemLayout())}get dialogResult(){return this.result}async onFindObjectButtonClick(){this.dialogObject.okButton.enabled=!1,this.objectsLoadingComponent.loading=!0,this.findButton.enabled=!1;try{const e=await this.objectManagementService.search(this.options.contextId,this.selectedObjectTypes.map((e=>e.name)),this.searchTextInputBox.value);let t;this.allObjects.splice(0,this.allObjects.length,...e),t=this.options.multiSelect?this.getDataForTableList(this.allObjects,this.result.selectedObjects,i.DefaultTableListItemEnabledStateGetter,(e=>this.getObjectRowValue(e)),a):this.allObjects.map((e=>this.getObjectRowValue(e))),await this.setTableData(this.objectsTable,t,20),this.objectsLoadingComponent.loadingCompletedText=o.LoadingObjectsCompletedText(e.length)}catch(e){this.dialogObject.message={text:(0,s.getErrorMessage)(e),level:r.window.MessageLevel.Error}}this.findButton.enabled=!0,this.objectsLoadingComponent.loading=!1}async onFormFieldChange(){this.findButton.enabled=this.selectedObjectTypes.length>0,this.dialogObject.okButton.enabled=this.result.selectedObjects.length>0}getObjectRowValue(e){const t=this.options.objectTypes.find((t=>t.name===e.type)),n=[e.name,t?.displayName];return this.options.showSchemaColumn&&n.splice(1,0,e.schema),n}}t.FindObjectDialog=c},1496:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoginDialog=void 0;const r=n(1398),i=n(8430),o=n(1776),s=n(1159),a=n(9523),c=n(8991),l=n(8358),u=n(4848);class d extends l.PrincipalDialogBase{constructor(e,t){super(e,{...t,isDatabaseLevelPrincipal:!1,supportEffectivePermissions:!0})}get helpUrl(){return this.options.isNewObject?s.CreateLoginDocUrl:s.AlterLoginDocUrl}async onConfirmation(){return!(this.viewInfo.supportAdvancedPasswordOptions&&"Sql"===this.objectInfo.authenticationType&&!this.objectInfo.password&&!this.objectInfo.enforcePasswordPolicy)||await r.window.showWarningMessage(i.BlankPasswordConfirmationText,{modal:!0},o.YesText)===o.YesText}async validateInput(){const e=await super.validateInput();return"Sql"===this.objectInfo.authenticationType&&(this.objectInfo.password||this.viewInfo.supportAdvancedPasswordOptions&&!this.objectInfo.enforcePasswordPolicy||e.push(i.PasswordCannotBeEmptyError),!this.objectInfo.password||!this.objectInfo.enforcePasswordPolicy&&this.viewInfo.supportAdvancedPasswordOptions||(0,a.isValidSQLPassword)(this.objectInfo.password,this.objectInfo.name)||!this.options.isNewObject&&!this.isPasswordChanged()||e.push(i.InvalidPasswordError),this.objectInfo.password!==this.confirmPasswordInput.value&&e.push(i.PasswordsNotMatchError),this.specifyOldPasswordCheckbox?.checked&&!this.objectInfo.oldPassword&&e.push(i.OldPasswordCannotBeEmptyError)),e}postInitializeData(){this.objectInfo.password=this.objectInfo.password??""}async initializeUI(){await super.initializeUI();const e=[];this.initializeGeneralSection(),e.push(this.generalSection),(this.options.isNewObject||"Sql"===this.objectInfo.authenticationType)&&(this.initializeSqlAuthSection(),e.push(this.sqlAuthSection)),this.initializeServerRolesSection(),e.push(this.serverRoleSection),!this.options.isNewObject&&(0,u.isUndefinedOrNull)(this.objectInfo.securablePermissions)||e.push(this.securableSection),this.formContainer.addItems(e,this.getSectionItemLayout())}initializeGeneralSection(){const e=[];this.nameInput=this.createInputBox((async e=>{this.objectInfo.name=e}),{ariaLabel:i.NameText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.name});const t=this.createLabelInputContainer(i.NameText,this.nameInput);e.push(t),this.authTypeDropdown=this.createDropdown(i.AuthTypeText,(async e=>{this.objectInfo.authenticationType=i.getAuthenticationTypeByDisplayName(e),this.setViewByAuthenticationType()}),this.viewInfo.authenticationTypes.map((e=>i.getAuthenticationTypeDisplayName(e))),i.getAuthenticationTypeDisplayName(this.objectInfo.authenticationType),this.options.isNewObject);const n=this.createLabelInputContainer(i.AuthTypeText,this.authTypeDropdown);if(e.push(n),this.enabledCheckbox=this.createCheckbox(i.EnabledText,(async e=>{this.objectInfo.isEnabled=e}),this.objectInfo.isEnabled),e.push(this.enabledCheckbox),this.viewInfo.supportAdvancedOptions){this.defaultDatabaseDropdown=this.createDropdown(i.DefaultDatabaseText,(async e=>{this.objectInfo.defaultDatabase=e}),this.viewInfo.databases,this.objectInfo.defaultDatabase);const t=this.createLabelInputContainer(i.DefaultDatabaseText,this.defaultDatabaseDropdown);e.push(t),this.defaultLanguageDropdown=this.createDropdown(i.DefaultLanguageText,(async e=>{this.objectInfo.defaultLanguage=e}),this.viewInfo.languages,this.objectInfo.defaultLanguage);const n=this.createLabelInputContainer(i.DefaultLanguageText,this.defaultLanguageDropdown);e.push(n),this.connectPermissionCheckbox=this.createCheckbox(i.PermissionToConnectText,(async e=>{this.objectInfo.connectPermission=e}),this.objectInfo.connectPermission),e.push(this.connectPermissionCheckbox)}this.generalSection=this.createGroup(i.GeneralSectionHeader,e,!1)}initializeSqlAuthSection(){const e=[];this.passwordInput=this.createPasswordInputBox(i.PasswordText,(async e=>{this.objectInfo.password=e,this.mustChangePasswordCheckbox.enabled=this.objectInfo.enforcePasswordPolicy&&this.isPasswordChanged(),this.mustChangePasswordCheckbox.enabled||(this.mustChangePasswordCheckbox.checked=this.objectInfo.mustChangePassword)}),this.objectInfo.password??"");const t=this.createLabelInputContainer(i.PasswordText,this.passwordInput);this.confirmPasswordInput=this.createPasswordInputBox(i.ConfirmPasswordText,(async()=>{}),this.objectInfo.password??"");const n=this.createLabelInputContainer(i.ConfirmPasswordText,this.confirmPasswordInput);if(e.push(t,n),!this.options.isNewObject){this.specifyOldPasswordCheckbox=this.createCheckbox(i.SpecifyOldPasswordText,(async e=>{this.oldPasswordInput.enabled=this.specifyOldPasswordCheckbox.checked,this.objectInfo.oldPassword="",this.specifyOldPasswordCheckbox.checked||(this.oldPasswordInput.value="")})),this.oldPasswordInput=this.createPasswordInputBox(i.OldPasswordText,(async e=>{this.objectInfo.oldPassword=e}),"",!1);const t=this.createLabelInputContainer(i.OldPasswordText,this.oldPasswordInput);e.push(this.specifyOldPasswordCheckbox,t)}this.viewInfo.supportAdvancedPasswordOptions&&(this.enforcePasswordPolicyCheckbox=this.createCheckbox(i.EnforcePasswordPolicyText,(async e=>{const t=e;this.objectInfo.enforcePasswordPolicy=t,this.enforcePasswordExpirationCheckbox.enabled=t,this.enforcePasswordExpirationCheckbox.checked=t,(this.options.isNewObject||this.isPasswordChanged())&&(this.mustChangePasswordCheckbox.enabled=t,this.mustChangePasswordCheckbox.checked=t),this.mustChangePasswordCheckbox.checked=t&&(this.options.isNewObject||this.isPasswordChanged())}),this.objectInfo.enforcePasswordPolicy),this.enforcePasswordExpirationCheckbox=this.createCheckbox(i.EnforcePasswordExpirationText,(async e=>{const t=e;this.objectInfo.enforcePasswordExpiration=t,(this.options.isNewObject||this.isPasswordChanged())&&(this.mustChangePasswordCheckbox.enabled=t,this.mustChangePasswordCheckbox.checked=t)}),this.objectInfo.enforcePasswordPolicy),this.mustChangePasswordCheckbox=this.createCheckbox(i.MustChangePasswordText,(async e=>{this.objectInfo.mustChangePassword=e}),this.objectInfo.mustChangePassword,this.options.isNewObject),e.push(this.enforcePasswordPolicyCheckbox,this.enforcePasswordExpirationCheckbox,this.mustChangePasswordCheckbox),this.options.isNewObject||(this.lockedOutCheckbox=this.createCheckbox(i.LoginLockedOutText,(async e=>{this.objectInfo.isLockedOut=e}),this.objectInfo.isLockedOut,this.viewInfo.canEditLockedOutState),e.push(this.lockedOutCheckbox))),this.sqlAuthSection=this.createGroup(i.SQLAuthenticationSectionHeader,e)}isPasswordChanged(){return this.objectInfo.password!==this.originalObjectInfo.password}initializeServerRolesSection(){this.serverRoleTable=this.createDeclarativeTableList(i.ServerRoleSectionHeader,[i.ServerRoleTypeDisplayNameInTitle],this.viewInfo.serverRoles,this.objectInfo.serverRoles,c.DefaultMaxTableRowCount,(e=>e!==s.PublicServerRoleName)),this.serverRoleSection=this.createGroup(i.ServerRoleSectionHeader,[this.serverRoleTable])}setViewByAuthenticationType(){this.authTypeDropdown.value===i.SQLAuthenticationTypeDisplayText?this.addItem(this.formContainer,this.sqlAuthSection,this.getSectionItemLayout(),1):this.authTypeDropdown.value!==i.SQLAuthenticationTypeDisplayText&&this.removeItem(this.formContainer,this.sqlAuthSection)}}t.LoginDialog=d},5824:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectManagementDialogBase=void 0;const r=n(235),i=n(6362),o=n(8430),s=n(9523),a=n(1159),c=n(6734),l=n(76),u=n(9934),d=n(4940);class p extends d.ScriptableDialogBase{constructor(e,t,n,r){var s;n||(n=t.isNewObject?o.NewObjectDialogTitle(o.getNodeTypeDisplayName(t.objectType,!0)):o.ObjectPropertiesDialogTitle(o.getNodeTypeDisplayName(t.objectType,!0),t.objectName)),r||(s=t.objectType,r=t.isNewObject?`New${s}`:`${s}Properties`),super(n,r,t),this.objectManagementService=e,this._contextId=(0,i.generateUuid)(),this.dialogObject.okButton.label=t.isNewObject?o.CreateObjectLabel:o.ApplyUpdatesLabel}postInitializeData(){}async validateInput(){const e=[];return this.objectInfo.name||e.push(o.NameCannotBeEmptyError),e}async saveChanges(e,t){await this.objectManagementService.save(this._contextId,this.objectInfo)}get saveChangesTaskLabel(){const e=o.getNodeTypeDisplayName(this.options.objectType);return this.options.isNewObject?o.CreateObjectOperationDisplayName(e):o.UpdateObjectOperationDisplayName(e,this.options.objectName)}get actionName(){return this.options.isNewObject?"CreateObject":"UpdateObject"}get startTaskOnApply(){return!0}async saveChangesAndRefresh(e){try{if(this.isDirty){const t=Date.now();await this.saveChanges(this._contextId,this.objectInfo),this.options.objectExplorerContext&&(this.options.isNewObject?await(0,s.refreshNode)(this.options.objectExplorerContext):await(0,s.refreshParentNode)(this.options.objectExplorerContext)),c.TelemetryReporter.sendTelemetryEvent(this.actionName,{objectType:this.options.objectType},{elapsedTimeMs:Date.now()-t}),e&&e.updateStatus(r.TaskStatus.Succeeded)}}catch(t){e&&e.updateStatus(r.TaskStatus.Failed,(0,l.getErrorMessage)(t)),c.TelemetryReporter.createErrorEvent2(a.ObjectManagementViewName,this.actionName,t).withAdditionalProperties({objectType:this.options.objectType}).send()}finally{await this.disposeView()}}async handleDialogClosed(e){return"ok"===e&&(this.startTaskOnApply?r.tasks.startBackgroundOperation({displayName:this.saveChangesTaskLabel,description:"",isCancelable:!1,operation:async e=>{await this.saveChangesAndRefresh(e)}}):await this.saveChangesAndRefresh()),await super.handleDialogClosed(e)}get viewInfo(){return this._viewInfo}get objectInfo(){return this._viewInfo.objectInfo}get originalObjectInfo(){return this._originalObjectInfo}get contextId(){return this._contextId}async dispose(e){await super.dispose(e),"ok"!==e&&await this.disposeView()}async disposeView(){await this.objectManagementService.disposeView(this._contextId)}async initializeData(){const e=await this.objectManagementService.initializeView(this._contextId,this.options.objectType,this.options.connectionUri,this.options.database,this.options.isNewObject,this.options.parentUrn,this.options.objectUrn);this._viewInfo=e,this.postInitializeData(),this._originalObjectInfo=(0,u.deepClone)(this.objectInfo)}async generateScript(){return await this.objectManagementService.script(this._contextId,this.objectInfo)}get isDirty(){return!(0,u.equals)(this.objectInfo,this._originalObjectInfo,!1)}}t.ObjectManagementDialogBase=p},971:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectSelectionMethodDialog=t.ObjectSelectionMethod=void 0;const r=n(8991),i=n(8430);var o;!function(e){e[e.SpecificObjects=0]="SpecificObjects",e[e.AllObjectsOfTypes=1]="AllObjectsOfTypes",e[e.AllObjectsOfSchema=2]="AllObjectsOfSchema"}(o||(t.ObjectSelectionMethod=o={}));class s extends r.DialogBase{constructor(e){super(i.ObjectSelectionMethodDialogTitle,"ObjectSelectionMethodDialog"),this.options=e,this.result={method:o.SpecificObjects,schema:void 0,objectTypes:[]},this.dialogObject.cancelButton.label=i.BackButtonLabel}async initialize(){const e="objectSelectionMethodRadioGroup";this.specificObjectsRadioButton=this.createRadioButton(i.ObjectSelectionMethodDialog_SpecificObjects,e,!0,(async e=>{await this.handleTypeChange(e)})),this.allObjectsOfTypesRadioButton=this.createRadioButton(i.ObjectSelectionMethodDialog_AllObjectsOfTypes,e,!1,(async e=>{await this.handleTypeChange(e)})),this.allObjectsOfSchemaRadioButton=this.createRadioButton(i.ObjectSelectionMethodDialog_AllObjectsOfSchema,e,!1,(async e=>{await this.handleTypeChange(e)}));const t=this.createGroup(i.ObjectSelectionMethodDialog_TypeLabel,[this.specificObjectsRadioButton,this.allObjectsOfTypesRadioButton,this.allObjectsOfSchemaRadioButton],!1);this.objectTypesTable=this.createTableList(i.ObjectTypeText,[i.ObjectTypesText],this.options.objectTypes,this.result.objectTypes,r.DefaultMaxTableRowCount,r.DefaultTableListItemEnabledStateGetter,(e=>[e.displayName]),((e,t)=>e.name===t.name));const n=this.createDropdown(i.ObjectSelectionMethodDialog_SelectSchemaDropdownLabel,(async e=>{this.result.schema=e}),this.options.schemas,this.options.schemas[0]);this.schemaRow=this.createLabelInputContainer(i.ObjectSelectionMethodDialog_SelectSchemaDropdownLabel,n),await this.setComponentsVisibility(!1,!1),this.formContainer.addItems([t,this.schemaRow,this.objectTypesTable],this.getSectionItemLayout())}async handleTypeChange(e){let t=o.SpecificObjects,n=!1,r=!1;await this.setComponentsVisibility(r,n),this.allObjectsOfTypesRadioButton.checked?(t=o.AllObjectsOfTypes,n=!1,r=!0):this.allObjectsOfSchemaRadioButton.checked&&(t=o.AllObjectsOfSchema,n=!0,r=!1),this.result.method=t,await this.setComponentsVisibility(r,n)}async setComponentsVisibility(e,t){await this.schemaRow.updateCssStyles({display:t?"flex":"none"}),await this.objectTypesTable.updateCssStyles({display:e?"block":"none"})}get dialogResult(){return this.result}async onFormFieldChange(){this.dialogObject.okButton.enabled=this.result.method!==o.AllObjectsOfTypes||this.result.objectTypes.length>0}}t.ObjectSelectionMethodDialog=s},8358:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PrincipalDialogBase=void 0;const r=n(235),i=n(8430),o=n(5824),s=n(6385),a=n(9934),c=n(8991),l=n(971);class u extends o.ObjectManagementDialogBase{constructor(e,t){super(e,t),this.dialogOptions=t,this.securablePermissions=[]}async initializeUI(){this.securablePermissions=(0,a.deepClone)(this.objectInfo.securablePermissions)??[],this.initializeSecurableSection()}initializeSecurableSection(){const e=[],t=[i.NameText,i.ObjectTypeText];this.dialogOptions.isDatabaseLevelPrincipal&&t.splice(1,0,i.SchemaText),this.securableTable=this.createTable(i.SecurablesText,t,this.getSecurableTableData());const n={buttonAriaLabel:i.AddSecurableAriaLabel,buttonHandler:e=>this.onAddSecurableButtonClicked(e)},o={buttonAriaLabel:i.RemoveSecurableAriaLabel,buttonHandler:()=>this.onRemoveSecurableButtonClicked()},s=this.addButtonsForTable(this.securableTable,n,o);this.disposables.push(this.securableTable.onRowSelected((async()=>{await this.updatePermissionsTable()}))),this.explicitPermissionTableLabel=this.modelView.modelBuilder.text().withProps({value:i.ExplicitPermissionsTableLabel}).component(),this.permissionTable=this.modelView.modelBuilder.table().withProps({ariaLabel:i.ExplicitPermissionsTableLabel,columns:[{type:r.ColumnType.text,value:i.PermissionColumnHeader},{type:r.ColumnType.text,value:i.GrantorColumnHeader},{type:r.ColumnType.checkBox,value:i.GrantColumnHeader},{type:r.ColumnType.checkBox,value:i.WithGrantColumnHeader},{type:r.ColumnType.checkBox,value:i.DenyColumnHeader}],data:[],height:(0,c.getTableHeight)(0),width:c.DefaultTableWidth}).component(),this.disposables.push(this.permissionTable.onCellAction((async e=>{const t=this.permissionTable.data[e.row][0],n=this.securablePermissions[this.securableTable.selectedRows[0]];let r=n.permissions.find((e=>e.permission===t));r||(r={permission:t,grantor:""},n.permissions.push(r)),2===e.column?(r.grant=!!e.checked||void 0,e.checked||(r.withGrant=void 0)):3===e.column?(r.withGrant=!!e.checked||void 0,e.checked&&(r.grant=!0)):4===e.column&&(r.grant=!e.checked&&void 0,e.checked&&(r.withGrant=void 0)),await this.updatePermissionsTable(),this.updateSecurablePermissions(),this.permissionTable.setActiveCell(e.row,e.column)}))),e.push(this.securableTable,s,this.explicitPermissionTableLabel,this.permissionTable),this.showEffectivePermissions&&(this.effectivePermissionTableLabel=this.modelView.modelBuilder.text().withProps({value:i.EffectivePermissionsTableLabel}).component(),this.effectivePermissionTable=this.createTable(i.EffectivePermissionsTableLabel,[i.PermissionColumnHeader],[]),e.push(this.effectivePermissionTableLabel,this.effectivePermissionTable)),this.securableSection=this.createGroup(i.SecurablesText,e,!0,!0)}async onAddSecurableButtonClicked(e){const t=[];if(this.dialogOptions.isDatabaseLevelPrincipal){const e=new l.ObjectSelectionMethodDialog({objectTypes:this.viewInfo.supportedSecurableTypes,schemas:this.viewInfo.schemas});await e.open();const n=await e.waitForClose();if(n)switch(n.method){case l.ObjectSelectionMethod.AllObjectsOfTypes:t.push(...await this.searchForObjects(n.objectTypes.map((e=>e.name))));break;case l.ObjectSelectionMethod.AllObjectsOfSchema:t.push(...await this.searchForObjects(this.viewInfo.supportedSecurableTypes.map((e=>e.name)),n.schema));break;default:const e=await this.openFindObjectsDialog();e&&t.push(...e.selectedObjects)}}else{const e=await this.openFindObjectsDialog();e&&t.push(...e.selectedObjects)}if(t.length>0){t.forEach((e=>{if(this.securablePermissions.find((t=>t.type===e.type&&t.name===e.name&&t.schema===e.schema)))return;const t=this.viewInfo.supportedSecurableTypes.find((t=>t.name===e.type));this.securablePermissions.push({name:e.name,schema:e.schema,type:e.type,permissions:t.permissions.map((e=>({permission:e.name,grantor:"",grant:void 0,withGrant:void 0}))),effectivePermissions:[]})}));const e=this.getSecurableTableData();await this.setTableData(this.securableTable,e)}else this.dialogObject.message={text:i.NoSecurableObjectsFoundInfoMessage,level:r.window.MessageLevel.Information};await e.focus()}async searchForObjects(e,t=void 0){this.updateLoadingStatus(!0,i.LoadingObjectsText);const n=await this.objectManagementService.search(this.contextId,e,void 0,t);return this.updateLoadingStatus(!1,i.LoadingObjectsText,i.LoadingObjectsCompletedText(n.length)),n}async openFindObjectsDialog(){const e=new s.FindObjectDialog(this.objectManagementService,{objectTypes:this.viewInfo.supportedSecurableTypes,selectAllObjectTypes:!1,multiSelect:!0,contextId:this.contextId,title:i.SelectSecurablesDialogTitle,showSchemaColumn:this.dialogOptions.isDatabaseLevelPrincipal});return await e.open(),await e.waitForClose()}async onRemoveSecurableButtonClicked(){if(1===this.securableTable.selectedRows.length){this.securablePermissions.splice(this.securableTable.selectedRows[0],1);const e=this.getSecurableTableData();await this.setTableData(this.securableTable,e),this.updateSecurablePermissions()}}getSecurableTableData(){return this.securablePermissions.map((e=>{const t=[e.name,this.getSecurableTypeDisplayName(e.type)];return this.dialogOptions.isDatabaseLevelPrincipal&&t.splice(1,0,e.schema),t}))}async updatePermissionsTable(){let e=[],t=[],n=i.ExplicitPermissionsTableLabel,r=i.EffectivePermissionsTableLabel;if(1===this.securableTable.selectedRows.length){const o=this.securablePermissions[this.securableTable.selectedRows[0]];if(o){const s=o.schema?`${o.schema}.${o.name}`:o.name;n=i.ExplicitPermissionsTableLabelSelected(s),r=i.EffectivePermissionsTableLabelSelected(s);const a=this.viewInfo.supportedSecurableTypes.find((e=>e.name===o.type));e=o.permissions.map((e=>[e.permission,e.grantor,{checked:!0===e.grant},{checked:!0===e.withGrant},{checked:!1===e.grant}])),e=a.permissions.map((e=>{const t=o.permissions.find((t=>t.permission===e.name));return[e.name,t?.grantor??"",{checked:!0===t?.grant},{checked:!0===t?.withGrant},{checked:!1===t?.grant}]})),t=o.effectivePermissions.map((e=>[e]))}}this.explicitPermissionTableLabel.value=n,await this.setTableData(this.permissionTable,e),this.showEffectivePermissions&&(this.effectivePermissionTableLabel.value=r,await this.setTableData(this.effectivePermissionTable,t))}updateSecurablePermissions(){this.objectInfo.securablePermissions=(0,a.deepClone)(this.securablePermissions.filter((e=>e.permissions.some((e=>void 0!==e.grant))))),this.objectInfo.securablePermissions.forEach((e=>{e.permissions=e.permissions.filter((e=>void 0!==e.grant))})),this.onFormFieldChange()}getSecurableTypeDisplayName(e){const t=this.viewInfo.supportedSecurableTypes.find((t=>t.name===e));return t?t.displayName:e}get showEffectivePermissions(){return!this.dialogOptions.isNewObject&&this.dialogOptions.supportEffectivePermissions}}t.PrincipalDialogBase=u},4770:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RestoreDatabaseDialog=void 0;const r=n(235),i=n(8430),o=n(8430),s=n(5824),a=n(8991),c=n(1159),l=n(4848),u=n(1159),d=n(1428),p=a.DefaultInputWidth+650,h=a.DefaultTableWidth+650,f=a.DefaultInputWidth+600;class m extends s.ObjectManagementDialogBase{constructor(e,t){t.width="1150px",super(e,t,i.RestoreDatabaseDialogTitle,"RestoreDatabase"),this.generalTabId="restoreGeneralDatabaseId",this.filesTabId="restoreFilesDatabaseId",this.optionsTabId="restoreOptionsDatabaseId",this.backupFilePath="",this.backupURLPath="",this.restoreProvider=r.dataprotocol.getProvider("MSSQL",r.DataProviderType.RestoreProvider),this.dialogObject.okButton.label=o.RestoreText}get helpUrl(){return this.restoreDialogDocUrl}get saveChangesTaskLabel(){return i.RestoreDatabaseOperationDisplayName(this.objectInfo.name)}get isDirty(){return this.objectInfo.restorePlanResponse?.backupSetsToRestore?.filter((e=>!0===e.isSelected)).length>0}get opensEditorSeparately(){return!0}get startTaskOnApply(){return!1}get restoreDialogDocUrl(){let e="";switch(this.activeTabId){case this.generalTabId:e=c.RestoreDatabaseGeneralTabDocUrl;break;case this.filesTabId:e=c.RestoreDatabaseFilesTabDocUrl;break;case this.optionsTabId:e=c.RestoreDatabaseOptionsTabDocUrl}return e}async initializeUI(){const e=[];this.generalTab={title:o.GeneralSectionHeader,id:this.generalTabId,content:this.createGroup("",[this.initializeSourceSection(),this.initializeDestinationSection(),this.initializeRestorePlanSection()],!1)},e.push(this.generalTab),this.isManagedInstance||(this.filesTab={title:o.FilesSectionHeader,id:this.filesTabId,content:this.createGroup("",[this.initializeRestoreDatabaseFilesSection(),this.initializeRestoreDatabaseFilesDetailsSection()],!1)},e.push(this.filesTab),this.optionsTab={title:o.OptionsSectionHeader,id:this.optionsTabId,content:this.createGroup("",[this.initializeRestoreOptionsSection(),this.initializeTailLogBackupSection(),this.initializeServerConnectionsSection()],!1)},e.push(this.optionsTab));const t={title:"",tabs:e},n=this.modelView.modelBuilder.tabbedPanel().withTabs([t]).withProps({CSSStyles:{margin:"-10px 0px 0px -10px"}}).component();this.disposables.push(n.onTabChanged((async e=>{this.activeTabId=e}))),this.formContainer.addItem(n)}async validateInput(){const e=await super.validateInput();return this.isManagedInstance&&this.viewInfo.restoreDatabaseInfo.targetDatabaseNames.includes(this.targetDatabase.value.toString())&&e.push(o.DatabaseAlreadyExists(this.targetDatabase.value.toString())),e}async generateScript(){let e=this.createRestoreInfo();e.taskExecutionMode=r.TaskExecutionMode.script;let t=await this.restoreProvider.restore(this.options.connectionUri,e);if(!(0,l.isUndefinedOrNull)(t.errorMessage))throw new Error(t.errorMessage)}async saveChanges(e,t){let n=this.createRestoreInfo();n.taskExecutionMode=r.TaskExecutionMode.execute;let i=await this.restoreProvider.restore(this.options.connectionUri,n);if(!(0,l.isUndefinedOrNull)(i.errorMessage))throw new Error(i.errorMessage)}createRestoreInfo(){const e=this.restoreFrom.value===o.RestoreFromBackupFileOptionText,t=this.restoreFrom.value===o.RestoreFromDatabaseOptionText;let n={};return Object.entries(this.objectInfo.restorePlanResponse?.planDetails).forEach((([e,t])=>{null!==t&&void 0!==t.currentValue&&(n[e]=t.currentValue)})),n.sessionId=this.objectInfo.restorePlanResponse.sessionId,n.backupFilePaths=this.isManagedInstance||!t?this.backupFilePathInput.value:null,n.readHeaderFromMedia=!(!this.isManagedInstance&&!e),n.overwriteTargetDatabase=!1,n.selectedBackupSets=this.objectInfo.restorePlanResponse?.backupSetsToRestore?.filter((e=>e.isSelected)).map((e=>e.id)),n.deviceType=this.getRestoreMediaDeviceType(),n.targetDatabaseName=this.targetDatabase.value,{options:n}}initializeSourceSection(){let e=[];this.isManagedInstance=this.viewInfo.isManagedInstance;const t=this.isManagedInstance?[o.RestoreFromUrlText,o.RestoreFromS3UrlText]:[o.RestoreFromDatabaseOptionText,o.RestoreFromBackupFileOptionText,o.RestoreFromUrlText,o.RestoreFromS3UrlText];this.restoreFrom=this.createDropdown(o.RestoreFromText,(async e=>{if(e===o.RestoreFromBackupFileOptionText||e===o.RestoreFromUrlText){this.backupFilePathContainer.display="inline-flex",this.restoreDatabase.enabled=!1,this.backupFilePathInput.enabled=!1;const t=e===o.RestoreFromUrlText?this.backupURLPath:this.backupFilePath;await this.backupFilePathInput.updateProperties({value:t,values:[t]})}else if(e===o.RestoreFromDatabaseOptionText)this.backupFilePathContainer.display="none",this.restoreDatabase.enabled=!0;else if(e===o.RestoreFromS3UrlText){this.backupFilePathInput.enabled=!0,this.backupFilePathContainer.display="inline-flex",this.restoreDatabase.enabled=!1;const e=(await this.objectManagementService.getCredentialNames(this.options.connectionUri)).filter((e=>e.startsWith("s3://")));e.unshift(""),await this.backupFilePathInput.updateProperties({value:"",values:e})}await this.updateNewRestorePlanToDialog()}),t,t[0],!this.isManagedInstance,p),e.push(this.createLabelInputContainer(o.RestoreFromText,this.restoreFrom)),this.backupFilePathInput=this.createDropdown(o.BackupFilePathText,(async e=>{await this.updateNewRestorePlanToDialog()}),[""],o.BackupFolderPathTitle,!1,p-30,!1,!0),this.backupFilePathButton=this.createButton("...",o.BrowseFilesLabel,(async()=>{switch(this.restoreFrom.value){case o.RestoreFromUrlText:await this.createBackupUrlFileBrowser();break;case o.RestoreFromBackupFileOptionText:await this.createBackupFileBrowser();break;case o.RestoreFromS3UrlText:await this.createRestoreS3Url()}await this.updateNewRestorePlanToDialog()})),this.backupFilePathButton.width=25,this.backupFilePathContainer=this.createLabelInputContainer(o.BackupFilePathText,this.backupFilePathInput),this.backupFilePathContainer.addItems([this.backupFilePathButton],{flex:"10 0 auto"}),this.backupFilePathContainer.display=this.isManagedInstance?"inline-flex":"none",e.push(this.backupFilePathContainer),this.restoreDatabase=this.isManagedInstance?this.createDropdown(o.DatabaseText,(async()=>{}),[],"",!1,p-20,!1,!1):this.createDropdown(o.DatabaseText,(async e=>{this.restoreFrom.value!==o.RestoreFromUrlText&&(this.objectInfo.restorePlanResponse.planDetails.sourceDatabaseName.currentValue=e,this.targetDatabase.value=e,await this.updateNewRestorePlanToDialog())}),this.viewInfo.restoreDatabaseInfo.sourceDatabaseNames,this.objectInfo.restorePlanResponse?.planDetails.sourceDatabaseName.currentValue,!0,p,!1);const n=this.createLabelInputContainer(o.DatabaseText,this.restoreDatabase);return n.CSSStyles={"margin-left":this.isManagedInstance?"20px":"0px"},e.push(n),this.createGroup(o.SourceSectionText,e,!0)}initializeDestinationSection(){let e=[];this.targetDatabase=this.createDropdown(this.isManagedInstance?o.DatabaseText:o.TargetDatabaseText,(async e=>{null!==this.objectInfo.restorePlanResponse&&(this.objectInfo.restorePlanResponse.planDetails.targetDatabaseName.currentValue=e),this.objectInfo.name=e}),this.viewInfo.restoreDatabaseInfo.targetDatabaseNames,this.objectInfo.restorePlanResponse?.planDetails.targetDatabaseName.currentValue,!0,p,!0,!1),this.targetDatabase.fireOnTextChange=!0,this.targetDatabase.required=!0,e.push(this.createLabelInputContainer(this.isManagedInstance?o.DatabaseText:o.TargetDatabaseText,this.targetDatabase));const t={ariaLabel:o.RestoreToText,required:!1,enabled:!1,width:p,value:this.objectInfo.restorePlanResponse?.planDetails.lastBackupTaken.currentValue};return this.restoreTo=this.createInputBox((async()=>{}),t),e.push(this.createLabelInputContainer(o.RestoreToText,this.restoreTo)),this.createGroup(o.DestinationSectionText,e,!0)}initializeRestorePlanSection(){return this.restorePlanTable=this.modelView.modelBuilder.table().withProps({columns:[{type:r.ColumnType.checkBox,value:o.RestoreText},{type:r.ColumnType.text,value:o.NameText,width:200},{type:r.ColumnType.text,value:o.ComponentText,width:70},{type:r.ColumnType.text,value:o.TypeText,width:35},{type:r.ColumnType.text,value:o.ServerText,width:75},{type:r.ColumnType.text,value:o.DatabaseText,width:75},{type:r.ColumnType.text,value:o.PositionText,width:48},{type:r.ColumnType.text,value:o.FirstLSNText,width:52},{type:r.ColumnType.text,value:o.LastLSNText,width:52},{type:r.ColumnType.text,value:o.CheckpointLSNText,width:88},{type:r.ColumnType.text,value:o.FullLSNText,width:50},{type:r.ColumnType.text,value:o.StartDateText,width:85},{type:r.ColumnType.text,value:o.FinishDateText,width:82},{type:r.ColumnType.text,value:o.SizeText,width:50},{type:r.ColumnType.text,value:o.UserNameText,width:65},{type:r.ColumnType.text,value:o.ExpirationText,width:60}],data:this.objectInfo.restorePlanResponse?.backupSetsToRestore?.map((e=>this.convertRestorePlanObjectToDataView(e))),height:(0,a.getTableHeight)(this.objectInfo.restorePlanResponse?.backupSetsToRestore?.length,a.DefaultMinTableRowCount,a.DefaultMaxTableRowCount),width:h,forceFitColumns:r.ColumnSizingMode.DataFit,CSSStyles:{"margin-left":"10px"}}).component(),this.disposables.push(this.restorePlanTable.onCellAction((async e=>{let t=this.objectInfo.restorePlanResponse?.backupSetsToRestore;if(e.checked)for(let n=e.row;n>=0;n--)t[n].isSelected=e.checked;else for(let n=e.row;n<t.length;n++)t[n].isSelected=e.checked;const n=t?.map((e=>this.convertRestorePlanObjectToDataView(e)));await this.setTableData(this.restorePlanTable,n),this.onFormFieldChange()}))),this.createGroup(o.RestorePlanSectionText,[this.restorePlanTable],!0)}convertRestorePlanObjectToDataView(e){return[e.isSelected,e.properties[0].propertyValueDisplayName,e.properties[1].propertyValueDisplayName,e.properties[2].propertyValueDisplayName,e.properties[3].propertyValueDisplayName,e.properties[4].propertyValueDisplayName,e.properties[5].propertyValueDisplayName,e.properties[6].propertyValueDisplayName,e.properties[7].propertyValueDisplayName,e.properties[8].propertyValueDisplayName,e.properties[9].propertyValueDisplayName,e.properties[10].propertyValueDisplayName,e.properties[11].propertyValueDisplayName,e.properties[12].propertyValueDisplayName,e.properties[13].propertyValueDisplayName,e.properties[14].propertyValueDisplayName]}async createBackupFileBrowser(){let e=await this.objectManagementService.getBackupFolder(this.options.connectionUri),t=await r.window.openServerFileBrowserDialog(this.options.connectionUri,e,[{label:o.allFiles,filters:["*.bak"]}]);t?.length>0&&(this.backupFilePath=t,await this.backupFilePathInput.updateProperties({value:this.backupFilePath,values:[this.backupFilePath]}))}async createDataFileBrowser(e){let t=await this.objectManagementService.getDataFolder(this.options.connectionUri),n=await r.window.openServerFileBrowserDialog(this.options.connectionUri,t,[{label:o.allFiles,filters:[]}],!0);n?.length>0&&(e.value=n)}async createBackupUrlFileBrowser(){let e=await r.window.openBackupUrlBrowserDialog(this.options.connectionUri,"",!0);e&&!e.includes("undefined")&&(this.backupURLPath=e,await this.backupFilePathInput.updateProperties({value:this.backupURLPath,values:[this.backupURLPath]}))}async createRestoreS3Url(){const e=new d.S3AddBackupFileDialog(this.objectManagementService,this.options.connectionUri);await e.open();let t=await e.waitForClose();if(t){this.backupURLPath=t.backupFilePath;const e=this.backupFilePathInput.values.map((e=>e.toString()));e.push(this.backupURLPath),await this.backupFilePathInput.updateProperties({value:this.backupURLPath,values:e})}}getRestoreMediaDeviceType(){return this.restoreFrom.value===o.RestoreFromBackupFileOptionText?u.MediaDeviceType.File:u.MediaDeviceType.Url}async updateNewRestorePlanToDialog(){this.dialogObject.loading=!0;try{const e=this.setRestoreOption(),t=await this.restoreProvider.getRestorePlan(this.options.connectionUri,e);await this.updateRestoreDialog(t)}finally{this.dialogObject.loading=!1}}setRestoreOption(){const e=this.restoreFrom.value===o.RestoreFromDatabaseOptionText;let t={targetDatabaseName:this.objectInfo.restorePlanResponse?.planDetails?.targetDatabaseName?.currentValue,sourceDatabaseName:e?this.objectInfo.restorePlanResponse?.planDetails?.sourceDatabaseName?.currentValue:null,relocateDbFiles:this.objectInfo.restorePlanResponse?.planDetails?.relocateDbFiles?.currentValue,readHeaderFromMedia:!e,overwriteTargetDatabase:!0,backupFilePaths:e?null:this.backupFilePathInput.value,deviceType:this.getRestoreMediaDeviceType()};return{taskExecutionMode:r.TaskExecutionMode.execute,options:t}}async updateRestoreDialog(e){if(this.objectInfo.restorePlanResponse=e,this.restoreFrom.value===o.RestoreFromDatabaseOptionText)await this.restoreDatabase.updateProperties({values:this.viewInfo.restoreDatabaseInfo.sourceDatabaseNames,value:e.planDetails?.sourceDatabaseName?.currentValue});else{let t=e.planDetails?.sourceDatabaseName?.currentValue??"";await this.restoreDatabase.updateProperties({values:[t],value:t})}var t=e?.backupSetsToRestore?.map((e=>this.convertRestorePlanObjectToDataView(e)));if(await this.setTableData(this.restorePlanTable,t,a.DefaultMaxTableRowCount),await this.restoreTo.updateProperty("value",e.planDetails.lastBackupTaken.currentValue),!this.isManagedInstance){var n=e.dbFiles?.map((e=>this.convertToRestoreDbTableDataView(e)));await this.setTableData(this.restoreDatabaseTable,n,a.DefaultMaxTableRowCount),this.relocateAllFiles.checked=e.planDetails.relocateDbFiles.defaultValue,this.relocateAllFiles.enabled=!e.planDetails.relocateDbFiles.isReadOnly,await this.standByFileInput.updateProperty("value",e.planDetails.standbyFile.defaultValue),this.takeTailLogBackup.checked=e.planDetails.backupTailLog.defaultValue,this.takeTailLogBackup.enabled=!e.planDetails.backupTailLog.isReadOnly,this.leaveSourceDB.checked=e.planDetails.tailLogWithNoRecovery.defaultValue,this.leaveSourceDB.enabled=!e.planDetails.tailLogWithNoRecovery.isReadOnly,await this.tailLogBackupFile.updateProperty("value",e.planDetails.tailLogBackupFile.defaultValue),this.closeExistingConnections.checked=e.planDetails.closeExistingConnections.defaultValue,this.closeExistingConnections.enabled=!e.planDetails.closeExistingConnections.isReadOnly}}initializeRestoreDatabaseFilesSection(){let e=[];return this.relocateAllFiles=this.createCheckbox(o.RelocateAllFilesText,(async e=>{this.objectInfo.restorePlanResponse.planDetails.relocateDbFiles.currentValue=e,this.dataFileFolder.enabled=this.logFileFolder.enabled=this.dataFileFolderButton.enabled=this.logFileFolderButton.enabled=e}),this.objectInfo.restorePlanResponse.planDetails.relocateDbFiles.defaultValue,!this.objectInfo.restorePlanResponse.planDetails.relocateDbFiles.isReadOnly),e.push(this.relocateAllFiles),this.dataFileFolder=this.createInputBox((async e=>{this.objectInfo.restorePlanResponse.planDetails.dataFileFolder.currentValue=e}),{ariaLabel:o.DataFileFolderText,inputType:"text",enabled:!1,value:this.objectInfo.restorePlanResponse.planDetails.dataFileFolder.defaultValue,width:f}),this.dataFileFolderButton=this.createButton("...",o.BrowseFilesLabel,(async()=>{await this.createDataFileBrowser(this.dataFileFolder)})),this.dataFileFolderButton.width=25,this.dataFileFolderButton.enabled=!1,this.dataFileFolderContainer=this.createLabelInputContainer(o.DataFileFolderText,this.dataFileFolder),this.dataFileFolderContainer.addItems([this.dataFileFolderButton],{flex:"10 0 auto"}),this.dataFileFolderContainer.CSSStyles={"margin-left":"20px"},e.push(this.dataFileFolderContainer),this.logFileFolder=this.createInputBox((async e=>{this.objectInfo.restorePlanResponse.planDetails.logFileFolder.currentValue=e}),{ariaLabel:o.LogFileFolderText,inputType:"text",enabled:!1,value:this.objectInfo.restorePlanResponse.planDetails.logFileFolder.defaultValue,width:f}),this.logFileFolderButton=this.createButton("...",o.BrowseFilesLabel,(async()=>{await this.createDataFileBrowser(this.logFileFolder)})),this.logFileFolderButton.width=25,this.logFileFolderButton.enabled=!1,this.logFileFolderContainer=this.createLabelInputContainer(o.LogFileFolderText,this.logFileFolder),this.logFileFolderContainer.addItems([this.logFileFolderButton],{flex:"10 0 auto"}),this.logFileFolderContainer.CSSStyles={"margin-left":"20px"},e.push(this.logFileFolderContainer),this.createGroup(o.RestoreDatabaseFilesAsText,e,!0)}initializeRestoreDatabaseFilesDetailsSection(){return this.restoreDatabaseTable=this.modelView.modelBuilder.table().withProps({columns:[{type:r.ColumnType.text,value:o.LogicalFileNameText},{type:r.ColumnType.text,value:o.FileTypeText},{type:r.ColumnType.text,value:o.OriginalFileNameText},{type:r.ColumnType.text,value:o.RestoreAsText}],data:this.objectInfo.restorePlanResponse.dbFiles?.map((e=>this.convertToRestoreDbTableDataView(e))),height:(0,a.getTableHeight)(this.objectInfo.restorePlanResponse.dbFiles?.length,a.DefaultMinTableRowCount,a.DefaultMaxTableRowCount),forceFitColumns:r.ColumnSizingMode.DataFit,width:h,CSSStyles:{"margin-left":"10px"}}).component(),this.createGroup(o.RestoreDatabaseFileDetailsText,[this.restoreDatabaseTable],!0)}convertToRestoreDbTableDataView(e){return[e.logicalFileName,e.fileType,e.originalFileName,e.restoreAsFileName]}initializeRestoreOptionsSection(){let e=[];this.overwriteExistingDatabase=this.createCheckbox(o.OverwriteTheExistingDatabaseText,(async e=>{this.objectInfo.restorePlanResponse.planDetails.replaceDatabase.currentValue=e}),this.objectInfo.restorePlanResponse.planDetails.replaceDatabase.defaultValue),e.push(this.overwriteExistingDatabase),this.preserveReplicationSettings=this.createCheckbox(o.PreserveReplicationSettingsText,(async e=>{this.objectInfo.restorePlanResponse.planDetails.keepReplication.currentValue=e}),this.objectInfo.restorePlanResponse.planDetails.keepReplication.defaultValue),e.push(this.preserveReplicationSettings),this.restrictAccessToRestoredDB=this.createCheckbox(o.RestrictAccessToRestoredDBText,(async e=>{this.objectInfo.restorePlanResponse.planDetails.setRestrictedUser.currentValue=e}),this.objectInfo.restorePlanResponse.planDetails.setRestrictedUser.defaultValue),e.push(this.restrictAccessToRestoredDB);let t=this.createDropdown(o.RecoveryStateText,(async e=>{this.toggleRestoreOptionsOnRecoveryStateOptions(e),this.objectInfo.restorePlanResponse.planDetails.recoveryState.currentValue=this.viewInfo.restoreDatabaseInfo.recoveryStateOptions.find((t=>t.displayName===e)).name}),this.viewInfo.restoreDatabaseInfo.recoveryStateOptions.map((e=>e.displayName)),this.viewInfo.restoreDatabaseInfo.recoveryStateOptions.find((e=>e.name===this.objectInfo.restorePlanResponse.planDetails.recoveryState.defaultValue)).displayName,!0,p,!0,!0);e.push(this.createLabelInputContainer(o.RecoveryStateText,t));const n={ariaLabel:o.StandbyFileText,required:!1,enabled:!1,width:p-20,value:this.objectInfo.restorePlanResponse.planDetails.standbyFile.defaultValue};this.standByFileInput=this.createInputBox((async e=>{this.objectInfo.restorePlanResponse.planDetails.standbyFile.currentValue=e}),n);const r=this.createLabelInputContainer(o.StandbyFileText,this.standByFileInput);return r.CSSStyles={"margin-left":"20px"},e.push(r),this.createGroup(o.RestoreOptionsText,e,!0)}initializeTailLogBackupSection(){let e=[];this.takeTailLogBackup=this.createCheckbox(o.TakeTailLogBackupBeforeRestoreText,(async e=>{this.objectInfo.restorePlanResponse.planDetails.backupTailLog.currentValue=e,this.leaveSourceDB.enabled=e,this.tailLogBackupFile.enabled=e}),this.objectInfo.restorePlanResponse.planDetails.backupTailLog.defaultValue,!this.objectInfo.restorePlanResponse.planDetails.backupTailLog.isReadOnly),e.push(this.takeTailLogBackup),this.leaveSourceDB=this.createCheckbox(o.LeaveSourceDBText,(async e=>{this.objectInfo.restorePlanResponse.planDetails.tailLogWithNoRecovery.currentValue=e}),this.objectInfo.restorePlanResponse.planDetails.tailLogWithNoRecovery.defaultValue,!this.objectInfo.restorePlanResponse.planDetails.tailLogWithNoRecovery.isReadOnly),this.leaveSourceDB.CSSStyles={"margin-left":"20px"},e.push(this.leaveSourceDB);const t={ariaLabel:o.TailLogBackupFileText,required:!1,enabled:!0,width:p-20,value:this.objectInfo.restorePlanResponse.planDetails.tailLogBackupFile.defaultValue};this.tailLogBackupFile=this.createInputBox((async e=>{this.objectInfo.restorePlanResponse.planDetails.tailLogBackupFile.currentValue=e}),t);const n=this.createLabelInputContainer(o.TailLogBackupFileText,this.tailLogBackupFile);return n.CSSStyles={"margin-left":"20px"},e.push(n),this.createGroup(o.RestoreTailLogBackupText,e,!0)}initializeServerConnectionsSection(){return this.closeExistingConnections=this.createCheckbox(o.CloseExistingConnectionText,(async e=>{this.objectInfo.restorePlanResponse.planDetails.closeExistingConnections.currentValue=e}),this.objectInfo.restorePlanResponse.planDetails.closeExistingConnections.defaultValue),this.createGroup(o.RestoreServerConnectionsOptionsText,[this.closeExistingConnections],!0)}toggleRestoreOptionsOnRecoveryStateOptions(e){let t=!0,n=!1;e===this.viewInfo.restoreDatabaseInfo.recoveryStateOptions[1].displayName?t=!1:e===this.viewInfo.restoreDatabaseInfo.recoveryStateOptions[2].displayName&&(n=!0),this.preserveReplicationSettings.enabled=t,this.standByFileInput.enabled=n}}t.RestoreDatabaseDialog=m},555:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ServerPropertiesDialog=void 0;const r=n(235),i=n(1398),o=n(5824),s=n(8991),a=n(8430),c=n(1159),l=n(5524),u=n(4848);class d extends o.ObjectManagementDialogBase{constructor(e,t){super(e,t),this.generalTabId="generalId",this.memoryTabId="memoryId",this.processorsTabId="processorsId",this.securityTabId="securityId",this.databaseSettingsTabId="databaseSettingsId",this.advancedTabId="advancedId",this.shouldRestartServer=!1}async handleDialogClosed(e){return"ok"===e&&await this.notifyServerRestart(),await super.handleDialogClosed(e)}get helpUrl(){let e="";switch(this.activeTabId){case this.generalTabId:e=c.ViewGeneralServerPropertiesDocUrl;break;case this.memoryTabId:e=c.ViewMemoryServerPropertiesDocUrl;break;case this.processorsTabId:e=c.ViewProcessorsServerPropertiesDocUrl;break;case this.securityTabId:e=c.ViewSecurityServerPropertiesDocUrl;break;case this.databaseSettingsTabId:e=c.ViewDatabaseSettingsPropertiesDocUrl;break;case this.advancedTabId:e=c.ViewAdvancedServerPropertiesDocUrl}return e}async initializeUI(){const e=await r.connection.getServerInfo(this.options.objectExplorerContext.connectionProfile.id);this.engineEdition=e.engineEditionId,this.initializeGeneralSection(),this.initializeMemorySection(),this.initializeProcessorsSection(),this.initializeSecuritySection(),this.initializeDatabaseSettingsSection(),this.initializeAdvancedSection();const t={title:"",tabs:[this.generalTab,this.memoryTab,this.processorsTab,this.securityTab,this.databaseSettingsTab,this.advancedTab]},n=this.modelView.modelBuilder.tabbedPanel().withTabs([t]).withLayout({orientation:r.TabOrientation.Vertical}).withProps({CSSStyles:{margin:"-10px 0px 0px -10px"}}).component();this.disposables.push(n.onTabChanged((async e=>{this.activeTabId=e}))),this.formContainer.addItem(n)}initializeGeneralSection(){let e=[];if(this.objectInfo.hardwareGeneration){this.hardwareGenerationInput=this.createInputBox((async()=>{}),{ariaLabel:a.HardwareGenerationText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.hardwareGeneration.toString()});const t=this.createLabelInputContainer(a.HardwareGenerationText,this.hardwareGenerationInput);e.push(t)}this.nameInput=this.createInputBox((async()=>{}),{ariaLabel:a.NameText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.name});const t=this.createLabelInputContainer(a.NameText,this.nameInput);e.push(t),this.languageDropdown=this.createDropdown(a.LanguageText,(async()=>{}),[this.objectInfo.language],this.objectInfo.language,this.options.isNewObject);const n=this.createLabelInputContainer(a.LanguageText,this.languageDropdown);e.push(n),this.memoryInput=this.createInputBox((async()=>{}),{ariaLabel:a.MemoryText,inputType:"text",enabled:this.options.isNewObject,value:a.StringValueInMB(this.objectInfo.memoryInMB.toString())});const r=this.createLabelInputContainer(a.MemoryText,this.memoryInput);e.push(r),this.operatingSystemInput=this.createInputBox((async()=>{}),{ariaLabel:a.OperatingSystemText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.operatingSystem});const i=this.createLabelInputContainer(a.OperatingSystemText,this.operatingSystemInput);e.push(i),this.platformInput=this.createInputBox((async()=>{}),{ariaLabel:a.PlatformText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.platform});const o=this.createLabelInputContainer(a.PlatformText,this.platformInput);e.push(o),this.processorsInput=this.createInputBox((async()=>{}),{ariaLabel:a.ProcessorsText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.processors});const s=this.createLabelInputContainer(a.ProcessorsText,this.processorsInput);e.push(s);let c=[];this.isClusteredInput=this.createInputBox((async()=>{}),{ariaLabel:a.IsClusteredText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.isClustered.toString()});const l=this.createLabelInputContainer(a.IsClusteredText,this.isClusteredInput);c.push(l),this.isHadrEnabledInput=this.createInputBox((async()=>{}),{ariaLabel:a.IsHadrEnabledText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.isHadrEnabled.toString()});const d=this.createLabelInputContainer(a.IsHadrEnabledText,this.isHadrEnabledInput);if(c.push(d),!(0,u.isUndefinedOrNull)(this.objectInfo.isPolyBaseInstalled)){this.isPolyBaseInstalledInput=this.createInputBox((async()=>{}),{ariaLabel:a.IsPolyBaseInstalledText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.isPolyBaseInstalled.toString()});const e=this.createLabelInputContainer(a.IsPolyBaseInstalledText,this.isPolyBaseInstalledInput);c.push(e)}if(!(0,u.isUndefinedOrNull)(this.objectInfo.isXTPSupported)){this.isXTPSupportedInput=this.createInputBox((async()=>{}),{ariaLabel:a.IsXTPSupportedText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.isXTPSupported.toString()});const e=this.createLabelInputContainer(a.IsXTPSupportedText,this.isXTPSupportedInput);c.push(e)}this.productInput=this.createInputBox((async()=>{}),{ariaLabel:a.ProductText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.product});const p=this.createLabelInputContainer(a.ProductText,this.productInput);c.push(p),this.rootDirectoryInput=this.createInputBox((async()=>{}),{ariaLabel:a.RootDirectoryText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.rootDirectory});const h=this.createLabelInputContainer(a.RootDirectoryText,this.rootDirectoryInput);c.push(h),this.serverCollationInput=this.createInputBox((async()=>{}),{ariaLabel:a.ServerCollationText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.serverCollation});const f=this.createLabelInputContainer(a.ServerCollationText,this.serverCollationInput);c.push(f),this.versionInput=this.createInputBox((async()=>{}),{ariaLabel:a.VersionText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.version});const m=this.createLabelInputContainer(a.VersionText,this.versionInput);if(c.push(m),!(0,u.isUndefinedOrNull)(this.objectInfo.reservedStorageSizeMB)){this.reservedStorageSizeInMBInput=this.createInputBox((async()=>{}),{ariaLabel:a.ReservedStorageSizeInMBText,inputType:"text",enabled:this.options.isNewObject,value:a.StringValueInMB(this.objectInfo.reservedStorageSizeMB.toString())});const e=this.createLabelInputContainer(a.ReservedStorageSizeInMBText,this.reservedStorageSizeInMBInput);c.push(e)}if(this.objectInfo.serviceTier){this.serviceTierInput=this.createInputBox((async()=>{}),{ariaLabel:a.ServiceTierText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.serviceTier});const e=this.createLabelInputContainer(a.ServiceTierText,this.serviceTierInput);c.push(e)}if(!(0,u.isUndefinedOrNull)(this.objectInfo.storageSpaceUsageInMB)){this.storageSpaceUsageInMBInput=this.createInputBox((async()=>{}),{ariaLabel:a.StorageSpaceUsageInMBText,inputType:"text",enabled:this.options.isNewObject,value:a.StringValueInMB(this.objectInfo.storageSpaceUsageInMB.toString())});const e=this.createLabelInputContainer(a.StorageSpaceUsageInMBText,this.storageSpaceUsageInMBInput);c.push(e)}this.platformSection=this.createGroup("Platform",e,!0),this.sqlServerSection=this.createGroup("SQL Server",c,!0);const g=this.createGroup("",[this.platformSection,this.sqlServerSection]);this.generalTab=this.createTab(this.generalTabId,a.GeneralSectionHeader,g)}initializeMemorySection(){const e=this.engineEdition!==r.DatabaseEngineEdition.SqlManagedInstance,t={ariaLabel:a.minServerMemoryText,inputType:"number",enabled:e,max:this.objectInfo.minServerMemory.maximumValue,min:this.objectInfo.minServerMemory.minimumValue,value:this.objectInfo.minServerMemory.value.toString(),required:!0};this.minServerMemoryInput=this.createInputBox((async e=>{this.objectInfo.minServerMemory.value=+e}),t);const n=this.createLabelInputContainer(a.minServerMemoryText,this.minServerMemoryInput,!0),i={ariaLabel:a.maxServerMemoryText,inputType:"number",enabled:e,max:this.objectInfo.maxServerMemory.maximumValue,min:this.objectInfo.maxServerMemory.minimumValue,value:this.objectInfo.maxServerMemory.value.toString(),required:!0};this.maxServerMemoryInput=this.createInputBox((async e=>{this.objectInfo.maxServerMemory.value=+e}),i);const o=this.createLabelInputContainer(a.maxServerMemoryText,this.maxServerMemoryInput,!0);this.memorySection=this.createGroup("",[n,o],!1),this.memoryTab=this.createTab(this.memoryTabId,a.MemoryText,this.memorySection)}async validateInput(){const e=await super.validateInput();return this.objectInfo.maxServerMemory.value<this.objectInfo.minServerMemory.value&&e.push(a.serverMemoryMaxLowerThanMinInputError),e}async notifyServerRestart(){this.shouldRestartServer&&(await i.window.showInformationMessage(a.needToRestartServer,{modal:!0}),this.shouldRestartServer=!1)}initializeProcessorsSection(){const e=this.engineEdition!==r.DatabaseEngineEdition.SqlManagedInstance;let t=this.objectInfo.numaNodes,n=[],i=[];if(e)for(let e of t){let t=this.createProcessorTable(e);n.push(t),i.push(this.createGroup(a.serverNumaNodeLabel(e.numaNodeId),[t],!0))}this.autoSetProcessorAffinityMaskForAllCheckbox=this.createCheckbox(a.autoSetProcessorAffinityMaskForAllText,(async t=>{if(this.objectInfo.autoProcessorAffinityMaskForAll=t,e)for(let e of n){let n=e.data;for(let e=0;e<n.length;e++)t&&(n[e][l.AffinityType.ProcessorAffinity]=!1);await this.setTableData(e,n)}}),this.objectInfo.autoProcessorAffinityMaskForAll,e),this.autoSetProcessorIOAffinityMaskForAllCheckbox=this.createCheckbox(a.autoSetProcessorAffinityIOMaskForAllText,(async t=>{if(this.objectInfo.autoProcessorAffinityIOMaskForAll=t,e)for(let e of n){let n=e.data;for(let e=0;e<n.length;e++)t&&(n[e][l.AffinityType.IOAffinity]=!1);await this.setTableData(e,n),this.resetNumaNodes()}}),this.objectInfo.autoProcessorAffinityIOMaskForAll,e),this.processorsSection=this.createGroup("",[this.autoSetProcessorAffinityMaskForAllCheckbox,this.autoSetProcessorIOAffinityMaskForAllCheckbox],!1),this.processorsSection.addItems(i),this.processorsTab=this.createTab(this.processorsTabId,a.ProcessorsText,this.processorsSection)}createProcessorTable(e){const t="no-borders";let n=e.processors.map((e=>[a.serverCPULabel(e.processorId),e.affinity,e.ioAffinity])),i=this.createTable(a.processorLabel,[{name:a.processorColumnText,value:a.processorColumnText,type:r.ColumnType.text,cssClass:t,headerCssClass:t},{name:a.processorAffinityColumnText,value:a.processorAffinityColumnText,type:r.ColumnType.checkBox,width:s.DefaultColumnCheckboxWidth,action:r.ActionOnCellCheckboxCheck.customAction,cssClass:t,headerCssClass:t},{name:a.processorIOAffinityColumnText,value:a.processorIOAffinityColumnText,type:r.ColumnType.checkBox,width:s.DefaultColumnCheckboxWidth,action:r.ActionOnCellCheckboxCheck.customAction,cssClass:t,headerCssClass:t}],n);return this.disposables.push(i.onCellAction((async t=>{if(i.selectedRows.length>0){const n=i.data;let r=t,o=r.column===l.AffinityType.ProcessorAffinity?l.AffinityType.IOAffinity:l.AffinityType.ProcessorAffinity;n[r.row][o]&&(n[r.row][o]=!r.checked,i.updateCells=n[r.row]),r.column===l.AffinityType.ProcessorAffinity&&(this.autoSetProcessorAffinityMaskForAllCheckbox.checked=!1,this.objectInfo.autoProcessorAffinityMaskForAll=!1,this.objectInfo.numaNodes[+e.numaNodeId].processors[r.row].affinity=r.checked,this.objectInfo.numaNodes[+e.numaNodeId].processors[r.row].ioAffinity=!1),r.column===l.AffinityType.IOAffinity&&(this.autoSetProcessorIOAffinityMaskForAllCheckbox.checked=!1,this.objectInfo.autoProcessorAffinityIOMaskForAll=!1,this.objectInfo.numaNodes[+e.numaNodeId].processors[r.row].ioAffinity=r.checked,this.objectInfo.numaNodes[+e.numaNodeId].processors[r.row].affinity=!1),this.onFormFieldChange()}}))),i}resetNumaNodes(){for(let e of this.objectInfo.numaNodes)for(let t of e.processors)t.ioAffinity=!1}initializeSecuritySection(){const e=this.objectInfo.platform===c.Windows,t=this.engineEdition!==r.DatabaseEngineEdition.SqlManagedInstance&&e,n="serverAuthenticationRadioGroup";this.onlyWindowsAuthRadioButton=this.createRadioButton(a.onlyWindowsAuthModeText,n,1===this.objectInfo.authenticationMode,(async()=>{await this.handleAuthModeChange()})),this.sqlServerAndWindowsAuthRadioButton=this.createRadioButton(a.sqlServerAndWindowsAuthText,n,2===this.objectInfo.authenticationMode,(async()=>{await this.handleAuthModeChange()})),this.onlyWindowsAuthRadioButton.enabled=t,this.sqlServerAndWindowsAuthRadioButton.enabled=t;const i=this.createGroup(a.serverAuthenticationText,[this.onlyWindowsAuthRadioButton,this.sqlServerAndWindowsAuthRadioButton],!0),o="serverLoginsRadioGroup";this.noneRadioButton=this.createRadioButton(a.noLoginAuditingText,o,0===this.objectInfo.loginAuditing,(async()=>{await this.handleAuditLevelChange()})),this.failedLoginsOnlyRadioButton=this.createRadioButton(a.failedLoginsOnlyText,o,2===this.objectInfo.loginAuditing,(async()=>{await this.handleAuditLevelChange()})),this.successfulLoginsOnlyRadioButton=this.createRadioButton(a.successfulLoginsOnlyText,o,1===this.objectInfo.loginAuditing,(async()=>{await this.handleAuditLevelChange()})),this.bothFailedAndSuccessfulLoginsRadioButton=this.createRadioButton(a.bothFailedAndSuccessfulLoginsText,o,3===this.objectInfo.loginAuditing,(async()=>{await this.handleAuditLevelChange()})),this.noneRadioButton.enabled=e,this.failedLoginsOnlyRadioButton.enabled=e,this.successfulLoginsOnlyRadioButton.enabled=e,this.bothFailedAndSuccessfulLoginsRadioButton.enabled=e;const s=this.createGroup(a.loginAuditingText,[this.noneRadioButton,this.failedLoginsOnlyRadioButton,this.successfulLoginsOnlyRadioButton,this.bothFailedAndSuccessfulLoginsRadioButton],!0);this.securitySection=this.createGroup("",[i,s],!0),this.securityTab=this.createTab(this.securityTabId,a.securityText,this.securitySection)}async handleAuthModeChange(){this.onlyWindowsAuthRadioButton.checked&&(this.objectInfo.authenticationMode=1),this.sqlServerAndWindowsAuthRadioButton.checked&&(this.objectInfo.authenticationMode=2),this.objectInfo.authenticationMode!==this.originalObjectInfo.authenticationMode&&(this.shouldRestartServer=!0)}async handleAuditLevelChange(){this.noneRadioButton.checked&&(this.objectInfo.loginAuditing=0),this.failedLoginsOnlyRadioButton.checked&&(this.objectInfo.loginAuditing=2),this.successfulLoginsOnlyRadioButton.checked&&(this.objectInfo.loginAuditing=1),this.bothFailedAndSuccessfulLoginsRadioButton.checked&&(this.objectInfo.loginAuditing=3)}initializeDatabaseSettingsSection(){const e=this.engineEdition!==r.DatabaseEngineEdition.SqlManagedInstance,t={ariaLabel:a.dataLocationText,enabled:e,value:this.objectInfo.dataLocation,required:!0},n={ariaLabel:a.logLocationText,enabled:e,value:this.objectInfo.logLocation,required:!0},i={ariaLabel:a.backupLocationText,enabled:e,value:this.objectInfo.backupLocation,required:!0};this.compressBackupCheckbox=this.createCheckbox(a.compressBackupText,(async e=>{this.objectInfo.checkCompressBackup=e}),this.objectInfo.checkCompressBackup),this.backupChecksumCheckbox=this.createCheckbox(a.backupChecksumText,(async e=>{this.objectInfo.checkBackupChecksum=e}),this.objectInfo.checkBackupChecksum);const o=this.createGroup(a.backupAndRestoreText,[this.compressBackupCheckbox,this.backupChecksumCheckbox],!1);this.dataLocationInput=this.createInputBox((async e=>{this.objectInfo.dataLocation=e,this.objectInfo.dataLocation!==this.originalObjectInfo.dataLocation&&(this.shouldRestartServer=!0)}),t);const s=this.createBrowseButton((async()=>{const e=await this.selectFolder(this.objectInfo.dataLocation);e&&(this.dataLocationInput.value=e,this.objectInfo.dataLocation=e),this.objectInfo.dataLocation!==this.originalObjectInfo.dataLocation&&(this.shouldRestartServer=!0)}),e),c=this.createLabelInputContainer(a.dataLocationText,[this.dataLocationInput,s],!0);this.logLocationInput=this.createInputBox((async e=>{this.objectInfo.logLocation=e,this.objectInfo.logLocation!==this.originalObjectInfo.logLocation&&(this.shouldRestartServer=!0)}),n);const l=this.createBrowseButton((async()=>{const e=await this.selectFolder(this.objectInfo.logLocation);e&&(this.logLocationInput.value=e,this.objectInfo.logLocation=e),this.objectInfo.logLocation!==this.originalObjectInfo.logLocation&&(this.shouldRestartServer=!0)}),e),u=this.createLabelInputContainer(a.logLocationText,[this.logLocationInput,l],!0);this.backupLocationInput=this.createInputBox((async e=>{this.objectInfo.backupLocation=e}),i);const d=this.createBrowseButton((async()=>{const e=await this.selectFolder(this.objectInfo.backupLocation);e&&(this.backupLocationInput.value=e,this.objectInfo.backupLocation=e)}),e),p=this.createLabelInputContainer(a.backupLocationText,[this.backupLocationInput,d],!0),h=this.createGroup(a.defaultLocationsLabel,[c,u,p],!1);this.databaseSettingsSection=this.createGroup("",[o,h],!1),this.databaseSettingsTab=this.createTab(this.databaseSettingsTabId,a.databaseSettingsText,this.databaseSettingsSection)}async selectFolder(e){let t=await this.objectManagementService.getDataFolder(this.options.connectionUri);return await r.window.openServerFileBrowserDialog(this.options.connectionUri,t,[{label:a.allFiles,filters:["*"]}],!0)}initializeAdvancedSection(){const e=this.engineEdition!==r.DatabaseEngineEdition.SqlManagedInstance;this.allowTriggerToFireOthersDropdown=this.createDropdown(a.allowTriggerToFireOthersLabel,(async e=>{this.objectInfo.allowTriggerToFireOthers="True"===e}),["True","False"],this.objectInfo.allowTriggerToFireOthers?"True":"False");const t=this.createLabelInputContainer(a.allowTriggerToFireOthersLabel,this.allowTriggerToFireOthersDropdown);this.blockedProcThresholdInput=this.createInputBox((async e=>{this.objectInfo.blockedProcThreshold.value=+e}),{ariaLabel:a.blockedProcThresholdLabel,inputType:"number",min:this.objectInfo.blockedProcThreshold.minimumValue,max:this.objectInfo.blockedProcThreshold.maximumValue,value:this.objectInfo.blockedProcThreshold.value.toString()});const n=this.createLabelInputContainer(a.blockedProcThresholdLabel,this.blockedProcThresholdInput);this.cursorThresholdInput=this.createInputBox((async e=>{this.objectInfo.cursorThreshold.value=+e}),{ariaLabel:a.cursorThresholdLabel,inputType:"number",min:this.objectInfo.cursorThreshold.minimumValue,max:this.objectInfo.cursorThreshold.maximumValue,value:this.objectInfo.cursorThreshold.value.toString()});const i=this.createLabelInputContainer(a.cursorThresholdLabel,this.cursorThresholdInput);this.defaultFullTextLanguageInput=this.createInputBox((async e=>{this.objectInfo.defaultFullTextLanguage=e}),{ariaLabel:a.defaultFullTextLanguageLabel,value:this.objectInfo.defaultFullTextLanguage});const o=this.createLabelInputContainer(a.defaultFullTextLanguageLabel,this.defaultFullTextLanguageInput);this.defaultLanguageDropdown=this.createDropdown(a.defaultLanguageLabel,(async e=>{this.objectInfo.defaultLanguage=e}),this.viewInfo.languageOptions,this.objectInfo.defaultLanguage);const s=this.createLabelInputContainer(a.defaultLanguageLabel,this.defaultLanguageDropdown);this.fullTextUpgradeOptionDropdown=this.createDropdown(a.fullTextUpgradeOptionLabel,(async e=>{this.objectInfo.fullTextUpgradeOption=e}),this.viewInfo.fullTextUpgradeOptions,this.objectInfo.fullTextUpgradeOption,!!this.objectInfo.fullTextUpgradeOption);const c=this.createLabelInputContainer(a.fullTextUpgradeOptionLabel,this.fullTextUpgradeOptionDropdown);this.maxTextReplicationSizeInput=this.createInputBox((async e=>{this.objectInfo.maxTextReplicationSize.value=+e}),{ariaLabel:a.maxTextReplicationSizeLabel,inputType:"number",min:this.objectInfo.maxTextReplicationSize.minimumValue,max:this.objectInfo.maxTextReplicationSize.maximumValue,value:this.objectInfo.maxTextReplicationSize.value.toString()});const l=this.createLabelInputContainer(a.maxTextReplicationSizeLabel,this.maxTextReplicationSizeInput);this.optimizeAdHocWorkloadsDropdown=this.createDropdown(a.optimizeAdHocWorkloadsLabel,(async e=>{this.objectInfo.optimizeAdHocWorkloads="True"===e}),["True","False"],this.objectInfo.optimizeAdHocWorkloads?"True":"False");const u=this.createLabelInputContainer(a.optimizeAdHocWorkloadsLabel,this.optimizeAdHocWorkloadsDropdown);this.scanStartupProcsDropdown=this.createDropdown(a.scanStartupProcsLabel,(async e=>{this.objectInfo.scanStartupProcs="True"===e}),["True","False"],this.objectInfo.scanStartupProcs?"True":"False",e);const d=this.createLabelInputContainer(a.scanStartupProcsLabel,this.scanStartupProcsDropdown);this.twoDigitYearCutoffInput=this.createInputBox((async e=>{this.objectInfo.twoDigitYearCutoff=+e}),{ariaLabel:a.twoDigitYearCutoffLabel,inputType:"number",value:this.objectInfo.twoDigitYearCutoff.toString()});const p=this.createLabelInputContainer(a.twoDigitYearCutoffLabel,this.twoDigitYearCutoffInput);this.costThresholdParallelismInput=this.createInputBox((async e=>{this.objectInfo.costThresholdParallelism.value=+e}),{ariaLabel:a.costThresholdParallelismLabel,inputType:"number",min:this.objectInfo.costThresholdParallelism.minimumValue,max:this.objectInfo.costThresholdParallelism.maximumValue,value:this.objectInfo.costThresholdParallelism.value.toString()});const h=this.createLabelInputContainer(a.costThresholdParallelismLabel,this.costThresholdParallelismInput);this.locksInput=this.createInputBox((async e=>{this.objectInfo.locks.value=+e}),{ariaLabel:a.locksLabel,inputType:"number",enabled:e,max:this.objectInfo.locks.maximumValue,min:0,value:this.objectInfo.locks.value.toString(),validationErrorMessage:a.locksValidation(this.objectInfo.locks.minimumValue)},(async()=>!(+this.locksInput.value<this.objectInfo.locks.minimumValue&&0!=+this.locksInput.value)));const f=this.createLabelInputContainer(a.locksLabel,this.locksInput);this.maxDegreeParallelismInput=this.createInputBox((async e=>{this.objectInfo.maxDegreeParallelism.value=+e}),{ariaLabel:a.maxDegreeParallelismLabel,inputType:"number",min:this.objectInfo.maxDegreeParallelism.minimumValue,max:this.objectInfo.maxDegreeParallelism.maximumValue,value:this.objectInfo.maxDegreeParallelism.value.toString()});const m=this.createLabelInputContainer(a.maxDegreeParallelismLabel,this.maxDegreeParallelismInput);this.queryWaitInput=this.createInputBox((async e=>{this.objectInfo.queryWait.value=+e}),{ariaLabel:a.queryWaitLabel,inputType:"number",min:this.objectInfo.queryWait.minimumValue,max:this.objectInfo.queryWait.maximumValue,value:this.objectInfo.queryWait.value.toString()});const g=this.createLabelInputContainer(a.queryWaitLabel,this.queryWaitInput),y=this.createGroup("Miscellaneous",[t,n,i,o,s,c,l,u,d,p],!0),b=this.createGroup("Parallelism",[h,f,m,g],!0),v=this.createGroup("",[y,b]);this.advancedTab=this.createTab(this.advancedTabId,a.AdvancedSectionHeader,v)}}t.ServerPropertiesDialog=d},8450:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ServerRoleDialog=void 0;const r=n(8430),i=n(1159),o=n(6385),s=n(8358);class a extends s.PrincipalDialogBase{constructor(e,t){super(e,{...t,isDatabaseLevelPrincipal:!1,supportEffectivePermissions:!1})}get helpUrl(){return this.options.isNewObject?i.CreateServerRoleDocUrl:i.AlterServerRoleDocUrl}async initializeUI(){await super.initializeUI(),this.initializeGeneralSection(),this.initializeMemberSection();const e=[this.generalSection,this.memberSection];this.viewInfo.isFixedRole||(this.initializeMembershipSection(),e.push(this.membershipSection),e.push(this.securableSection)),this.formContainer.addItems(e,this.getSectionItemLayout())}initializeGeneralSection(){this.nameInput=this.createInputBox((async e=>{this.objectInfo.name=e}),{ariaLabel:r.NameText,inputType:"text",enabled:this.options.isNewObject,value:this.objectInfo.name});const e=this.createLabelInputContainer(r.NameText,this.nameInput);this.ownerInput=this.createInputBox((async e=>{this.objectInfo.owner=e}),{ariaLabel:r.OwnerText,inputType:"text",enabled:!this.viewInfo.isFixedRole,value:this.objectInfo.owner,width:210});const t=this.createButton(r.BrowseText,r.BrowseOwnerButtonAriaLabel,(async()=>{const e=new o.FindObjectDialog(this.objectManagementService,{objectTypes:r.getObjectTypeInfo(["ServerLevelLogin","ServerLevelServerRole"]),selectAllObjectTypes:!0,multiSelect:!1,contextId:this.contextId,title:r.SelectServerRoleOwnerDialogTitle});await e.open();const t=await e.waitForClose();t.selectedObjects.length>0&&(this.ownerInput.value=t.selectedObjects[0].name)}),!this.viewInfo.isFixedRole),n=this.createLabelInputContainer(r.OwnerText,this.ownerInput);n.addItems([t],{flex:"0 0 auto"}),this.generalSection=this.createGroup(r.GeneralSectionHeader,[e,n],!1)}initializeMemberSection(){this.memberTable=this.createTable(r.MemberSectionHeader,[r.NameText],this.objectInfo.members.map((e=>[e])));const e=this.addButtonsForTable(this.memberTable,{buttonAriaLabel:r.AddMemberAriaLabel,buttonHandler:async()=>{const e=new o.FindObjectDialog(this.objectManagementService,{objectTypes:r.getObjectTypeInfo(["ServerLevelLogin","ServerLevelServerRole"]),selectAllObjectTypes:!0,multiSelect:!0,contextId:this.contextId,title:r.SelectServerRoleMemberDialogTitle});await e.open();const t=await e.waitForClose();await this.addMembers(t.selectedObjects.map((e=>e.name)))}},{buttonAriaLabel:r.RemoveMemberAriaLabel,buttonHandler:async()=>{1===this.memberTable.selectedRows.length&&await this.removeMember(this.memberTable.selectedRows[0])}});this.memberSection=this.createGroup(r.MemberSectionHeader,[this.memberTable,e])}async addMembers(e){e.forEach((e=>{-1===this.objectInfo.members.indexOf(e)&&this.objectInfo.members.push(e)})),await this.updateMembersTable()}async removeMember(e){this.objectInfo.members.splice(e,1),await this.updateMembersTable()}async updateMembersTable(){await this.setTableData(this.memberTable,this.objectInfo.members.map((e=>[e]))),this.onFormFieldChange()}initializeMembershipSection(){this.membershipTable=this.createTableList(r.MembershipSectionHeader,[r.ServerRoleTypeDisplayNameInTitle],this.viewInfo.serverRoles,this.objectInfo.memberships),this.membershipSection=this.createGroup(r.MembershipSectionHeader,[this.membershipTable])}}t.ServerRoleDialog=a},7734:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UserDialog=void 0;const r=n(8430),i=n(1159),o=n(9523),s=n(8991),a=n(8358);class c extends a.PrincipalDialogBase{constructor(e,t){super(e,{...t,isDatabaseLevelPrincipal:!0,supportEffectivePermissions:!0})}get helpUrl(){return this.options.isNewObject?i.CreateUserDocUrl:i.AlterUserDocUrl}postInitializeData(){this.objectInfo.password=this.objectInfo.password??""}async validateInput(){const e=await super.validateInput();return"SqlAuthentication"===this.objectInfo.type?(this.objectInfo.password||e.push(r.PasswordCannotBeEmptyError),this.objectInfo.password!==this.confirmPasswordInput.value&&e.push(r.PasswordsNotMatchError),(0,o.isValidSQLPassword)(this.objectInfo.password,this.objectInfo.name)||!this.options.isNewObject&&this.objectInfo.password===this.originalObjectInfo.password||e.push(r.InvalidPasswordError)):"LoginMapped"!==this.objectInfo.type||this.objectInfo.loginName||e.push(r.LoginNotSelectedError),e}async initializeUI(){await super.initializeUI(),this.initializeGeneralSection(),this.initializeOwnedSchemaSection(),this.initializeMembershipSection(),this.initializeAdvancedSection(),this.formContainer.addItems([this.generalSection,this.ownedSchemaSection,this.membershipSection,this.securableSection,this.advancedSection],this.getSectionItemLayout()),setTimeout((()=>{this.setViewByUserType()}),100)}initializeGeneralSection(){const e={ariaLabel:r.NameText,value:this.objectInfo.name,enabled:this.options.isNewObject};this.nameInput=this.createInputBox((async e=>{this.objectInfo.name=e}),e);const t=this.createLabelInputContainer(r.NameText,this.nameInput);this.defaultSchemaDropdown=this.createDropdown(r.DefaultSchemaText,(async e=>{this.objectInfo.defaultSchema=e}),this.viewInfo.schemas,this.objectInfo.defaultSchema),this.defaultSchemaContainer=this.createLabelInputContainer(r.DefaultSchemaText,this.defaultSchemaDropdown),this.typeDropdown=this.createDropdown(r.UserTypeText,(async e=>{this.objectInfo.type=r.getUserTypeByDisplayName(e),this.setViewByUserType()}),this.viewInfo.userTypes.map((e=>r.getUserTypeDisplayName(e))),r.getUserTypeDisplayName(this.objectInfo.type),this.options.isNewObject),this.typeContainer=this.createLabelInputContainer(r.UserTypeText,this.typeDropdown),this.loginDropdown=this.createDropdown(r.LoginText,(async e=>{this.objectInfo.loginName=e}),this.options.isNewObject?this.viewInfo.logins:[this.objectInfo.loginName],this.objectInfo.loginName,this.options.isNewObject),this.loginContainer=this.createLabelInputContainer(r.LoginText,this.loginDropdown),this.passwordInput=this.createPasswordInputBox(r.PasswordText,(async e=>{this.objectInfo.password=e}),this.objectInfo.password??""),this.passwordContainer=this.createLabelInputContainer(r.PasswordText,this.passwordInput),this.confirmPasswordInput=this.createPasswordInputBox(r.ConfirmPasswordText,(async()=>{}),this.objectInfo.password??""),this.confirmPasswordContainer=this.createLabelInputContainer(r.ConfirmPasswordText,this.confirmPasswordInput),this.generalSection=this.createGroup(r.GeneralSectionHeader,[t,this.defaultSchemaContainer,this.typeContainer,this.loginContainer,this.passwordContainer,this.confirmPasswordContainer],!1)}initializeOwnedSchemaSection(){this.ownedSchemaTable=this.createTableList(r.OwnedSchemaSectionHeader,[r.SchemaText],this.viewInfo.schemas,this.objectInfo.ownedSchemas,s.DefaultMaxTableRowCount,(e=>-1===this.objectInfo.ownedSchemas.indexOf(e))),this.ownedSchemaSection=this.createGroup(r.OwnedSchemaSectionHeader,[this.ownedSchemaTable])}initializeMembershipSection(){this.membershipTable=this.createTableList(r.MembershipSectionHeader,[r.DatabaseRoleTypeDisplayNameInTitle],this.viewInfo.databaseRoles,this.objectInfo.databaseRoles),this.membershipSection=this.createGroup(r.MembershipSectionHeader,[this.membershipTable])}initializeAdvancedSection(){this.defaultLanguageDropdown=this.createDropdown(r.DefaultLanguageText,(async e=>{this.objectInfo.defaultLanguage=e}),this.viewInfo.languages,this.objectInfo.defaultLanguage);const e=this.createLabelInputContainer(r.DefaultLanguageText,this.defaultLanguageDropdown);this.advancedSection=this.createGroup(r.AdvancedSectionHeader,[e])}setViewByUserType(){switch(this.removeItem(this.generalSection,this.loginContainer),this.removeItem(this.generalSection,this.passwordContainer),this.removeItem(this.generalSection,this.confirmPasswordContainer),this.removeItem(this.formContainer,this.advancedSection),this.objectInfo.type){case"LoginMapped":this.addItem(this.generalSection,this.loginContainer);break;case"AADAuthentication":this.addItem(this.formContainer,this.advancedSection);break;case"SqlAuthentication":this.addItem(this.generalSection,this.passwordContainer),this.addItem(this.generalSection,this.confirmPasswordContainer),this.addItem(this.formContainer,this.advancedSection);break;case"WindowsUser":this.objectInfo.loginName&&this.addItem(this.generalSection,this.loginContainer)}}}t.UserDialog=c},9523:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.escapeSingleQuotes=t.convertNumToTwoDecimalStringInMB=t.isValidSQLPassword=t.refreshNode=t.refreshParentNode=void 0;const r=n(235),i=n(1398),o=n(76),s=n(8430);t.refreshParentNode=async function(e){if(e)try{const t=await r.objectexplorer.getNode(e.connectionProfile.id,e.nodeInfo?.nodePath),n=await(t?.getParent());await(n?.refresh())}catch(e){await i.window.showErrorMessage(s.RefreshObjectExplorerError((0,o.getErrorMessage)(e)))}},t.refreshNode=async function(e){if(e)try{const t=await r.objectexplorer.getNode(e.connectionProfile.id,e.nodeInfo?.nodePath);await(t?.refresh())}catch(e){await i.window.showErrorMessage(s.RefreshObjectExplorerError((0,o.getErrorMessage)(e)))}},t.isValidSQLPassword=function(e,t="sa"){const n=e&&t&&e.toUpperCase().includes(t.toUpperCase()),r=/[A-Z]/.test(e)?1:0,i=/[a-z]/.test(e)?1:0,o=/\d/.test(e)?1:0,s=/\W/.test(e)?1:0;return!n&&e.length>=8&&e.length<=128&&r+i+o+s>=3},t.convertNumToTwoDecimalStringInMB=function(e){return s.StringValueInMB(e?.toFixed(2))},t.escapeSingleQuotes=function(e){return e.replace(/'/g,"'")}},3655:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QueryStoreService=void 0;const r=n(3508),i=n(76),o=n(6290),s=n(5702);class a extends s.BaseService{static asFeature(e){return class extends a{constructor(t){super(e,t)}fillClientCapabilities(e){i.ensure(e,"queryStore").queryStore=!0}initialize(){}}}constructor(e,t){super(t),e.registerService(r.QueryStoreService,this)}async getRegressedQueriesSummary(e,t,n,r,i,s,a,c,l){const u={connectionOwnerUri:e,timeIntervalRecent:t,timeIntervalHistory:n,minExecutionCount:r,selectedMetric:i,selectedStatistic:s,topQueriesReturned:a,returnAllQueries:c,minNumberOfQueryPlans:l};return await this.runWithErrorHandling(o.GetRegressedQueriesSummaryRequest.type,u)}async getRegressedQueriesDetailedSummary(e,t,n,r,i,s,a,c,l){const u={connectionOwnerUri:e,timeIntervalRecent:t,timeIntervalHistory:n,minExecutionCount:r,selectedMetric:i,selectedStatistic:s,topQueriesReturned:a,returnAllQueries:c,minNumberOfQueryPlans:l};return await this.runWithErrorHandling(o.GetRegressedQueriesDetailedSummaryRequest.type,u)}async getTrackedQueriesReport(e){const t={querySearchText:e};return await this.runWithErrorHandling(o.GetTrackedQueriesReportRequest.type,t)}async getHighVariationQueriesSummary(e,t,n,r,i,s,a,c,l){const u={connectionOwnerUri:e,timeInterval:t,orderByColumnId:n,descending:r,selectedMetric:i,selectedStatistic:s,topQueriesReturned:a,returnAllQueries:c,minNumberOfQueryPlans:l};return await this.runWithErrorHandling(o.GetHighVariationQueriesSummaryRequest.type,u)}async getHighVariationQueriesDetailedSummary(e,t,n,r,i,s,a,c,l){const u={connectionOwnerUri:e,timeInterval:t,orderByColumnId:n,descending:r,selectedMetric:i,selectedStatistic:s,topQueriesReturned:a,returnAllQueries:c,minNumberOfQueryPlans:l};return await this.runWithErrorHandling(o.GetHighVariationQueriesDetailedSummaryRequest.type,u)}async getTopResourceConsumersSummary(e,t,n,r,i,s,a,c,l){const u={connectionOwnerUri:e,timeInterval:t,orderByColumnId:n,descending:r,selectedMetric:i,selectedStatistic:s,topQueriesReturned:a,returnAllQueries:c,minNumberOfQueryPlans:l};return await this.runWithErrorHandling(o.GetTopResourceConsumersSummaryRequest.type,u)}async getTopResourceConsumersDetailedSummary(e,t,n,r,i,s,a,c,l){const u={connectionOwnerUri:e,timeInterval:t,orderByColumnId:n,descending:r,selectedMetric:i,selectedStatistic:s,topQueriesReturned:a,returnAllQueries:c,minNumberOfQueryPlans:l};return await this.runWithErrorHandling(o.GetTopResourceConsumersDetailedSummaryRequest.type,u)}async getPlanSummaryChartView(e,t,n,r,i,s){const a={connectionOwnerUri:e,queryId:t,timeIntervalMode:n,timeInterval:r,selectedMetric:i,selectedStatistic:s};return await this.runWithErrorHandling(o.GetPlanSummaryChartViewRequest.type,a)}async getPlanSummaryGridView(e,t,n,r,i,s,a,c){const l={connectionOwnerUri:e,orderByColumnId:t,descending:n,queryId:r,timeIntervalMode:i,timeInterval:s,selectedMetric:a,selectedStatistic:c};return await this.runWithErrorHandling(o.GetPlanSummaryGridViewRequest.type,l)}async getForcedPlan(e,t,n){const r={connectionOwnerUri:e,queryId:t,planId:n};return await this.runWithErrorHandling(o.GetForcedPlanRequest.type,r)}async getForcedPlanQueriesReport(e,t,n,r,i,s,a,c,l){const u={connectionOwnerUri:e,timeInterval:t,orderByColumnId:n,descending:r,selectedMetric:i,selectedStatistic:s,topQueriesReturned:a,returnAllQueries:c,minNumberOfQueryPlans:l};return await this.runWithErrorHandling(o.GetForcedPlanQueriesReportRequest.type,u)}async getOverallResourceConsumptionReport(e,t,n,r,i,s,a,c){const l={connectionOwnerUri:e,specifiedTimeInterval:t,specifiedBucketInterval:n,selectedMetric:r,selectedStatistic:i,topQueriesReturned:s,returnAllQueries:a,minNumberOfQueryPlans:c};return await this.runWithErrorHandling(o.GetOverallResourceConsumptionReportRequest.type,l)}}t.QueryStoreService=a},5306:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.providerId=t.serviceName=void 0,t.serviceName="AzureResourceProvider",t.providerId="azureresourceProvider"},416:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HandleFirewallRuleRequest=t.CreateFirewallRuleRequest=void 0;const r=n(4382);var i,o;!function(e){e.type=new r.RequestType("resource/createFirewallRule")}(i||(t.CreateFirewallRuleRequest=i={})),function(e){e.type=new r.RequestType("resource/handleFirewallRule")}(o||(t.HandleFirewallRuleRequest=o={}))},5294:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AzureResourceProvider=void 0;const r=n(235),i=n(5702),o=n(4382),s=n(6362),a=n(416),c=n(5306),l=n(76);class u extends i.SqlOpsFeature{constructor(e){super(e,u.messagesTypes)}fillClientCapabilities(e){l.ensure(l.ensure(e,"firewall"),"firwall").dynamicRegistration=!0}initialize(e){this.register(this.messages,{id:s.generateUuid(),registerOptions:void 0})}registerProvider(e){const t=this._client;return r.resources.registerResourceProvider({displayName:"Azure SQL Resource Provider",id:"Microsoft.Azure.SQL.ResourceProvider",settings:{}},{handleFirewallRule:(e,n,r)=>{let i={errorCode:e,errorMessage:n,connectionTypeId:r};return t.sendRequest(a.HandleFirewallRuleRequest.type,i)},createFirewallRule:(e,n)=>t.sendRequest(a.CreateFirewallRuleRequest.type,function(e,t){return{account:e,firewallRuleName:t.firewallRuleName,serverName:t.serverName,startIpAddress:t.startIpAddress||"",endIpAddress:t.endIpAddress||"",securityTokenMappings:t.securityTokenMappings}}(e,n))})}}u.messagesTypes=[a.CreateFirewallRuleRequest.type,a.HandleFirewallRuleRequest.type],t.AzureResourceProvider=class{constructor(e,t){this.logPath=e,t&&(this._config=JSON.parse(JSON.stringify(t)),this._config.executableFiles=["SqlToolsResourceProviderService.exe","SqlToolsResourceProviderService"])}async start(){let e={providerId:c.providerId,features:[u]};const t=await l.getOrDownloadServer(this._config);let n=this.generateServerOptions(t);this._client=new i.SqlOpsDataClient(c.serviceName,n,e),this._client.start()}async dispose(){this._client&&await this._client.stop()}generateServerOptions(e){return{command:e,args:l.getCommonLaunchArgsAndCleanupOldLogFiles(this.logPath,"resourceprovider.log",e),transport:o.TransportKind.stdio}}}},6067:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SchemaCompareService=void 0;const r=n(3508),i=n(76),o=n(6290),s=n(5702);class a extends s.BaseService{static asFeature(e){return class extends a{constructor(t){super(e,t)}fillClientCapabilities(e){i.ensure(e,"schemaCompare").schemaCompare=!0}initialize(){}}}constructor(e,t){super(t),e.registerService(r.SchemaCompareService,this)}async schemaCompare(e,t,n,r,i){const s={operationId:e,sourceEndpointInfo:t,targetEndpointInfo:n,taskExecutionMode:r,deploymentOptions:i};return this.runWithErrorHandling(o.SchemaCompareRequest.type,s)}async schemaCompareGenerateScript(e,t,n,r){const i={operationId:e,targetServerName:t,targetDatabaseName:n,taskExecutionMode:r};return this.runWithErrorHandling(o.SchemaCompareGenerateScriptRequest.type,i)}async schemaComparePublishDatabaseChanges(e,t,n,r){const i={operationId:e,targetServerName:t,targetDatabaseName:n,taskExecutionMode:r};return this.runWithErrorHandling(o.SchemaComparePublishDatabaseChangesRequest.type,i)}async schemaComparePublishProjectChanges(e,t,n,r){const i={operationId:e,targetProjectPath:t,targetFolderStructure:n,taskExecutionMode:r};return this.runWithErrorHandling(o.SchemaComparePublishProjectChangesRequest.type,i)}async schemaCompareGetDefaultOptions(){return this.runWithErrorHandling(o.SchemaCompareGetDefaultOptionsRequest.type,{})}async schemaCompareIncludeExcludeNode(e,t,n,r){const i={operationId:e,diffEntry:t,includeRequest:n,taskExecutionMode:r};return this.runWithErrorHandling(o.SchemaCompareIncludeExcludeNodeRequest.type,i)}async schemaCompareOpenScmp(e){const t={filePath:e};return this.runWithErrorHandling(o.SchemaCompareOpenScmpRequest.type,t)}async schemaCompareSaveScmp(e,t,n,r,i,s,a){const c={sourceEndpointInfo:e,targetEndpointInfo:t,taskExecutionMode:n,deploymentOptions:r,scmpFilePath:i,excludedSourceObjects:s,excludedTargetObjects:a};return this.runWithErrorHandling(o.SchemaCompareSaveScmpRequest.type,c)}async schemaCompareCancel(e){const t={operationId:e};return this.runWithErrorHandling(o.SchemaCompareCancellationRequest.type,t)}}t.SchemaCompareService=a},8659:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SqlAssessmentService=void 0;const r=n(6290),i=n(3508),o=n(5702);class s extends o.BaseService{static asFeature(e){return class extends s{constructor(t){super(e,t)}fillClientCapabilities(e){}initialize(){}}}constructor(e,t){super(t),e.registerService(i.SqlAssessmentService,this)}async assessmentInvoke(e,t){let n={ownerUri:e,targetType:t};return this.runWithErrorHandling(r.SqlAssessmentInvokeRequest.type,n)}async getAssessmentItems(e,t){let n={ownerUri:e,targetType:t};return this.runWithErrorHandling(r.GetSqlAssessmentItemsRequest.type,n)}async generateAssessmentScript(e,t,n,i){let o={items:e,targetServerName:t,targetDatabaseName:n,taskExecutionMode:i};return this.runWithErrorHandling(r.GenerateSqlAssessmentScriptRequest.type,o)}}t.SqlAssessmentService=s},3883:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SqlProjectsService=void 0;const r=n(3508),i=n(76),o=n(6290),s=n(5702);class a extends s.BaseService{static asFeature(e){return class extends a{constructor(t){super(e,t)}fillClientCapabilities(e){i.ensure(e,"sqlProjects").sqlProjects=!0}initialize(){}}}constructor(e,t){super(t),e.registerService(r.SqlProjectsService,this)}async addDacpacReference(e,t,n,r,i,s){const a={projectUri:e,dacpacPath:t,suppressMissingDependencies:n,databaseVariable:r,serverVariable:i,databaseLiteral:s};return await this.runWithErrorHandling(o.AddDacpacReferenceRequest.type,a)}async addSqlProjectReference(e,t,n,r,i,s,a){const c={projectUri:e,projectPath:t,projectGuid:n,suppressMissingDependencies:r,databaseVariable:i,serverVariable:s,databaseLiteral:a};return await this.runWithErrorHandling(o.AddSqlProjectReferenceRequest.type,c)}async addSystemDatabaseReference(e,t,n,r,i){const s={projectUri:e,systemDatabase:t,suppressMissingDependencies:n,referenceType:r,databaseLiteral:i};return await this.runWithErrorHandling(o.AddSystemDatabaseReferenceRequest.type,s)}async addNugetPackageReference(e,t,n,r,i,s,a){const c={projectUri:e,packageName:t,packageVersion:n,suppressMissingDependencies:r,databaseVariable:i,serverVariable:s,databaseLiteral:a};return await this.runWithErrorHandling(o.AddNugetPackageReferenceRequest.type,c)}async deleteDatabaseReference(e,t){const n={projectUri:e,name:t};return await this.runWithErrorHandling(o.DeleteDatabaseReferenceRequest.type,n)}async addFolder(e,t){const n={projectUri:e,path:t};return await this.runWithErrorHandling(o.AddFolderRequest.type,n)}async deleteFolder(e,t){const n={projectUri:e,path:t};return await this.runWithErrorHandling(o.DeleteFolderRequest.type,n)}async addPostDeploymentScript(e,t){const n={projectUri:e,path:t};return await this.runWithErrorHandling(o.AddPostDeploymentScriptRequest.type,n)}async addPreDeploymentScript(e,t){const n={projectUri:e,path:t};return await this.runWithErrorHandling(o.AddPreDeploymentScriptRequest.type,n)}async deletePostDeploymentScript(e,t){const n={projectUri:e,path:t};return await this.runWithErrorHandling(o.DeletePostDeploymentScriptRequest.type,n)}async deletePreDeploymentScript(e,t){const n={projectUri:e,path:t};return await this.runWithErrorHandling(o.DeletePreDeploymentScriptRequest.type,n)}async excludePostDeploymentScript(e,t){const n={projectUri:e,path:t};return await this.runWithErrorHandling(o.ExcludePostDeploymentScriptRequest.type,n)}async excludePreDeploymentScript(e,t){const n={projectUri:e,path:t};return await this.runWithErrorHandling(o.ExcludePreDeploymentScriptRequest.type,n)}async movePostDeploymentScript(e,t,n){const r={projectUri:e,destinationPath:n,path:t};return await this.runWithErrorHandling(o.MovePostDeploymentScriptRequest.type,r)}async movePreDeploymentScript(e,t,n){const r={projectUri:e,destinationPath:n,path:t};return await this.runWithErrorHandling(o.MovePreDeploymentScriptRequest.type,r)}async closeProject(e){const t={projectUri:e};return await this.runWithErrorHandling(o.CloseSqlProjectRequest.type,t)}async createProject(e,t,n,r){const i={projectUri:e,sqlProjectType:t,databaseSchemaProvider:n,buildSdkVersion:r};return await this.runWithErrorHandling(o.CreateSqlProjectRequest.type,i)}async getCrossPlatformCompatibility(e){const t={projectUri:e};return await this.runWithErrorHandling(o.GetCrossPlatformCompatibilityRequest.type,t)}async openProject(e){const t={projectUri:e};return await this.runWithErrorHandling(o.OpenSqlProjectRequest.type,t)}async updateProjectForCrossPlatform(e){const t={projectUri:e};return await this.runWithErrorHandling(o.UpdateProjectForCrossPlatformRequest.type,t)}async getProjectProperties(e){const t={projectUri:e};return await this.runWithErrorHandling(o.GetProjectPropertiesRequest.type,t)}async setDatabaseSource(e,t){const n={projectUri:e,databaseSource:t};return await this.runWithErrorHandling(o.SetDatabaseSourceRequest.type,n)}async setDatabaseSchemaProvider(e,t){const n={projectUri:e,databaseSchemaProvider:t};return await this.runWithErrorHandling(o.SetDatabaseSchemaProviderRequest.type,n)}async addSqlCmdVariable(e,t,n){const r={projectUri:e,name:t,defaultValue:n};return await this.runWithErrorHandling(o.AddSqlCmdVariableRequest.type,r)}async deleteSqlCmdVariable(e,t){const n={projectUri:e,name:t};return await this.runWithErrorHandling(o.DeleteSqlCmdVariableRequest.type,n)}async updateSqlCmdVariable(e,t,n){const r={projectUri:e,name:t,defaultValue:n};return await this.runWithErrorHandling(o.UpdateSqlCmdVariableRequest.type,r)}async addSqlObjectScript(e,t){const n={projectUri:e,path:t};return await this.runWithErrorHandling(o.AddSqlObjectScriptRequest.type,n)}async deleteSqlObjectScript(e,t){const n={projectUri:e,path:t};return await this.runWithErrorHandling(o.DeleteSqlObjectScriptRequest.type,n)}async excludeSqlObjectScript(e,t){const n={projectUri:e,path:t};return await this.runWithErrorHandling(o.ExcludeSqlObjectScriptRequest.type,n)}async moveSqlObjectScript(e,t,n){const r={projectUri:e,destinationPath:n,path:t};return await this.runWithErrorHandling(o.MoveSqlObjectScriptRequest.type,r)}async getDatabaseReferences(e){const t={projectUri:e};return await this.runWithErrorHandling(o.GetDatabaseReferencesRequest.type,t)}async getFolders(e){const t={projectUri:e};return await this.runWithErrorHandling(o.GetFoldersRequest.type,t)}async getPostDeploymentScripts(e){const t={projectUri:e};return await this.runWithErrorHandling(o.GetPostDeploymentScriptsRequest.type,t)}async getPreDeploymentScripts(e){const t={projectUri:e};return await this.runWithErrorHandling(o.GetPreDeploymentScriptsRequest.type,t)}async getSqlCmdVariables(e){const t={projectUri:e};return await this.runWithErrorHandling(o.GetSqlCmdVariablesRequest.type,t)}async getSqlObjectScripts(e){const t={projectUri:e};return await this.runWithErrorHandling(o.GetSqlObjectScriptsRequest.type,t)}async addNoneItem(e,t){const n={projectUri:e,path:t};return await this.runWithErrorHandling(o.AddNoneItemRequest.type,n)}async deleteNoneItem(e,t){const n={projectUri:e,path:t};return await this.runWithErrorHandling(o.DeleteNoneItemRequest.type,n)}async excludeNoneItem(e,t){const n={projectUri:e,path:t};return await this.runWithErrorHandling(o.ExcludeNoneItemRequest.type,n)}async getNoneItems(e){const t={projectUri:e};return await this.runWithErrorHandling(o.GetNoneItemsRequest.type,t)}async moveNoneItem(e,t,n){const r={projectUri:e,destinationPath:n,path:t};return await this.runWithErrorHandling(o.MoveNoneItemRequest.type,r)}async excludeFolder(e,t){const n={projectUri:e,path:t};return await this.runWithErrorHandling(o.ExcludeFolderRequest.type,n)}async moveFolder(e,t,n){const r={projectUri:e,path:t,destinationPath:n};return await this.runWithErrorHandling(o.MoveFolderRequest.type,r)}}t.SqlProjectsService=a},3469:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SqlToolsServer=void 0;const r=n(4382),i=n(3508),o=n(1398),s=n(235),a=n(6928),c=n(76),l=n(6734),u=n(5702),d=n(2166),p=n(1958),h=n(5294),f=n(6067),m=n(5563),g=n(7219),y=n(6290),b=n(9896),v=n(4200),S=n(755),w=n(8659),C=n(4037),T=n(5710),E=n(5055),_=n(1089),x=n(3883),R=n(3349),I=n(3655),P=n(3729),O=v.loadMessageBundle(n(6928).join(__dirname,"sqlToolsServer.ts")),D=o.window.createOutputChannel(i.serviceName),A=o.window.createStatusBarItem(o.StatusBarAlignment.Left),k={[c.TracingLevel.All]:0,[c.TracingLevel.Critical]:4,[c.TracingLevel.Error]:3,[c.TracingLevel.Information]:1,[c.TracingLevel.Verbose]:0,[c.TracingLevel.Warning]:2};function N(e,...t){let n=0;switch(e){case"install_start":D.show(!0),A.show(),D.appendLine(O(3,null,i.serviceName,t[0])),A.text=O(4,null,i.serviceName);break;case"install_end":D.appendLine(O(5,null,i.serviceName));break;case"download_start":D.appendLine(O(6,null,t[0])),D.append(O(7,null,Math.ceil(t[1]/1024).toLocaleString(o.env.language))),A.text=O(8,null,i.serviceName);break;case"download_progress":let e=Math.ceil(t[0]/5);e>n&&(D.append(".".repeat(e-n)),n=e);break;case"download_end":D.appendLine(""),D.appendLine(O(9,null,i.serviceName));break;case"entry_extracted":D.appendLine(O(10,null,t[0],t[1],t[2]));break;case"log_emitted":const r=k[(0,c.getConfigTracingLevel)()],s=t[0],a=t[1];void 0!==r&&s>=r&&D.appendLine(a)}}t.SqlToolsServer=class{constructor(){this.disposables=new Array}async start(e){try{const t=Date.now(),n=await this.download(e);this.installDirectory=a.dirname(n);const p=Date.now();let h=function(e,t){const n=(0,c.getCommonLaunchArgsAndCleanupOldLogFiles)(e,"sqltools.log",t);if((0,c.getParallelMessageProcessingConfig)()){n.push("--parallel-message-processing");const e=(0,c.getParallelMessageProcessingLimitConfig)();n.push("--parallel-message-processing-limit"),n.push(String(e))}return!0===(0,c.getEnableSqlAuthenticationProviderConfig)()&&n.push("--enable-sql-authentication-provider"),(0,c.getEnableConnectionPoolingConfig)()&&n.push("--enable-connection-pooling"),{command:t,args:n,transport:r.TransportKind.stdio}}(e.extensionContext.logUri.fsPath,n),b=function(e){return{documentSelector:["sql"],synchronize:{configurationSection:[i.extensionConfigSectionName,i.telemetryConfigSectionName,i.queryEditorConfigSectionName]},providerId:i.providerId,errorHandler:new l.LanguageClientErrorHandler,features:[...u.SqlOpsDataClient.defaultFeatures,d.TelemetryFeature,d.AccountFeature,d.AgentServicesFeature,d.SerializationFeature,d.SqlAssessmentServicesFeature,P.ConnectionService.asFeature(e),f.SchemaCompareService.asFeature(e),S.LanguageExtensionService.asFeature(e),m.DacFxService.asFeature(e),x.SqlProjectsService.asFeature(e),g.CmsService.asFeature(e),w.SqlAssessmentService.asFeature(e),C.NotebookConvertService.asFeature(e),d.ProfilerFeature,T.SqlCredentialService.asFeature(e),d.TableDesignerFeature,d.ExecutionPlanServiceFeature,_.ErrorDiagnosticsProvider.asFeature(e),R.ObjectManagementService.asFeature(e),I.QueryStoreService.asFeature(e)],outputChannel:D,revealOutputChannelOn:s.env.quality===s.env.AppQuality.dev?r.RevealOutputChannelOn.Error:r.RevealOutputChannelOn.Never}}(e);this.client=new u.SqlOpsDataClient("mssql",i.serviceName,h,b);const v=Date.now(),E=this.client.onReady().then((()=>{const e=Date.now();A.text=O(0,null,i.serviceName),setTimeout((()=>{A.hide()}),1500),o.commands.registerCommand("mssql.loadCompletionExtension",(e=>this.client.sendRequest(y.CompletionExtLoadRequest.type,e))),l.TelemetryReporter.sendTelemetryEvent("startup/LanguageClientStarted",{installationTime:String(p-t),processStartupTime:String(e-v),totalTime:String(e-t),beginningTimestamp:String(t)})}));return A.show(),A.text=O(1,null,i.serviceName),this.client.start(),await Promise.all([this.activateFeatures(e),E]),await this.handleEncryptionKeyEventNotification(this.client),this.client}catch(e){throw l.TelemetryReporter.sendTelemetryEvent("ServiceInitializingFailed"),o.window.showErrorMessage(O(2,null,i.serviceName)),e}}async handleEncryptionKeyEventNotification(e){if((0,c.getEnableSqlAuthenticationProviderConfig)()){let t=await this.getAzureCoreAPI();(0,t.onEncryptionKeysUpdated)((t=>{e.sendNotification(y.EncryptionKeysChangedNotification.type,t)}));try{const n=await t.getEncryptionKeys();e.sendNotification(y.EncryptionKeysChangedNotification.type,n)}catch(e){console.error(`An error occurred when fetching encryption keys: ${e}`)}(0,c.logDebug)("SqlToolsServer: Registered encryption key event handler.")}}async getAzureCoreAPI(){const e=await(o.extensions.getExtension("Microsoft.azurecore")?.activate());if(!e)throw new Error("Azure core extension could not be activated.");return e}async download(e){const t=e.extensionContext.extensionPath,n=await b.promises.readFile(a.join(t,"config.json"));return this.config=JSON.parse(n.toString()),this.config.installDirectory=a.join(t,this.config.installDirectory),this.config.proxy=o.workspace.getConfiguration("http").get("proxy",""),this.config.strictSSL=o.workspace.getConfiguration("http").get("proxyStrictSSL",!0),(0,c.getOrDownloadServer)(this.config,N)}activateFeatures(e){const t=new p.CredentialStore(e,this.config),n=new h.AzureResourceProvider(e.extensionContext.logUri.fsPath,this.config);return this.disposables.push(t),this.disposables.push(n),e.registerService(i.AzureBlobService,new E.AzureBlobService(this.client)),Promise.all([t.start(),n.start()]).then()}async dispose(){this.disposables.forEach((e=>e.dispose())),this.client&&await this.client.stop()}}},1146:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.registerTableDesignerCommands=void 0;const r=n(235),i=n(1398),o=n(3508),s=n(6362),a=n(6734),c=n(4200),l=n(76),u=c.loadMessageBundle(n(6928).join(__dirname,"tableDesigner\\tableDesigner.ts")),d=u(0,null),p="tableDesigner.DidInformUser",h=u(1,null);async function f(e,t){const n=await r.connection.getServerInfo(e.connectionProfile.id),i={tableType:t};return(0,a.fillServerInfo)(i,n),i}async function m(e){if((0,l.getConfigPreloadDatabaseModel)())return;if(e.extensionContext.globalState.get(p))return;e.extensionContext.globalState.update(p,!0);const t=u(2,null),n=u(3,null);await i.window.showInformationMessage(u(4,null),t,n)===t&&(0,l.setConfigPreloadDatabaseModel)(!0)}t.registerTableDesignerCommands=function(e){e.extensionContext.subscriptions.push(i.commands.registerCommand("mssql.newTable",(async t=>{try{m(e);const n=await r.connection.getConnectionString(t.connectionProfile.id,!0);if(!n)throw new Error(h);const i=t.nodeInfo.nodeSubType,a=await f(t,i);let c=await r.connection.getNonDefaultOptions(t.connectionProfile);await r.designers.openTableDesigner(o.sqlProviderName,{title:d,tooltip:t.connectionProfile.connectionName?`${t.connectionProfile.connectionName} - ${d}`:`${t.connectionProfile.serverName} - ${t.connectionProfile.databaseName} - ${d}`,server:t.connectionProfile.serverName,database:t.connectionProfile.databaseName,isNewTable:!0,id:(0,s.generateUuid)(),connectionString:n,accessToken:t.connectionProfile.options.azureAccountToken,tableIcon:i,additionalInfo:`${t.connectionProfile.serverName+" - "+t.connectionProfile.databaseName}${c}`},a,t)}catch(e){console.error(e),await i.window.showErrorMessage((0,l.getErrorMessage)(e),{modal:!0})}}))),e.extensionContext.subscriptions.push(i.commands.registerCommand("mssql.designTable",(async t=>{try{m(e);const n=t.connectionProfile.connectionName,i=t.connectionProfile.serverName,s=t.connectionProfile.databaseName,a=t.nodeInfo.metadata.schema,c=t.nodeInfo.metadata.name,l=await r.connection.getConnectionString(t.connectionProfile.id,!0);if(!l)throw new Error(h);const u=t.nodeInfo.nodeSubType,d=await f(t,u);let p=await r.connection.getNonDefaultOptions(t.connectionProfile);await r.designers.openTableDesigner(o.sqlProviderName,{title:`${a}.${c}`,tooltip:n?`${n} - ${a}.${c}`:`${i} - ${s} - ${a}.${c}`,server:i,database:s,isNewTable:!1,name:c,schema:a,id:`${o.sqlProviderName}|${i}|${s}|${a}|${c}`,connectionString:l,accessToken:t.connectionProfile.options.azureAccountToken,tableIcon:u,additionalInfo:`${i+" - "+s}${p}`},d,t)}catch(e){console.error(e),await i.window.showErrorMessage((0,l.getErrorMessage)(e),{modal:!0})}})))}},6734:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TelemetryActions=t.TelemetryViews=t.LanguageClientErrorHandler=t.fillServerInfo=t.TelemetryReporter=void 0;const r=n(1398),i=n(1616),o=n(4382),s=n(3508),a=n(4200).loadMessageBundle(n(6928).join(__dirname,"telemetry.ts")),c=a(0,null),l=r.extensions.getExtension(s.packageName)?.packageJSON;var u,d;t.TelemetryReporter=new i.default(l?.name,l?.version,l?.aiKey),t.fillServerInfo=function(e,t){e.serverEdition=t?.serverEdition,e.serverLevel=t?.serverLevel,e.serverMajorVersion=t?.serverMajorVersion?.toString()||"",e.serverMinorVersion=t?.serverMinorVersion?.toString()||"",e.isCloud=t?.isCloud.toString()},t.LanguageClientErrorHandler=class{showOnErrorPrompt(){t.TelemetryReporter.sendTelemetryEvent(s.serviceName+"Crash"),r.window.showErrorMessage(a(1,null,s.serviceName),c).then((e=>{e&&e===c&&r.env.openExternal(r.Uri.parse(s.serviceCrashLink))}))}error(e,t,n){return this.showOnErrorPrompt(),o.ErrorAction.Shutdown}closed(){return this.showOnErrorPrompt(),o.CloseAction.DoNotRestart}},function(e){e.MssqlObjectExplorer="mssqlObjectExplorer",e.MssqlConnections="mssqlConnections"}(u||(t.TelemetryViews=u={})),function(e){e.GroupBySchemaEnabled="objectExplorerGroupBySchemaEnabled",e.GroupBySchemaDisabled="objectExplorerGroupBySchemaDisabled",e.EnableGroupBySchemaContextMenu="objectExplorerEnableGroupBySchemaContextMenu",e.DisableGroupBySchemaContextMenu="objectExplorerDisableGroupBySchemaContextMenu",e.EnableGroupByServerViewTitleAction="objectExplorerEnableGroupByServerViewTitleAction",e.DisableGroupByServerViewTitleAction="objectExplorerDisableGroupByServerViewTitleAction",e.EnableFeatureAsyncParallelProcessing="enableFeatureAsyncParallelProcessing",e.EnableFeatureSqlAuthenticationProvider="enableFeatureSqlAuthenticationProvider",e.EnableFeatureConnectionPooling="enableFeatureConnectionPooling"}(d||(t.TelemetryActions=d={}))},4848:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isUndefined=t.isUndefinedOrNull=void 0;const n="undefined";function r(e){return typeof e===n}t.isUndefinedOrNull=function(e){return r(e)||null===e},t.isUndefined=r},8991:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DialogBase=t.DefaultTableListItemComparer=t.DefaultTableListItemValueGetter=t.DefaultTableListItemEnabledStateGetter=t.getTableHeight=t.tableRow=t.tableHeader=t.DefaultMinTableRowCount=t.DefaultMaxTableRowCount=t.DefaultTableWidth=t.DefaultColumnCheckboxWidth=t.DefaultButtonWidth=t.DefaultLongInputWidth=t.DefaultInputWidth=t.DefaultLabelWidth=void 0;const r=n(235),i=n(857),o=n(1776),s=n(3344);function a(e,n=t.DefaultMinTableRowCount,r=t.DefaultMaxTableRowCount){return 25*Math.min(Math.max(e,n),r)+30}t.DefaultLabelWidth=150,t.DefaultInputWidth=300,t.DefaultLongInputWidth=440,t.DefaultButtonWidth=100,t.DefaultColumnCheckboxWidth=150,t.DefaultTableWidth=t.DefaultInputWidth+t.DefaultLabelWidth,t.DefaultMaxTableRowCount=10,t.DefaultMinTableRowCount=1,t.tableHeader={"border-color":"#ccc",color:"#666666","font-weight":"normal"},t.tableRow={"border-color":"#ccc"},t.getTableHeight=a,t.DefaultTableListItemEnabledStateGetter=e=>!0,t.DefaultTableListItemValueGetter=e=>[e?.toString()??""],t.DefaultTableListItemComparer=(e,t)=>e===t,t.DialogBase=class{constructor(e,t,n="narrow",i="flyout"){this.disposables=[],this.dialogObject=r.window.createModelViewDialog(e,t,n,i),this.dialogObject.okButton.label=o.OkText,this.dialogObject.registerCloseValidator((async()=>!!await this.onConfirmation()&&await this.runValidation())),this._closePromise=new Promise((e=>{this.disposables.push(this.dialogObject.onClosed((async t=>{let n=await this.handleDialogClosed(t);e(n)})))}))}async handleDialogClosed(e){return await this.dispose(e),"ok"===e?this.dialogResult:void 0}waitForClose(){return this._closePromise}get dialogResult(){}async onConfirmation(){return!0}get formContainer(){return this._formContainer}get modelView(){return this._modelView}onFormFieldChange(){}removeButtonEnabled(e){return!0}addButtonEnabled(e){return!0}validateInput(){return Promise.resolve([])}async open(){try{this.updateLoadingStatus(!0);const e=new Promise((async e=>{this.dialogObject.registerContent((async t=>{this._modelView=t,this._formContainer=this.createFormContainer([]),this.disposables.push(this._formContainer),this._loadingComponent=t.modelBuilder.loadingComponent().withItem(this._formContainer).withProps({loading:!0,loadingText:o.LoadingDialogText,loadingCompletedText:o.LoadingDialogCompletedText,showText:!0,CSSStyles:{width:"100%",height:"100%"}}).component(),await t.initializeModel(this._loadingComponent),e()}))}));r.window.openDialog(this.dialogObject),await e,await this.initialize(),this.updateLoadingStatus(!1)}catch(e){throw r.window.closeDialog(this.dialogObject),e}}async dispose(e){this.disposables.forEach((e=>e.dispose()))}async runValidation(e=!0){const t=await this.validateInput();return t.length>0&&(this.dialogObject.message?.text||e)?this.dialogObject.message={text:t.join(i.EOL),level:r.window.MessageLevel.Error}:this.dialogObject.message=void 0,0===t.length}createLabelInputContainer(e,n,r=!1){let i;if(Array.isArray(n)){const o=this.modelView.modelBuilder.text().withProps({width:t.DefaultLabelWidth-40,value:e,requiredIndicator:r,CSSStyles:{"padding-right":"10px"}}).component();i=this.modelView.modelBuilder.flexContainer().withItems([o,...n],{CSSStyles:{"margin-right":"5px","margin-bottom":"10px"}}).withLayout({flexFlow:"row",alignItems:"center"}).component()}else{let o;o=r?{width:t.DefaultLabelWidth,value:e,requiredIndicator:r}:{width:t.DefaultLabelWidth-10,value:e,requiredIndicator:r,CSSStyles:{"padding-right":"10px"}};const s=this.modelView.modelBuilder.text().withProps(o).component();i=this.modelView.modelBuilder.flexContainer().withLayout({flexFlow:"horizontal",flexWrap:"nowrap",alignItems:"center"}).withItems([s],{flex:"0 0 auto"}).component(),i.addItem(n,{flex:"1 1 auto"})}return i}createCheckbox(e,t,n=!1,r=!0){const i=this.modelView.modelBuilder.checkBox().withProps({label:e,checked:n,enabled:r}).component();return this.disposables.push(i.onChanged((async()=>{await t(i.checked),this.onFormFieldChange(),await this.runValidation(!1)}))),i}createPasswordInputBox(e,n,r="",i=!0,o=t.DefaultInputWidth){return this.createInputBox(n,{ariaLabel:e,value:r,enabled:i,inputType:"password",width:o})}createInputBox(e,n,r){n.width=n.width??t.DefaultInputWidth,n.inputType=n.inputType??"text",n.value=n.value??"",n.enabled=n.enabled??!0,n.required=n.required;const i=this.modelView.modelBuilder.inputBox().withProps(n);r&&i.withValidation(r);const o=i.component();return this.disposables.push(o.onTextChanged((async()=>{await e(o.value),this.onFormFieldChange(),await this.runValidation(!1)}))),o}createGroup(e,t,n=!0,r=!1){return this.modelView.modelBuilder.groupContainer().withLayout({header:e,collapsible:n,collapsed:r}).withItems(t).component()}createTab(e,t,n){return{title:t,content:n,id:e}}createTableList(e,n,i,s,c=t.DefaultMaxTableRowCount,l=t.DefaultTableListItemEnabledStateGetter,u=t.DefaultTableListItemValueGetter,d=t.DefaultTableListItemComparer){const p=this.getDataForTableList(i,s,l,u,d),h=this.modelView.modelBuilder.table().withProps({ariaLabel:e,data:p,columns:[{value:o.SelectText,type:r.ColumnType.checkBox,options:{actionOnCheckbox:r.ActionOnCellCheckboxCheck.customAction}},...n.map((e=>({value:e})))],width:t.DefaultTableWidth,height:a(p.length,t.DefaultMinTableRowCount,c)}).component();return this.disposables.push(h.onCellAction((e=>{const t=i[e.row],n=s.findIndex((e=>d(e,t)));e.checked&&-1===n?s.push(t):e.checked||-1===n||s.splice(n,1),this.onFormFieldChange()}))),h}createDeclarativeTableList(e,n,i,s,c=t.DefaultMaxTableRowCount,l=t.DefaultTableListItemEnabledStateGetter,u=t.DefaultTableListItemValueGetter,d=t.DefaultTableListItemComparer){const p=this.getDataForDeclarativeTableList(i,s,l,u,d),h=this.modelView.modelBuilder.declarativeTable().withProps({ariaLabel:e,dataValues:p,columns:[{displayName:o.SelectText,valueType:r.DeclarativeDataType.boolean,isReadOnly:!1,width:"20%",headerCssStyles:{...t.tableHeader,"text-align":"center"}},...n.map((e=>({displayName:e,valueType:r.DeclarativeDataType.string,isReadOnly:!0,width:80/n.length-1+"%",headerCssStyles:{...t.tableHeader,"text-align":"left"}})))],width:t.DefaultTableWidth,height:a(p.length,t.DefaultMinTableRowCount,c)}).component();return this.disposables.push(h.onDataChanged((e=>{const t=i[e.row],n=s.findIndex((e=>d(e,t)));e.value&&-1===n?s.push(t):e.value||-1===n||s.splice(n,1),this.onFormFieldChange()}))),h}async setTableData(e,n,r=t.DefaultMaxTableRowCount){await e.updateProperties({data:n,height:a(n?.length,t.DefaultMinTableRowCount,r)})}async setDeclarativeTableData(e,n,r=t.DefaultMaxTableRowCount){let i=e.selectedRow;e.dataValues=void 0,await e.setDataValues(n),-1!==i&&(e.selectedRow=i),await e.updateProperties({height:a(n?.length,t.DefaultMinTableRowCount,r)})}getDataForTableList(e,n,r=t.DefaultTableListItemEnabledStateGetter,i=t.DefaultTableListItemValueGetter,o=t.DefaultTableListItemComparer){return e.map((e=>{const t=n.findIndex((t=>o(t,e)));return[{checked:-1!==t,enabled:r(e)},...i(e)]}))}getDataForDeclarativeTableList(e,n,r=t.DefaultTableListItemEnabledStateGetter,i=t.DefaultTableListItemValueGetter,o=t.DefaultTableListItemComparer){return e.map((e=>{const s=n.findIndex((t=>o(t,e)));return[{value:-1!==s,enabled:r(e),style:t.tableRow,ariaLabel:e},...i(e).map((e=>({value:e,style:t.tableRow})))]}))}createTable(e,n,r,i=t.DefaultMaxTableRowCount){return this.modelView.modelBuilder.table().withProps({ariaLabel:e,data:r,columns:n,width:t.DefaultTableWidth,height:a(r.length,t.DefaultMinTableRowCount,i)}).component()}addButtonsForTable(e,t,n,r=void 0){let i,s,a,c=[];const l=(t=void 0)=>{this.onFormFieldChange();const n=1===e.selectedRows?.length&&-1!==e.selectedRows[0]&&e.selectedRows[0]<e.data.length;r&&(s.enabled=n),i.enabled=this.addButtonEnabled(e),a.enabled=!!t&&n};return i=this.createButton(o.AddText,t.buttonAriaLabel,(async()=>{await t.buttonHandler(i),l()}),t.enabled??!0),c.push(i),r&&(s=this.createButton(o.EditText,r.buttonAriaLabel,(async()=>{await r.buttonHandler(s),l()}),!1),c.push(s)),a=this.createButton(o.RemoveText,n.buttonAriaLabel,(async()=>{await n.buttonHandler(a),1===e.selectedRows.length&&e.selectedRows[0]>=e.data.length&&(e.selectedRows=[e.data.length-1]),l()}),!1),c.push(a),this.disposables.push(e.onRowSelected((()=>{const t=this.removeButtonEnabled(e);l(t)}))),this.createButtonContainer(c)}addButtonsForDeclarativeTable(e,t,n,r=void 0){let i,s,a,c=[];const l=(t=void 0)=>{this.onFormFieldChange();const n=e.selectedRow>-1&&e.selectedRow<e.dataValues.length;r&&(s.enabled=n),i.enabled=this.addButtonEnabled(e),a.enabled=!!t&&n};return i=this.createButton(o.AddText,t.buttonAriaLabel,(async()=>{await t.buttonHandler(i),l()}),t.enabled??!0),c.push(i),r&&(s=this.createButton(o.EditText,r.buttonAriaLabel,(async()=>{await r.buttonHandler(s),l()}),!1),c.push(s)),a=this.createButton(o.RemoveText,n.buttonAriaLabel,(async()=>{await n.buttonHandler(a),e.selectedRow>=e.dataValues.length&&(e.selectedRow=e.dataValues.length-1),l()}),!1),c.push(a),this.disposables.push(e.onRowSelected((()=>{const t=this.removeButtonEnabled(e);l(t)}))),this.createButtonContainer(c)}createDropdown(e,n,r,i,o=!0,s=t.DefaultInputWidth,a,c){const l=[];l.push(...r),i||l.unshift("");const u=this.modelView.modelBuilder.dropDown().withProps({ariaLabel:e,values:l,value:i,width:s,enabled:o,editable:a,strictSelection:c}).component();return this.disposables.push(u.onValueChanged((async()=>{await n(u.value),this.onFormFieldChange(),await this.runValidation(!1)}))),u}createButton(e,t,n,r=!0,i){const o=this.modelView.modelBuilder.button().withProps({label:e,ariaLabel:t,enabled:r,secondary:!0,CSSStyles:{"min-width":"70px","margin-left":"5px"},width:i}).component();return this.disposables.push(o.onDidClick((async()=>{await n()}))),o}createButtonContainer(e,t="flex-end"){return this.modelView.modelBuilder.flexContainer().withProps({CSSStyles:{margin:"5px 0"}}).withLayout({flexFlow:"horizontal",flexWrap:"nowrap",justifyContent:t}).withItems(e,{flex:"0 0 auto"}).component()}createHorizontalContainer(e,t){return this.modelView.modelBuilder.flexContainer().withItems(t,{CSSStyles:{"margin-right":"5px","margin-bottom":"10px"}}).withLayout({flexFlow:"row",alignItems:"center"}).component()}createBrowseButton(e,t=!0){const n=this.dialogObject.modelView.modelBuilder.button().withProps({ariaLabel:"browse",iconPath:s.IconPathHelper.folder,width:"18px",height:"20px",enabled:t}).component();return this.disposables.push(n.onDidClick((async()=>{await e()}))),n}createRadioButton(e,t,n,r,i=!0){const o=this.modelView.modelBuilder.radioButton().withProps({label:e,name:t,checked:n,enabled:i}).component();return this.disposables.push(o.onDidChangeCheckedState((async e=>{await r(e),this.onFormFieldChange(),await this.runValidation(!1)}))),o}removeItem(e,t){-1!==e.items.indexOf(t)&&e.removeItem(t)}addItem(e,t,n,r){-1===e.items.indexOf(t)&&(void 0===r?e.addItem(t,n):e.insertItem(t,r,n))}updateLoadingStatus(e,t=o.LoadingDialogText,n=o.LoadingDialogCompletedText){this._loadingComponent&&(this._loadingComponent.loadingText=t,this._loadingComponent.loadingCompletedText=n,this._loadingComponent.loading=e)}createFormContainer(e){return this.modelView.modelBuilder.divContainer().withLayout({width:"calc(100% - 20px)",height:"calc(100% - 20px)"}).withProps({CSSStyles:{padding:"10px"}}).withItems(e,this.getSectionItemLayout()).component()}getSectionItemLayout(){return{CSSStyles:{"margin-block-end":"5px"}}}createHyperlink(e,t){return this.modelView.modelBuilder.hyperlink().withProps({label:e,ariaLabel:e,url:t,showLinkIcon:!0}).component()}}},1776:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scriptError=t.GeneratingScriptCompletedText=t.GeneratingScriptText=t.ScriptGeneratedText=t.NoActionScriptedMessage=t.RemoveText=t.EditText=t.AddText=t.SelectText=t.ScriptText=t.LoadingDialogCompletedText=t.LoadingDialogText=t.OkText=t.YesText=t.HelpText=void 0;const r=n(4200).loadMessageBundle(n(6928).join(__dirname,"ui\\localizedConstants.ts"));t.HelpText=r(0,null),t.YesText=r(1,null),t.OkText=r(2,null),t.LoadingDialogText=r(3,null),t.LoadingDialogCompletedText=r(4,null),t.ScriptText=r(5,null),t.SelectText=r(6,null),t.AddText=r(7,null),t.EditText=r(8,null),t.RemoveText=r(9,null),t.NoActionScriptedMessage=r(10,null),t.ScriptGeneratedText=r(11,null),t.GeneratingScriptText=r(12,null),t.GeneratingScriptCompletedText=r(13,null),t.scriptError=function(e){return r(14,null,e)}},4940:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ScriptableDialogBase=void 0;const r=n(235),i=n(1398),o=n(1776),s=n(8991),a=n(76),c=n(3508);class l extends s.DialogBase{constructor(e,t,n){super(e,t,n.width||"narrow","flyout"),this.options=n,this._helpButton=r.window.createButton(o.HelpText,"left"),this.disposables.push(this._helpButton.onClick((async()=>{await i.commands.executeCommand("vscode.open",i.Uri.parse(this.helpUrl))}))),this._scriptButton=r.window.createButton(o.ScriptText,"left"),this.disposables.push(this._scriptButton.onClick((async()=>{await this.onScriptButtonClick()}))),this.dialogObject.customButtons=[this._helpButton,this._scriptButton]}onFormFieldChange(){this.updateScriptButtonState(),this.dialogObject.okButton.enabled=this.isDirty}async initialize(){await this.initializeData(),await this.initializeUI(),this.disposables.push(this.modelView.onValidityChanged((()=>{this.updateScriptButtonState()})))}updateLoadingStatus(e,t,n){super.updateLoadingStatus(e,t,n),this._helpButton.enabled=!e,this.dialogObject.okButton.enabled=this._scriptButton.enabled=!e&&this.isDirty}get opensEditorSeparately(){return!1}async onScriptButtonClick(){this.updateLoadingStatus(!0,o.GeneratingScriptText,o.GeneratingScriptCompletedText);try{if(!await this.runValidation())return;let e=o.ScriptGeneratedText;const t=await this.generateScript();if(!this.opensEditorSeparately)if(t){let e=await r.queryeditor.openQueryDocument({content:t},c.providerId);if(this.options.objectExplorerContext?.connectionProfile){let t=this.options.objectExplorerContext?.connectionProfile,n={providerId:t.providerName,connectionId:t.id,connectionName:t.connectionName,serverName:t.serverName,databaseName:t.databaseName,userName:t.userName,password:t.password,authenticationType:t.authenticationType,savePassword:t.savePassword,groupFullName:t.groupFullName,groupId:t.groupId,saveProfile:t.savePassword,azureTenantId:t.azureTenantId,options:t.options};await e.connect(n)}}else e=o.NoActionScriptedMessage;this.dialogObject.message={text:e,level:r.window.MessageLevel.Information}}catch(e){this.dialogObject.message={text:o.scriptError((0,a.getErrorMessage)(e)),level:r.window.MessageLevel.Error}}finally{this.updateLoadingStatus(!1,o.GeneratingScriptText,o.GeneratingScriptCompletedText)}}updateScriptButtonState(){this._scriptButton.enabled=this.isDirty&&this.modelView.valid}}t.ScriptableDialogBase=l},5586:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.groupBy=t.flatten=t.equals=void 0,t.equals=function(e,t,n=(e,t)=>e===t){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!n(e[r],t[r]))return!1;return!0},t.flatten=function(e){return[].concat.apply([],e)},t.groupBy=function(e,t){const n=[];let r;for(const i of e.slice(0).sort(t))r&&0===t(r[0],i)?r.push(i):(r=[i],n.push(r));return n}},8712:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataItemCache=void 0,t.DataItemCache=class{constructor(e,t){this.millisecondsToLive=1e3*t,this.getValueFunction=e,this.cachedItem=void 0,this.fetchDate=new Date(0)}isCacheExpired(){return this.fetchDate.getTime()+this.millisecondsToLive<(new Date).getTime()}async getData(...e){if(!this.cachedItem||this.isCacheExpired()){let t=await this.getValueFunction(...e);return this.cachedItem=t,this.fetchDate=new Date,t}return this.cachedItem}resetCache(){this.fetchDate=new Date(0)}}},7643:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Disposable=void 0,t.Disposable=class{constructor(){this._isDisposed=!1,this._disposables=[]}dispose(){this._isDisposed||(this._isDisposed=!0,function(e){for(;e.length;){const t=e.pop();t?.dispose()}}(this._disposables))}_register(e){return this._isDisposed?e.dispose():this._disposables.push(e),e}get isDisposed(){return this._isDisposed}}},9934:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deepClone=t.equals=void 0,t.equals=function e(t,n,r=!0){if(t===n)return!0;if(null==t||null==n)return!1;if(typeof t!=typeof n)return!1;if("object"!=typeof t)return!1;if(Array.isArray(t)!==Array.isArray(n))return!1;let i,o;if(Array.isArray(t)){if(t.length!==n.length)return!1;for(i=0;i<t.length;i++)if(r){if(!e(t[i],n[i],r))return!1}else{let o=!1;for(let s=0;s<n.length;s++)if(e(t[i],n[s],r)){o=!0;break}if(!o)return!1}}else{const s=[];for(o in t)s.push(o);s.sort();const a=[];for(o in n)a.push(o);if(a.sort(),!e(s,a,r))return!1;for(i=0;i<s.length;i++)if(!e(t[s[i]],n[s[i]],r))return!1}return!0},t.deepClone=function e(t){if(!t||"object"!=typeof t)return t;if(t instanceof RegExp)return t;const n=Array.isArray(t)?[]:{};return Object.keys(t).forEach((r=>{t[r]&&"object"==typeof t[r]?n[r]=e(t[r]):n[r]=t[r]})),n}},76:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getOrDownloadServer=t.exists=t.logDebug=t.isValidNumber=t.getUserHome=t.isObjectExplorerContext=t.removeErrorHeader=t.getErrorMessage=t.verifyPlatform=t.ensure=t.getCommonLaunchArgsAndCleanupOldLogFiles=t.getLogFileName=t.getEnableConnectionPoolingConfig=t.getEnableSqlAuthenticationProviderConfig=t.getParallelMessageProcessingLimitConfig=t.getParallelMessageProcessingConfig=t.setConfigPreloadDatabaseModel=t.getConfigPreloadDatabaseModel=t.getConfigPiiLogging=t.getConfigTracingLevel=t.TracingLevel=t.getHttpProxyStrictSSL=t.getHttpProxyUrl=t.getConfigLogRetentionSeconds=t.getConfigLogFilesRemovalLimit=t.getConfiguration=t.removeOldLogFiles=t.findNextUntitledEditorName=t.getAppDataPath=t.isLinux=void 0;const r=n(235),i=n(1398),o=n(6928),s=n(857),a=n(1203),c=n(9896),l=n(2952),u=n(932),d="logRetentionMinutes",p="logFilesRemovalLimit",h="mssql",f="enableConnectionPooling",m="tableDesigner.preloadDatabaseModel",g="http";function y(){switch(process.platform){case"win32":return process.env.APPDATA||o.join(process.env.USERPROFILE||"","AppData","Roaming");case"darwin":return o.join(s.homedir(),"Library","Application Support");case"linux":return process.env.XDG_CONFIG_HOME||o.join(s.homedir(),".config");default:throw new Error("Platform not supported")}}function b(e,t){return a(e,{age:{seconds:w()},limit:S()})}function v(e=h){return i.workspace.getConfiguration(e)}function S(){let e=v();return e?Number(e[p].toFixed(0)):void 0}function w(){let e=v();return e?Number((60*e[d]).toFixed(0)):void 0}function C(){let e=v(g);if(e)return e.proxy}function T(){let e=v(g);return!e||e.get("proxyStrictSSL",!0)}var E;function _(){let e=v();return e?e.tracingLevel:E.Critical}function x(){let e=v();return!!e&&e.piiLogging}function R(e){if(e&&""!==e){let t="Error:";e.startsWith(t)&&(e=e.substring(t.length))}return e}async function I(e){try{return await c.promises.access(e),!0}catch(e){return!1}}t.isLinux="linux"===s.platform(),t.getAppDataPath=y,t.findNextUntitledEditorName=function(e){const t=o.extname(e),n=o.basename(e,t);let i=0,s=`${n}`;do{s=`${n}${0===i?"":`-${i}`}`,i++}while(r.nb.notebookDocuments.findIndex((e=>e.isUntitled&&e.fileName===s))>-1);return s},t.removeOldLogFiles=b,t.getConfiguration=v,t.getConfigLogFilesRemovalLimit=S,t.getConfigLogRetentionSeconds=w,t.getHttpProxyUrl=C,t.getHttpProxyStrictSSL=T,function(e){e.All="All",e.Off="Off",e.Critical="Critical",e.Error="Error",e.Warning="Warning",e.Information="Information",e.Verbose="Verbose"}(E||(t.TracingLevel=E={})),t.getConfigTracingLevel=_,t.getConfigPiiLogging=x,t.getConfigPreloadDatabaseModel=function(){let e=v();return!!e&&e.get(m,!1)},t.setConfigPreloadDatabaseModel=function(e){let t=v();t&&t.update(m,e,!0)},t.getParallelMessageProcessingConfig=function(){const e=v();return!e||e.parallelMessageProcessing},t.getParallelMessageProcessingLimitConfig=function(){const e=v();return e?e.parallelMessageProcessingLimit:100},t.getEnableSqlAuthenticationProviderConfig=function(){const e=v();return!e||e.get("enableSqlAuthenticationProvider",!0)},t.getEnableConnectionPoolingConfig=function(){const e=v();if(e){const t=e.inspect(f);return r.env.quality===r.env.AppQuality.dev&&void 0===t?.globalValue&&void 0===t?.workspaceValue||e[f]}return!0},t.getLogFileName=function(e,t){return`${e}_${t}.log`},t.getCommonLaunchArgsAndCleanupOldLogFiles=function(e,t,n){let r=[];r.push("--application-name","azuredatastudio"),r.push("--data-path",y()),r.push("--locale",i.env.language),r.push("--log-file");let s=o.join(e,t);r.push(s),console.log(`logFile for ${o.basename(n)} is ${s}`),console.log(`This process (ui Extension Host) is pid: ${process.pid}`);let a=b(e);console.log(`Old log files deletion report: ${JSON.stringify(a)}`),r.push("--tracing-level"),r.push(_()),x()&&r.push("--pii-logging"),r.push("--autoflush-log");let c=C();return c&&(r.push("--http-proxy-url"),r.push(c),T()&&r.push("--http-proxy-strict-ssl")),r},t.ensure=function(e,t){return void 0===e[t]&&(e[t]={}),e[t]},t.verifyPlatform=function(){return"darwin"===s.platform()&&parseFloat(s.release())<16?Promise.resolve(!1):Promise.resolve(!0)},t.getErrorMessage=function(e,t=!1){let n;return e instanceof Error?n=e.message:e.responseText?(n=e.responseText,e.status&&(n+=` (${e.status})`)):n=JSON.stringify(e.toString()),t&&(n=R(n)),n},t.removeErrorHeader=R,t.isObjectExplorerContext=function(e){return"connectionProfile"in e&&"isConnectionNode"in e},t.getUserHome=function(){return process.env.HOME||process.env.USERPROFILE||""},t.isValidNumber=function(e){return null!=e&&""!==e&&!isNaN(Number(e.toString()))},t.logDebug=function(e){if(!0==!!i.workspace.getConfiguration(h).logDebugInfo){let t="["+(new Date).toLocaleTimeString()+"]: "+e?e.toString():0;console.log(t)}},t.exists=I;let P=!1;t.getOrDownloadServer=async function(e,t){try{const t=u.env.ADS_SQLTOOLSSERVICE;if(t){for(const n of e.executableFiles){const e=o.join(t,n);if(await I(e)){const r=`Using ${n} from ${t}`;return P||(P=!0,i.window.showInformationMessage(r)),console.log(r),e}}console.warn(`Could not find valid SQL Tools Service EXE from ${JSON.stringify(e.executableFiles)} at ${t}, falling back to config`)}}catch(e){console.warn("Unexpected error getting override path for SQL Tools Service client ",e)}const n=new l.ServerProvider(e);return t&&n.eventEmitter.onAny(t),n.getOrDownloadServer()}},4597:e=>{"use strict";e.exports=require("applicationinsights-native-metrics")},235:e=>{"use strict";e.exports=require("azdata")},1398:e=>{"use strict";e.exports=require("vscode")},2613:e=>{"use strict";e.exports=require("assert")},290:e=>{"use strict";e.exports=require("async_hooks")},181:e=>{"use strict";e.exports=require("buffer")},5317:e=>{"use strict";e.exports=require("child_process")},4236:e=>{"use strict";e.exports=require("console")},9140:e=>{"use strict";e.exports=require("constants")},6982:e=>{"use strict";e.exports=require("crypto")},2250:e=>{"use strict";e.exports=require("dns")},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")},9278:e=>{"use strict";e.exports=require("net")},857:e=>{"use strict";e.exports=require("os")},6928:e=>{"use strict";e.exports=require("path")},2987:e=>{"use strict";e.exports=require("perf_hooks")},932:e=>{"use strict";e.exports=require("process")},2203:e=>{"use strict";e.exports=require("stream")},3193:e=>{"use strict";e.exports=require("string_decoder")},3557:e=>{"use strict";e.exports=require("timers")},4756:e=>{"use strict";e.exports=require("tls")},2018:e=>{"use strict";e.exports=require("tty")},7016:e=>{"use strict";e.exports=require("url")},9023:e=>{"use strict";e.exports=require("util")},3106:e=>{"use strict";e.exports=require("zlib")}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.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})};var r={};(()=>{"use strict";var e=r;Object.defineProperty(e,"__esModule",{value:!0}),e.deactivate=e.activate=void 0;const t=n(1398),i=n(235),o=n(6928),s=n(857),a=n(3508),c=n(8835),l=n(76),u=n(9699),d=n(6705),p=n(8415),h=n(8481),f=n(5063),m=n(3469),g=n(9896),y=n(3344),b=n(4200),v=n(1146),S=n(2142),w=n(6734),C=n(1651),T=n(8546),E=b.loadMessageBundle(n(6928).join(__dirname,"main.ts"));async function _(){const e=E(2,null),n=E(3,null);return await t.window.showInformationMessage(e,n)===n&&(await t.commands.executeCommand("workbench.action.reloadWindow"),!0)}e.activate=async function(e){if(!await l.verifyPlatform()){const e=(0,C.unsupportedPlatform)(s.platform());throw t.window.showErrorMessage(e),new Error((0,C.unsupportedPlatform)(e))}await l.exists(e.logUri.fsPath)||await g.promises.mkdir(e.logUri.fsPath),y.IconPathHelper.setExtensionContext(e);let n=new u.AppContext(e),r=new d.MssqlIconProvider;i.dataprotocol.registerIconProvider(r),t.commands.registerCommand("mssql.searchServers",(()=>{t.window.showInputBox({placeHolder:E(4,null)}).then((e=>{e&&t.commands.executeCommand("registeredServers.searchServer",e)}))})),t.commands.registerCommand("mssql.clearSearchServerResult",(()=>{t.commands.executeCommand("registeredServers.clearSearchServerResult")})),e.subscriptions.push(new c.default),function(e){e.subscriptions.push(t.commands.registerCommand("mssql.showLogFile",(async()=>{const n=await t.window.showQuickPick(x);if(n){const r=await t.workspace.openTextDocument(t.Uri.file(o.join(e.logUri.fsPath,n)));r&&t.window.showTextDocument(r)}})))}(e);const b=(0,p.getBookExtensionContributions)(e);e.subscriptions.push(b),(0,h.registerBooksWidget)(b);const R=new m.SqlToolsServer;return e.subscriptions.push(R),await R.start(n),e.subscriptions.push(t.commands.registerCommand("mssql.exportSqlAsNotebook",(async e=>{try{const r=await n.getService(a.NotebookConvertService).convertSqlToNotebook(e.toString());if(!r)throw new Error(C.noConvertResult);const o=function(){let e=0;for(;;){let t=`Notebook-${e}`;if(!(i.nb.notebookDocuments.findIndex((e=>e.isUntitled&&e.fileName===t))>-1))return t;e++}}(),s=t.Uri.parse(`untitled:${o}`);await i.nb.showNotebookDocument(s,{initialContent:r.content})}catch(e){t.window.showErrorMessage(E(0,null,e.toString()))}}))),e.subscriptions.push(t.commands.registerCommand("mssql.exportNotebookToSql",(async e=>{try{const r=t.workspace.textDocuments.find((t=>t.uri.toString()===e.toString()));if(!r)throw new Error((0,C.noDocumentFound)(e.toString()));const o=await n.getService(a.NotebookConvertService).convertNotebookToSql(r.getText());if(!o)throw new Error(C.noConvertResult);await i.queryeditor.openQueryDocument({content:o.content})}catch(e){t.window.showErrorMessage(E(1,null,e.toString()))}}))),e.subscriptions.push(t.commands.registerCommand(a.cmdObjectExplorerEnableGroupBySchemaCommand,(async()=>{w.TelemetryReporter.sendActionEvent(w.TelemetryViews.MssqlObjectExplorer,w.TelemetryActions.EnableGroupBySchemaContextMenu),await t.workspace.getConfiguration().update(a.configObjectExplorerGroupBySchemaFlagName,!0,!0)}))),e.subscriptions.push(t.commands.registerCommand(a.cmdObjectExplorerDisableGroupBySchemaCommand,(async()=>{w.TelemetryReporter.sendActionEvent(w.TelemetryViews.MssqlObjectExplorer,w.TelemetryActions.DisableGroupBySchemaContextMenu),await t.workspace.getConfiguration().update(a.configObjectExplorerGroupBySchemaFlagName,!1,!0)}))),e.subscriptions.push(t.commands.registerCommand(a.cmdObjectExplorerEnabbleGroupBySchemaTitleCommand,(async()=>{w.TelemetryReporter.sendActionEvent(w.TelemetryViews.MssqlObjectExplorer,w.TelemetryActions.EnableGroupByServerViewTitleAction),await t.workspace.getConfiguration().update(a.configObjectExplorerGroupBySchemaFlagName,!0,!0)}))),e.subscriptions.push(t.commands.registerCommand(a.cmdObjectExplorerDisableGroupBySchemaTitleCommand,(async()=>{w.TelemetryReporter.sendActionEvent(w.TelemetryViews.MssqlObjectExplorer,w.TelemetryActions.DisableGroupByServerViewTitleAction),await t.workspace.getConfiguration().update(a.configObjectExplorerGroupBySchemaFlagName,!1,!0)}))),e.subscriptions.push(t.workspace.onDidChangeConfiguration((async e=>{if(e.affectsConfiguration(a.configObjectExplorerGroupBySchemaFlagName)){const e=t.workspace.getConfiguration().get(a.configObjectExplorerGroupBySchemaFlagName)?w.TelemetryActions.GroupBySchemaEnabled:w.TelemetryActions.GroupBySchemaDisabled;w.TelemetryReporter.sendActionEvent(w.TelemetryViews.MssqlObjectExplorer,e);const n=await i.objectexplorer.getActiveConnectionNodes(),r=await i.connection.getConnections();n.forEach((async e=>{const t=r.find((t=>t.connectionId===e.connectionId));t?.providerId===a.providerId&&await e.refresh()}))}if(e.affectsConfiguration(a.configParallelMessageProcessingName)&&(l.getParallelMessageProcessingConfig()&&w.TelemetryReporter.sendActionEvent(w.TelemetryViews.MssqlConnections,w.TelemetryActions.EnableFeatureAsyncParallelProcessing),await _()),l.getParallelMessageProcessingConfig()&&e.affectsConfiguration(a.configParallelMessageProcessingLimitName)){let e;e.parallelMessageProcessingLimit=l.getParallelMessageProcessingLimitConfig(),w.TelemetryReporter.sendMetricsEvent(e,a.configParallelMessageProcessingLimitName),await _()}e.affectsConfiguration(a.configEnableSqlAuthenticationProviderName)&&(l.getEnableSqlAuthenticationProviderConfig()&&w.TelemetryReporter.sendActionEvent(w.TelemetryViews.MssqlConnections,w.TelemetryActions.EnableFeatureSqlAuthenticationProvider),await _()),e.affectsConfiguration(a.configEnableConnectionPoolingName)&&(l.getEnableConnectionPoolingConfig()&&w.TelemetryReporter.sendActionEvent(w.TelemetryViews.MssqlConnections,w.TelemetryActions.EnableFeatureConnectionPooling),await _()),(e.affectsConfiguration(a.configHttpProxy)||e.affectsConfiguration(a.configHttpProxyStrictSSL))&&await _()}))),(0,v.registerTableDesignerCommands)(n),(0,S.registerObjectManagementCommands)(n),(0,T.registerConnectionCommands)(n),e.subscriptions.push(w.TelemetryReporter),(0,f.createMssqlApi)(n,R)};const x=["resourceprovider.log","sqltools.log","credentialstore.log"];e.deactivate=function(){}})();var i=exports;for(var o in r)i[o]=r[o];r.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})})();
//# sourceMappingURL=https://sqlopsbuilds.blob.core.windows.net/sourcemaps/82e35eb142bf0f4567ff8c6dd4f16f33abfc2d50/extensions/mssql/dist/main.js.map