@activepieces/piece-microsoft-365-planner 0.2.5 → 0.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +2 -4
  2. package/src/index.js +5 -5
package/package.json CHANGED
@@ -1,11 +1,9 @@
1
1
  {
2
2
  "name": "@activepieces/piece-microsoft-365-planner",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "type": "commonjs",
5
5
  "main": "./src/index.js",
6
- "dependencies": {
7
- "@microsoft/microsoft-graph-types": "2.40.0"
8
- },
6
+ "dependencies": {},
9
7
  "files": [
10
8
  "src/index.js",
11
9
  "package.json",
package/src/index.js CHANGED
@@ -1,14 +1,14 @@
1
- "use strict";var qp=Object.create;var Zt=Object.defineProperty;var Gp=Object.getOwnPropertyDescriptor;var Wp=Object.getOwnPropertyNames;var Kp=Object.getPrototypeOf,Jp=Object.prototype.hasOwnProperty;var i=(e,t)=>Zt(e,"name",{value:t,configurable:!0});var Xp=(e,t)=>()=>(e&&(t=e(e=0)),t);var b=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),uo=(e,t)=>{for(var r in t)Zt(e,r,{get:t[r],enumerable:!0})},Bi=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Wp(t))!Jp.call(e,o)&&o!==r&&Zt(e,o,{get:()=>t[o],enumerable:!(n=Gp(t,o))||n.enumerable});return e};var Ne=(e,t,r)=>(r=e!=null?qp(Kp(e)):{},Bi(t||!e||!e.__esModule?Zt(r,"default",{value:e,enumerable:!0}):r,e)),oe=e=>Bi(Zt({},"__esModule",{value:!0}),e);var is=b((os,Br)=>{(function(e){"use strict";let t="(0?\\d+|0x[a-f0-9]+)",r={fourOctet:new RegExp(`^${t}\\.${t}\\.${t}\\.${t}$`,"i"),threeOctet:new RegExp(`^${t}\\.${t}\\.${t}$`,"i"),twoOctet:new RegExp(`^${t}\\.${t}$`,"i"),longValue:new RegExp(`^${t}$`,"i")},n=new RegExp("^0[0-7]+$","i"),o=new RegExp("^0x[a-f0-9]+$","i"),a="%[0-9a-z]{1,}",s="(?:[0-9a-f]+::?)+",u={zoneIndex:new RegExp(a,"i"),native:new RegExp(`^(::)?(${s})?([0-9a-f]+)?(::)?(${a})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${t}\\.${t}\\.${t}\\.${t}(${a})?)$`,"i"),transitional:new RegExp(`^((?:${s})|(?:::)(?:${s})?)${t}\\.${t}\\.${t}\\.${t}(${a})?$`,"i")};function p(l,f){if(l.indexOf("::")!==l.lastIndexOf("::"))return null;let y=0,h=-1,_=(l.match(u.zoneIndex)||[])[0],T,V;for(_&&(_=_.substring(1),l=l.replace(/%.+$/,""));(h=l.indexOf(":",h+1))>=0;)y++;if(l.substr(0,2)==="::"&&y--,l.substr(-2,2)==="::"&&y--,y>f)return null;for(V=f-y,T=":";V--;)T+="0:";return l=l.replace("::",T),l[0]===":"&&(l=l.slice(1)),l[l.length-1]===":"&&(l=l.slice(0,-1)),f=function(){let fe=l.split(":"),xe=[];for(let Ce=0;Ce<fe.length;Ce++)xe.push(parseInt(fe[Ce],16));return xe}(),{parts:f,zoneId:_}}i(p,"expandIPv6");function d(l,f,y,h){if(l.length!==f.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let _=0,T;for(;h>0;){if(T=y-h,T<0&&(T=0),l[_]>>T!==f[_]>>T)return!1;h-=y,_+=1}return!0}i(d,"matchCIDR");function g(l){if(o.test(l))return parseInt(l,16);if(l[0]==="0"&&!isNaN(parseInt(l[1],10))){if(n.test(l))return parseInt(l,8);throw new Error(`ipaddr: cannot parse ${l} as octal`)}return parseInt(l,10)}i(g,"parseIntAuto");function x(l,f){for(;l.length<f;)l=`0${l}`;return l}i(x,"padPart");let v={};v.IPv4=function(){function l(f){if(f.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let y,h;for(y=0;y<f.length;y++)if(h=f[y],!(0<=h&&h<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=f}return i(l,"IPv4"),l.prototype.SpecialRanges={unspecified:[[new l([0,0,0,0]),8]],broadcast:[[new l([255,255,255,255]),32]],multicast:[[new l([224,0,0,0]),4]],linkLocal:[[new l([169,254,0,0]),16]],loopback:[[new l([127,0,0,0]),8]],carrierGradeNat:[[new l([100,64,0,0]),10]],private:[[new l([10,0,0,0]),8],[new l([172,16,0,0]),12],[new l([192,168,0,0]),16]],reserved:[[new l([192,0,0,0]),24],[new l([192,0,2,0]),24],[new l([192,88,99,0]),24],[new l([198,18,0,0]),15],[new l([198,51,100,0]),24],[new l([203,0,113,0]),24],[new l([240,0,0,0]),4]],as112:[[new l([192,175,48,0]),24],[new l([192,31,196,0]),24]],amt:[[new l([192,52,193,0]),24]]},l.prototype.kind=function(){return"ipv4"},l.prototype.match=function(f,y){let h;if(y===void 0&&(h=f,f=h[0],y=h[1]),f.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return d(this.octets,f.octets,8,y)},l.prototype.prefixLengthFromSubnetMask=function(){let f=0,y=!1,h={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},_,T,V;for(_=3;_>=0;_-=1)if(T=this.octets[_],T in h){if(V=h[T],y&&V!==0)return null;V!==8&&(y=!0),f+=V}else return null;return 32-f},l.prototype.range=function(){return v.subnetMatch(this,this.SpecialRanges)},l.prototype.toByteArray=function(){return this.octets.slice(0)},l.prototype.toIPv4MappedAddress=function(){return v.IPv6.parse(`::ffff:${this.toString()}`)},l.prototype.toNormalizedString=function(){return this.toString()},l.prototype.toString=function(){return this.octets.join(".")},l}(),v.IPv4.broadcastAddressFromCIDR=function(l){try{let f=this.parseCIDR(l),y=f[0].toByteArray(),h=this.subnetMaskFromPrefixLength(f[1]).toByteArray(),_=[],T=0;for(;T<4;)_.push(parseInt(y[T],10)|parseInt(h[T],10)^255),T++;return new this(_)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},v.IPv4.isIPv4=function(l){return this.parser(l)!==null},v.IPv4.isValid=function(l){try{return new this(this.parser(l)),!0}catch{return!1}},v.IPv4.isValidCIDR=function(l){try{return this.parseCIDR(l),!0}catch{return!1}},v.IPv4.isValidFourPartDecimal=function(l){return!!(v.IPv4.isValid(l)&&l.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},v.IPv4.isValidCIDRFourPartDecimal=function(l){let f=l.match(/^(.+)\/(\d+)$/);return!v.IPv4.isValidCIDR(l)||!f?!1:v.IPv4.isValidFourPartDecimal(f[1])},v.IPv4.networkAddressFromCIDR=function(l){let f,y,h,_,T;try{for(f=this.parseCIDR(l),h=f[0].toByteArray(),T=this.subnetMaskFromPrefixLength(f[1]).toByteArray(),_=[],y=0;y<4;)_.push(parseInt(h[y],10)&parseInt(T[y],10)),y++;return new this(_)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},v.IPv4.parse=function(l){let f=this.parser(l);if(f===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(f)},v.IPv4.parseCIDR=function(l){let f;if(f=l.match(/^(.+)\/(\d+)$/)){let y=parseInt(f[2]);if(y>=0&&y<=32){let h=[this.parse(f[1]),y];return Object.defineProperty(h,"toString",{value:i(function(){return this.join("/")},"value")}),h}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},v.IPv4.parser=function(l){let f,y,h;if(f=l.match(r.fourOctet))return function(){let _=f.slice(1,6),T=[];for(let V=0;V<_.length;V++)y=_[V],T.push(g(y));return T}();if(f=l.match(r.longValue)){if(h=g(f[1]),h>4294967295||h<0)throw new Error("ipaddr: address outside defined range");return function(){let _=[],T;for(T=0;T<=24;T+=8)_.push(h>>T&255);return _}().reverse()}else return(f=l.match(r.twoOctet))?function(){let _=f.slice(1,4),T=[];if(h=g(_[1]),h>16777215||h<0)throw new Error("ipaddr: address outside defined range");return T.push(g(_[0])),T.push(h>>16&255),T.push(h>>8&255),T.push(h&255),T}():(f=l.match(r.threeOctet))?function(){let _=f.slice(1,5),T=[];if(h=g(_[2]),h>65535||h<0)throw new Error("ipaddr: address outside defined range");return T.push(g(_[0])),T.push(g(_[1])),T.push(h>>8&255),T.push(h&255),T}():null},v.IPv4.subnetMaskFromPrefixLength=function(l){if(l=parseInt(l),l<0||l>32)throw new Error("ipaddr: invalid IPv4 prefix length");let f=[0,0,0,0],y=0,h=Math.floor(l/8);for(;y<h;)f[y]=255,y++;return h<4&&(f[h]=Math.pow(2,l%8)-1<<8-l%8),new this(f)},v.IPv6=function(){function l(f,y){let h,_;if(f.length===16)for(this.parts=[],h=0;h<=14;h+=2)this.parts.push(f[h]<<8|f[h+1]);else if(f.length===8)this.parts=f;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(h=0;h<this.parts.length;h++)if(_=this.parts[h],!(0<=_&&_<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");y&&(this.zoneId=y)}return i(l,"IPv6"),l.prototype.SpecialRanges={unspecified:[new l([0,0,0,0,0,0,0,0]),128],linkLocal:[new l([65152,0,0,0,0,0,0,0]),10],multicast:[new l([65280,0,0,0,0,0,0,0]),8],loopback:[new l([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new l([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new l([0,0,0,0,0,65535,0,0]),96],discard:[new l([256,0,0,0,0,0,0,0]),64],rfc6145:[new l([0,0,0,0,65535,0,0,0]),96],rfc6052:[new l([100,65435,0,0,0,0,0,0]),96],"6to4":[new l([8194,0,0,0,0,0,0,0]),16],teredo:[new l([8193,0,0,0,0,0,0,0]),32],benchmarking:[new l([8193,2,0,0,0,0,0,0]),48],amt:[new l([8193,3,0,0,0,0,0,0]),32],as112v6:[[new l([8193,4,274,0,0,0,0,0]),48],[new l([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new l([8193,16,0,0,0,0,0,0]),28],orchid2:[new l([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new l([8193,48,0,0,0,0,0,0]),28],reserved:[[new l([8193,0,0,0,0,0,0,0]),23],[new l([8193,3512,0,0,0,0,0,0]),32]]},l.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"},l.prototype.kind=function(){return"ipv6"},l.prototype.match=function(f,y){let h;if(y===void 0&&(h=f,f=h[0],y=h[1]),f.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return d(this.parts,f.parts,16,y)},l.prototype.prefixLengthFromSubnetMask=function(){let f=0,y=!1,h={0:16,32768:15,49152:14,57344:13,61440:12,63488:11,64512:10,65024:9,65280:8,65408:7,65472:6,65504:5,65520:4,65528:3,65532:2,65534:1,65535:0},_,T;for(let V=7;V>=0;V-=1)if(_=this.parts[V],_ in h){if(T=h[_],y&&T!==0)return null;T!==16&&(y=!0),f+=T}else return null;return 128-f},l.prototype.range=function(){return v.subnetMatch(this,this.SpecialRanges)},l.prototype.toByteArray=function(){let f,y=[],h=this.parts;for(let _=0;_<h.length;_++)f=h[_],y.push(f>>8),y.push(f&255);return y},l.prototype.toFixedLengthString=function(){let f=function(){let h=[];for(let _=0;_<this.parts.length;_++)h.push(x(this.parts[_].toString(16),4));return h}.call(this).join(":"),y="";return this.zoneId&&(y=`%${this.zoneId}`),f+y},l.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");let f=this.parts.slice(-2),y=f[0],h=f[1];return new v.IPv4([y>>8,y&255,h>>8,h&255])},l.prototype.toNormalizedString=function(){let f=function(){let h=[];for(let _=0;_<this.parts.length;_++)h.push(this.parts[_].toString(16));return h}.call(this).join(":"),y="";return this.zoneId&&(y=`%${this.zoneId}`),f+y},l.prototype.toRFC5952String=function(){let f=/((^|:)(0(:|$)){2,})/g,y=this.toNormalizedString(),h=0,_=-1,T;for(;T=f.exec(y);)T[0].length>_&&(h=T.index,_=T[0].length);return _<0?y:`${y.substring(0,h)}::${y.substring(h+_)}`},l.prototype.toString=function(){return this.toRFC5952String()},l}(),v.IPv6.broadcastAddressFromCIDR=function(l){try{let f=this.parseCIDR(l),y=f[0].toByteArray(),h=this.subnetMaskFromPrefixLength(f[1]).toByteArray(),_=[],T=0;for(;T<16;)_.push(parseInt(y[T],10)|parseInt(h[T],10)^255),T++;return new this(_)}catch(f){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${f})`)}},v.IPv6.isIPv6=function(l){return this.parser(l)!==null},v.IPv6.isValid=function(l){if(typeof l=="string"&&l.indexOf(":")===-1)return!1;try{let f=this.parser(l);return new this(f.parts,f.zoneId),!0}catch{return!1}},v.IPv6.isValidCIDR=function(l){if(typeof l=="string"&&l.indexOf(":")===-1)return!1;try{return this.parseCIDR(l),!0}catch{return!1}},v.IPv6.networkAddressFromCIDR=function(l){let f,y,h,_,T;try{for(f=this.parseCIDR(l),h=f[0].toByteArray(),T=this.subnetMaskFromPrefixLength(f[1]).toByteArray(),_=[],y=0;y<16;)_.push(parseInt(h[y],10)&parseInt(T[y],10)),y++;return new this(_)}catch(V){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${V})`)}},v.IPv6.parse=function(l){let f=this.parser(l);if(f.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(f.parts,f.zoneId)},v.IPv6.parseCIDR=function(l){let f,y,h;if((y=l.match(/^(.+)\/(\d+)$/))&&(f=parseInt(y[2]),f>=0&&f<=128))return h=[this.parse(y[1]),f],Object.defineProperty(h,"toString",{value:i(function(){return this.join("/")},"value")}),h;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},v.IPv6.parser=function(l){let f,y,h,_,T,V;if(h=l.match(u.deprecatedTransitional))return this.parser(`::ffff:${h[1]}`);if(u.native.test(l))return p(l,8);if((h=l.match(u.transitional))&&(V=h[6]||"",f=h[1],h[1].endsWith("::")||(f=f.slice(0,-1)),f=p(f+V,6),f.parts)){for(T=[parseInt(h[2]),parseInt(h[3]),parseInt(h[4]),parseInt(h[5])],y=0;y<T.length;y++)if(_=T[y],!(0<=_&&_<=255))return null;return f.parts.push(T[0]<<8|T[1]),f.parts.push(T[2]<<8|T[3]),{parts:f.parts,zoneId:f.zoneId}}return null},v.IPv6.subnetMaskFromPrefixLength=function(l){if(l=parseInt(l),l<0||l>128)throw new Error("ipaddr: invalid IPv6 prefix length");let f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],y=0,h=Math.floor(l/8);for(;y<h;)f[y]=255,y++;return h<16&&(f[h]=Math.pow(2,l%8)-1<<8-l%8),new this(f)},v.fromByteArray=function(l){let f=l.length;if(f===4)return new v.IPv4(l);if(f===16)return new v.IPv6(l);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},v.isValid=function(l){return v.IPv6.isValid(l)||v.IPv4.isValid(l)},v.isValidCIDR=function(l){return v.IPv6.isValidCIDR(l)||v.IPv4.isValidCIDR(l)},v.parse=function(l){if(v.IPv6.isValid(l))return v.IPv6.parse(l);if(v.IPv4.isValid(l))return v.IPv4.parse(l);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},v.parseCIDR=function(l){try{return v.IPv6.parseCIDR(l)}catch{try{return v.IPv4.parseCIDR(l)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},v.process=function(l){let f=this.parse(l);return f.kind()==="ipv6"&&f.isIPv4MappedAddress()?f.toIPv4Address():f},v.subnetMatch=function(l,f,y){let h,_,T,V;y==null&&(y="unicast");for(_ in f)if(Object.prototype.hasOwnProperty.call(f,_)){for(T=f[_],T[0]&&!(T[0]instanceof Array)&&(T=[T]),h=0;h<T.length;h++)if(V=T[h],l.kind()===V[0].kind()&&l.match.apply(l,V))return _}return y},typeof Br<"u"&&Br.exports?Br.exports=v:e.ipaddr=v})(os)});var ae={};uo(ae,{__addDisposableResource:()=>Iu,__assign:()=>Hr,__asyncDelegator:()=>yu,__asyncGenerator:()=>hu,__asyncValues:()=>vu,__await:()=>$t,__awaiter:()=>lu,__classPrivateFieldGet:()=>bu,__classPrivateFieldIn:()=>Eu,__classPrivateFieldSet:()=>Tu,__createBinding:()=>qr,__decorate:()=>nu,__disposeResources:()=>Su,__esDecorate:()=>iu,__exportStar:()=>du,__extends:()=>tu,__generator:()=>pu,__importDefault:()=>xu,__importStar:()=>Pu,__makeTemplateObject:()=>_u,__metadata:()=>cu,__param:()=>ou,__propKey:()=>su,__read:()=>Ko,__rest:()=>ru,__rewriteRelativeImportExtension:()=>Au,__runInitializers:()=>au,__setFunctionName:()=>uu,__spread:()=>fu,__spreadArray:()=>gu,__spreadArrays:()=>mu,__values:()=>Zr,default:()=>Tm});function tu(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Go(e,t);function r(){this.constructor=e}i(r,"__"),e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function ru(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function nu(e,t,r,n){var o=arguments.length,a=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var u=e.length-1;u>=0;u--)(s=e[u])&&(a=(o<3?s(a):o>3?s(t,r,a):s(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}function ou(e,t){return function(r,n){t(r,n,e)}}function iu(e,t,r,n,o,a){function s(_){if(_!==void 0&&typeof _!="function")throw new TypeError("Function expected");return _}i(s,"accept");for(var u=n.kind,p=u==="getter"?"get":u==="setter"?"set":"value",d=!t&&e?n.static?e:e.prototype:null,g=t||(d?Object.getOwnPropertyDescriptor(d,n.name):{}),x,v=!1,l=r.length-1;l>=0;l--){var f={};for(var y in n)f[y]=y==="access"?{}:n[y];for(var y in n.access)f.access[y]=n.access[y];f.addInitializer=function(_){if(v)throw new TypeError("Cannot add initializers after decoration has completed");a.push(s(_||null))};var h=(0,r[l])(u==="accessor"?{get:g.get,set:g.set}:g[p],f);if(u==="accessor"){if(h===void 0)continue;if(h===null||typeof h!="object")throw new TypeError("Object expected");(x=s(h.get))&&(g.get=x),(x=s(h.set))&&(g.set=x),(x=s(h.init))&&o.unshift(x)}else(x=s(h))&&(u==="field"?o.unshift(x):g[p]=x)}d&&Object.defineProperty(d,n.name,g),v=!0}function au(e,t,r){for(var n=arguments.length>2,o=0;o<t.length;o++)r=n?t[o].call(e,r):t[o].call(e);return n?r:void 0}function su(e){return typeof e=="symbol"?e:"".concat(e)}function uu(e,t,r){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function cu(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function lu(e,t,r,n){function o(a){return a instanceof r?a:new r(function(s){s(a)})}return i(o,"adopt"),new(r||(r=Promise))(function(a,s){function u(g){try{d(n.next(g))}catch(x){s(x)}}i(u,"fulfilled");function p(g){try{d(n.throw(g))}catch(x){s(x)}}i(p,"rejected");function d(g){g.done?a(g.value):o(g.value).then(u,p)}i(d,"step"),d((n=n.apply(e,t||[])).next())})}function pu(e,t){var r={label:0,sent:i(function(){if(a[0]&1)throw a[1];return a[1]},"sent"),trys:[],ops:[]},n,o,a,s=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return s.next=u(0),s.throw=u(1),s.return=u(2),typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(d){return function(g){return p([d,g])}}function p(d){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,d[0]&&(r=0)),r;)try{if(n=1,o&&(a=d[0]&2?o.return:d[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,d[1])).done)return a;switch(o=0,a&&(d=[d[0]&2,a.value]),d[0]){case 0:case 1:a=d;break;case 4:return r.label++,{value:d[1],done:!1};case 5:r.label++,o=d[1],d=[0];continue;case 7:d=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!a||d[1]>a[0]&&d[1]<a[3])){r.label=d[1];break}if(d[0]===6&&r.label<a[1]){r.label=a[1],a=d;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(d);break}a[2]&&r.ops.pop(),r.trys.pop();continue}d=t.call(e,r)}catch(g){d=[6,g],o=0}finally{n=a=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function du(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&qr(t,e,r)}function Zr(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:i(function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}},"next")};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ko(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,a=[],s;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(u){s={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return a}function fu(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Ko(arguments[t]));return e}function mu(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),o=0,t=0;t<r;t++)for(var a=arguments[t],s=0,u=a.length;s<u;s++,o++)n[o]=a[s];return n}function gu(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}function $t(e){return this instanceof $t?(this.v=e,this):new $t(e)}function hu(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),o,a=[];return o=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),u("next"),u("throw"),u("return",s),o[Symbol.asyncIterator]=function(){return this},o;function s(l){return function(f){return Promise.resolve(f).then(l,x)}}function u(l,f){n[l]&&(o[l]=function(y){return new Promise(function(h,_){a.push([l,y,h,_])>1||p(l,y)})},f&&(o[l]=f(o[l])))}function p(l,f){try{d(n[l](f))}catch(y){v(a[0][3],y)}}function d(l){l.value instanceof $t?Promise.resolve(l.value.v).then(g,x):v(a[0][2],l)}function g(l){p("next",l)}function x(l){p("throw",l)}function v(l,f){l(f),a.shift(),a.length&&p(a[0][0],a[0][1])}}function yu(e){var t,r;return t={},n("next"),n("throw",function(o){throw o}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(o,a){t[o]=e[o]?function(s){return(r=!r)?{value:$t(e[o](s)),done:!1}:a?a(s):s}:a}}function vu(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof Zr=="function"?Zr(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(a){r[a]=e[a]&&function(s){return new Promise(function(u,p){s=e[a](s),o(u,p,s.done,s.value)})}}function o(a,s,u,p){Promise.resolve(p).then(function(d){a({value:d,done:u})},s)}}function _u(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function Pu(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=Wo(e),n=0;n<r.length;n++)r[n]!=="default"&&qr(t,e,r[n]);return xm(t,e),t}function xu(e){return e&&e.__esModule?e:{default:e}}function bu(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)}function Tu(e,t,r,n,o){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?o.call(e,r):o?o.value=r:t.set(e,r),r}function Eu(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function Iu(e,t,r){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var n,o;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(o=n)}if(typeof n!="function")throw new TypeError("Object not disposable.");o&&(n=i(function(){try{o.call(this)}catch(a){return Promise.reject(a)}},"dispose")),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}function Su(e){function t(a){e.error=e.hasError?new bm(a,e.error,"An error was suppressed during disposal."):a,e.hasError=!0}i(t,"fail");var r,n=0;function o(){for(;r=e.stack.pop();)try{if(!r.async&&n===1)return n=0,e.stack.push(r),Promise.resolve().then(o);if(r.dispose){var a=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(a).then(o,function(s){return t(s),o()})}else n|=1}catch(s){t(s)}if(n===1)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}return i(o,"next"),o()}function Au(e,t){return typeof e=="string"&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(r,n,o,a,s){return n?t?".jsx":".js":o&&(!a||!s)?r:o+a+"."+s.toLowerCase()+"js"}):e}var Go,Hr,qr,xm,Wo,bm,Tm,se=Xp(()=>{Go=i(function(e,t){return Go=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},Go(e,t)},"extendStatics");i(tu,"__extends");Hr=i(function(){return Hr=Object.assign||i(function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},"__assign"),Hr.apply(this,arguments)},"__assign");i(ru,"__rest");i(nu,"__decorate");i(ou,"__param");i(iu,"__esDecorate");i(au,"__runInitializers");i(su,"__propKey");i(uu,"__setFunctionName");i(cu,"__metadata");i(lu,"__awaiter");i(pu,"__generator");qr=Object.create?function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:i(function(){return t[r]},"get")}),Object.defineProperty(e,n,o)}:function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]};i(du,"__exportStar");i(Zr,"__values");i(Ko,"__read");i(fu,"__spread");i(mu,"__spreadArrays");i(gu,"__spreadArray");i($t,"__await");i(hu,"__asyncGenerator");i(yu,"__asyncDelegator");i(vu,"__asyncValues");i(_u,"__makeTemplateObject");xm=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},Wo=i(function(e){return Wo=Object.getOwnPropertyNames||function(t){var r=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[r.length]=n);return r},Wo(e)},"ownKeys");i(Pu,"__importStar");i(xu,"__importDefault");i(bu,"__classPrivateFieldGet");i(Tu,"__classPrivateFieldSet");i(Eu,"__classPrivateFieldIn");i(Iu,"__addDisposableResource");bm=typeof SuppressedError=="function"?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};i(Su,"__disposeResources");i(Au,"__rewriteRelativeImportExtension");Tm={__extends:tu,__assign:Hr,__rest:ru,__decorate:nu,__param:ou,__esDecorate:iu,__runInitializers:au,__propKey:su,__setFunctionName:uu,__metadata:cu,__awaiter:lu,__generator:pu,__createBinding:qr,__exportStar:du,__values:Zr,__read:Ko,__spread:fu,__spreadArrays:mu,__spreadArray:gu,__await:$t,__asyncGenerator:hu,__asyncDelegator:yu,__asyncValues:vu,__makeTemplateObject:_u,__importStar:Pu,__importDefault:xu,__classPrivateFieldGet:bu,__classPrivateFieldSet:Tu,__classPrivateFieldIn:Eu,__addDisposableResource:Iu,__disposeResources:Su,__rewriteRelativeImportExtension:Au}});var mr=b(Gr=>{"use strict";Object.defineProperty(Gr,"__esModule",{value:!0});Gr.RequestMethod=void 0;var $u;(function(e){e.GET="GET",e.PATCH="PATCH",e.POST="POST",e.PUT="PUT",e.DELETE="DELETE"})($u||(Gr.RequestMethod=$u={}))});var wu=b(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.BatchRequestContent=void 0;var wt=(se(),oe(ae)),Jo=mr(),Em=function(){function e(t){if(this.requests=new Map,typeof t<"u"){var r=e.requestLimit;if(t.length>r){var n=new Error("Maximum requests limit exceeded, Max allowed number of requests are ".concat(r));throw n.name="Limit Exceeded Error",n}for(var o=0,a=t;o<a.length;o++){var s=a[o];this.addRequest(s)}}}return i(e,"BatchRequestContent"),e.validateDependencies=function(t){var r=i(function(s){for(var u=s.entries(),p=u.next();!p.done;){var d=p.value[1];if(d.dependsOn!==void 0&&d.dependsOn.length>0)return!1;p=u.next()}return!0},"isParallel"),n=i(function(s){var u=s.entries(),p=u.next(),d=p.value[1];if(d.dependsOn!==void 0&&d.dependsOn.length>0)return!1;var g=p;for(p=u.next();!p.done;){var x=p.value[1];if(x.dependsOn===void 0||x.dependsOn.length!==1||x.dependsOn[0]!==g.value[1].id)return!1;g=p,p=u.next()}return!0},"isSerial"),o=i(function(s){var u=s.entries(),p=u.next(),d=p.value[1],g;if(d.dependsOn===void 0||d.dependsOn.length===0)g=d.id;else if(d.dependsOn.length===1){var x=d.dependsOn[0];if(x!==d.id&&s.has(x))g=x;else return!1}else return!1;for(p=u.next();!p.done;){var v=p.value[1];if((v.dependsOn===void 0||v.dependsOn.length===0)&&g!==v.id||v.dependsOn!==void 0&&v.dependsOn.length!==0&&(v.dependsOn.length===1&&(v.id===g||v.dependsOn[0]!==g)||v.dependsOn.length>1))return!1;p=u.next()}return!0},"isSame");if(t.size===0){var a=new Error("Empty requests map, Please provide at least one request.");throw a.name="Empty Requests Error",a}return r(t)||n(t)||o(t)},e.getRequestData=function(t){return wt.__awaiter(this,void 0,void 0,function(){var r,n,o,a;return wt.__generator(this,function(s){switch(s.label){case 0:return r={url:""},n=new RegExp("^https?://"),r.url=n.test(t.url)?"/"+t.url.split(/.*?\/\/.*?\//)[1]:t.url,r.method=t.method,o={},t.headers.forEach(function(u,p){o[p]=u}),Object.keys(o).length&&(r.headers=o),t.method===Jo.RequestMethod.PATCH||t.method===Jo.RequestMethod.POST||t.method===Jo.RequestMethod.PUT?(a=r,[4,e.getRequestBody(t)]):[3,2];case 1:a.body=s.sent(),s.label=2;case 2:return[2,r]}})})},e.getRequestBody=function(t){return wt.__awaiter(this,void 0,void 0,function(){var r,n,o,a,s,u,p,d;return wt.__generator(this,function(g){switch(g.label){case 0:r=!1,g.label=1;case 1:return g.trys.push([1,3,,4]),o=t.clone(),[4,o.json()];case 2:return n=g.sent(),r=!0,[3,4];case 3:return a=g.sent(),[3,4];case 4:if(r)return[3,12];g.label=5;case 5:return g.trys.push([5,11,,12]),typeof Blob<"u"?[4,t.blob()]:[3,8];case 6:return s=g.sent(),u=new FileReader,[4,new Promise(function(x){u.addEventListener("load",function(){var v=u.result,l=new RegExp("^s*data:(.+?/.+?(;.+?=.+?)*)?(;base64)?,(.*)s*$"),f=l.exec(v);x(f[4])},!1),u.readAsDataURL(s)})];case 7:return n=g.sent(),[3,10];case 8:return typeof Buffer<"u"?[4,t.buffer()]:[3,10];case 9:p=g.sent(),n=p.toString("base64"),g.label=10;case 10:return r=!0,[3,12];case 11:return d=g.sent(),[3,12];case 12:return[2,n]}})})},e.prototype.addRequest=function(t){var r=e.requestLimit;if(t.id===""){var n=new Error("Id for a request is empty, Please provide an unique id");throw n.name="Empty Id For Request",n}if(this.requests.size===r){var n=new Error("Maximum requests limit exceeded, Max allowed number of requests are ".concat(r));throw n.name="Limit Exceeded Error",n}if(this.requests.has(t.id)){var n=new Error("Adding request with duplicate id ".concat(t.id,", Make the id of the requests unique"));throw n.name="Duplicate RequestId Error",n}return this.requests.set(t.id,t),t.id},e.prototype.removeRequest=function(t){for(var r=this.requests.delete(t),n=this.requests.entries(),o=n.next();!o.done;){var a=o.value[1].dependsOn;if(typeof a<"u"){var s=a.indexOf(t);s!==-1&&a.splice(s,1),a.length===0&&delete o.value[1].dependsOn}o=n.next()}return r},e.prototype.getContent=function(){return wt.__awaiter(this,void 0,void 0,function(){var t,r,n,o,u,u,a,s,u;return wt.__generator(this,function(p){switch(p.label){case 0:if(t=[],r={requests:t},n=this.requests.entries(),o=n.next(),o.done)throw u=new Error("No requests added yet, Please add at least one request."),u.name="Empty Payload",u;if(!e.validateDependencies(this.requests))throw u=new Error(`Invalid dependency found, Dependency should be:
1
+ "use strict";var ad=Object.create;var qt=Object.defineProperty;var sd=Object.getOwnPropertyDescriptor;var ud=Object.getOwnPropertyNames;var cd=Object.getPrototypeOf,ld=Object.prototype.hasOwnProperty;var i=(e,t)=>qt(e,"name",{value:t,configurable:!0});var pd=(e,t,r)=>()=>{if(r)throw r[0];try{return e&&(t=e(e=0)),t}catch(n){throw r=[n],n}};var b=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},po=(e,t)=>{for(var r in t)qt(e,r,{get:t[r],enumerable:!0})},Zi=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ud(t))!ld.call(e,o)&&o!==r&&qt(e,o,{get:()=>t[o],enumerable:!(n=sd(t,o))||n.enumerable});return e};var Ne=(e,t,r)=>(r=e!=null?ad(cd(e)):{},Zi(t||!e||!e.__esModule?qt(r,"default",{value:e,enumerable:!0}):r,e)),ie=e=>Zi(qt({},"__esModule",{value:!0}),e);var ms=b((fs,qr)=>{(function(e){"use strict";let t="(0?\\d+|0x[a-f0-9]+)",r={fourOctet:new RegExp(`^${t}\\.${t}\\.${t}\\.${t}$`,"i"),threeOctet:new RegExp(`^${t}\\.${t}\\.${t}$`,"i"),twoOctet:new RegExp(`^${t}\\.${t}$`,"i"),longValue:new RegExp(`^${t}$`,"i")},n=new RegExp("^0[0-7]+$","i"),o=new RegExp("^0x[a-f0-9]+$","i"),a="%[0-9a-z]{1,}",s="(?:[0-9a-f]+::?)+",u={zoneIndex:new RegExp(a,"i"),native:new RegExp(`^(::)?(${s})?([0-9a-f]+)?(::)?(${a})?$`,"i"),deprecatedTransitional:new RegExp(`^(?:::)(${t}\\.${t}\\.${t}\\.${t}(${a})?)$`,"i"),transitional:new RegExp(`^((?:${s})|(?:::)(?:${s})?)${t}\\.${t}\\.${t}\\.${t}(${a})?$`,"i")};function p(l,f){if(l.indexOf("::")!==l.lastIndexOf("::"))return null;let y=0,h=-1,_=(l.match(u.zoneIndex)||[])[0],T,H;for(_&&(_=_.substring(1),l=l.replace(/%.+$/,""));(h=l.indexOf(":",h+1))>=0;)y++;if(l.substr(0,2)==="::"&&y--,l.substr(-2,2)==="::"&&y--,y>f)return null;for(H=f-y,T=":";H--;)T+="0:";return l=l.replace("::",T),l[0]===":"&&(l=l.slice(1)),l[l.length-1]===":"&&(l=l.slice(0,-1)),f=(function(){let fe=l.split(":"),xe=[];for(let Ce=0;Ce<fe.length;Ce++)xe.push(parseInt(fe[Ce],16));return xe})(),{parts:f,zoneId:_}}i(p,"expandIPv6");function d(l,f,y,h){if(l.length!==f.length)throw new Error("ipaddr: cannot match CIDR for objects with different lengths");let _=0,T;for(;h>0;){if(T=y-h,T<0&&(T=0),l[_]>>T!==f[_]>>T)return!1;h-=y,_+=1}return!0}i(d,"matchCIDR");function g(l){if(o.test(l))return parseInt(l,16);if(l[0]==="0"&&!isNaN(parseInt(l[1],10))){if(n.test(l))return parseInt(l,8);throw new Error(`ipaddr: cannot parse ${l} as octal`)}return parseInt(l,10)}i(g,"parseIntAuto");function x(l,f){for(;l.length<f;)l=`0${l}`;return l}i(x,"padPart");let v={};v.IPv4=(function(){function l(f){if(f.length!==4)throw new Error("ipaddr: ipv4 octet count should be 4");let y,h;for(y=0;y<f.length;y++)if(h=f[y],!(0<=h&&h<=255))throw new Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=f}return i(l,"IPv4"),l.prototype.SpecialRanges={unspecified:[[new l([0,0,0,0]),8]],broadcast:[[new l([255,255,255,255]),32]],multicast:[[new l([224,0,0,0]),4]],linkLocal:[[new l([169,254,0,0]),16]],loopback:[[new l([127,0,0,0]),8]],carrierGradeNat:[[new l([100,64,0,0]),10]],private:[[new l([10,0,0,0]),8],[new l([172,16,0,0]),12],[new l([192,168,0,0]),16]],reserved:[[new l([192,0,0,0]),24],[new l([192,0,2,0]),24],[new l([192,88,99,0]),24],[new l([198,18,0,0]),15],[new l([198,51,100,0]),24],[new l([203,0,113,0]),24],[new l([240,0,0,0]),4]],as112:[[new l([192,175,48,0]),24],[new l([192,31,196,0]),24]],amt:[[new l([192,52,193,0]),24]]},l.prototype.kind=function(){return"ipv4"},l.prototype.match=function(f,y){let h;if(y===void 0&&(h=f,f=h[0],y=h[1]),f.kind()!=="ipv4")throw new Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return d(this.octets,f.octets,8,y)},l.prototype.prefixLengthFromSubnetMask=function(){let f=0,y=!1,h={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0},_,T,H;for(_=3;_>=0;_-=1)if(T=this.octets[_],T in h){if(H=h[T],y&&H!==0)return null;H!==8&&(y=!0),f+=H}else return null;return 32-f},l.prototype.range=function(){return v.subnetMatch(this,this.SpecialRanges)},l.prototype.toByteArray=function(){return this.octets.slice(0)},l.prototype.toIPv4MappedAddress=function(){return v.IPv6.parse(`::ffff:${this.toString()}`)},l.prototype.toNormalizedString=function(){return this.toString()},l.prototype.toString=function(){return this.octets.join(".")},l})(),v.IPv4.broadcastAddressFromCIDR=function(l){try{let f=this.parseCIDR(l),y=f[0].toByteArray(),h=this.subnetMaskFromPrefixLength(f[1]).toByteArray(),_=[],T=0;for(;T<4;)_.push(parseInt(y[T],10)|parseInt(h[T],10)^255),T++;return new this(_)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},v.IPv4.isIPv4=function(l){return this.parser(l)!==null},v.IPv4.isValid=function(l){try{return new this(this.parser(l)),!0}catch{return!1}},v.IPv4.isValidCIDR=function(l){try{return this.parseCIDR(l),!0}catch{return!1}},v.IPv4.isValidFourPartDecimal=function(l){return!!(v.IPv4.isValid(l)&&l.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},v.IPv4.isValidCIDRFourPartDecimal=function(l){let f=l.match(/^(.+)\/(\d+)$/);return!v.IPv4.isValidCIDR(l)||!f?!1:v.IPv4.isValidFourPartDecimal(f[1])},v.IPv4.networkAddressFromCIDR=function(l){let f,y,h,_,T;try{for(f=this.parseCIDR(l),h=f[0].toByteArray(),T=this.subnetMaskFromPrefixLength(f[1]).toByteArray(),_=[],y=0;y<4;)_.push(parseInt(h[y],10)&parseInt(T[y],10)),y++;return new this(_)}catch{throw new Error("ipaddr: the address does not have IPv4 CIDR format")}},v.IPv4.parse=function(l){let f=this.parser(l);if(f===null)throw new Error("ipaddr: string is not formatted like an IPv4 Address");return new this(f)},v.IPv4.parseCIDR=function(l){let f;if(f=l.match(/^(.+)\/(\d+)$/)){let y=parseInt(f[2]);if(y>=0&&y<=32){let h=[this.parse(f[1]),y];return Object.defineProperty(h,"toString",{value:i(function(){return this.join("/")},"value")}),h}}throw new Error("ipaddr: string is not formatted like an IPv4 CIDR range")},v.IPv4.parser=function(l){let f,y,h;if(f=l.match(r.fourOctet))return(function(){let _=f.slice(1,6),T=[];for(let H=0;H<_.length;H++)y=_[H],T.push(g(y));return T})();if(f=l.match(r.longValue)){if(h=g(f[1]),h>4294967295||h<0)throw new Error("ipaddr: address outside defined range");return(function(){let _=[],T;for(T=0;T<=24;T+=8)_.push(h>>T&255);return _})().reverse()}else return(f=l.match(r.twoOctet))?(function(){let _=f.slice(1,4),T=[];if(h=g(_[1]),h>16777215||h<0)throw new Error("ipaddr: address outside defined range");return T.push(g(_[0])),T.push(h>>16&255),T.push(h>>8&255),T.push(h&255),T})():(f=l.match(r.threeOctet))?(function(){let _=f.slice(1,5),T=[];if(h=g(_[2]),h>65535||h<0)throw new Error("ipaddr: address outside defined range");return T.push(g(_[0])),T.push(g(_[1])),T.push(h>>8&255),T.push(h&255),T})():null},v.IPv4.subnetMaskFromPrefixLength=function(l){if(l=parseInt(l),l<0||l>32)throw new Error("ipaddr: invalid IPv4 prefix length");let f=[0,0,0,0],y=0,h=Math.floor(l/8);for(;y<h;)f[y]=255,y++;return h<4&&(f[h]=Math.pow(2,l%8)-1<<8-l%8),new this(f)},v.IPv6=(function(){function l(f,y){let h,_;if(f.length===16)for(this.parts=[],h=0;h<=14;h+=2)this.parts.push(f[h]<<8|f[h+1]);else if(f.length===8)this.parts=f;else throw new Error("ipaddr: ipv6 part count should be 8 or 16");for(h=0;h<this.parts.length;h++)if(_=this.parts[h],!(0<=_&&_<=65535))throw new Error("ipaddr: ipv6 part should fit in 16 bits");y&&(this.zoneId=y)}return i(l,"IPv6"),l.prototype.SpecialRanges={unspecified:[new l([0,0,0,0,0,0,0,0]),128],linkLocal:[new l([65152,0,0,0,0,0,0,0]),10],multicast:[new l([65280,0,0,0,0,0,0,0]),8],loopback:[new l([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new l([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new l([0,0,0,0,0,65535,0,0]),96],discard:[new l([256,0,0,0,0,0,0,0]),64],rfc6145:[new l([0,0,0,0,65535,0,0,0]),96],rfc6052:[new l([100,65435,0,0,0,0,0,0]),96],"6to4":[new l([8194,0,0,0,0,0,0,0]),16],teredo:[new l([8193,0,0,0,0,0,0,0]),32],benchmarking:[new l([8193,2,0,0,0,0,0,0]),48],amt:[new l([8193,3,0,0,0,0,0,0]),32],as112v6:[[new l([8193,4,274,0,0,0,0,0]),48],[new l([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new l([8193,16,0,0,0,0,0,0]),28],orchid2:[new l([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new l([8193,48,0,0,0,0,0,0]),28],reserved:[[new l([8193,0,0,0,0,0,0,0]),23],[new l([8193,3512,0,0,0,0,0,0]),32]]},l.prototype.isIPv4MappedAddress=function(){return this.range()==="ipv4Mapped"},l.prototype.kind=function(){return"ipv6"},l.prototype.match=function(f,y){let h;if(y===void 0&&(h=f,f=h[0],y=h[1]),f.kind()!=="ipv6")throw new Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return d(this.parts,f.parts,16,y)},l.prototype.prefixLengthFromSubnetMask=function(){let f=0,y=!1,h={0:16,32768:15,49152:14,57344:13,61440:12,63488:11,64512:10,65024:9,65280:8,65408:7,65472:6,65504:5,65520:4,65528:3,65532:2,65534:1,65535:0},_,T;for(let H=7;H>=0;H-=1)if(_=this.parts[H],_ in h){if(T=h[_],y&&T!==0)return null;T!==16&&(y=!0),f+=T}else return null;return 128-f},l.prototype.range=function(){return v.subnetMatch(this,this.SpecialRanges)},l.prototype.toByteArray=function(){let f,y=[],h=this.parts;for(let _=0;_<h.length;_++)f=h[_],y.push(f>>8),y.push(f&255);return y},l.prototype.toFixedLengthString=function(){let f=(function(){let h=[];for(let _=0;_<this.parts.length;_++)h.push(x(this.parts[_].toString(16),4));return h}).call(this).join(":"),y="";return this.zoneId&&(y=`%${this.zoneId}`),f+y},l.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw new Error("ipaddr: trying to convert a generic ipv6 address to ipv4");let f=this.parts.slice(-2),y=f[0],h=f[1];return new v.IPv4([y>>8,y&255,h>>8,h&255])},l.prototype.toNormalizedString=function(){let f=(function(){let h=[];for(let _=0;_<this.parts.length;_++)h.push(this.parts[_].toString(16));return h}).call(this).join(":"),y="";return this.zoneId&&(y=`%${this.zoneId}`),f+y},l.prototype.toRFC5952String=function(){let f=/((^|:)(0(:|$)){2,})/g,y=this.toNormalizedString(),h=0,_=-1,T;for(;T=f.exec(y);)T[0].length>_&&(h=T.index,_=T[0].length);return _<0?y:`${y.substring(0,h)}::${y.substring(h+_)}`},l.prototype.toString=function(){return this.toRFC5952String()},l})(),v.IPv6.broadcastAddressFromCIDR=function(l){try{let f=this.parseCIDR(l),y=f[0].toByteArray(),h=this.subnetMaskFromPrefixLength(f[1]).toByteArray(),_=[],T=0;for(;T<16;)_.push(parseInt(y[T],10)|parseInt(h[T],10)^255),T++;return new this(_)}catch(f){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${f})`)}},v.IPv6.isIPv6=function(l){return this.parser(l)!==null},v.IPv6.isValid=function(l){if(typeof l=="string"&&l.indexOf(":")===-1)return!1;try{let f=this.parser(l);return new this(f.parts,f.zoneId),!0}catch{return!1}},v.IPv6.isValidCIDR=function(l){if(typeof l=="string"&&l.indexOf(":")===-1)return!1;try{return this.parseCIDR(l),!0}catch{return!1}},v.IPv6.networkAddressFromCIDR=function(l){let f,y,h,_,T;try{for(f=this.parseCIDR(l),h=f[0].toByteArray(),T=this.subnetMaskFromPrefixLength(f[1]).toByteArray(),_=[],y=0;y<16;)_.push(parseInt(h[y],10)&parseInt(T[y],10)),y++;return new this(_)}catch(H){throw new Error(`ipaddr: the address does not have IPv6 CIDR format (${H})`)}},v.IPv6.parse=function(l){let f=this.parser(l);if(f.parts===null)throw new Error("ipaddr: string is not formatted like an IPv6 Address");return new this(f.parts,f.zoneId)},v.IPv6.parseCIDR=function(l){let f,y,h;if((y=l.match(/^(.+)\/(\d+)$/))&&(f=parseInt(y[2]),f>=0&&f<=128))return h=[this.parse(y[1]),f],Object.defineProperty(h,"toString",{value:i(function(){return this.join("/")},"value")}),h;throw new Error("ipaddr: string is not formatted like an IPv6 CIDR range")},v.IPv6.parser=function(l){let f,y,h,_,T,H;if(h=l.match(u.deprecatedTransitional))return this.parser(`::ffff:${h[1]}`);if(u.native.test(l))return p(l,8);if((h=l.match(u.transitional))&&(H=h[6]||"",f=h[1],h[1].endsWith("::")||(f=f.slice(0,-1)),f=p(f+H,6),f.parts)){for(T=[parseInt(h[2]),parseInt(h[3]),parseInt(h[4]),parseInt(h[5])],y=0;y<T.length;y++)if(_=T[y],!(0<=_&&_<=255))return null;return f.parts.push(T[0]<<8|T[1]),f.parts.push(T[2]<<8|T[3]),{parts:f.parts,zoneId:f.zoneId}}return null},v.IPv6.subnetMaskFromPrefixLength=function(l){if(l=parseInt(l),l<0||l>128)throw new Error("ipaddr: invalid IPv6 prefix length");let f=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],y=0,h=Math.floor(l/8);for(;y<h;)f[y]=255,y++;return h<16&&(f[h]=Math.pow(2,l%8)-1<<8-l%8),new this(f)},v.fromByteArray=function(l){let f=l.length;if(f===4)return new v.IPv4(l);if(f===16)return new v.IPv6(l);throw new Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},v.isValid=function(l){return v.IPv6.isValid(l)||v.IPv4.isValid(l)},v.isValidCIDR=function(l){return v.IPv6.isValidCIDR(l)||v.IPv4.isValidCIDR(l)},v.parse=function(l){if(v.IPv6.isValid(l))return v.IPv6.parse(l);if(v.IPv4.isValid(l))return v.IPv4.parse(l);throw new Error("ipaddr: the address has neither IPv6 nor IPv4 format")},v.parseCIDR=function(l){try{return v.IPv6.parseCIDR(l)}catch{try{return v.IPv4.parseCIDR(l)}catch{throw new Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},v.process=function(l){let f=this.parse(l);return f.kind()==="ipv6"&&f.isIPv4MappedAddress()?f.toIPv4Address():f},v.subnetMatch=function(l,f,y){let h,_,T,H;y==null&&(y="unicast");for(_ in f)if(Object.prototype.hasOwnProperty.call(f,_)){for(T=f[_],T[0]&&!(T[0]instanceof Array)&&(T=[T]),h=0;h<T.length;h++)if(H=T[h],l.kind()===H[0].kind()&&l.match.apply(l,H))return _}return y},typeof qr<"u"&&qr.exports?qr.exports=v:e.ipaddr=v})(fs)});var se={};po(se,{__addDisposableResource:()=>Uu,__assign:()=>Wr,__asyncDelegator:()=>wu,__asyncGenerator:()=>$u,__asyncValues:()=>Ou,__await:()=>wt,__awaiter:()=>bu,__classPrivateFieldGet:()=>Du,__classPrivateFieldIn:()=>Nu,__classPrivateFieldSet:()=>Cu,__createBinding:()=>Jr,__decorate:()=>gu,__disposeResources:()=>Mu,__esDecorate:()=>yu,__exportStar:()=>Eu,__extends:()=>fu,__generator:()=>Tu,__importDefault:()=>ku,__importStar:()=>Ru,__makeTemplateObject:()=>zu,__metadata:()=>xu,__param:()=>hu,__propKey:()=>_u,__read:()=>Yo,__rest:()=>mu,__rewriteRelativeImportExtension:()=>Lu,__runInitializers:()=>vu,__setFunctionName:()=>Pu,__spread:()=>Iu,__spreadArray:()=>Su,__spreadArrays:()=>Au,__values:()=>Kr,default:()=>Hm});function fu(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Jo(e,t);function r(){this.constructor=e}i(r,"__"),e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function mu(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function gu(e,t,r,n){var o=arguments.length,a=o<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,n);else for(var u=e.length-1;u>=0;u--)(s=e[u])&&(a=(o<3?s(a):o>3?s(t,r,a):s(t,r))||a);return o>3&&a&&Object.defineProperty(t,r,a),a}function hu(e,t){return function(r,n){t(r,n,e)}}function yu(e,t,r,n,o,a){function s(_){if(_!==void 0&&typeof _!="function")throw new TypeError("Function expected");return _}i(s,"accept");for(var u=n.kind,p=u==="getter"?"get":u==="setter"?"set":"value",d=!t&&e?n.static?e:e.prototype:null,g=t||(d?Object.getOwnPropertyDescriptor(d,n.name):{}),x,v=!1,l=r.length-1;l>=0;l--){var f={};for(var y in n)f[y]=y==="access"?{}:n[y];for(var y in n.access)f.access[y]=n.access[y];f.addInitializer=function(_){if(v)throw new TypeError("Cannot add initializers after decoration has completed");a.push(s(_||null))};var h=(0,r[l])(u==="accessor"?{get:g.get,set:g.set}:g[p],f);if(u==="accessor"){if(h===void 0)continue;if(h===null||typeof h!="object")throw new TypeError("Object expected");(x=s(h.get))&&(g.get=x),(x=s(h.set))&&(g.set=x),(x=s(h.init))&&o.unshift(x)}else(x=s(h))&&(u==="field"?o.unshift(x):g[p]=x)}d&&Object.defineProperty(d,n.name,g),v=!0}function vu(e,t,r){for(var n=arguments.length>2,o=0;o<t.length;o++)r=n?t[o].call(e,r):t[o].call(e);return n?r:void 0}function _u(e){return typeof e=="symbol"?e:"".concat(e)}function Pu(e,t,r){return typeof t=="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function xu(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function bu(e,t,r,n){function o(a){return a instanceof r?a:new r(function(s){s(a)})}return i(o,"adopt"),new(r||(r=Promise))(function(a,s){function u(g){try{d(n.next(g))}catch(x){s(x)}}i(u,"fulfilled");function p(g){try{d(n.throw(g))}catch(x){s(x)}}i(p,"rejected");function d(g){g.done?a(g.value):o(g.value).then(u,p)}i(d,"step"),d((n=n.apply(e,t||[])).next())})}function Tu(e,t){var r={label:0,sent:i(function(){if(a[0]&1)throw a[1];return a[1]},"sent"),trys:[],ops:[]},n,o,a,s=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return s.next=u(0),s.throw=u(1),s.return=u(2),typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function u(d){return function(g){return p([d,g])}}function p(d){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,d[0]&&(r=0)),r;)try{if(n=1,o&&(a=d[0]&2?o.return:d[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,d[1])).done)return a;switch(o=0,a&&(d=[d[0]&2,a.value]),d[0]){case 0:case 1:a=d;break;case 4:return r.label++,{value:d[1],done:!1};case 5:r.label++,o=d[1],d=[0];continue;case 7:d=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(d[0]===6||d[0]===2)){r=0;continue}if(d[0]===3&&(!a||d[1]>a[0]&&d[1]<a[3])){r.label=d[1];break}if(d[0]===6&&r.label<a[1]){r.label=a[1],a=d;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(d);break}a[2]&&r.ops.pop(),r.trys.pop();continue}d=t.call(e,r)}catch(g){d=[6,g],o=0}finally{n=a=0}if(d[0]&5)throw d[1];return{value:d[0]?d[1]:void 0,done:!0}}}function Eu(e,t){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(t,r)&&Jr(t,e,r)}function Kr(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:i(function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}},"next")};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Yo(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),o,a=[],s;try{for(;(t===void 0||t-- >0)&&!(o=n.next()).done;)a.push(o.value)}catch(u){s={error:u}}finally{try{o&&!o.done&&(r=n.return)&&r.call(n)}finally{if(s)throw s.error}}return a}function Iu(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Yo(arguments[t]));return e}function Au(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),o=0,t=0;t<r;t++)for(var a=arguments[t],s=0,u=a.length;s<u;s++,o++)n[o]=a[s];return n}function Su(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}function wt(e){return this instanceof wt?(this.v=e,this):new wt(e)}function $u(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),o,a=[];return o=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),u("next"),u("throw"),u("return",s),o[Symbol.asyncIterator]=function(){return this},o;function s(l){return function(f){return Promise.resolve(f).then(l,x)}}function u(l,f){n[l]&&(o[l]=function(y){return new Promise(function(h,_){a.push([l,y,h,_])>1||p(l,y)})},f&&(o[l]=f(o[l])))}function p(l,f){try{d(n[l](f))}catch(y){v(a[0][3],y)}}function d(l){l.value instanceof wt?Promise.resolve(l.value.v).then(g,x):v(a[0][2],l)}function g(l){p("next",l)}function x(l){p("throw",l)}function v(l,f){l(f),a.shift(),a.length&&p(a[0][0],a[0][1])}}function wu(e){var t,r;return t={},n("next"),n("throw",function(o){throw o}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(o,a){t[o]=e[o]?function(s){return(r=!r)?{value:wt(e[o](s)),done:!1}:a?a(s):s}:a}}function Ou(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof Kr=="function"?Kr(e):e[Symbol.iterator](),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(a){r[a]=e[a]&&function(s){return new Promise(function(u,p){s=e[a](s),o(u,p,s.done,s.value)})}}function o(a,s,u,p){Promise.resolve(p).then(function(d){a({value:d,done:u})},s)}}function zu(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function Ru(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r=Xo(e),n=0;n<r.length;n++)r[n]!=="default"&&Jr(t,e,r[n]);return Fm(t,e),t}function ku(e){return e&&e.__esModule?e:{default:e}}function Du(e,t,r,n){if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?n:r==="a"?n.call(e):n?n.value:t.get(e)}function Cu(e,t,r,n,o){if(n==="m")throw new TypeError("Private method is not writable");if(n==="a"&&!o)throw new TypeError("Private accessor was defined without a setter");if(typeof t=="function"?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return n==="a"?o.call(e,r):o?o.value=r:t.set(e,r),r}function Nu(e,t){if(t===null||typeof t!="object"&&typeof t!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof e=="function"?t===e:e.has(t)}function Uu(e,t,r){if(t!=null){if(typeof t!="object"&&typeof t!="function")throw new TypeError("Object expected.");var n,o;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(n===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(o=n)}if(typeof n!="function")throw new TypeError("Object not disposable.");o&&(n=i(function(){try{o.call(this)}catch(a){return Promise.reject(a)}},"dispose")),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}function Mu(e){function t(a){e.error=e.hasError?new Bm(a,e.error,"An error was suppressed during disposal."):a,e.hasError=!0}i(t,"fail");var r,n=0;function o(){for(;r=e.stack.pop();)try{if(!r.async&&n===1)return n=0,e.stack.push(r),Promise.resolve().then(o);if(r.dispose){var a=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(a).then(o,function(s){return t(s),o()})}else n|=1}catch(s){t(s)}if(n===1)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}return i(o,"next"),o()}function Lu(e,t){return typeof e=="string"&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(r,n,o,a,s){return n?t?".jsx":".js":o&&(!a||!s)?r:o+a+"."+s.toLowerCase()+"js"}):e}var Jo,Wr,Jr,Fm,Xo,Bm,Hm,ue=pd(()=>{Jo=i(function(e,t){return Jo=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])},Jo(e,t)},"extendStatics");i(fu,"__extends");Wr=i(function(){return Wr=Object.assign||i(function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},"__assign"),Wr.apply(this,arguments)},"__assign");i(mu,"__rest");i(gu,"__decorate");i(hu,"__param");i(yu,"__esDecorate");i(vu,"__runInitializers");i(_u,"__propKey");i(Pu,"__setFunctionName");i(xu,"__metadata");i(bu,"__awaiter");i(Tu,"__generator");Jr=Object.create?(function(e,t,r,n){n===void 0&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);(!o||("get"in o?!t.__esModule:o.writable||o.configurable))&&(o={enumerable:!0,get:i(function(){return t[r]},"get")}),Object.defineProperty(e,n,o)}):(function(e,t,r,n){n===void 0&&(n=r),e[n]=t[r]});i(Eu,"__exportStar");i(Kr,"__values");i(Yo,"__read");i(Iu,"__spread");i(Au,"__spreadArrays");i(Su,"__spreadArray");i(wt,"__await");i($u,"__asyncGenerator");i(wu,"__asyncDelegator");i(Ou,"__asyncValues");i(zu,"__makeTemplateObject");Fm=Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t},Xo=i(function(e){return Xo=Object.getOwnPropertyNames||function(t){var r=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[r.length]=n);return r},Xo(e)},"ownKeys");i(Ru,"__importStar");i(ku,"__importDefault");i(Du,"__classPrivateFieldGet");i(Cu,"__classPrivateFieldSet");i(Nu,"__classPrivateFieldIn");i(Uu,"__addDisposableResource");Bm=typeof SuppressedError=="function"?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};i(Mu,"__disposeResources");i(Lu,"__rewriteRelativeImportExtension");Hm={__extends:fu,__assign:Wr,__rest:mu,__decorate:gu,__param:hu,__esDecorate:yu,__runInitializers:vu,__propKey:_u,__setFunctionName:Pu,__metadata:xu,__awaiter:bu,__generator:Tu,__createBinding:Jr,__exportStar:Eu,__values:Kr,__read:Yo,__spread:Iu,__spreadArrays:Au,__spreadArray:Su,__await:wt,__asyncGenerator:$u,__asyncDelegator:wu,__asyncValues:Ou,__makeTemplateObject:zu,__importStar:Ru,__importDefault:ku,__classPrivateFieldGet:Du,__classPrivateFieldSet:Cu,__classPrivateFieldIn:Nu,__addDisposableResource:Uu,__disposeResources:Mu,__rewriteRelativeImportExtension:Lu}});var gr=b(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.RequestMethod=void 0;var ju;(function(e){e.GET="GET",e.PATCH="PATCH",e.POST="POST",e.PUT="PUT",e.DELETE="DELETE"})(ju||(Xr.RequestMethod=ju={}))});var Fu=b(Yr=>{"use strict";Object.defineProperty(Yr,"__esModule",{value:!0});Yr.BatchRequestContent=void 0;var Ot=(ue(),ie(se)),Qo=gr(),Vm=(function(){function e(t){if(this.requests=new Map,typeof t<"u"){var r=e.requestLimit;if(t.length>r){var n=new Error("Maximum requests limit exceeded, Max allowed number of requests are ".concat(r));throw n.name="Limit Exceeded Error",n}for(var o=0,a=t;o<a.length;o++){var s=a[o];this.addRequest(s)}}}return i(e,"BatchRequestContent"),e.validateDependencies=function(t){var r=i(function(s){for(var u=s.entries(),p=u.next();!p.done;){var d=p.value[1];if(d.dependsOn!==void 0&&d.dependsOn.length>0)return!1;p=u.next()}return!0},"isParallel"),n=i(function(s){var u=s.entries(),p=u.next(),d=p.value[1];if(d.dependsOn!==void 0&&d.dependsOn.length>0)return!1;var g=p;for(p=u.next();!p.done;){var x=p.value[1];if(x.dependsOn===void 0||x.dependsOn.length!==1||x.dependsOn[0]!==g.value[1].id)return!1;g=p,p=u.next()}return!0},"isSerial"),o=i(function(s){var u=s.entries(),p=u.next(),d=p.value[1],g;if(d.dependsOn===void 0||d.dependsOn.length===0)g=d.id;else if(d.dependsOn.length===1){var x=d.dependsOn[0];if(x!==d.id&&s.has(x))g=x;else return!1}else return!1;for(p=u.next();!p.done;){var v=p.value[1];if((v.dependsOn===void 0||v.dependsOn.length===0)&&g!==v.id||v.dependsOn!==void 0&&v.dependsOn.length!==0&&(v.dependsOn.length===1&&(v.id===g||v.dependsOn[0]!==g)||v.dependsOn.length>1))return!1;p=u.next()}return!0},"isSame");if(t.size===0){var a=new Error("Empty requests map, Please provide at least one request.");throw a.name="Empty Requests Error",a}return r(t)||n(t)||o(t)},e.getRequestData=function(t){return Ot.__awaiter(this,void 0,void 0,function(){var r,n,o,a;return Ot.__generator(this,function(s){switch(s.label){case 0:return r={url:""},n=new RegExp("^https?://"),r.url=n.test(t.url)?"/"+t.url.split(/.*?\/\/.*?\//)[1]:t.url,r.method=t.method,o={},t.headers.forEach(function(u,p){o[p]=u}),Object.keys(o).length&&(r.headers=o),t.method===Qo.RequestMethod.PATCH||t.method===Qo.RequestMethod.POST||t.method===Qo.RequestMethod.PUT?(a=r,[4,e.getRequestBody(t)]):[3,2];case 1:a.body=s.sent(),s.label=2;case 2:return[2,r]}})})},e.getRequestBody=function(t){return Ot.__awaiter(this,void 0,void 0,function(){var r,n,o,a,s,u,p,d;return Ot.__generator(this,function(g){switch(g.label){case 0:r=!1,g.label=1;case 1:return g.trys.push([1,3,,4]),o=t.clone(),[4,o.json()];case 2:return n=g.sent(),r=!0,[3,4];case 3:return a=g.sent(),[3,4];case 4:if(r)return[3,12];g.label=5;case 5:return g.trys.push([5,11,,12]),typeof Blob<"u"?[4,t.blob()]:[3,8];case 6:return s=g.sent(),u=new FileReader,[4,new Promise(function(x){u.addEventListener("load",function(){var v=u.result,l=new RegExp("^s*data:(.+?/.+?(;.+?=.+?)*)?(;base64)?,(.*)s*$"),f=l.exec(v);x(f[4])},!1),u.readAsDataURL(s)})];case 7:return n=g.sent(),[3,10];case 8:return typeof Buffer<"u"?[4,t.buffer()]:[3,10];case 9:p=g.sent(),n=p.toString("base64"),g.label=10;case 10:return r=!0,[3,12];case 11:return d=g.sent(),[3,12];case 12:return[2,n]}})})},e.prototype.addRequest=function(t){var r=e.requestLimit;if(t.id===""){var n=new Error("Id for a request is empty, Please provide an unique id");throw n.name="Empty Id For Request",n}if(this.requests.size===r){var n=new Error("Maximum requests limit exceeded, Max allowed number of requests are ".concat(r));throw n.name="Limit Exceeded Error",n}if(this.requests.has(t.id)){var n=new Error("Adding request with duplicate id ".concat(t.id,", Make the id of the requests unique"));throw n.name="Duplicate RequestId Error",n}return this.requests.set(t.id,t),t.id},e.prototype.removeRequest=function(t){for(var r=this.requests.delete(t),n=this.requests.entries(),o=n.next();!o.done;){var a=o.value[1].dependsOn;if(typeof a<"u"){var s=a.indexOf(t);s!==-1&&a.splice(s,1),a.length===0&&delete o.value[1].dependsOn}o=n.next()}return r},e.prototype.getContent=function(){return Ot.__awaiter(this,void 0,void 0,function(){var t,r,n,o,u,u,a,s,u;return Ot.__generator(this,function(p){switch(p.label){case 0:if(t=[],r={requests:t},n=this.requests.entries(),o=n.next(),o.done)throw u=new Error("No requests added yet, Please add at least one request."),u.name="Empty Payload",u;if(!e.validateDependencies(this.requests))throw u=new Error(`Invalid dependency found, Dependency should be:
2
2
  1. Parallel - no individual request states a dependency in the dependsOn property.
3
3
  2. Serial - all individual requests depend on the previous individual request.
4
- 3. Same - all individual requests that state a dependency in the dependsOn property, state the same dependency.`),u.name="Invalid Dependency",u;p.label=1;case 1:return o.done?[3,3]:(a=o.value[1],[4,e.getRequestData(a.request)]);case 2:if(s=p.sent(),s.body!==void 0&&(s.headers===void 0||s.headers["content-type"]===void 0))throw u=new Error("Content-type header is not mentioned for request #".concat(a.id,", For request having body, Content-type header should be mentioned")),u.name="Invalid Content-type header",u;return s.id=a.id,a.dependsOn!==void 0&&a.dependsOn.length>0&&(s.dependsOn=a.dependsOn),t.push(s),o=n.next(),[3,1];case 3:return r.requests=t,[2,r]}})})},e.prototype.addDependency=function(t,r){if(!this.requests.has(t)){var n=new Error("Dependent ".concat(t," does not exists, Please check the id"));throw n.name="Invalid Dependent",n}if(typeof r<"u"&&!this.requests.has(r)){var n=new Error("Dependency ".concat(r," does not exists, Please check the id"));throw n.name="Invalid Dependency",n}if(typeof r<"u"){var o=this.requests.get(t);if(o.dependsOn===void 0&&(o.dependsOn=[]),o.dependsOn.indexOf(r)!==-1){var n=new Error("Dependency ".concat(r," is already added for the request ").concat(t));throw n.name="Duplicate Dependency",n}o.dependsOn.push(r)}else{for(var a=this.requests.entries(),s=void 0,u=a.next();!u.done&&u.value[1].id!==t;)s=u,u=a.next();if(typeof s<"u"){var p=s.value[0];if(u.value[1].dependsOn===void 0&&(u.value[1].dependsOn=[]),u.value[1].dependsOn.indexOf(p)!==-1){var n=new Error("Dependency ".concat(p," is already added for the request ").concat(t));throw n.name="Duplicate Dependency",n}u.value[1].dependsOn.push(p)}else{var n=new Error("Can't add dependency ".concat(r,", There is only a dependent request in the batch"));throw n.name="Invalid Dependency Addition",n}}},e.prototype.removeDependency=function(t,r){var n=this.requests.get(t);if(typeof n>"u"||n.dependsOn===void 0||n.dependsOn.length===0)return!1;if(typeof r<"u"){var o=n.dependsOn.indexOf(r);return o===-1?!1:(n.dependsOn.splice(o,1),!0)}else return delete n.dependsOn,!0},e.requestLimit=20,e}();Wr.BatchRequestContent=Em});var Ou=b(Kr=>{"use strict";Object.defineProperty(Kr,"__esModule",{value:!0});Kr.BatchResponseContent=void 0;var Im=(se(),oe(ae)),Sm=function(){function e(t){this.responses=new Map,this.update(t)}return i(e,"BatchResponseContent"),e.prototype.createResponseObject=function(t){var r=t.body,n={};if(n.status=t.status,t.statusText!==void 0&&(n.statusText=t.statusText),n.headers=t.headers,n.headers!==void 0&&n.headers["Content-Type"]!==void 0&&n.headers["Content-Type"].split(";")[0]==="application/json"){var o=JSON.stringify(r);return new Response(o,n)}return new Response(r,n)},e.prototype.update=function(t){this.nextLink=t["@odata.nextLink"];for(var r=t.responses,n=0,o=r.length;n<o;n++)this.responses.set(r[n].id,this.createResponseObject(r[n]))},e.prototype.getResponseById=function(t){return this.responses.get(t)},e.prototype.getResponses=function(){return this.responses},e.prototype.getResponsesIterator=function(){var t,r;return Im.__generator(this,function(n){switch(n.label){case 0:t=this.responses.entries(),r=t.next(),n.label=1;case 1:return r.done?[3,3]:[4,r.value];case 2:return n.sent(),r=t.next(),[3,1];case 3:return[2]}})},e}();Kr.BatchResponseContent=Sm});var Xo=b(tt=>{"use strict";Object.defineProperty(tt,"__esModule",{value:!0});tt.GRAPH_URLS=tt.GRAPH_BASE_URL=tt.GRAPH_API_VERSION=void 0;tt.GRAPH_API_VERSION="v1.0";tt.GRAPH_BASE_URL="https://graph.microsoft.com/";tt.GRAPH_URLS=new Set(["graph.microsoft.com","graph.microsoft.us","dod-graph.microsoft.us","graph.microsoft.de","microsoftgraph.chinacloudapi.cn","canary.graph.microsoft.com"])});var qe=b(Jr=>{"use strict";Object.defineProperty(Jr,"__esModule",{value:!0});Jr.GraphClientError=void 0;var Am=(se(),oe(ae)),$m=function(e){Am.__extends(t,e);function t(r){var n=e.call(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return i(t,"GraphClientError"),t.setGraphClientError=function(r){var n;return r instanceof Error?n=r:(n=new t,n.customError=r),n},t}(Error);Jr.GraphClientError=$m});var Xr=b(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.isCustomHost=ze.isGraphURL=ze.serializeContent=ze.urlJoin=ze.oDataQueryNames=void 0;var wm=Xo(),Om=qe();ze.oDataQueryNames=["$select","$expand","$orderby","$filter","$top","$skip","$skipToken","$count"];var zm=i(function(e){var t=i(function(a){return a.replace(/\/+$/,"")},"removePostSlash"),r=i(function(a){return a.replace(/^\/+/,"")},"removePreSlash"),n=i(function(a,s){return[t(a),r(s)].join("/")},"joiner"),o=Array.prototype.slice.call(e);return o.reduce(n)},"urlJoin");ze.urlJoin=zm;var Rm=i(function(e){var t=e&&e.constructor&&e.constructor.name;if(t==="Buffer"||t==="Blob"||t==="File"||t==="FormData"||typeof e=="string")return e;if(t==="ArrayBuffer")e=Buffer.from(e);else if(t==="Int8Array"||t==="Int16Array"||t==="Int32Array"||t==="Uint8Array"||t==="Uint16Array"||t==="Uint32Array"||t==="Uint8ClampedArray"||t==="Float32Array"||t==="Float64Array"||t==="DataView")e=Buffer.from(e.buffer);else try{e=JSON.stringify(e)}catch{throw new Error("Unable to stringify the content")}return e},"serializeContent");ze.serializeContent=Rm;var km=i(function(e){return zu(e)},"isGraphURL");ze.isGraphURL=km;var Dm=i(function(e,t){return t.forEach(function(r){return Cm(r)}),zu(e,t)},"isCustomHost");ze.isCustomHost=Dm;var zu=i(function(e,t){if(t===void 0&&(t=wm.GRAPH_URLS),e=e.toLowerCase(),e.indexOf("https://")!==-1){e=e.replace("https://","");var r=e.indexOf(":"),n=e.indexOf("/"),o="";if(n!==-1)return r!==-1&&r<n?(o=e.substring(0,r),t.has(o)):(o=e.substring(0,n),t.has(o))}return!1},"isValidEndpoint"),Cm=i(function(e){if(e.indexOf("/")!==-1)throw new Om.GraphClientError("Please add only hosts or hostnames to the CustomHosts config. If the url is `http://example.com:3000/`, host is `example:3000`")},"isCustomHostValid")});var rt=b(Yr=>{"use strict";Object.defineProperty(Yr,"__esModule",{value:!0});Yr.MiddlewareControl=void 0;var Nm=function(){function e(t){t===void 0&&(t=[]),this.middlewareOptions=new Map;for(var r=0,n=t;r<n.length;r++){var o=n[r],a=o.constructor;this.middlewareOptions.set(a,o)}}return i(e,"MiddlewareControl"),e.prototype.getMiddlewareOptions=function(t){return this.middlewareOptions.get(t)},e.prototype.setMiddlewareOptions=function(t,r){this.middlewareOptions.set(t,r)},e}();Yr.MiddlewareControl=Nm});var Ot=b(Re=>{"use strict";Object.defineProperty(Re,"__esModule",{value:!0});Re.cloneRequestWithNewUrl=Re.appendRequestHeader=Re.setRequestHeader=Re.getRequestHeader=Re.generateUUID=void 0;var Ru=(se(),oe(ae)),Um=i(function(){for(var e="",t=0;t<32;t++)(t===8||t===12||t===16||t===20)&&(e+="-"),e+=Math.floor(Math.random()*16).toString(16);return e},"generateUUID");Re.generateUUID=Um;var Mm=i(function(e,t,r){var n=null;if(typeof Request<"u"&&e instanceof Request)n=e.headers.get(r);else if(typeof t<"u"&&t.headers!==void 0)if(typeof Headers<"u"&&t.headers instanceof Headers)n=t.headers.get(r);else if(t.headers instanceof Array){for(var o=t.headers,a=0,s=o.length;a<s;a++)if(o[a][0]===r){n=o[a][1];break}}else t.headers[r]!==void 0&&(n=t.headers[r]);return n},"getRequestHeader");Re.getRequestHeader=Mm;var Lm=i(function(e,t,r,n){var o,a;if(typeof Request<"u"&&e instanceof Request)e.headers.set(r,n);else if(typeof t<"u")if(t.headers===void 0)t.headers=new Headers((o={},o[r]=n,o));else if(typeof Headers<"u"&&t.headers instanceof Headers)t.headers.set(r,n);else if(t.headers instanceof Array){for(var s=0,u=t.headers.length;s<u;s++){var p=t.headers[s];if(p[0]===r){p[1]=n;break}}s===u&&t.headers.push([r,n])}else Object.assign(t.headers,(a={},a[r]=n,a))},"setRequestHeader");Re.setRequestHeader=Lm;var jm=i(function(e,t,r,n){var o,a;typeof Request<"u"&&e instanceof Request?e.headers.append(r,n):typeof t<"u"&&(t.headers===void 0?t.headers=new Headers((o={},o[r]=n,o)):typeof Headers<"u"&&t.headers instanceof Headers?t.headers.append(r,n):t.headers instanceof Array?t.headers.push([r,n]):t.headers===void 0?t.headers=(a={},a[r]=n,a):t.headers[r]===void 0?t.headers[r]=n:t.headers[r]+=", ".concat(n))},"appendRequestHeader");Re.appendRequestHeader=jm;var Fm=i(function(e,t){return Ru.__awaiter(void 0,void 0,void 0,function(){var r,n,o,a,s,u,p,d,g,x,v,l,f;return Ru.__generator(this,function(y){switch(y.label){case 0:return t.headers.get("Content-Type")?[4,t.blob()]:[3,2];case 1:return n=y.sent(),[3,4];case 2:return[4,Promise.resolve(void 0)];case 3:n=y.sent(),y.label=4;case 4:return r=n,o=t.method,a=t.headers,s=t.referrer,u=t.referrerPolicy,p=t.mode,d=t.credentials,g=t.cache,x=t.redirect,v=t.integrity,l=t.keepalive,f=t.signal,[2,new Request(e,{method:o,headers:a,body:r,referrer:s,referrerPolicy:u,mode:p,credentials:d,cache:g,redirect:x,integrity:v,keepalive:l,signal:f})]}})})},"cloneRequestWithNewUrl");Re.cloneRequestWithNewUrl=Fm});var Yo=b(Qr=>{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr.AuthenticationHandlerOptions=void 0;var Bm=function(){function e(t,r){this.authenticationProvider=t,this.authenticationProviderOptions=r}return i(e,"AuthenticationHandlerOptions"),e}();Qr.AuthenticationHandlerOptions=Bm});var Rt=b(zt=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});zt.TelemetryHandlerOptions=zt.FeatureUsageFlag=void 0;var ku=rt(),Qo;(function(e){e[e.NONE=0]="NONE",e[e.REDIRECT_HANDLER_ENABLED=1]="REDIRECT_HANDLER_ENABLED",e[e.RETRY_HANDLER_ENABLED=2]="RETRY_HANDLER_ENABLED",e[e.AUTHENTICATION_HANDLER_ENABLED=4]="AUTHENTICATION_HANDLER_ENABLED"})(Qo||(zt.FeatureUsageFlag=Qo={}));var Vm=function(){function e(){this.featureUsage=Qo.NONE}return i(e,"TelemetryHandlerOptions"),e.updateFeatureUsageFlag=function(t,r){var n;t.middlewareControl instanceof ku.MiddlewareControl?n=t.middlewareControl.getMiddlewareOptions(e):t.middlewareControl=new ku.MiddlewareControl,typeof n>"u"&&(n=new e,t.middlewareControl.setMiddlewareOptions(e,n)),n.setFeatureUsage(r)},e.prototype.setFeatureUsage=function(t){this.featureUsage=this.featureUsage|t},e.prototype.getFeatureUsage=function(){return this.featureUsage.toString(16)},e}();zt.TelemetryHandlerOptions=Vm});var tn=b(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.AuthenticationHandler=void 0;var Du=(se(),oe(ae)),Cu=Xr(),Hm=rt(),Zm=Ot(),qm=Yo(),Nu=Rt(),Gm=function(){function e(t){this.authenticationProvider=t}return i(e,"AuthenticationHandler"),e.prototype.execute=function(t){return Du.__awaiter(this,void 0,void 0,function(){var r,n,o,a,s,u;return Du.__generator(this,function(p){switch(p.label){case 0:return r=typeof t.request=="string"?t.request:t.request.url,(0,Cu.isGraphURL)(r)||t.customHosts&&(0,Cu.isCustomHost)(r,t.customHosts)?(n=void 0,t.middlewareControl instanceof Hm.MiddlewareControl&&(n=t.middlewareControl.getMiddlewareOptions(qm.AuthenticationHandlerOptions)),o=void 0,a=void 0,n&&(o=n.authenticationProvider,a=n.authenticationProviderOptions),o||(o=this.authenticationProvider),[4,o.getAccessToken(a)]):[3,2];case 1:return s=p.sent(),u="Bearer ".concat(s),(0,Zm.appendRequestHeader)(t.request,t.options,e.AUTHORIZATION_HEADER,u),Nu.TelemetryHandlerOptions.updateFeatureUsageFlag(t,Nu.FeatureUsageFlag.AUTHENTICATION_HANDLER_ENABLED),[3,3];case 2:t.options.headers&&delete t.options.headers[e.AUTHORIZATION_HEADER],p.label=3;case 3:return[4,this.nextMiddleware.execute(t)];case 4:return[2,p.sent()]}})})},e.prototype.setNext=function(t){this.nextMiddleware=t},e.AUTHORIZATION_HEADER="Authorization",e}();en.AuthenticationHandler=Gm});var nn=b(rn=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});rn.HTTPMessageHandler=void 0;var Uu=(se(),oe(ae)),Wm=function(){function e(){}return i(e,"HTTPMessageHandler"),e.prototype.execute=function(t){return Uu.__awaiter(this,void 0,void 0,function(){var r;return Uu.__generator(this,function(n){switch(n.label){case 0:return r=t,[4,fetch(t.request,t.options)];case 1:return r.response=n.sent(),[2]}})})},e}();rn.HTTPMessageHandler=Wm});var gr=b(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.RetryHandlerOptions=void 0;var Km=function(){function e(t,r,n){if(t===void 0&&(t=e.DEFAULT_DELAY),r===void 0&&(r=e.DEFAULT_MAX_RETRIES),n===void 0&&(n=e.defaultShouldRetry),t>e.MAX_DELAY&&r>e.MAX_MAX_RETRIES){var o=new Error("Delay and MaxRetries should not be more than ".concat(e.MAX_DELAY," and ").concat(e.MAX_MAX_RETRIES));throw o.name="MaxLimitExceeded",o}else if(t>e.MAX_DELAY){var o=new Error("Delay should not be more than ".concat(e.MAX_DELAY));throw o.name="MaxLimitExceeded",o}else if(r>e.MAX_MAX_RETRIES){var o=new Error("MaxRetries should not be more than ".concat(e.MAX_MAX_RETRIES));throw o.name="MaxLimitExceeded",o}else if(t<0&&r<0){var o=new Error("Delay and MaxRetries should not be negative");throw o.name="MinExpectationNotMet",o}else if(t<0){var o=new Error("Delay should not be negative");throw o.name="MinExpectationNotMet",o}else if(r<0){var o=new Error("MaxRetries should not be negative");throw o.name="MinExpectationNotMet",o}this.delay=Math.min(t,e.MAX_DELAY),this.maxRetries=Math.min(r,e.MAX_MAX_RETRIES),this.shouldRetry=n}return i(e,"RetryHandlerOptions"),e.prototype.getMaxDelay=function(){return e.MAX_DELAY},e.DEFAULT_DELAY=3,e.DEFAULT_MAX_RETRIES=3,e.MAX_DELAY=180,e.MAX_MAX_RETRIES=10,e.defaultShouldRetry=function(){return!0},e}();on.RetryHandlerOptions=Km});var sn=b(an=>{"use strict";Object.defineProperty(an,"__esModule",{value:!0});an.RetryHandler=void 0;var kt=(se(),oe(ae)),ei=mr(),Jm=rt(),Mu=Ot(),Lu=gr(),ju=Rt(),Xm=function(){function e(t){t===void 0&&(t=new Lu.RetryHandlerOptions),this.options=t}return i(e,"RetryHandler"),e.prototype.isRetry=function(t){return e.RETRY_STATUS_CODES.indexOf(t.status)!==-1},e.prototype.isBuffered=function(t,r){var n=typeof t=="string"?r.method:t.method,o=n===ei.RequestMethod.PUT||n===ei.RequestMethod.PATCH||n===ei.RequestMethod.POST;if(o){var a=(0,Mu.getRequestHeader)(t,r,"Content-Type")==="application/octet-stream";if(a)return!1}return!0},e.prototype.getDelay=function(t,r,n){var o=i(function(){return Number(Math.random().toFixed(3))},"getRandomness"),a=t.headers!==void 0?t.headers.get(e.RETRY_AFTER_HEADER):null,s;return a!==null?Number.isNaN(Number(a))?s=Math.round((new Date(a).getTime()-Date.now())/1e3):s=Number(a):s=r>=2?this.getExponentialBackOffTime(r)+n+o():n+o(),Math.min(s,this.options.getMaxDelay()+o())},e.prototype.getExponentialBackOffTime=function(t){return Math.round(1/2*(Math.pow(2,t)-1))},e.prototype.sleep=function(t){return kt.__awaiter(this,void 0,void 0,function(){var r;return kt.__generator(this,function(n){return r=t*1e3,[2,new Promise(function(o){return setTimeout(o,r)})]})})},e.prototype.getOptions=function(t){var r;return t.middlewareControl instanceof Jm.MiddlewareControl&&(r=t.middlewareControl.getMiddlewareOptions(this.options.constructor)),typeof r>"u"&&(r=Object.assign(new Lu.RetryHandlerOptions,this.options)),r},e.prototype.executeWithRetry=function(t,r,n){return kt.__awaiter(this,void 0,void 0,function(){var o;return kt.__generator(this,function(a){switch(a.label){case 0:return[4,this.nextMiddleware.execute(t)];case 1:return a.sent(),r<n.maxRetries&&this.isRetry(t.response)&&this.isBuffered(t.request,t.options)&&n.shouldRetry(n.delay,r,t.request,t.options,t.response)?(++r,(0,Mu.setRequestHeader)(t.request,t.options,e.RETRY_ATTEMPT_HEADER,r.toString()),o=this.getDelay(t.response,r,n.delay),[4,this.sleep(o)]):[3,4];case 2:return a.sent(),[4,this.executeWithRetry(t,r,n)];case 3:return[2,a.sent()];case 4:return[2]}})})},e.prototype.execute=function(t){return kt.__awaiter(this,void 0,void 0,function(){var r,n;return kt.__generator(this,function(o){switch(o.label){case 0:return r=0,n=this.getOptions(t),ju.TelemetryHandlerOptions.updateFeatureUsageFlag(t,ju.FeatureUsageFlag.RETRY_HANDLER_ENABLED),[4,this.executeWithRetry(t,r,n)];case 1:return[2,o.sent()]}})})},e.prototype.setNext=function(t){this.nextMiddleware=t},e.RETRY_STATUS_CODES=[429,503,504],e.RETRY_ATTEMPT_HEADER="Retry-Attempt",e.RETRY_AFTER_HEADER="Retry-After",e}();an.RetryHandler=Xm});var hr=b(un=>{"use strict";Object.defineProperty(un,"__esModule",{value:!0});un.RedirectHandlerOptions=void 0;var Ym=function(){function e(t,r){if(t===void 0&&(t=e.DEFAULT_MAX_REDIRECTS),r===void 0&&(r=e.defaultShouldRedirect),t>e.MAX_MAX_REDIRECTS){var n=new Error("MaxRedirects should not be more than ".concat(e.MAX_MAX_REDIRECTS));throw n.name="MaxLimitExceeded",n}if(t<0){var n=new Error("MaxRedirects should not be negative");throw n.name="MinExpectationNotMet",n}this.maxRedirects=t,this.shouldRedirect=r}return i(e,"RedirectHandlerOptions"),e.DEFAULT_MAX_REDIRECTS=5,e.MAX_MAX_REDIRECTS=20,e.defaultShouldRedirect=function(){return!0},e}();un.RedirectHandlerOptions=Ym});var ln=b(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.RedirectHandler=void 0;var Dt=(se(),oe(ae)),Qm=mr(),eg=rt(),tg=Ot(),ti=hr(),Fu=Rt(),rg=function(){function e(t){t===void 0&&(t=new ti.RedirectHandlerOptions),this.options=t}return i(e,"RedirectHandler"),e.prototype.isRedirect=function(t){return e.REDIRECT_STATUS_CODES.indexOf(t.status)!==-1},e.prototype.hasLocationHeader=function(t){return t.headers.has(e.LOCATION_HEADER)},e.prototype.getLocationHeader=function(t){return t.headers.get(e.LOCATION_HEADER)},e.prototype.isRelativeURL=function(t){return t.indexOf("://")===-1},e.prototype.shouldDropAuthorizationHeader=function(t,r){var n=/^[A-Za-z].+?:\/\/.+?(?=\/|$)/,o=n.exec(t),a,s;o!==null&&(a=o[0]);var u=n.exec(r);return u!==null&&(s=u[0]),typeof a<"u"&&typeof s<"u"&&a!==s},e.prototype.updateRequestUrl=function(t,r){return Dt.__awaiter(this,void 0,void 0,function(){var n,o;return Dt.__generator(this,function(a){switch(a.label){case 0:return n=r,typeof r.request!="string"?[3,1]:(o=t,[3,3]);case 1:return[4,(0,tg.cloneRequestWithNewUrl)(t,r.request)];case 2:o=a.sent(),a.label=3;case 3:return n.request=o,[2]}})})},e.prototype.getOptions=function(t){var r;return t.middlewareControl instanceof eg.MiddlewareControl&&(r=t.middlewareControl.getMiddlewareOptions(ti.RedirectHandlerOptions)),typeof r>"u"&&(r=Object.assign(new ti.RedirectHandlerOptions,this.options)),r},e.prototype.executeWithRedirect=function(t,r,n){return Dt.__awaiter(this,void 0,void 0,function(){var o,a;return Dt.__generator(this,function(s){switch(s.label){case 0:return[4,this.nextMiddleware.execute(t)];case 1:return s.sent(),o=t.response,r<n.maxRedirects&&this.isRedirect(o)&&this.hasLocationHeader(o)&&n.shouldRedirect(o)?(++r,o.status!==e.STATUS_CODE_SEE_OTHER?[3,2]:(t.options.method=Qm.RequestMethod.GET,delete t.options.body,[3,4])):[3,6];case 2:return a=this.getLocationHeader(o),!this.isRelativeURL(a)&&this.shouldDropAuthorizationHeader(o.url,a)&&delete t.options.headers[e.AUTHORIZATION_HEADER],[4,this.updateRequestUrl(a,t)];case 3:s.sent(),s.label=4;case 4:return[4,this.executeWithRedirect(t,r,n)];case 5:return s.sent(),[3,7];case 6:return[2];case 7:return[2]}})})},e.prototype.execute=function(t){return Dt.__awaiter(this,void 0,void 0,function(){var r,n;return Dt.__generator(this,function(o){switch(o.label){case 0:return r=0,n=this.getOptions(t),t.options.redirect=e.MANUAL_REDIRECT,Fu.TelemetryHandlerOptions.updateFeatureUsageFlag(t,Fu.FeatureUsageFlag.REDIRECT_HANDLER_ENABLED),[4,this.executeWithRedirect(t,r,n)];case 1:return[2,o.sent()]}})})},e.prototype.setNext=function(t){this.nextMiddleware=t},e.REDIRECT_STATUS_CODES=[301,302,303,307,308],e.STATUS_CODE_SEE_OTHER=303,e.LOCATION_HEADER="Location",e.AUTHORIZATION_HEADER="Authorization",e.MANUAL_REDIRECT="manual",e}();cn.RedirectHandler=rg});var Bu=b(pn=>{"use strict";Object.defineProperty(pn,"__esModule",{value:!0});pn.PACKAGE_VERSION=void 0;pn.PACKAGE_VERSION="3.0.7"});var mn=b(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.TelemetryHandler=void 0;var Vu=(se(),oe(ae)),Hu=Xr(),ng=Bu(),og=rt(),dn=Ot(),ig=Rt(),ag=function(){function e(){}return i(e,"TelemetryHandler"),e.prototype.execute=function(t){return Vu.__awaiter(this,void 0,void 0,function(){var r,n,o,a,s;return Vu.__generator(this,function(u){switch(u.label){case 0:return r=typeof t.request=="string"?t.request:t.request.url,(0,Hu.isGraphURL)(r)||t.customHosts&&(0,Hu.isCustomHost)(r,t.customHosts)?(n=(0,dn.getRequestHeader)(t.request,t.options,e.CLIENT_REQUEST_ID_HEADER),n||(n=(0,dn.generateUUID)(),(0,dn.setRequestHeader)(t.request,t.options,e.CLIENT_REQUEST_ID_HEADER,n)),o="".concat(e.PRODUCT_NAME,"/").concat(ng.PACKAGE_VERSION),a=void 0,t.middlewareControl instanceof og.MiddlewareControl&&(a=t.middlewareControl.getMiddlewareOptions(ig.TelemetryHandlerOptions)),a&&(s=a.getFeatureUsage(),o+=" (".concat(e.FEATURE_USAGE_STRING,"=").concat(s,")")),(0,dn.appendRequestHeader)(t.request,t.options,e.SDK_VERSION_HEADER,o)):(delete t.options.headers[e.CLIENT_REQUEST_ID_HEADER],delete t.options.headers[e.SDK_VERSION_HEADER]),[4,this.nextMiddleware.execute(t)];case 1:return[2,u.sent()]}})})},e.prototype.setNext=function(t){this.nextMiddleware=t},e.CLIENT_REQUEST_ID_HEADER="client-request-id",e.SDK_VERSION_HEADER="SdkVersion",e.PRODUCT_NAME="graph-js",e.FEATURE_USAGE_STRING="featureUsage",e}();fn.TelemetryHandler=ag});var Zu=b(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.MiddlewareFactory=void 0;var sg=tn(),ug=nn(),cg=hr(),lg=gr(),pg=ln(),dg=sn(),fg=mn(),mg=i(function(){return typeof process=="object"&&typeof require=="function"},"isNodeEnvironment"),gg=function(){function e(){}return i(e,"MiddlewareFactory"),e.getDefaultMiddlewareChain=function(t){var r=[],n=new sg.AuthenticationHandler(t),o=new dg.RetryHandler(new lg.RetryHandlerOptions),a=new fg.TelemetryHandler,s=new ug.HTTPMessageHandler;if(r.push(n),r.push(o),mg()){var u=new pg.RedirectHandler(new cg.RedirectHandlerOptions);r.push(u)}return r.push(a),r.push(s),r},e}();gn.MiddlewareFactory=gg});var yn=b(hn=>{"use strict";Object.defineProperty(hn,"__esModule",{value:!0});hn.ChaosStrategy=void 0;var qu;(function(e){e[e.MANUAL=0]="MANUAL",e[e.RANDOM=1]="RANDOM"})(qu||(hn.ChaosStrategy=qu={}))});var ri=b(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});vn.ChaosHandlerOptions=void 0;var hg=yn(),yg=function(){function e(t,r,n,o,a,s){if(t===void 0&&(t=hg.ChaosStrategy.RANDOM),r===void 0&&(r="Some error Happened"),this.chaosStrategy=t,this.statusCode=n,this.statusMessage=r,this.chaosPercentage=o!==void 0?o:10,this.responseBody=a,this.headers=s,this.chaosPercentage>100)throw new Error("Error Pecentage can not be more than 100")}return i(e,"ChaosHandlerOptions"),e}();vn.ChaosHandlerOptions=yg});var Gu=b(Ct=>{"use strict";Object.defineProperty(Ct,"__esModule",{value:!0});Ct.httpStatusCode=Ct.methodStatusCode=void 0;Ct.methodStatusCode={GET:[429,500,502,503,504],POST:[429,500,502,503,504,507],PUT:[429,500,502,503,504,507],PATCH:[429,500,502,503,504],DELETE:[429,500,502,503,504,507]};Ct.httpStatusCode={100:"Continue",101:"Switching Protocols",102:"Processing",103:"Early Hints",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",510:"Not Extended",511:"Network Authentication Required"}});var Ju=b(Pn=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});Pn.ChaosHandler=void 0;var _n=(se(),oe(ae)),vg=rt(),_g=Ot(),Wu=Gu(),ni=ri(),Ku=yn(),Pg=function(){function e(t,r){t===void 0&&(t=new ni.ChaosHandlerOptions),this.options=t,this.manualMap=r}return i(e,"ChaosHandler"),e.prototype.createResponseHeaders=function(t,r,n){var o=t.headers?new Headers(t.headers):new Headers;return o.append("Cache-Control","no-store"),o.append("request-id",r),o.append("client-request-id",r),o.append("x-ms-ags-diagnostic",""),o.append("Date",n),o.append("Strict-Transport-Security",""),t.statusCode===429&&o.append("retry-after","3"),o},e.prototype.createResponseBody=function(t,r,n){if(t.responseBody)return t.responseBody;var o;if(t.statusCode>=400){var a=Wu.httpStatusCode[t.statusCode],s=t.statusMessage;o={error:{code:a,message:s,innerError:{"request-id":r,date:n}}}}else o={};return o},e.prototype.createResponse=function(t,r){var n=r.request,o=(0,_g.generateUUID)(),a=new Date,s=this.createResponseHeaders(t,o,a.toString()),u=this.createResponseBody(t,o,a.toString()),p={url:n,status:t.statusCode,statusText:t.statusMessage,headers:s};r.response=new Response(typeof u=="string"?u:JSON.stringify(u),p)},e.prototype.sendRequest=function(t,r){return _n.__awaiter(this,void 0,void 0,function(){return _n.__generator(this,function(n){switch(n.label){case 0:return this.setStatusCode(t,r.request,r.options.method),t.chaosStrategy===Ku.ChaosStrategy.MANUAL&&!this.nextMiddleware||Math.floor(Math.random()*100)<t.chaosPercentage?(this.createResponse(t,r),[3,3]):[3,1];case 1:return this.nextMiddleware?[4,this.nextMiddleware.execute(r)]:[3,3];case 2:n.sent(),n.label=3;case 3:return[2]}})})},e.prototype.getRandomStatusCode=function(t){var r=Wu.methodStatusCode[t];return r[Math.floor(Math.random()*r.length)]},e.prototype.getRelativeURL=function(t){var r=/https?:\/\/graph\.microsoft\.com\/[^/]+(.+?)(\?|$)/,n;return r.exec(t)!==null&&(n=r.exec(t)[1]),n},e.prototype.setStatusCode=function(t,r,n){var o=this;if(t.chaosStrategy===Ku.ChaosStrategy.MANUAL){if(t.statusCode===void 0){var a=this.getRelativeURL(r);this.manualMap.get(a)!==void 0?this.manualMap.get(a).get(n)!==void 0&&(t.statusCode=this.manualMap.get(a).get(n)):this.manualMap.forEach(function(s,u){var p=new RegExp(u+"$");p.test(a)&&o.manualMap.get(u).get(n)!==void 0&&(t.statusCode=o.manualMap.get(u).get(n))})}}else t.statusCode=this.getRandomStatusCode(n)},e.prototype.getOptions=function(t){var r;return t.middlewareControl instanceof vg.MiddlewareControl&&(r=t.middlewareControl.getMiddlewareOptions(ni.ChaosHandlerOptions)),typeof r>"u"&&(r=Object.assign(new ni.ChaosHandlerOptions,this.options)),r},e.prototype.execute=function(t){return _n.__awaiter(this,void 0,void 0,function(){var r;return _n.__generator(this,function(n){switch(n.label){case 0:return r=this.getOptions(t),[4,this.sendRequest(r,t)];case 1:return[2,n.sent()]}})})},e.prototype.setNext=function(t){this.nextMiddleware=t},e}();Pn.ChaosHandler=Pg});var yr=b(xn=>{"use strict";Object.defineProperty(xn,"__esModule",{value:!0});xn.ResponseType=void 0;var Xu;(function(e){e.ARRAYBUFFER="arraybuffer",e.BLOB="blob",e.DOCUMENT="document",e.JSON="json",e.RAW="raw",e.STREAM="stream",e.TEXT="text"})(Xu||(xn.ResponseType=Xu={}))});var ii=b(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.GraphResponseHandler=Nt.DocumentType=void 0;var bn=(se(),oe(ae)),pt=yr(),oi;(function(e){e.TEXT_HTML="text/html",e.TEXT_XML="text/xml",e.APPLICATION_XML="application/xml",e.APPLICATION_XHTML="application/xhtml+xml"})(oi||(Nt.DocumentType=oi={}));var Tn;(function(e){e.TEXT_PLAIN="text/plain",e.APPLICATION_JSON="application/json"})(Tn||(Tn={}));var En;(function(e){e.DOCUMENT="^(text\\/(html|xml))|(application\\/(xml|xhtml\\+xml))$",e.IMAGE="^image\\/.+"})(En||(En={}));var xg=function(){function e(){}return i(e,"GraphResponseHandler"),e.parseDocumentResponse=function(t,r){return typeof DOMParser<"u"?new Promise(function(n,o){t.text().then(function(a){try{var s=new DOMParser,u=s.parseFromString(a,r);n(u)}catch(p){o(p)}})}):Promise.resolve(t.body)},e.convertResponse=function(t,r){return bn.__awaiter(this,void 0,void 0,function(){var n,o,a,s;return bn.__generator(this,function(u){switch(u.label){case 0:if(t.status===204)return[2,Promise.resolve()];switch(o=t.headers.get("Content-type"),a=r,a){case pt.ResponseType.ARRAYBUFFER:return[3,1];case pt.ResponseType.BLOB:return[3,3];case pt.ResponseType.DOCUMENT:return[3,5];case pt.ResponseType.JSON:return[3,7];case pt.ResponseType.STREAM:return[3,9];case pt.ResponseType.TEXT:return[3,11]}return[3,13];case 1:return[4,t.arrayBuffer()];case 2:return n=u.sent(),[3,24];case 3:return[4,t.blob()];case 4:return n=u.sent(),[3,24];case 5:return[4,e.parseDocumentResponse(t,oi.TEXT_XML)];case 6:return n=u.sent(),[3,24];case 7:return[4,t.json()];case 8:return n=u.sent(),[3,24];case 9:return[4,Promise.resolve(t.body)];case 10:return n=u.sent(),[3,24];case 11:return[4,t.text()];case 12:return n=u.sent(),[3,24];case 13:return o===null?[3,22]:(s=o.split(";")[0],new RegExp(En.DOCUMENT).test(s)?[4,e.parseDocumentResponse(t,s)]:[3,15]);case 14:return n=u.sent(),[3,21];case 15:return new RegExp(En.IMAGE).test(s)?(n=t.blob(),[3,21]):[3,16];case 16:return s!==Tn.TEXT_PLAIN?[3,18]:[4,t.text()];case 17:return n=u.sent(),[3,21];case 18:return s!==Tn.APPLICATION_JSON?[3,20]:[4,t.json()];case 19:return n=u.sent(),[3,21];case 20:n=Promise.resolve(t.body),u.label=21;case 21:return[3,23];case 22:n=Promise.resolve(t.body),u.label=23;case 23:return[3,24];case 24:return[2,n]}})})},e.getResponse=function(t,r,n){return bn.__awaiter(this,void 0,void 0,function(){var o;return bn.__generator(this,function(a){switch(a.label){case 0:return r!==pt.ResponseType.RAW?[3,1]:[2,Promise.resolve(t)];case 1:return[4,e.convertResponse(t,r)];case 2:if(o=a.sent(),t.ok)if(typeof n=="function")n(null,o);else return[2,o];else throw o;a.label=3;case 3:return[2]}})})},e}();Nt.GraphResponseHandler=xg});var ai=b(In=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});In.Range=void 0;var bg=function(){function e(t,r){t===void 0&&(t=-1),r===void 0&&(r=-1),this.minValue=t,this.maxValue=r}return i(e,"Range"),e}();In.Range=bg});var si=b(Sn=>{"use strict";Object.defineProperty(Sn,"__esModule",{value:!0});Sn.UploadResult=void 0;var Tg=function(){function e(t,r){this._location=r,this._responseBody=t}return i(e,"UploadResult"),Object.defineProperty(e.prototype,"location",{get:i(function(){return this._location},"get"),set:i(function(t){this._location=t},"set"),enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"responseBody",{get:i(function(){return this._responseBody},"get"),set:i(function(t){this._responseBody=t},"set"),enumerable:!1,configurable:!0}),e.CreateUploadResult=function(t,r){return new e(t,r.get("location"))},e}();Sn.UploadResult=Tg});var ci=b($n=>{"use strict";Object.defineProperty($n,"__esModule",{value:!0});$n.LargeFileUploadTask=void 0;var Ie=(se(),oe(ae)),ui=qe(),Eg=ii(),Yu=yr(),An=ai(),Ig=si(),Sg=function(){function e(t,r,n,o){if(o===void 0&&(o={}),this.DEFAULT_FILE_SIZE=5*1024*1024,this.client=t,r.sliceFile)this.file=r;else throw new ui.GraphClientError("Please pass the FileUpload object, StreamUpload object or any custom implementation of the FileObject interface");this.file=r,o.rangeSize||(o.rangeSize=this.DEFAULT_FILE_SIZE),this.options=o,this.uploadSession=n,this.nextRange=new An.Range(0,this.options.rangeSize-1)}return i(e,"LargeFileUploadTask"),e.createUploadSession=function(t,r,n,o){return o===void 0&&(o={}),Ie.__awaiter(this,void 0,void 0,function(){var a,s;return Ie.__generator(this,function(u){switch(u.label){case 0:return[4,t.api(r).headers(o).post(n)];case 1:return a=u.sent(),s={url:a.uploadUrl,expiry:new Date(a.expirationDateTime),isCancelled:!1},[2,s]}})})},e.prototype.parseRange=function(t){var r=t[0];if(typeof r>"u"||r==="")return new An.Range;var n=r.split("-"),o=parseInt(n[0],10),a=parseInt(n[1],10);return Number.isNaN(a)&&(a=this.file.size-1),new An.Range(o,a)},e.prototype.updateTaskStatus=function(t){this.uploadSession.expiry=new Date(t.expirationDateTime),this.nextRange=this.parseRange(t.nextExpectedRanges)},e.prototype.getNextRange=function(){if(this.nextRange.minValue===-1)return this.nextRange;var t=this.nextRange.minValue,r=t+this.options.rangeSize-1;return r>=this.file.size&&(r=this.file.size-1),new An.Range(t,r)},e.prototype.sliceFile=function(t){if(console.warn("The LargeFileUploadTask.sliceFile() function has been deprecated and moved into the FileObject interface."),this.file.content instanceof ArrayBuffer||this.file.content instanceof Blob||this.file.content instanceof Uint8Array)return this.file.content.slice(t.minValue,t.maxValue+1);throw new ui.GraphClientError("The LargeFileUploadTask.sliceFile() function expects only Blob, ArrayBuffer or Uint8Array file content. Please note that the sliceFile() function is deprecated.")},e.prototype.upload=function(){return Ie.__awaiter(this,void 0,void 0,function(){var t,r,n,o,a,s,u;return Ie.__generator(this,function(p){switch(p.label){case 0:t=this.options&&this.options.uploadEventHandlers,p.label=1;case 1:if(this.uploadSession.isCancelled)return[3,5];if(r=this.getNextRange(),r.maxValue===-1)throw n=new Error("Task with which you are trying to upload is already completed, Please check for your uploaded file"),n.name="Invalid Session",n;return[4,this.file.sliceFile(r)];case 2:return o=p.sent(),[4,this.uploadSliceGetRawResponse(o,r,this.file.size)];case 3:if(a=p.sent(),!a)throw new ui.GraphClientError("Something went wrong! Large file upload slice response is null.");return[4,Eg.GraphResponseHandler.getResponse(a)];case 4:return s=p.sent(),a.status===201||a.status===200&&s.id?(this.reportProgress(t,r),[2,Ig.UploadResult.CreateUploadResult(s,a.headers)]):(u={expirationDateTime:s.expirationDateTime||s.ExpirationDateTime,nextExpectedRanges:s.NextExpectedRanges||s.nextExpectedRanges},this.updateTaskStatus(u),this.reportProgress(t,r),[3,1]);case 5:return[2]}})})},e.prototype.reportProgress=function(t,r){t&&t.progress&&t.progress(r,t.extraCallbackParam)},e.prototype.uploadSlice=function(t,r,n){return Ie.__awaiter(this,void 0,void 0,function(){return Ie.__generator(this,function(o){switch(o.label){case 0:return[4,this.client.api(this.uploadSession.url).headers({"Content-Length":"".concat(r.maxValue-r.minValue+1),"Content-Range":"bytes ".concat(r.minValue,"-").concat(r.maxValue,"/").concat(n),"Content-Type":"application/octet-stream"}).put(t)];case 1:return[2,o.sent()]}})})},e.prototype.uploadSliceGetRawResponse=function(t,r,n){return Ie.__awaiter(this,void 0,void 0,function(){return Ie.__generator(this,function(o){switch(o.label){case 0:return[4,this.client.api(this.uploadSession.url).headers({"Content-Length":"".concat(r.maxValue-r.minValue+1),"Content-Range":"bytes ".concat(r.minValue,"-").concat(r.maxValue,"/").concat(n),"Content-Type":"application/octet-stream"}).responseType(Yu.ResponseType.RAW).put(t)];case 1:return[2,o.sent()]}})})},e.prototype.cancel=function(){return Ie.__awaiter(this,void 0,void 0,function(){var t;return Ie.__generator(this,function(r){switch(r.label){case 0:return[4,this.client.api(this.uploadSession.url).responseType(Yu.ResponseType.RAW).delete()];case 1:return t=r.sent(),t.status===204&&(this.uploadSession.isCancelled=!0),[2,t]}})})},e.prototype.getStatus=function(){return Ie.__awaiter(this,void 0,void 0,function(){var t;return Ie.__generator(this,function(r){switch(r.label){case 0:return[4,this.client.api(this.uploadSession.url).get()];case 1:return t=r.sent(),this.updateTaskStatus(t),[2,t]}})})},e.prototype.resume=function(){return Ie.__awaiter(this,void 0,void 0,function(){return Ie.__generator(this,function(t){switch(t.label){case 0:return[4,this.getStatus()];case 1:return t.sent(),[4,this.upload()];case 2:return[2,t.sent()]}})})},e.prototype.getUploadSession=function(){return this.uploadSession},e}();$n.LargeFileUploadTask=Sg});var li=b(wn=>{"use strict";Object.defineProperty(wn,"__esModule",{value:!0});wn.FileUpload=void 0;var Ag=qe(),$g=function(){function e(t,r,n){if(this.content=t,this.name=r,this.size=n,!t||!r||!n)throw new Ag.GraphClientError("Please provide the upload content, name of the file and size of the file")}return i(e,"FileUpload"),e.prototype.sliceFile=function(t){return this.content.slice(t.minValue,t.maxValue+1)},e}();wn.FileUpload=$g});var pi=b(On=>{"use strict";Object.defineProperty(On,"__esModule",{value:!0});On.getValidRangeSize=void 0;var wg=5*1024*1024,Og=i(function(e){return e>320*1024&&(e=Math.floor(e/(320*1024))*320*1024),e},"roundTo320KB"),zg=i(function(e){e===void 0&&(e=wg);var t=60*1024*1024;return e>t&&(e=t),Og(e)},"getValidRangeSize");On.getValidRangeSize=zg});var ec=b(zn=>{"use strict";Object.defineProperty(zn,"__esModule",{value:!0});zn.OneDriveLargeFileUploadTask=void 0;var Ge=(se(),oe(ae)),Qu=qe(),Rg=li(),kg=ci(),Dg=pi(),Cg=function(e){Ge.__extends(t,e);function t(r,n,o,a){return e.call(this,r,n,o,a)||this}return i(t,"OneDriveLargeFileUploadTask"),t.constructCreateSessionUrl=function(r,n){return n===void 0&&(n=t.DEFAULT_UPLOAD_PATH),r=r.trim(),n=n.trim(),n===""&&(n="/"),n[0]!=="/"&&(n="/".concat(n)),n[n.length-1]!=="/"&&(n="".concat(n,"/")),"/me/drive/root:".concat(n.split("/").map(function(o){return encodeURIComponent(o)}).join("/")).concat(encodeURIComponent(r),":/createUploadSession")},t.getFileInfo=function(r,n){var o,a;if(typeof Blob<"u"&&r instanceof Blob)o=new File([r],n),a=o.size;else if(typeof File<"u"&&r instanceof File)o=r,a=o.size;else if(typeof Uint8Array<"u"&&r instanceof Uint8Array){var s=r;a=s.byteLength,o=s.buffer.slice(s.byteOffset,s.byteOffset+s.byteLength)}return{content:o,size:a}},t.create=function(r,n,o){return Ge.__awaiter(this,void 0,void 0,function(){var a,s,u;return Ge.__generator(this,function(p){if(!r||!n||!o)throw new Qu.GraphClientError("Please provide the Graph client instance, file object and OneDriveLargeFileUploadOptions value");return a=o.fileName,s=t.getFileInfo(n,a),u=new Rg.FileUpload(s.content,a,s.size),[2,this.createTaskWithFileObject(r,u,o)]})})},t.createTaskWithFileObject=function(r,n,o){return Ge.__awaiter(this,void 0,void 0,function(){var a,s,u,p;return Ge.__generator(this,function(d){switch(d.label){case 0:if(!r||!n||!o)throw new Qu.GraphClientError("Please provide the Graph client instance, FileObject interface implementation and OneDriveLargeFileUploadOptions value");return a=o.uploadSessionURL?o.uploadSessionURL:t.constructCreateSessionUrl(o.fileName,o.path),s={fileName:o.fileName,fileDescription:o.fileDescription,conflictBehavior:o.conflictBehavior},[4,t.createUploadSession(r,a,s)];case 1:return u=d.sent(),p=(0,Dg.getValidRangeSize)(o.rangeSize),[2,new t(r,n,u,{rangeSize:p,uploadEventHandlers:o.uploadEventHandlers})]}})})},t.createUploadSession=function(r,n,o){return Ge.__awaiter(this,void 0,void 0,function(){var a;return Ge.__generator(this,function(s){return a={item:{"@microsoft.graph.conflictBehavior":o?.conflictBehavior||"rename",name:o?.fileName,description:o?.fileDescription}},[2,e.createUploadSession.call(this,r,n,a)]})})},t.prototype.commit=function(r,n){return n===void 0&&(n="rename"),Ge.__awaiter(this,void 0,void 0,function(){var o;return Ge.__generator(this,function(a){switch(a.label){case 0:return o={name:this.file.name,"@microsoft.graph.conflictBehavior":n,"@microsoft.graph.sourceUrl":this.uploadSession.url},[4,this.client.api(r).put(o)];case 1:return[2,a.sent()]}})})},t.DEFAULT_UPLOAD_PATH="/",t}(kg.LargeFileUploadTask);zn.OneDriveLargeFileUploadTask=Cg});var rc=b(Rn=>{"use strict";Object.defineProperty(Rn,"__esModule",{value:!0});Rn.StreamUpload=void 0;var tc=(se(),oe(ae)),vr=qe(),Ng=function(){function e(t,r,n){if(this.content=t,this.name=r,this.size=n,!t||!r||!n)throw new vr.GraphClientError("Please provide the Readable Stream content, name of the file and size of the file")}return i(e,"StreamUpload"),e.prototype.sliceFile=function(t){return tc.__awaiter(this,void 0,void 0,function(){var r,n,o,a,s,u,p;return tc.__generator(this,function(d){switch(d.label){case 0:if(r=t.maxValue-t.minValue+1,n=[],this.previousSlice){if(t.minValue<this.previousSlice.range.minValue)throw new vr.GraphClientError("An error occurred while uploading the stream. Please restart the stream upload from the first byte of the file.");if(t.minValue<this.previousSlice.range.maxValue){if(o=this.previousSlice.range.minValue,a=this.previousSlice.range.maxValue,t.minValue===o&&t.maxValue===a)return[2,this.previousSlice.fileSlice];if(t.maxValue===a)return[2,this.previousSlice.fileSlice.slice(t.minValue,t.maxValue+1)];n.push(this.previousSlice.fileSlice.slice(t.minValue,a+1)),r=t.maxValue-a}}return this.content&&this.content.readable?this.content.readableLength>=r?(n.push(this.content.read(r)),[3,3]):[3,1]:[3,4];case 1:return u=(s=n).push,[4,this.readNBytesFromStream(r)];case 2:u.apply(s,[d.sent()]),d.label=3;case 3:return[3,5];case 4:throw new vr.GraphClientError("Stream is not readable.");case 5:return p=Buffer.concat(n),this.previousSlice={fileSlice:p,range:t},[2,p]}})})},e.prototype.readNBytesFromStream=function(t){var r=this;return new Promise(function(n,o){var a=[],s=t,u=0;r.content.on("end",function(){if(s>0)return o(new vr.GraphClientError("Stream ended before reading required range size"))}),r.content.on("readable",function(){for(var p;u<t&&(p=r.content.read(s))!==null;)u+=p.length,a.push(p),s>0&&(s=t-u);if(u===t)return n(Buffer.concat(a));if(!r.content||!r.content.readable)return o(new vr.GraphClientError("Error encountered while reading the stream during the upload"))})})},e}();Rn.StreamUpload=Ng});var nc=b(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});kn.PageIterator=void 0;var Ut=(se(),oe(ae)),Ug=function(){function e(t,r,n,o){this.client=t,this.collection=r.value,this.nextLink=r["@odata.nextLink"],this.deltaLink=r["@odata.deltaLink"],this.callback=n,this.cursor=0,this.complete=!1,this.requestOptions=o}return i(e,"PageIterator"),e.prototype.iterationHelper=function(){if(this.collection===void 0)return!1;for(var t=!0;t&&this.cursor<this.collection.length;){var r=this.collection[this.cursor];t=this.callback(r),this.cursor++}return t},e.prototype.fetchAndUpdateNextPageData=function(){return Ut.__awaiter(this,void 0,void 0,function(){var t,r;return Ut.__generator(this,function(n){switch(n.label){case 0:return t=this.client.api(this.nextLink),this.requestOptions&&(this.requestOptions.headers&&(t=t.headers(this.requestOptions.headers)),this.requestOptions.middlewareOptions&&(t=t.middlewareOptions(this.requestOptions.middlewareOptions)),this.requestOptions.options&&(t=t.options(this.requestOptions.options))),[4,t.get()];case 1:return r=n.sent(),this.collection=r.value,this.cursor=0,this.nextLink=r["@odata.nextLink"],this.deltaLink=r["@odata.deltaLink"],[2]}})})},e.prototype.getDeltaLink=function(){return this.deltaLink},e.prototype.iterate=function(){return Ut.__awaiter(this,void 0,void 0,function(){var t;return Ut.__generator(this,function(r){switch(r.label){case 0:t=this.iterationHelper(),r.label=1;case 1:return t?this.nextLink===void 0?[3,3]:[4,this.fetchAndUpdateNextPageData()]:[3,5];case 2:return r.sent(),t=this.iterationHelper(),[3,4];case 3:t=!1,r.label=4;case 4:return[3,1];case 5:return this.nextLink===void 0&&this.cursor>=this.collection.length&&(this.complete=!0),[2]}})})},e.prototype.resume=function(){return Ut.__awaiter(this,void 0,void 0,function(){return Ut.__generator(this,function(t){return[2,this.iterate()]})})},e.prototype.isComplete=function(){return this.complete},e}();kn.PageIterator=Ug});var di=b(Cn=>{"use strict";Object.defineProperty(Cn,"__esModule",{value:!0});Cn.CustomAuthenticationProvider=void 0;var Dn=(se(),oe(ae)),oc=qe(),Mg=function(){function e(t){this.provider=t}return i(e,"CustomAuthenticationProvider"),e.prototype.getAccessToken=function(){return Dn.__awaiter(this,void 0,void 0,function(){var t=this;return Dn.__generator(this,function(r){return[2,new Promise(function(n,o){t.provider(function(a,s){return Dn.__awaiter(t,void 0,void 0,function(){var u,p;return Dn.__generator(this,function(d){switch(d.label){case 0:return s?(n(s),[3,3]):[3,1];case 1:return a||(u="Access token is undefined or empty. Please provide a valid token. For more help - https://github.com/microsoftgraph/msgraph-sdk-javascript/blob/dev/docs/CustomAuthenticationProvider.md",a=new oc.GraphClientError(u)),[4,oc.GraphClientError.setGraphClientError(a)];case 2:p=d.sent(),o(p),d.label=3;case 3:return[2]}})})})})]})})},e}();Cn.CustomAuthenticationProvider=Mg});var fi=b(Nn=>{"use strict";Object.defineProperty(Nn,"__esModule",{value:!0});Nn.GraphError=void 0;var Lg=(se(),oe(ae)),jg=function(e){Lg.__extends(t,e);function t(r,n,o){r===void 0&&(r=-1);var a=e.call(this,n||o&&o.message)||this;return Object.setPrototypeOf(a,t.prototype),a.statusCode=r,a.code=null,a.requestId=null,a.date=new Date,a.body=null,a.stack=o?o.stack:a.stack,a}return i(t,"GraphError"),t}(Error);Nn.GraphError=jg});var ac=b(Un=>{"use strict";Object.defineProperty(Un,"__esModule",{value:!0});Un.GraphErrorHandler=void 0;var ic=(se(),oe(ae)),mi=fi(),Fg=function(){function e(){}return i(e,"GraphErrorHandler"),e.constructError=function(t,r,n){var o=new mi.GraphError(r,"",t);return t.name!==void 0&&(o.code=t.name),o.body=t.toString(),o.date=new Date,o.headers=n?.headers,o},e.constructErrorFromResponse=function(t,r,n){var o=t.error,a=new mi.GraphError(r,o.message);return a.code=o.code,o.innerError!==void 0&&(a.requestId=o.innerError["request-id"],a.date=new Date(o.innerError.date)),a.body=JSON.stringify(o),a.headers=n?.headers,a},e.getError=function(t,r,n,o){return t===void 0&&(t=null),r===void 0&&(r=-1),ic.__awaiter(this,void 0,void 0,function(){var a;return ic.__generator(this,function(s){if(t&&t.error?a=e.constructErrorFromResponse(t,r,o):t instanceof Error?a=e.constructError(t,r,o):(a=new mi.GraphError(r),a.body=t),typeof n=="function")n(a,null);else return[2,a];return[2]})})},e}();Un.GraphErrorHandler=Fg});var gi=b(Mn=>{"use strict";Object.defineProperty(Mn,"__esModule",{value:!0});Mn.GraphRequest=void 0;var re=(se(),oe(ae)),Bg=qe(),Vg=ac(),_r=Xr(),Hg=ii(),Zg=rt(),dt=mr(),qg=yr(),Gg=function(){function e(t,r,n){var o=this;this.parsePath=function(a){if(a.indexOf("https://")!==-1){a=a.replace("https://","");var s=a.indexOf("/");s!==-1&&(o.urlComponents.host="https://"+a.substring(0,s),a=a.substring(s+1,a.length));var u=a.indexOf("/");u!==-1&&(o.urlComponents.version=a.substring(0,u),a=a.substring(u+1,a.length))}a.charAt(0)==="/"&&(a=a.substr(1));var p=a.indexOf("?");if(p===-1)o.urlComponents.path=a;else{o.urlComponents.path=a.substr(0,p);for(var d=a.substring(p+1,a.length).split("&"),g=0,x=d;g<x.length;g++){var v=x[g];o.parseQueryParameter(v)}}},this.httpClient=t,this.config=r,this.urlComponents={host:this.config.baseUrl,version:this.config.defaultVersion,oDataQueryParams:{},otherURLQueryParams:{},otherURLQueryOptions:[]},this._headers={},this._options={},this._middlewareOptions=[],this.parsePath(n)}return i(e,"GraphRequest"),e.prototype.addCsvQueryParameter=function(t,r,n){this.urlComponents.oDataQueryParams[t]=this.urlComponents.oDataQueryParams[t]?this.urlComponents.oDataQueryParams[t]+",":"";var o=[];n.length>1&&typeof r=="string"?o=Array.prototype.slice.call(n):typeof r=="string"?o.push(r):o=o.concat(r),this.urlComponents.oDataQueryParams[t]+=o.join(",")},e.prototype.buildFullUrl=function(){var t=(0,_r.urlJoin)([this.urlComponents.host,this.urlComponents.version,this.urlComponents.path])+this.createQueryString();return this.config.debugLogging&&console.log(t),t},e.prototype.createQueryString=function(){var t=this.urlComponents,r=[];if(Object.keys(t.oDataQueryParams).length!==0)for(var n in t.oDataQueryParams)Object.prototype.hasOwnProperty.call(t.oDataQueryParams,n)&&r.push(n+"="+t.oDataQueryParams[n]);if(Object.keys(t.otherURLQueryParams).length!==0)for(var n in t.otherURLQueryParams)Object.prototype.hasOwnProperty.call(t.otherURLQueryParams,n)&&r.push(n+"="+t.otherURLQueryParams[n]);if(t.otherURLQueryOptions.length!==0)for(var o=0,a=t.otherURLQueryOptions;o<a.length;o++){var s=a[o];r.push(s)}return r.length>0?"?"+r.join("&"):""},e.prototype.parseQueryParameter=function(t){if(typeof t=="string")if(t.charAt(0)==="?"&&(t=t.substring(1)),t.indexOf("&")!==-1)for(var r=t.split("&"),n=0,o=r;n<o.length;n++){var a=o[n];this.parseQueryParamenterString(a)}else this.parseQueryParamenterString(t);else if(t.constructor===Object)for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&this.setURLComponentsQueryParamater(s,t[s]);return this},e.prototype.parseQueryParamenterString=function(t){if(this.isValidQueryKeyValuePair(t)){var r=t.indexOf("="),n=t.substring(0,r),o=t.substring(r+1);this.setURLComponentsQueryParamater(n,o)}else this.urlComponents.otherURLQueryOptions.push(t)},e.prototype.setURLComponentsQueryParamater=function(t,r){if(_r.oDataQueryNames.indexOf(t)!==-1){var n=this.urlComponents.oDataQueryParams[t],o=n&&(t==="$expand"||t==="$select"||t==="$orderby");this.urlComponents.oDataQueryParams[t]=o?n+","+r:r}else this.urlComponents.otherURLQueryParams[t]=r},e.prototype.isValidQueryKeyValuePair=function(t){var r=t.indexOf("=");if(r===-1)return!1;var n=t.indexOf("(");return!(n!==-1&&t.indexOf("(")<r)},e.prototype.updateRequestOptions=function(t){var r=re.__assign({},t.headers);if(this.config.fetchOptions!==void 0){var n=re.__assign({},this.config.fetchOptions);Object.assign(t,n),typeof this.config.fetchOptions.headers!==void 0&&(t.headers=re.__assign({},this.config.fetchOptions.headers))}Object.assign(t,this._options),t.headers!==void 0&&Object.assign(r,t.headers),Object.assign(r,this._headers),t.headers=r},e.prototype.send=function(t,r,n){var o;return re.__awaiter(this,void 0,void 0,function(){var a,s,u,p,d,g,x,v;return re.__generator(this,function(l){switch(l.label){case 0:s=new Zg.MiddlewareControl(this._middlewareOptions),this.updateRequestOptions(r),u=(o=this.config)===null||o===void 0?void 0:o.customHosts,l.label=1;case 1:return l.trys.push([1,4,,6]),[4,this.httpClient.sendRequest({request:t,options:r,middlewareControl:s,customHosts:u})];case 2:return p=l.sent(),a=p.response,[4,Hg.GraphResponseHandler.getResponse(a,this._responseType,n)];case 3:return d=l.sent(),[2,d];case 4:if(g=l.sent(),g instanceof Bg.GraphClientError)throw g;return x=void 0,a&&(x=a.status),[4,Vg.GraphErrorHandler.getError(g,x,n,a)];case 5:throw v=l.sent(),v;case 6:return[2]}})})},e.prototype.setHeaderContentType=function(){if(!this._headers){this.header("Content-Type","application/json");return}for(var t=Object.keys(this._headers),r=0,n=t;r<n.length;r++){var o=n[r];if(o.toLowerCase()==="content-type")return}this.header("Content-Type","application/json")},e.prototype.header=function(t,r){return this._headers[t]=r,this},e.prototype.headers=function(t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(this._headers[r]=t[r]);return this},e.prototype.option=function(t,r){return this._options[t]=r,this},e.prototype.options=function(t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(this._options[r]=t[r]);return this},e.prototype.middlewareOptions=function(t){return this._middlewareOptions=t,this},e.prototype.version=function(t){return this.urlComponents.version=t,this},e.prototype.responseType=function(t){return this._responseType=t,this},e.prototype.select=function(t){return this.addCsvQueryParameter("$select",t,arguments),this},e.prototype.expand=function(t){return this.addCsvQueryParameter("$expand",t,arguments),this},e.prototype.orderby=function(t){return this.addCsvQueryParameter("$orderby",t,arguments),this},e.prototype.filter=function(t){return this.urlComponents.oDataQueryParams.$filter=t,this},e.prototype.search=function(t){return this.urlComponents.oDataQueryParams.$search=t,this},e.prototype.top=function(t){return this.urlComponents.oDataQueryParams.$top=t,this},e.prototype.skip=function(t){return this.urlComponents.oDataQueryParams.$skip=t,this},e.prototype.skipToken=function(t){return this.urlComponents.oDataQueryParams.$skipToken=t,this},e.prototype.count=function(t){return t===void 0&&(t=!0),this.urlComponents.oDataQueryParams.$count=t.toString(),this},e.prototype.query=function(t){return this.parseQueryParameter(t)},e.prototype.get=function(t){return re.__awaiter(this,void 0,void 0,function(){var r,n,o;return re.__generator(this,function(a){switch(a.label){case 0:return r=this.buildFullUrl(),n={method:dt.RequestMethod.GET},[4,this.send(r,n,t)];case 1:return o=a.sent(),[2,o]}})})},e.prototype.post=function(t,r){return re.__awaiter(this,void 0,void 0,function(){var n,o,a;return re.__generator(this,function(s){switch(s.label){case 0:return n=this.buildFullUrl(),o={method:dt.RequestMethod.POST,body:(0,_r.serializeContent)(t)},a=t&&t.constructor&&t.constructor.name,a==="FormData"?o.headers={}:(this.setHeaderContentType(),o.headers=this._headers),[4,this.send(n,o,r)];case 1:return[2,s.sent()]}})})},e.prototype.create=function(t,r){return re.__awaiter(this,void 0,void 0,function(){return re.__generator(this,function(n){switch(n.label){case 0:return[4,this.post(t,r)];case 1:return[2,n.sent()]}})})},e.prototype.put=function(t,r){return re.__awaiter(this,void 0,void 0,function(){var n,o;return re.__generator(this,function(a){switch(a.label){case 0:return n=this.buildFullUrl(),this.setHeaderContentType(),o={method:dt.RequestMethod.PUT,body:(0,_r.serializeContent)(t)},[4,this.send(n,o,r)];case 1:return[2,a.sent()]}})})},e.prototype.patch=function(t,r){return re.__awaiter(this,void 0,void 0,function(){var n,o;return re.__generator(this,function(a){switch(a.label){case 0:return n=this.buildFullUrl(),this.setHeaderContentType(),o={method:dt.RequestMethod.PATCH,body:(0,_r.serializeContent)(t)},[4,this.send(n,o,r)];case 1:return[2,a.sent()]}})})},e.prototype.update=function(t,r){return re.__awaiter(this,void 0,void 0,function(){return re.__generator(this,function(n){switch(n.label){case 0:return[4,this.patch(t,r)];case 1:return[2,n.sent()]}})})},e.prototype.delete=function(t){return re.__awaiter(this,void 0,void 0,function(){var r,n;return re.__generator(this,function(o){switch(o.label){case 0:return r=this.buildFullUrl(),n={method:dt.RequestMethod.DELETE},[4,this.send(r,n,t)];case 1:return[2,o.sent()]}})})},e.prototype.del=function(t){return re.__awaiter(this,void 0,void 0,function(){return re.__generator(this,function(r){switch(r.label){case 0:return[4,this.delete(t)];case 1:return[2,r.sent()]}})})},e.prototype.getStream=function(t){return re.__awaiter(this,void 0,void 0,function(){var r,n;return re.__generator(this,function(o){switch(o.label){case 0:return r=this.buildFullUrl(),n={method:dt.RequestMethod.GET},this.responseType(qg.ResponseType.STREAM),[4,this.send(r,n,t)];case 1:return[2,o.sent()]}})})},e.prototype.putStream=function(t,r){return re.__awaiter(this,void 0,void 0,function(){var n,o;return re.__generator(this,function(a){switch(a.label){case 0:return n=this.buildFullUrl(),o={method:dt.RequestMethod.PUT,headers:{"Content-Type":"application/octet-stream"},body:t},[4,this.send(n,o,r)];case 1:return[2,a.sent()]}})})},e}();Mn.GraphRequest=Gg});var hi=b(Ln=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});Ln.HTTPClient=void 0;var sc=(se(),oe(ae)),Wg=function(){function e(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];if(!t||!t.length){var n=new Error;throw n.name="InvalidMiddlewareChain",n.message="Please provide a default middleware chain or custom middleware chain",n}this.setMiddleware.apply(this,t)}return i(e,"HTTPClient"),e.prototype.setMiddleware=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];t.length>1?this.parseMiddleWareArray(t):this.middleware=t[0]},e.prototype.parseMiddleWareArray=function(t){t.forEach(function(r,n){n<t.length-1&&r.setNext(t[n+1])}),this.middleware=t[0]},e.prototype.sendRequest=function(t){return sc.__awaiter(this,void 0,void 0,function(){var r;return sc.__generator(this,function(n){switch(n.label){case 0:if(typeof t.request=="string"&&t.options===void 0)throw r=new Error,r.name="InvalidRequestOptions",r.message="Unable to execute the middleware, Please provide valid options for a request",r;return[4,this.middleware.execute(t)];case 1:return n.sent(),[2,t]}})})},e}();Ln.HTTPClient=Wg});var cc=b(jn=>{"use strict";Object.defineProperty(jn,"__esModule",{value:!0});jn.HTTPClientFactory=void 0;var Kg=(se(),oe(ae)),uc=hi(),Jg=tn(),Xg=nn(),Yg=hr(),Qg=gr(),eh=ln(),th=sn(),rh=mn(),nh=i(function(){return typeof process=="object"&&typeof require=="function"},"isNodeEnvironment"),oh=function(){function e(){}return i(e,"HTTPClientFactory"),e.createWithAuthenticationProvider=function(t){var r=new Jg.AuthenticationHandler(t),n=new th.RetryHandler(new Qg.RetryHandlerOptions),o=new rh.TelemetryHandler,a=new Xg.HTTPMessageHandler;if(r.setNext(n),nh()){var s=new eh.RedirectHandler(new Yg.RedirectHandlerOptions);n.setNext(s),s.setNext(o)}else n.setNext(o);return o.setNext(a),e.createWithMiddleware(r)},e.createWithMiddleware=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new(uc.HTTPClient.bind.apply(uc.HTTPClient,Kg.__spreadArray([void 0],t,!1)))},e}();jn.HTTPClientFactory=oh});var lc=b(Fn=>{"use strict";Object.defineProperty(Fn,"__esModule",{value:!0});Fn.validatePolyFilling=void 0;var ih=i(function(){if(typeof Promise>"u"&&typeof fetch>"u"){var e=new Error("Library cannot function without Promise and fetch. So, please provide polyfill for them.");throw e.name="PolyFillNotAvailable",e}else if(typeof Promise>"u"){var e=new Error("Library cannot function without Promise. So, please provide polyfill for it.");throw e.name="PolyFillNotAvailable",e}else if(typeof fetch>"u"){var e=new Error("Library cannot function without fetch. So, please provide polyfill for it.");throw e.name="PolyFillNotAvailable",e}return!0},"validatePolyFilling");Fn.validatePolyFilling=ih});var fc=b(Bn=>{"use strict";Object.defineProperty(Bn,"__esModule",{value:!0});Bn.Client=void 0;var ah=(se(),oe(ae)),pc=Xo(),sh=di(),uh=gi(),dc=hi(),ch=cc(),lh=lc(),ph=function(){function e(t){this.config={baseUrl:pc.GRAPH_BASE_URL,debugLogging:!1,defaultVersion:pc.GRAPH_API_VERSION},(0,lh.validatePolyFilling)();for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(this.config[r]=t[r]);var n;if(t.authProvider!==void 0&&t.middleware!==void 0){var o=new Error;throw o.name="AmbiguityInInitialization",o.message="Unable to Create Client, Please provide either authentication provider for default middleware chain or custom middleware chain not both",o}else if(t.authProvider!==void 0)n=ch.HTTPClientFactory.createWithAuthenticationProvider(t.authProvider);else if(t.middleware!==void 0)n=new(dc.HTTPClient.bind.apply(dc.HTTPClient,ah.__spreadArray([void 0],[].concat(t.middleware),!1)));else{var o=new Error;throw o.name="InvalidMiddlewareChain",o.message="Unable to Create Client, Please provide either authentication provider for default middleware chain or custom middleware chain",o}this.httpClient=n}return i(e,"Client"),e.init=function(t){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=n==="authProvider"?new sh.CustomAuthenticationProvider(t[n]):t[n]);return e.initWithMiddleware(r)},e.initWithMiddleware=function(t){return new e(t)},e.prototype.api=function(t){return new uh.GraphRequest(this.httpClient,this.config,t)},e}();Bn.Client=ph});var gc=b($=>{"use strict";Object.defineProperty($,"__esModule",{value:!0});$.ResponseType=$.GraphRequest=$.GraphClientError=$.GraphError=$.CustomAuthenticationProvider=$.Client=$.PageIterator=$.Range=$.UploadResult=$.FileUpload=$.StreamUpload=$.getValidRangeSize=$.OneDriveLargeFileUploadTask=$.LargeFileUploadTask=$.ChaosHandler=$.ChaosStrategy=$.ChaosHandlerOptions=$.TelemetryHandlerOptions=$.FeatureUsageFlag=$.RedirectHandlerOptions=$.RetryHandlerOptions=$.AuthenticationHandlerOptions=$.MiddlewareFactory=$.TelemetryHandler=$.RedirectHandler=$.RetryHandler=$.HTTPMessageHandler=$.AuthenticationHandler=$.BatchResponseContent=$.BatchRequestContent=void 0;var dh=wu();Object.defineProperty($,"BatchRequestContent",{enumerable:!0,get:i(function(){return dh.BatchRequestContent},"get")});var fh=Ou();Object.defineProperty($,"BatchResponseContent",{enumerable:!0,get:i(function(){return fh.BatchResponseContent},"get")});var mh=tn();Object.defineProperty($,"AuthenticationHandler",{enumerable:!0,get:i(function(){return mh.AuthenticationHandler},"get")});var gh=nn();Object.defineProperty($,"HTTPMessageHandler",{enumerable:!0,get:i(function(){return gh.HTTPMessageHandler},"get")});var hh=sn();Object.defineProperty($,"RetryHandler",{enumerable:!0,get:i(function(){return hh.RetryHandler},"get")});var yh=ln();Object.defineProperty($,"RedirectHandler",{enumerable:!0,get:i(function(){return yh.RedirectHandler},"get")});var vh=mn();Object.defineProperty($,"TelemetryHandler",{enumerable:!0,get:i(function(){return vh.TelemetryHandler},"get")});var _h=Zu();Object.defineProperty($,"MiddlewareFactory",{enumerable:!0,get:i(function(){return _h.MiddlewareFactory},"get")});var Ph=Yo();Object.defineProperty($,"AuthenticationHandlerOptions",{enumerable:!0,get:i(function(){return Ph.AuthenticationHandlerOptions},"get")});var xh=gr();Object.defineProperty($,"RetryHandlerOptions",{enumerable:!0,get:i(function(){return xh.RetryHandlerOptions},"get")});var bh=hr();Object.defineProperty($,"RedirectHandlerOptions",{enumerable:!0,get:i(function(){return bh.RedirectHandlerOptions},"get")});var mc=Rt();Object.defineProperty($,"FeatureUsageFlag",{enumerable:!0,get:i(function(){return mc.FeatureUsageFlag},"get")});Object.defineProperty($,"TelemetryHandlerOptions",{enumerable:!0,get:i(function(){return mc.TelemetryHandlerOptions},"get")});var Th=ri();Object.defineProperty($,"ChaosHandlerOptions",{enumerable:!0,get:i(function(){return Th.ChaosHandlerOptions},"get")});var Eh=yn();Object.defineProperty($,"ChaosStrategy",{enumerable:!0,get:i(function(){return Eh.ChaosStrategy},"get")});var Ih=Ju();Object.defineProperty($,"ChaosHandler",{enumerable:!0,get:i(function(){return Ih.ChaosHandler},"get")});var Sh=ci();Object.defineProperty($,"LargeFileUploadTask",{enumerable:!0,get:i(function(){return Sh.LargeFileUploadTask},"get")});var Ah=ec();Object.defineProperty($,"OneDriveLargeFileUploadTask",{enumerable:!0,get:i(function(){return Ah.OneDriveLargeFileUploadTask},"get")});var $h=pi();Object.defineProperty($,"getValidRangeSize",{enumerable:!0,get:i(function(){return $h.getValidRangeSize},"get")});var wh=rc();Object.defineProperty($,"StreamUpload",{enumerable:!0,get:i(function(){return wh.StreamUpload},"get")});var Oh=li();Object.defineProperty($,"FileUpload",{enumerable:!0,get:i(function(){return Oh.FileUpload},"get")});var zh=si();Object.defineProperty($,"UploadResult",{enumerable:!0,get:i(function(){return zh.UploadResult},"get")});var Rh=ai();Object.defineProperty($,"Range",{enumerable:!0,get:i(function(){return Rh.Range},"get")});var kh=nc();Object.defineProperty($,"PageIterator",{enumerable:!0,get:i(function(){return kh.PageIterator},"get")});var Dh=fc();Object.defineProperty($,"Client",{enumerable:!0,get:i(function(){return Dh.Client},"get")});var Ch=di();Object.defineProperty($,"CustomAuthenticationProvider",{enumerable:!0,get:i(function(){return Ch.CustomAuthenticationProvider},"get")});var Nh=fi();Object.defineProperty($,"GraphError",{enumerable:!0,get:i(function(){return Nh.GraphError},"get")});var Uh=qe();Object.defineProperty($,"GraphClientError",{enumerable:!0,get:i(function(){return Uh.GraphClientError},"get")});var Mh=gi();Object.defineProperty($,"GraphRequest",{enumerable:!0,get:i(function(){return Mh.GraphRequest},"get")});var Lh=yr();Object.defineProperty($,"ResponseType",{enumerable:!0,get:i(function(){return Lh.ResponseType},"get")})});var Dc=b((YN,kc)=>{var Rc=require("stream").Stream,Gh=require("util");kc.exports=De;function De(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}i(De,"DelayedStream");Gh.inherits(De,Rc);De.create=function(e,t){var r=new this;t=t||{};for(var n in t)r[n]=t[n];r.source=e;var o=e.emit;return e.emit=function(){return r._handleEmit(arguments),o.apply(e,arguments)},e.on("error",function(){}),r.pauseStream&&e.pause(),r};Object.defineProperty(De.prototype,"readable",{configurable:!0,enumerable:!0,get:i(function(){return this.source.readable},"get")});De.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};De.prototype.resume=function(){this._released||this.release(),this.source.resume()};De.prototype.pause=function(){this.source.pause()};De.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};De.prototype.pipe=function(){var e=Rc.prototype.pipe.apply(this,arguments);return this.resume(),e};De.prototype._handleEmit=function(e){if(this._released){this.emit.apply(this,e);return}e[0]==="data"&&(this.dataSize+=e[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(e)};De.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}}});var Mc=b((e0,Uc)=>{var Wh=require("util"),Nc=require("stream").Stream,Cc=Dc();Uc.exports=de;function de(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}i(de,"CombinedStream");Wh.inherits(de,Nc);de.create=function(e){var t=new this;e=e||{};for(var r in e)t[r]=e[r];return t};de.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};de.prototype.append=function(e){var t=de.isStreamLike(e);if(t){if(!(e instanceof Cc)){var r=Cc.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=r}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this};de.prototype.pipe=function(e,t){return Nc.prototype.pipe.call(this,e,t),this.resume(),e};de.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};de.prototype._realGetNext=function(){var e=this._streams.shift();if(typeof e>"u"){this.end();return}if(typeof e!="function"){this._pipeNext(e);return}var t=e;t(function(r){var n=de.isStreamLike(r);n&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};de.prototype._pipeNext=function(e){this._currentStream=e;var t=de.isStreamLike(e);if(t){e.on("end",this._getNext.bind(this)),e.pipe(this,{end:!1});return}var r=e;this.write(r),this._getNext()};de.prototype._handleErrors=function(e){var t=this;e.on("error",function(r){t._emitError(r)})};de.prototype.write=function(e){this.emit("data",e)};de.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};de.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};de.prototype.end=function(){this._reset(),this.emit("end")};de.prototype.destroy=function(){this._reset(),this.emit("close")};de.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};de.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};de.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach(function(t){t.dataSize&&(e.dataSize+=t.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};de.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var jc=b((r0,Lc)=>{"use strict";Lc.exports={"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dat"]},"application/msword":{source:"iana",extensions:["doc"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",extensions:["docx"]},"application/vnd.ms-excel":{source:"iana",extensions:["xls"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",extensions:["xlsx"]},"application/vnd.ms-powerpoint":{source:"iana",extensions:["ppt"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",extensions:["pptx"]},"application/csv":{compressible:!0,extensions:["csv"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"text/plain":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["txt","text","log"]},"text/html":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["html","htm"]},"text/css":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["css"]},"text/csv":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["csv"]},"text/markdown":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["md","markdown"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/webp":{source:"apache",compressible:!1,extensions:["webp"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tiff","tif"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/heic":{source:"iana",compressible:!1,extensions:["heic"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mp3","mpga"]},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/ogg":{source:"iana",compressible:!1,extensions:["ogg","oga"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","m4v"]},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg"]},"video/webm":{source:"iana",compressible:!1,extensions:["webm"]},"video/quicktime":{source:"iana",compressible:!1,extensions:["mov","qt"]},"video/x-msvideo":{source:"iana",compressible:!1,extensions:["avi"]},"font/woff":{source:"iana",compressible:!1,extensions:["woff"]},"font/woff2":{source:"iana",compressible:!1,extensions:["woff2"]},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"multipart/form-data":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/ics":{compressible:!0,extensions:["ics"]},"text/calendar":{source:"iana",compressible:!0,extensions:["ics","ifb"]},"application/x-ndjson":{compressible:!0,extensions:["ndjson"]}}});var Vc=b(Se=>{"use strict";var Kn=jc(),Kh=require("path").extname,Fc=/^\s*([^;\s]*)(?:;|\s|$)/,Jh=/^text\//i;Se.charset=Bc;Se.charsets={lookup:Bc};Se.contentType=Xh;Se.extension=Yh;Se.extensions=Object.create(null);Se.lookup=Qh;Se.types=Object.create(null);ey(Se.extensions,Se.types);function Bc(e){if(!e||typeof e!="string")return!1;var t=Fc.exec(e),r=t&&Kn[t[1].toLowerCase()];return r&&r.charset?r.charset:t&&Jh.test(t[1])?"UTF-8":!1}i(Bc,"charset");function Xh(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?Se.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var r=Se.charset(t);r&&(t+="; charset="+r.toLowerCase())}return t}i(Xh,"contentType");function Yh(e){if(!e||typeof e!="string")return!1;var t=Fc.exec(e),r=t&&Se.extensions[t[1].toLowerCase()];return!r||!r.length?!1:r[0]}i(Yh,"extension");function Qh(e){if(!e||typeof e!="string")return!1;var t=Kh("x."+e).toLowerCase().substr(1);return t&&Se.types[t]||!1}i(Qh,"lookup");function ey(e,t){var r=["nginx","apache",void 0,"iana"];Object.keys(Kn).forEach(i(function(o){var a=Kn[o],s=a.extensions;if(!(!s||!s.length)){e[o]=s;for(var u=0;u<s.length;u++){var p=s[u];if(t[p]){var d=r.indexOf(Kn[t[p]].source),g=r.indexOf(a.source);if(t[p]!=="application/octet-stream"&&(d>g||d===g&&t[p].substr(0,12)==="application/"))continue}t[p]=o}}},"forEachMimeType"))}i(ey,"populateMaps")});var Zc=b((i0,Hc)=>{Hc.exports=ty;function ty(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}i(ty,"defer")});var Pi=b((s0,Gc)=>{var qc=Zc();Gc.exports=ry;function ry(e){var t=!1;return qc(function(){t=!0}),i(function(n,o){t?e(n,o):qc(i(function(){e(n,o)},"nextTick_callback"))},"async_callback")}i(ry,"async")});var xi=b((c0,Wc)=>{Wc.exports=ny;function ny(e){Object.keys(e.jobs).forEach(oy.bind(e)),e.jobs={}}i(ny,"abort");function oy(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}i(oy,"clean")});var bi=b((p0,Jc)=>{var Kc=Pi(),iy=xi();Jc.exports=ay;function ay(e,t,r,n){var o=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[o]=sy(t,o,e[o],function(a,s){o in r.jobs&&(delete r.jobs[o],a?iy(r):r.results[o]=s,n(a,r.results))})}i(ay,"iterate");function sy(e,t,r,n){var o;return e.length==2?o=e(r,Kc(n)):o=e(r,t,Kc(n)),o}i(sy,"runJob")});var Ti=b((f0,Xc)=>{Xc.exports=uy;function uy(e,t){var r=!Array.isArray(e),n={index:0,keyedList:r||t?Object.keys(e):null,jobs:{},results:r?{}:[],size:r?Object.keys(e).length:e.length};return t&&n.keyedList.sort(r?t:function(o,a){return t(e[o],e[a])}),n}i(uy,"state")});var Ei=b((g0,Yc)=>{var cy=xi(),ly=Pi();Yc.exports=py;function py(e){Object.keys(this.jobs).length&&(this.index=this.size,cy(this),ly(e)(null,this.results))}i(py,"terminator")});var el=b((y0,Qc)=>{var dy=bi(),fy=Ti(),my=Ei();Qc.exports=gy;function gy(e,t,r){for(var n=fy(e);n.index<(n.keyedList||e).length;)dy(e,t,n,function(o,a){if(o){r(o,a);return}if(Object.keys(n.jobs).length===0){r(null,n.results);return}}),n.index++;return my.bind(n,r)}i(gy,"parallel")});var Ii=b((_0,Jn)=>{var tl=bi(),hy=Ti(),yy=Ei();Jn.exports=vy;Jn.exports.ascending=rl;Jn.exports.descending=_y;function vy(e,t,r,n){var o=hy(e,r);return tl(e,t,o,i(function a(s,u){if(s){n(s,u);return}if(o.index++,o.index<(o.keyedList||e).length){tl(e,t,o,a);return}n(null,o.results)},"iteratorHandler")),yy.bind(o,n)}i(vy,"serialOrdered");function rl(e,t){return e<t?-1:e>t?1:0}i(rl,"ascending");function _y(e,t){return-1*rl(e,t)}i(_y,"descending")});var ol=b((x0,nl)=>{var Py=Ii();nl.exports=xy;function xy(e,t,r){return Py(e,t,null,r)}i(xy,"serial")});var al=b((T0,il)=>{il.exports={parallel:el(),serial:ol(),serialOrdered:Ii()}});var Si=b((E0,sl)=>{"use strict";sl.exports=Object});var cl=b((I0,ul)=>{"use strict";ul.exports=Error});var pl=b((S0,ll)=>{"use strict";ll.exports=EvalError});var fl=b((A0,dl)=>{"use strict";dl.exports=RangeError});var gl=b(($0,ml)=>{"use strict";ml.exports=ReferenceError});var yl=b((w0,hl)=>{"use strict";hl.exports=SyntaxError});var Xn=b((O0,vl)=>{"use strict";vl.exports=TypeError});var Pl=b((z0,_l)=>{"use strict";_l.exports=URIError});var bl=b((R0,xl)=>{"use strict";xl.exports=Math.abs});var El=b((k0,Tl)=>{"use strict";Tl.exports=Math.floor});var Sl=b((D0,Il)=>{"use strict";Il.exports=Math.max});var $l=b((C0,Al)=>{"use strict";Al.exports=Math.min});var Ol=b((N0,wl)=>{"use strict";wl.exports=Math.pow});var Rl=b((U0,zl)=>{"use strict";zl.exports=Math.round});var Dl=b((M0,kl)=>{"use strict";kl.exports=Number.isNaN||i(function(t){return t!==t},"isNaN")});var Nl=b((j0,Cl)=>{"use strict";var by=Dl();Cl.exports=i(function(t){return by(t)||t===0?t:t<0?-1:1},"sign")});var Ml=b((B0,Ul)=>{"use strict";Ul.exports=Object.getOwnPropertyDescriptor});var Ai=b((V0,Ll)=>{"use strict";var Yn=Ml();if(Yn)try{Yn([],"length")}catch{Yn=null}Ll.exports=Yn});var Fl=b((H0,jl)=>{"use strict";var Qn=Object.defineProperty||!1;if(Qn)try{Qn({},"a",{value:1})}catch{Qn=!1}jl.exports=Qn});var $i=b((Z0,Bl)=>{"use strict";Bl.exports=i(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var o=42;t[r]=o;for(var a in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var s=Object.getOwnPropertySymbols(t);if(s.length!==1||s[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var u=Object.getOwnPropertyDescriptor(t,r);if(u.value!==o||u.enumerable!==!0)return!1}return!0},"hasSymbols")});var Zl=b((G0,Hl)=>{"use strict";var Vl=typeof Symbol<"u"&&Symbol,Ty=$i();Hl.exports=i(function(){return typeof Vl!="function"||typeof Symbol!="function"||typeof Vl("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Ty()},"hasNativeSymbols")});var wi=b((K0,ql)=>{"use strict";ql.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var Oi=b((J0,Gl)=>{"use strict";var Ey=Si();Gl.exports=Ey.getPrototypeOf||null});var Jl=b((X0,Kl)=>{"use strict";var Iy="Function.prototype.bind called on incompatible ",Sy=Object.prototype.toString,Ay=Math.max,$y="[object Function]",Wl=i(function(t,r){for(var n=[],o=0;o<t.length;o+=1)n[o]=t[o];for(var a=0;a<r.length;a+=1)n[a+t.length]=r[a];return n},"concatty"),wy=i(function(t,r){for(var n=[],o=r||0,a=0;o<t.length;o+=1,a+=1)n[a]=t[o];return n},"slicy"),Oy=i(function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r},"joiny");Kl.exports=i(function(t){var r=this;if(typeof r!="function"||Sy.apply(r)!==$y)throw new TypeError(Iy+r);for(var n=wy(arguments,1),o,a=i(function(){if(this instanceof o){var g=r.apply(this,Wl(n,arguments));return Object(g)===g?g:this}return r.apply(t,Wl(n,arguments))},"binder"),s=Ay(0,r.length-n.length),u=[],p=0;p<s;p++)u[p]="$"+p;if(o=Function("binder","return function ("+Oy(u,",")+"){ return binder.apply(this,arguments); }")(a),r.prototype){var d=i(function(){},"Empty");d.prototype=r.prototype,o.prototype=new d,d.prototype=null}return o},"bind")});var Mt=b((Q0,Xl)=>{"use strict";var zy=Jl();Xl.exports=Function.prototype.bind||zy});var eo=b((eU,Yl)=>{"use strict";Yl.exports=Function.prototype.call});var zi=b((tU,Ql)=>{"use strict";Ql.exports=Function.prototype.apply});var tp=b((rU,ep)=>{"use strict";ep.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var np=b((nU,rp)=>{"use strict";var Ry=Mt(),ky=zi(),Dy=eo(),Cy=tp();rp.exports=Cy||Ry.call(Dy,ky)});var ip=b((oU,op)=>{"use strict";var Ny=Mt(),Uy=Xn(),My=eo(),Ly=np();op.exports=i(function(t){if(t.length<1||typeof t[0]!="function")throw new Uy("a function is required");return Ly(Ny,My,t)},"callBindBasic")});var pp=b((aU,lp)=>{"use strict";var jy=ip(),ap=Ai(),up;try{up=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var Ri=!!up&&ap&&ap(Object.prototype,"__proto__"),cp=Object,sp=cp.getPrototypeOf;lp.exports=Ri&&typeof Ri.get=="function"?jy([Ri.get]):typeof sp=="function"?i(function(t){return sp(t==null?t:cp(t))},"getDunder"):!1});var hp=b((uU,gp)=>{"use strict";var dp=wi(),fp=Oi(),mp=pp();gp.exports=dp?i(function(t){return dp(t)},"getProto"):fp?i(function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return fp(t)},"getProto"):mp?i(function(t){return mp(t)},"getProto"):null});var ki=b((lU,yp)=>{"use strict";var Fy=Function.prototype.call,By=Object.prototype.hasOwnProperty,Vy=Mt();yp.exports=Vy.call(Fy,By)});var Ep=b((pU,Tp)=>{"use strict";var J,Hy=Si(),Zy=cl(),qy=pl(),Gy=fl(),Wy=gl(),Bt=yl(),Ft=Xn(),Ky=Pl(),Jy=bl(),Xy=El(),Yy=Sl(),Qy=$l(),ev=Ol(),tv=Rl(),rv=Nl(),xp=Function,Di=i(function(e){try{return xp('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),Pr=Ai(),nv=Fl(),Ci=i(function(){throw new Ft},"throwTypeError"),ov=Pr?function(){try{return arguments.callee,Ci}catch{try{return Pr(arguments,"callee").get}catch{return Ci}}}():Ci,Lt=Zl()(),ve=hp(),iv=Oi(),av=wi(),bp=zi(),xr=eo(),jt={},sv=typeof Uint8Array>"u"||!ve?J:ve(Uint8Array),ft={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?J:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?J:ArrayBuffer,"%ArrayIteratorPrototype%":Lt&&ve?ve([][Symbol.iterator]()):J,"%AsyncFromSyncIteratorPrototype%":J,"%AsyncFunction%":jt,"%AsyncGenerator%":jt,"%AsyncGeneratorFunction%":jt,"%AsyncIteratorPrototype%":jt,"%Atomics%":typeof Atomics>"u"?J:Atomics,"%BigInt%":typeof BigInt>"u"?J:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?J:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?J:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?J:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Zy,"%eval%":eval,"%EvalError%":qy,"%Float16Array%":typeof Float16Array>"u"?J:Float16Array,"%Float32Array%":typeof Float32Array>"u"?J:Float32Array,"%Float64Array%":typeof Float64Array>"u"?J:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?J:FinalizationRegistry,"%Function%":xp,"%GeneratorFunction%":jt,"%Int8Array%":typeof Int8Array>"u"?J:Int8Array,"%Int16Array%":typeof Int16Array>"u"?J:Int16Array,"%Int32Array%":typeof Int32Array>"u"?J:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":Lt&&ve?ve(ve([][Symbol.iterator]())):J,"%JSON%":typeof JSON=="object"?JSON:J,"%Map%":typeof Map>"u"?J:Map,"%MapIteratorPrototype%":typeof Map>"u"||!Lt||!ve?J:ve(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Hy,"%Object.getOwnPropertyDescriptor%":Pr,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?J:Promise,"%Proxy%":typeof Proxy>"u"?J:Proxy,"%RangeError%":Gy,"%ReferenceError%":Wy,"%Reflect%":typeof Reflect>"u"?J:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?J:Set,"%SetIteratorPrototype%":typeof Set>"u"||!Lt||!ve?J:ve(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?J:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":Lt&&ve?ve(""[Symbol.iterator]()):J,"%Symbol%":Lt?Symbol:J,"%SyntaxError%":Bt,"%ThrowTypeError%":ov,"%TypedArray%":sv,"%TypeError%":Ft,"%Uint8Array%":typeof Uint8Array>"u"?J:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?J:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?J:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?J:Uint32Array,"%URIError%":Ky,"%WeakMap%":typeof WeakMap>"u"?J:WeakMap,"%WeakRef%":typeof WeakRef>"u"?J:WeakRef,"%WeakSet%":typeof WeakSet>"u"?J:WeakSet,"%Function.prototype.call%":xr,"%Function.prototype.apply%":bp,"%Object.defineProperty%":nv,"%Object.getPrototypeOf%":iv,"%Math.abs%":Jy,"%Math.floor%":Xy,"%Math.max%":Yy,"%Math.min%":Qy,"%Math.pow%":ev,"%Math.round%":tv,"%Math.sign%":rv,"%Reflect.getPrototypeOf%":av};if(ve)try{null.error}catch(e){vp=ve(ve(e)),ft["%Error.prototype%"]=vp}var vp,uv=i(function e(t){var r;if(t==="%AsyncFunction%")r=Di("async function () {}");else if(t==="%GeneratorFunction%")r=Di("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=Di("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&ve&&(r=ve(o.prototype))}return ft[t]=r,r},"doEval"),_p={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},br=Mt(),to=ki(),cv=br.call(xr,Array.prototype.concat),lv=br.call(bp,Array.prototype.splice),Pp=br.call(xr,String.prototype.replace),ro=br.call(xr,String.prototype.slice),pv=br.call(xr,RegExp.prototype.exec),dv=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,fv=/\\(\\)?/g,mv=i(function(t){var r=ro(t,0,1),n=ro(t,-1);if(r==="%"&&n!=="%")throw new Bt("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Bt("invalid intrinsic syntax, expected opening `%`");var o=[];return Pp(t,dv,function(a,s,u,p){o[o.length]=u?Pp(p,fv,"$1"):s||a}),o},"stringToPath"),gv=i(function(t,r){var n=t,o;if(to(_p,n)&&(o=_p[n],n="%"+o[0]+"%"),to(ft,n)){var a=ft[n];if(a===jt&&(a=uv(n)),typeof a>"u"&&!r)throw new Ft("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:a}}throw new Bt("intrinsic "+t+" does not exist!")},"getBaseIntrinsic");Tp.exports=i(function(t,r){if(typeof t!="string"||t.length===0)throw new Ft("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Ft('"allowMissing" argument must be a boolean');if(pv(/^%?[^%]*%?$/,t)===null)throw new Bt("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=mv(t),o=n.length>0?n[0]:"",a=gv("%"+o+"%",r),s=a.name,u=a.value,p=!1,d=a.alias;d&&(o=d[0],lv(n,cv([0,1],d)));for(var g=1,x=!0;g<n.length;g+=1){var v=n[g],l=ro(v,0,1),f=ro(v,-1);if((l==='"'||l==="'"||l==="`"||f==='"'||f==="'"||f==="`")&&l!==f)throw new Bt("property names with quotes must have matching quotes");if((v==="constructor"||!x)&&(p=!0),o+="."+v,s="%"+o+"%",to(ft,s))u=ft[s];else if(u!=null){if(!(v in u)){if(!r)throw new Ft("base intrinsic for "+t+" exists, but the property is not available.");return}if(Pr&&g+1>=n.length){var y=Pr(u,v);x=!!y,x&&"get"in y&&!("originalValue"in y.get)?u=y.get:u=u[v]}else x=to(u,v),u=u[v];x&&!p&&(ft[s]=u)}}return u},"GetIntrinsic")});var Sp=b((fU,Ip)=>{"use strict";var hv=$i();Ip.exports=i(function(){return hv()&&!!Symbol.toStringTag},"hasToStringTagShams")});var wp=b((gU,$p)=>{"use strict";var yv=Ep(),Ap=yv("%Object.defineProperty%",!0),vv=Sp()(),_v=ki(),Pv=Xn(),no=vv?Symbol.toStringTag:null;$p.exports=i(function(t,r){var n=arguments.length>2&&!!arguments[2]&&arguments[2].force,o=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof n<"u"&&typeof n!="boolean"||typeof o<"u"&&typeof o!="boolean")throw new Pv("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");no&&(n||!_v(t,no))&&(Ap?Ap(t,no,{configurable:!o,enumerable:!1,value:r,writable:!1}):t[no]=r)},"setToStringTag")});var zp=b((yU,Op)=>{"use strict";var xv=Function.prototype.call,bv=Object.prototype.hasOwnProperty,Tv=Mt();Op.exports=Tv.call(xv,bv)});var kp=b((vU,Rp)=>{"use strict";Rp.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var Np=b((_U,Cp)=>{"use strict";var Li=Mc(),Ev=require("util"),Ni=require("path"),Iv=require("http"),Sv=require("https"),Av=require("url").parse,$v=require("fs"),wv=require("stream").Stream,Ov=require("crypto"),Ui=Vc(),zv=al(),Rv=wp(),ot=zp(),Mi=kp();function Dp(e){return String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}i(Dp,"escapeHeaderParam");function X(e){if(!(this instanceof X))return new X(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],Li.call(this),e=e||{};for(var t in e)this[t]=e[t]}i(X,"FormData");Ev.inherits(X,Li);X.LINE_BREAK=`\r
5
- `;X.DEFAULT_CONTENT_TYPE="application/octet-stream";X.prototype.append=function(e,t,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=Li.prototype.append.bind(this);if((typeof t=="number"||t==null)&&(t=String(t)),Array.isArray(t)){this._error(new Error("Arrays are not supported."));return}var o=this._multiPartHeader(e,t,r),a=this._multiPartFooter();n(o),n(t),n(a),this._trackLength(o,t,r)};X.prototype._trackLength=function(e,t,r){var n=0;r.knownLength!=null?n+=Number(r.knownLength):Buffer.isBuffer(t)?n=t.length:typeof t=="string"&&(n=Buffer.byteLength(t)),this._valueLength+=n,this._overheadLength+=Buffer.byteLength(e)+X.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&ot(t,"httpVersion"))&&!(t instanceof wv))&&(r.knownLength||this._valuesToMeasure.push(t))};X.prototype._lengthRetriever=function(e,t){ot(e,"fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):$v.stat(e.path,function(r,n){if(r){t(r);return}var o=n.size-(e.start?e.start:0);t(null,o)}):ot(e,"httpVersion")?t(null,Number(e.headers["content-length"])):ot(e,"httpModule")?(e.on("response",function(r){e.pause(),t(null,Number(r.headers["content-length"]))}),e.resume()):t("Unknown stream")};X.prototype._multiPartHeader=function(e,t,r){if(typeof r.header=="string")return r.header;var n=this._getContentDisposition(t,r),o=this._getContentType(t,r),a="",s={"Content-Disposition":["form-data",'name="'+Dp(e)+'"'].concat(n||[]),"Content-Type":[].concat(o||[])};typeof r.header=="object"&&Mi(s,r.header);var u;for(var p in s)if(ot(s,p)){if(u=s[p],u==null)continue;Array.isArray(u)||(u=[u]),u.length&&(a+=p+": "+u.join("; ")+X.LINE_BREAK)}return"--"+this.getBoundary()+X.LINE_BREAK+a+X.LINE_BREAK};X.prototype._getContentDisposition=function(e,t){var r;if(typeof t.filepath=="string"?r=Ni.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?r=Ni.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&ot(e,"httpVersion")&&(r=Ni.basename(e.client._httpMessage.path||"")),r)return'filename="'+Dp(r)+'"'};X.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e&&e.name&&(r=Ui.lookup(e.name)),!r&&e&&e.path&&(r=Ui.lookup(e.path)),!r&&e&&e.readable&&ot(e,"httpVersion")&&(r=e.headers["content-type"]),!r&&(t.filepath||t.filename)&&(r=Ui.lookup(t.filepath||t.filename)),!r&&e&&typeof e=="object"&&(r=X.DEFAULT_CONTENT_TYPE),r};X.prototype._multiPartFooter=function(){return function(e){var t=X.LINE_BREAK,r=this._streams.length===0;r&&(t+=this._lastBoundary()),e(t)}.bind(this)};X.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+X.LINE_BREAK};X.prototype.getHeaders=function(e){var t,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)ot(e,t)&&(r[t.toLowerCase()]=e[t]);return r};X.prototype.setBoundary=function(e){if(typeof e!="string")throw new TypeError("FormData boundary must be a string");this._boundary=e};X.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};X.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),r=0,n=this._streams.length;r<n;r++)typeof this._streams[r]!="function"&&(Buffer.isBuffer(this._streams[r])?e=Buffer.concat([e,this._streams[r]]):e=Buffer.concat([e,Buffer.from(this._streams[r])]),(typeof this._streams[r]!="string"||this._streams[r].substring(2,t.length+2)!==t)&&(e=Buffer.concat([e,Buffer.from(X.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};X.prototype._generateBoundary=function(){this._boundary="--------------------------"+Ov.randomBytes(12).toString("hex")};X.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),e};X.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};X.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;if(this._streams.length&&(t+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(e.bind(this,null,t));return}zv.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,n){if(r){e(r);return}n.forEach(function(o){t+=o}),e(null,t)})};X.prototype.submit=function(e,t){var r,n,o={method:"post"};return typeof e=="string"?(e=Av(e),n=Mi({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},o)):(n=Mi(e,o),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(e.headers),n.protocol==="https:"?r=Sv.request(n):r=Iv.request(n),this.getLength(function(a,s){if(a&&a!=="Unknown stream"){this._error(a);return}if(s&&r.setHeader("Content-Length",s),this.pipe(r),t){var u,p=i(function(d,g){return r.removeListener("error",p),r.removeListener("response",u),t.call(this,d,g)},"callback");u=p.bind(this,null),r.on("error",p),r.on("response",u)}}.bind(this)),r};X.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};X.prototype.toString=function(){return"[object FormData]"};Rv(X.prototype,"FormData");Cp.exports=X});var oo=b((ji,Fi)=>{(function(e,t){typeof ji=="object"&&typeof Fi<"u"?Fi.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(ji,function(){"use strict";var e=1e3,t=6e4,r=36e5,n="millisecond",o="second",a="minute",s="hour",u="day",p="week",d="month",g="quarter",x="year",v="date",l="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,h={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:i(function(j){var S=["th","st","nd","rd"],E=j%100;return"["+j+(S[(E-20)%10]||S[E]||S[0])+"]"},"ordinal")},_=i(function(j,S,E){var w=String(j);return!w||w.length>=S?j:""+Array(S+1-w.length).join(E)+j},"m"),T={s:_,z:i(function(j){var S=-j.utcOffset(),E=Math.abs(S),w=Math.floor(E/60),A=E%60;return(S<=0?"+":"-")+_(w,2,"0")+":"+_(A,2,"0")},"z"),m:i(function j(S,E){if(S.date()<E.date())return-j(E,S);var w=12*(E.year()-S.year())+(E.month()-S.month()),A=S.clone().add(w,d),H=E-A<0,Z=S.clone().add(w+(H?-1:1),d);return+(-(w+(E-A)/(H?A-Z:Z-A))||0)},"t"),a:i(function(j){return j<0?Math.ceil(j)||0:Math.floor(j)},"a"),p:i(function(j){return{M:d,y:x,w:p,d:u,D:v,h:s,m:a,s:o,ms:n,Q:g}[j]||String(j||"").toLowerCase().replace(/s$/,"")},"p"),u:i(function(j){return j===void 0},"u")},V="en",fe={};fe[V]=h;var xe=i(function(j){return j instanceof mt},"p"),Ce=i(function j(S,E,w){var A;if(!S)return V;if(typeof S=="string"){var H=S.toLowerCase();fe[H]&&(A=H),E&&(fe[H]=E,A=H);var Z=S.split("-");if(!A&&Z.length>1)return j(Z[0])}else{var te=S.name;fe[te]=S,A=te}return!w&&A&&(V=A),A||!w&&V},"t"),ee=i(function(j,S){if(xe(j))return j.clone();var E=typeof S=="object"?S:{};return E.date=j,E.args=arguments,new mt(E)},"w"),W=T;W.l=Ce,W.i=xe,W.w=function(j,S){return ee(j,{locale:S.$L,utc:S.$u,x:S.$x,$offset:S.$offset})};var mt=function(){function j(E){this.$L=Ce(E.locale,null,!0),this.parse(E)}i(j,"M");var S=j.prototype;return S.parse=function(E){this.$d=function(w){var A=w.date,H=w.utc;if(A===null)return new Date(NaN);if(W.u(A))return new Date;if(A instanceof Date)return new Date(A);if(typeof A=="string"&&!/Z$/i.test(A)){var Z=A.match(f);if(Z){var te=Z[2]-1||0,me=(Z[7]||"0").substring(0,3);return H?new Date(Date.UTC(Z[1],te,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,me)):new Date(Z[1],te,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,me)}}return new Date(A)}(E),this.$x=E.x||{},this.init()},S.init=function(){var E=this.$d;this.$y=E.getFullYear(),this.$M=E.getMonth(),this.$D=E.getDate(),this.$W=E.getDay(),this.$H=E.getHours(),this.$m=E.getMinutes(),this.$s=E.getSeconds(),this.$ms=E.getMilliseconds()},S.$utils=function(){return W},S.isValid=function(){return this.$d.toString()!==l},S.isSame=function(E,w){var A=ee(E);return this.startOf(w)<=A&&A<=this.endOf(w)},S.isAfter=function(E,w){return ee(E)<this.startOf(w)},S.isBefore=function(E,w){return this.endOf(w)<ee(E)},S.$g=function(E,w,A){return W.u(E)?this[w]:this.set(A,E)},S.unix=function(){return Math.floor(this.valueOf()/1e3)},S.valueOf=function(){return this.$d.getTime()},S.startOf=function(E,w){var A=this,H=!!W.u(w)||w,Z=W.p(E),te=i(function(st,Ee){var We=W.w(A.$u?Date.UTC(A.$y,Ee,st):new Date(A.$y,Ee,st),A);return H?We:We.endOf(u)},"l"),me=i(function(st,Ee){return W.w(A.toDate()[st].apply(A.toDate("s"),(H?[0,0,0,0]:[23,59,59,999]).slice(Ee)),A)},"$"),ye=this.$W,Pe=this.$M,we=this.$D,gt="set"+(this.$u?"UTC":"");switch(Z){case x:return H?te(1,0):te(31,11);case d:return H?te(1,Pe):te(0,Pe+1);case p:var at=this.$locale().weekStart||0,Vt=(ye<at?ye+7:ye)-at;return te(H?we-Vt:we+(6-Vt),Pe);case u:case v:return me(gt+"Hours",0);case s:return me(gt+"Minutes",1);case a:return me(gt+"Seconds",2);case o:return me(gt+"Milliseconds",3);default:return this.clone()}},S.endOf=function(E){return this.startOf(E,!1)},S.$set=function(E,w){var A,H=W.p(E),Z="set"+(this.$u?"UTC":""),te=(A={},A[u]=Z+"Date",A[v]=Z+"Date",A[d]=Z+"Month",A[x]=Z+"FullYear",A[s]=Z+"Hours",A[a]=Z+"Minutes",A[o]=Z+"Seconds",A[n]=Z+"Milliseconds",A)[H],me=H===u?this.$D+(w-this.$W):w;if(H===d||H===x){var ye=this.clone().set(v,1);ye.$d[te](me),ye.init(),this.$d=ye.set(v,Math.min(this.$D,ye.daysInMonth())).$d}else te&&this.$d[te](me);return this.init(),this},S.set=function(E,w){return this.clone().$set(E,w)},S.get=function(E){return this[W.p(E)]()},S.add=function(E,w){var A,H=this;E=Number(E);var Z=W.p(w),te=i(function(Pe){var we=ee(H);return W.w(we.date(we.date()+Math.round(Pe*E)),H)},"y");if(Z===d)return this.set(d,this.$M+E);if(Z===x)return this.set(x,this.$y+E);if(Z===u)return te(1);if(Z===p)return te(7);var me=(A={},A[a]=t,A[s]=r,A[o]=e,A)[Z]||1,ye=this.$d.getTime()+E*me;return W.w(ye,this)},S.subtract=function(E,w){return this.add(-1*E,w)},S.format=function(E){var w=this,A=this.$locale();if(!this.isValid())return A.invalidDate||l;var H=E||"YYYY-MM-DDTHH:mm:ssZ",Z=W.z(this),te=this.$H,me=this.$m,ye=this.$M,Pe=A.weekdays,we=A.months,gt=A.meridiem,at=i(function(Ee,We,Ht,Tr){return Ee&&(Ee[We]||Ee(w,H))||Ht[We].slice(0,Tr)},"h"),Vt=i(function(Ee){return W.s(te%12||12,Ee,"0")},"d"),st=gt||function(Ee,We,Ht){var Tr=Ee<12?"AM":"PM";return Ht?Tr.toLowerCase():Tr};return H.replace(y,function(Ee,We){return We||function(Ht){switch(Ht){case"YY":return String(w.$y).slice(-2);case"YYYY":return W.s(w.$y,4,"0");case"M":return ye+1;case"MM":return W.s(ye+1,2,"0");case"MMM":return at(A.monthsShort,ye,we,3);case"MMMM":return at(we,ye);case"D":return w.$D;case"DD":return W.s(w.$D,2,"0");case"d":return String(w.$W);case"dd":return at(A.weekdaysMin,w.$W,Pe,2);case"ddd":return at(A.weekdaysShort,w.$W,Pe,3);case"dddd":return Pe[w.$W];case"H":return String(te);case"HH":return W.s(te,2,"0");case"h":return Vt(1);case"hh":return Vt(2);case"a":return st(te,me,!0);case"A":return st(te,me,!1);case"m":return String(me);case"mm":return W.s(me,2,"0");case"s":return String(w.$s);case"ss":return W.s(w.$s,2,"0");case"SSS":return W.s(w.$ms,3,"0");case"Z":return Z}return null}(Ee)||Z.replace(":","")})},S.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},S.diff=function(E,w,A){var H,Z=this,te=W.p(w),me=ee(E),ye=(me.utcOffset()-this.utcOffset())*t,Pe=this-me,we=i(function(){return W.m(Z,me)},"D");switch(te){case x:H=we()/12;break;case d:H=we();break;case g:H=we()/3;break;case p:H=(Pe-ye)/6048e5;break;case u:H=(Pe-ye)/864e5;break;case s:H=Pe/r;break;case a:H=Pe/t;break;case o:H=Pe/e;break;default:H=Pe}return A?H:W.a(H)},S.daysInMonth=function(){return this.endOf(d).$D},S.$locale=function(){return fe[this.$L]},S.locale=function(E,w){if(!E)return this.$L;var A=this.clone(),H=Ce(E,w,!0);return H&&(A.$L=H),A},S.clone=function(){return W.w(this.$d,this)},S.toDate=function(){return new Date(this.valueOf())},S.toJSON=function(){return this.isValid()?this.toISOString():null},S.toISOString=function(){return this.$d.toISOString()},S.toString=function(){return this.$d.toUTCString()},j}(),it=mt.prototype;return ee.prototype=it,[["$ms",n],["$s",o],["$m",a],["$H",s],["$W",u],["$M",d],["$y",x],["$D",v]].forEach(function(j){it[j[1]]=function(S){return this.$g(S,j[0],j[1])}}),ee.extend=function(j,S){return j.$i||(j(S,mt,ee),j.$i=!0),ee},ee.locale=Ce,ee.isDayjs=xe,ee.unix=function(j){return ee(1e3*j)},ee.en=fe[V],ee.Ls=fe,ee.p={},ee})});var Hv={};uo(Hv,{microsoft365Planner:()=>Vv});module.exports=oe(Hv);var Yp=Object.freeze({status:"aborted"});function O(e,t,r){function n(u,p){if(u._zod||Object.defineProperty(u,"_zod",{value:{def:p,constr:s,traits:new Set},enumerable:!1}),u._zod.traits.has(e))return;u._zod.traits.add(e),t(u,p);let d=s.prototype,g=Object.keys(d);for(let x=0;x<g.length;x++){let v=g[x];v in u||(u[v]=d[v].bind(u))}}i(n,"init");let o=r?.Parent??Object;class a extends o{static{i(this,"Definition")}}Object.defineProperty(a,"name",{value:e});function s(u){var p;let d=r?.Parent?new a:this;n(d,u),(p=d._zod).deferred??(p.deferred=[]);for(let g of d._zod.deferred)g();return d}return i(s,"_"),Object.defineProperty(s,"init",{value:n}),Object.defineProperty(s,Symbol.hasInstance,{value:i(u=>r?.Parent&&u instanceof r.Parent?!0:u?._zod?.traits?.has(e),"value")}),Object.defineProperty(s,"name",{value:e}),s}i(O,"$constructor");var Qp=Symbol("zod_brand"),Ue=class extends Error{static{i(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Er=class extends Error{static{i(this,"$ZodEncodeError")}constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},co={};function je(e){return e&&Object.assign(co,e),co}i(je,"config");function po(e){let t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,o])=>t.indexOf(+n)===-1).map(([n,o])=>o)}i(po,"getEnumValues");function Hi(e,t){return typeof t=="bigint"?t.toString():t}i(Hi,"jsonStringifyReplacer");function Sr(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}i(Sr,"cached");function Zi(e){return e==null}i(Zi,"nullish");function Ar(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}i(Ar,"cleanRegex");var Vi=Symbol("evaluating");function ge(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==Vi)return n===void 0&&(n=Vi,n=r()),n},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}i(ge,"defineLazy");var fo="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function qt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}i(qt,"isObject");var ed=Sr(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function qi(e){if(qt(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(qt(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}i(qi,"isPlainObject");var Gi=new Set(["string","number","symbol"]);function ht(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}i(ht,"escapeRegex");function $r(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}i($r,"clone");function ue(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:i(()=>t,"error")};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:i(()=>t.error,"error")}:t}i(ue,"normalizeParams");function Wi(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}i(Wi,"optionalKeys");var td={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function yt(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}i(yt,"aborted");function Ke(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}i(Ke,"prefixIssues");function Ir(e){return typeof e=="string"?e:e?.message}i(Ir,"unwrapMessage");function Je(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let o=Ir(e.inst?._zod.def?.error?.(e))??Ir(t?.error?.(e))??Ir(r.customError?.(e))??Ir(r.localeError?.(e))??"Invalid input";n.message=o}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}i(Je,"finalizeIssue");function Ki(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}i(Ki,"getLengthableOrigin");function mo(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}i(mo,"issue");var Ji=i((e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Hi,2),Object.defineProperty(e,"toString",{value:i(()=>e.message,"value"),enumerable:!1})},"initializer"),Xi=O("$ZodError",Ji),Gt=O("$ZodError",Ji,{Parent:Error});var nd=i(e=>(t,r,n,o)=>{let a=n?Object.assign(n,{async:!1}):{async:!1},s=t._zod.run({value:r,issues:[]},a);if(s instanceof Promise)throw new Ue;if(s.issues.length){let u=new(o?.Err??e)(s.issues.map(p=>Je(p,a,je())));throw fo(u,o?.callee),u}return s.value},"_parse"),wr=nd(Gt),od=i(e=>async(t,r,n,o)=>{let a=n?Object.assign(n,{async:!0}):{async:!0},s=t._zod.run({value:r,issues:[]},a);if(s instanceof Promise&&(s=await s),s.issues.length){let u=new(o?.Err??e)(s.issues.map(p=>Je(p,a,je())));throw fo(u,o?.callee),u}return s.value},"_parseAsync"),Or=od(Gt),id=i(e=>(t,r,n)=>{let o=n?{...n,async:!1}:{async:!1},a=t._zod.run({value:r,issues:[]},o);if(a instanceof Promise)throw new Ue;return a.issues.length?{success:!1,error:new(e??Xi)(a.issues.map(s=>Je(s,o,je())))}:{success:!0,data:a.value}},"_safeParse"),Wt=id(Gt),ad=i(e=>async(t,r,n)=>{let o=n?Object.assign(n,{async:!0}):{async:!0},a=t._zod.run({value:r,issues:[]},o);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(s=>Je(s,o,je())))}:{success:!0,data:a.value}},"_safeParseAsync"),Kt=ad(Gt);var sd="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",ud=new RegExp(`^${sd}$`);var Yi=i(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),Qi=/^-?\d+n?$/;var go=/^-?\d+(?:\.\d+)?$/,ea=/^(?:true|false)$/i;var vt=O("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])});var ta=O("$ZodCheckMinLength",(e,t)=>{var r;vt.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return!Zi(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{let o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let o=n.value;if(o.length>=t.minimum)return;let s=Ki(o);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}});var ho=O("$ZodCheckStringFormat",(e,t)=>{var r,n;vt.init(e,t),e._zod.onattach.push(o=>{let a=o._zod.bag;a.format=t.format,t.pattern&&(a.patterns??(a.patterns=new Set),a.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),ra=O("$ZodCheckRegex",(e,t)=>{ho.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}});var oa={major:4,minor:3,patch:6};var ce=O("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=oa;let n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(let o of n)for(let a of o._zod.onattach)a(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let o=i((s,u,p)=>{let d=yt(s),g;for(let x of u){if(x._zod.def.when){if(!x._zod.def.when(s))continue}else if(d)continue;let v=s.issues.length,l=x._zod.check(s);if(l instanceof Promise&&p?.async===!1)throw new Ue;if(g||l instanceof Promise)g=(g??Promise.resolve()).then(async()=>{await l,s.issues.length!==v&&(d||(d=yt(s,v)))});else{if(s.issues.length===v)continue;d||(d=yt(s,v))}}return g?g.then(()=>s):s},"runChecks"),a=i((s,u,p)=>{if(yt(s))return s.aborted=!0,s;let d=o(u,n,p);if(d instanceof Promise){if(p.async===!1)throw new Ue;return d.then(g=>e._zod.parse(g,p))}return e._zod.parse(d,p)},"handleCanaryResult");e._zod.run=(s,u)=>{if(u.skipChecks)return e._zod.parse(s,u);if(u.direction==="backward"){let d=e._zod.parse({value:s.value,issues:[]},{...u,skipChecks:!0});return d instanceof Promise?d.then(g=>a(g,s,u)):a(d,s,u)}let p=e._zod.parse(s,u);if(p instanceof Promise){if(u.async===!1)throw new Ue;return p.then(d=>o(d,n,u))}return o(p,n,u)}}ge(e,"~standard",()=>({validate:i(o=>{try{let a=Wt(e,o);return a.success?{value:a.data}:{issues:a.error?.issues}}catch{return Kt(e,o).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},"validate"),vendor:"zod",version:1}))}),kr=O("$ZodString",(e,t)=>{ce.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Yi(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),yo=O("$ZodStringFormat",(e,t)=>{ho.init(e,t),kr.init(e,t)});var ca=O("$ZodURL",(e,t)=>{yo.init(e,t),e._zod.check=r=>{try{let n=r.value.trim(),o=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=o.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}});var la=O("$ZodNumber",(e,t)=>{ce.init(e,t),e._zod.pattern=e._zod.bag.pattern??go,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let o=r.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return r;let a=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...a?{received:a}:{}}),r}});var vo=O("$ZodBoolean",(e,t)=>{ce.init(e,t),e._zod.pattern=ea,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}let o=r.value;return typeof o=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),r}}),pa=O("$ZodBigInt",(e,t)=>{ce.init(e,t),e._zod.pattern=Qi,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}});var da=O("$ZodAny",(e,t)=>{ce.init(e,t),e._zod.parse=r=>r}),fa=O("$ZodUnknown",(e,t)=>{ce.init(e,t),e._zod.parse=r=>r});var ma=O("$ZodVoid",(e,t)=>{ce.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;return typeof o>"u"||r.issues.push({expected:"void",code:"invalid_type",input:o,inst:e}),r}}),ga=O("$ZodDate",(e,t)=>{ce.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let o=r.value,a=o instanceof Date;return a&&!Number.isNaN(o.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:o,...a?{received:"Invalid Date"}:{},inst:e}),r}});function ia(e,t,r){e.issues.length&&t.issues.push(...Ke(r,e.issues)),t.value[r]=e.value}i(ia,"handleArrayResult");var ha=O("$ZodArray",(e,t)=>{ce.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),r;r.value=Array(o.length);let a=[];for(let s=0;s<o.length;s++){let u=o[s],p=t.element._zod.run({value:u,issues:[]},n);p instanceof Promise?a.push(p.then(d=>ia(d,r,s))):ia(p,r,s)}return a.length?Promise.all(a).then(()=>r):r}});function Rr(e,t,r,n,o){if(e.issues.length){if(o&&!(r in n))return;t.issues.push(...Ke(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}i(Rr,"handlePropertyResult");function cd(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);let r=Wi(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}i(cd,"normalizeDef");function ld(e,t,r,n,o,a){let s=[],u=o.keySet,p=o.catchall._zod,d=p.def.type,g=p.optout==="optional";for(let x in t){if(u.has(x))continue;if(d==="never"){s.push(x);continue}let v=p.run({value:t[x],issues:[]},n);v instanceof Promise?e.push(v.then(l=>Rr(l,r,x,t,g))):Rr(v,r,x,t,g)}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:a}),e.length?Promise.all(e).then(()=>r):r}i(ld,"handleCatchall");var ya=O("$ZodObject",(e,t)=>{if(ce.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let u=t.shape;Object.defineProperty(t,"shape",{get:i(()=>{let p={...u};return Object.defineProperty(t,"shape",{value:p}),p},"get")})}let n=Sr(()=>cd(t));ge(e._zod,"propValues",()=>{let u=t.shape,p={};for(let d in u){let g=u[d]._zod;if(g.values){p[d]??(p[d]=new Set);for(let x of g.values)p[d].add(x)}}return p});let o=qt,a=t.catchall,s;e._zod.parse=(u,p)=>{s??(s=n.value);let d=u.value;if(!o(d))return u.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),u;u.value={};let g=[],x=s.shape;for(let v of s.keys){let l=x[v],f=l._zod.optout==="optional",y=l._zod.run({value:d[v],issues:[]},p);y instanceof Promise?g.push(y.then(h=>Rr(h,u,v,d,f))):Rr(y,u,v,d,f)}return a?ld(g,d,u,p,n.value,e):g.length?Promise.all(g).then(()=>u):u}});function aa(e,t,r,n){for(let a of e)if(a.issues.length===0)return t.value=a.value,t;let o=e.filter(a=>!yt(a));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(a=>a.issues.map(s=>Je(s,n,je())))}),t)}i(aa,"handleUnionResults");var _o=O("$ZodUnion",(e,t)=>{ce.init(e,t),ge(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),ge(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),ge(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),ge(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){let o=t.options.map(a=>a._zod.pattern);return new RegExp(`^(${o.map(a=>Ar(a.source)).join("|")})$`)}});let r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(o,a)=>{if(r)return n(o,a);let s=!1,u=[];for(let p of t.options){let d=p._zod.run({value:o.value,issues:[]},a);if(d instanceof Promise)u.push(d),s=!0;else{if(d.issues.length===0)return d;u.push(d)}}return s?Promise.all(u).then(p=>aa(p,o,e,a)):aa(u,o,e,a)}});var va=O("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,_o.init(e,t);let r=e._zod.parse;ge(e._zod,"propValues",()=>{let o={};for(let a of t.options){let s=a._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(let[u,p]of Object.entries(s)){o[u]||(o[u]=new Set);for(let d of p)o[u].add(d)}}return o});let n=Sr(()=>{let o=t.options,a=new Map;for(let s of o){let u=s._zod.propValues?.[t.discriminator];if(!u||u.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let p of u){if(a.has(p))throw new Error(`Duplicate discriminator value "${String(p)}"`);a.set(p,s)}}return a});e._zod.parse=(o,a)=>{let s=o.value;if(!qt(s))return o.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),o;let u=n.value.get(s?.[t.discriminator]);return u?u._zod.run(o,a):t.unionFallback?r(o,a):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:s,path:[t.discriminator],inst:e}),o)}});var _a=O("$ZodRecord",(e,t)=>{ce.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!qi(o))return r.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),r;let a=[],s=t.keyType._zod.values;if(s){r.value={};let u=new Set;for(let d of s)if(typeof d=="string"||typeof d=="number"||typeof d=="symbol"){u.add(typeof d=="number"?d.toString():d);let g=t.valueType._zod.run({value:o[d],issues:[]},n);g instanceof Promise?a.push(g.then(x=>{x.issues.length&&r.issues.push(...Ke(d,x.issues)),r.value[d]=x.value})):(g.issues.length&&r.issues.push(...Ke(d,g.issues)),r.value[d]=g.value)}let p;for(let d in o)u.has(d)||(p=p??[],p.push(d));p&&p.length>0&&r.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:p})}else{r.value={};for(let u of Reflect.ownKeys(o)){if(u==="__proto__")continue;let p=t.keyType._zod.run({value:u,issues:[]},n);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof u=="string"&&go.test(u)&&p.issues.length){let x=t.keyType._zod.run({value:Number(u),issues:[]},n);if(x instanceof Promise)throw new Error("Async schemas not supported in object keys currently");x.issues.length===0&&(p=x)}if(p.issues.length){t.mode==="loose"?r.value[u]=o[u]:r.issues.push({code:"invalid_key",origin:"record",issues:p.issues.map(x=>Je(x,n,je())),input:u,path:[u],inst:e});continue}let g=t.valueType._zod.run({value:o[u],issues:[]},n);g instanceof Promise?a.push(g.then(x=>{x.issues.length&&r.issues.push(...Ke(u,x.issues)),r.value[p.value]=x.value})):(g.issues.length&&r.issues.push(...Ke(u,g.issues)),r.value[p.value]=g.value)}}return a.length?Promise.all(a).then(()=>r):r}});var Pa=O("$ZodEnum",(e,t)=>{ce.init(e,t);let r=po(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(o=>Gi.has(typeof o)).map(o=>typeof o=="string"?ht(o):o.toString()).join("|")})$`),e._zod.parse=(o,a)=>{let s=o.value;return n.has(s)||o.issues.push({code:"invalid_value",values:r,input:s,inst:e}),o}}),xa=O("$ZodLiteral",(e,t)=>{if(ce.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?ht(n):n?ht(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,o)=>{let a=n.value;return r.has(a)||n.issues.push({code:"invalid_value",values:t.values,input:a,inst:e}),n}});var ba=O("$ZodTransform",(e,t)=>{ce.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Er(e.constructor.name);let o=t.transform(r.value,r);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(s=>(r.value=s,r));if(o instanceof Promise)throw new Ue;return r.value=o,r}});function sa(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}i(sa,"handleOptionalResult");var Ta=O("$ZodOptional",(e,t)=>{ce.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ge(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ge(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Ar(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(a=>sa(a,r.value)):sa(o,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}});var Ea=O("$ZodNullable",(e,t)=>{ce.init(e,t),ge(e._zod,"optin",()=>t.innerType._zod.optin),ge(e._zod,"optout",()=>t.innerType._zod.optout),ge(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${Ar(r.source)}|null)$`):void 0}),ge(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)});var Ia=O("$ZodPipe",(e,t)=>{ce.init(e,t),ge(e._zod,"values",()=>t.in._zod.values),ge(e._zod,"optin",()=>t.in._zod.optin),ge(e._zod,"optout",()=>t.out._zod.optout),ge(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){let a=t.out._zod.run(r,n);return a instanceof Promise?a.then(s=>zr(s,t.in,n)):zr(a,t.in,n)}let o=t.in._zod.run(r,n);return o instanceof Promise?o.then(a=>zr(a,t.out,n)):zr(o,t.out,n)}});function zr(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}i(zr,"handlePipeResult");var Sa=O("$ZodCustom",(e,t)=>{vt.init(e,t),ce.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{let n=r.value,o=t.fn(n);if(o instanceof Promise)return o.then(a=>ua(a,r,n,e));ua(o,r,n,e)}});function ua(e,t,r,n){if(!e){let o={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),t.issues.push(mo(o))}}i(ua,"handleRefineResult");var $a,md=Symbol("ZodOutput"),gd=Symbol("ZodInput"),Po=class{static{i(this,"$ZodRegistry")}constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let n=r[0];return this._map.set(t,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let n={...this.get(r)??{}};delete n.id;let o={...n,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function wa(){return new Po}i(wa,"registry");($a=globalThis).__zod_globalRegistry??($a.__zod_globalRegistry=wa());var xo=globalThis.__zod_globalRegistry;function Oa(e,t){return new e({type:"string",...ue(t)})}i(Oa,"_string");function za(e,t){return new e({type:"string",coerce:!0,...ue(t)})}i(za,"_coercedString");function Ra(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...ue(t)})}i(Ra,"_url");function ka(e,t){return new e({type:"number",checks:[],...ue(t)})}i(ka,"_number");function Da(e,t){return new e({type:"number",coerce:!0,checks:[],...ue(t)})}i(Da,"_coercedNumber");function Ca(e,t){return new e({type:"boolean",...ue(t)})}i(Ca,"_boolean");function Na(e,t){return new e({type:"boolean",coerce:!0,...ue(t)})}i(Na,"_coercedBoolean");function Ua(e,t){return new e({type:"bigint",coerce:!0,...ue(t)})}i(Ua,"_coercedBigint");function Ma(e){return new e({type:"any"})}i(Ma,"_any");function La(e){return new e({type:"unknown"})}i(La,"_unknown");function ja(e,t){return new e({type:"void",...ue(t)})}i(ja,"_void");function Fa(e,t){return new e({type:"date",coerce:!0,...ue(t)})}i(Fa,"_coercedDate");function ke(e,t){return new ta({check:"min_length",...ue(t),minimum:e})}i(ke,"_minLength");function Xe(e,t){return new ra({check:"string_format",format:"regex",...ue(t),pattern:e})}i(Xe,"_regex");function Ba(e,t,r){let n=ue(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}i(Ba,"_custom");var he=O("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");ce.init(e,t),e.def=t,e.type=t.type,e.parse=(r,n)=>wr(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>Wt(e,r,n),e.parseAsync=async(r,n)=>Or(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>Kt(e,r,n),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]},{parent:!0}),e.with=e.check,e.clone=(r,n)=>$r(e,r,n),e.brand=()=>e,e.register=(r,n)=>(r.add(e,n),e),e.apply=r=>r(e)}),Cr=O("ZodMiniString",(e,t)=>{kr.init(e,t),he.init(e,t)});function c(e){return Oa(Cr,e)}i(c,"string");var Va=O("ZodMiniStringFormat",(e,t)=>{yo.init(e,t),Cr.init(e,t)});var Id=O("ZodMiniURL",(e,t)=>{ca.init(e,t),Va.init(e,t)});function Ha(e){return Ra(Id,e)}i(Ha,"url");var bo=O("ZodMiniNumber",(e,t)=>{la.init(e,t),he.init(e,t)});function be(e){return ka(bo,e)}i(be,"number");var To=O("ZodMiniBoolean",(e,t)=>{vo.init(e,t),he.init(e,t)});function Q(e){return Ca(To,e)}i(Q,"boolean");var Za=O("ZodMiniBigInt",(e,t)=>{pa.init(e,t),he.init(e,t)});var Sd=O("ZodMiniAny",(e,t)=>{da.init(e,t),he.init(e,t)});function Xt(){return Ma(Sd)}i(Xt,"any");var Ad=O("ZodMiniUnknown",(e,t)=>{fa.init(e,t),he.init(e,t)});function U(){return La(Ad)}i(U,"unknown");var $d=O("ZodMiniVoid",(e,t)=>{ma.init(e,t),he.init(e,t)});function qa(e){return ja($d,e)}i(qa,"_void");var Ga=O("ZodMiniDate",(e,t)=>{ga.init(e,t),he.init(e,t)});var wd=O("ZodMiniArray",(e,t)=>{ha.init(e,t),he.init(e,t)});function F(e,t){return new wd({type:"array",element:e,...ue(t)})}i(F,"array");var Od=O("ZodMiniObject",(e,t)=>{ya.init(e,t),he.init(e,t),ge(e,"shape",()=>t.shape)});function m(e,t){let r={type:"object",shape:e??{},...ue(t)};return new Od(r)}i(m,"object");var zd=O("ZodMiniUnion",(e,t)=>{_o.init(e,t),he.init(e,t)});function B(e,t){return new zd({type:"union",options:e,...ue(t)})}i(B,"union");var Rd=O("ZodMiniDiscriminatedUnion",(e,t)=>{va.init(e,t),he.init(e,t)});function _t(e,t,r){return new Rd({type:"union",options:t,discriminator:e,...ue(r)})}i(_t,"discriminatedUnion");var kd=O("ZodMiniRecord",(e,t)=>{_a.init(e,t),he.init(e,t)});function M(e,t,r){return new kd({type:"record",keyType:e,valueType:t,...ue(r)})}i(M,"record");var Dd=O("ZodMiniEnum",(e,t)=>{Pa.init(e,t),he.init(e,t),e.options=Object.values(t.entries)});function G(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new Dd({type:"enum",entries:r,...ue(t)})}i(G,"_enum");var Cd=O("ZodMiniLiteral",(e,t)=>{xa.init(e,t),he.init(e,t)});function k(e,t){return new Cd({type:"literal",values:Array.isArray(e)?e:[e],...ue(t)})}i(k,"literal");var Nd=O("ZodMiniTransform",(e,t)=>{ba.init(e,t),he.init(e,t)});function Ye(e){return new Nd({type:"transform",transform:e})}i(Ye,"transform");var Ud=O("ZodMiniOptional",(e,t)=>{Ta.init(e,t),he.init(e,t)});function P(e){return new Ud({type:"optional",innerType:e})}i(P,"optional");var Md=O("ZodMiniNullable",(e,t)=>{Ea.init(e,t),he.init(e,t)});function Yt(e){return new Md({type:"nullable",innerType:e})}i(Yt,"nullable");var Ld=O("ZodMiniPipe",(e,t)=>{Ia.init(e,t),he.init(e,t)});function Qe(e,t){return new Ld({type:"pipe",in:e,out:t})}i(Qe,"pipe");var jd=O("ZodMiniCustom",(e,t)=>{Sa.init(e,t),he.init(e,t)});function Nr(e,t){return Ba(jd,e??(()=>!0),t)}i(Nr,"custom");var Qt={};uo(Qt,{bigint:()=>Gd,boolean:()=>qd,date:()=>Wd,number:()=>Zd,string:()=>Hd});function Hd(e){return za(Cr,e)}i(Hd,"string");function Zd(e){return Da(bo,e)}i(Zd,"number");function qd(e){return Na(To,e)}i(qd,"boolean");function Gd(e){return Ua(Za,e)}i(Gd,"bigint");function Wd(e){return Fa(Ga,e)}i(Wd,"date");var Io=m({retryOnFailure:m({defaultValue:P(Q()),hide:P(Q())}),continueOnFailure:m({defaultValue:P(Q()),hide:P(Q())})}),Eo=class{constructor(t,r,n,o,a,s,u,p,d,g,x){this.name=t;this.displayName=r;this.description=n;this.props=o;this.run=a;this.test=s;this.requireAuth=u;this.errorHandlingOptions=p;this.outputSchema=d;this.audience=g;this.aiMetadata=x}static{i(this,"IAction")}},ne=i(e=>new Eo(e.name,e.displayName,e.description,e.props,e.run,e.test??e.run,e.requireAuth??!0,e.errorHandlingOptions??{continueOnFailure:{defaultValue:!1},retryOnFailure:{defaultValue:!1}},e.outputSchema,e.audience,e.aiMetadata),"createAction");var Y=m({displayName:c(),description:P(c())}),q=i((e,t)=>m({type:k(t),required:Q(),defaultValue:P(Xt())}),"TPropertyValue");var Ae=m({...Y.shape,...q(c(),"SHORT_TEXT").shape}),Fe=m({...Y.shape,...q(c(),"LONG_TEXT").shape});var Ka=m({label:c(),value:U()}),Ur=m({disabled:P(Q()),placeholder:P(c()),options:F(Ka)});var $e=m({...Y.shape,options:Ur,...q(U(),"STATIC_DROPDOWN").shape}),Be=m({...Y.shape,options:Ur,...q(F(U()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var So=m({...Y.shape,...q(U(),"DROPDOWN").shape,refreshers:F(c())}),er=m({...Y.shape,...q(F(U()),"MULTI_SELECT_DROPDOWN").shape,refreshers:F(c())});var Ve=m({...Y.shape,...q(Q(),"CHECKBOX").shape});var He=m({...Y.shape,...q(be(),"NUMBER").shape});var tr=m({...Y.shape,...q(U(),"FILE").shape});var rr=m({...Y.shape,...q(c(),"DATE_TIME").shape});var Ja=M(c(),B([Ae,Fe,$e,er,Be,Ve,He,tr,rr])),nr=m({...Y.shape,properties:Ja,...q(F(U()),"ARRAY").shape});var or=m({...Y.shape,...q(B([M(c(),U())]),"JSON").shape});var Xa=B([Ae,$e,or,nr,Be]),Jd=M(c(),Xa),Ao=m({refreshers:F(c()),...Y.shape,...q(U(),"DYNAMIC").shape});var Mr=m({...Y.shape,...q(qa(),"MARKDOWN").shape});var ir=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))(ir||{}),Pt=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(Pt||{}),ar=(_=>(_.ARTIFICIAL_INTELLIGENCE="ARTIFICIAL_INTELLIGENCE",_.COMMUNICATION="COMMUNICATION",_.COMMERCE="COMMERCE",_.CORE="CORE",_.UNIVERSAL_AI="UNIVERSAL_AI",_.FLOW_CONTROL="FLOW_CONTROL",_.BUSINESS_INTELLIGENCE="BUSINESS_INTELLIGENCE",_.ACCOUNTING="ACCOUNTING",_.PRODUCTIVITY="PRODUCTIVITY",_.CONTENT_AND_FILES="CONTENT_AND_FILES",_.DEVELOPER_TOOLS="DEVELOPER_TOOLS",_.CUSTOMER_SUPPORT="CUSTOMER_SUPPORT",_.FORMS_AND_SURVEYS="FORMS_AND_SURVEYS",_.HUMAN_RESOURCES="HUMAN_RESOURCES",_.PAYMENT_PROCESSING="PAYMENT_PROCESSING",_.MARKETING="MARKETING",_.SALES_AND_CRM="SALES_AND_CRM",_))(ar||{});var sr=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(sr||{}),$o="both_client_credentials_and_authorization_code";var Me=(o=>(o.POLLING="POLLING",o.WEBHOOK="WEBHOOK",o.APP_WEBHOOK="APP_WEBHOOK",o.MANUAL="MANUAL",o))(Me||{}),ur=(a=>(a.NONE="NONE",a.HEADER_PRESENT="HEADER_PRESENT",a.QUERY_PRESENT="QUERY_PRESENT",a.BODY_PARAM_PRESENT="BODY_PARAM_PRESENT",a.HEAD_REQUEST="HEAD_REQUEST",a))(ur||{}),Xd=m({strategy:G(ur),paramName:P(c())}),cr=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(cr||{});var Lr=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(Lr||{}),Ya=m({status:P(be()),body:P(U()),headers:P(M(c(),c()))}),Qa=m({type:k("DELAY"),resumeDateTime:c(),requestIdToReply:P(c()),handlerId:P(c()),streamStepProgress:P(G(Lr))}),es=m({type:k("WEBHOOK"),requestId:c(),requestIdToReply:P(c()),response:Ya,handlerId:P(c()),streamStepProgress:P(G(Lr))}),Yd=B([Qa,es]);var Qd=m({body:U(),rawBody:P(U()),headers:M(c(),c()),queryParams:M(c(),c())});function _e(e){return e==null}i(_e,"isNil");function lr(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}i(lr,"isEmpty");function jr(e,t){if(e==null)throw new Error(`${t} is null or undefined`)}i(jr,"assertNotNullOrUndefined");var wo=Ne(require("crypto"),1);var ef=128,ut,xt,tf=i(e=>{!ut||ut.length<e?(ut=Buffer.allocUnsafe(e*ef),wo.default.randomFillSync(ut),xt=0):xt+e>ut.length&&(wo.default.randomFillSync(ut),xt=0),xt+=e},"fillPool"),rf=i(e=>(tf(e|=0),ut.subarray(xt-e,xt)),"random"),nf=i((e,t,r)=>{let n=(2<<31-Math.clz32(e.length-1|1))-1,o=Math.ceil(1.6*n*t/e.length);return(a=t)=>{let s="";for(;;){let u=r(o),p=o;for(;p--;)if(s+=e[u[p]&n]||"",s.length===a)return s}}},"customRandom"),rs=i((e,t=21)=>nf(e,t,rf),"customAlphabet");var of="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",ns=21,S$=c().check(Xe(new RegExp(`^[0-9a-zA-Z]{${ns}}$`))),af=rs(of,ns);var et=Qe(Ye(e=>e instanceof Date?e.toISOString():e),c()),Oe={id:c(),created:et,updated:et},ie=i(e=>P(Yt(e)),"Nullable");function Oo(e){return P(Yt(G(e)))}i(Oo,"NullableEnum");var w$=Qe(Ye(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),P(Q())),Fr=i(e=>Qe(Ye(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),P(F(e))),"OptionalArrayFromQuery");var R$=M(c(),U());var pr=(g=>(g.OPENAI="openai",g.OPENROUTER="openrouter",g.ANTHROPIC="anthropic",g.AZURE="azure",g.GOOGLE="google",g.ACTIVEPIECES="activepieces",g.CLOUDFLARE_GATEWAY="cloudflare-gateway",g.CUSTOM="custom",g.BEDROCK="bedrock",g.MISTRAL="mistral",g))(pr||{});var H$=c().check(Xe(/^#[0-9A-Fa-f]{6}$/));var q$=m({filename:c(),data:U(),type:k("file"),mimetype:P(c())});var sf=Ne(is());var Q$=m({...Oe,name:c(),permissions:F(c()),platformId:ie(c()),type:c(),userCount:P(be())});var as=(n=>(n.AGENT_DECIDE="agent-decide",n.CHOOSE_YOURSELF="choose-yourself",n.LEAVE_EMPTY="leave-empty",n))(as||{}),zo=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))(zo||{}),Ro=(n=>(n.SSE="sse",n.STREAMABLE_HTTP="streamable-http",n.SIMPLE_HTTP="http",n))(Ro||{});var ko=(n=>(n.TEXT="text",n.NUMBER="number",n.BOOLEAN="boolean",n))(ko||{});var Do=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))(Do||{});var uf=m({mode:G(as),value:U()}),cf=m({auth:P(c()),fields:M(c(),uf)}),lf=m({pieceName:c(),pieceVersion:c(),actionName:c(),predefinedInput:P(cf)}),pf=m({type:k("PIECE"),toolName:c().check(ke(1)),pieceMetadata:lf}),df=m({type:k("none")}),ff=m({type:k("access_token"),accessToken:c()}),mf=m({type:k("api_key"),apiKey:c(),apiKeyHeader:c()}),gf=m({type:k("headers"),headers:M(c(),c())}),hf=_t("type",[df,ff,mf,gf]),ss=m({type:k("FLOW"),toolName:c().check(ke(1)),externalFlowId:c(),flowDisplayName:P(c())}),us=m({type:k("MCP"),toolName:c().check(ke(1)),serverUrl:Ha(),protocol:G(Ro),auth:hf}),cs=m({type:k("KNOWLEDGE_BASE"),toolName:c().check(ke(1)),sourceType:G(zo),sourceId:c(),sourceName:c()}),yf=_t("type",[pf,ss,us,cs]),vf=m({displayName:c(),description:P(c()),type:G(ko)}),ls=m({type:k("MARKDOWN"),markdown:c()}),bt={type:k("TOOL_CALL"),input:ie(M(c(),U())),output:P(U()),toolName:c(),status:G(Do),toolCallId:c(),startTime:c(),endTime:P(c())},Sw=m(bt),ps=_t("toolCallType",[m({...bt,toolCallType:k("PIECE"),pieceName:c(),pieceVersion:c(),actionName:c()}),m({...bt,toolCallType:k("FLOW"),displayName:c(),externalFlowId:c()}),m({...bt,toolCallType:k("MCP"),displayName:c(),serverUrl:c()}),m({...bt,toolCallType:k("KNOWLEDGE_BASE"),displayName:c(),sourceType:c()}),m({...bt,toolCallType:k("UNKNOWN"),displayName:c()})]),_f=B([ls,ps]);var Co=(r=>(r.IMAGE="image",r.TEXT="text",r))(Co||{}),Ze=m({apiKey:c()}),Pf=Ze,xf=m({apiKey:c(),apiKeyHash:c()}),bf=Ze,Tf=Ze,Ef=Ze,If=Ze,Sf=Ze,Af=Ze,$f=Ze,ds=m({accessKeyId:c().check(ke(1)),secretAccessKey:c().check(ke(1))}),wf=m({}),Of=m({}),zf=m({}),Rf=m({}),kf=m({}),Df=m({}),fs=m({modelId:c(),modelName:c(),modelType:G(Co)}),ms=m({apiKeyHeader:c(),baseUrl:c(),models:F(fs),defaultHeaders:P(M(c(),c()))}),gs=m({accountId:c(),gatewayId:c(),models:F(fs),vertexProject:P(c()),vertexRegion:P(c())}),hs=m({resourceName:c(),apiVersion:Qe(Ye(e=>typeof e=="string"&&e.trim().length===0?void 0:e),P(c()))}),ys=m({region:c().check(ke(1))}),Cf=B([Pf,Ef,If,Sf,Af,Tf,bf,xf,ds,$f]),vs=B([ms,gs,hs,ys,wf,zf,Rf,kf,Of,Df]),Nf=m({id:c(),name:c(),type:G(Co)}),Uf=m({id:c(),name:c(),provider:G(pr),config:vs,enabledForChat:Q()}),Mf=m({provider:G(pr),config:vs,auth:Cf,platformId:c()});var Ow={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"};var Lf=m({base64Url:c(),fileName:c(),extension:P(c())}),jf=m({mimeType:c(),url:c(),fileName:P(c())}),No=B([Lf,jf]);var Ff=B([m({type:k("file"),value:No}),m({type:k("markdown"),value:c(),files:P(F(No))})]),Bf=m({sessionId:c(),message:c(),files:P(F(c()))});var Ps=(r=>(r.ON_NEW_RECORD="ON_NEW_RECORD",r.ON_UPDATE_RECORD="ON_UPDATE_RECORD",r))(Ps||{}),xs=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(xs||{}),Uo=(n=>(n.RECORD_CREATED="RECORD_CREATED",n.RECORD_UPDATED="RECORD_UPDATED",n.RECORD_DELETED="RECORD_DELETED",n))(Uo||{});var Vf=B([m({...Oe,name:c(),externalId:c(),type:k("STATIC_DROPDOWN"),tableId:c(),projectId:c(),data:m({options:F(m({value:c()}))})}),m({...Oe,name:c(),externalId:c(),type:B([k("TEXT"),k("NUMBER"),k("DATE")]),tableId:c(),projectId:c()})]),Hf=m({...Oe,name:c(),folderId:ie(c()),projectId:c(),externalId:c(),status:Oo(xs),trigger:Oo(Ps)}),Zf=m({...Oe,tableId:c(),projectId:c(),cells:M(c(),m({updated:c(),created:c(),value:U(),fieldName:c()}))}),qf=m({events:F(G(Uo)),webhookUrl:c(),flowId:c()}),Gf=m({fields:F(m({id:c(),name:c()})),rows:F(M(c(),c())),name:c()}),Wf=m({projectId:c(),limit:P(Qt.number()),cursor:P(c()),name:P(c()),externalIds:Fr(c()),folderId:P(c()),folderIds:Fr(c())}),Kf=m({records:F(F(m({fieldId:c(),value:Ts()}))),tableId:c()}),Jf=m({cells:P(F(m({fieldId:c(),value:Ts()}))),tableId:c(),agentUpdate:P(Q())}),bs=_t("operator",[ct("eq"),ct("neq"),ct("gt"),ct("gte"),ct("lt"),ct("lte"),ct("co"),_s("exists"),_s("not_exists")]),Xf=m({tableId:c(),limit:P(Qt.number()),cursor:P(c()),filters:Fr(bs)});function Ts(){return Qe(Ye(e=>e==null?e:String(e)),Yt(c()))}i(Ts,"coerceToString");function ct(e){return m({fieldId:c(),operator:k(e),value:c()})}i(ct,"valueFilter");function _s(e){return m({fieldId:c(),operator:k(e)})}i(_s,"existenceFilter");var Yf=m({status:P(be()),body:P(U()),headers:P(M(c(),c()))}),Qf=m({...Oe,deleted:ie(et),ownerId:c(),displayName:c(),platformId:c(),externalId:ie(c())});var Es=m({name:c(),description:P(c()),type:c(),required:Q()}),em=m({pieceName:c(),triggerName:c(),input:m({toolName:c(),toolDescription:c(),inputSchema:F(Es),returnsResponse:Q()})});var Is="^[0-9]+\\.[0-9]+\\.[0-9]+$",Kw=new RegExp(Is),rm="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",Jw=c().check(Xe(new RegExp(Is))),Xw=c().check(Xe(new RegExp(rm))),nm=m({packageType:k("ARCHIVE"),pieceType:G(Pt),pieceName:c(),pieceVersion:c(),archiveId:c(),platformId:c()}),Ss=m({packageType:k("REGISTRY"),pieceType:k("OFFICIAL"),pieceName:c(),pieceVersion:c()}),As=m({packageType:k("REGISTRY"),pieceType:k("CUSTOM"),pieceName:c(),pieceVersion:c(),platformId:c()}),Yw=B([Ss,As]),Qw=B([nm,Ss,As]),$s=(t=>(t.CRON_EXPRESSION="CRON_EXPRESSION",t))($s||{}),om=m({type:G($s),cronExpression:c(),timezone:c()}),eO=m({...Oe,type:G(Me),projectId:c(),flowId:c(),triggerName:c(),schedule:ie(om),flowVersionId:c(),pieceName:c(),pieceVersion:c(),deleted:ie(c()),simulate:Q()}),ws=(h=>(h.UNKNOWN="UNKNOWN",h.FLOW_RUN_LOG="FLOW_RUN_LOG",h.FLOW_RUN_LOG_SLICE="FLOW_RUN_LOG_SLICE",h.PACKAGE_ARCHIVE="PACKAGE_ARCHIVE",h.FLOW_STEP_FILE="FLOW_STEP_FILE",h.SAMPLE_DATA="SAMPLE_DATA",h.TRIGGER_PAYLOAD="TRIGGER_PAYLOAD",h.SAMPLE_DATA_INPUT="SAMPLE_DATA_INPUT",h.TRIGGER_EVENT_FILE="TRIGGER_EVENT_FILE",h.PROJECT_RELEASE="PROJECT_RELEASE",h.FLOW_VERSION_BACKUP="FLOW_VERSION_BACKUP",h.PLATFORM_ASSET="PLATFORM_ASSET",h.USER_PROFILE_PICTURE="USER_PROFILE_PICTURE",h.WEBHOOK_PAYLOAD="WEBHOOK_PAYLOAD",h.KNOWLEDGE_BASE="KNOWLEDGE_BASE",h.FLOW_BUNDLE="FLOW_BUNDLE",h))(ws||{}),Os=(r=>(r.NONE="NONE",r.ZSTD="ZSTD",r))(Os||{}),zs=(r=>(r.S3="S3",r.DB="DB",r))(zs||{}),tO=m({...Oe,projectId:ie(c()),platformId:ie(c()),type:G(ws),compression:G(Os),data:P(U()),location:G(zs),size:ie(be()),fileName:ie(c()),s3Key:ie(c()),metadata:ie(M(c(),c()))}),Rs=(n=>(n.ADMIN="ADMIN",n.MEMBER="MEMBER",n.OPERATOR="OPERATOR",n))(Rs||{}),ks=(r=>(r.ACTIVE="ACTIVE",r.INACTIVE="INACTIVE",r))(ks||{}),rO=m({id:c(),email:c(),firstName:c(),status:G(ks),externalId:ie(c()),platformId:ie(c()),platformRole:G(Rs),lastName:c(),created:et,updated:et,lastActiveDate:ie(et),imageUrl:ie(c())});var Mo=m({...Y.shape,...q(M(c(),U()),"OBJECT").shape});var Us=m({...Y.shape,...q(c(),"COLOR").shape});var Lo=B([Ae,Fe,Mr,Ve,$e,Be,So,er,Ao,He,nr,Mo,or,rr,tr,Us]),R={ShortText(e){return{...e,valueSchema:void 0,type:"SHORT_TEXT"}},Checkbox(e){return{...e,valueSchema:void 0,type:"CHECKBOX"}},LongText(e){return{...e,valueSchema:void 0,type:"LONG_TEXT"}},MarkDown(e){return{displayName:"Markdown",required:!1,description:e.value,type:"MARKDOWN",valueSchema:void 0,variant:e.variant??"INFO"}},Number(e){return{...e,valueSchema:void 0,type:"NUMBER"}},Json(e){return{...e,valueSchema:void 0,type:"JSON"}},Array(e){return{...e,valueSchema:void 0,type:"ARRAY"}},Object(e){return{...e,valueSchema:void 0,type:"OBJECT"}},Dropdown(e){return{...e,valueSchema:void 0,type:"DROPDOWN"}},StaticDropdown(e){return{...e,valueSchema:void 0,type:"STATIC_DROPDOWN"}},MultiSelectDropdown(e){return{...e,valueSchema:void 0,type:"MULTI_SELECT_DROPDOWN"}},DynamicProperties(e){return{...e,valueSchema:void 0,type:"DYNAMIC"}},StaticMultiSelectDropdown(e){return{...e,valueSchema:void 0,type:"STATIC_MULTI_SELECT_DROPDOWN"}},DateTime(e){return{...e,valueSchema:void 0,type:"DATE_TIME"}},File(e){return{...e,valueSchema:void 0,type:"FILE"}},Custom(e){let t=e.code.toString();return{...e,code:t,valueSchema:void 0,type:"CUSTOM"}},Color(e){return{...e,valueSchema:void 0,type:"COLOR"}}};var Le=m({displayName:c(),description:P(c())});var Ms=m({username:c(),password:c()}),jo=m({...Le.shape,username:m({displayName:c(),description:P(c())}),password:m({displayName:c(),description:P(c())}),...q(Ms,"BASIC_AUTH").shape});var um=M(c(),B([Ae,Fe,He,Ve,$e])),Fo=m({...Le.shape,props:um,...q(U(),"CUSTOM_AUTH").shape});var lt=m({...Le.shape,...q(m({auth:c()}),"SECRET_TEXT").shape});var cm=M(c(),B([Ae,Fe,lt,He,Ve,$e,Be,Mr])),Ls=m({...Le.shape,props:cm,...q(U(),"OIDC").shape});var Bo=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(Bo||{}),js=B([Ae,lt,$e]),Fs=M(c(),js),lm=m({props:P(M(c(),js)),authUrl:c(),tokenUrl:c(),scope:F(c()),prompt:P(B([k("none"),k("consent"),k("login"),k("omit")])),pkce:P(Q()),pkceMethod:P(B([k("plain"),k("S256")])),authorizationMethod:P(G(Bo)),grantType:P(B([G(sr),k($o)])),extra:P(M(c(),c()))}),Bs=m({access_token:c(),props:P(Fs),data:M(c(),Xt())}),Vo=m({...Le.shape,...lm.shape,...q(Bs,"OAUTH2").shape});var Tt=B([jo,Fo,Ls,Vo,lt]),dr="Connection",Ho={SecretText(e){return{...e,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(e){return{...e,valueSchema:void 0,type:"OAUTH2",displayName:e.displayName||dr}},BasicAuth(e){return{...e,valueSchema:void 0,type:"BASIC_AUTH",displayName:e.displayName||dr,required:!0}},CustomAuth(e){return{...e,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:e.displayName||dr}},OIDC(e){return{...e,valueSchema:void 0,type:"OIDC",displayName:e.displayName||dr}},None(){}};var Dz={OAUTH2:"OAUTH2",CLOUD_OAUTH2:"OAUTH2",PLATFORM_OAUTH2:"OAUTH2",BASIC_AUTH:"BASIC_AUTH",CUSTOM_AUTH:"CUSTOM_AUTH",OIDC:"OIDC",SECRET_TEXT:"SECRET_TEXT",NO_AUTH:void 0};var pm=m({...Y.shape,...q(U(),"CUSTOM").shape,code:c()});var dm=B([Lo,Tt]),Zo=M(c(),dm),eR=M(c(),Lo);var Vs=B([m({strategy:k("CRON"),cronExpression:c()}),m({strategy:k("NONE")})]),Et=class{constructor(t,r,n,o,a,s,u,p,d,g,x,v,l,f,y,h,_,T,V){this.name=t;this.displayName=r;this.description=n;this.requireAuth=o;this.props=a;this.type=s;this.handshakeConfiguration=u;this.onHandshake=p;this.renewConfiguration=d;this.onRenew=g;this.onEnable=x;this.onDisable=v;this.onStart=l;this.run=f;this.test=y;this.sampleData=h;this.testStrategy=_;this.outputSchema=T;this.aiMetadata=V}static{i(this,"ITrigger")}},It=i(e=>{switch(e.type){case"WEBHOOK":return new Et(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,e.handshakeConfiguration??{strategy:"NONE"},e.onHandshake??(async()=>({status:200})),e.renewConfiguration??{strategy:"NONE"},e.onRenew??(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,e.test?"TEST_FUNCTION":"SIMULATION",e.outputSchema,e.aiMetadata);case"POLLING":return new Et(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},async()=>Promise.resolve(),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,"TEST_FUNCTION",e.outputSchema,e.aiMetadata);case"MANUAL":return new Et(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},async()=>Promise.resolve(),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,"TEST_FUNCTION",e.outputSchema,e.aiMetadata);case"APP_WEBHOOK":return new Et(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},async()=>Promise.resolve(),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,_e(e.sampleData)&&_e(e.test)?"SIMULATION":"TEST_FUNCTION",e.outputSchema,e.aiMetadata)}},"createTrigger");var Hs="2",Vr="0.82.0";var qo=class{constructor(t,r,n,o,a,s,u,p,d=Vr,g,x=""){this.displayName=t;this.logoUrl=r;this.authors=n;this.events=o;this.categories=u;this.auth=p;this.minimumSupportedRelease=d;this.maximumSupportedRelease=g;this.description=x;this._actions={};this._triggers={};this.getContextInfo=i(()=>({version:Hs}),"getContextInfo");(!fm(d)||mm(d,Vr))&&(this.minimumSupportedRelease=Vr),a.forEach(v=>this._actions[v.name]=v),s.forEach(v=>this._triggers[v.name]=v)}static{i(this,"Piece")}metadata(){return{displayName:this.displayName,logoUrl:this.logoUrl,actions:this._actions,triggers:this._triggers,categories:this.categories,description:this.description,authors:this.authors,auth:this.auth,minimumSupportedRelease:this.minimumSupportedRelease,maximumSupportedRelease:this.maximumSupportedRelease,contextInfo:this.getContextInfo?.()}}getAction(t){return this._actions[t]}getTrigger(t){return this._triggers[t]}actions(){return this._actions}triggers(){return this._triggers}},Zs=i(e=>{if(e.auth&&Array.isArray(e.auth)&&!e.auth.every((r,n,o)=>n===o.findIndex(a=>a.type===r.type)))throw new Error("Auth properties must be unique by type");return new qo(e.displayName,e.logoUrl,e.authors??[],e.events,e.actions,e.triggers,e.categories??[],e.auth,e.minimumSupportedRelease,e.maximumSupportedRelease,e.description)},"createPiece");function fm(e){return/^\d+\.\d+\.\d+$/.test(e)}i(fm,"isValidSimpleSemver");function mm(e,t){let[r,n,o]=e.split(".").map(Number),[a,s,u]=t.split(".").map(Number);return r!==a?r<a:n!==s?n<s:o<u}i(mm,"isSemverLessThan");var gm=P(M(c(),M(c(),c()))),qs=m({id:P(c()),name:c(),displayName:c(),logoUrl:c(),description:c(),authors:F(c()),platformId:P(c()),directoryPath:P(c()),auth:P(B([Tt,F(Tt)])),version:c(),categories:P(F(G(ar))),minimumSupportedRelease:P(c()),maximumSupportedRelease:P(c()),i18n:gm}),hm=G(["human","ai","both"]),Gs=m({description:P(c()),idempotent:P(Q())}),Ws=m({name:c(),displayName:c(),description:c(),props:Zo,requireAuth:Q(),errorHandlingOptions:P(Io),outputSchema:P(Nr()),audience:P(hm),aiMetadata:P(Gs)}),Ks=m({name:c(),displayName:c(),description:c(),props:Zo,errorHandlingOptions:P(Io),type:G(Me),sampleData:U(),handshakeConfiguration:P(Nr()),renewConfiguration:P(Vs),testStrategy:G(cr),outputSchema:P(Nr()),aiMetadata:P(Gs)}),ym=m({...qs.shape,actions:M(c(),Ws),triggers:M(c(),Ks)}),vm=m({...qs.shape,actions:be(),triggers:be(),suggestedActions:P(F(Ks)),suggestedTriggers:P(F(Ws))}),Js=m({projectUsage:be(),tags:P(F(c())),pieceType:G(Pt),packageType:G(ir),platformId:P(c()),archiveId:P(c())}),ek=m({...ym.shape,...Js.shape}),tk=m({...vm.shape,...Js.shape}),rk=m({name:c(),version:c()});var _m=Ne(require("path")),Pm=Ne(require("fs/promises"));var fr="login.microsoftonline.com",Ys="login.microsoftonline.us",Xs={[fr]:"https://graph.microsoft.com",[Ys]:"https://graph.microsoft.us"},Qs=R.StaticDropdown({displayName:"Cloud Environment",description:"Select your Microsoft cloud environment.",required:!0,defaultValue:fr,options:{disabled:!1,options:[{label:"Commercial (Global)",value:fr},{label:"US Government (GCC High)",value:Ys}]}});function eu(e){return e??fr}i(eu,"resolveCloudHost");function St(e){return eu(e.props?.cloud)}i(St,"getMicrosoftCloudFromAuth");function At(e){let t=eu(e);return Xs[t]??Xs[fr]}i(At,"getGraphBaseUrl");var hc=Ne(gc());var jh=`
4
+ 3. Same - all individual requests that state a dependency in the dependsOn property, state the same dependency.`),u.name="Invalid Dependency",u;p.label=1;case 1:return o.done?[3,3]:(a=o.value[1],[4,e.getRequestData(a.request)]);case 2:if(s=p.sent(),s.body!==void 0&&(s.headers===void 0||s.headers["content-type"]===void 0))throw u=new Error("Content-type header is not mentioned for request #".concat(a.id,", For request having body, Content-type header should be mentioned")),u.name="Invalid Content-type header",u;return s.id=a.id,a.dependsOn!==void 0&&a.dependsOn.length>0&&(s.dependsOn=a.dependsOn),t.push(s),o=n.next(),[3,1];case 3:return r.requests=t,[2,r]}})})},e.prototype.addDependency=function(t,r){if(!this.requests.has(t)){var n=new Error("Dependent ".concat(t," does not exists, Please check the id"));throw n.name="Invalid Dependent",n}if(typeof r<"u"&&!this.requests.has(r)){var n=new Error("Dependency ".concat(r," does not exists, Please check the id"));throw n.name="Invalid Dependency",n}if(typeof r<"u"){var o=this.requests.get(t);if(o.dependsOn===void 0&&(o.dependsOn=[]),o.dependsOn.indexOf(r)!==-1){var n=new Error("Dependency ".concat(r," is already added for the request ").concat(t));throw n.name="Duplicate Dependency",n}o.dependsOn.push(r)}else{for(var a=this.requests.entries(),s=void 0,u=a.next();!u.done&&u.value[1].id!==t;)s=u,u=a.next();if(typeof s<"u"){var p=s.value[0];if(u.value[1].dependsOn===void 0&&(u.value[1].dependsOn=[]),u.value[1].dependsOn.indexOf(p)!==-1){var n=new Error("Dependency ".concat(p," is already added for the request ").concat(t));throw n.name="Duplicate Dependency",n}u.value[1].dependsOn.push(p)}else{var n=new Error("Can't add dependency ".concat(r,", There is only a dependent request in the batch"));throw n.name="Invalid Dependency Addition",n}}},e.prototype.removeDependency=function(t,r){var n=this.requests.get(t);if(typeof n>"u"||n.dependsOn===void 0||n.dependsOn.length===0)return!1;if(typeof r<"u"){var o=n.dependsOn.indexOf(r);return o===-1?!1:(n.dependsOn.splice(o,1),!0)}else return delete n.dependsOn,!0},e.requestLimit=20,e})();Yr.BatchRequestContent=Vm});var Bu=b(Qr=>{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr.BatchResponseContent=void 0;var Zm=(ue(),ie(se)),qm=(function(){function e(t){this.responses=new Map,this.update(t)}return i(e,"BatchResponseContent"),e.prototype.createResponseObject=function(t){var r=t.body,n={};if(n.status=t.status,t.statusText!==void 0&&(n.statusText=t.statusText),n.headers=t.headers,n.headers!==void 0&&n.headers["Content-Type"]!==void 0&&n.headers["Content-Type"].split(";")[0]==="application/json"){var o=JSON.stringify(r);return new Response(o,n)}return new Response(r,n)},e.prototype.update=function(t){this.nextLink=t["@odata.nextLink"];for(var r=t.responses,n=0,o=r.length;n<o;n++)this.responses.set(r[n].id,this.createResponseObject(r[n]))},e.prototype.getResponseById=function(t){return this.responses.get(t)},e.prototype.getResponses=function(){return this.responses},e.prototype.getResponsesIterator=function(){var t,r;return Zm.__generator(this,function(n){switch(n.label){case 0:t=this.responses.entries(),r=t.next(),n.label=1;case 1:return r.done?[3,3]:[4,r.value];case 2:return n.sent(),r=t.next(),[3,1];case 3:return[2]}})},e})();Qr.BatchResponseContent=qm});var ei=b(ot=>{"use strict";Object.defineProperty(ot,"__esModule",{value:!0});ot.GRAPH_URLS=ot.GRAPH_BASE_URL=ot.GRAPH_API_VERSION=void 0;ot.GRAPH_API_VERSION="v1.0";ot.GRAPH_BASE_URL="https://graph.microsoft.com/";ot.GRAPH_URLS=new Set(["graph.microsoft.com","graph.microsoft.us","dod-graph.microsoft.us","graph.microsoft.de","microsoftgraph.chinacloudapi.cn","canary.graph.microsoft.com"])});var Ge=b(en=>{"use strict";Object.defineProperty(en,"__esModule",{value:!0});en.GraphClientError=void 0;var Gm=(ue(),ie(se)),Wm=(function(e){Gm.__extends(t,e);function t(r){var n=e.call(this,r)||this;return Object.setPrototypeOf(n,t.prototype),n}return i(t,"GraphClientError"),t.setGraphClientError=function(r){var n;return r instanceof Error?n=r:(n=new t,n.customError=r),n},t})(Error);en.GraphClientError=Wm});var tn=b(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.isCustomHost=ze.isGraphURL=ze.serializeContent=ze.urlJoin=ze.oDataQueryNames=void 0;var Km=ei(),Jm=Ge();ze.oDataQueryNames=["$select","$expand","$orderby","$filter","$top","$skip","$skipToken","$count"];var Xm=i(function(e){var t=i(function(a){return a.replace(/\/+$/,"")},"removePostSlash"),r=i(function(a){return a.replace(/^\/+/,"")},"removePreSlash"),n=i(function(a,s){return[t(a),r(s)].join("/")},"joiner"),o=Array.prototype.slice.call(e);return o.reduce(n)},"urlJoin");ze.urlJoin=Xm;var Ym=i(function(e){var t=e&&e.constructor&&e.constructor.name;if(t==="Buffer"||t==="Blob"||t==="File"||t==="FormData"||typeof e=="string")return e;if(t==="ArrayBuffer")e=Buffer.from(e);else if(t==="Int8Array"||t==="Int16Array"||t==="Int32Array"||t==="Uint8Array"||t==="Uint16Array"||t==="Uint32Array"||t==="Uint8ClampedArray"||t==="Float32Array"||t==="Float64Array"||t==="DataView")e=Buffer.from(e.buffer);else try{e=JSON.stringify(e)}catch{throw new Error("Unable to stringify the content")}return e},"serializeContent");ze.serializeContent=Ym;var Qm=i(function(e){return Hu(e)},"isGraphURL");ze.isGraphURL=Qm;var eg=i(function(e,t){return t.forEach(function(r){return tg(r)}),Hu(e,t)},"isCustomHost");ze.isCustomHost=eg;var Hu=i(function(e,t){if(t===void 0&&(t=Km.GRAPH_URLS),e=e.toLowerCase(),e.indexOf("https://")!==-1){e=e.replace("https://","");var r=e.indexOf(":"),n=e.indexOf("/"),o="";if(n!==-1)return r!==-1&&r<n?(o=e.substring(0,r),t.has(o)):(o=e.substring(0,n),t.has(o))}return!1},"isValidEndpoint"),tg=i(function(e){if(e.indexOf("/")!==-1)throw new Jm.GraphClientError("Please add only hosts or hostnames to the CustomHosts config. If the url is `http://example.com:3000/`, host is `example:3000`")},"isCustomHostValid")});var it=b(rn=>{"use strict";Object.defineProperty(rn,"__esModule",{value:!0});rn.MiddlewareControl=void 0;var rg=(function(){function e(t){t===void 0&&(t=[]),this.middlewareOptions=new Map;for(var r=0,n=t;r<n.length;r++){var o=n[r],a=o.constructor;this.middlewareOptions.set(a,o)}}return i(e,"MiddlewareControl"),e.prototype.getMiddlewareOptions=function(t){return this.middlewareOptions.get(t)},e.prototype.setMiddlewareOptions=function(t,r){this.middlewareOptions.set(t,r)},e})();rn.MiddlewareControl=rg});var zt=b(Re=>{"use strict";Object.defineProperty(Re,"__esModule",{value:!0});Re.cloneRequestWithNewUrl=Re.appendRequestHeader=Re.setRequestHeader=Re.getRequestHeader=Re.generateUUID=void 0;var Vu=(ue(),ie(se)),ng=i(function(){for(var e="",t=0;t<32;t++)(t===8||t===12||t===16||t===20)&&(e+="-"),e+=Math.floor(Math.random()*16).toString(16);return e},"generateUUID");Re.generateUUID=ng;var og=i(function(e,t,r){var n=null;if(typeof Request<"u"&&e instanceof Request)n=e.headers.get(r);else if(typeof t<"u"&&t.headers!==void 0)if(typeof Headers<"u"&&t.headers instanceof Headers)n=t.headers.get(r);else if(t.headers instanceof Array){for(var o=t.headers,a=0,s=o.length;a<s;a++)if(o[a][0]===r){n=o[a][1];break}}else t.headers[r]!==void 0&&(n=t.headers[r]);return n},"getRequestHeader");Re.getRequestHeader=og;var ig=i(function(e,t,r,n){var o,a;if(typeof Request<"u"&&e instanceof Request)e.headers.set(r,n);else if(typeof t<"u")if(t.headers===void 0)t.headers=new Headers((o={},o[r]=n,o));else if(typeof Headers<"u"&&t.headers instanceof Headers)t.headers.set(r,n);else if(t.headers instanceof Array){for(var s=0,u=t.headers.length;s<u;s++){var p=t.headers[s];if(p[0]===r){p[1]=n;break}}s===u&&t.headers.push([r,n])}else Object.assign(t.headers,(a={},a[r]=n,a))},"setRequestHeader");Re.setRequestHeader=ig;var ag=i(function(e,t,r,n){var o,a;typeof Request<"u"&&e instanceof Request?e.headers.append(r,n):typeof t<"u"&&(t.headers===void 0?t.headers=new Headers((o={},o[r]=n,o)):typeof Headers<"u"&&t.headers instanceof Headers?t.headers.append(r,n):t.headers instanceof Array?t.headers.push([r,n]):t.headers===void 0?t.headers=(a={},a[r]=n,a):t.headers[r]===void 0?t.headers[r]=n:t.headers[r]+=", ".concat(n))},"appendRequestHeader");Re.appendRequestHeader=ag;var sg=i(function(e,t){return Vu.__awaiter(void 0,void 0,void 0,function(){var r,n,o,a,s,u,p,d,g,x,v,l,f;return Vu.__generator(this,function(y){switch(y.label){case 0:return t.headers.get("Content-Type")?[4,t.blob()]:[3,2];case 1:return n=y.sent(),[3,4];case 2:return[4,Promise.resolve(void 0)];case 3:n=y.sent(),y.label=4;case 4:return r=n,o=t.method,a=t.headers,s=t.referrer,u=t.referrerPolicy,p=t.mode,d=t.credentials,g=t.cache,x=t.redirect,v=t.integrity,l=t.keepalive,f=t.signal,[2,new Request(e,{method:o,headers:a,body:r,referrer:s,referrerPolicy:u,mode:p,credentials:d,cache:g,redirect:x,integrity:v,keepalive:l,signal:f})]}})})},"cloneRequestWithNewUrl");Re.cloneRequestWithNewUrl=sg});var ti=b(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.AuthenticationHandlerOptions=void 0;var ug=(function(){function e(t,r){this.authenticationProvider=t,this.authenticationProviderOptions=r}return i(e,"AuthenticationHandlerOptions"),e})();nn.AuthenticationHandlerOptions=ug});var kt=b(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.TelemetryHandlerOptions=Rt.FeatureUsageFlag=void 0;var Zu=it(),ri;(function(e){e[e.NONE=0]="NONE",e[e.REDIRECT_HANDLER_ENABLED=1]="REDIRECT_HANDLER_ENABLED",e[e.RETRY_HANDLER_ENABLED=2]="RETRY_HANDLER_ENABLED",e[e.AUTHENTICATION_HANDLER_ENABLED=4]="AUTHENTICATION_HANDLER_ENABLED"})(ri||(Rt.FeatureUsageFlag=ri={}));var cg=(function(){function e(){this.featureUsage=ri.NONE}return i(e,"TelemetryHandlerOptions"),e.updateFeatureUsageFlag=function(t,r){var n;t.middlewareControl instanceof Zu.MiddlewareControl?n=t.middlewareControl.getMiddlewareOptions(e):t.middlewareControl=new Zu.MiddlewareControl,typeof n>"u"&&(n=new e,t.middlewareControl.setMiddlewareOptions(e,n)),n.setFeatureUsage(r)},e.prototype.setFeatureUsage=function(t){this.featureUsage=this.featureUsage|t},e.prototype.getFeatureUsage=function(){return this.featureUsage.toString(16)},e})();Rt.TelemetryHandlerOptions=cg});var an=b(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.AuthenticationHandler=void 0;var qu=(ue(),ie(se)),Gu=tn(),lg=it(),pg=zt(),dg=ti(),Wu=kt(),fg=(function(){function e(t){this.authenticationProvider=t}return i(e,"AuthenticationHandler"),e.prototype.execute=function(t){return qu.__awaiter(this,void 0,void 0,function(){var r,n,o,a,s,u;return qu.__generator(this,function(p){switch(p.label){case 0:return r=typeof t.request=="string"?t.request:t.request.url,(0,Gu.isGraphURL)(r)||t.customHosts&&(0,Gu.isCustomHost)(r,t.customHosts)?(n=void 0,t.middlewareControl instanceof lg.MiddlewareControl&&(n=t.middlewareControl.getMiddlewareOptions(dg.AuthenticationHandlerOptions)),o=void 0,a=void 0,n&&(o=n.authenticationProvider,a=n.authenticationProviderOptions),o||(o=this.authenticationProvider),[4,o.getAccessToken(a)]):[3,2];case 1:return s=p.sent(),u="Bearer ".concat(s),(0,pg.appendRequestHeader)(t.request,t.options,e.AUTHORIZATION_HEADER,u),Wu.TelemetryHandlerOptions.updateFeatureUsageFlag(t,Wu.FeatureUsageFlag.AUTHENTICATION_HANDLER_ENABLED),[3,3];case 2:t.options.headers&&delete t.options.headers[e.AUTHORIZATION_HEADER],p.label=3;case 3:return[4,this.nextMiddleware.execute(t)];case 4:return[2,p.sent()]}})})},e.prototype.setNext=function(t){this.nextMiddleware=t},e.AUTHORIZATION_HEADER="Authorization",e})();on.AuthenticationHandler=fg});var un=b(sn=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});sn.HTTPMessageHandler=void 0;var Ku=(ue(),ie(se)),mg=(function(){function e(){}return i(e,"HTTPMessageHandler"),e.prototype.execute=function(t){return Ku.__awaiter(this,void 0,void 0,function(){var r;return Ku.__generator(this,function(n){switch(n.label){case 0:return r=t,[4,fetch(t.request,t.options)];case 1:return r.response=n.sent(),[2]}})})},e})();sn.HTTPMessageHandler=mg});var hr=b(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.RetryHandlerOptions=void 0;var gg=(function(){function e(t,r,n){if(t===void 0&&(t=e.DEFAULT_DELAY),r===void 0&&(r=e.DEFAULT_MAX_RETRIES),n===void 0&&(n=e.defaultShouldRetry),t>e.MAX_DELAY&&r>e.MAX_MAX_RETRIES){var o=new Error("Delay and MaxRetries should not be more than ".concat(e.MAX_DELAY," and ").concat(e.MAX_MAX_RETRIES));throw o.name="MaxLimitExceeded",o}else if(t>e.MAX_DELAY){var o=new Error("Delay should not be more than ".concat(e.MAX_DELAY));throw o.name="MaxLimitExceeded",o}else if(r>e.MAX_MAX_RETRIES){var o=new Error("MaxRetries should not be more than ".concat(e.MAX_MAX_RETRIES));throw o.name="MaxLimitExceeded",o}else if(t<0&&r<0){var o=new Error("Delay and MaxRetries should not be negative");throw o.name="MinExpectationNotMet",o}else if(t<0){var o=new Error("Delay should not be negative");throw o.name="MinExpectationNotMet",o}else if(r<0){var o=new Error("MaxRetries should not be negative");throw o.name="MinExpectationNotMet",o}this.delay=Math.min(t,e.MAX_DELAY),this.maxRetries=Math.min(r,e.MAX_MAX_RETRIES),this.shouldRetry=n}return i(e,"RetryHandlerOptions"),e.prototype.getMaxDelay=function(){return e.MAX_DELAY},e.DEFAULT_DELAY=3,e.DEFAULT_MAX_RETRIES=3,e.MAX_DELAY=180,e.MAX_MAX_RETRIES=10,e.defaultShouldRetry=function(){return!0},e})();cn.RetryHandlerOptions=gg});var pn=b(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.RetryHandler=void 0;var Dt=(ue(),ie(se)),ni=gr(),hg=it(),Ju=zt(),Xu=hr(),Yu=kt(),yg=(function(){function e(t){t===void 0&&(t=new Xu.RetryHandlerOptions),this.options=t}return i(e,"RetryHandler"),e.prototype.isRetry=function(t){return e.RETRY_STATUS_CODES.indexOf(t.status)!==-1},e.prototype.isBuffered=function(t,r){var n=typeof t=="string"?r.method:t.method,o=n===ni.RequestMethod.PUT||n===ni.RequestMethod.PATCH||n===ni.RequestMethod.POST;if(o){var a=(0,Ju.getRequestHeader)(t,r,"Content-Type")==="application/octet-stream";if(a)return!1}return!0},e.prototype.getDelay=function(t,r,n){var o=i(function(){return Number(Math.random().toFixed(3))},"getRandomness"),a=t.headers!==void 0?t.headers.get(e.RETRY_AFTER_HEADER):null,s;return a!==null?Number.isNaN(Number(a))?s=Math.round((new Date(a).getTime()-Date.now())/1e3):s=Number(a):s=r>=2?this.getExponentialBackOffTime(r)+n+o():n+o(),Math.min(s,this.options.getMaxDelay()+o())},e.prototype.getExponentialBackOffTime=function(t){return Math.round(1/2*(Math.pow(2,t)-1))},e.prototype.sleep=function(t){return Dt.__awaiter(this,void 0,void 0,function(){var r;return Dt.__generator(this,function(n){return r=t*1e3,[2,new Promise(function(o){return setTimeout(o,r)})]})})},e.prototype.getOptions=function(t){var r;return t.middlewareControl instanceof hg.MiddlewareControl&&(r=t.middlewareControl.getMiddlewareOptions(this.options.constructor)),typeof r>"u"&&(r=Object.assign(new Xu.RetryHandlerOptions,this.options)),r},e.prototype.executeWithRetry=function(t,r,n){return Dt.__awaiter(this,void 0,void 0,function(){var o;return Dt.__generator(this,function(a){switch(a.label){case 0:return[4,this.nextMiddleware.execute(t)];case 1:return a.sent(),r<n.maxRetries&&this.isRetry(t.response)&&this.isBuffered(t.request,t.options)&&n.shouldRetry(n.delay,r,t.request,t.options,t.response)?(++r,(0,Ju.setRequestHeader)(t.request,t.options,e.RETRY_ATTEMPT_HEADER,r.toString()),o=this.getDelay(t.response,r,n.delay),[4,this.sleep(o)]):[3,4];case 2:return a.sent(),[4,this.executeWithRetry(t,r,n)];case 3:return[2,a.sent()];case 4:return[2]}})})},e.prototype.execute=function(t){return Dt.__awaiter(this,void 0,void 0,function(){var r,n;return Dt.__generator(this,function(o){switch(o.label){case 0:return r=0,n=this.getOptions(t),Yu.TelemetryHandlerOptions.updateFeatureUsageFlag(t,Yu.FeatureUsageFlag.RETRY_HANDLER_ENABLED),[4,this.executeWithRetry(t,r,n)];case 1:return[2,o.sent()]}})})},e.prototype.setNext=function(t){this.nextMiddleware=t},e.RETRY_STATUS_CODES=[429,503,504],e.RETRY_ATTEMPT_HEADER="Retry-Attempt",e.RETRY_AFTER_HEADER="Retry-After",e})();ln.RetryHandler=yg});var yr=b(dn=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn.RedirectHandlerOptions=void 0;var vg=(function(){function e(t,r){if(t===void 0&&(t=e.DEFAULT_MAX_REDIRECTS),r===void 0&&(r=e.defaultShouldRedirect),t>e.MAX_MAX_REDIRECTS){var n=new Error("MaxRedirects should not be more than ".concat(e.MAX_MAX_REDIRECTS));throw n.name="MaxLimitExceeded",n}if(t<0){var n=new Error("MaxRedirects should not be negative");throw n.name="MinExpectationNotMet",n}this.maxRedirects=t,this.shouldRedirect=r}return i(e,"RedirectHandlerOptions"),e.DEFAULT_MAX_REDIRECTS=5,e.MAX_MAX_REDIRECTS=20,e.defaultShouldRedirect=function(){return!0},e})();dn.RedirectHandlerOptions=vg});var mn=b(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.RedirectHandler=void 0;var Ct=(ue(),ie(se)),_g=gr(),Pg=it(),xg=zt(),oi=yr(),Qu=kt(),bg=(function(){function e(t){t===void 0&&(t=new oi.RedirectHandlerOptions),this.options=t}return i(e,"RedirectHandler"),e.prototype.isRedirect=function(t){return e.REDIRECT_STATUS_CODES.indexOf(t.status)!==-1},e.prototype.hasLocationHeader=function(t){return t.headers.has(e.LOCATION_HEADER)},e.prototype.getLocationHeader=function(t){return t.headers.get(e.LOCATION_HEADER)},e.prototype.isRelativeURL=function(t){return t.indexOf("://")===-1},e.prototype.shouldDropAuthorizationHeader=function(t,r){var n=/^[A-Za-z].+?:\/\/.+?(?=\/|$)/,o=n.exec(t),a,s;o!==null&&(a=o[0]);var u=n.exec(r);return u!==null&&(s=u[0]),typeof a<"u"&&typeof s<"u"&&a!==s},e.prototype.updateRequestUrl=function(t,r){return Ct.__awaiter(this,void 0,void 0,function(){var n,o;return Ct.__generator(this,function(a){switch(a.label){case 0:return n=r,typeof r.request!="string"?[3,1]:(o=t,[3,3]);case 1:return[4,(0,xg.cloneRequestWithNewUrl)(t,r.request)];case 2:o=a.sent(),a.label=3;case 3:return n.request=o,[2]}})})},e.prototype.getOptions=function(t){var r;return t.middlewareControl instanceof Pg.MiddlewareControl&&(r=t.middlewareControl.getMiddlewareOptions(oi.RedirectHandlerOptions)),typeof r>"u"&&(r=Object.assign(new oi.RedirectHandlerOptions,this.options)),r},e.prototype.executeWithRedirect=function(t,r,n){return Ct.__awaiter(this,void 0,void 0,function(){var o,a;return Ct.__generator(this,function(s){switch(s.label){case 0:return[4,this.nextMiddleware.execute(t)];case 1:return s.sent(),o=t.response,r<n.maxRedirects&&this.isRedirect(o)&&this.hasLocationHeader(o)&&n.shouldRedirect(o)?(++r,o.status!==e.STATUS_CODE_SEE_OTHER?[3,2]:(t.options.method=_g.RequestMethod.GET,delete t.options.body,[3,4])):[3,6];case 2:return a=this.getLocationHeader(o),!this.isRelativeURL(a)&&this.shouldDropAuthorizationHeader(o.url,a)&&delete t.options.headers[e.AUTHORIZATION_HEADER],[4,this.updateRequestUrl(a,t)];case 3:s.sent(),s.label=4;case 4:return[4,this.executeWithRedirect(t,r,n)];case 5:return s.sent(),[3,7];case 6:return[2];case 7:return[2]}})})},e.prototype.execute=function(t){return Ct.__awaiter(this,void 0,void 0,function(){var r,n;return Ct.__generator(this,function(o){switch(o.label){case 0:return r=0,n=this.getOptions(t),t.options.redirect=e.MANUAL_REDIRECT,Qu.TelemetryHandlerOptions.updateFeatureUsageFlag(t,Qu.FeatureUsageFlag.REDIRECT_HANDLER_ENABLED),[4,this.executeWithRedirect(t,r,n)];case 1:return[2,o.sent()]}})})},e.prototype.setNext=function(t){this.nextMiddleware=t},e.REDIRECT_STATUS_CODES=[301,302,303,307,308],e.STATUS_CODE_SEE_OTHER=303,e.LOCATION_HEADER="Location",e.AUTHORIZATION_HEADER="Authorization",e.MANUAL_REDIRECT="manual",e})();fn.RedirectHandler=bg});var ec=b(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.PACKAGE_VERSION=void 0;gn.PACKAGE_VERSION="3.0.7"});var vn=b(yn=>{"use strict";Object.defineProperty(yn,"__esModule",{value:!0});yn.TelemetryHandler=void 0;var tc=(ue(),ie(se)),rc=tn(),Tg=ec(),Eg=it(),hn=zt(),Ig=kt(),Ag=(function(){function e(){}return i(e,"TelemetryHandler"),e.prototype.execute=function(t){return tc.__awaiter(this,void 0,void 0,function(){var r,n,o,a,s;return tc.__generator(this,function(u){switch(u.label){case 0:return r=typeof t.request=="string"?t.request:t.request.url,(0,rc.isGraphURL)(r)||t.customHosts&&(0,rc.isCustomHost)(r,t.customHosts)?(n=(0,hn.getRequestHeader)(t.request,t.options,e.CLIENT_REQUEST_ID_HEADER),n||(n=(0,hn.generateUUID)(),(0,hn.setRequestHeader)(t.request,t.options,e.CLIENT_REQUEST_ID_HEADER,n)),o="".concat(e.PRODUCT_NAME,"/").concat(Tg.PACKAGE_VERSION),a=void 0,t.middlewareControl instanceof Eg.MiddlewareControl&&(a=t.middlewareControl.getMiddlewareOptions(Ig.TelemetryHandlerOptions)),a&&(s=a.getFeatureUsage(),o+=" (".concat(e.FEATURE_USAGE_STRING,"=").concat(s,")")),(0,hn.appendRequestHeader)(t.request,t.options,e.SDK_VERSION_HEADER,o)):(delete t.options.headers[e.CLIENT_REQUEST_ID_HEADER],delete t.options.headers[e.SDK_VERSION_HEADER]),[4,this.nextMiddleware.execute(t)];case 1:return[2,u.sent()]}})})},e.prototype.setNext=function(t){this.nextMiddleware=t},e.CLIENT_REQUEST_ID_HEADER="client-request-id",e.SDK_VERSION_HEADER="SdkVersion",e.PRODUCT_NAME="graph-js",e.FEATURE_USAGE_STRING="featureUsage",e})();yn.TelemetryHandler=Ag});var nc=b(_n=>{"use strict";Object.defineProperty(_n,"__esModule",{value:!0});_n.MiddlewareFactory=void 0;var Sg=an(),$g=un(),wg=yr(),Og=hr(),zg=mn(),Rg=pn(),kg=vn(),Dg=i(function(){return typeof process=="object"&&typeof require=="function"},"isNodeEnvironment"),Cg=(function(){function e(){}return i(e,"MiddlewareFactory"),e.getDefaultMiddlewareChain=function(t){var r=[],n=new Sg.AuthenticationHandler(t),o=new Rg.RetryHandler(new Og.RetryHandlerOptions),a=new kg.TelemetryHandler,s=new $g.HTTPMessageHandler;if(r.push(n),r.push(o),Dg()){var u=new zg.RedirectHandler(new wg.RedirectHandlerOptions);r.push(u)}return r.push(a),r.push(s),r},e})();_n.MiddlewareFactory=Cg});var xn=b(Pn=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});Pn.ChaosStrategy=void 0;var oc;(function(e){e[e.MANUAL=0]="MANUAL",e[e.RANDOM=1]="RANDOM"})(oc||(Pn.ChaosStrategy=oc={}))});var ii=b(bn=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});bn.ChaosHandlerOptions=void 0;var Ng=xn(),Ug=(function(){function e(t,r,n,o,a,s){if(t===void 0&&(t=Ng.ChaosStrategy.RANDOM),r===void 0&&(r="Some error Happened"),this.chaosStrategy=t,this.statusCode=n,this.statusMessage=r,this.chaosPercentage=o!==void 0?o:10,this.responseBody=a,this.headers=s,this.chaosPercentage>100)throw new Error("Error Pecentage can not be more than 100")}return i(e,"ChaosHandlerOptions"),e})();bn.ChaosHandlerOptions=Ug});var ic=b(Nt=>{"use strict";Object.defineProperty(Nt,"__esModule",{value:!0});Nt.httpStatusCode=Nt.methodStatusCode=void 0;Nt.methodStatusCode={GET:[429,500,502,503,504],POST:[429,500,502,503,504,507],PUT:[429,500,502,503,504,507],PATCH:[429,500,502,503,504],DELETE:[429,500,502,503,504,507]};Nt.httpStatusCode={100:"Continue",101:"Switching Protocols",102:"Processing",103:"Early Hints",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",510:"Not Extended",511:"Network Authentication Required"}});var uc=b(En=>{"use strict";Object.defineProperty(En,"__esModule",{value:!0});En.ChaosHandler=void 0;var Tn=(ue(),ie(se)),Mg=it(),Lg=zt(),ac=ic(),ai=ii(),sc=xn(),jg=(function(){function e(t,r){t===void 0&&(t=new ai.ChaosHandlerOptions),this.options=t,this.manualMap=r}return i(e,"ChaosHandler"),e.prototype.createResponseHeaders=function(t,r,n){var o=t.headers?new Headers(t.headers):new Headers;return o.append("Cache-Control","no-store"),o.append("request-id",r),o.append("client-request-id",r),o.append("x-ms-ags-diagnostic",""),o.append("Date",n),o.append("Strict-Transport-Security",""),t.statusCode===429&&o.append("retry-after","3"),o},e.prototype.createResponseBody=function(t,r,n){if(t.responseBody)return t.responseBody;var o;if(t.statusCode>=400){var a=ac.httpStatusCode[t.statusCode],s=t.statusMessage;o={error:{code:a,message:s,innerError:{"request-id":r,date:n}}}}else o={};return o},e.prototype.createResponse=function(t,r){var n=r.request,o=(0,Lg.generateUUID)(),a=new Date,s=this.createResponseHeaders(t,o,a.toString()),u=this.createResponseBody(t,o,a.toString()),p={url:n,status:t.statusCode,statusText:t.statusMessage,headers:s};r.response=new Response(typeof u=="string"?u:JSON.stringify(u),p)},e.prototype.sendRequest=function(t,r){return Tn.__awaiter(this,void 0,void 0,function(){return Tn.__generator(this,function(n){switch(n.label){case 0:return this.setStatusCode(t,r.request,r.options.method),t.chaosStrategy===sc.ChaosStrategy.MANUAL&&!this.nextMiddleware||Math.floor(Math.random()*100)<t.chaosPercentage?(this.createResponse(t,r),[3,3]):[3,1];case 1:return this.nextMiddleware?[4,this.nextMiddleware.execute(r)]:[3,3];case 2:n.sent(),n.label=3;case 3:return[2]}})})},e.prototype.getRandomStatusCode=function(t){var r=ac.methodStatusCode[t];return r[Math.floor(Math.random()*r.length)]},e.prototype.getRelativeURL=function(t){var r=/https?:\/\/graph\.microsoft\.com\/[^/]+(.+?)(\?|$)/,n;return r.exec(t)!==null&&(n=r.exec(t)[1]),n},e.prototype.setStatusCode=function(t,r,n){var o=this;if(t.chaosStrategy===sc.ChaosStrategy.MANUAL){if(t.statusCode===void 0){var a=this.getRelativeURL(r);this.manualMap.get(a)!==void 0?this.manualMap.get(a).get(n)!==void 0&&(t.statusCode=this.manualMap.get(a).get(n)):this.manualMap.forEach(function(s,u){var p=new RegExp(u+"$");p.test(a)&&o.manualMap.get(u).get(n)!==void 0&&(t.statusCode=o.manualMap.get(u).get(n))})}}else t.statusCode=this.getRandomStatusCode(n)},e.prototype.getOptions=function(t){var r;return t.middlewareControl instanceof Mg.MiddlewareControl&&(r=t.middlewareControl.getMiddlewareOptions(ai.ChaosHandlerOptions)),typeof r>"u"&&(r=Object.assign(new ai.ChaosHandlerOptions,this.options)),r},e.prototype.execute=function(t){return Tn.__awaiter(this,void 0,void 0,function(){var r;return Tn.__generator(this,function(n){switch(n.label){case 0:return r=this.getOptions(t),[4,this.sendRequest(r,t)];case 1:return[2,n.sent()]}})})},e.prototype.setNext=function(t){this.nextMiddleware=t},e})();En.ChaosHandler=jg});var vr=b(In=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});In.ResponseType=void 0;var cc;(function(e){e.ARRAYBUFFER="arraybuffer",e.BLOB="blob",e.DOCUMENT="document",e.JSON="json",e.RAW="raw",e.STREAM="stream",e.TEXT="text"})(cc||(In.ResponseType=cc={}))});var ui=b(Ut=>{"use strict";Object.defineProperty(Ut,"__esModule",{value:!0});Ut.GraphResponseHandler=Ut.DocumentType=void 0;var An=(ue(),ie(se)),mt=vr(),si;(function(e){e.TEXT_HTML="text/html",e.TEXT_XML="text/xml",e.APPLICATION_XML="application/xml",e.APPLICATION_XHTML="application/xhtml+xml"})(si||(Ut.DocumentType=si={}));var Sn;(function(e){e.TEXT_PLAIN="text/plain",e.APPLICATION_JSON="application/json"})(Sn||(Sn={}));var $n;(function(e){e.DOCUMENT="^(text\\/(html|xml))|(application\\/(xml|xhtml\\+xml))$",e.IMAGE="^image\\/.+"})($n||($n={}));var Fg=(function(){function e(){}return i(e,"GraphResponseHandler"),e.parseDocumentResponse=function(t,r){return typeof DOMParser<"u"?new Promise(function(n,o){t.text().then(function(a){try{var s=new DOMParser,u=s.parseFromString(a,r);n(u)}catch(p){o(p)}})}):Promise.resolve(t.body)},e.convertResponse=function(t,r){return An.__awaiter(this,void 0,void 0,function(){var n,o,a,s;return An.__generator(this,function(u){switch(u.label){case 0:if(t.status===204)return[2,Promise.resolve()];switch(o=t.headers.get("Content-type"),a=r,a){case mt.ResponseType.ARRAYBUFFER:return[3,1];case mt.ResponseType.BLOB:return[3,3];case mt.ResponseType.DOCUMENT:return[3,5];case mt.ResponseType.JSON:return[3,7];case mt.ResponseType.STREAM:return[3,9];case mt.ResponseType.TEXT:return[3,11]}return[3,13];case 1:return[4,t.arrayBuffer()];case 2:return n=u.sent(),[3,24];case 3:return[4,t.blob()];case 4:return n=u.sent(),[3,24];case 5:return[4,e.parseDocumentResponse(t,si.TEXT_XML)];case 6:return n=u.sent(),[3,24];case 7:return[4,t.json()];case 8:return n=u.sent(),[3,24];case 9:return[4,Promise.resolve(t.body)];case 10:return n=u.sent(),[3,24];case 11:return[4,t.text()];case 12:return n=u.sent(),[3,24];case 13:return o===null?[3,22]:(s=o.split(";")[0],new RegExp($n.DOCUMENT).test(s)?[4,e.parseDocumentResponse(t,s)]:[3,15]);case 14:return n=u.sent(),[3,21];case 15:return new RegExp($n.IMAGE).test(s)?(n=t.blob(),[3,21]):[3,16];case 16:return s!==Sn.TEXT_PLAIN?[3,18]:[4,t.text()];case 17:return n=u.sent(),[3,21];case 18:return s!==Sn.APPLICATION_JSON?[3,20]:[4,t.json()];case 19:return n=u.sent(),[3,21];case 20:n=Promise.resolve(t.body),u.label=21;case 21:return[3,23];case 22:n=Promise.resolve(t.body),u.label=23;case 23:return[3,24];case 24:return[2,n]}})})},e.getResponse=function(t,r,n){return An.__awaiter(this,void 0,void 0,function(){var o;return An.__generator(this,function(a){switch(a.label){case 0:return r!==mt.ResponseType.RAW?[3,1]:[2,Promise.resolve(t)];case 1:return[4,e.convertResponse(t,r)];case 2:if(o=a.sent(),t.ok)if(typeof n=="function")n(null,o);else return[2,o];else throw o;a.label=3;case 3:return[2]}})})},e})();Ut.GraphResponseHandler=Fg});var ci=b(wn=>{"use strict";Object.defineProperty(wn,"__esModule",{value:!0});wn.Range=void 0;var Bg=(function(){function e(t,r){t===void 0&&(t=-1),r===void 0&&(r=-1),this.minValue=t,this.maxValue=r}return i(e,"Range"),e})();wn.Range=Bg});var li=b(On=>{"use strict";Object.defineProperty(On,"__esModule",{value:!0});On.UploadResult=void 0;var Hg=(function(){function e(t,r){this._location=r,this._responseBody=t}return i(e,"UploadResult"),Object.defineProperty(e.prototype,"location",{get:i(function(){return this._location},"get"),set:i(function(t){this._location=t},"set"),enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"responseBody",{get:i(function(){return this._responseBody},"get"),set:i(function(t){this._responseBody=t},"set"),enumerable:!1,configurable:!0}),e.CreateUploadResult=function(t,r){return new e(t,r.get("location"))},e})();On.UploadResult=Hg});var di=b(Rn=>{"use strict";Object.defineProperty(Rn,"__esModule",{value:!0});Rn.LargeFileUploadTask=void 0;var Ie=(ue(),ie(se)),pi=Ge(),Vg=ui(),lc=vr(),zn=ci(),Zg=li(),qg=(function(){function e(t,r,n,o){if(o===void 0&&(o={}),this.DEFAULT_FILE_SIZE=5*1024*1024,this.client=t,r.sliceFile)this.file=r;else throw new pi.GraphClientError("Please pass the FileUpload object, StreamUpload object or any custom implementation of the FileObject interface");this.file=r,o.rangeSize||(o.rangeSize=this.DEFAULT_FILE_SIZE),this.options=o,this.uploadSession=n,this.nextRange=new zn.Range(0,this.options.rangeSize-1)}return i(e,"LargeFileUploadTask"),e.createUploadSession=function(t,r,n,o){return o===void 0&&(o={}),Ie.__awaiter(this,void 0,void 0,function(){var a,s;return Ie.__generator(this,function(u){switch(u.label){case 0:return[4,t.api(r).headers(o).post(n)];case 1:return a=u.sent(),s={url:a.uploadUrl,expiry:new Date(a.expirationDateTime),isCancelled:!1},[2,s]}})})},e.prototype.parseRange=function(t){var r=t[0];if(typeof r>"u"||r==="")return new zn.Range;var n=r.split("-"),o=parseInt(n[0],10),a=parseInt(n[1],10);return Number.isNaN(a)&&(a=this.file.size-1),new zn.Range(o,a)},e.prototype.updateTaskStatus=function(t){this.uploadSession.expiry=new Date(t.expirationDateTime),this.nextRange=this.parseRange(t.nextExpectedRanges)},e.prototype.getNextRange=function(){if(this.nextRange.minValue===-1)return this.nextRange;var t=this.nextRange.minValue,r=t+this.options.rangeSize-1;return r>=this.file.size&&(r=this.file.size-1),new zn.Range(t,r)},e.prototype.sliceFile=function(t){if(console.warn("The LargeFileUploadTask.sliceFile() function has been deprecated and moved into the FileObject interface."),this.file.content instanceof ArrayBuffer||this.file.content instanceof Blob||this.file.content instanceof Uint8Array)return this.file.content.slice(t.minValue,t.maxValue+1);throw new pi.GraphClientError("The LargeFileUploadTask.sliceFile() function expects only Blob, ArrayBuffer or Uint8Array file content. Please note that the sliceFile() function is deprecated.")},e.prototype.upload=function(){return Ie.__awaiter(this,void 0,void 0,function(){var t,r,n,o,a,s,u;return Ie.__generator(this,function(p){switch(p.label){case 0:t=this.options&&this.options.uploadEventHandlers,p.label=1;case 1:if(this.uploadSession.isCancelled)return[3,5];if(r=this.getNextRange(),r.maxValue===-1)throw n=new Error("Task with which you are trying to upload is already completed, Please check for your uploaded file"),n.name="Invalid Session",n;return[4,this.file.sliceFile(r)];case 2:return o=p.sent(),[4,this.uploadSliceGetRawResponse(o,r,this.file.size)];case 3:if(a=p.sent(),!a)throw new pi.GraphClientError("Something went wrong! Large file upload slice response is null.");return[4,Vg.GraphResponseHandler.getResponse(a)];case 4:return s=p.sent(),a.status===201||a.status===200&&s.id?(this.reportProgress(t,r),[2,Zg.UploadResult.CreateUploadResult(s,a.headers)]):(u={expirationDateTime:s.expirationDateTime||s.ExpirationDateTime,nextExpectedRanges:s.NextExpectedRanges||s.nextExpectedRanges},this.updateTaskStatus(u),this.reportProgress(t,r),[3,1]);case 5:return[2]}})})},e.prototype.reportProgress=function(t,r){t&&t.progress&&t.progress(r,t.extraCallbackParam)},e.prototype.uploadSlice=function(t,r,n){return Ie.__awaiter(this,void 0,void 0,function(){return Ie.__generator(this,function(o){switch(o.label){case 0:return[4,this.client.api(this.uploadSession.url).headers({"Content-Length":"".concat(r.maxValue-r.minValue+1),"Content-Range":"bytes ".concat(r.minValue,"-").concat(r.maxValue,"/").concat(n),"Content-Type":"application/octet-stream"}).put(t)];case 1:return[2,o.sent()]}})})},e.prototype.uploadSliceGetRawResponse=function(t,r,n){return Ie.__awaiter(this,void 0,void 0,function(){return Ie.__generator(this,function(o){switch(o.label){case 0:return[4,this.client.api(this.uploadSession.url).headers({"Content-Length":"".concat(r.maxValue-r.minValue+1),"Content-Range":"bytes ".concat(r.minValue,"-").concat(r.maxValue,"/").concat(n),"Content-Type":"application/octet-stream"}).responseType(lc.ResponseType.RAW).put(t)];case 1:return[2,o.sent()]}})})},e.prototype.cancel=function(){return Ie.__awaiter(this,void 0,void 0,function(){var t;return Ie.__generator(this,function(r){switch(r.label){case 0:return[4,this.client.api(this.uploadSession.url).responseType(lc.ResponseType.RAW).delete()];case 1:return t=r.sent(),t.status===204&&(this.uploadSession.isCancelled=!0),[2,t]}})})},e.prototype.getStatus=function(){return Ie.__awaiter(this,void 0,void 0,function(){var t;return Ie.__generator(this,function(r){switch(r.label){case 0:return[4,this.client.api(this.uploadSession.url).get()];case 1:return t=r.sent(),this.updateTaskStatus(t),[2,t]}})})},e.prototype.resume=function(){return Ie.__awaiter(this,void 0,void 0,function(){return Ie.__generator(this,function(t){switch(t.label){case 0:return[4,this.getStatus()];case 1:return t.sent(),[4,this.upload()];case 2:return[2,t.sent()]}})})},e.prototype.getUploadSession=function(){return this.uploadSession},e})();Rn.LargeFileUploadTask=qg});var fi=b(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});kn.FileUpload=void 0;var Gg=Ge(),Wg=(function(){function e(t,r,n){if(this.content=t,this.name=r,this.size=n,!t||!r||!n)throw new Gg.GraphClientError("Please provide the upload content, name of the file and size of the file")}return i(e,"FileUpload"),e.prototype.sliceFile=function(t){return this.content.slice(t.minValue,t.maxValue+1)},e})();kn.FileUpload=Wg});var mi=b(Dn=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});Dn.getValidRangeSize=void 0;var Kg=5*1024*1024,Jg=i(function(e){return e>320*1024&&(e=Math.floor(e/(320*1024))*320*1024),e},"roundTo320KB"),Xg=i(function(e){e===void 0&&(e=Kg);var t=60*1024*1024;return e>t&&(e=t),Jg(e)},"getValidRangeSize");Dn.getValidRangeSize=Xg});var dc=b(Cn=>{"use strict";Object.defineProperty(Cn,"__esModule",{value:!0});Cn.OneDriveLargeFileUploadTask=void 0;var We=(ue(),ie(se)),pc=Ge(),Yg=fi(),Qg=di(),eh=mi(),th=(function(e){We.__extends(t,e);function t(r,n,o,a){return e.call(this,r,n,o,a)||this}return i(t,"OneDriveLargeFileUploadTask"),t.constructCreateSessionUrl=function(r,n){return n===void 0&&(n=t.DEFAULT_UPLOAD_PATH),r=r.trim(),n=n.trim(),n===""&&(n="/"),n[0]!=="/"&&(n="/".concat(n)),n[n.length-1]!=="/"&&(n="".concat(n,"/")),"/me/drive/root:".concat(n.split("/").map(function(o){return encodeURIComponent(o)}).join("/")).concat(encodeURIComponent(r),":/createUploadSession")},t.getFileInfo=function(r,n){var o,a;if(typeof Blob<"u"&&r instanceof Blob)o=new File([r],n),a=o.size;else if(typeof File<"u"&&r instanceof File)o=r,a=o.size;else if(typeof Uint8Array<"u"&&r instanceof Uint8Array){var s=r;a=s.byteLength,o=s.buffer.slice(s.byteOffset,s.byteOffset+s.byteLength)}return{content:o,size:a}},t.create=function(r,n,o){return We.__awaiter(this,void 0,void 0,function(){var a,s,u;return We.__generator(this,function(p){if(!r||!n||!o)throw new pc.GraphClientError("Please provide the Graph client instance, file object and OneDriveLargeFileUploadOptions value");return a=o.fileName,s=t.getFileInfo(n,a),u=new Yg.FileUpload(s.content,a,s.size),[2,this.createTaskWithFileObject(r,u,o)]})})},t.createTaskWithFileObject=function(r,n,o){return We.__awaiter(this,void 0,void 0,function(){var a,s,u,p;return We.__generator(this,function(d){switch(d.label){case 0:if(!r||!n||!o)throw new pc.GraphClientError("Please provide the Graph client instance, FileObject interface implementation and OneDriveLargeFileUploadOptions value");return a=o.uploadSessionURL?o.uploadSessionURL:t.constructCreateSessionUrl(o.fileName,o.path),s={fileName:o.fileName,fileDescription:o.fileDescription,conflictBehavior:o.conflictBehavior},[4,t.createUploadSession(r,a,s)];case 1:return u=d.sent(),p=(0,eh.getValidRangeSize)(o.rangeSize),[2,new t(r,n,u,{rangeSize:p,uploadEventHandlers:o.uploadEventHandlers})]}})})},t.createUploadSession=function(r,n,o){return We.__awaiter(this,void 0,void 0,function(){var a;return We.__generator(this,function(s){return a={item:{"@microsoft.graph.conflictBehavior":o?.conflictBehavior||"rename",name:o?.fileName,description:o?.fileDescription}},[2,e.createUploadSession.call(this,r,n,a)]})})},t.prototype.commit=function(r,n){return n===void 0&&(n="rename"),We.__awaiter(this,void 0,void 0,function(){var o;return We.__generator(this,function(a){switch(a.label){case 0:return o={name:this.file.name,"@microsoft.graph.conflictBehavior":n,"@microsoft.graph.sourceUrl":this.uploadSession.url},[4,this.client.api(r).put(o)];case 1:return[2,a.sent()]}})})},t.DEFAULT_UPLOAD_PATH="/",t})(Qg.LargeFileUploadTask);Cn.OneDriveLargeFileUploadTask=th});var mc=b(Nn=>{"use strict";Object.defineProperty(Nn,"__esModule",{value:!0});Nn.StreamUpload=void 0;var fc=(ue(),ie(se)),_r=Ge(),rh=(function(){function e(t,r,n){if(this.content=t,this.name=r,this.size=n,!t||!r||!n)throw new _r.GraphClientError("Please provide the Readable Stream content, name of the file and size of the file")}return i(e,"StreamUpload"),e.prototype.sliceFile=function(t){return fc.__awaiter(this,void 0,void 0,function(){var r,n,o,a,s,u,p;return fc.__generator(this,function(d){switch(d.label){case 0:if(r=t.maxValue-t.minValue+1,n=[],this.previousSlice){if(t.minValue<this.previousSlice.range.minValue)throw new _r.GraphClientError("An error occurred while uploading the stream. Please restart the stream upload from the first byte of the file.");if(t.minValue<this.previousSlice.range.maxValue){if(o=this.previousSlice.range.minValue,a=this.previousSlice.range.maxValue,t.minValue===o&&t.maxValue===a)return[2,this.previousSlice.fileSlice];if(t.maxValue===a)return[2,this.previousSlice.fileSlice.slice(t.minValue,t.maxValue+1)];n.push(this.previousSlice.fileSlice.slice(t.minValue,a+1)),r=t.maxValue-a}}return this.content&&this.content.readable?this.content.readableLength>=r?(n.push(this.content.read(r)),[3,3]):[3,1]:[3,4];case 1:return u=(s=n).push,[4,this.readNBytesFromStream(r)];case 2:u.apply(s,[d.sent()]),d.label=3;case 3:return[3,5];case 4:throw new _r.GraphClientError("Stream is not readable.");case 5:return p=Buffer.concat(n),this.previousSlice={fileSlice:p,range:t},[2,p]}})})},e.prototype.readNBytesFromStream=function(t){var r=this;return new Promise(function(n,o){var a=[],s=t,u=0;r.content.on("end",function(){if(s>0)return o(new _r.GraphClientError("Stream ended before reading required range size"))}),r.content.on("readable",function(){for(var p;u<t&&(p=r.content.read(s))!==null;)u+=p.length,a.push(p),s>0&&(s=t-u);if(u===t)return n(Buffer.concat(a));if(!r.content||!r.content.readable)return o(new _r.GraphClientError("Error encountered while reading the stream during the upload"))})})},e})();Nn.StreamUpload=rh});var gc=b(Un=>{"use strict";Object.defineProperty(Un,"__esModule",{value:!0});Un.PageIterator=void 0;var Mt=(ue(),ie(se)),nh=(function(){function e(t,r,n,o){this.client=t,this.collection=r.value,this.nextLink=r["@odata.nextLink"],this.deltaLink=r["@odata.deltaLink"],this.callback=n,this.cursor=0,this.complete=!1,this.requestOptions=o}return i(e,"PageIterator"),e.prototype.iterationHelper=function(){if(this.collection===void 0)return!1;for(var t=!0;t&&this.cursor<this.collection.length;){var r=this.collection[this.cursor];t=this.callback(r),this.cursor++}return t},e.prototype.fetchAndUpdateNextPageData=function(){return Mt.__awaiter(this,void 0,void 0,function(){var t,r;return Mt.__generator(this,function(n){switch(n.label){case 0:return t=this.client.api(this.nextLink),this.requestOptions&&(this.requestOptions.headers&&(t=t.headers(this.requestOptions.headers)),this.requestOptions.middlewareOptions&&(t=t.middlewareOptions(this.requestOptions.middlewareOptions)),this.requestOptions.options&&(t=t.options(this.requestOptions.options))),[4,t.get()];case 1:return r=n.sent(),this.collection=r.value,this.cursor=0,this.nextLink=r["@odata.nextLink"],this.deltaLink=r["@odata.deltaLink"],[2]}})})},e.prototype.getDeltaLink=function(){return this.deltaLink},e.prototype.iterate=function(){return Mt.__awaiter(this,void 0,void 0,function(){var t;return Mt.__generator(this,function(r){switch(r.label){case 0:t=this.iterationHelper(),r.label=1;case 1:return t?this.nextLink===void 0?[3,3]:[4,this.fetchAndUpdateNextPageData()]:[3,5];case 2:return r.sent(),t=this.iterationHelper(),[3,4];case 3:t=!1,r.label=4;case 4:return[3,1];case 5:return this.nextLink===void 0&&this.cursor>=this.collection.length&&(this.complete=!0),[2]}})})},e.prototype.resume=function(){return Mt.__awaiter(this,void 0,void 0,function(){return Mt.__generator(this,function(t){return[2,this.iterate()]})})},e.prototype.isComplete=function(){return this.complete},e})();Un.PageIterator=nh});var gi=b(Ln=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});Ln.CustomAuthenticationProvider=void 0;var Mn=(ue(),ie(se)),hc=Ge(),oh=(function(){function e(t){this.provider=t}return i(e,"CustomAuthenticationProvider"),e.prototype.getAccessToken=function(){return Mn.__awaiter(this,void 0,void 0,function(){var t=this;return Mn.__generator(this,function(r){return[2,new Promise(function(n,o){t.provider(function(a,s){return Mn.__awaiter(t,void 0,void 0,function(){var u,p;return Mn.__generator(this,function(d){switch(d.label){case 0:return s?(n(s),[3,3]):[3,1];case 1:return a||(u="Access token is undefined or empty. Please provide a valid token. For more help - https://github.com/microsoftgraph/msgraph-sdk-javascript/blob/dev/docs/CustomAuthenticationProvider.md",a=new hc.GraphClientError(u)),[4,hc.GraphClientError.setGraphClientError(a)];case 2:p=d.sent(),o(p),d.label=3;case 3:return[2]}})})})})]})})},e})();Ln.CustomAuthenticationProvider=oh});var hi=b(jn=>{"use strict";Object.defineProperty(jn,"__esModule",{value:!0});jn.GraphError=void 0;var ih=(ue(),ie(se)),ah=(function(e){ih.__extends(t,e);function t(r,n,o){r===void 0&&(r=-1);var a=e.call(this,n||o&&o.message)||this;return Object.setPrototypeOf(a,t.prototype),a.statusCode=r,a.code=null,a.requestId=null,a.date=new Date,a.body=null,a.stack=o?o.stack:a.stack,a}return i(t,"GraphError"),t})(Error);jn.GraphError=ah});var vc=b(Fn=>{"use strict";Object.defineProperty(Fn,"__esModule",{value:!0});Fn.GraphErrorHandler=void 0;var yc=(ue(),ie(se)),yi=hi(),sh=(function(){function e(){}return i(e,"GraphErrorHandler"),e.constructError=function(t,r,n){var o=new yi.GraphError(r,"",t);return t.name!==void 0&&(o.code=t.name),o.body=t.toString(),o.date=new Date,o.headers=n?.headers,o},e.constructErrorFromResponse=function(t,r,n){var o=t.error,a=new yi.GraphError(r,o.message);return a.code=o.code,o.innerError!==void 0&&(a.requestId=o.innerError["request-id"],a.date=new Date(o.innerError.date)),a.body=JSON.stringify(o),a.headers=n?.headers,a},e.getError=function(t,r,n,o){return t===void 0&&(t=null),r===void 0&&(r=-1),yc.__awaiter(this,void 0,void 0,function(){var a;return yc.__generator(this,function(s){if(t&&t.error?a=e.constructErrorFromResponse(t,r,o):t instanceof Error?a=e.constructError(t,r,o):(a=new yi.GraphError(r),a.body=t),typeof n=="function")n(a,null);else return[2,a];return[2]})})},e})();Fn.GraphErrorHandler=sh});var vi=b(Bn=>{"use strict";Object.defineProperty(Bn,"__esModule",{value:!0});Bn.GraphRequest=void 0;var re=(ue(),ie(se)),uh=Ge(),ch=vc(),Pr=tn(),lh=ui(),ph=it(),gt=gr(),dh=vr(),fh=(function(){function e(t,r,n){var o=this;this.parsePath=function(a){if(a.indexOf("https://")!==-1){a=a.replace("https://","");var s=a.indexOf("/");s!==-1&&(o.urlComponents.host="https://"+a.substring(0,s),a=a.substring(s+1,a.length));var u=a.indexOf("/");u!==-1&&(o.urlComponents.version=a.substring(0,u),a=a.substring(u+1,a.length))}a.charAt(0)==="/"&&(a=a.substr(1));var p=a.indexOf("?");if(p===-1)o.urlComponents.path=a;else{o.urlComponents.path=a.substr(0,p);for(var d=a.substring(p+1,a.length).split("&"),g=0,x=d;g<x.length;g++){var v=x[g];o.parseQueryParameter(v)}}},this.httpClient=t,this.config=r,this.urlComponents={host:this.config.baseUrl,version:this.config.defaultVersion,oDataQueryParams:{},otherURLQueryParams:{},otherURLQueryOptions:[]},this._headers={},this._options={},this._middlewareOptions=[],this.parsePath(n)}return i(e,"GraphRequest"),e.prototype.addCsvQueryParameter=function(t,r,n){this.urlComponents.oDataQueryParams[t]=this.urlComponents.oDataQueryParams[t]?this.urlComponents.oDataQueryParams[t]+",":"";var o=[];n.length>1&&typeof r=="string"?o=Array.prototype.slice.call(n):typeof r=="string"?o.push(r):o=o.concat(r),this.urlComponents.oDataQueryParams[t]+=o.join(",")},e.prototype.buildFullUrl=function(){var t=(0,Pr.urlJoin)([this.urlComponents.host,this.urlComponents.version,this.urlComponents.path])+this.createQueryString();return this.config.debugLogging&&console.log(t),t},e.prototype.createQueryString=function(){var t=this.urlComponents,r=[];if(Object.keys(t.oDataQueryParams).length!==0)for(var n in t.oDataQueryParams)Object.prototype.hasOwnProperty.call(t.oDataQueryParams,n)&&r.push(n+"="+t.oDataQueryParams[n]);if(Object.keys(t.otherURLQueryParams).length!==0)for(var n in t.otherURLQueryParams)Object.prototype.hasOwnProperty.call(t.otherURLQueryParams,n)&&r.push(n+"="+t.otherURLQueryParams[n]);if(t.otherURLQueryOptions.length!==0)for(var o=0,a=t.otherURLQueryOptions;o<a.length;o++){var s=a[o];r.push(s)}return r.length>0?"?"+r.join("&"):""},e.prototype.parseQueryParameter=function(t){if(typeof t=="string")if(t.charAt(0)==="?"&&(t=t.substring(1)),t.indexOf("&")!==-1)for(var r=t.split("&"),n=0,o=r;n<o.length;n++){var a=o[n];this.parseQueryParamenterString(a)}else this.parseQueryParamenterString(t);else if(t.constructor===Object)for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&this.setURLComponentsQueryParamater(s,t[s]);return this},e.prototype.parseQueryParamenterString=function(t){if(this.isValidQueryKeyValuePair(t)){var r=t.indexOf("="),n=t.substring(0,r),o=t.substring(r+1);this.setURLComponentsQueryParamater(n,o)}else this.urlComponents.otherURLQueryOptions.push(t)},e.prototype.setURLComponentsQueryParamater=function(t,r){if(Pr.oDataQueryNames.indexOf(t)!==-1){var n=this.urlComponents.oDataQueryParams[t],o=n&&(t==="$expand"||t==="$select"||t==="$orderby");this.urlComponents.oDataQueryParams[t]=o?n+","+r:r}else this.urlComponents.otherURLQueryParams[t]=r},e.prototype.isValidQueryKeyValuePair=function(t){var r=t.indexOf("=");if(r===-1)return!1;var n=t.indexOf("(");return!(n!==-1&&t.indexOf("(")<r)},e.prototype.updateRequestOptions=function(t){var r=re.__assign({},t.headers);if(this.config.fetchOptions!==void 0){var n=re.__assign({},this.config.fetchOptions);Object.assign(t,n),typeof this.config.fetchOptions.headers!==void 0&&(t.headers=re.__assign({},this.config.fetchOptions.headers))}Object.assign(t,this._options),t.headers!==void 0&&Object.assign(r,t.headers),Object.assign(r,this._headers),t.headers=r},e.prototype.send=function(t,r,n){var o;return re.__awaiter(this,void 0,void 0,function(){var a,s,u,p,d,g,x,v;return re.__generator(this,function(l){switch(l.label){case 0:s=new ph.MiddlewareControl(this._middlewareOptions),this.updateRequestOptions(r),u=(o=this.config)===null||o===void 0?void 0:o.customHosts,l.label=1;case 1:return l.trys.push([1,4,,6]),[4,this.httpClient.sendRequest({request:t,options:r,middlewareControl:s,customHosts:u})];case 2:return p=l.sent(),a=p.response,[4,lh.GraphResponseHandler.getResponse(a,this._responseType,n)];case 3:return d=l.sent(),[2,d];case 4:if(g=l.sent(),g instanceof uh.GraphClientError)throw g;return x=void 0,a&&(x=a.status),[4,ch.GraphErrorHandler.getError(g,x,n,a)];case 5:throw v=l.sent(),v;case 6:return[2]}})})},e.prototype.setHeaderContentType=function(){if(!this._headers){this.header("Content-Type","application/json");return}for(var t=Object.keys(this._headers),r=0,n=t;r<n.length;r++){var o=n[r];if(o.toLowerCase()==="content-type")return}this.header("Content-Type","application/json")},e.prototype.header=function(t,r){return this._headers[t]=r,this},e.prototype.headers=function(t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(this._headers[r]=t[r]);return this},e.prototype.option=function(t,r){return this._options[t]=r,this},e.prototype.options=function(t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(this._options[r]=t[r]);return this},e.prototype.middlewareOptions=function(t){return this._middlewareOptions=t,this},e.prototype.version=function(t){return this.urlComponents.version=t,this},e.prototype.responseType=function(t){return this._responseType=t,this},e.prototype.select=function(t){return this.addCsvQueryParameter("$select",t,arguments),this},e.prototype.expand=function(t){return this.addCsvQueryParameter("$expand",t,arguments),this},e.prototype.orderby=function(t){return this.addCsvQueryParameter("$orderby",t,arguments),this},e.prototype.filter=function(t){return this.urlComponents.oDataQueryParams.$filter=t,this},e.prototype.search=function(t){return this.urlComponents.oDataQueryParams.$search=t,this},e.prototype.top=function(t){return this.urlComponents.oDataQueryParams.$top=t,this},e.prototype.skip=function(t){return this.urlComponents.oDataQueryParams.$skip=t,this},e.prototype.skipToken=function(t){return this.urlComponents.oDataQueryParams.$skipToken=t,this},e.prototype.count=function(t){return t===void 0&&(t=!0),this.urlComponents.oDataQueryParams.$count=t.toString(),this},e.prototype.query=function(t){return this.parseQueryParameter(t)},e.prototype.get=function(t){return re.__awaiter(this,void 0,void 0,function(){var r,n,o;return re.__generator(this,function(a){switch(a.label){case 0:return r=this.buildFullUrl(),n={method:gt.RequestMethod.GET},[4,this.send(r,n,t)];case 1:return o=a.sent(),[2,o]}})})},e.prototype.post=function(t,r){return re.__awaiter(this,void 0,void 0,function(){var n,o,a;return re.__generator(this,function(s){switch(s.label){case 0:return n=this.buildFullUrl(),o={method:gt.RequestMethod.POST,body:(0,Pr.serializeContent)(t)},a=t&&t.constructor&&t.constructor.name,a==="FormData"?o.headers={}:(this.setHeaderContentType(),o.headers=this._headers),[4,this.send(n,o,r)];case 1:return[2,s.sent()]}})})},e.prototype.create=function(t,r){return re.__awaiter(this,void 0,void 0,function(){return re.__generator(this,function(n){switch(n.label){case 0:return[4,this.post(t,r)];case 1:return[2,n.sent()]}})})},e.prototype.put=function(t,r){return re.__awaiter(this,void 0,void 0,function(){var n,o;return re.__generator(this,function(a){switch(a.label){case 0:return n=this.buildFullUrl(),this.setHeaderContentType(),o={method:gt.RequestMethod.PUT,body:(0,Pr.serializeContent)(t)},[4,this.send(n,o,r)];case 1:return[2,a.sent()]}})})},e.prototype.patch=function(t,r){return re.__awaiter(this,void 0,void 0,function(){var n,o;return re.__generator(this,function(a){switch(a.label){case 0:return n=this.buildFullUrl(),this.setHeaderContentType(),o={method:gt.RequestMethod.PATCH,body:(0,Pr.serializeContent)(t)},[4,this.send(n,o,r)];case 1:return[2,a.sent()]}})})},e.prototype.update=function(t,r){return re.__awaiter(this,void 0,void 0,function(){return re.__generator(this,function(n){switch(n.label){case 0:return[4,this.patch(t,r)];case 1:return[2,n.sent()]}})})},e.prototype.delete=function(t){return re.__awaiter(this,void 0,void 0,function(){var r,n;return re.__generator(this,function(o){switch(o.label){case 0:return r=this.buildFullUrl(),n={method:gt.RequestMethod.DELETE},[4,this.send(r,n,t)];case 1:return[2,o.sent()]}})})},e.prototype.del=function(t){return re.__awaiter(this,void 0,void 0,function(){return re.__generator(this,function(r){switch(r.label){case 0:return[4,this.delete(t)];case 1:return[2,r.sent()]}})})},e.prototype.getStream=function(t){return re.__awaiter(this,void 0,void 0,function(){var r,n;return re.__generator(this,function(o){switch(o.label){case 0:return r=this.buildFullUrl(),n={method:gt.RequestMethod.GET},this.responseType(dh.ResponseType.STREAM),[4,this.send(r,n,t)];case 1:return[2,o.sent()]}})})},e.prototype.putStream=function(t,r){return re.__awaiter(this,void 0,void 0,function(){var n,o;return re.__generator(this,function(a){switch(a.label){case 0:return n=this.buildFullUrl(),o={method:gt.RequestMethod.PUT,headers:{"Content-Type":"application/octet-stream"},body:t},[4,this.send(n,o,r)];case 1:return[2,a.sent()]}})})},e})();Bn.GraphRequest=fh});var _i=b(Hn=>{"use strict";Object.defineProperty(Hn,"__esModule",{value:!0});Hn.HTTPClient=void 0;var _c=(ue(),ie(se)),mh=(function(){function e(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];if(!t||!t.length){var n=new Error;throw n.name="InvalidMiddlewareChain",n.message="Please provide a default middleware chain or custom middleware chain",n}this.setMiddleware.apply(this,t)}return i(e,"HTTPClient"),e.prototype.setMiddleware=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];t.length>1?this.parseMiddleWareArray(t):this.middleware=t[0]},e.prototype.parseMiddleWareArray=function(t){t.forEach(function(r,n){n<t.length-1&&r.setNext(t[n+1])}),this.middleware=t[0]},e.prototype.sendRequest=function(t){return _c.__awaiter(this,void 0,void 0,function(){var r;return _c.__generator(this,function(n){switch(n.label){case 0:if(typeof t.request=="string"&&t.options===void 0)throw r=new Error,r.name="InvalidRequestOptions",r.message="Unable to execute the middleware, Please provide valid options for a request",r;return[4,this.middleware.execute(t)];case 1:return n.sent(),[2,t]}})})},e})();Hn.HTTPClient=mh});var xc=b(Vn=>{"use strict";Object.defineProperty(Vn,"__esModule",{value:!0});Vn.HTTPClientFactory=void 0;var gh=(ue(),ie(se)),Pc=_i(),hh=an(),yh=un(),vh=yr(),_h=hr(),Ph=mn(),xh=pn(),bh=vn(),Th=i(function(){return typeof process=="object"&&typeof require=="function"},"isNodeEnvironment"),Eh=(function(){function e(){}return i(e,"HTTPClientFactory"),e.createWithAuthenticationProvider=function(t){var r=new hh.AuthenticationHandler(t),n=new xh.RetryHandler(new _h.RetryHandlerOptions),o=new bh.TelemetryHandler,a=new yh.HTTPMessageHandler;if(r.setNext(n),Th()){var s=new Ph.RedirectHandler(new vh.RedirectHandlerOptions);n.setNext(s),s.setNext(o)}else n.setNext(o);return o.setNext(a),e.createWithMiddleware(r)},e.createWithMiddleware=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return new(Pc.HTTPClient.bind.apply(Pc.HTTPClient,gh.__spreadArray([void 0],t,!1)))},e})();Vn.HTTPClientFactory=Eh});var bc=b(Zn=>{"use strict";Object.defineProperty(Zn,"__esModule",{value:!0});Zn.validatePolyFilling=void 0;var Ih=i(function(){if(typeof Promise>"u"&&typeof fetch>"u"){var e=new Error("Library cannot function without Promise and fetch. So, please provide polyfill for them.");throw e.name="PolyFillNotAvailable",e}else if(typeof Promise>"u"){var e=new Error("Library cannot function without Promise. So, please provide polyfill for it.");throw e.name="PolyFillNotAvailable",e}else if(typeof fetch>"u"){var e=new Error("Library cannot function without fetch. So, please provide polyfill for it.");throw e.name="PolyFillNotAvailable",e}return!0},"validatePolyFilling");Zn.validatePolyFilling=Ih});var Ic=b(qn=>{"use strict";Object.defineProperty(qn,"__esModule",{value:!0});qn.Client=void 0;var Ah=(ue(),ie(se)),Tc=ei(),Sh=gi(),$h=vi(),Ec=_i(),wh=xc(),Oh=bc(),zh=(function(){function e(t){this.config={baseUrl:Tc.GRAPH_BASE_URL,debugLogging:!1,defaultVersion:Tc.GRAPH_API_VERSION},(0,Oh.validatePolyFilling)();for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(this.config[r]=t[r]);var n;if(t.authProvider!==void 0&&t.middleware!==void 0){var o=new Error;throw o.name="AmbiguityInInitialization",o.message="Unable to Create Client, Please provide either authentication provider for default middleware chain or custom middleware chain not both",o}else if(t.authProvider!==void 0)n=wh.HTTPClientFactory.createWithAuthenticationProvider(t.authProvider);else if(t.middleware!==void 0)n=new(Ec.HTTPClient.bind.apply(Ec.HTTPClient,Ah.__spreadArray([void 0],[].concat(t.middleware),!1)));else{var o=new Error;throw o.name="InvalidMiddlewareChain",o.message="Unable to Create Client, Please provide either authentication provider for default middleware chain or custom middleware chain",o}this.httpClient=n}return i(e,"Client"),e.init=function(t){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=n==="authProvider"?new Sh.CustomAuthenticationProvider(t[n]):t[n]);return e.initWithMiddleware(r)},e.initWithMiddleware=function(t){return new e(t)},e.prototype.api=function(t){return new $h.GraphRequest(this.httpClient,this.config,t)},e})();qn.Client=zh});var Sc=b($=>{"use strict";Object.defineProperty($,"__esModule",{value:!0});$.ResponseType=$.GraphRequest=$.GraphClientError=$.GraphError=$.CustomAuthenticationProvider=$.Client=$.PageIterator=$.Range=$.UploadResult=$.FileUpload=$.StreamUpload=$.getValidRangeSize=$.OneDriveLargeFileUploadTask=$.LargeFileUploadTask=$.ChaosHandler=$.ChaosStrategy=$.ChaosHandlerOptions=$.TelemetryHandlerOptions=$.FeatureUsageFlag=$.RedirectHandlerOptions=$.RetryHandlerOptions=$.AuthenticationHandlerOptions=$.MiddlewareFactory=$.TelemetryHandler=$.RedirectHandler=$.RetryHandler=$.HTTPMessageHandler=$.AuthenticationHandler=$.BatchResponseContent=$.BatchRequestContent=void 0;var Rh=Fu();Object.defineProperty($,"BatchRequestContent",{enumerable:!0,get:i(function(){return Rh.BatchRequestContent},"get")});var kh=Bu();Object.defineProperty($,"BatchResponseContent",{enumerable:!0,get:i(function(){return kh.BatchResponseContent},"get")});var Dh=an();Object.defineProperty($,"AuthenticationHandler",{enumerable:!0,get:i(function(){return Dh.AuthenticationHandler},"get")});var Ch=un();Object.defineProperty($,"HTTPMessageHandler",{enumerable:!0,get:i(function(){return Ch.HTTPMessageHandler},"get")});var Nh=pn();Object.defineProperty($,"RetryHandler",{enumerable:!0,get:i(function(){return Nh.RetryHandler},"get")});var Uh=mn();Object.defineProperty($,"RedirectHandler",{enumerable:!0,get:i(function(){return Uh.RedirectHandler},"get")});var Mh=vn();Object.defineProperty($,"TelemetryHandler",{enumerable:!0,get:i(function(){return Mh.TelemetryHandler},"get")});var Lh=nc();Object.defineProperty($,"MiddlewareFactory",{enumerable:!0,get:i(function(){return Lh.MiddlewareFactory},"get")});var jh=ti();Object.defineProperty($,"AuthenticationHandlerOptions",{enumerable:!0,get:i(function(){return jh.AuthenticationHandlerOptions},"get")});var Fh=hr();Object.defineProperty($,"RetryHandlerOptions",{enumerable:!0,get:i(function(){return Fh.RetryHandlerOptions},"get")});var Bh=yr();Object.defineProperty($,"RedirectHandlerOptions",{enumerable:!0,get:i(function(){return Bh.RedirectHandlerOptions},"get")});var Ac=kt();Object.defineProperty($,"FeatureUsageFlag",{enumerable:!0,get:i(function(){return Ac.FeatureUsageFlag},"get")});Object.defineProperty($,"TelemetryHandlerOptions",{enumerable:!0,get:i(function(){return Ac.TelemetryHandlerOptions},"get")});var Hh=ii();Object.defineProperty($,"ChaosHandlerOptions",{enumerable:!0,get:i(function(){return Hh.ChaosHandlerOptions},"get")});var Vh=xn();Object.defineProperty($,"ChaosStrategy",{enumerable:!0,get:i(function(){return Vh.ChaosStrategy},"get")});var Zh=uc();Object.defineProperty($,"ChaosHandler",{enumerable:!0,get:i(function(){return Zh.ChaosHandler},"get")});var qh=di();Object.defineProperty($,"LargeFileUploadTask",{enumerable:!0,get:i(function(){return qh.LargeFileUploadTask},"get")});var Gh=dc();Object.defineProperty($,"OneDriveLargeFileUploadTask",{enumerable:!0,get:i(function(){return Gh.OneDriveLargeFileUploadTask},"get")});var Wh=mi();Object.defineProperty($,"getValidRangeSize",{enumerable:!0,get:i(function(){return Wh.getValidRangeSize},"get")});var Kh=mc();Object.defineProperty($,"StreamUpload",{enumerable:!0,get:i(function(){return Kh.StreamUpload},"get")});var Jh=fi();Object.defineProperty($,"FileUpload",{enumerable:!0,get:i(function(){return Jh.FileUpload},"get")});var Xh=li();Object.defineProperty($,"UploadResult",{enumerable:!0,get:i(function(){return Xh.UploadResult},"get")});var Yh=ci();Object.defineProperty($,"Range",{enumerable:!0,get:i(function(){return Yh.Range},"get")});var Qh=gc();Object.defineProperty($,"PageIterator",{enumerable:!0,get:i(function(){return Qh.PageIterator},"get")});var ey=Ic();Object.defineProperty($,"Client",{enumerable:!0,get:i(function(){return ey.Client},"get")});var ty=gi();Object.defineProperty($,"CustomAuthenticationProvider",{enumerable:!0,get:i(function(){return ty.CustomAuthenticationProvider},"get")});var ry=hi();Object.defineProperty($,"GraphError",{enumerable:!0,get:i(function(){return ry.GraphError},"get")});var ny=Ge();Object.defineProperty($,"GraphClientError",{enumerable:!0,get:i(function(){return ny.GraphClientError},"get")});var oy=vi();Object.defineProperty($,"GraphRequest",{enumerable:!0,get:i(function(){return oy.GraphRequest},"get")});var iy=vr();Object.defineProperty($,"ResponseType",{enumerable:!0,get:i(function(){return iy.ResponseType},"get")})});var Wc=b((T0,Gc)=>{var qc=require("stream").Stream,my=require("util");Gc.exports=De;function De(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}i(De,"DelayedStream");my.inherits(De,qc);De.create=function(e,t){var r=new this;t=t||{};for(var n in t)r[n]=t[n];r.source=e;var o=e.emit;return e.emit=function(){return r._handleEmit(arguments),o.apply(e,arguments)},e.on("error",function(){}),r.pauseStream&&e.pause(),r};Object.defineProperty(De.prototype,"readable",{configurable:!0,enumerable:!0,get:i(function(){return this.source.readable},"get")});De.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};De.prototype.resume=function(){this._released||this.release(),this.source.resume()};De.prototype.pause=function(){this.source.pause()};De.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};De.prototype.pipe=function(){var e=qc.prototype.pipe.apply(this,arguments);return this.resume(),e};De.prototype._handleEmit=function(e){if(this._released){this.emit.apply(this,e);return}e[0]==="data"&&(this.dataSize+=e[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(e)};De.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}}});var Yc=b((I0,Xc)=>{var gy=require("util"),Jc=require("stream").Stream,Kc=Wc();Xc.exports=de;function de(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}i(de,"CombinedStream");gy.inherits(de,Jc);de.create=function(e){var t=new this;e=e||{};for(var r in e)t[r]=e[r];return t};de.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};de.prototype.append=function(e){var t=de.isStreamLike(e);if(t){if(!(e instanceof Kc)){var r=Kc.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=r}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this};de.prototype.pipe=function(e,t){return Jc.prototype.pipe.call(this,e,t),this.resume(),e};de.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};de.prototype._realGetNext=function(){var e=this._streams.shift();if(typeof e>"u"){this.end();return}if(typeof e!="function"){this._pipeNext(e);return}var t=e;t(function(r){var n=de.isStreamLike(r);n&&(r.on("data",this._checkDataSize.bind(this)),this._handleErrors(r)),this._pipeNext(r)}.bind(this))};de.prototype._pipeNext=function(e){this._currentStream=e;var t=de.isStreamLike(e);if(t){e.on("end",this._getNext.bind(this)),e.pipe(this,{end:!1});return}var r=e;this.write(r),this._getNext()};de.prototype._handleErrors=function(e){var t=this;e.on("error",function(r){t._emitError(r)})};de.prototype.write=function(e){this.emit("data",e)};de.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};de.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};de.prototype.end=function(){this._reset(),this.emit("end")};de.prototype.destroy=function(){this._reset(),this.emit("close")};de.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};de.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};de.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach(function(t){t.dataSize&&(e.dataSize+=t.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};de.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var el=b((S0,Qc)=>{"use strict";Qc.exports={"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dat"]},"application/msword":{source:"iana",extensions:["doc"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",extensions:["docx"]},"application/vnd.ms-excel":{source:"iana",extensions:["xls"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",extensions:["xlsx"]},"application/vnd.ms-powerpoint":{source:"iana",extensions:["ppt"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",extensions:["pptx"]},"application/csv":{compressible:!0,extensions:["csv"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"text/plain":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["txt","text","log"]},"text/html":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["html","htm"]},"text/css":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["css"]},"text/csv":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["csv"]},"text/markdown":{source:"iana",compressible:!0,charset:"UTF-8",extensions:["md","markdown"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/webp":{source:"apache",compressible:!1,extensions:["webp"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tiff","tif"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/heic":{source:"iana",compressible:!1,extensions:["heic"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mp3","mpga"]},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/ogg":{source:"iana",compressible:!1,extensions:["ogg","oga"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","m4v"]},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg"]},"video/webm":{source:"iana",compressible:!1,extensions:["webm"]},"video/quicktime":{source:"iana",compressible:!1,extensions:["mov","qt"]},"video/x-msvideo":{source:"iana",compressible:!1,extensions:["avi"]},"font/woff":{source:"iana",compressible:!1,extensions:["woff"]},"font/woff2":{source:"iana",compressible:!1,extensions:["woff2"]},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"multipart/form-data":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/ics":{compressible:!0,extensions:["ics"]},"text/calendar":{source:"iana",compressible:!0,extensions:["ics","ifb"]},"application/x-ndjson":{compressible:!0,extensions:["ndjson"]}}});var nl=b(Ae=>{"use strict";var Yn=el(),hy=require("path").extname,tl=/^\s*([^;\s]*)(?:;|\s|$)/,yy=/^text\//i;Ae.charset=rl;Ae.charsets={lookup:rl};Ae.contentType=vy;Ae.extension=_y;Ae.extensions=Object.create(null);Ae.lookup=Py;Ae.types=Object.create(null);xy(Ae.extensions,Ae.types);function rl(e){if(!e||typeof e!="string")return!1;var t=tl.exec(e),r=t&&Yn[t[1].toLowerCase()];return r&&r.charset?r.charset:t&&yy.test(t[1])?"UTF-8":!1}i(rl,"charset");function vy(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?Ae.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var r=Ae.charset(t);r&&(t+="; charset="+r.toLowerCase())}return t}i(vy,"contentType");function _y(e){if(!e||typeof e!="string")return!1;var t=tl.exec(e),r=t&&Ae.extensions[t[1].toLowerCase()];return!r||!r.length?!1:r[0]}i(_y,"extension");function Py(e){if(!e||typeof e!="string")return!1;var t=hy("x."+e).toLowerCase().substr(1);return t&&Ae.types[t]||!1}i(Py,"lookup");function xy(e,t){var r=["nginx","apache",void 0,"iana"];Object.keys(Yn).forEach(i(function(o){var a=Yn[o],s=a.extensions;if(!(!s||!s.length)){e[o]=s;for(var u=0;u<s.length;u++){var p=s[u];if(t[p]){var d=r.indexOf(Yn[t[p]].source),g=r.indexOf(a.source);if(t[p]!=="application/octet-stream"&&(d>g||d===g&&t[p].substr(0,12)==="application/"))continue}t[p]=o}}},"forEachMimeType"))}i(xy,"populateMaps")});var il=b((O0,ol)=>{ol.exports=by;function by(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}i(by,"defer")});var Ti=b((R0,sl)=>{var al=il();sl.exports=Ty;function Ty(e){var t=!1;return al(function(){t=!0}),i(function(n,o){t?e(n,o):al(i(function(){e(n,o)},"nextTick_callback"))},"async_callback")}i(Ty,"async")});var Ei=b((D0,ul)=>{ul.exports=Ey;function Ey(e){Object.keys(e.jobs).forEach(Iy.bind(e)),e.jobs={}}i(Ey,"abort");function Iy(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}i(Iy,"clean")});var Ii=b((N0,ll)=>{var cl=Ti(),Ay=Ei();ll.exports=Sy;function Sy(e,t,r,n){var o=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[o]=$y(t,o,e[o],function(a,s){o in r.jobs&&(delete r.jobs[o],a?Ay(r):r.results[o]=s,n(a,r.results))})}i(Sy,"iterate");function $y(e,t,r,n){var o;return e.length==2?o=e(r,cl(n)):o=e(r,t,cl(n)),o}i($y,"runJob")});var Ai=b((M0,pl)=>{pl.exports=wy;function wy(e,t){var r=!Array.isArray(e),n={index:0,keyedList:r||t?Object.keys(e):null,jobs:{},results:r?{}:[],size:r?Object.keys(e).length:e.length};return t&&n.keyedList.sort(r?t:function(o,a){return t(e[o],e[a])}),n}i(wy,"state")});var Si=b((j0,dl)=>{var Oy=Ei(),zy=Ti();dl.exports=Ry;function Ry(e){Object.keys(this.jobs).length&&(this.index=this.size,Oy(this),zy(e)(null,this.results))}i(Ry,"terminator")});var ml=b((B0,fl)=>{var ky=Ii(),Dy=Ai(),Cy=Si();fl.exports=Ny;function Ny(e,t,r){for(var n=Dy(e);n.index<(n.keyedList||e).length;)ky(e,t,n,function(o,a){if(o){r(o,a);return}if(Object.keys(n.jobs).length===0){r(null,n.results);return}}),n.index++;return Cy.bind(n,r)}i(Ny,"parallel")});var $i=b((V0,Qn)=>{var gl=Ii(),Uy=Ai(),My=Si();Qn.exports=Ly;Qn.exports.ascending=hl;Qn.exports.descending=jy;function Ly(e,t,r,n){var o=Uy(e,r);return gl(e,t,o,i(function a(s,u){if(s){n(s,u);return}if(o.index++,o.index<(o.keyedList||e).length){gl(e,t,o,a);return}n(null,o.results)},"iteratorHandler")),My.bind(o,n)}i(Ly,"serialOrdered");function hl(e,t){return e<t?-1:e>t?1:0}i(hl,"ascending");function jy(e,t){return-1*hl(e,t)}i(jy,"descending")});var vl=b((q0,yl)=>{var Fy=$i();yl.exports=By;function By(e,t,r){return Fy(e,t,null,r)}i(By,"serial")});var Pl=b((W0,_l)=>{_l.exports={parallel:ml(),serial:vl(),serialOrdered:$i()}});var wi=b((K0,xl)=>{"use strict";xl.exports=Object});var Tl=b((J0,bl)=>{"use strict";bl.exports=Error});var Il=b((X0,El)=>{"use strict";El.exports=EvalError});var Sl=b((Y0,Al)=>{"use strict";Al.exports=RangeError});var wl=b((Q0,$l)=>{"use strict";$l.exports=ReferenceError});var zl=b((eU,Ol)=>{"use strict";Ol.exports=SyntaxError});var eo=b((tU,Rl)=>{"use strict";Rl.exports=TypeError});var Dl=b((rU,kl)=>{"use strict";kl.exports=URIError});var Nl=b((nU,Cl)=>{"use strict";Cl.exports=Math.abs});var Ml=b((oU,Ul)=>{"use strict";Ul.exports=Math.floor});var jl=b((iU,Ll)=>{"use strict";Ll.exports=Math.max});var Bl=b((aU,Fl)=>{"use strict";Fl.exports=Math.min});var Vl=b((sU,Hl)=>{"use strict";Hl.exports=Math.pow});var ql=b((uU,Zl)=>{"use strict";Zl.exports=Math.round});var Wl=b((cU,Gl)=>{"use strict";Gl.exports=Number.isNaN||i(function(t){return t!==t},"isNaN")});var Jl=b((pU,Kl)=>{"use strict";var Hy=Wl();Kl.exports=i(function(t){return Hy(t)||t===0?t:t<0?-1:1},"sign")});var Yl=b((fU,Xl)=>{"use strict";Xl.exports=Object.getOwnPropertyDescriptor});var Oi=b((mU,Ql)=>{"use strict";var to=Yl();if(to)try{to([],"length")}catch{to=null}Ql.exports=to});var tp=b((gU,ep)=>{"use strict";var ro=Object.defineProperty||!1;if(ro)try{ro({},"a",{value:1})}catch{ro=!1}ep.exports=ro});var zi=b((hU,rp)=>{"use strict";rp.exports=i(function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var o=42;t[r]=o;for(var a in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var s=Object.getOwnPropertySymbols(t);if(s.length!==1||s[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var u=Object.getOwnPropertyDescriptor(t,r);if(u.value!==o||u.enumerable!==!0)return!1}return!0},"hasSymbols")});var ip=b((vU,op)=>{"use strict";var np=typeof Symbol<"u"&&Symbol,Vy=zi();op.exports=i(function(){return typeof np!="function"||typeof Symbol!="function"||typeof np("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Vy()},"hasNativeSymbols")});var Ri=b((PU,ap)=>{"use strict";ap.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var ki=b((xU,sp)=>{"use strict";var Zy=wi();sp.exports=Zy.getPrototypeOf||null});var lp=b((bU,cp)=>{"use strict";var qy="Function.prototype.bind called on incompatible ",Gy=Object.prototype.toString,Wy=Math.max,Ky="[object Function]",up=i(function(t,r){for(var n=[],o=0;o<t.length;o+=1)n[o]=t[o];for(var a=0;a<r.length;a+=1)n[a+t.length]=r[a];return n},"concatty"),Jy=i(function(t,r){for(var n=[],o=r||0,a=0;o<t.length;o+=1,a+=1)n[a]=t[o];return n},"slicy"),Xy=i(function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r},"joiny");cp.exports=i(function(t){var r=this;if(typeof r!="function"||Gy.apply(r)!==Ky)throw new TypeError(qy+r);for(var n=Jy(arguments,1),o,a=i(function(){if(this instanceof o){var g=r.apply(this,up(n,arguments));return Object(g)===g?g:this}return r.apply(t,up(n,arguments))},"binder"),s=Wy(0,r.length-n.length),u=[],p=0;p<s;p++)u[p]="$"+p;if(o=Function("binder","return function ("+Xy(u,",")+"){ return binder.apply(this,arguments); }")(a),r.prototype){var d=i(function(){},"Empty");d.prototype=r.prototype,o.prototype=new d,d.prototype=null}return o},"bind")});var Lt=b((EU,pp)=>{"use strict";var Yy=lp();pp.exports=Function.prototype.bind||Yy});var no=b((IU,dp)=>{"use strict";dp.exports=Function.prototype.call});var Di=b((AU,fp)=>{"use strict";fp.exports=Function.prototype.apply});var gp=b((SU,mp)=>{"use strict";mp.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var yp=b(($U,hp)=>{"use strict";var Qy=Lt(),ev=Di(),tv=no(),rv=gp();hp.exports=rv||Qy.call(tv,ev)});var _p=b((wU,vp)=>{"use strict";var nv=Lt(),ov=eo(),iv=no(),av=yp();vp.exports=i(function(t){if(t.length<1||typeof t[0]!="function")throw new ov("a function is required");return av(nv,iv,t)},"callBindBasic")});var Ip=b((zU,Ep)=>{"use strict";var sv=_p(),Pp=Oi(),bp;try{bp=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var Ci=!!bp&&Pp&&Pp(Object.prototype,"__proto__"),Tp=Object,xp=Tp.getPrototypeOf;Ep.exports=Ci&&typeof Ci.get=="function"?sv([Ci.get]):typeof xp=="function"?i(function(t){return xp(t==null?t:Tp(t))},"getDunder"):!1});var Op=b((kU,wp)=>{"use strict";var Ap=Ri(),Sp=ki(),$p=Ip();wp.exports=Ap?i(function(t){return Ap(t)},"getProto"):Sp?i(function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return Sp(t)},"getProto"):$p?i(function(t){return $p(t)},"getProto"):null});var Ni=b((CU,zp)=>{"use strict";var uv=Function.prototype.call,cv=Object.prototype.hasOwnProperty,lv=Lt();zp.exports=lv.call(uv,cv)});var Mp=b((NU,Up)=>{"use strict";var J,pv=wi(),dv=Tl(),fv=Il(),mv=Sl(),gv=wl(),Ht=zl(),Bt=eo(),hv=Dl(),yv=Nl(),vv=Ml(),_v=jl(),Pv=Bl(),xv=Vl(),bv=ql(),Tv=Jl(),Cp=Function,Ui=i(function(e){try{return Cp('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),br=Oi(),Ev=tp(),Mi=i(function(){throw new Bt},"throwTypeError"),Iv=br?(function(){try{return arguments.callee,Mi}catch{try{return br(arguments,"callee").get}catch{return Mi}}})():Mi,jt=ip()(),_e=Op(),Av=ki(),Sv=Ri(),Np=Di(),Tr=no(),Ft={},$v=typeof Uint8Array>"u"||!_e?J:_e(Uint8Array),ht={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?J:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?J:ArrayBuffer,"%ArrayIteratorPrototype%":jt&&_e?_e([][Symbol.iterator]()):J,"%AsyncFromSyncIteratorPrototype%":J,"%AsyncFunction%":Ft,"%AsyncGenerator%":Ft,"%AsyncGeneratorFunction%":Ft,"%AsyncIteratorPrototype%":Ft,"%Atomics%":typeof Atomics>"u"?J:Atomics,"%BigInt%":typeof BigInt>"u"?J:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?J:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?J:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?J:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":dv,"%eval%":eval,"%EvalError%":fv,"%Float16Array%":typeof Float16Array>"u"?J:Float16Array,"%Float32Array%":typeof Float32Array>"u"?J:Float32Array,"%Float64Array%":typeof Float64Array>"u"?J:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?J:FinalizationRegistry,"%Function%":Cp,"%GeneratorFunction%":Ft,"%Int8Array%":typeof Int8Array>"u"?J:Int8Array,"%Int16Array%":typeof Int16Array>"u"?J:Int16Array,"%Int32Array%":typeof Int32Array>"u"?J:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":jt&&_e?_e(_e([][Symbol.iterator]())):J,"%JSON%":typeof JSON=="object"?JSON:J,"%Map%":typeof Map>"u"?J:Map,"%MapIteratorPrototype%":typeof Map>"u"||!jt||!_e?J:_e(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":pv,"%Object.getOwnPropertyDescriptor%":br,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?J:Promise,"%Proxy%":typeof Proxy>"u"?J:Proxy,"%RangeError%":mv,"%ReferenceError%":gv,"%Reflect%":typeof Reflect>"u"?J:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?J:Set,"%SetIteratorPrototype%":typeof Set>"u"||!jt||!_e?J:_e(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?J:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":jt&&_e?_e(""[Symbol.iterator]()):J,"%Symbol%":jt?Symbol:J,"%SyntaxError%":Ht,"%ThrowTypeError%":Iv,"%TypedArray%":$v,"%TypeError%":Bt,"%Uint8Array%":typeof Uint8Array>"u"?J:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?J:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?J:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?J:Uint32Array,"%URIError%":hv,"%WeakMap%":typeof WeakMap>"u"?J:WeakMap,"%WeakRef%":typeof WeakRef>"u"?J:WeakRef,"%WeakSet%":typeof WeakSet>"u"?J:WeakSet,"%Function.prototype.call%":Tr,"%Function.prototype.apply%":Np,"%Object.defineProperty%":Ev,"%Object.getPrototypeOf%":Av,"%Math.abs%":yv,"%Math.floor%":vv,"%Math.max%":_v,"%Math.min%":Pv,"%Math.pow%":xv,"%Math.round%":bv,"%Math.sign%":Tv,"%Reflect.getPrototypeOf%":Sv};if(_e)try{null.error}catch(e){Rp=_e(_e(e)),ht["%Error.prototype%"]=Rp}var Rp,wv=i(function e(t){var r;if(t==="%AsyncFunction%")r=Ui("async function () {}");else if(t==="%GeneratorFunction%")r=Ui("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=Ui("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var o=e("%AsyncGenerator%");o&&_e&&(r=_e(o.prototype))}return ht[t]=r,r},"doEval"),kp={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Er=Lt(),oo=Ni(),Ov=Er.call(Tr,Array.prototype.concat),zv=Er.call(Np,Array.prototype.splice),Dp=Er.call(Tr,String.prototype.replace),io=Er.call(Tr,String.prototype.slice),Rv=Er.call(Tr,RegExp.prototype.exec),kv=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Dv=/\\(\\)?/g,Cv=i(function(t){var r=io(t,0,1),n=io(t,-1);if(r==="%"&&n!=="%")throw new Ht("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new Ht("invalid intrinsic syntax, expected opening `%`");var o=[];return Dp(t,kv,function(a,s,u,p){o[o.length]=u?Dp(p,Dv,"$1"):s||a}),o},"stringToPath"),Nv=i(function(t,r){var n=t,o;if(oo(kp,n)&&(o=kp[n],n="%"+o[0]+"%"),oo(ht,n)){var a=ht[n];if(a===Ft&&(a=wv(n)),typeof a>"u"&&!r)throw new Bt("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:a}}throw new Ht("intrinsic "+t+" does not exist!")},"getBaseIntrinsic");Up.exports=i(function(t,r){if(typeof t!="string"||t.length===0)throw new Bt("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new Bt('"allowMissing" argument must be a boolean');if(Rv(/^%?[^%]*%?$/,t)===null)throw new Ht("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Cv(t),o=n.length>0?n[0]:"",a=Nv("%"+o+"%",r),s=a.name,u=a.value,p=!1,d=a.alias;d&&(o=d[0],zv(n,Ov([0,1],d)));for(var g=1,x=!0;g<n.length;g+=1){var v=n[g],l=io(v,0,1),f=io(v,-1);if((l==='"'||l==="'"||l==="`"||f==='"'||f==="'"||f==="`")&&l!==f)throw new Ht("property names with quotes must have matching quotes");if((v==="constructor"||!x)&&(p=!0),o+="."+v,s="%"+o+"%",oo(ht,s))u=ht[s];else if(u!=null){if(!(v in u)){if(!r)throw new Bt("base intrinsic for "+t+" exists, but the property is not available.");return}if(br&&g+1>=n.length){var y=br(u,v);x=!!y,x&&"get"in y&&!("originalValue"in y.get)?u=y.get:u=u[v]}else x=oo(u,v),u=u[v];x&&!p&&(ht[s]=u)}}return u},"GetIntrinsic")});var jp=b((MU,Lp)=>{"use strict";var Uv=zi();Lp.exports=i(function(){return Uv()&&!!Symbol.toStringTag},"hasToStringTagShams")});var Hp=b((jU,Bp)=>{"use strict";var Mv=Mp(),Fp=Mv("%Object.defineProperty%",!0),Lv=jp()(),jv=Ni(),Fv=eo(),ao=Lv?Symbol.toStringTag:null;Bp.exports=i(function(t,r){var n=arguments.length>2&&!!arguments[2]&&arguments[2].force,o=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof n<"u"&&typeof n!="boolean"||typeof o<"u"&&typeof o!="boolean")throw new Fv("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");ao&&(n||!jv(t,ao))&&(Fp?Fp(t,ao,{configurable:!o,enumerable:!1,value:r,writable:!1}):t[ao]=r)},"setToStringTag")});var Zp=b((BU,Vp)=>{"use strict";var Bv=Function.prototype.call,Hv=Object.prototype.hasOwnProperty,Vv=Lt();Vp.exports=Vv.call(Bv,Hv)});var Gp=b((HU,qp)=>{"use strict";qp.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var Jp=b((VU,Kp)=>{"use strict";var Bi=Yc(),Zv=require("util"),Li=require("path"),qv=require("http"),Gv=require("https"),Wv=require("url").parse,Kv=require("fs"),Jv=require("stream").Stream,Xv=require("crypto"),ji=nl(),Yv=Pl(),Qv=Hp(),st=Zp(),Fi=Gp();function Wp(e){return String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}i(Wp,"escapeHeaderParam");function X(e){if(!(this instanceof X))return new X(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],Bi.call(this),e=e||{};for(var t in e)this[t]=e[t]}i(X,"FormData");Zv.inherits(X,Bi);X.LINE_BREAK=`\r
5
+ `;X.DEFAULT_CONTENT_TYPE="application/octet-stream";X.prototype.append=function(e,t,r){r=r||{},typeof r=="string"&&(r={filename:r});var n=Bi.prototype.append.bind(this);if((typeof t=="number"||t==null)&&(t=String(t)),Array.isArray(t)){this._error(new Error("Arrays are not supported."));return}var o=this._multiPartHeader(e,t,r),a=this._multiPartFooter();n(o),n(t),n(a),this._trackLength(o,t,r)};X.prototype._trackLength=function(e,t,r){var n=0;r.knownLength!=null?n+=Number(r.knownLength):Buffer.isBuffer(t)?n=t.length:typeof t=="string"&&(n=Buffer.byteLength(t)),this._valueLength+=n,this._overheadLength+=Buffer.byteLength(e)+X.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&st(t,"httpVersion"))&&!(t instanceof Jv))&&(r.knownLength||this._valuesToMeasure.push(t))};X.prototype._lengthRetriever=function(e,t){st(e,"fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):Kv.stat(e.path,function(r,n){if(r){t(r);return}var o=n.size-(e.start?e.start:0);t(null,o)}):st(e,"httpVersion")?t(null,Number(e.headers["content-length"])):st(e,"httpModule")?(e.on("response",function(r){e.pause(),t(null,Number(r.headers["content-length"]))}),e.resume()):t("Unknown stream")};X.prototype._multiPartHeader=function(e,t,r){if(typeof r.header=="string")return r.header;var n=this._getContentDisposition(t,r),o=this._getContentType(t,r),a="",s={"Content-Disposition":["form-data",'name="'+Wp(e)+'"'].concat(n||[]),"Content-Type":[].concat(o||[])};typeof r.header=="object"&&Fi(s,r.header);var u;for(var p in s)if(st(s,p)){if(u=s[p],u==null)continue;Array.isArray(u)||(u=[u]),u.length&&(a+=p+": "+u.join("; ")+X.LINE_BREAK)}return"--"+this.getBoundary()+X.LINE_BREAK+a+X.LINE_BREAK};X.prototype._getContentDisposition=function(e,t){var r;if(typeof t.filepath=="string"?r=Li.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e&&(e.name||e.path)?r=Li.basename(t.filename||e&&(e.name||e.path)):e&&e.readable&&st(e,"httpVersion")&&(r=Li.basename(e.client._httpMessage.path||"")),r)return'filename="'+Wp(r)+'"'};X.prototype._getContentType=function(e,t){var r=t.contentType;return!r&&e&&e.name&&(r=ji.lookup(e.name)),!r&&e&&e.path&&(r=ji.lookup(e.path)),!r&&e&&e.readable&&st(e,"httpVersion")&&(r=e.headers["content-type"]),!r&&(t.filepath||t.filename)&&(r=ji.lookup(t.filepath||t.filename)),!r&&e&&typeof e=="object"&&(r=X.DEFAULT_CONTENT_TYPE),r};X.prototype._multiPartFooter=function(){return function(e){var t=X.LINE_BREAK,r=this._streams.length===0;r&&(t+=this._lastBoundary()),e(t)}.bind(this)};X.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+X.LINE_BREAK};X.prototype.getHeaders=function(e){var t,r={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)st(e,t)&&(r[t.toLowerCase()]=e[t]);return r};X.prototype.setBoundary=function(e){if(typeof e!="string")throw new TypeError("FormData boundary must be a string");this._boundary=e};X.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};X.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),r=0,n=this._streams.length;r<n;r++)typeof this._streams[r]!="function"&&(Buffer.isBuffer(this._streams[r])?e=Buffer.concat([e,this._streams[r]]):e=Buffer.concat([e,Buffer.from(this._streams[r])]),(typeof this._streams[r]!="string"||this._streams[r].substring(2,t.length+2)!==t)&&(e=Buffer.concat([e,Buffer.from(X.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};X.prototype._generateBoundary=function(){this._boundary="--------------------------"+Xv.randomBytes(12).toString("hex")};X.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),e};X.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};X.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;if(this._streams.length&&(t+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(e.bind(this,null,t));return}Yv.parallel(this._valuesToMeasure,this._lengthRetriever,function(r,n){if(r){e(r);return}n.forEach(function(o){t+=o}),e(null,t)})};X.prototype.submit=function(e,t){var r,n,o={method:"post"};return typeof e=="string"?(e=Wv(e),n=Fi({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},o)):(n=Fi(e,o),n.port||(n.port=n.protocol==="https:"?443:80)),n.headers=this.getHeaders(e.headers),n.protocol==="https:"?r=Gv.request(n):r=qv.request(n),this.getLength(function(a,s){if(a&&a!=="Unknown stream"){this._error(a);return}if(s&&r.setHeader("Content-Length",s),this.pipe(r),t){var u,p=i(function(d,g){return r.removeListener("error",p),r.removeListener("response",u),t.call(this,d,g)},"callback");u=p.bind(this,null),r.on("error",p),r.on("response",u)}}.bind(this)),r};X.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};X.prototype.toString=function(){return"[object FormData]"};Qv(X.prototype,"FormData");Kp.exports=X});var so=b((Hi,Vi)=>{(function(e,t){typeof Hi=="object"&&typeof Vi<"u"?Vi.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self).dayjs=t()})(Hi,(function(){"use strict";var e=1e3,t=6e4,r=36e5,n="millisecond",o="second",a="minute",s="hour",u="day",p="week",d="month",g="quarter",x="year",v="date",l="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,h={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:i(function(j){var A=["th","st","nd","rd"],E=j%100;return"["+j+(A[(E-20)%10]||A[E]||A[0])+"]"},"ordinal")},_=i(function(j,A,E){var O=String(j);return!O||O.length>=A?j:""+Array(A+1-O.length).join(E)+j},"m"),T={s:_,z:i(function(j){var A=-j.utcOffset(),E=Math.abs(A),O=Math.floor(E/60),S=E%60;return(A<=0?"+":"-")+_(O,2,"0")+":"+_(S,2,"0")},"z"),m:i(function j(A,E){if(A.date()<E.date())return-j(E,A);var O=12*(E.year()-A.year())+(E.month()-A.month()),S=A.clone().add(O,d),V=E-S<0,Z=A.clone().add(O+(V?-1:1),d);return+(-(O+(E-S)/(V?S-Z:Z-S))||0)},"t"),a:i(function(j){return j<0?Math.ceil(j)||0:Math.floor(j)},"a"),p:i(function(j){return{M:d,y:x,w:p,d:u,D:v,h:s,m:a,s:o,ms:n,Q:g}[j]||String(j||"").toLowerCase().replace(/s$/,"")},"p"),u:i(function(j){return j===void 0},"u")},H="en",fe={};fe[H]=h;var xe=i(function(j){return j instanceof yt},"p"),Ce=i(function j(A,E,O){var S;if(!A)return H;if(typeof A=="string"){var V=A.toLowerCase();fe[V]&&(S=V),E&&(fe[V]=E,S=V);var Z=A.split("-");if(!S&&Z.length>1)return j(Z[0])}else{var te=A.name;fe[te]=A,S=te}return!O&&S&&(H=S),S||!O&&H},"t"),ee=i(function(j,A){if(xe(j))return j.clone();var E=typeof A=="object"?A:{};return E.date=j,E.args=arguments,new yt(E)},"w"),G=T;G.l=Ce,G.i=xe,G.w=function(j,A){return ee(j,{locale:A.$L,utc:A.$u,x:A.$x,$offset:A.$offset})};var yt=(function(){function j(E){this.$L=Ce(E.locale,null,!0),this.parse(E)}i(j,"M");var A=j.prototype;return A.parse=function(E){this.$d=(function(O){var S=O.date,V=O.utc;if(S===null)return new Date(NaN);if(G.u(S))return new Date;if(S instanceof Date)return new Date(S);if(typeof S=="string"&&!/Z$/i.test(S)){var Z=S.match(f);if(Z){var te=Z[2]-1||0,me=(Z[7]||"0").substring(0,3);return V?new Date(Date.UTC(Z[1],te,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,me)):new Date(Z[1],te,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,me)}}return new Date(S)})(E),this.$x=E.x||{},this.init()},A.init=function(){var E=this.$d;this.$y=E.getFullYear(),this.$M=E.getMonth(),this.$D=E.getDate(),this.$W=E.getDay(),this.$H=E.getHours(),this.$m=E.getMinutes(),this.$s=E.getSeconds(),this.$ms=E.getMilliseconds()},A.$utils=function(){return G},A.isValid=function(){return this.$d.toString()!==l},A.isSame=function(E,O){var S=ee(E);return this.startOf(O)<=S&&S<=this.endOf(O)},A.isAfter=function(E,O){return ee(E)<this.startOf(O)},A.isBefore=function(E,O){return this.endOf(O)<ee(E)},A.$g=function(E,O,S){return G.u(E)?this[O]:this.set(S,E)},A.unix=function(){return Math.floor(this.valueOf()/1e3)},A.valueOf=function(){return this.$d.getTime()},A.startOf=function(E,O){var S=this,V=!!G.u(O)||O,Z=G.p(E),te=i(function(lt,Ee){var Ke=G.w(S.$u?Date.UTC(S.$y,Ee,lt):new Date(S.$y,Ee,lt),S);return V?Ke:Ke.endOf(u)},"l"),me=i(function(lt,Ee){return G.w(S.toDate()[lt].apply(S.toDate("s"),(V?[0,0,0,0]:[23,59,59,999]).slice(Ee)),S)},"$"),ve=this.$W,Pe=this.$M,we=this.$D,vt="set"+(this.$u?"UTC":"");switch(Z){case x:return V?te(1,0):te(31,11);case d:return V?te(1,Pe):te(0,Pe+1);case p:var ct=this.$locale().weekStart||0,Vt=(ve<ct?ve+7:ve)-ct;return te(V?we-Vt:we+(6-Vt),Pe);case u:case v:return me(vt+"Hours",0);case s:return me(vt+"Minutes",1);case a:return me(vt+"Seconds",2);case o:return me(vt+"Milliseconds",3);default:return this.clone()}},A.endOf=function(E){return this.startOf(E,!1)},A.$set=function(E,O){var S,V=G.p(E),Z="set"+(this.$u?"UTC":""),te=(S={},S[u]=Z+"Date",S[v]=Z+"Date",S[d]=Z+"Month",S[x]=Z+"FullYear",S[s]=Z+"Hours",S[a]=Z+"Minutes",S[o]=Z+"Seconds",S[n]=Z+"Milliseconds",S)[V],me=V===u?this.$D+(O-this.$W):O;if(V===d||V===x){var ve=this.clone().set(v,1);ve.$d[te](me),ve.init(),this.$d=ve.set(v,Math.min(this.$D,ve.daysInMonth())).$d}else te&&this.$d[te](me);return this.init(),this},A.set=function(E,O){return this.clone().$set(E,O)},A.get=function(E){return this[G.p(E)]()},A.add=function(E,O){var S,V=this;E=Number(E);var Z=G.p(O),te=i(function(Pe){var we=ee(V);return G.w(we.date(we.date()+Math.round(Pe*E)),V)},"y");if(Z===d)return this.set(d,this.$M+E);if(Z===x)return this.set(x,this.$y+E);if(Z===u)return te(1);if(Z===p)return te(7);var me=(S={},S[a]=t,S[s]=r,S[o]=e,S)[Z]||1,ve=this.$d.getTime()+E*me;return G.w(ve,this)},A.subtract=function(E,O){return this.add(-1*E,O)},A.format=function(E){var O=this,S=this.$locale();if(!this.isValid())return S.invalidDate||l;var V=E||"YYYY-MM-DDTHH:mm:ssZ",Z=G.z(this),te=this.$H,me=this.$m,ve=this.$M,Pe=S.weekdays,we=S.months,vt=S.meridiem,ct=i(function(Ee,Ke,Zt,Ir){return Ee&&(Ee[Ke]||Ee(O,V))||Zt[Ke].slice(0,Ir)},"h"),Vt=i(function(Ee){return G.s(te%12||12,Ee,"0")},"d"),lt=vt||function(Ee,Ke,Zt){var Ir=Ee<12?"AM":"PM";return Zt?Ir.toLowerCase():Ir};return V.replace(y,(function(Ee,Ke){return Ke||(function(Zt){switch(Zt){case"YY":return String(O.$y).slice(-2);case"YYYY":return G.s(O.$y,4,"0");case"M":return ve+1;case"MM":return G.s(ve+1,2,"0");case"MMM":return ct(S.monthsShort,ve,we,3);case"MMMM":return ct(we,ve);case"D":return O.$D;case"DD":return G.s(O.$D,2,"0");case"d":return String(O.$W);case"dd":return ct(S.weekdaysMin,O.$W,Pe,2);case"ddd":return ct(S.weekdaysShort,O.$W,Pe,3);case"dddd":return Pe[O.$W];case"H":return String(te);case"HH":return G.s(te,2,"0");case"h":return Vt(1);case"hh":return Vt(2);case"a":return lt(te,me,!0);case"A":return lt(te,me,!1);case"m":return String(me);case"mm":return G.s(me,2,"0");case"s":return String(O.$s);case"ss":return G.s(O.$s,2,"0");case"SSS":return G.s(O.$ms,3,"0");case"Z":return Z}return null})(Ee)||Z.replace(":","")}))},A.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},A.diff=function(E,O,S){var V,Z=this,te=G.p(O),me=ee(E),ve=(me.utcOffset()-this.utcOffset())*t,Pe=this-me,we=i(function(){return G.m(Z,me)},"D");switch(te){case x:V=we()/12;break;case d:V=we();break;case g:V=we()/3;break;case p:V=(Pe-ve)/6048e5;break;case u:V=(Pe-ve)/864e5;break;case s:V=Pe/r;break;case a:V=Pe/t;break;case o:V=Pe/e;break;default:V=Pe}return S?V:G.a(V)},A.daysInMonth=function(){return this.endOf(d).$D},A.$locale=function(){return fe[this.$L]},A.locale=function(E,O){if(!E)return this.$L;var S=this.clone(),V=Ce(E,O,!0);return V&&(S.$L=V),S},A.clone=function(){return G.w(this.$d,this)},A.toDate=function(){return new Date(this.valueOf())},A.toJSON=function(){return this.isValid()?this.toISOString():null},A.toISOString=function(){return this.$d.toISOString()},A.toString=function(){return this.$d.toUTCString()},j})(),ut=yt.prototype;return ee.prototype=ut,[["$ms",n],["$s",o],["$m",a],["$H",s],["$W",u],["$M",d],["$y",x],["$D",v]].forEach((function(j){ut[j[1]]=function(A){return this.$g(A,j[0],j[1])}})),ee.extend=function(j,A){return j.$i||(j(A,yt,ee),j.$i=!0),ee},ee.locale=Ce,ee.isDayjs=xe,ee.unix=function(j){return ee(1e3*j)},ee.en=fe[H],ee.Ls=fe,ee.p={},ee}))});var p_={};po(p_,{microsoft365Planner:()=>l_});module.exports=ie(p_);var dd=Object.freeze({status:"aborted"});function w(e,t,r){function n(u,p){if(u._zod||Object.defineProperty(u,"_zod",{value:{def:p,constr:s,traits:new Set},enumerable:!1}),u._zod.traits.has(e))return;u._zod.traits.add(e),t(u,p);let d=s.prototype,g=Object.keys(d);for(let x=0;x<g.length;x++){let v=g[x];v in u||(u[v]=d[v].bind(u))}}i(n,"init");let o=r?.Parent??Object;class a extends o{static{i(this,"Definition")}}Object.defineProperty(a,"name",{value:e});function s(u){var p;let d=r?.Parent?new a:this;n(d,u),(p=d._zod).deferred??(p.deferred=[]);for(let g of d._zod.deferred)g();return d}return i(s,"_"),Object.defineProperty(s,"init",{value:n}),Object.defineProperty(s,Symbol.hasInstance,{value:i(u=>r?.Parent&&u instanceof r.Parent?!0:u?._zod?.traits?.has(e),"value")}),Object.defineProperty(s,"name",{value:e}),s}i(w,"$constructor");var Ue=class extends Error{static{i(this,"$ZodAsyncError")}constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Ar=class extends Error{static{i(this,"$ZodEncodeError")}constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}},fo={};function Fe(e){return e&&Object.assign(fo,e),fo}i(Fe,"config");function go(e){let t=Object.values(e).filter(n=>typeof n=="number");return Object.entries(e).filter(([n,o])=>t.indexOf(+n)===-1).map(([n,o])=>o)}i(go,"getEnumValues");function Gi(e,t){return typeof t=="bigint"?t.toString():t}i(Gi,"jsonStringifyReplacer");function $r(e){return{get value(){{let r=e();return Object.defineProperty(this,"value",{value:r}),r}throw new Error("cached value already set")}}}i($r,"cached");function Wi(e){return e==null}i(Wi,"nullish");function wr(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}i(wr,"cleanRegex");var qi=Symbol("evaluating");function ge(e,t,r){let n;Object.defineProperty(e,t,{get(){if(n!==qi)return n===void 0&&(n=qi,n=r()),n},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}i(ge,"defineLazy");var ho="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Gt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}i(Gt,"isObject");var fd=$r(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function Ki(e){if(Gt(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(Gt(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}i(Ki,"isPlainObject");var Ji=new Set(["string","number","symbol"]);function _t(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}i(_t,"escapeRegex");function Or(e,t,r){let n=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(n._zod.parent=e),n}i(Or,"clone");function ne(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:i(()=>t,"error")};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:i(()=>t.error,"error")}:t}i(ne,"normalizeParams");function Xi(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}i(Xi,"optionalKeys");var Yi={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Pt(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}i(Pt,"aborted");function Je(e,t){return t.map(r=>{var n;return(n=r).path??(n.path=[]),r.path.unshift(e),r})}i(Je,"prefixIssues");function Sr(e){return typeof e=="string"?e:e?.message}i(Sr,"unwrapMessage");function Xe(e,t,r){let n={...e,path:e.path??[]};if(!e.message){let o=Sr(e.inst?._zod.def?.error?.(e))??Sr(t?.error?.(e))??Sr(r.customError?.(e))??Sr(r.localeError?.(e))??"Invalid input";n.message=o}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}i(Xe,"finalizeIssue");function Qi(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}i(Qi,"getLengthableOrigin");function yo(...e){let[t,r,n]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:n}:{...t}}i(yo,"issue");var ea=i((e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,Gi,2),Object.defineProperty(e,"toString",{value:i(()=>e.message,"value"),enumerable:!1})},"initializer"),ta=w("$ZodError",ea),Wt=w("$ZodError",ea,{Parent:Error});var gd=i(e=>(t,r,n,o)=>{let a=n?Object.assign(n,{async:!1}):{async:!1},s=t._zod.run({value:r,issues:[]},a);if(s instanceof Promise)throw new Ue;if(s.issues.length){let u=new(o?.Err??e)(s.issues.map(p=>Xe(p,a,Fe())));throw ho(u,o?.callee),u}return s.value},"_parse"),zr=gd(Wt),hd=i(e=>async(t,r,n,o)=>{let a=n?Object.assign(n,{async:!0}):{async:!0},s=t._zod.run({value:r,issues:[]},a);if(s instanceof Promise&&(s=await s),s.issues.length){let u=new(o?.Err??e)(s.issues.map(p=>Xe(p,a,Fe())));throw ho(u,o?.callee),u}return s.value},"_parseAsync"),Rr=hd(Wt),yd=i(e=>(t,r,n)=>{let o=n?{...n,async:!1}:{async:!1},a=t._zod.run({value:r,issues:[]},o);if(a instanceof Promise)throw new Ue;return a.issues.length?{success:!1,error:new(e??ta)(a.issues.map(s=>Xe(s,o,Fe())))}:{success:!0,data:a.value}},"_safeParse"),Kt=yd(Wt),vd=i(e=>async(t,r,n)=>{let o=n?Object.assign(n,{async:!0}):{async:!0},a=t._zod.run({value:r,issues:[]},o);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(s=>Xe(s,o,Fe())))}:{success:!0,data:a.value}},"_safeParseAsync"),Jt=vd(Wt);var _d="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Pd=new RegExp(`^${_d}$`);var ra=i(e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},"string"),na=/^-?\d+n?$/,oa=/^-?\d+$/,vo=/^-?\d+(?:\.\d+)?$/,ia=/^(?:true|false)$/i;var Ye=w("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),xd={number:"number",bigint:"bigint",object:"date"};var aa=w("$ZodCheckGreaterThan",(e,t)=>{Ye.init(e,t);let r=xd[typeof t.value];e._zod.onattach.push(n=>{let o=n._zod.bag,a=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>a&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}});var sa=w("$ZodCheckNumberFormat",(e,t)=>{Ye.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),n=r?"int":"number",[o,a]=Yi[t.format];e._zod.onattach.push(s=>{let u=s._zod.bag;u.format=t.format,u.minimum=o,u.maximum=a,r&&(u.pattern=oa)}),e._zod.check=s=>{let u=s.value;if(r){if(!Number.isInteger(u)){s.issues.push({expected:n,format:t.format,code:"invalid_type",continue:!1,input:u,inst:e});return}if(!Number.isSafeInteger(u)){u>0?s.issues.push({input:u,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort}):s.issues.push({input:u,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,inclusive:!0,continue:!t.abort});return}}u<o&&s.issues.push({origin:"number",input:u,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),u>a&&s.issues.push({origin:"number",input:u,code:"too_big",maximum:a,inclusive:!0,inst:e,continue:!t.abort})}});var ua=w("$ZodCheckMinLength",(e,t)=>{var r;Ye.init(e,t),(r=e._zod.def).when??(r.when=n=>{let o=n.value;return!Wi(o)&&o.length!==void 0}),e._zod.onattach.push(n=>{let o=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(n._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let o=n.value;if(o.length>=t.minimum)return;let s=Qi(o);n.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:o,inst:e,continue:!t.abort})}});var _o=w("$ZodCheckStringFormat",(e,t)=>{var r,n;Ye.init(e,t),e._zod.onattach.push(o=>{let a=o._zod.bag;a.format=t.format,t.pattern&&(a.patterns??(a.patterns=new Set),a.patterns.add(t.pattern))}),t.pattern?(r=e._zod).check??(r.check=o=>{t.pattern.lastIndex=0,!t.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),ca=w("$ZodCheckRegex",(e,t)=>{_o.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}});var pa={major:4,minor:3,patch:6};var ce=w("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=pa;let n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(let o of n)for(let a of o._zod.onattach)a(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let o=i((s,u,p)=>{let d=Pt(s),g;for(let x of u){if(x._zod.def.when){if(!x._zod.def.when(s))continue}else if(d)continue;let v=s.issues.length,l=x._zod.check(s);if(l instanceof Promise&&p?.async===!1)throw new Ue;if(g||l instanceof Promise)g=(g??Promise.resolve()).then(async()=>{await l,s.issues.length!==v&&(d||(d=Pt(s,v)))});else{if(s.issues.length===v)continue;d||(d=Pt(s,v))}}return g?g.then(()=>s):s},"runChecks"),a=i((s,u,p)=>{if(Pt(s))return s.aborted=!0,s;let d=o(u,n,p);if(d instanceof Promise){if(p.async===!1)throw new Ue;return d.then(g=>e._zod.parse(g,p))}return e._zod.parse(d,p)},"handleCanaryResult");e._zod.run=(s,u)=>{if(u.skipChecks)return e._zod.parse(s,u);if(u.direction==="backward"){let d=e._zod.parse({value:s.value,issues:[]},{...u,skipChecks:!0});return d instanceof Promise?d.then(g=>a(g,s,u)):a(d,s,u)}let p=e._zod.parse(s,u);if(p instanceof Promise){if(u.async===!1)throw new Ue;return p.then(d=>o(d,n,u))}return o(p,n,u)}}ge(e,"~standard",()=>({validate:i(o=>{try{let a=Kt(e,o);return a.success?{value:a.data}:{issues:a.error?.issues}}catch{return Jt(e,o).then(s=>s.success?{value:s.data}:{issues:s.error?.issues})}},"validate"),vendor:"zod",version:1}))}),Cr=w("$ZodString",(e,t)=>{ce.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??ra(e._zod.bag),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),Po=w("$ZodStringFormat",(e,t)=>{_o.init(e,t),Cr.init(e,t)});var ha=w("$ZodURL",(e,t)=>{Po.init(e,t),e._zod.check=r=>{try{let n=r.value.trim(),o=new URL(n);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(o.hostname)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort})),t.normalize?r.value=o.href:r.value=n;return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}});var xo=w("$ZodNumber",(e,t)=>{ce.init(e,t),e._zod.pattern=e._zod.bag.pattern??vo,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let o=r.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return r;let a=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return r.issues.push({expected:"number",code:"invalid_type",input:o,inst:e,...a?{received:a}:{}}),r}}),ya=w("$ZodNumberFormat",(e,t)=>{sa.init(e,t),xo.init(e,t)}),bo=w("$ZodBoolean",(e,t)=>{ce.init(e,t),e._zod.pattern=ia,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=!!r.value}catch{}let o=r.value;return typeof o=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:e}),r}}),va=w("$ZodBigInt",(e,t)=>{ce.init(e,t),e._zod.pattern=na,e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}});var _a=w("$ZodAny",(e,t)=>{ce.init(e,t),e._zod.parse=r=>r}),Pa=w("$ZodUnknown",(e,t)=>{ce.init(e,t),e._zod.parse=r=>r});var xa=w("$ZodVoid",(e,t)=>{ce.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;return typeof o>"u"||r.issues.push({expected:"void",code:"invalid_type",input:o,inst:e}),r}}),ba=w("$ZodDate",(e,t)=>{ce.init(e,t),e._zod.parse=(r,n)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let o=r.value,a=o instanceof Date;return a&&!Number.isNaN(o.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:o,...a?{received:"Invalid Date"}:{},inst:e}),r}});function da(e,t,r){e.issues.length&&t.issues.push(...Je(r,e.issues)),t.value[r]=e.value}i(da,"handleArrayResult");var Ta=w("$ZodArray",(e,t)=>{ce.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!Array.isArray(o))return r.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),r;r.value=Array(o.length);let a=[];for(let s=0;s<o.length;s++){let u=o[s],p=t.element._zod.run({value:u,issues:[]},n);p instanceof Promise?a.push(p.then(d=>da(d,r,s))):da(p,r,s)}return a.length?Promise.all(a).then(()=>r):r}});function Dr(e,t,r,n,o){if(e.issues.length){if(o&&!(r in n))return;t.issues.push(...Je(r,e.issues))}e.value===void 0?r in n&&(t.value[r]=void 0):t.value[r]=e.value}i(Dr,"handlePropertyResult");function bd(e){let t=Object.keys(e.shape);for(let n of t)if(!e.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);let r=Xi(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(r)}}i(bd,"normalizeDef");function Td(e,t,r,n,o,a){let s=[],u=o.keySet,p=o.catchall._zod,d=p.def.type,g=p.optout==="optional";for(let x in t){if(u.has(x))continue;if(d==="never"){s.push(x);continue}let v=p.run({value:t[x],issues:[]},n);v instanceof Promise?e.push(v.then(l=>Dr(l,r,x,t,g))):Dr(v,r,x,t,g)}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:a}),e.length?Promise.all(e).then(()=>r):r}i(Td,"handleCatchall");var Ea=w("$ZodObject",(e,t)=>{if(ce.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let u=t.shape;Object.defineProperty(t,"shape",{get:i(()=>{let p={...u};return Object.defineProperty(t,"shape",{value:p}),p},"get")})}let n=$r(()=>bd(t));ge(e._zod,"propValues",()=>{let u=t.shape,p={};for(let d in u){let g=u[d]._zod;if(g.values){p[d]??(p[d]=new Set);for(let x of g.values)p[d].add(x)}}return p});let o=Gt,a=t.catchall,s;e._zod.parse=(u,p)=>{s??(s=n.value);let d=u.value;if(!o(d))return u.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),u;u.value={};let g=[],x=s.shape;for(let v of s.keys){let l=x[v],f=l._zod.optout==="optional",y=l._zod.run({value:d[v],issues:[]},p);y instanceof Promise?g.push(y.then(h=>Dr(h,u,v,d,f))):Dr(y,u,v,d,f)}return a?Td(g,d,u,p,n.value,e):g.length?Promise.all(g).then(()=>u):u}});function fa(e,t,r,n){for(let a of e)if(a.issues.length===0)return t.value=a.value,t;let o=e.filter(a=>!Pt(a));return o.length===1?(t.value=o[0].value,o[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(a=>a.issues.map(s=>Xe(s,n,Fe())))}),t)}i(fa,"handleUnionResults");var To=w("$ZodUnion",(e,t)=>{ce.init(e,t),ge(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),ge(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),ge(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),ge(e._zod,"pattern",()=>{if(t.options.every(o=>o._zod.pattern)){let o=t.options.map(a=>a._zod.pattern);return new RegExp(`^(${o.map(a=>wr(a.source)).join("|")})$`)}});let r=t.options.length===1,n=t.options[0]._zod.run;e._zod.parse=(o,a)=>{if(r)return n(o,a);let s=!1,u=[];for(let p of t.options){let d=p._zod.run({value:o.value,issues:[]},a);if(d instanceof Promise)u.push(d),s=!0;else{if(d.issues.length===0)return d;u.push(d)}}return s?Promise.all(u).then(p=>fa(p,o,e,a)):fa(u,o,e,a)}});var Ia=w("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,To.init(e,t);let r=e._zod.parse;ge(e._zod,"propValues",()=>{let o={};for(let a of t.options){let s=a._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(let[u,p]of Object.entries(s)){o[u]||(o[u]=new Set);for(let d of p)o[u].add(d)}}return o});let n=$r(()=>{let o=t.options,a=new Map;for(let s of o){let u=s._zod.propValues?.[t.discriminator];if(!u||u.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(s)}"`);for(let p of u){if(a.has(p))throw new Error(`Duplicate discriminator value "${String(p)}"`);a.set(p,s)}}return a});e._zod.parse=(o,a)=>{let s=o.value;if(!Gt(s))return o.issues.push({code:"invalid_type",expected:"object",input:s,inst:e}),o;let u=n.value.get(s?.[t.discriminator]);return u?u._zod.run(o,a):t.unionFallback?r(o,a):(o.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,input:s,path:[t.discriminator],inst:e}),o)}});var Aa=w("$ZodRecord",(e,t)=>{ce.init(e,t),e._zod.parse=(r,n)=>{let o=r.value;if(!Ki(o))return r.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),r;let a=[],s=t.keyType._zod.values;if(s){r.value={};let u=new Set;for(let d of s)if(typeof d=="string"||typeof d=="number"||typeof d=="symbol"){u.add(typeof d=="number"?d.toString():d);let g=t.valueType._zod.run({value:o[d],issues:[]},n);g instanceof Promise?a.push(g.then(x=>{x.issues.length&&r.issues.push(...Je(d,x.issues)),r.value[d]=x.value})):(g.issues.length&&r.issues.push(...Je(d,g.issues)),r.value[d]=g.value)}let p;for(let d in o)u.has(d)||(p=p??[],p.push(d));p&&p.length>0&&r.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:p})}else{r.value={};for(let u of Reflect.ownKeys(o)){if(u==="__proto__")continue;let p=t.keyType._zod.run({value:u,issues:[]},n);if(p instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof u=="string"&&vo.test(u)&&p.issues.length){let x=t.keyType._zod.run({value:Number(u),issues:[]},n);if(x instanceof Promise)throw new Error("Async schemas not supported in object keys currently");x.issues.length===0&&(p=x)}if(p.issues.length){t.mode==="loose"?r.value[u]=o[u]:r.issues.push({code:"invalid_key",origin:"record",issues:p.issues.map(x=>Xe(x,n,Fe())),input:u,path:[u],inst:e});continue}let g=t.valueType._zod.run({value:o[u],issues:[]},n);g instanceof Promise?a.push(g.then(x=>{x.issues.length&&r.issues.push(...Je(u,x.issues)),r.value[p.value]=x.value})):(g.issues.length&&r.issues.push(...Je(u,g.issues)),r.value[p.value]=g.value)}}return a.length?Promise.all(a).then(()=>r):r}});var Sa=w("$ZodEnum",(e,t)=>{ce.init(e,t);let r=go(t.entries),n=new Set(r);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.filter(o=>Ji.has(typeof o)).map(o=>typeof o=="string"?_t(o):o.toString()).join("|")})$`),e._zod.parse=(o,a)=>{let s=o.value;return n.has(s)||o.issues.push({code:"invalid_value",values:r,input:s,inst:e}),o}}),$a=w("$ZodLiteral",(e,t)=>{if(ce.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let r=new Set(t.values);e._zod.values=r,e._zod.pattern=new RegExp(`^(${t.values.map(n=>typeof n=="string"?_t(n):n?_t(n.toString()):String(n)).join("|")})$`),e._zod.parse=(n,o)=>{let a=n.value;return r.has(a)||n.issues.push({code:"invalid_value",values:t.values,input:a,inst:e}),n}});var wa=w("$ZodTransform",(e,t)=>{ce.init(e,t),e._zod.parse=(r,n)=>{if(n.direction==="backward")throw new Ar(e.constructor.name);let o=t.transform(r.value,r);if(n.async)return(o instanceof Promise?o:Promise.resolve(o)).then(s=>(r.value=s,r));if(o instanceof Promise)throw new Ue;return r.value=o,r}});function ma(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}i(ma,"handleOptionalResult");var Oa=w("$ZodOptional",(e,t)=>{ce.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ge(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ge(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${wr(r.source)})?$`):void 0}),e._zod.parse=(r,n)=>{if(t.innerType._zod.optin==="optional"){let o=t.innerType._zod.run(r,n);return o instanceof Promise?o.then(a=>ma(a,r.value)):ma(o,r.value)}return r.value===void 0?r:t.innerType._zod.run(r,n)}});var za=w("$ZodNullable",(e,t)=>{ce.init(e,t),ge(e._zod,"optin",()=>t.innerType._zod.optin),ge(e._zod,"optout",()=>t.innerType._zod.optout),ge(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${wr(r.source)}|null)$`):void 0}),ge(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(r,n)=>r.value===null?r:t.innerType._zod.run(r,n)});var Ra=w("$ZodPipe",(e,t)=>{ce.init(e,t),ge(e._zod,"values",()=>t.in._zod.values),ge(e._zod,"optin",()=>t.in._zod.optin),ge(e._zod,"optout",()=>t.out._zod.optout),ge(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(r,n)=>{if(n.direction==="backward"){let a=t.out._zod.run(r,n);return a instanceof Promise?a.then(s=>kr(s,t.in,n)):kr(a,t.in,n)}let o=t.in._zod.run(r,n);return o instanceof Promise?o.then(a=>kr(a,t.out,n)):kr(o,t.out,n)}});function kr(e,t,r){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}i(kr,"handlePipeResult");var ka=w("$ZodCustom",(e,t)=>{Ye.init(e,t),ce.init(e,t),e._zod.parse=(r,n)=>r,e._zod.check=r=>{let n=r.value,o=t.fn(n);if(o instanceof Promise)return o.then(a=>ga(a,r,n,e));ga(o,r,n,e)}});function ga(e,t,r,n){if(!e){let o={code:"custom",input:r,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(o.params=n._zod.def.params),t.issues.push(yo(o))}}i(ga,"handleRefineResult");var Ca;var Eo=class{static{i(this,"$ZodRegistry")}constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let n=r[0];return this._map.set(t,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let n={...this.get(r)??{}};delete n.id;let o={...n,...this._map.get(t)};return Object.keys(o).length?o:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function Na(){return new Eo}i(Na,"registry");(Ca=globalThis).__zod_globalRegistry??(Ca.__zod_globalRegistry=Na());var Io=globalThis.__zod_globalRegistry;function Ua(e,t){return new e({type:"string",...ne(t)})}i(Ua,"_string");function Ma(e,t){return new e({type:"string",coerce:!0,...ne(t)})}i(Ma,"_coercedString");function La(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...ne(t)})}i(La,"_url");function ja(e,t){return new e({type:"number",checks:[],...ne(t)})}i(ja,"_number");function Fa(e,t){return new e({type:"number",coerce:!0,checks:[],...ne(t)})}i(Fa,"_coercedNumber");function Ba(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...ne(t)})}i(Ba,"_int");function Ha(e,t){return new e({type:"boolean",...ne(t)})}i(Ha,"_boolean");function Va(e,t){return new e({type:"boolean",coerce:!0,...ne(t)})}i(Va,"_coercedBoolean");function Za(e,t){return new e({type:"bigint",coerce:!0,...ne(t)})}i(Za,"_coercedBigint");function qa(e){return new e({type:"any"})}i(qa,"_any");function Ga(e){return new e({type:"unknown"})}i(Ga,"_unknown");function Wa(e,t){return new e({type:"void",...ne(t)})}i(Wa,"_void");function Ka(e,t){return new e({type:"date",coerce:!0,...ne(t)})}i(Ka,"_coercedDate");function Nr(e,t){return new aa({check:"greater_than",...ne(t),value:e,inclusive:!0})}i(Nr,"_gte");function ke(e,t){return new ua({check:"min_length",...ne(t),minimum:e})}i(ke,"_minLength");function Qe(e,t){return new ca({check:"string_format",format:"regex",...ne(t),pattern:e})}i(Qe,"_regex");function Ja(e,t,r){let n=ne(r);return n.abort??(n.abort=!0),new e({type:"custom",check:"custom",fn:t,...n})}i(Ja,"_custom");var he=w("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");ce.init(e,t),e.def=t,e.type=t.type,e.parse=(r,n)=>zr(e,r,n,{callee:e.parse}),e.safeParse=(r,n)=>Kt(e,r,n),e.parseAsync=async(r,n)=>Rr(e,r,n,{callee:e.parseAsync}),e.safeParseAsync=async(r,n)=>Jt(e,r,n),e.check=(...r)=>e.clone({...t,checks:[...t.checks??[],...r.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]},{parent:!0}),e.with=e.check,e.clone=(r,n)=>Or(e,r,n),e.brand=()=>e,e.register=((r,n)=>(r.add(e,n),e)),e.apply=r=>r(e)}),Mr=w("ZodMiniString",(e,t)=>{Cr.init(e,t),he.init(e,t)});function c(e){return Ua(Mr,e)}i(c,"string");var Xa=w("ZodMiniStringFormat",(e,t)=>{Po.init(e,t),Mr.init(e,t)});var Nd=w("ZodMiniURL",(e,t)=>{ha.init(e,t),Xa.init(e,t)});function Ya(e){return La(Nd,e)}i(Ya,"url");var Lr=w("ZodMiniNumber",(e,t)=>{xo.init(e,t),he.init(e,t)});function be(e){return ja(Lr,e)}i(be,"number");var Ud=w("ZodMiniNumberFormat",(e,t)=>{ya.init(e,t),Lr.init(e,t)});function Qa(e){return Ba(Ud,e)}i(Qa,"int");var Ao=w("ZodMiniBoolean",(e,t)=>{bo.init(e,t),he.init(e,t)});function Q(e){return Ha(Ao,e)}i(Q,"boolean");var es=w("ZodMiniBigInt",(e,t)=>{va.init(e,t),he.init(e,t)});var Md=w("ZodMiniAny",(e,t)=>{_a.init(e,t),he.init(e,t)});function Yt(){return qa(Md)}i(Yt,"any");var Ld=w("ZodMiniUnknown",(e,t)=>{Pa.init(e,t),he.init(e,t)});function U(){return Ga(Ld)}i(U,"unknown");var jd=w("ZodMiniVoid",(e,t)=>{xa.init(e,t),he.init(e,t)});function ts(e){return Wa(jd,e)}i(ts,"_void");var rs=w("ZodMiniDate",(e,t)=>{ba.init(e,t),he.init(e,t)});var Fd=w("ZodMiniArray",(e,t)=>{Ta.init(e,t),he.init(e,t)});function F(e,t){return new Fd({type:"array",element:e,...ne(t)})}i(F,"array");var Bd=w("ZodMiniObject",(e,t)=>{Ea.init(e,t),he.init(e,t),ge(e,"shape",()=>t.shape)});function m(e,t){let r={type:"object",shape:e??{},...ne(t)};return new Bd(r)}i(m,"object");var Hd=w("ZodMiniUnion",(e,t)=>{To.init(e,t),he.init(e,t)});function B(e,t){return new Hd({type:"union",options:e,...ne(t)})}i(B,"union");var Vd=w("ZodMiniDiscriminatedUnion",(e,t)=>{Ia.init(e,t),he.init(e,t)});function et(e,t,r){return new Vd({type:"union",options:t,discriminator:e,...ne(r)})}i(et,"discriminatedUnion");var Zd=w("ZodMiniRecord",(e,t)=>{Aa.init(e,t),he.init(e,t)});function M(e,t,r){return new Zd({type:"record",keyType:e,valueType:t,...ne(r)})}i(M,"record");var qd=w("ZodMiniEnum",(e,t)=>{Sa.init(e,t),he.init(e,t),e.options=Object.values(t.entries)});function W(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new qd({type:"enum",entries:r,...ne(t)})}i(W,"_enum");var Gd=w("ZodMiniLiteral",(e,t)=>{$a.init(e,t),he.init(e,t)});function k(e,t){return new Gd({type:"literal",values:Array.isArray(e)?e:[e],...ne(t)})}i(k,"literal");var Wd=w("ZodMiniTransform",(e,t)=>{wa.init(e,t),he.init(e,t)});function tt(e){return new Wd({type:"transform",transform:e})}i(tt,"transform");var Kd=w("ZodMiniOptional",(e,t)=>{Oa.init(e,t),he.init(e,t)});function P(e){return new Kd({type:"optional",innerType:e})}i(P,"optional");var Jd=w("ZodMiniNullable",(e,t)=>{za.init(e,t),he.init(e,t)});function Qt(e){return new Jd({type:"nullable",innerType:e})}i(Qt,"nullable");var Xd=w("ZodMiniPipe",(e,t)=>{Ra.init(e,t),he.init(e,t)});function rt(e,t){return new Xd({type:"pipe",in:e,out:t})}i(rt,"pipe");var Yd=w("ZodMiniCustom",(e,t)=>{ka.init(e,t),he.init(e,t)});function jr(e,t){return Ja(Yd,e??(()=>!0),t)}i(jr,"custom");var er={};po(er,{bigint:()=>of,boolean:()=>nf,date:()=>af,number:()=>rf,string:()=>tf});function tf(e){return Ma(Mr,e)}i(tf,"string");function rf(e){return Fa(Lr,e)}i(rf,"number");function nf(e){return Va(Ao,e)}i(nf,"boolean");function of(e){return Za(es,e)}i(of,"bigint");function af(e){return Ka(rs,e)}i(af,"date");var $o=m({retryOnFailure:m({defaultValue:P(Q()),hide:P(Q())}),continueOnFailure:m({defaultValue:P(Q()),hide:P(Q())})}),So=class{constructor(t,r,n,o,a,s,u,p,d,g,x){this.name=t;this.displayName=r;this.description=n;this.props=o;this.run=a;this.test=s;this.requireAuth=u;this.errorHandlingOptions=p;this.outputSchema=d;this.audience=g;this.aiMetadata=x}static{i(this,"IAction")}},oe=i(e=>new So(e.name,e.displayName,e.description,e.props,e.run,e.test??e.run,e.requireAuth??!0,e.errorHandlingOptions??{continueOnFailure:{defaultValue:!1},retryOnFailure:{defaultValue:!1}},e.outputSchema,e.audience,e.aiMetadata),"createAction");var Y=m({displayName:c(),description:P(c())}),q=i((e,t)=>m({type:k(t),required:Q(),defaultValue:P(Yt())}),"TPropertyValue");var Se=m({...Y.shape,...q(c(),"SHORT_TEXT").shape}),Be=m({...Y.shape,...q(c(),"LONG_TEXT").shape});var os=m({label:c(),value:U()}),Fr=m({disabled:P(Q()),placeholder:P(c()),options:F(os)});var $e=m({...Y.shape,options:Fr,...q(U(),"STATIC_DROPDOWN").shape}),He=m({...Y.shape,options:Fr,...q(F(U()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var wo=m({...Y.shape,...q(U(),"DROPDOWN").shape,refreshers:F(c())}),tr=m({...Y.shape,...q(F(U()),"MULTI_SELECT_DROPDOWN").shape,refreshers:F(c())});var Ve=m({...Y.shape,...q(Q(),"CHECKBOX").shape});var Ze=m({...Y.shape,...q(be(),"NUMBER").shape});var rr=m({...Y.shape,streaming:P(Q()),...q(U(),"FILE").shape});var nr=m({...Y.shape,...q(c(),"DATE_TIME").shape});var is=M(c(),B([Se,Be,$e,tr,He,Ve,Ze,rr,nr])),or=m({...Y.shape,properties:is,...q(F(U()),"ARRAY").shape});var ir=m({...Y.shape,...q(B([M(c(),U())]),"JSON").shape});var as=B([Se,$e,ir,or,He]),uf=M(c(),as),Oo=m({refreshers:F(c()),...Y.shape,...q(U(),"DYNAMIC").shape});var Br=m({...Y.shape,...q(ts(),"MARKDOWN").shape});var ar=(r=>(r.ARCHIVE="ARCHIVE",r.REGISTRY="REGISTRY",r))(ar||{}),xt=(r=>(r.CUSTOM="CUSTOM",r.OFFICIAL="OFFICIAL",r))(xt||{}),sr=(_=>(_.ARTIFICIAL_INTELLIGENCE="ARTIFICIAL_INTELLIGENCE",_.COMMUNICATION="COMMUNICATION",_.COMMERCE="COMMERCE",_.CORE="CORE",_.UNIVERSAL_AI="UNIVERSAL_AI",_.FLOW_CONTROL="FLOW_CONTROL",_.BUSINESS_INTELLIGENCE="BUSINESS_INTELLIGENCE",_.ACCOUNTING="ACCOUNTING",_.PRODUCTIVITY="PRODUCTIVITY",_.CONTENT_AND_FILES="CONTENT_AND_FILES",_.DEVELOPER_TOOLS="DEVELOPER_TOOLS",_.CUSTOMER_SUPPORT="CUSTOMER_SUPPORT",_.FORMS_AND_SURVEYS="FORMS_AND_SURVEYS",_.HUMAN_RESOURCES="HUMAN_RESOURCES",_.PAYMENT_PROCESSING="PAYMENT_PROCESSING",_.MARKETING="MARKETING",_.SALES_AND_CRM="SALES_AND_CRM",_))(sr||{});var ur=(r=>(r.AUTHORIZATION_CODE="authorization_code",r.CLIENT_CREDENTIALS="client_credentials",r))(ur||{}),zo="both_client_credentials_and_authorization_code";var Me=(o=>(o.POLLING="POLLING",o.WEBHOOK="WEBHOOK",o.APP_WEBHOOK="APP_WEBHOOK",o.MANUAL="MANUAL",o))(Me||{}),cr=(a=>(a.NONE="NONE",a.HEADER_PRESENT="HEADER_PRESENT",a.QUERY_PRESENT="QUERY_PRESENT",a.BODY_PARAM_PRESENT="BODY_PARAM_PRESENT",a.HEAD_REQUEST="HEAD_REQUEST",a))(cr||{}),cf=m({strategy:W(cr),paramName:P(c())}),lr=(r=>(r.SIMULATION="SIMULATION",r.TEST_FUNCTION="TEST_FUNCTION",r))(lr||{});var Hr=(r=>(r.WEBSOCKET="WEBSOCKET",r.NONE="NONE",r))(Hr||{}),ss=m({status:P(be()),body:P(U()),headers:P(M(c(),c()))}),us=m({type:k("DELAY"),resumeDateTime:c(),requestIdToReply:P(c()),handlerId:P(c()),streamStepProgress:P(W(Hr))}),cs=m({type:k("WEBHOOK"),requestId:c(),requestIdToReply:P(c()),response:ss,handlerId:P(c()),streamStepProgress:P(W(Hr))}),lf=B([us,cs]);var pf=m({body:U(),rawBody:P(U()),headers:M(c(),c()),queryParams:M(c(),c())});function ye(e){return e==null}i(ye,"isNil");function pr(e){return e==null?!0:typeof e=="string"||Array.isArray(e)?e.length===0:typeof e=="object"?Object.keys(e).length===0:!1}i(pr,"isEmpty");function Vr(e,t){if(e==null)throw new Error(`${t} is null or undefined`)}i(Vr,"assertNotNullOrUndefined");var Ro=Ne(require("crypto"),1);var df=128,pt,bt,ff=i(e=>{!pt||pt.length<e?(pt=Buffer.allocUnsafe(e*df),Ro.default.randomFillSync(pt),bt=0):bt+e>pt.length&&(Ro.default.randomFillSync(pt),bt=0),bt+=e},"fillPool"),mf=i(e=>(ff(e|=0),pt.subarray(bt-e,bt)),"random"),gf=i((e,t,r)=>{let n=(2<<31-Math.clz32(e.length-1|1))-1,o=Math.ceil(1.6*n*t/e.length);return(a=t)=>{let s="";for(;;){let u=r(o),p=o;for(;p--;)if(s+=e[u[p]&n]||"",s.length===a)return s}}},"customRandom"),ps=i((e,t=21)=>gf(e,t,mf),"customAlphabet");var hf="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",ds=21,Z$=c().check(Qe(new RegExp(`^[0-9a-zA-Z]{${ds}}$`))),yf=ps(hf,ds);var nt=rt(tt(e=>e instanceof Date?e.toISOString():e),c()),Oe={id:c(),created:nt,updated:nt},ae=i(e=>P(Qt(e)),"Nullable");function ko(e){return P(Qt(W(e)))}i(ko,"NullableEnum");var W$=rt(tt(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),P(Q())),Zr=i(e=>rt(tt(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),P(F(e))),"OptionalArrayFromQuery");var X$=M(c(),U());var dr=(g=>(g.OPENAI="openai",g.OPENROUTER="openrouter",g.ANTHROPIC="anthropic",g.AZURE="azure",g.GOOGLE="google",g.ACTIVEPIECES="activepieces",g.CLOUDFLARE_GATEWAY="cloudflare-gateway",g.CUSTOM="custom",g.BEDROCK="bedrock",g.MISTRAL="mistral",g))(dr||{});var cw=c().check(Qe(/^#[0-9A-Fa-f]{6}$/));var pw=m({filename:c(),data:U(),type:k("file"),mimetype:P(c())});var vf=Ne(ms());var vw=m({...Oe,name:c(),permissions:F(c()),platformId:ae(c()),type:c(),userCount:P(be())});var gs=(n=>(n.AGENT_DECIDE="agent-decide",n.CHOOSE_YOURSELF="choose-yourself",n.LEAVE_EMPTY="leave-empty",n))(gs||{}),Do=(r=>(r.FILE="FILE",r.TABLE="TABLE",r))(Do||{}),Co=(n=>(n.SSE="sse",n.STREAMABLE_HTTP="streamable-http",n.SIMPLE_HTTP="http",n))(Co||{});var No=(n=>(n.TEXT="text",n.NUMBER="number",n.BOOLEAN="boolean",n))(No||{});var Uo=(r=>(r.IN_PROGRESS="in-progress",r.COMPLETED="completed",r))(Uo||{});var _f=m({mode:W(gs),value:U()}),Pf=m({auth:P(c()),fields:M(c(),_f)}),xf=m({pieceName:c(),pieceVersion:c(),actionName:c(),predefinedInput:P(Pf)}),bf=m({type:k("PIECE"),toolName:c().check(ke(1)),pieceMetadata:xf}),Tf=m({type:k("none")}),Ef=m({type:k("access_token"),accessToken:c()}),If=m({type:k("api_key"),apiKey:c(),apiKeyHeader:c()}),Af=m({type:k("headers"),headers:M(c(),c())}),Sf=et("type",[Tf,Ef,If,Af]),hs=m({type:k("FLOW"),toolName:c().check(ke(1)),externalFlowId:c(),flowDisplayName:P(c())}),ys=m({type:k("MCP"),toolName:c().check(ke(1)),serverUrl:Ya(),protocol:W(Co),auth:Sf}),vs=m({type:k("KNOWLEDGE_BASE"),toolName:c().check(ke(1)),sourceType:W(Do),sourceId:c(),sourceName:c()}),$f=et("type",[bf,hs,ys,vs]),wf=m({displayName:c(),description:P(c()),type:W(No)}),_s=m({type:k("MARKDOWN"),markdown:c()}),Tt={type:k("TOOL_CALL"),input:ae(M(c(),U())),output:P(U()),toolName:c(),status:W(Uo),toolCallId:c(),startTime:c(),endTime:P(c())},Kw=m(Tt),Ps=et("toolCallType",[m({...Tt,toolCallType:k("PIECE"),pieceName:c(),pieceVersion:c(),actionName:c()}),m({...Tt,toolCallType:k("FLOW"),displayName:c(),externalFlowId:c()}),m({...Tt,toolCallType:k("MCP"),displayName:c(),serverUrl:c()}),m({...Tt,toolCallType:k("KNOWLEDGE_BASE"),displayName:c(),sourceType:c()}),m({...Tt,toolCallType:k("UNKNOWN"),displayName:c()})]),Of=B([_s,Ps]);var Mo=(r=>(r.IMAGE="image",r.TEXT="text",r))(Mo||{}),qe=m({apiKey:c()}),zf=qe,Rf=m({apiKey:c(),apiKeyHash:c()}),kf=qe,Df=qe,Cf=qe,Nf=qe,Uf=qe,Mf=qe,Lf=qe,Is=m({accessKeyId:c().check(ke(1)),secretAccessKey:c().check(ke(1))}),jf=m({}),Ff=m({}),Bf=m({}),Hf=m({}),Vf=m({}),Zf=m({}),As=m({modelId:c(),modelName:c(),modelType:W(Mo)}),Ss=m({apiKeyHeader:c(),baseUrl:c(),models:F(As),defaultHeaders:P(M(c(),c()))}),$s=m({accountId:c(),gatewayId:c(),models:F(As),vertexProject:P(c()),vertexRegion:P(c())}),ws=m({resourceName:c(),apiVersion:rt(tt(e=>typeof e=="string"&&e.trim().length===0?void 0:e),P(c()))}),Os=m({region:c().check(ke(1))}),qf=B([zf,Cf,Nf,Uf,Mf,Df,kf,Rf,Is,Lf]),zs=B([Ss,$s,ws,Os,jf,Bf,Hf,Vf,Ff,Zf]),Gf=m({id:c(),name:c(),type:W(Mo)}),Wf=m({id:c(),name:c(),provider:W(dr),config:zs,enabledForChat:Q()}),Kf=m({provider:W(dr),config:zs,auth:qf,platformId:c()});var Qw={openai:"openai",anthropic:"anthropic","google-ai-studio":"google","google-vertex-ai":"google"},xs=["gpt-5.5","gpt-5.4-mini","gpt-5.4-nano","gpt-4.1","gpt-4.1-mini"],Jf=["claude-sonnet-4-6","claude-opus-4-7","claude-haiku-4-5"],Xf=["claude-sonnet-4.6","claude-opus-4.7","claude-haiku-4.5"],bs=["gemini-2.5-pro","gemini-2.5-flash","gemini-3.1-pro-preview","gemini-3-flash-preview"],Yf=["grok-4.20","grok-4.1-fast"],Qf={openai:xs,anthropic:Jf,google:bs,activepieces:[...Xf.map(e=>`anthropic/${e}`),...xs.map(e=>`openai/${e}`),...bs.map(e=>`google/${e}`),...Yf.map(e=>`x-ai/${e}`)]};var Ts=128e3,em={openai:128e3,anthropic:2e5,google:1048576,bedrock:2e5,azure:128e3,openrouter:128e3,activepieces:2e5,mistral:128e3};function tm({provider:e}){return e?em[e]??Ts:Ts}i(tm,"getMaxContextTokens");var Es={openai:"text-embedding-3-small",google:"text-embedding-004",azure:"text-embedding-3-small",activepieces:"text-embedding-3-small",openrouter:"openai/text-embedding-3-small"},rm={anthropic:"native",google:"native",openrouter:"plugin",activepieces:"plugin"},nm=new Set(["anthropic","mistral"]);function Le(e){return{chatModels:Qf[e],maxContextTokens:tm({provider:e}),defaultEmbeddingModel:Es[e],supportsEmbedding:Es[e]!==void 0,supportsImageGeneration:!nm.has(e),webSearch:rm[e]}}i(Le,"buildProviderCapabilities");var om={openai:Le("openai"),anthropic:Le("anthropic"),openrouter:Le("openrouter"),azure:Le("azure"),google:Le("google"),"cloudflare-gateway":Le("cloudflare-gateway"),custom:Le("custom"),bedrock:Le("bedrock"),mistral:Le("mistral"),activepieces:Le("activepieces")};var im=m({base64Url:c(),fileName:c(),extension:P(c())}),am=m({mimeType:c(),url:c(),fileName:P(c())}),Lo=B([im,am]);var sm=B([m({type:k("file"),value:Lo}),m({type:k("markdown"),value:c(),files:P(F(Lo))})]),um=m({sessionId:c(),message:c(),files:P(F(c()))});var ks=(r=>(r.ON_NEW_RECORD="ON_NEW_RECORD",r.ON_UPDATE_RECORD="ON_UPDATE_RECORD",r))(ks||{}),Ds=(r=>(r.ENABLED="ENABLED",r.DISABLED="DISABLED",r))(Ds||{}),jo=(n=>(n.RECORD_CREATED="RECORD_CREATED",n.RECORD_UPDATED="RECORD_UPDATED",n.RECORD_DELETED="RECORD_DELETED",n))(jo||{});var cm=B([m({...Oe,name:c(),externalId:c(),type:k("STATIC_DROPDOWN"),tableId:c(),projectId:c(),data:m({options:F(m({value:c()}))})}),m({...Oe,name:c(),externalId:c(),type:B([k("TEXT"),k("NUMBER"),k("DATE")]),tableId:c(),projectId:c()})]),lm=m({...Oe,name:c(),folderId:ae(c()),projectId:c(),externalId:c(),status:ko(Ds),trigger:ko(ks)}),pm=m({...Oe,tableId:c(),projectId:c(),cells:M(c(),m({updated:c(),created:c(),value:U(),fieldName:c()}))}),dm=m({events:F(W(jo)),webhookUrl:c(),flowId:c()}),fm=m({fields:F(m({id:c(),name:c()})),rows:F(M(c(),c())),name:c()}),mm=m({projectId:c(),limit:P(er.number()),cursor:P(c()),name:P(c()),externalIds:Zr(c()),folderId:P(c()),folderIds:Zr(c())}),gm=m({records:F(F(m({fieldId:c(),value:Ns()}))),tableId:c()}),hm=m({cells:P(F(m({fieldId:c(),value:Ns()}))),tableId:c(),agentUpdate:P(Q())}),Cs=et("operator",[dt("eq"),dt("neq"),dt("gt"),dt("gte"),dt("lt"),dt("lte"),dt("co"),Rs("exists"),Rs("not_exists")]),ym=m({tableId:c(),limit:P(er.number()),cursor:P(c()),filters:Zr(Cs)});function Ns(){return rt(tt(e=>e==null?e:String(e)),Qt(c()))}i(Ns,"coerceToString");function dt(e){return m({fieldId:c(),operator:k(e),value:c()})}i(dt,"valueFilter");function Rs(e){return m({fieldId:c(),operator:k(e)})}i(Rs,"existenceFilter");var vm=m({status:P(be()),body:P(U()),headers:P(M(c(),c()))}),_m=m({...Oe,deleted:ae(nt),ownerId:c(),displayName:c(),platformId:c(),externalId:ae(c())});var Us=m({name:c(),description:P(c()),type:c(),required:Q()}),Pm=m({pieceName:c(),triggerName:c(),input:m({toolName:c(),toolDescription:c(),inputSchema:F(Us),returnsResponse:Q()})});var Ms="^[0-9]+\\.[0-9]+\\.[0-9]+$",vO=new RegExp(Ms),bm="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",_O=c().check(Qe(new RegExp(Ms))),PO=c().check(Qe(new RegExp(bm))),Tm=m({packageType:k("ARCHIVE"),pieceType:W(xt),pieceName:c(),pieceVersion:c(),archiveId:c(),platformId:c()}),Ls=m({packageType:k("REGISTRY"),pieceType:k("OFFICIAL"),pieceName:c(),pieceVersion:c()}),js=m({packageType:k("REGISTRY"),pieceType:k("CUSTOM"),pieceName:c(),pieceVersion:c(),platformId:c()}),xO=B([Ls,js]),bO=B([Tm,Ls,js]);var Em=et("type",[m({type:k("CRON_EXPRESSION"),cronExpression:c(),timezone:c()}),m({type:k("INTERVAL"),intervalMs:Qa().check(Nr(6e4))})]),TO=m({...Oe,type:W(Me),projectId:c(),flowId:c(),triggerName:c(),schedule:ae(Em),flowVersionId:c(),pieceName:c(),pieceVersion:c(),deleted:ae(c()),simulate:Q()}),Fs=(h=>(h.UNKNOWN="UNKNOWN",h.FLOW_RUN_LOG="FLOW_RUN_LOG",h.FLOW_RUN_LOG_SLICE="FLOW_RUN_LOG_SLICE",h.PACKAGE_ARCHIVE="PACKAGE_ARCHIVE",h.FLOW_STEP_FILE="FLOW_STEP_FILE",h.SAMPLE_DATA="SAMPLE_DATA",h.TRIGGER_PAYLOAD="TRIGGER_PAYLOAD",h.SAMPLE_DATA_INPUT="SAMPLE_DATA_INPUT",h.TRIGGER_EVENT_FILE="TRIGGER_EVENT_FILE",h.PROJECT_RELEASE="PROJECT_RELEASE",h.FLOW_VERSION_BACKUP="FLOW_VERSION_BACKUP",h.PLATFORM_ASSET="PLATFORM_ASSET",h.USER_PROFILE_PICTURE="USER_PROFILE_PICTURE",h.WEBHOOK_PAYLOAD="WEBHOOK_PAYLOAD",h.KNOWLEDGE_BASE="KNOWLEDGE_BASE",h.FLOW_BUNDLE="FLOW_BUNDLE",h))(Fs||{}),Bs=(r=>(r.NONE="NONE",r.ZSTD="ZSTD",r))(Bs||{}),Hs=(r=>(r.S3="S3",r.DB="DB",r))(Hs||{}),EO=m({...Oe,projectId:ae(c()),platformId:ae(c()),type:W(Fs),compression:W(Bs),data:P(U()),location:W(Hs),size:ae(be()),fileName:ae(c()),s3Key:ae(c()),metadata:ae(M(c(),c()))}),Vs=(n=>(n.ADMIN="ADMIN",n.MEMBER="MEMBER",n.OPERATOR="OPERATOR",n))(Vs||{}),Zs=(r=>(r.ACTIVE="ACTIVE",r.INACTIVE="INACTIVE",r))(Zs||{}),IO=m({id:c(),email:c(),firstName:c(),status:W(Zs),externalId:ae(c()),platformId:ae(c()),platformRole:W(Vs),lastName:c(),created:nt,updated:nt,lastActiveDate:ae(nt),imageUrl:ae(c())});var Fo=m({...Y.shape,...q(M(c(),U()),"OBJECT").shape});var Ks=m({...Y.shape,...q(c(),"COLOR").shape});var Bo=B([Se,Be,Br,Ve,$e,He,wo,tr,Oo,Ze,or,Fo,ir,nr,rr,Ks]),R={ShortText(e){return{...e,valueSchema:void 0,type:"SHORT_TEXT"}},Checkbox(e){return{...e,valueSchema:void 0,type:"CHECKBOX"}},LongText(e){return{...e,valueSchema:void 0,type:"LONG_TEXT"}},MarkDown(e){return{displayName:"Markdown",required:!1,description:e.value,type:"MARKDOWN",valueSchema:void 0,variant:e.variant??"INFO"}},Number(e){return{...e,valueSchema:void 0,type:"NUMBER"}},Json(e){return{...e,valueSchema:void 0,type:"JSON"}},Array(e){return{...e,valueSchema:void 0,type:"ARRAY"}},Object(e){return{...e,valueSchema:void 0,type:"OBJECT"}},Dropdown(e){return{...e,valueSchema:void 0,type:"DROPDOWN"}},StaticDropdown(e){return{...e,valueSchema:void 0,type:"STATIC_DROPDOWN"}},MultiSelectDropdown(e){return{...e,valueSchema:void 0,type:"MULTI_SELECT_DROPDOWN"}},DynamicProperties(e){return{...e,valueSchema:void 0,type:"DYNAMIC"}},StaticMultiSelectDropdown(e){return{...e,valueSchema:void 0,type:"STATIC_MULTI_SELECT_DROPDOWN"}},DateTime(e){return{...e,valueSchema:void 0,type:"DATE_TIME"}},File(e){return{...e,valueSchema:void 0,type:"FILE"}},Custom(e){let t=e.code.toString();return{...e,code:t,valueSchema:void 0,type:"CUSTOM"}},Color(e){return{...e,valueSchema:void 0,type:"COLOR"}}};var je=m({displayName:c(),description:P(c())});var Js=m({username:c(),password:c()}),Ho=m({...je.shape,username:m({displayName:c(),description:P(c())}),password:m({displayName:c(),description:P(c())}),...q(Js,"BASIC_AUTH").shape});var $m=M(c(),B([Se,Be,Ze,Ve,$e])),Vo=m({...je.shape,props:$m,...q(U(),"CUSTOM_AUTH").shape});var ft=m({...je.shape,...q(m({auth:c()}),"SECRET_TEXT").shape});var wm=M(c(),B([Se,Be,ft,Ze,Ve,$e,He,Br])),Xs=m({...je.shape,props:wm,...q(U(),"OIDC").shape});var Zo=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(Zo||{}),Ys=B([Se,ft,$e]),Qs=M(c(),Ys),Om=m({props:P(M(c(),Ys)),authUrl:c(),tokenUrl:c(),scope:F(c()),prompt:P(B([k("none"),k("consent"),k("login"),k("omit")])),pkce:P(Q()),pkceMethod:P(B([k("plain"),k("S256")])),authorizationMethod:P(W(Zo)),grantType:P(B([W(ur),k(zo)])),extra:P(M(c(),c()))}),eu=m({access_token:c(),props:P(Qs),data:M(c(),Yt())}),qo=m({...je.shape,...Om.shape,...q(eu,"OAUTH2").shape});var Et=B([Ho,Vo,Xs,qo,ft]),fr="Connection",Go={SecretText(e){return{...e,valueSchema:void 0,type:"SECRET_TEXT"}},OAuth2(e){return{...e,valueSchema:void 0,type:"OAUTH2",displayName:e.displayName||fr}},BasicAuth(e){return{...e,valueSchema:void 0,type:"BASIC_AUTH",displayName:e.displayName||fr,required:!0}},CustomAuth(e){return{...e,valueSchema:void 0,type:"CUSTOM_AUTH",displayName:e.displayName||fr}},OIDC(e){return{...e,valueSchema:void 0,type:"OIDC",displayName:e.displayName||fr}},None(){}};var nR={OAUTH2:"OAUTH2",CLOUD_OAUTH2:"OAUTH2",PLATFORM_OAUTH2:"OAUTH2",BASIC_AUTH:"BASIC_AUTH",CUSTOM_AUTH:"CUSTOM_AUTH",OIDC:"OIDC",SECRET_TEXT:"SECRET_TEXT",NO_AUTH:void 0};var zm=m({...Y.shape,...q(U(),"CUSTOM").shape,code:c()});var Rm=B([Bo,Et]),Wo=M(c(),Rm),TR=M(c(),Bo);var tu=B([m({strategy:k("CRON"),cronExpression:c()}),m({strategy:k("NONE")})]),It=class{constructor(t,r,n,o,a,s,u,p,d,g,x,v,l,f,y,h,_,T,H){this.name=t;this.displayName=r;this.description=n;this.requireAuth=o;this.props=a;this.type=s;this.handshakeConfiguration=u;this.onHandshake=p;this.renewConfiguration=d;this.onRenew=g;this.onEnable=x;this.onDisable=v;this.onStart=l;this.run=f;this.test=y;this.sampleData=h;this.testStrategy=_;this.outputSchema=T;this.aiMetadata=H}static{i(this,"ITrigger")}},At=i(e=>{switch(e.type){case"WEBHOOK":return new It(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,e.handshakeConfiguration??{strategy:"NONE"},e.onHandshake??(async()=>({status:200})),e.renewConfiguration??{strategy:"NONE"},e.onRenew??(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,e.test?"TEST_FUNCTION":"SIMULATION",e.outputSchema,e.aiMetadata);case"POLLING":return new It(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,"TEST_FUNCTION",e.outputSchema,e.aiMetadata);case"MANUAL":return new It(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,"TEST_FUNCTION",e.outputSchema,e.aiMetadata);case"APP_WEBHOOK":return new It(e.name,e.displayName,e.description,e.requireAuth??!0,e.props,e.type,{strategy:"NONE"},async()=>({status:200}),{strategy:"NONE"},(async()=>Promise.resolve()),e.onEnable,e.onDisable,e.onStart??(async()=>Promise.resolve()),e.run,e.test??(()=>Promise.resolve([e.sampleData])),e.sampleData,ye(e.sampleData)&&ye(e.test)?"SIMULATION":"TEST_FUNCTION",e.outputSchema,e.aiMetadata)}},"createTrigger");var ru="2",Gr="0.82.0";var Ko=class{constructor(t,r,n,o,a,s,u,p,d=Gr,g,x="",v){this.displayName=t;this.logoUrl=r;this.authors=n;this.events=o;this.categories=u;this.auth=p;this.minimumSupportedRelease=d;this.maximumSupportedRelease=g;this.description=x;this.deprecated=v;this._actions={};this._triggers={};this.getContextInfo=i(()=>({version:ru}),"getContextInfo");(!km(d)||Dm(d,Gr))&&(this.minimumSupportedRelease=Gr),a.forEach(l=>this._actions[l.name]=l),s.forEach(l=>this._triggers[l.name]=l)}static{i(this,"Piece")}metadata(){return{displayName:this.displayName,logoUrl:this.logoUrl,actions:this._actions,triggers:this._triggers,categories:this.categories,description:this.description,authors:this.authors,auth:this.auth,minimumSupportedRelease:this.minimumSupportedRelease,maximumSupportedRelease:this.maximumSupportedRelease,deprecated:this.deprecated,contextInfo:this.getContextInfo?.()}}getAction(t){return this._actions[t]}getTrigger(t){return this._triggers[t]}actions(){return this._actions}triggers(){return this._triggers}},nu=i(e=>{if(e.auth&&Array.isArray(e.auth)&&!e.auth.every((r,n,o)=>n===o.findIndex(a=>a.type===r.type)))throw new Error("Auth properties must be unique by type");return new Ko(e.displayName,e.logoUrl,e.authors??[],e.events,e.actions,e.triggers,e.categories??[],e.auth,e.minimumSupportedRelease,e.maximumSupportedRelease,e.description,e.deprecated)},"createPiece");function km(e){return/^\d+\.\d+\.\d+$/.test(e)}i(km,"isValidSimpleSemver");function Dm(e,t){let[r,n,o]=e.split(".").map(Number),[a,s,u]=t.split(".").map(Number);return r!==a?r<a:n!==s?n<s:o<u}i(Dm,"isSemverLessThan");var Cm=P(M(c(),M(c(),c()))),ou=m({id:P(c()),name:c(),displayName:c(),logoUrl:c(),description:c(),authors:F(c()),platformId:P(c()),directoryPath:P(c()),auth:P(B([Et,F(Et)])),version:c(),categories:P(F(W(sr))),minimumSupportedRelease:P(c()),maximumSupportedRelease:P(c()),deprecated:P(Q()),i18n:Cm}),Nm=W(["human","ai","both"]),iu=m({description:P(c()),idempotent:P(Q())}),au=m({name:c(),displayName:c(),description:c(),props:Wo,requireAuth:Q(),errorHandlingOptions:P($o),outputSchema:P(jr()),audience:P(Nm),aiMetadata:P(iu)}),su=m({name:c(),displayName:c(),description:c(),props:Wo,errorHandlingOptions:P($o),type:W(Me),sampleData:U(),handshakeConfiguration:P(jr()),renewConfiguration:P(tu),testStrategy:W(lr),outputSchema:P(jr()),aiMetadata:P(iu)}),Um=m({...ou.shape,actions:M(c(),au),triggers:M(c(),su)}),Mm=m({...ou.shape,actions:be(),triggers:be(),suggestedActions:P(F(au)),suggestedTriggers:P(F(su))}),uu=m({projectUsage:be(),pieceType:W(xt),packageType:W(ar),platformId:P(c()),archiveId:P(c())}),Tk=m({...Um.shape,...uu.shape}),Ek=m({...Mm.shape,...uu.shape}),Ik=m({name:c(),version:c()});var Lm=Ne(require("path")),jm=Ne(require("fs/promises"));var mr="login.microsoftonline.com",lu="login.microsoftonline.us",cu={[mr]:"https://graph.microsoft.com",[lu]:"https://graph.microsoft.us"},pu=R.StaticDropdown({displayName:"Cloud Environment",description:"Select your Microsoft cloud environment.",required:!0,defaultValue:mr,options:{disabled:!1,options:[{label:"Commercial (Global)",value:mr},{label:"US Government (GCC High)",value:lu}]}});function du(e){return e??mr}i(du,"resolveCloudHost");function St(e){return du(e.props?.cloud)}i(St,"getMicrosoftCloudFromAuth");function $t(e){let t=du(e);return cu[t]??cu[mr]}i($t,"getGraphBaseUrl");var $c=Ne(Sc());var ay=`
6
6
  If you'd like to use your own custom Azure app instead of the default app, follow the [Azure app creation guide](https://learn.microsoft.com/en-us/entra/identity-platform/quickstart-register-app#register-an-application),
7
7
  set the **Redirect URI** to {{redirectUrl}} and add the following **Microsoft Graph (Delegated) permissions** under **API permissions**:
8
8
  - Group.Read.All
9
9
  - Tasks.ReadWrite
10
- - User.Read`,K=Ho.OAuth2({description:jh,props:{cloud:Qs},authUrl:"https://{cloud}/common/oauth2/v2.0/authorize",tokenUrl:"https://{cloud}/common/oauth2/v2.0/token",required:!0,scope:["Tasks.ReadWrite","User.Read","Group.Read.All"],prompt:"omit"}),I={endpoints:{createPlan:"/planner/plans",listPlans:"/me/planner/plans",listGroups:"/groups",planDetail:i(e=>`/planner/plans/${e}`,"planDetail"),listBuckets:i(e=>`/planner/plans/${e}/buckets`,"listBuckets"),listPlanTasks:i(e=>`/planner/plans/${e}/tasks`,"listPlanTasks"),createBucket:"/planner/buckets",bucketDetail:i(e=>`/planner/buckets/${e}`,"bucketDetail"),createTask:"/planner/tasks",deleteTask:i(e=>`/planner/tasks/${e}`,"deleteTask")},getClient:i(({auth:e})=>{let t=St(e);return hc.Client.initWithMiddleware({authProvider:{getAccessToken:i(async()=>e.access_token,"getAccessToken")},baseUrl:At(t)})},"getClient"),getUser:i(async({auth:e})=>await I.getClient({auth:e}).api("/me").get(),"getUser"),getEtag:i(async({auth:e,id:t,endpointType:r})=>{let n=I.getClient({auth:e}),o=I.endpoints[r],a=o(t);return(await n.api(a).get())["@odata.etag"]},"getEtag"),listUsers:i(async({auth:e})=>(await I.getClient({auth:e}).api("/users").get()).value,"listUsers"),listGroups:i(async({auth:e})=>(await I.getClient({auth:e}).api(I.endpoints.listGroups).get()).value,"listGroups"),listPlans:i(async({auth:e})=>(await I.getClient({auth:e}).api(I.endpoints.listPlans).get()).value,"listPlans"),listBuckets:i(async({auth:e,planId:t})=>(await I.getClient({auth:e}).api(I.endpoints.listBuckets(t)).get()).value,"listBuckets"),listTasks:i(async({auth:e,planId:t})=>(await I.getClient({auth:e}).api(I.endpoints.listPlanTasks(t)).get()).value,"listTasks"),createPlan:i(async({auth:e,...t})=>await I.getClient({auth:e}).api(I.endpoints.createPlan).create(t),"createPlan"),createBucket:i(async({auth:e,...t})=>await I.getClient({auth:e}).api(I.endpoints.createBucket).create(t),"createBucket"),updateBucket:i(async({auth:e,id:t,name:r,orderHint:n})=>{let o=I.getClient({auth:e}),a=await I.getEtag({auth:e,id:t,endpointType:"bucketDetail"});return await o.api(I.endpoints.bucketDetail(t)).header("If-Match",a).update({name:r,orderHint:n}),{success:!0}},"updateBucket"),deleteTask:i(async({auth:e,id:t})=>{let r=I.getClient({auth:e}),n=await I.getEtag({auth:e,id:t,endpointType:"deleteTask"});return await r.api(I.endpoints.deleteTask(t)).header("If-Match",n).delete(),{success:!0}},"deleteTask"),createTask:i(async({auth:e,...t})=>await I.getClient({auth:e}).api(I.endpoints.createTask).create(t),"createTask"),updateTask:i(async({auth:e,id:t,...r})=>{let n=I.getClient({auth:e}),o=await I.getEtag({auth:e,id:t,endpointType:"deleteTask"});return await n.api(I.endpoints.deleteTask(t)).header("If-Match",o).update(r),{success:!0}},"updateTask"),deleteBucket:i(async({auth:e,id:t})=>{let r=I.getClient({auth:e}),n=await I.getEtag({auth:e,id:t,endpointType:"bucketDetail"});return await r.api(I.endpoints.bucketDetail(t)).header("If-Match",n).delete(),{success:!0}},"deleteBucket"),updatePlan:i(async({auth:e,id:t,title:r})=>{let n=I.getClient({auth:e}),o=await I.getEtag({auth:e,id:t,endpointType:"planDetail"});return await n.api(I.endpoints.planDetail(t)).header("If-Match",o).update({title:r}),{success:!0}},"updatePlan"),getBucketDetails:i(async({auth:e,bucketId:t})=>await I.getClient({auth:e}).api(I.endpoints.bucketDetail(t)).get(),"getBucketDetails")};var yc=i(({required:e=!0})=>R.Dropdown({auth:K,displayName:"Group",description:"Select the Grroup",required:e,refreshers:["auth"],options:i(async({auth:t})=>t?{options:(await I.listGroups({auth:t})).map(n=>({label:n.displayName??"",value:n.id??""})),disabled:!1,placeholder:"Select a group"}:{options:[],disabled:!0,placeholder:"Please select an authentication first"},"options")}),"groupDropdown"),pe=i(({required:e=!0})=>R.Dropdown({auth:K,displayName:"Plan",description:"Select the plan",required:e,refreshers:["auth"],options:i(async({auth:t})=>t?{options:(await I.listPlans({auth:t})).map(n=>({label:n.title??"",value:n.id??""})),disabled:!1,placeholder:"Select a plan"}:{options:[],disabled:!0,placeholder:"Please select an authentication first"},"options")}),"PlanDropdown"),nt=i(({required:e=!0})=>R.Dropdown({auth:K,displayName:"Bucket",description:"Select the bucket",required:e,refreshers:["auth","planId"],options:i(async({auth:t,planId:r})=>{if(!t)return{options:[],disabled:!0,placeholder:"Please select an authentication first"};if(!r)return{options:[],disabled:!0,placeholder:"Please select a plan first"};let n=await I.listBuckets({auth:t,planId:r});return console.log("Buckets:",JSON.stringify(n)),{options:n.map(o=>({label:o.name??"",value:o.id??""})),disabled:!1,placeholder:"Select a bucket"}},"options")}),"BucketDropdown"),Vn=i(({required:e=!0})=>R.Dropdown({auth:K,displayName:"Task",description:"Select the task",required:e,refreshers:["auth","planId"],options:i(async({auth:t,planId:r})=>t?r?{options:(await I.listTasks({auth:t,planId:r})).map(o=>({label:o.title??"",value:o.id??""})),disabled:!1,placeholder:"Select a task"}:{options:[],disabled:!0,placeholder:"Please select a plan first"}:{options:[],disabled:!0,placeholder:"Please select an authentication first"},"options")}),"TaskDropdown"),Hn=i(({required:e=!1})=>R.ShortText({displayName:"Order Hint",description:"Hint used to order items of this type in a list. The format is defined as outlined here: https://learn.microsoft.com/en-us/graph/api/resources/planner-order-hint-format?view=graph-rest-1.0",required:e}),"OrderHintProperty");var vc=ne({auth:K,name:"createBucket",displayName:"Create Bucket",description:"Create a bucket (category) under a plan.",audience:"both",aiMetadata:{description:"Creates a new bucket (a column/category for grouping tasks) under an existing Planner plan, identified by plan ID. Use to organize tasks within a plan. Each call adds another bucket, so it is not idempotent.",idempotent:!1},props:{planId:pe({required:!0}),name:R.ShortText({displayName:"Bucket Name",description:"The name of the bucket to be created",required:!0}),orderHint:Hn({required:!1})},async run({auth:e,propsValue:t}){return await I.createBucket({auth:e,...t})}});var _c=ne({auth:K,name:"createPlan",displayName:"Create Plan",description:"Create a new planner plan",audience:"both",aiMetadata:{description:"Creates a new Microsoft 365 Planner plan with the given title, owned by a specified Microsoft 365 group. Use to set up a fresh planning board before adding buckets or tasks. The group must already exist; each call creates a separate plan, so it is not idempotent.",idempotent:!1},props:{groupId:yc({required:!0}),title:R.ShortText({displayName:"Title",description:"The title of the plan",required:!0})},async run({auth:e,propsValue:t}){let r=St(e),o={container:{url:`${At(r)}/v1.0/groups/${t.groupId}`},title:t.title};return await I.createPlan({auth:e,...o})}});var Pc=ne({auth:K,name:"createTask",displayName:"Create Task",description:"Create a new planner task with title, assignments, due date, etc.",audience:"both",aiMetadata:{description:"Creates a new task in a Planner plan, optionally placing it in a bucket and setting assignees, due/start dates, priority, and percent complete. Use to add work items to a plan. Each call creates a separate task, so it is not idempotent.",idempotent:!1},props:{planId:pe({required:!0}),bucketId:nt({required:!1}),title:R.ShortText({displayName:"Title",description:"The title of the task to be created",required:!0}),assignments:R.MultiSelectDropdown({displayName:"Assignments",description:"Select users to assign the task to. If left empty, the task will be unassigned.",required:!1,auth:K,refreshers:["auth"],options:i(async({auth:e})=>e?{options:(await I.listUsers({auth:e})).map(r=>({label:r.displayName||r.userPrincipalName||"No Name",value:r.id||""})),disabled:!1,placeholder:"Select users to assign the task to"}:{options:[],disabled:!0,placeholder:"Please select an authentication first"},"options")}),dueDateTime:R.DateTime({displayName:"Due Date",description:"The due date and time for the task",required:!1}),percentComplete:R.Number({displayName:"Percent Complete",description:"The completion percentage of the task (0-100)",required:!1}),priority:R.Number({displayName:"Priority",description:"The priority of the task between 0 and 10, with the increasing value being lower priority (0 has the highest priority and 10 has the lowest priority).",required:!1}),startDateTime:R.DateTime({displayName:"Start Date",description:"The start date and time for the task",required:!1})},async run({auth:e,propsValue:t}){let r={...t,assignments:t.assignments?Object.fromEntries(t.assignments.map(n=>[n,{"@odata.type":"microsoft.graph.plannerAssignment"}])):void 0,dueDateTime:t.dueDateTime?new Date(t.dueDateTime).toISOString():void 0,startDateTime:t.startDateTime?new Date(t.startDateTime).toISOString():void 0};return await I.createTask({auth:e,...r})}});var xc=ne({auth:K,name:"deleteBucket",displayName:"Delete Bucket",description:"Delete an existing bucket.",audience:"both",aiMetadata:{description:"Permanently deletes a bucket from a Planner plan by bucket ID. Use to remove a category and stop grouping tasks under it. Destructive and not idempotent; once removed, repeating the call fails because the bucket no longer exists.",idempotent:!1},props:{planId:pe({required:!0}),id:nt({required:!0})},async run({auth:e,propsValue:{id:t}}){if(!t)throw new Error("Bucket id is required");return await I.deleteBucket({auth:e,id:t})}});var bc=ne({auth:K,name:"deleteTask",displayName:"Delete Task",description:"Remove a specific task by ID.",audience:"both",aiMetadata:{description:"Permanently deletes a task from a Planner plan by task ID. Use to remove a work item. Destructive and not idempotent; once removed, repeating the call fails because the task no longer exists.",idempotent:!1},props:{planId:pe({required:!0}),id:Vn({required:!0})},async run({auth:e,propsValue:{id:t}}){if(!t)throw new Error("Task id is required");return await I.deleteTask({auth:e,id:t})}});var Tc=ne({auth:K,name:"findAPlan",displayName:"Find a Plan",description:"Finds a plan by field.",audience:"both",aiMetadata:{description:"Searches across the authenticated user's Planner plans and returns those whose title contains the given text (case-insensitive substring match). Use to resolve a plan name into its plan ID before acting on it. Read-only and idempotent; the title input is required.",idempotent:!0},props:{title:R.ShortText({displayName:"Title",description:"The title of the plan to search for",required:!0})},async run({auth:e,propsValue:{title:t}}){return(await I.listPlans({auth:e})).filter(n=>n.title&&n.title.toLowerCase().includes(t.toLowerCase()))}});var Ec=ne({auth:K,name:"findTask",displayName:"Find Task",description:"Find task by fields.",audience:"both",aiMetadata:{description:"Searches the tasks of a given Planner plan and returns those whose title contains the given text (case-insensitive substring match). Use to locate a task ID within a known plan. Read-only and idempotent; both plan ID and title are required.",idempotent:!0},props:{planId:pe({required:!0}),title:R.ShortText({displayName:"Title",description:"The title of the task to search for",required:!0})},async run({auth:e,propsValue:{title:t,planId:r}}){if(!r)throw new Error("Plan ID is required to fetch tasks.");return(await I.listTasks({auth:e,planId:r})).filter(o=>o.title&&o.title.toLowerCase().includes(t.toLowerCase()))}});var Ic=ne({auth:K,name:"getABucket",displayName:"Get a Bucket",description:"Retrieve details about a specific bucket.",audience:"both",aiMetadata:{description:"Retrieves the details of a single Planner bucket by its bucket ID (within a known plan). Use to inspect a bucket's current name and order hint. Read-only and idempotent.",idempotent:!0},props:{planId:pe({required:!0}),bucketId:nt({required:!0})},async run({auth:e,propsValue:{bucketId:t}}){if(!t)throw new Error("Bucket ID is required to fetch bucket details.");return await I.getBucketDetails({auth:e,bucketId:t})}});var Sc=ne({auth:K,name:"updateBucket",displayName:"Update Bucket",description:"Modify bucket\u2019s name or properties.",audience:"both",aiMetadata:{description:"Updates an existing bucket's name and/or order hint, identified by bucket ID within a plan. Use to rename or reorder a bucket. Idempotent: applying the same field values repeatedly leaves the bucket in the same end state.",idempotent:!0},props:{planId:pe({required:!0}),id:nt({required:!0}),name:R.ShortText({displayName:"Name",description:"The new name of the bucket",required:!1}),orderHint:Hn({required:!1})},async run({auth:e,propsValue:t}){let{planId:r,id:n,...o}=t;if(!n)throw new Error("Bucket ID is required to update a bucket.");return await I.updateBucket({auth:e,id:n,...o})}});var Ac=ne({auth:K,name:"updatePlan",displayName:"Update Plan",description:"modify metadata of a plan (e.g. title changes).",audience:"both",aiMetadata:{description:"Updates an existing Planner plan's title, identified by plan ID. Use to rename a plan. Idempotent: setting the same title repeatedly leaves the plan in the same end state.",idempotent:!0},props:{id:pe({required:!0}),title:R.ShortText({displayName:"Title",description:"The new title of the plan",required:!0})},async run({auth:e,propsValue:{id:t,title:r}}){if(!t)throw new Error("Plan id is required");return await I.updatePlan({auth:e,id:t,title:r})}});var $c=ne({auth:K,name:"updateTask",displayName:"Update Task",description:"Modify existing task fields: title, due date, assignments, descriptions.",audience:"both",aiMetadata:{description:"Updates fields on an existing Planner task identified by task ID, such as title, assignees, due/start dates, priority, and percent complete. Use to edit a task; only provided fields are changed. Idempotent: applying the same field values repeatedly leaves the task in the same end state.",idempotent:!0},props:{planId:pe({required:!0}),id:Vn({required:!0}),title:R.ShortText({displayName:"Title",description:"The new title of the task",required:!1}),assignments:R.MultiSelectDropdown({displayName:"Assignments",description:"Select users to assign the task to. If left empty, the task will be unassigned.",required:!1,refreshers:["auth"],auth:K,options:i(async({auth:e})=>e?{options:(await I.listUsers({auth:e})).map(r=>({label:r.displayName||r.userPrincipalName||"No Name",value:r.id||""})),disabled:!1,placeholder:"Select users to assign the task to"}:{options:[],disabled:!0,placeholder:"Please select an authentication first"},"options")}),dueDateTime:R.DateTime({displayName:"Due Date",description:"The due date and time for the task",required:!1}),percentComplete:R.Number({displayName:"Percent Complete",description:"The completion percentage of the task (0-100)",required:!1}),priority:R.Number({displayName:"Priority",description:"The priority of the task between 0 and 10, with the increasing value being lower priority (0 has the highest priority and 10 has the lowest priority).",required:!1}),startDateTime:R.DateTime({displayName:"Start Date",description:"The start date and time for the task",required:!1})},async run({auth:e,propsValue:t}){let{planId:r,id:n,...o}=t;if(!n)throw new Error("Task ID is required to update a task.");let a={...o,assignments:o.assignments?Object.fromEntries(o.assignments.map(s=>[s,{"@odata.type":"microsoft.graph.plannerAssignment"}])):void 0};return await I.updateTask({auth:e,id:n,...a})}});var Zn=class{constructor(t,r){this.baseUrl=t;this.authenticationConverter=r}static{i(this,"BaseHttpClient")}getUrl(t){let r=new URL(`${this.baseUrl}${t.url}`),n=`${r.origin}${r.pathname}`,o=new URLSearchParams;return r.searchParams.forEach((a,s)=>{o.append(s,a)}),{urlWithoutQueryParams:n,queryParams:o}}getHeaders(t){let r={Accept:"application/json"};if(t.authentication&&this.populateAuthentication(t.authentication,r),t.body)switch(t.headers?.["Content-Type"]){case"text/csv":r["Content-Type"]="text/csv";break;default:r["Content-Type"]="application/json";break}return t.headers&&(r={...r,...t.headers}),r}populateAuthentication(t,r){this.authenticationConverter.convert(t,r)}};var qn=class{static{i(this,"DelegatingAuthenticationConverter")}constructor(t=new yi,r=new vi){this.converters={BEARER_TOKEN:t,BASIC:r}}convert(t,r){return this.converters[t.type].convert(t,r)}},yi=class{static{i(this,"BearerTokenAuthenticationConverter")}convert(t,r){return r.Authorization=`Bearer ${t.token}`,r}},vi=class{static{i(this,"BasicTokenAuthenticationConverter")}convert(t,r){let n=`${t.username}:${t.password}`,o=Buffer.from(n).toString("base64");return r.Authorization=`Basic ${o}`,r}};var Gn=class extends Error{constructor(r,n){let o=n.status||500,a=Buffer.isBuffer(n.responseBody)?n.responseBody.toString():n.responseBody;super(JSON.stringify({response:{status:o,body:a},request:{body:r}}));this.requestBody=r;this.status=o,this.responseBody=a}static{i(this,"HttpError")}errorMessage(){return{response:{status:this.status,body:this.responseBody},request:{body:this.requestBody}}}get response(){return{status:this.status,body:this.responseBody}}get request(){return{body:this.requestBody}}};var Wn=class extends Zn{static{i(this,"FetchHttpClient")}constructor(t="",r=new qn){super(t,r)}async sendRequest(t,r){process.env.NODE_TLS_REJECT_UNAUTHORIZED="0";let{urlWithoutQueryParams:n,queryParams:o}=this.getUrl(t),a=this.getHeaders(t),s=t.queryParams??{};for(let[V,fe]of Object.entries(s))o.append(V,fe);let u=o.toString(),p=u?`${n}?${u}`:n,d=t.responseType??"json",g=t.followRedirects??!0,x=t.retries??0,{body:v,extraHeaders:l,isStream:f}=Fh(t.body,a),y=Vh({...a,...l}),h=await Bh(async()=>{let V=new AbortController,fe=t.timeout&&t.timeout>0?setTimeout(()=>V.abort(),t.timeout):void 0;try{let xe={method:t.method.toString(),headers:y,body:v,redirect:g?"follow":"manual",signal:V.signal};return f&&(xe.duplex="half"),r?.dispatcher!==void 0&&(xe.dispatcher=r.dispatcher),await fetch(p,xe)}finally{fe!==void 0&&clearTimeout(fe)}},x),_=g?300:400;if(h.status<200||h.status>=_){let V=await wc(h,d),fe=new Gn(t.body,{status:h.status,responseBody:V});throw console.error("[HttpClient#(sanitized error message)] Request failed:",fe),fe}let T=await wc(h,d);return{status:h.status,headers:Hh(h.headers),body:T}}};function Fh(e,t){return qh(e)?{body:void 0,extraHeaders:{},isStream:!1}:Zh(e)?{body:e,extraHeaders:e.getHeaders(),isStream:!0}:typeof e=="string"||Buffer.isBuffer(e)||e instanceof URLSearchParams||e instanceof ArrayBuffer||typeof FormData<"u"&&e instanceof FormData||typeof Blob<"u"&&e instanceof Blob?{body:e,extraHeaders:{},isStream:!1}:(t["Content-Type"]??t["content-type"]??"").includes("application/x-www-form-urlencoded")?{body:new URLSearchParams(e).toString(),extraHeaders:{},isStream:!1}:{body:JSON.stringify(e),extraHeaders:{},isStream:!1}}i(Fh,"serializeBody");async function wc(e,t){switch(t){case"arraybuffer":return Buffer.from(await e.arrayBuffer());case"blob":return await e.blob();case"text":return await e.text();case"json":default:{let r=await e.text();if(r.length===0)return;try{return JSON.parse(r)}catch{return r}}}}i(wc,"parseResponseBody");async function Bh(e,t){let r;for(let n=0;n<=t;n++)try{let o=await e();if(o.status>=500&&n<t){await Oc(n);continue}return o}catch(o){if(r=o,n<t){await Oc(n);continue}throw o}throw r}i(Bh,"sendWithRetries");function Oc(e){let t=Math.min(1e3*2**e,3e4);return new Promise(r=>setTimeout(r,t))}i(Oc,"backoff");function Vh(e){let t={};for(let[r,n]of Object.entries(e))n!==void 0&&(t[r]=Array.isArray(n)?n.join(", "):n);return t}i(Vh,"normalizeHeaders");function Hh(e){let t={};return e.forEach((r,n)=>{t[n]=r}),t}i(Hh,"toHttpHeaders");function Zh(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"}i(Zh,"isNodeFormData");function qh(e){return e==null}i(qh,"isNil");var zc=new Wn;var _i=(s=>(s.GET="GET",s.POST="POST",s.PATCH="PATCH",s.PUT="PUT",s.DELETE="DELETE",s.HEAD="HEAD",s))(_i||{});var kv=Ne(require("fs")),Up=Ne(Np());var Dv={"application/json":"json","application/pdf":"pdf","application/xml":"xml","text/xml":"xml","application/zip":"zip","application/gzip":"gz","application/x-tar":"tar","application/octet-stream":"bin","application/msword":"doc","application/vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","application/vnd.ms-excel":"xls","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","application/vnd.ms-powerpoint":"ppt","application/vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","application/rtf":"rtf","application/javascript":"js","application/x-www-form-urlencoded":"bin","text/plain":"txt","text/html":"html","text/css":"css","text/csv":"csv","text/calendar":"ics","text/markdown":"md","image/png":"png","image/jpeg":"jpeg","image/jpg":"jpg","image/gif":"gif","image/webp":"webp","image/svg+xml":"svg","image/bmp":"bmp","image/tiff":"tiff","image/x-icon":"ico","image/vnd.microsoft.icon":"ico","image/heic":"heic","audio/mpeg":"mp3","audio/mp4":"m4a","audio/wav":"wav","audio/x-wav":"wav","audio/ogg":"ogg","audio/webm":"weba","video/mp4":"mp4","video/mpeg":"mpeg","video/webm":"webm","video/quicktime":"mov","video/x-msvideo":"avi","font/woff":"woff","font/woff2":"woff2","font/ttf":"ttf","font/otf":"otf"};function Cv(e){let t=e.split(";")[0].trim().toLowerCase();return Dv[t]??""}i(Cv,"contentTypeToExtension");var Nv=i(({baseUrl:e,relativePath:t})=>{let r=e.endsWith("/")?e:`${e}/`,n=t.startsWith("/")?t.slice(1):t;return`${r}${n}`},"joinBaseUrlWithRelativePath"),Uv=i((e,t)=>{let r="https://api.example.com";try{let n=t?e(t):void 0;return(n?.endsWith("/")?n.slice(0,-1):n)??r}catch{return r}},"getBaseUrlForDescription");function Mp({auth:e,baseUrl:t,authMapping:r,description:n,displayName:o,name:a,props:s,extraProps:u,authLocation:p="headers"}){return ne({audience:"human",name:a||"custom_api_call",displayName:o||"Custom API Call",description:n||"Make a custom API call to a specific endpoint",auth:e,requireAuth:!!e,props:{url:R.DynamicProperties({auth:e,displayName:"",required:!0,refreshers:[],props:i(async({auth:d})=>({url:R.ShortText({displayName:"URL",description:`You can either use the full URL or the relative path to the base URL
11
- i.e ${Uv(t,d)}/resource or /resource`,required:!0,defaultValue:d?t(d):"",...s?.url??{}})}),"props")}),method:R.StaticDropdown({displayName:"Method",required:!0,options:{options:Object.values(_i).map(d=>({label:d,value:d}))},...s?.method??{}}),headers:R.Object({displayName:"Headers",description:"Authorization headers are injected automatically from your connection.",required:!0,...s?.headers??{}}),queryParams:R.Object({displayName:"Query Parameters",required:!0,...s?.queryParams??{}}),body_type:R.StaticDropdown({displayName:"Body Type",required:!1,defaultValue:"none",options:{disabled:!1,options:[{label:"None",value:"none"},{label:"JSON",value:"json"},{label:"Form Data",value:"form_data"},{label:"Raw",value:"raw"}]}}),body:R.DynamicProperties({auth:e,displayName:"Body",refreshers:["body_type"],required:!1,props:i(async({body_type:d})=>{if(!d)return{};let g=d,x={};switch(g){case"none":break;case"json":x.data=R.Json({displayName:"JSON Body",required:!0,...s?.body??{}});break;case"raw":x.data=R.LongText({displayName:"Raw Body",required:!0});break;case"form_data":x.data=R.Array({displayName:"Form Data",required:!0,properties:{fieldName:R.ShortText({displayName:"Field Name",required:!0}),fieldType:R.StaticDropdown({displayName:"Field Type",required:!0,options:{disabled:!1,options:[{label:"Text",value:"text"},{label:"File",value:"file"}]}}),textFieldValue:R.LongText({displayName:"Text Field Value",required:!1}),fileFieldValue:R.File({displayName:"File Field Value",required:!1})}});break}return x},"props")}),response_is_binary:R.Checkbox({displayName:"Response is Binary ?",description:"Enable for files like PDFs, images, etc.",required:!1,defaultValue:!1}),failsafe:R.Checkbox({displayName:"No Error on Failure",required:!1,...s?.failsafe??{}}),timeout:R.Number({displayName:"Timeout (in seconds)",required:!1,...s?.timeout??{}}),followRedirects:R.Checkbox({displayName:"Follow redirects",required:!1,defaultValue:!1}),...u},run:i(async d=>{let{method:g,url:x,headers:v,queryParams:l,body:f,body_type:y,failsafe:h,timeout:_,response_is_binary:T,followRedirects:V}=d.propsValue;jr(g,"Method"),jr(x,"URL");let fe=_e(r)?{}:await r(d.auth,d.propsValue),xe=x.url,Ce=xe.startsWith("http://")||xe.startsWith("https://")?xe:Nv({baseUrl:t(d.auth),relativePath:xe}),ee={method:g,url:Ce,headers:{...v??{},...p==="headers"||!_e(p)?fe:{}},queryParams:{...p==="queryParams"?fe:{},...l??{}},timeout:_?_*1e3:0,followRedirects:V};if(T&&(ee.responseType="arraybuffer"),f)if(y&&y!=="none"){let W=f.data;if(y==="form_data"){let mt=W,it=new Up.default;for(let{fieldName:j,fieldType:S,textFieldValue:E,fileFieldValue:w}of mt)S==="text"&&!lr(E)?it.append(j,E):S==="file"&&!lr(w)&&it.append(j,w.data,{filename:w?.filename});ee.body=it,ee.headers={...ee.headers,...it.getHeaders()}}else ee.body=W}else y||(ee.body=f);try{let W=await zc.sendRequest(ee);return await Mv(d.files,W.body,W.status,W.headers,T)}catch(W){if(h)return W.errorMessage();throw W}},"run")})}i(Mp,"createCustomApiCallAction");var Mv=i(async(e,t,r,n,o)=>{let a;if(o&&Lv(t)){let s=Array.isArray(n?.["content-type"])?n["content-type"][0]:n?.["content-type"],u=Cv(s??"")||"txt",p;t instanceof ArrayBuffer?p=Buffer.from(new Uint8Array(t)):Buffer.isBuffer(t)?p=t:p=Buffer.from(t),a=await e.write({fileName:`output.${u}`,data:p})}else a=t;return{status:r,headers:n,body:a}},"handleBinaryResponse"),Lv=i(e=>e instanceof ArrayBuffer||Buffer.isBuffer(e),"isBinaryBody");var Te={async poll(e,{store:t,auth:r,propsValue:n,maxItemsToPoll:o,files:a,server:s}){switch(e.strategy){case 0:{let u=await t.get("lastPoll");if(_e(u))throw new Error("lastPoll doesn't exist in the store.");let p=await e.items({store:t,auth:r,propsValue:n,lastFetchEpochMS:u,server:s}),d=p.reduce((g,x)=>Math.max(g,x.epochMilliSeconds),u);return await t.put("lastPoll",d),p.filter(g=>g.epochMilliSeconds>u).map(g=>g.data)}case 1:{let u=await t.get("lastItem"),p=await e.items({store:t,auth:r,propsValue:n,lastItemId:u,files:a,server:s}),d=p.findIndex(v=>v.id===u),g=[];_e(u)||d==-1?g=p??[]:g=p?.slice(0,d)??[],_e(o)||(g=g.slice(-o));let x=g?.[0]?.id;return _e(x)||await t.put("lastItem",x),g.map(v=>v.data)}}},async onEnable(e,{store:t,auth:r,propsValue:n,server:o}){switch(e.strategy){case 0:{await t.put("lastPoll",Date.now());break}case 1:{let s=(await e.items({store:t,auth:r,propsValue:n,lastItemId:null,server:o}))?.[0]?.id;_e(s)?await t.delete("lastItem"):await t.put("lastItem",s);break}}},async onDisable(e,t){switch(e.strategy){case 0:case 1:return}},async test(e,{auth:t,propsValue:r,store:n,files:o,server:a}){let s=[];switch(e.strategy){case 0:{s=await e.items({store:n,auth:t,propsValue:r,lastFetchEpochMS:0,server:a});break}case 1:{s=await e.items({store:n,auth:t,propsValue:r,lastItemId:null,files:o,server:a});break}}return jv(s.map(u=>u.data))}};function jv(e){return e.length<=5?e:e.slice(0,5)}i(jv,"getFirstFiveOrAll");var jp=Ne(oo());var io={strategy:0,items:i(async({auth:e})=>(await I.listPlans({auth:e})).map(r=>({epochMilliSeconds:(0,jp.default)(r.createdDateTime).valueOf(),data:r})),"items")},Fp=It({auth:K,name:"newPlanCreated",displayName:"New Plan Created",description:"Triggers when a new Plan is created in Microsoft 365 Planner.",aiMetadata:{description:"Fires when a new plan is created in Microsoft 365 Planner across the authenticated user's accessible plans. Polls periodically and emits each newly created plan."},props:{},sampleData:{},type:"POLLING",async test(e){return await Te.test(io,e)},async onEnable(e){let{store:t,auth:r,propsValue:n}=e;await Te.onEnable(io,{store:t,auth:r,propsValue:n})},async onDisable(e){let{store:t,auth:r,propsValue:n}=e;await Te.onDisable(io,{store:t,auth:r,propsValue:n})},async run(e){return await Te.poll(io,e)}});var Bp=Ne(oo());var Fv={planId:pe({required:!0})},ao={strategy:0,items:i(async({auth:e,propsValue:{planId:t}})=>{if(!t)return[];let r=await I.getUser({auth:e});if(!r||!r.id)throw new Error("Unable to fetch authenticated user details.");return(await I.listTasks({auth:e,planId:t})).filter(o=>{let a=String(r.id);return o.assignments&&Object.prototype.hasOwnProperty.call(o.assignments,a)}).map(o=>({epochMilliSeconds:(0,Bp.default)(o.createdDateTime).valueOf(),data:o}))},"items")},Vp=It({auth:K,name:"newTaskAssignedToUser",displayName:"New Task Assigned to User",description:"Triggers when a Task is assigned to the authenticated user in Microsoft 365 Planner.",aiMetadata:{description:"Fires when a task within a specified Planner plan is assigned to the authenticated (connected) user. Polls periodically and emits each new task in that plan where the current user is among the assignees."},props:Fv,sampleData:{},type:"POLLING",async test(e){return await Te.test(ao,e)},async onEnable(e){let{store:t,auth:r,propsValue:n}=e;await Te.onEnable(ao,{store:t,auth:r,propsValue:n})},async onDisable(e){let{store:t,auth:r,propsValue:n}=e;await Te.onDisable(ao,{store:t,auth:r,propsValue:n})},async run(e){return await Te.poll(ao,e)}});var Hp=Ne(oo());var Bv={planId:pe({required:!0})},so={strategy:0,items:i(async({auth:e,propsValue:{planId:t}})=>t?(await I.listTasks({auth:e,planId:t})).map(n=>({epochMilliSeconds:(0,Hp.default)(n.createdDateTime).valueOf(),data:n})):[],"items")},Zp=It({auth:K,name:"newTaskCreated",displayName:"New Task Created",description:"Triggers when a new Task is created in Microsoft 365 Planner.",aiMetadata:{description:"Fires when a new task is created within a specified Planner plan. Polls periodically and emits each newly created task for the configured plan."},props:Bv,sampleData:{"@odata.etag":'W/"JzEtVGFzayAgQEBAffEBAQEBAQEBARCc="',planId:"s58lztas2UyCXSffEjnlVRgWUAFMLw",bucketId:"xZ2RCz88uE6BffffftN-0TKffPGUAB-pQ",title:"test task 123",orderHint:"8584411578775238762",assigneePriority:"",percentComplete:0,startDateTime:null,createdDateTime:"2025-10-14T13:36:47.953708Z",dueDateTime:null,hasDescription:!1,previewType:"automatic",completedDateTime:null,referenceCount:0,checklistItemCount:0,activeChecklistItemCount:0,conversationThreadId:null,priority:5,id:"wvG9lNxhuUO2JuedF9-rimUAFsBA",completedBy:null,createdBy:{user:{displayName:null,id:"90b3720d-f459-42c1-a02e-6471a1ecb068"},application:{displayName:null,id:"5ea0744c-62fa-4a19-99be-99f0869d3182"}},appliedCategories:{},assignments:{}},type:"POLLING",async test(e){return await Te.test(so,e)},async onEnable(e){let{store:t,auth:r,propsValue:n}=e;await Te.onEnable(so,{store:t,auth:r,propsValue:n})},async onDisable(e){let{store:t,auth:r,propsValue:n}=e;await Te.onDisable(so,{store:t,auth:r,propsValue:n})},async run(e){return await Te.poll(so,e)}});var Vv=Zs({displayName:"Microsoft 365 Planner",description:"Microsoft 365 Planner is part of the Microsoft 365 suite, offering lightweight task and bucket-based planning for teams. This integration supports creating plans, buckets, tasks, fetching them, deleting them, and custom API calls.",auth:K,minimumSupportedRelease:"0.36.1",logoUrl:"https://cdn.activepieces.com/pieces/microsoft-365-planner.png",authors:["LuizDMM","sanket-a11y"],actions:[_c,vc,Pc,xc,bc,Ac,Sc,$c,Tc,Ic,Ec,Mp({auth:K,baseUrl:i(e=>{let t=St(e);return At(t)+"/v1.0/"},"baseUrl"),authMapping:i(async e=>({Authorization:`Bearer ${e.access_token}`}),"authMapping")})],triggers:[Fp,Zp,Vp]});0&&(module.exports={microsoft365Planner});
10
+ - User.Read`,K=Go.OAuth2({description:ay,props:{cloud:pu},authUrl:"https://{cloud}/common/oauth2/v2.0/authorize",tokenUrl:"https://{cloud}/common/oauth2/v2.0/token",required:!0,scope:["Tasks.ReadWrite","User.Read","Group.Read.All"],prompt:"omit"}),I={endpoints:{createPlan:"/planner/plans",listPlans:"/me/planner/plans",listGroups:"/groups",planDetail:i(e=>`/planner/plans/${e}`,"planDetail"),listBuckets:i(e=>`/planner/plans/${e}/buckets`,"listBuckets"),listPlanTasks:i(e=>`/planner/plans/${e}/tasks`,"listPlanTasks"),createBucket:"/planner/buckets",bucketDetail:i(e=>`/planner/buckets/${e}`,"bucketDetail"),createTask:"/planner/tasks",deleteTask:i(e=>`/planner/tasks/${e}`,"deleteTask")},getClient:i(({auth:e})=>{let t=St(e);return $c.Client.initWithMiddleware({authProvider:{getAccessToken:i(async()=>e.access_token,"getAccessToken")},baseUrl:$t(t)})},"getClient"),getUser:i(async({auth:e})=>await I.getClient({auth:e}).api("/me").get(),"getUser"),getEtag:i(async({auth:e,id:t,endpointType:r})=>{let n=I.getClient({auth:e}),o=I.endpoints[r],a=o(t);return(await n.api(a).get())["@odata.etag"]},"getEtag"),listUsers:i(async({auth:e})=>(await I.getClient({auth:e}).api("/users").get()).value,"listUsers"),listGroups:i(async({auth:e})=>(await I.getClient({auth:e}).api(I.endpoints.listGroups).get()).value,"listGroups"),listPlans:i(async({auth:e})=>(await I.getClient({auth:e}).api(I.endpoints.listPlans).get()).value,"listPlans"),listBuckets:i(async({auth:e,planId:t})=>(await I.getClient({auth:e}).api(I.endpoints.listBuckets(t)).get()).value,"listBuckets"),listTasks:i(async({auth:e,planId:t})=>(await I.getClient({auth:e}).api(I.endpoints.listPlanTasks(t)).get()).value,"listTasks"),createPlan:i(async({auth:e,...t})=>await I.getClient({auth:e}).api(I.endpoints.createPlan).create(t),"createPlan"),createBucket:i(async({auth:e,...t})=>await I.getClient({auth:e}).api(I.endpoints.createBucket).create(t),"createBucket"),updateBucket:i(async({auth:e,id:t,name:r,orderHint:n})=>{let o=I.getClient({auth:e}),a=await I.getEtag({auth:e,id:t,endpointType:"bucketDetail"});return await o.api(I.endpoints.bucketDetail(t)).header("If-Match",a).update({name:r,orderHint:n}),{success:!0}},"updateBucket"),deleteTask:i(async({auth:e,id:t})=>{let r=I.getClient({auth:e}),n=await I.getEtag({auth:e,id:t,endpointType:"deleteTask"});return await r.api(I.endpoints.deleteTask(t)).header("If-Match",n).delete(),{success:!0}},"deleteTask"),createTask:i(async({auth:e,...t})=>await I.getClient({auth:e}).api(I.endpoints.createTask).create(t),"createTask"),updateTask:i(async({auth:e,id:t,...r})=>{let n=I.getClient({auth:e}),o=await I.getEtag({auth:e,id:t,endpointType:"deleteTask"});return await n.api(I.endpoints.deleteTask(t)).header("If-Match",o).update(r),{success:!0}},"updateTask"),deleteBucket:i(async({auth:e,id:t})=>{let r=I.getClient({auth:e}),n=await I.getEtag({auth:e,id:t,endpointType:"bucketDetail"});return await r.api(I.endpoints.bucketDetail(t)).header("If-Match",n).delete(),{success:!0}},"deleteBucket"),updatePlan:i(async({auth:e,id:t,title:r})=>{let n=I.getClient({auth:e}),o=await I.getEtag({auth:e,id:t,endpointType:"planDetail"});return await n.api(I.endpoints.planDetail(t)).header("If-Match",o).update({title:r}),{success:!0}},"updatePlan"),getBucketDetails:i(async({auth:e,bucketId:t})=>await I.getClient({auth:e}).api(I.endpoints.bucketDetail(t)).get(),"getBucketDetails")};var wc=i(({required:e=!0})=>R.Dropdown({auth:K,displayName:"Group",description:"Select the Grroup",required:e,refreshers:["auth"],options:i(async({auth:t})=>t?{options:(await I.listGroups({auth:t})).map(n=>({label:n.displayName??"",value:n.id??""})),disabled:!1,placeholder:"Select a group"}:{options:[],disabled:!0,placeholder:"Please select an authentication first"},"options")}),"groupDropdown"),pe=i(({required:e=!0})=>R.Dropdown({auth:K,displayName:"Plan",description:"Select the plan",required:e,refreshers:["auth"],options:i(async({auth:t})=>t?{options:(await I.listPlans({auth:t})).map(n=>({label:n.title??"",value:n.id??""})),disabled:!1,placeholder:"Select a plan"}:{options:[],disabled:!0,placeholder:"Please select an authentication first"},"options")}),"PlanDropdown"),at=i(({required:e=!0})=>R.Dropdown({auth:K,displayName:"Bucket",description:"Select the bucket",required:e,refreshers:["auth","planId"],options:i(async({auth:t,planId:r})=>{if(!t)return{options:[],disabled:!0,placeholder:"Please select an authentication first"};if(!r)return{options:[],disabled:!0,placeholder:"Please select a plan first"};let n=await I.listBuckets({auth:t,planId:r});return console.log("Buckets:",JSON.stringify(n)),{options:n.map(o=>({label:o.name??"",value:o.id??""})),disabled:!1,placeholder:"Select a bucket"}},"options")}),"BucketDropdown"),Gn=i(({required:e=!0})=>R.Dropdown({auth:K,displayName:"Task",description:"Select the task",required:e,refreshers:["auth","planId"],options:i(async({auth:t,planId:r})=>t?r?{options:(await I.listTasks({auth:t,planId:r})).map(o=>({label:o.title??"",value:o.id??""})),disabled:!1,placeholder:"Select a task"}:{options:[],disabled:!0,placeholder:"Please select a plan first"}:{options:[],disabled:!0,placeholder:"Please select an authentication first"},"options")}),"TaskDropdown"),Wn=i(({required:e=!1})=>R.ShortText({displayName:"Order Hint",description:"Hint used to order items of this type in a list. The format is defined as outlined here: https://learn.microsoft.com/en-us/graph/api/resources/planner-order-hint-format?view=graph-rest-1.0",required:e}),"OrderHintProperty");var Oc=oe({auth:K,name:"createBucket",displayName:"Create Bucket",description:"Create a bucket (category) under a plan.",audience:"both",aiMetadata:{description:"Creates a new bucket (a column/category for grouping tasks) under an existing Planner plan, identified by plan ID. Use to organize tasks within a plan. Each call adds another bucket, so it is not idempotent.",idempotent:!1},props:{planId:pe({required:!0}),name:R.ShortText({displayName:"Bucket Name",description:"The name of the bucket to be created",required:!0}),orderHint:Wn({required:!1})},async run({auth:e,propsValue:t}){return await I.createBucket({auth:e,...t})}});var zc=oe({auth:K,name:"createPlan",displayName:"Create Plan",description:"Create a new planner plan",audience:"both",aiMetadata:{description:"Creates a new Microsoft 365 Planner plan with the given title, owned by a specified Microsoft 365 group. Use to set up a fresh planning board before adding buckets or tasks. The group must already exist; each call creates a separate plan, so it is not idempotent.",idempotent:!1},props:{groupId:wc({required:!0}),title:R.ShortText({displayName:"Title",description:"The title of the plan",required:!0})},async run({auth:e,propsValue:t}){let r=St(e),o={container:{url:`${$t(r)}/v1.0/groups/${t.groupId}`},title:t.title};return await I.createPlan({auth:e,...o})}});var Rc=oe({auth:K,name:"createTask",displayName:"Create Task",description:"Create a new planner task with title, assignments, due date, etc.",audience:"both",aiMetadata:{description:"Creates a new task in a Planner plan, optionally placing it in a bucket and setting assignees, due/start dates, priority, and percent complete. Use to add work items to a plan. Each call creates a separate task, so it is not idempotent.",idempotent:!1},props:{planId:pe({required:!0}),bucketId:at({required:!1}),title:R.ShortText({displayName:"Title",description:"The title of the task to be created",required:!0}),assignments:R.MultiSelectDropdown({displayName:"Assignments",description:"Select users to assign the task to. If left empty, the task will be unassigned.",required:!1,auth:K,refreshers:["auth"],options:i(async({auth:e})=>e?{options:(await I.listUsers({auth:e})).map(r=>({label:r.displayName||r.userPrincipalName||"No Name",value:r.id||""})),disabled:!1,placeholder:"Select users to assign the task to"}:{options:[],disabled:!0,placeholder:"Please select an authentication first"},"options")}),dueDateTime:R.DateTime({displayName:"Due Date",description:"The due date and time for the task",required:!1}),percentComplete:R.Number({displayName:"Percent Complete",description:"The completion percentage of the task (0-100)",required:!1}),priority:R.Number({displayName:"Priority",description:"The priority of the task between 0 and 10, with the increasing value being lower priority (0 has the highest priority and 10 has the lowest priority).",required:!1}),startDateTime:R.DateTime({displayName:"Start Date",description:"The start date and time for the task",required:!1})},async run({auth:e,propsValue:t}){let r={...t,assignments:t.assignments?Object.fromEntries(t.assignments.map(n=>[n,{"@odata.type":"microsoft.graph.plannerAssignment"}])):void 0,dueDateTime:t.dueDateTime?new Date(t.dueDateTime).toISOString():void 0,startDateTime:t.startDateTime?new Date(t.startDateTime).toISOString():void 0};return await I.createTask({auth:e,...r})}});var kc=oe({auth:K,name:"deleteBucket",displayName:"Delete Bucket",description:"Delete an existing bucket.",audience:"both",aiMetadata:{description:"Permanently deletes a bucket from a Planner plan by bucket ID. Use to remove a category and stop grouping tasks under it. Destructive and not idempotent; once removed, repeating the call fails because the bucket no longer exists.",idempotent:!1},props:{planId:pe({required:!0}),id:at({required:!0})},async run({auth:e,propsValue:{id:t}}){if(!t)throw new Error("Bucket id is required");return await I.deleteBucket({auth:e,id:t})}});var Dc=oe({auth:K,name:"deleteTask",displayName:"Delete Task",description:"Remove a specific task by ID.",audience:"both",aiMetadata:{description:"Permanently deletes a task from a Planner plan by task ID. Use to remove a work item. Destructive and not idempotent; once removed, repeating the call fails because the task no longer exists.",idempotent:!1},props:{planId:pe({required:!0}),id:Gn({required:!0})},async run({auth:e,propsValue:{id:t}}){if(!t)throw new Error("Task id is required");return await I.deleteTask({auth:e,id:t})}});var Cc=oe({auth:K,name:"findAPlan",displayName:"Find a Plan",description:"Finds a plan by field.",audience:"both",aiMetadata:{description:"Searches across the authenticated user's Planner plans and returns those whose title contains the given text (case-insensitive substring match). Use to resolve a plan name into its plan ID before acting on it. Read-only and idempotent; the title input is required.",idempotent:!0},props:{title:R.ShortText({displayName:"Title",description:"The title of the plan to search for",required:!0})},async run({auth:e,propsValue:{title:t}}){return(await I.listPlans({auth:e})).filter(n=>n.title&&n.title.toLowerCase().includes(t.toLowerCase()))}});var Nc=oe({auth:K,name:"findTask",displayName:"Find Task",description:"Find task by fields.",audience:"both",aiMetadata:{description:"Searches the tasks of a given Planner plan and returns those whose title contains the given text (case-insensitive substring match). Use to locate a task ID within a known plan. Read-only and idempotent; both plan ID and title are required.",idempotent:!0},props:{planId:pe({required:!0}),title:R.ShortText({displayName:"Title",description:"The title of the task to search for",required:!0})},async run({auth:e,propsValue:{title:t,planId:r}}){if(!r)throw new Error("Plan ID is required to fetch tasks.");return(await I.listTasks({auth:e,planId:r})).filter(o=>o.title&&o.title.toLowerCase().includes(t.toLowerCase()))}});var Uc=oe({auth:K,name:"getABucket",displayName:"Get a Bucket",description:"Retrieve details about a specific bucket.",audience:"both",aiMetadata:{description:"Retrieves the details of a single Planner bucket by its bucket ID (within a known plan). Use to inspect a bucket's current name and order hint. Read-only and idempotent.",idempotent:!0},props:{planId:pe({required:!0}),bucketId:at({required:!0})},async run({auth:e,propsValue:{bucketId:t}}){if(!t)throw new Error("Bucket ID is required to fetch bucket details.");return await I.getBucketDetails({auth:e,bucketId:t})}});var Mc=oe({auth:K,name:"updateBucket",displayName:"Update Bucket",description:"Modify bucket\u2019s name or properties.",audience:"both",aiMetadata:{description:"Updates an existing bucket's name and/or order hint, identified by bucket ID within a plan. Use to rename or reorder a bucket. Idempotent: applying the same field values repeatedly leaves the bucket in the same end state.",idempotent:!0},props:{planId:pe({required:!0}),id:at({required:!0}),name:R.ShortText({displayName:"Name",description:"The new name of the bucket",required:!1}),orderHint:Wn({required:!1})},async run({auth:e,propsValue:t}){let{planId:r,id:n,...o}=t;if(!n)throw new Error("Bucket ID is required to update a bucket.");return await I.updateBucket({auth:e,id:n,...o})}});var Lc=oe({auth:K,name:"updatePlan",displayName:"Update Plan",description:"modify metadata of a plan (e.g. title changes).",audience:"both",aiMetadata:{description:"Updates an existing Planner plan's title, identified by plan ID. Use to rename a plan. Idempotent: setting the same title repeatedly leaves the plan in the same end state.",idempotent:!0},props:{id:pe({required:!0}),title:R.ShortText({displayName:"Title",description:"The new title of the plan",required:!0})},async run({auth:e,propsValue:{id:t,title:r}}){if(!t)throw new Error("Plan id is required");return await I.updatePlan({auth:e,id:t,title:r})}});var jc=oe({auth:K,name:"updateTask",displayName:"Update Task",description:"Modify existing task fields: title, due date, assignments, descriptions.",audience:"both",aiMetadata:{description:"Updates fields on an existing Planner task identified by task ID, such as title, assignees, due/start dates, priority, and percent complete. Use to edit a task; only provided fields are changed. Idempotent: applying the same field values repeatedly leaves the task in the same end state.",idempotent:!0},props:{planId:pe({required:!0}),id:Gn({required:!0}),title:R.ShortText({displayName:"Title",description:"The new title of the task",required:!1}),assignments:R.MultiSelectDropdown({displayName:"Assignments",description:"Select users to assign the task to. If left empty, the task will be unassigned.",required:!1,refreshers:["auth"],auth:K,options:i(async({auth:e})=>e?{options:(await I.listUsers({auth:e})).map(r=>({label:r.displayName||r.userPrincipalName||"No Name",value:r.id||""})),disabled:!1,placeholder:"Select users to assign the task to"}:{options:[],disabled:!0,placeholder:"Please select an authentication first"},"options")}),dueDateTime:R.DateTime({displayName:"Due Date",description:"The due date and time for the task",required:!1}),percentComplete:R.Number({displayName:"Percent Complete",description:"The completion percentage of the task (0-100)",required:!1}),priority:R.Number({displayName:"Priority",description:"The priority of the task between 0 and 10, with the increasing value being lower priority (0 has the highest priority and 10 has the lowest priority).",required:!1}),startDateTime:R.DateTime({displayName:"Start Date",description:"The start date and time for the task",required:!1})},async run({auth:e,propsValue:t}){let{planId:r,id:n,...o}=t;if(!n)throw new Error("Task ID is required to update a task.");let a={...o,assignments:o.assignments?Object.fromEntries(o.assignments.map(s=>[s,{"@odata.type":"microsoft.graph.plannerAssignment"}])):void 0};return await I.updateTask({auth:e,id:n,...a})}});var Vc=require("node:stream");var Kn=class{constructor(t,r){this.baseUrl=t;this.authenticationConverter=r}static{i(this,"BaseHttpClient")}getUrl(t){let r=new URL(`${this.baseUrl}${t.url}`),n=`${r.origin}${r.pathname}`,o=new URLSearchParams;return r.searchParams.forEach((a,s)=>{o.append(s,a)}),{urlWithoutQueryParams:n,queryParams:o}}getHeaders(t){let r={Accept:"application/json"};return t.authentication&&this.populateAuthentication(t.authentication,r),t.body&&(t.headers?.["Content-Type"]==="text/csv"?r["Content-Type"]="text/csv":r["Content-Type"]="application/json"),t.headers&&(r={...r,...t.headers}),r}populateAuthentication(t,r){this.authenticationConverter.convert(t,r)}};var Jn=class{static{i(this,"DelegatingAuthenticationConverter")}constructor(t=new Pi,r=new xi){this.converters={BEARER_TOKEN:t,BASIC:r}}convert(t,r){return this.converters[t.type].convert(t,r)}},Pi=class{static{i(this,"BearerTokenAuthenticationConverter")}convert(t,r){return r.Authorization=`Bearer ${t.token}`,r}},xi=class{static{i(this,"BasicTokenAuthenticationConverter")}convert(t,r){let n=`${t.username}:${t.password}`,o=Buffer.from(n).toString("base64");return r.Authorization=`Basic ${o}`,r}};var xr=class extends Error{constructor(r,n){let o=n.status||500,a=Buffer.isBuffer(n.responseBody)?n.responseBody.toString():n.responseBody;super(JSON.stringify({response:{status:o,body:a},request:{body:r}}));this.requestBody=r;this.status=o,this.responseBody=a}static{i(this,"HttpError")}errorMessage(){return{response:{status:this.status,body:this.responseBody},request:{body:this.requestBody}}}get response(){return{status:this.status,body:this.responseBody}}get request(){return{body:this.requestBody}}};function Fc({error:e,requestBody:t}){return e instanceof xr?e.errorMessage():{response:{status:0,body:e instanceof Error?e.message:String(e)},request:{body:t}}}i(Fc,"toFailsafeOutput");var bi=(s=>(s.GET="GET",s.POST="POST",s.PATCH="PATCH",s.PUT="PUT",s.DELETE="DELETE",s.HEAD="HEAD",s))(bi||{});var Xn=class extends Kn{static{i(this,"FetchHttpClient")}constructor(t="",r=new Jn){super(t,r)}async sendRequest(t,r){process.env.NODE_TLS_REJECT_UNAUTHORIZED="0";let{urlWithoutQueryParams:n,queryParams:o}=this.getUrl(t),a=this.getHeaders(t),s=t.queryParams??{};for(let[H,fe]of Object.entries(s))o.append(H,fe);let u=o.toString(),p=u?`${n}?${u}`:n,d=t.responseType??"json",g=t.followRedirects??!0,x=t.retries??0,{body:v,extraHeaders:l,isStream:f}=sy(t.method)?uy(t.body,a):{body:void 0,extraHeaders:{},isStream:!1},y=ly({...a,...l}),h=await cy(async()=>{let H=new AbortController,fe=t.timeout&&t.timeout>0?setTimeout(()=>H.abort(),t.timeout):void 0;try{let xe={method:t.method.toString(),headers:y,body:v,redirect:g?"follow":"manual",signal:H.signal};return f&&(xe.duplex="half"),r?.dispatcher!==void 0&&(xe.dispatcher=r.dispatcher),await fetch(p,xe)}finally{fe!==void 0&&clearTimeout(fe)}},x),_=g?300:400;if(h.status<200||h.status>=_){let H=await Bc(h,d),fe=new xr(t.body,{status:h.status,responseBody:H});throw console.error("[HttpClient#(sanitized error message)] Request failed:",fe),fe}let T=await Bc(h,d);return{status:h.status,headers:py(h.headers),body:T}}};function sy(e){return e!=="GET"&&e!=="HEAD"}i(sy,"acceptsRequestBody");function uy(e,t){if(fy(e))return{body:void 0,extraHeaders:{},isStream:!1};if(dy(e)){let n=new Vc.PassThrough;return e.on("error",o=>n.destroy(o)),e.pipe(n),{body:n,extraHeaders:e.getHeaders(),isStream:!0}}return typeof e=="string"||Buffer.isBuffer(e)||e instanceof URLSearchParams||e instanceof ArrayBuffer||typeof FormData<"u"&&e instanceof FormData||typeof Blob<"u"&&e instanceof Blob?{body:e,extraHeaders:{},isStream:!1}:(t["Content-Type"]??t["content-type"]??"").includes("application/x-www-form-urlencoded")?{body:new URLSearchParams(e).toString(),extraHeaders:{},isStream:!1}:{body:JSON.stringify(e),extraHeaders:{},isStream:!1}}i(uy,"serializeBody");async function Bc(e,t){switch(t){case"arraybuffer":return Buffer.from(await e.arrayBuffer());case"blob":return await e.blob();case"text":return await e.text();default:{let r=await e.text();if(r.length===0)return;try{return JSON.parse(r)}catch{return r}}}}i(Bc,"parseResponseBody");async function cy(e,t){let r;for(let n=0;n<=t;n++)try{let o=await e();if(o.status>=500&&n<t){await Hc(n);continue}return o}catch(o){if(r=o,n<t){await Hc(n);continue}throw o}throw r}i(cy,"sendWithRetries");function Hc(e){let t=Math.min(1e3*2**e,3e4);return new Promise(r=>setTimeout(r,t))}i(Hc,"backoff");function ly(e){let t={};for(let[r,n]of Object.entries(e))n!==void 0&&(t[r.toLowerCase()]=Array.isArray(n)?n.join(", "):n);return t}i(ly,"normalizeHeaders");function py(e){let t={};return e.forEach((r,n)=>{t[n]=r}),t}i(py,"toHttpHeaders");function dy(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"&&typeof e.on=="function"}i(dy,"isNodeFormData");function fy(e){return e==null}i(fy,"isNil");var Zc=new Xn;var e_=Ne(require("fs")),Xp=Ne(Jp());var t_={"application/json":"json","application/pdf":"pdf","application/xml":"xml","text/xml":"xml","application/zip":"zip","application/gzip":"gz","application/x-tar":"tar","application/octet-stream":"bin","application/msword":"doc","application/vnd.openxmlformats-officedocument.wordprocessingml.document":"docx","application/vnd.ms-excel":"xls","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"xlsx","application/vnd.ms-powerpoint":"ppt","application/vnd.openxmlformats-officedocument.presentationml.presentation":"pptx","application/rtf":"rtf","application/javascript":"js","application/x-www-form-urlencoded":"bin","text/plain":"txt","text/html":"html","text/css":"css","text/csv":"csv","text/calendar":"ics","text/markdown":"md","image/png":"png","image/jpeg":"jpeg","image/jpg":"jpg","image/gif":"gif","image/webp":"webp","image/svg+xml":"svg","image/bmp":"bmp","image/tiff":"tiff","image/x-icon":"ico","image/vnd.microsoft.icon":"ico","image/heic":"heic","audio/mpeg":"mp3","audio/mp4":"m4a","audio/wav":"wav","audio/x-wav":"wav","audio/ogg":"ogg","audio/webm":"weba","video/mp4":"mp4","video/mpeg":"mpeg","video/webm":"webm","video/quicktime":"mov","video/x-msvideo":"avi","font/woff":"woff","font/woff2":"woff2","font/ttf":"ttf","font/otf":"otf"};function r_(e){let t=e.split(";")[0].trim().toLowerCase();return t_[t]??""}i(r_,"contentTypeToExtension");var n_=i(({baseUrl:e,relativePath:t})=>{let r=e.endsWith("/")?e:`${e}/`,n=t.startsWith("/")?t.slice(1):t;return`${r}${n}`},"joinBaseUrlWithRelativePath"),o_=i((e,t)=>{let r="https://api.example.com";try{let n=t?e(t):void 0;return(n?.endsWith("/")?n.slice(0,-1):n)??r}catch{return r}},"getBaseUrlForDescription");function Yp({auth:e,baseUrl:t,authMapping:r,description:n,displayName:o,name:a,props:s,extraProps:u,authLocation:p="headers"}){return oe({audience:"human",name:a||"custom_api_call",displayName:o||"Custom API Call",description:n||"Make a custom API call to a specific endpoint",auth:e,requireAuth:!!e,props:{url:R.DynamicProperties({auth:e,displayName:"",required:!0,refreshers:[],props:i(async({auth:d})=>({url:R.ShortText({displayName:"URL",description:`You can either use the full URL or the relative path to the base URL
11
+ i.e ${o_(t,d)}/resource or /resource`,required:!0,defaultValue:d?t(d):"",...s?.url??{}})}),"props")}),method:R.StaticDropdown({displayName:"Method",required:!0,options:{options:Object.values(bi).map(d=>({label:d,value:d}))},...s?.method??{}}),headers:R.Object({displayName:"Headers",description:"Authorization headers are injected automatically from your connection.",required:!0,...s?.headers??{}}),queryParams:R.Object({displayName:"Query Parameters",required:!0,...s?.queryParams??{}}),body_type:R.StaticDropdown({displayName:"Body Type",required:!1,defaultValue:"none",options:{disabled:!1,options:[{label:"None",value:"none"},{label:"JSON",value:"json"},{label:"Form Data",value:"form_data"},{label:"Raw",value:"raw"}]}}),body:R.DynamicProperties({auth:e,displayName:"Body",refreshers:["body_type"],required:!1,props:i(async({body_type:d})=>{if(!d)return{};let g=d,x={};switch(g){case"none":break;case"json":x.data=R.Json({displayName:"JSON Body",required:!0,...s?.body??{}});break;case"raw":x.data=R.LongText({displayName:"Raw Body",required:!0});break;case"form_data":x.data=R.Array({displayName:"Form Data",required:!0,properties:{fieldName:R.ShortText({displayName:"Field Name",required:!0}),fieldType:R.StaticDropdown({displayName:"Field Type",required:!0,options:{disabled:!1,options:[{label:"Text",value:"text"},{label:"File",value:"file"}]}}),textFieldValue:R.LongText({displayName:"Text Field Value",required:!1}),fileFieldValue:R.File({displayName:"File Field Value",required:!1})}});break}return x},"props")}),response_is_binary:R.Checkbox({displayName:"Response is Binary ?",description:"Enable for files like PDFs, images, etc.",required:!1,defaultValue:!1}),failsafe:R.Checkbox({displayName:"No Error on Failure",required:!1,...s?.failsafe??{}}),timeout:R.Number({displayName:"Timeout (in seconds)",required:!1,...s?.timeout??{}}),followRedirects:R.Checkbox({displayName:"Follow redirects",required:!1,defaultValue:!1}),...u},run:i(async d=>{let{method:g,url:x,headers:v,queryParams:l,body:f,body_type:y,failsafe:h,timeout:_,response_is_binary:T,followRedirects:H}=d.propsValue;Vr(g,"Method"),Vr(x,"URL");let fe=ye(r)?{}:await r(d.auth,d.propsValue),xe=x.url,Ce=xe.startsWith("http://")||xe.startsWith("https://")?xe:n_({baseUrl:t(d.auth),relativePath:xe}),ee={method:g,url:Ce,headers:{...v??{},...p==="headers"||!ye(p)?fe:{}},queryParams:{...p==="queryParams"?fe:{},...l??{}},timeout:_?_*1e3:0,followRedirects:H};if(T&&(ee.responseType="arraybuffer"),f)if(y&&y!=="none"){let G=f.data;if(y==="form_data"){let yt=G,ut=new Xp.default;for(let{fieldName:j,fieldType:A,textFieldValue:E,fileFieldValue:O}of yt)A==="text"&&!pr(E)?ut.append(j,E):A==="file"&&!pr(O)&&ut.append(j,O.data,{filename:O?.filename});ee.body=ut,ee.headers={...ee.headers,...ut.getHeaders()}}else ee.body=G}else y||(ee.body=f);try{let G=await Zc.sendRequest(ee);return await i_(d.files,G.body,G.status,G.headers,T)}catch(G){if(h)return Fc({error:G,requestBody:ee.body});throw G}},"run")})}i(Yp,"createCustomApiCallAction");var i_=i(async(e,t,r,n,o)=>{let a;if(o&&a_(t)){let s=Array.isArray(n?.["content-type"])?n["content-type"][0]:n?.["content-type"],u=r_(s??"")||"txt",p;t instanceof ArrayBuffer?p=Buffer.from(new Uint8Array(t)):Buffer.isBuffer(t)?p=t:p=Buffer.from(t),a=await e.write({fileName:`output.${u}`,data:p})}else a=t;return{status:r,headers:n,body:a}},"handleBinaryResponse"),a_=i(e=>e instanceof ArrayBuffer||Buffer.isBuffer(e),"isBinaryBody");var Te={async poll(e,{store:t,auth:r,propsValue:n,maxItemsToPoll:o,files:a,server:s}){switch(e.strategy){case 0:{let u=await t.get("lastPoll");if(ye(u))throw new Error("lastPoll doesn't exist in the store.");let p=await e.items({store:t,auth:r,propsValue:n,lastFetchEpochMS:u,server:s}),d=p.reduce((g,x)=>Math.max(g,x.epochMilliSeconds),u);return await t.put("lastPoll",d),p.filter(g=>g.epochMilliSeconds>u).map(g=>g.data)}case 1:{let u=await t.get("lastItem"),p=await e.items({store:t,auth:r,propsValue:n,lastItemId:u,files:a,server:s}),d=p.findIndex(v=>v.id===u),g=[];ye(u)||d==-1?g=p??[]:g=p?.slice(0,d)??[],ye(o)||(g=g.slice(-o));let x=g?.[0]?.id;return ye(x)||await t.put("lastItem",x),g.map(v=>v.data)}}},async onEnable(e,{store:t,auth:r,propsValue:n,server:o}){switch(e.strategy){case 0:{await t.put("lastPoll",Date.now());break}case 1:{let s=(await e.items({store:t,auth:r,propsValue:n,lastItemId:null,server:o}))?.[0]?.id;ye(s)?await t.delete("lastItem"):await t.put("lastItem",s);break}}},async onDisable(e,t){switch(e.strategy){case 0:case 1:return}},async test(e,{auth:t,propsValue:r,store:n,files:o,server:a}){let s=[];switch(e.strategy){case 0:{s=await e.items({store:n,auth:t,propsValue:r,lastFetchEpochMS:0,server:a});break}case 1:{s=await e.items({store:n,auth:t,propsValue:r,lastItemId:null,files:o,server:a});break}}return s_(s.map(u=>u.data))}};function s_(e){return e.length<=5?e:e.slice(0,5)}i(s_,"getFirstFiveOrAll");var ed=Ne(so());var uo={strategy:0,items:i(async({auth:e})=>(await I.listPlans({auth:e})).map(r=>({epochMilliSeconds:(0,ed.default)(r.createdDateTime).valueOf(),data:r})),"items")},td=At({auth:K,name:"newPlanCreated",displayName:"New Plan Created",description:"Triggers when a new Plan is created in Microsoft 365 Planner.",aiMetadata:{description:"Fires when a new plan is created in Microsoft 365 Planner across the authenticated user's accessible plans. Polls periodically and emits each newly created plan."},props:{},sampleData:{},type:"POLLING",async test(e){return await Te.test(uo,e)},async onEnable(e){let{store:t,auth:r,propsValue:n}=e;await Te.onEnable(uo,{store:t,auth:r,propsValue:n})},async onDisable(e){let{store:t,auth:r,propsValue:n}=e;await Te.onDisable(uo,{store:t,auth:r,propsValue:n})},async run(e){return await Te.poll(uo,e)}});var rd=Ne(so());var u_={planId:pe({required:!0})},co={strategy:0,items:i(async({auth:e,propsValue:{planId:t}})=>{if(!t)return[];let r=await I.getUser({auth:e});if(!r||!r.id)throw new Error("Unable to fetch authenticated user details.");return(await I.listTasks({auth:e,planId:t})).filter(o=>{let a=String(r.id);return o.assignments&&Object.prototype.hasOwnProperty.call(o.assignments,a)}).map(o=>({epochMilliSeconds:(0,rd.default)(o.createdDateTime).valueOf(),data:o}))},"items")},nd=At({auth:K,name:"newTaskAssignedToUser",displayName:"New Task Assigned to User",description:"Triggers when a Task is assigned to the authenticated user in Microsoft 365 Planner.",aiMetadata:{description:"Fires when a task within a specified Planner plan is assigned to the authenticated (connected) user. Polls periodically and emits each new task in that plan where the current user is among the assignees."},props:u_,sampleData:{},type:"POLLING",async test(e){return await Te.test(co,e)},async onEnable(e){let{store:t,auth:r,propsValue:n}=e;await Te.onEnable(co,{store:t,auth:r,propsValue:n})},async onDisable(e){let{store:t,auth:r,propsValue:n}=e;await Te.onDisable(co,{store:t,auth:r,propsValue:n})},async run(e){return await Te.poll(co,e)}});var od=Ne(so());var c_={planId:pe({required:!0})},lo={strategy:0,items:i(async({auth:e,propsValue:{planId:t}})=>t?(await I.listTasks({auth:e,planId:t})).map(n=>({epochMilliSeconds:(0,od.default)(n.createdDateTime).valueOf(),data:n})):[],"items")},id=At({auth:K,name:"newTaskCreated",displayName:"New Task Created",description:"Triggers when a new Task is created in Microsoft 365 Planner.",aiMetadata:{description:"Fires when a new task is created within a specified Planner plan. Polls periodically and emits each newly created task for the configured plan."},props:c_,sampleData:{"@odata.etag":'W/"JzEtVGFzayAgQEBAffEBAQEBAQEBARCc="',planId:"s58lztas2UyCXSffEjnlVRgWUAFMLw",bucketId:"xZ2RCz88uE6BffffftN-0TKffPGUAB-pQ",title:"test task 123",orderHint:"8584411578775238762",assigneePriority:"",percentComplete:0,startDateTime:null,createdDateTime:"2025-10-14T13:36:47.953708Z",dueDateTime:null,hasDescription:!1,previewType:"automatic",completedDateTime:null,referenceCount:0,checklistItemCount:0,activeChecklistItemCount:0,conversationThreadId:null,priority:5,id:"wvG9lNxhuUO2JuedF9-rimUAFsBA",completedBy:null,createdBy:{user:{displayName:null,id:"90b3720d-f459-42c1-a02e-6471a1ecb068"},application:{displayName:null,id:"5ea0744c-62fa-4a19-99be-99f0869d3182"}},appliedCategories:{},assignments:{}},type:"POLLING",async test(e){return await Te.test(lo,e)},async onEnable(e){let{store:t,auth:r,propsValue:n}=e;await Te.onEnable(lo,{store:t,auth:r,propsValue:n})},async onDisable(e){let{store:t,auth:r,propsValue:n}=e;await Te.onDisable(lo,{store:t,auth:r,propsValue:n})},async run(e){return await Te.poll(lo,e)}});var l_=nu({displayName:"Microsoft 365 Planner",description:"Microsoft 365 Planner is part of the Microsoft 365 suite, offering lightweight task and bucket-based planning for teams. This integration supports creating plans, buckets, tasks, fetching them, deleting them, and custom API calls.",auth:K,minimumSupportedRelease:"0.36.1",logoUrl:"https://cdn.activepieces.com/pieces/microsoft-365-planner.png",authors:["LuizDMM","sanket-a11y"],actions:[zc,Oc,Rc,kc,Dc,Lc,Mc,jc,Cc,Uc,Nc,Yp({auth:K,baseUrl:i(e=>{let t=St(e);return $t(t)+"/v1.0/"},"baseUrl"),authMapping:i(async e=>({Authorization:`Bearer ${e.access_token}`}),"authMapping")})],triggers:[td,id,nd]});0&&(module.exports={microsoft365Planner});
12
12
  /*! Bundled license information:
13
13
 
14
14
  mime-types/index.js: