@activepieces/piece-microsoft-365-planner 0.2.6 → 0.2.7
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.
- package/package.json +1 -1
- package/src/index.js +5 -5
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
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:
|
|
1
|
+
"use strict";var sd=Object.create;var qt=Object.defineProperty;var ud=Object.getOwnPropertyDescriptor;var cd=Object.getOwnPropertyNames;var ld=Object.getPrototypeOf,pd=Object.prototype.hasOwnProperty;var i=(e,t)=>qt(e,"name",{value:t,configurable:!0});var dd=(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 cd(t))!pd.call(e,o)&&o!==r&&qt(e,o,{get:()=>t[o],enumerable:!(n=ud(t,o))||n.enumerable});return e};var Ne=(e,t,r)=>(r=e!=null?sd(ld(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,P=(l.match(u.zoneIndex)||[])[0],T,H;for(P&&(P=P.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:P}}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 P=0,T;for(;h>0;){if(T=y-h,T<0&&(T=0),l[P]>>T!==f[P]>>T)return!1;h-=y,P+=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},P,T,H;for(P=3;P>=0;P-=1)if(T=this.octets[P],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(),P=[],T=0;for(;T<4;)P.push(parseInt(y[T],10)|parseInt(h[T],10)^255),T++;return new this(P)}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,P,T;try{for(f=this.parseCIDR(l),h=f[0].toByteArray(),T=this.subnetMaskFromPrefixLength(f[1]).toByteArray(),P=[],y=0;y<4;)P.push(parseInt(h[y],10)&parseInt(T[y],10)),y++;return new this(P)}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 P=f.slice(1,6),T=[];for(let H=0;H<P.length;H++)y=P[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 P=[],T;for(T=0;T<=24;T+=8)P.push(h>>T&255);return P})().reverse()}else return(f=l.match(r.twoOctet))?(function(){let P=f.slice(1,4),T=[];if(h=g(P[1]),h>16777215||h<0)throw new Error("ipaddr: address outside defined range");return T.push(g(P[0])),T.push(h>>16&255),T.push(h>>8&255),T.push(h&255),T})():(f=l.match(r.threeOctet))?(function(){let P=f.slice(1,5),T=[];if(h=g(P[2]),h>65535||h<0)throw new Error("ipaddr: address outside defined range");return T.push(g(P[0])),T.push(g(P[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,P;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(P=this.parts[h],!(0<=P&&P<=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},P,T;for(let H=7;H>=0;H-=1)if(P=this.parts[H],P in h){if(T=h[P],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 P=0;P<h.length;P++)f=h[P],y.push(f>>8),y.push(f&255);return y},l.prototype.toFixedLengthString=function(){let f=(function(){let h=[];for(let P=0;P<this.parts.length;P++)h.push(x(this.parts[P].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 P=0;P<this.parts.length;P++)h.push(this.parts[P].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,P=-1,T;for(;T=f.exec(y);)T[0].length>P&&(h=T.index,P=T[0].length);return P<0?y:`${y.substring(0,h)}::${y.substring(h+P)}`},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(),P=[],T=0;for(;T<16;)P.push(parseInt(y[T],10)|parseInt(h[T],10)^255),T++;return new this(P)}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,P,T;try{for(f=this.parseCIDR(l),h=f[0].toByteArray(),T=this.subnetMaskFromPrefixLength(f[1]).toByteArray(),P=[],y=0;y<16;)P.push(parseInt(h[y],10)&parseInt(T[y],10)),y++;return new this(P)}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,P,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(P=T[y],!(0<=P&&P<=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,P,T,H;y==null&&(y="unicast");for(P in f)if(Object.prototype.hasOwnProperty.call(f,P)){for(T=f[P],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 P}return y},typeof qr<"u"&&qr.exports?qr.exports=v:e.ipaddr=v})(fs)});var se={};po(se,{__addDisposableResource:()=>Mu,__assign:()=>Wr,__asyncDelegator:()=>Ou,__asyncGenerator:()=>wu,__asyncValues:()=>zu,__await:()=>wt,__awaiter:()=>Tu,__classPrivateFieldGet:()=>Cu,__classPrivateFieldIn:()=>Uu,__classPrivateFieldSet:()=>Nu,__createBinding:()=>Jr,__decorate:()=>hu,__disposeResources:()=>Lu,__esDecorate:()=>vu,__exportStar:()=>Iu,__extends:()=>mu,__generator:()=>Eu,__importDefault:()=>Du,__importStar:()=>ku,__makeTemplateObject:()=>Ru,__metadata:()=>bu,__param:()=>yu,__propKey:()=>Pu,__read:()=>Yo,__rest:()=>gu,__rewriteRelativeImportExtension:()=>ju,__runInitializers:()=>_u,__setFunctionName:()=>xu,__spread:()=>Au,__spreadArray:()=>$u,__spreadArrays:()=>Su,__values:()=>Kr,default:()=>Zm});function mu(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 gu(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 hu(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 yu(e,t){return function(r,n){t(r,n,e)}}function vu(e,t,r,n,o,a){function s(P){if(P!==void 0&&typeof P!="function")throw new TypeError("Function expected");return P}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(P){if(v)throw new TypeError("Cannot add initializers after decoration has completed");a.push(s(P||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 _u(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 Pu(e){return typeof e=="symbol"?e:"".concat(e)}function xu(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 bu(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function Tu(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 Eu(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 Iu(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 Au(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Yo(arguments[t]));return e}function Su(){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 $u(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 wu(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,P){a.push([l,y,h,P])>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 Ou(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 zu(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 Ru(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function ku(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 Hm(t,e),t}function Du(e){return e&&e.__esModule?e:{default:e}}function Cu(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 Nu(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 Uu(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 Mu(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 Lu(e){function t(a){e.error=e.hasError?new Vm(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 ju(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,Hm,Xo,Vm,Zm,ue=dd(()=>{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(mu,"__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(gu,"__rest");i(hu,"__decorate");i(yu,"__param");i(vu,"__esDecorate");i(_u,"__runInitializers");i(Pu,"__propKey");i(xu,"__setFunctionName");i(bu,"__metadata");i(Tu,"__awaiter");i(Eu,"__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(Iu,"__exportStar");i(Kr,"__values");i(Yo,"__read");i(Au,"__spread");i(Su,"__spreadArrays");i($u,"__spreadArray");i(wt,"__await");i(wu,"__asyncGenerator");i(Ou,"__asyncDelegator");i(zu,"__asyncValues");i(Ru,"__makeTemplateObject");Hm=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(ku,"__importStar");i(Du,"__importDefault");i(Cu,"__classPrivateFieldGet");i(Nu,"__classPrivateFieldSet");i(Uu,"__classPrivateFieldIn");i(Mu,"__addDisposableResource");Vm=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(Lu,"__disposeResources");i(ju,"__rewriteRelativeImportExtension");Zm={__extends:mu,__assign:Wr,__rest:gu,__decorate:hu,__param:yu,__esDecorate:vu,__runInitializers:_u,__propKey:Pu,__setFunctionName:xu,__metadata:bu,__awaiter:Tu,__generator:Eu,__createBinding:Jr,__exportStar:Iu,__values:Kr,__read:Yo,__spread:Au,__spreadArrays:Su,__spreadArray:$u,__await:wt,__asyncGenerator:wu,__asyncDelegator:Ou,__asyncValues:zu,__makeTemplateObject:Ru,__importStar:ku,__importDefault:Du,__classPrivateFieldGet:Cu,__classPrivateFieldSet:Nu,__classPrivateFieldIn:Uu,__addDisposableResource:Mu,__disposeResources:Lu,__rewriteRelativeImportExtension:ju}});var gr=b(Xr=>{"use strict";Object.defineProperty(Xr,"__esModule",{value:!0});Xr.RequestMethod=void 0;var Fu;(function(e){e.GET="GET",e.PATCH="PATCH",e.POST="POST",e.PUT="PUT",e.DELETE="DELETE"})(Fu||(Xr.RequestMethod=Fu={}))});var Bu=b(Yr=>{"use strict";Object.defineProperty(Yr,"__esModule",{value:!0});Yr.BatchRequestContent=void 0;var Ot=(ue(),ie(se)),Qo=gr(),qm=(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})();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=`
|
|
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=qm});var Hu=b(Qr=>{"use strict";Object.defineProperty(Qr,"__esModule",{value:!0});Qr.BatchResponseContent=void 0;var Gm=(ue(),ie(se)),Wm=(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 Gm.__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=Wm});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 Km=(ue(),ie(se)),Jm=(function(e){Km.__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=Jm});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 Xm=ei(),Ym=Ge();ze.oDataQueryNames=["$select","$expand","$orderby","$filter","$top","$skip","$skipToken","$count"];var Qm=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=Qm;var eg=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=eg;var tg=i(function(e){return Vu(e)},"isGraphURL");ze.isGraphURL=tg;var rg=i(function(e,t){return t.forEach(function(r){return ng(r)}),Vu(e,t)},"isCustomHost");ze.isCustomHost=rg;var Vu=i(function(e,t){if(t===void 0&&(t=Xm.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"),ng=i(function(e){if(e.indexOf("/")!==-1)throw new Ym.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 og=(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=og});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 Zu=(ue(),ie(se)),ig=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=ig;var ag=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=ag;var sg=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=sg;var ug=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=ug;var cg=i(function(e,t){return Zu.__awaiter(void 0,void 0,void 0,function(){var r,n,o,a,s,u,p,d,g,x,v,l,f;return Zu.__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=cg});var ti=b(nn=>{"use strict";Object.defineProperty(nn,"__esModule",{value:!0});nn.AuthenticationHandlerOptions=void 0;var lg=(function(){function e(t,r){this.authenticationProvider=t,this.authenticationProviderOptions=r}return i(e,"AuthenticationHandlerOptions"),e})();nn.AuthenticationHandlerOptions=lg});var kt=b(Rt=>{"use strict";Object.defineProperty(Rt,"__esModule",{value:!0});Rt.TelemetryHandlerOptions=Rt.FeatureUsageFlag=void 0;var qu=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 pg=(function(){function e(){this.featureUsage=ri.NONE}return i(e,"TelemetryHandlerOptions"),e.updateFeatureUsageFlag=function(t,r){var n;t.middlewareControl instanceof qu.MiddlewareControl?n=t.middlewareControl.getMiddlewareOptions(e):t.middlewareControl=new qu.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=pg});var an=b(on=>{"use strict";Object.defineProperty(on,"__esModule",{value:!0});on.AuthenticationHandler=void 0;var Gu=(ue(),ie(se)),Wu=tn(),dg=it(),fg=zt(),mg=ti(),Ku=kt(),gg=(function(){function e(t){this.authenticationProvider=t}return i(e,"AuthenticationHandler"),e.prototype.execute=function(t){return Gu.__awaiter(this,void 0,void 0,function(){var r,n,o,a,s,u;return Gu.__generator(this,function(p){switch(p.label){case 0:return r=typeof t.request=="string"?t.request:t.request.url,(0,Wu.isGraphURL)(r)||t.customHosts&&(0,Wu.isCustomHost)(r,t.customHosts)?(n=void 0,t.middlewareControl instanceof dg.MiddlewareControl&&(n=t.middlewareControl.getMiddlewareOptions(mg.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,fg.appendRequestHeader)(t.request,t.options,e.AUTHORIZATION_HEADER,u),Ku.TelemetryHandlerOptions.updateFeatureUsageFlag(t,Ku.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=gg});var un=b(sn=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});sn.HTTPMessageHandler=void 0;var Ju=(ue(),ie(se)),hg=(function(){function e(){}return i(e,"HTTPMessageHandler"),e.prototype.execute=function(t){return Ju.__awaiter(this,void 0,void 0,function(){var r;return Ju.__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=hg});var hr=b(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.RetryHandlerOptions=void 0;var yg=(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=yg});var pn=b(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});ln.RetryHandler=void 0;var Dt=(ue(),ie(se)),ni=gr(),vg=it(),Xu=zt(),Yu=hr(),Qu=kt(),_g=(function(){function e(t){t===void 0&&(t=new Yu.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,Xu.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 vg.MiddlewareControl&&(r=t.middlewareControl.getMiddlewareOptions(this.options.constructor)),typeof r>"u"&&(r=Object.assign(new Yu.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,Xu.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),Qu.TelemetryHandlerOptions.updateFeatureUsageFlag(t,Qu.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=_g});var yr=b(dn=>{"use strict";Object.defineProperty(dn,"__esModule",{value:!0});dn.RedirectHandlerOptions=void 0;var Pg=(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=Pg});var mn=b(fn=>{"use strict";Object.defineProperty(fn,"__esModule",{value:!0});fn.RedirectHandler=void 0;var Ct=(ue(),ie(se)),xg=gr(),bg=it(),Tg=zt(),oi=yr(),ec=kt(),Eg=(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,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 bg.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=xg.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,ec.TelemetryHandlerOptions.updateFeatureUsageFlag(t,ec.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=Eg});var tc=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 rc=(ue(),ie(se)),nc=tn(),Ig=tc(),Ag=it(),hn=zt(),Sg=kt(),$g=(function(){function e(){}return i(e,"TelemetryHandler"),e.prototype.execute=function(t){return rc.__awaiter(this,void 0,void 0,function(){var r,n,o,a,s;return rc.__generator(this,function(u){switch(u.label){case 0:return r=typeof t.request=="string"?t.request:t.request.url,(0,nc.isGraphURL)(r)||t.customHosts&&(0,nc.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(Ig.PACKAGE_VERSION),a=void 0,t.middlewareControl instanceof Ag.MiddlewareControl&&(a=t.middlewareControl.getMiddlewareOptions(Sg.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=$g});var oc=b(_n=>{"use strict";Object.defineProperty(_n,"__esModule",{value:!0});_n.MiddlewareFactory=void 0;var wg=an(),Og=un(),zg=yr(),Rg=hr(),kg=mn(),Dg=pn(),Cg=vn(),Ng=i(function(){return typeof process=="object"&&typeof require=="function"},"isNodeEnvironment"),Ug=(function(){function e(){}return i(e,"MiddlewareFactory"),e.getDefaultMiddlewareChain=function(t){var r=[],n=new wg.AuthenticationHandler(t),o=new Dg.RetryHandler(new Rg.RetryHandlerOptions),a=new Cg.TelemetryHandler,s=new Og.HTTPMessageHandler;if(r.push(n),r.push(o),Ng()){var u=new kg.RedirectHandler(new zg.RedirectHandlerOptions);r.push(u)}return r.push(a),r.push(s),r},e})();_n.MiddlewareFactory=Ug});var xn=b(Pn=>{"use strict";Object.defineProperty(Pn,"__esModule",{value:!0});Pn.ChaosStrategy=void 0;var ic;(function(e){e[e.MANUAL=0]="MANUAL",e[e.RANDOM=1]="RANDOM"})(ic||(Pn.ChaosStrategy=ic={}))});var ii=b(bn=>{"use strict";Object.defineProperty(bn,"__esModule",{value:!0});bn.ChaosHandlerOptions=void 0;var Mg=xn(),Lg=(function(){function e(t,r,n,o,a,s){if(t===void 0&&(t=Mg.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=Lg});var ac=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 cc=b(En=>{"use strict";Object.defineProperty(En,"__esModule",{value:!0});En.ChaosHandler=void 0;var Tn=(ue(),ie(se)),jg=it(),Fg=zt(),sc=ac(),ai=ii(),uc=xn(),Bg=(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=sc.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,Fg.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===uc.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=sc.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===uc.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 jg.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=Bg});var vr=b(In=>{"use strict";Object.defineProperty(In,"__esModule",{value:!0});In.ResponseType=void 0;var lc;(function(e){e.ARRAYBUFFER="arraybuffer",e.BLOB="blob",e.DOCUMENT="document",e.JSON="json",e.RAW="raw",e.STREAM="stream",e.TEXT="text"})(lc||(In.ResponseType=lc={}))});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 Hg=(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=Hg});var ci=b(wn=>{"use strict";Object.defineProperty(wn,"__esModule",{value:!0});wn.Range=void 0;var Vg=(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=Vg});var li=b(On=>{"use strict";Object.defineProperty(On,"__esModule",{value:!0});On.UploadResult=void 0;var Zg=(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=Zg});var di=b(Rn=>{"use strict";Object.defineProperty(Rn,"__esModule",{value:!0});Rn.LargeFileUploadTask=void 0;var Ie=(ue(),ie(se)),pi=Ge(),qg=ui(),pc=vr(),zn=ci(),Gg=li(),Wg=(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,qg.GraphResponseHandler.getResponse(a)];case 4:return s=p.sent(),a.status===201||a.status===200&&s.id?(this.reportProgress(t,r),[2,Gg.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(pc.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(pc.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=Wg});var fi=b(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});kn.FileUpload=void 0;var Kg=Ge(),Jg=(function(){function e(t,r,n){if(this.content=t,this.name=r,this.size=n,!t||!r||!n)throw new Kg.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=Jg});var mi=b(Dn=>{"use strict";Object.defineProperty(Dn,"__esModule",{value:!0});Dn.getValidRangeSize=void 0;var Xg=5*1024*1024,Yg=i(function(e){return e>320*1024&&(e=Math.floor(e/(320*1024))*320*1024),e},"roundTo320KB"),Qg=i(function(e){e===void 0&&(e=Xg);var t=60*1024*1024;return e>t&&(e=t),Yg(e)},"getValidRangeSize");Dn.getValidRangeSize=Qg});var fc=b(Cn=>{"use strict";Object.defineProperty(Cn,"__esModule",{value:!0});Cn.OneDriveLargeFileUploadTask=void 0;var We=(ue(),ie(se)),dc=Ge(),eh=fi(),th=di(),rh=mi(),nh=(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 dc.GraphClientError("Please provide the Graph client instance, file object and OneDriveLargeFileUploadOptions value");return a=o.fileName,s=t.getFileInfo(n,a),u=new eh.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 dc.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,rh.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})(th.LargeFileUploadTask);Cn.OneDriveLargeFileUploadTask=nh});var gc=b(Nn=>{"use strict";Object.defineProperty(Nn,"__esModule",{value:!0});Nn.StreamUpload=void 0;var mc=(ue(),ie(se)),_r=Ge(),oh=(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 mc.__awaiter(this,void 0,void 0,function(){var r,n,o,a,s,u,p;return mc.__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=oh});var hc=b(Un=>{"use strict";Object.defineProperty(Un,"__esModule",{value:!0});Un.PageIterator=void 0;var Mt=(ue(),ie(se)),ih=(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=ih});var gi=b(Ln=>{"use strict";Object.defineProperty(Ln,"__esModule",{value:!0});Ln.CustomAuthenticationProvider=void 0;var Mn=(ue(),ie(se)),yc=Ge(),ah=(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 yc.GraphClientError(u)),[4,yc.GraphClientError.setGraphClientError(a)];case 2:p=d.sent(),o(p),d.label=3;case 3:return[2]}})})})})]})})},e})();Ln.CustomAuthenticationProvider=ah});var hi=b(jn=>{"use strict";Object.defineProperty(jn,"__esModule",{value:!0});jn.GraphError=void 0;var sh=(ue(),ie(se)),uh=(function(e){sh.__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=uh});var _c=b(Fn=>{"use strict";Object.defineProperty(Fn,"__esModule",{value:!0});Fn.GraphErrorHandler=void 0;var vc=(ue(),ie(se)),yi=hi(),ch=(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),vc.__awaiter(this,void 0,void 0,function(){var a;return vc.__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=ch});var vi=b(Bn=>{"use strict";Object.defineProperty(Bn,"__esModule",{value:!0});Bn.GraphRequest=void 0;var re=(ue(),ie(se)),lh=Ge(),ph=_c(),Pr=tn(),dh=ui(),fh=it(),gt=gr(),mh=vr(),gh=(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 fh.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,dh.GraphResponseHandler.getResponse(a,this._responseType,n)];case 3:return d=l.sent(),[2,d];case 4:if(g=l.sent(),g instanceof lh.GraphClientError)throw g;return x=void 0,a&&(x=a.status),[4,ph.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(mh.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=gh});var _i=b(Hn=>{"use strict";Object.defineProperty(Hn,"__esModule",{value:!0});Hn.HTTPClient=void 0;var Pc=(ue(),ie(se)),hh=(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 Pc.__awaiter(this,void 0,void 0,function(){var r;return Pc.__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=hh});var bc=b(Vn=>{"use strict";Object.defineProperty(Vn,"__esModule",{value:!0});Vn.HTTPClientFactory=void 0;var yh=(ue(),ie(se)),xc=_i(),vh=an(),_h=un(),Ph=yr(),xh=hr(),bh=mn(),Th=pn(),Eh=vn(),Ih=i(function(){return typeof process=="object"&&typeof require=="function"},"isNodeEnvironment"),Ah=(function(){function e(){}return i(e,"HTTPClientFactory"),e.createWithAuthenticationProvider=function(t){var r=new vh.AuthenticationHandler(t),n=new Th.RetryHandler(new xh.RetryHandlerOptions),o=new Eh.TelemetryHandler,a=new _h.HTTPMessageHandler;if(r.setNext(n),Ih()){var s=new bh.RedirectHandler(new Ph.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(xc.HTTPClient.bind.apply(xc.HTTPClient,yh.__spreadArray([void 0],t,!1)))},e})();Vn.HTTPClientFactory=Ah});var Tc=b(Zn=>{"use strict";Object.defineProperty(Zn,"__esModule",{value:!0});Zn.validatePolyFilling=void 0;var Sh=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=Sh});var Ac=b(qn=>{"use strict";Object.defineProperty(qn,"__esModule",{value:!0});qn.Client=void 0;var $h=(ue(),ie(se)),Ec=ei(),wh=gi(),Oh=vi(),Ic=_i(),zh=bc(),Rh=Tc(),kh=(function(){function e(t){this.config={baseUrl:Ec.GRAPH_BASE_URL,debugLogging:!1,defaultVersion:Ec.GRAPH_API_VERSION},(0,Rh.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=zh.HTTPClientFactory.createWithAuthenticationProvider(t.authProvider);else if(t.middleware!==void 0)n=new(Ic.HTTPClient.bind.apply(Ic.HTTPClient,$h.__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 wh.CustomAuthenticationProvider(t[n]):t[n]);return e.initWithMiddleware(r)},e.initWithMiddleware=function(t){return new e(t)},e.prototype.api=function(t){return new Oh.GraphRequest(this.httpClient,this.config,t)},e})();qn.Client=kh});var $c=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=Bu();Object.defineProperty($,"BatchRequestContent",{enumerable:!0,get:i(function(){return Dh.BatchRequestContent},"get")});var Ch=Hu();Object.defineProperty($,"BatchResponseContent",{enumerable:!0,get:i(function(){return Ch.BatchResponseContent},"get")});var Nh=an();Object.defineProperty($,"AuthenticationHandler",{enumerable:!0,get:i(function(){return Nh.AuthenticationHandler},"get")});var Uh=un();Object.defineProperty($,"HTTPMessageHandler",{enumerable:!0,get:i(function(){return Uh.HTTPMessageHandler},"get")});var Mh=pn();Object.defineProperty($,"RetryHandler",{enumerable:!0,get:i(function(){return Mh.RetryHandler},"get")});var Lh=mn();Object.defineProperty($,"RedirectHandler",{enumerable:!0,get:i(function(){return Lh.RedirectHandler},"get")});var jh=vn();Object.defineProperty($,"TelemetryHandler",{enumerable:!0,get:i(function(){return jh.TelemetryHandler},"get")});var Fh=oc();Object.defineProperty($,"MiddlewareFactory",{enumerable:!0,get:i(function(){return Fh.MiddlewareFactory},"get")});var Bh=ti();Object.defineProperty($,"AuthenticationHandlerOptions",{enumerable:!0,get:i(function(){return Bh.AuthenticationHandlerOptions},"get")});var Hh=hr();Object.defineProperty($,"RetryHandlerOptions",{enumerable:!0,get:i(function(){return Hh.RetryHandlerOptions},"get")});var Vh=yr();Object.defineProperty($,"RedirectHandlerOptions",{enumerable:!0,get:i(function(){return Vh.RedirectHandlerOptions},"get")});var Sc=kt();Object.defineProperty($,"FeatureUsageFlag",{enumerable:!0,get:i(function(){return Sc.FeatureUsageFlag},"get")});Object.defineProperty($,"TelemetryHandlerOptions",{enumerable:!0,get:i(function(){return Sc.TelemetryHandlerOptions},"get")});var Zh=ii();Object.defineProperty($,"ChaosHandlerOptions",{enumerable:!0,get:i(function(){return Zh.ChaosHandlerOptions},"get")});var qh=xn();Object.defineProperty($,"ChaosStrategy",{enumerable:!0,get:i(function(){return qh.ChaosStrategy},"get")});var Gh=cc();Object.defineProperty($,"ChaosHandler",{enumerable:!0,get:i(function(){return Gh.ChaosHandler},"get")});var Wh=di();Object.defineProperty($,"LargeFileUploadTask",{enumerable:!0,get:i(function(){return Wh.LargeFileUploadTask},"get")});var Kh=fc();Object.defineProperty($,"OneDriveLargeFileUploadTask",{enumerable:!0,get:i(function(){return Kh.OneDriveLargeFileUploadTask},"get")});var Jh=mi();Object.defineProperty($,"getValidRangeSize",{enumerable:!0,get:i(function(){return Jh.getValidRangeSize},"get")});var Xh=gc();Object.defineProperty($,"StreamUpload",{enumerable:!0,get:i(function(){return Xh.StreamUpload},"get")});var Yh=fi();Object.defineProperty($,"FileUpload",{enumerable:!0,get:i(function(){return Yh.FileUpload},"get")});var Qh=li();Object.defineProperty($,"UploadResult",{enumerable:!0,get:i(function(){return Qh.UploadResult},"get")});var ey=ci();Object.defineProperty($,"Range",{enumerable:!0,get:i(function(){return ey.Range},"get")});var ty=hc();Object.defineProperty($,"PageIterator",{enumerable:!0,get:i(function(){return ty.PageIterator},"get")});var ry=Ac();Object.defineProperty($,"Client",{enumerable:!0,get:i(function(){return ry.Client},"get")});var ny=gi();Object.defineProperty($,"CustomAuthenticationProvider",{enumerable:!0,get:i(function(){return ny.CustomAuthenticationProvider},"get")});var oy=hi();Object.defineProperty($,"GraphError",{enumerable:!0,get:i(function(){return oy.GraphError},"get")});var iy=Ge();Object.defineProperty($,"GraphClientError",{enumerable:!0,get:i(function(){return iy.GraphClientError},"get")});var ay=vi();Object.defineProperty($,"GraphRequest",{enumerable:!0,get:i(function(){return ay.GraphRequest},"get")});var sy=vr();Object.defineProperty($,"ResponseType",{enumerable:!0,get:i(function(){return sy.ResponseType},"get")})});var Kc=b((S0,Wc)=>{var Gc=require("stream").Stream,hy=require("util");Wc.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");hy.inherits(De,Gc);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=Gc.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 Qc=b((w0,Yc)=>{var yy=require("util"),Xc=require("stream").Stream,Jc=Kc();Yc.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");yy.inherits(de,Xc);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 Jc)){var r=Jc.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 Xc.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 tl=b((z0,el)=>{"use strict";el.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 ol=b(Ae=>{"use strict";var Yn=tl(),vy=require("path").extname,rl=/^\s*([^;\s]*)(?:;|\s|$)/,_y=/^text\//i;Ae.charset=nl;Ae.charsets={lookup:nl};Ae.contentType=Py;Ae.extension=xy;Ae.extensions=Object.create(null);Ae.lookup=by;Ae.types=Object.create(null);Ty(Ae.extensions,Ae.types);function nl(e){if(!e||typeof e!="string")return!1;var t=rl.exec(e),r=t&&Yn[t[1].toLowerCase()];return r&&r.charset?r.charset:t&&_y.test(t[1])?"UTF-8":!1}i(nl,"charset");function Py(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(Py,"contentType");function xy(e){if(!e||typeof e!="string")return!1;var t=rl.exec(e),r=t&&Ae.extensions[t[1].toLowerCase()];return!r||!r.length?!1:r[0]}i(xy,"extension");function by(e){if(!e||typeof e!="string")return!1;var t=vy("x."+e).toLowerCase().substr(1);return t&&Ae.types[t]||!1}i(by,"lookup");function Ty(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(Ty,"populateMaps")});var al=b((D0,il)=>{il.exports=Ey;function Ey(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}i(Ey,"defer")});var Ti=b((N0,ul)=>{var sl=al();ul.exports=Iy;function Iy(e){var t=!1;return sl(function(){t=!0}),i(function(n,o){t?e(n,o):sl(i(function(){e(n,o)},"nextTick_callback"))},"async_callback")}i(Iy,"async")});var Ei=b((M0,cl)=>{cl.exports=Ay;function Ay(e){Object.keys(e.jobs).forEach(Sy.bind(e)),e.jobs={}}i(Ay,"abort");function Sy(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}i(Sy,"clean")});var Ii=b((j0,pl)=>{var ll=Ti(),$y=Ei();pl.exports=wy;function wy(e,t,r,n){var o=r.keyedList?r.keyedList[r.index]:r.index;r.jobs[o]=Oy(t,o,e[o],function(a,s){o in r.jobs&&(delete r.jobs[o],a?$y(r):r.results[o]=s,n(a,r.results))})}i(wy,"iterate");function Oy(e,t,r,n){var o;return e.length==2?o=e(r,ll(n)):o=e(r,t,ll(n)),o}i(Oy,"runJob")});var Ai=b((B0,dl)=>{dl.exports=zy;function zy(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(zy,"state")});var Si=b((V0,fl)=>{var Ry=Ei(),ky=Ti();fl.exports=Dy;function Dy(e){Object.keys(this.jobs).length&&(this.index=this.size,Ry(this),ky(e)(null,this.results))}i(Dy,"terminator")});var gl=b((q0,ml)=>{var Cy=Ii(),Ny=Ai(),Uy=Si();ml.exports=My;function My(e,t,r){for(var n=Ny(e);n.index<(n.keyedList||e).length;)Cy(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 Uy.bind(n,r)}i(My,"parallel")});var $i=b((W0,Qn)=>{var hl=Ii(),Ly=Ai(),jy=Si();Qn.exports=Fy;Qn.exports.ascending=yl;Qn.exports.descending=By;function Fy(e,t,r,n){var o=Ly(e,r);return hl(e,t,o,i(function a(s,u){if(s){n(s,u);return}if(o.index++,o.index<(o.keyedList||e).length){hl(e,t,o,a);return}n(null,o.results)},"iteratorHandler")),jy.bind(o,n)}i(Fy,"serialOrdered");function yl(e,t){return e<t?-1:e>t?1:0}i(yl,"ascending");function By(e,t){return-1*yl(e,t)}i(By,"descending")});var _l=b((J0,vl)=>{var Hy=$i();vl.exports=Vy;function Vy(e,t,r){return Hy(e,t,null,r)}i(Vy,"serial")});var xl=b((Y0,Pl)=>{Pl.exports={parallel:gl(),serial:_l(),serialOrdered:$i()}});var wi=b((Q0,bl)=>{"use strict";bl.exports=Object});var El=b((eU,Tl)=>{"use strict";Tl.exports=Error});var Al=b((tU,Il)=>{"use strict";Il.exports=EvalError});var $l=b((rU,Sl)=>{"use strict";Sl.exports=RangeError});var Ol=b((nU,wl)=>{"use strict";wl.exports=ReferenceError});var Rl=b((oU,zl)=>{"use strict";zl.exports=SyntaxError});var eo=b((iU,kl)=>{"use strict";kl.exports=TypeError});var Cl=b((aU,Dl)=>{"use strict";Dl.exports=URIError});var Ul=b((sU,Nl)=>{"use strict";Nl.exports=Math.abs});var Ll=b((uU,Ml)=>{"use strict";Ml.exports=Math.floor});var Fl=b((cU,jl)=>{"use strict";jl.exports=Math.max});var Hl=b((lU,Bl)=>{"use strict";Bl.exports=Math.min});var Zl=b((pU,Vl)=>{"use strict";Vl.exports=Math.pow});var Gl=b((dU,ql)=>{"use strict";ql.exports=Math.round});var Kl=b((fU,Wl)=>{"use strict";Wl.exports=Number.isNaN||i(function(t){return t!==t},"isNaN")});var Xl=b((gU,Jl)=>{"use strict";var Zy=Kl();Jl.exports=i(function(t){return Zy(t)||t===0?t:t<0?-1:1},"sign")});var Ql=b((yU,Yl)=>{"use strict";Yl.exports=Object.getOwnPropertyDescriptor});var Oi=b((vU,ep)=>{"use strict";var to=Ql();if(to)try{to([],"length")}catch{to=null}ep.exports=to});var rp=b((_U,tp)=>{"use strict";var ro=Object.defineProperty||!1;if(ro)try{ro({},"a",{value:1})}catch{ro=!1}tp.exports=ro});var zi=b((PU,np)=>{"use strict";np.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 ap=b((bU,ip)=>{"use strict";var op=typeof Symbol<"u"&&Symbol,qy=zi();ip.exports=i(function(){return typeof op!="function"||typeof Symbol!="function"||typeof op("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:qy()},"hasNativeSymbols")});var Ri=b((EU,sp)=>{"use strict";sp.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var ki=b((IU,up)=>{"use strict";var Gy=wi();up.exports=Gy.getPrototypeOf||null});var pp=b((AU,lp)=>{"use strict";var Wy="Function.prototype.bind called on incompatible ",Ky=Object.prototype.toString,Jy=Math.max,Xy="[object Function]",cp=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"),Yy=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"),Qy=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");lp.exports=i(function(t){var r=this;if(typeof r!="function"||Ky.apply(r)!==Xy)throw new TypeError(Wy+r);for(var n=Yy(arguments,1),o,a=i(function(){if(this instanceof o){var g=r.apply(this,cp(n,arguments));return Object(g)===g?g:this}return r.apply(t,cp(n,arguments))},"binder"),s=Jy(0,r.length-n.length),u=[],p=0;p<s;p++)u[p]="$"+p;if(o=Function("binder","return function ("+Qy(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(($U,dp)=>{"use strict";var ev=pp();dp.exports=Function.prototype.bind||ev});var no=b((wU,fp)=>{"use strict";fp.exports=Function.prototype.call});var Di=b((OU,mp)=>{"use strict";mp.exports=Function.prototype.apply});var hp=b((zU,gp)=>{"use strict";gp.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var vp=b((RU,yp)=>{"use strict";var tv=Lt(),rv=Di(),nv=no(),ov=hp();yp.exports=ov||tv.call(nv,rv)});var Pp=b((kU,_p)=>{"use strict";var iv=Lt(),av=eo(),sv=no(),uv=vp();_p.exports=i(function(t){if(t.length<1||typeof t[0]!="function")throw new av("a function is required");return uv(iv,sv,t)},"callBindBasic")});var Ap=b((CU,Ip)=>{"use strict";var cv=Pp(),xp=Oi(),Tp;try{Tp=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var Ci=!!Tp&&xp&&xp(Object.prototype,"__proto__"),Ep=Object,bp=Ep.getPrototypeOf;Ip.exports=Ci&&typeof Ci.get=="function"?cv([Ci.get]):typeof bp=="function"?i(function(t){return bp(t==null?t:Ep(t))},"getDunder"):!1});var zp=b((UU,Op)=>{"use strict";var Sp=Ri(),$p=ki(),wp=Ap();Op.exports=Sp?i(function(t){return Sp(t)},"getProto"):$p?i(function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return $p(t)},"getProto"):wp?i(function(t){return wp(t)},"getProto"):null});var Ni=b((LU,Rp)=>{"use strict";var lv=Function.prototype.call,pv=Object.prototype.hasOwnProperty,dv=Lt();Rp.exports=dv.call(lv,pv)});var Lp=b((jU,Mp)=>{"use strict";var J,fv=wi(),mv=El(),gv=Al(),hv=$l(),yv=Ol(),Ht=Rl(),Bt=eo(),vv=Cl(),_v=Ul(),Pv=Ll(),xv=Fl(),bv=Hl(),Tv=Zl(),Ev=Gl(),Iv=Xl(),Np=Function,Ui=i(function(e){try{return Np('"use strict"; return ('+e+").constructor;")()}catch{}},"getEvalledConstructor"),br=Oi(),Av=rp(),Mi=i(function(){throw new Bt},"throwTypeError"),Sv=br?(function(){try{return arguments.callee,Mi}catch{try{return br(arguments,"callee").get}catch{return Mi}}})():Mi,jt=ap()(),_e=zp(),$v=ki(),wv=Ri(),Up=Di(),Tr=no(),Ft={},Ov=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%":mv,"%eval%":eval,"%EvalError%":gv,"%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%":Np,"%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%":fv,"%Object.getOwnPropertyDescriptor%":br,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?J:Promise,"%Proxy%":typeof Proxy>"u"?J:Proxy,"%RangeError%":hv,"%ReferenceError%":yv,"%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%":Sv,"%TypedArray%":Ov,"%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%":vv,"%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%":Up,"%Object.defineProperty%":Av,"%Object.getPrototypeOf%":$v,"%Math.abs%":_v,"%Math.floor%":Pv,"%Math.max%":xv,"%Math.min%":bv,"%Math.pow%":Tv,"%Math.round%":Ev,"%Math.sign%":Iv,"%Reflect.getPrototypeOf%":wv};if(_e)try{null.error}catch(e){kp=_e(_e(e)),ht["%Error.prototype%"]=kp}var kp,zv=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"),Dp={__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(),Rv=Er.call(Tr,Array.prototype.concat),kv=Er.call(Up,Array.prototype.splice),Cp=Er.call(Tr,String.prototype.replace),io=Er.call(Tr,String.prototype.slice),Dv=Er.call(Tr,RegExp.prototype.exec),Cv=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Nv=/\\(\\)?/g,Uv=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 Cp(t,Cv,function(a,s,u,p){o[o.length]=u?Cp(p,Nv,"$1"):s||a}),o},"stringToPath"),Mv=i(function(t,r){var n=t,o;if(oo(Dp,n)&&(o=Dp[n],n="%"+o[0]+"%"),oo(ht,n)){var a=ht[n];if(a===Ft&&(a=zv(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");Mp.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(Dv(/^%?[^%]*%?$/,t)===null)throw new Ht("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Uv(t),o=n.length>0?n[0]:"",a=Mv("%"+o+"%",r),s=a.name,u=a.value,p=!1,d=a.alias;d&&(o=d[0],kv(n,Rv([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 Fp=b((BU,jp)=>{"use strict";var Lv=zi();jp.exports=i(function(){return Lv()&&!!Symbol.toStringTag},"hasToStringTagShams")});var Vp=b((VU,Hp)=>{"use strict";var jv=Lp(),Bp=jv("%Object.defineProperty%",!0),Fv=Fp()(),Bv=Ni(),Hv=eo(),ao=Fv?Symbol.toStringTag:null;Hp.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 Hv("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");ao&&(n||!Bv(t,ao))&&(Bp?Bp(t,ao,{configurable:!o,enumerable:!1,value:r,writable:!1}):t[ao]=r)},"setToStringTag")});var qp=b((qU,Zp)=>{"use strict";var Vv=Function.prototype.call,Zv=Object.prototype.hasOwnProperty,qv=Lt();Zp.exports=qv.call(Vv,Zv)});var Wp=b((GU,Gp)=>{"use strict";Gp.exports=function(e,t){return Object.keys(t).forEach(function(r){e[r]=e[r]||t[r]}),e}});var Xp=b((WU,Jp)=>{"use strict";var Bi=Qc(),Gv=require("util"),Li=require("path"),Wv=require("http"),Kv=require("https"),Jv=require("url").parse,Xv=require("fs"),Yv=require("stream").Stream,Qv=require("crypto"),ji=ol(),e_=xl(),t_=Vp(),st=qp(),Fi=Wp();function Kp(e){return String(e).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}i(Kp,"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");Gv.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 Yv))&&(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)):Xv.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="'+Kp(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="'+Kp(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="--------------------------"+Qv.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}e_.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=Jv(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=Kv.request(n):r=Wv.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]"};t_(X.prototype,"FormData");Jp.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")},P=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:P,z:i(function(j){var A=-j.utcOffset(),E=Math.abs(A),O=Math.floor(E/60),S=E%60;return(A<=0?"+":"-")+P(O,2,"0")+":"+P(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 f_={};po(f_,{microsoft365Planner:()=>d_});module.exports=ie(f_);var fd=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 he(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(he,"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 md=$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 hd=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=hd(Wt),yd=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=yd(Wt),vd=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=vd(Wt),_d=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=_d(Wt);var Pd="(?:(?:\\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])))",xd=new RegExp(`^${Pd}$`);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=[])}),bd={number:"number",bigint:"bigint",object:"date"};var aa=w("$ZodCheckGreaterThan",(e,t)=>{Ye.init(e,t);let r=bd[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)}}he(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 Td(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(Td,"normalizeDef");function Ed(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(Ed,"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(()=>Td(t));he(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?Ed(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),he(e._zod,"optin",()=>t.options.some(o=>o._zod.optin==="optional")?"optional":void 0),he(e._zod,"optout",()=>t.options.some(o=>o._zod.optout==="optional")?"optional":void 0),he(e._zod,"values",()=>{if(t.options.every(o=>o._zod.values))return new Set(t.options.flatMap(o=>Array.from(o._zod.values)))}),he(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;he(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",he(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),he(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),he(e._zod,"optin",()=>t.innerType._zod.optin),he(e._zod,"optout",()=>t.innerType._zod.optout),he(e._zod,"pattern",()=>{let r=t.innerType._zod.pattern;return r?new RegExp(`^(${wr(r.source)}|null)$`):void 0}),he(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),he(e._zod,"values",()=>t.in._zod.values),he(e._zod,"optin",()=>t.in._zod.optin),he(e._zod,"optout",()=>t.out._zod.optout),he(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 ye=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),ye.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 Ud=w("ZodMiniURL",(e,t)=>{ha.init(e,t),Xa.init(e,t)});function Ya(e){return La(Ud,e)}i(Ya,"url");var Lr=w("ZodMiniNumber",(e,t)=>{xo.init(e,t),ye.init(e,t)});function be(e){return ja(Lr,e)}i(be,"number");var Md=w("ZodMiniNumberFormat",(e,t)=>{ya.init(e,t),Lr.init(e,t)});function Qa(e){return Ba(Md,e)}i(Qa,"int");var Ao=w("ZodMiniBoolean",(e,t)=>{bo.init(e,t),ye.init(e,t)});function Y(e){return Ha(Ao,e)}i(Y,"boolean");var es=w("ZodMiniBigInt",(e,t)=>{va.init(e,t),ye.init(e,t)});var Ld=w("ZodMiniAny",(e,t)=>{_a.init(e,t),ye.init(e,t)});function Yt(){return qa(Ld)}i(Yt,"any");var jd=w("ZodMiniUnknown",(e,t)=>{Pa.init(e,t),ye.init(e,t)});function U(){return Ga(jd)}i(U,"unknown");var Fd=w("ZodMiniVoid",(e,t)=>{xa.init(e,t),ye.init(e,t)});function ts(e){return Wa(Fd,e)}i(ts,"_void");var rs=w("ZodMiniDate",(e,t)=>{ba.init(e,t),ye.init(e,t)});var Bd=w("ZodMiniArray",(e,t)=>{Ta.init(e,t),ye.init(e,t)});function F(e,t){return new Bd({type:"array",element:e,...ne(t)})}i(F,"array");var Hd=w("ZodMiniObject",(e,t)=>{Ea.init(e,t),ye.init(e,t),he(e,"shape",()=>t.shape)});function m(e,t){let r={type:"object",shape:e??{},...ne(t)};return new Hd(r)}i(m,"object");var Vd=w("ZodMiniUnion",(e,t)=>{To.init(e,t),ye.init(e,t)});function B(e,t){return new Vd({type:"union",options:e,...ne(t)})}i(B,"union");var Zd=w("ZodMiniDiscriminatedUnion",(e,t)=>{Ia.init(e,t),ye.init(e,t)});function et(e,t,r){return new Zd({type:"union",options:t,discriminator:e,...ne(r)})}i(et,"discriminatedUnion");var qd=w("ZodMiniRecord",(e,t)=>{Aa.init(e,t),ye.init(e,t)});function M(e,t,r){return new qd({type:"record",keyType:e,valueType:t,...ne(r)})}i(M,"record");var Gd=w("ZodMiniEnum",(e,t)=>{Sa.init(e,t),ye.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 Gd({type:"enum",entries:r,...ne(t)})}i(W,"_enum");var Wd=w("ZodMiniLiteral",(e,t)=>{$a.init(e,t),ye.init(e,t)});function k(e,t){return new Wd({type:"literal",values:Array.isArray(e)?e:[e],...ne(t)})}i(k,"literal");var Kd=w("ZodMiniTransform",(e,t)=>{wa.init(e,t),ye.init(e,t)});function tt(e){return new Kd({type:"transform",transform:e})}i(tt,"transform");var Jd=w("ZodMiniOptional",(e,t)=>{Oa.init(e,t),ye.init(e,t)});function _(e){return new Jd({type:"optional",innerType:e})}i(_,"optional");var Xd=w("ZodMiniNullable",(e,t)=>{za.init(e,t),ye.init(e,t)});function Qt(e){return new Xd({type:"nullable",innerType:e})}i(Qt,"nullable");var Yd=w("ZodMiniPipe",(e,t)=>{Ra.init(e,t),ye.init(e,t)});function rt(e,t){return new Yd({type:"pipe",in:e,out:t})}i(rt,"pipe");var Qd=w("ZodMiniCustom",(e,t)=>{ka.init(e,t),ye.init(e,t)});function jr(e,t){return Ja(Qd,e??(()=>!0),t)}i(jr,"custom");var er={};po(er,{bigint:()=>af,boolean:()=>of,date:()=>sf,number:()=>nf,string:()=>rf});function rf(e){return Ma(Mr,e)}i(rf,"string");function nf(e){return Fa(Lr,e)}i(nf,"number");function of(e){return Va(Ao,e)}i(of,"boolean");function af(e){return Za(es,e)}i(af,"bigint");function sf(e){return Ka(rs,e)}i(sf,"date");var $o=m({retryOnFailure:m({defaultValue:_(Y()),hide:_(Y())}),continueOnFailure:m({defaultValue:_(Y()),hide:_(Y())})}),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 Q=m({displayName:c(),description:_(c())}),q=i((e,t)=>m({type:k(t),required:Y(),defaultValue:_(Yt())}),"TPropertyValue");var Se=m({...Q.shape,...q(c(),"SHORT_TEXT").shape}),Be=m({...Q.shape,...q(c(),"LONG_TEXT").shape});var os=m({label:c(),value:U()}),Fr=m({disabled:_(Y()),placeholder:_(c()),options:F(os)});var $e=m({...Q.shape,options:Fr,...q(U(),"STATIC_DROPDOWN").shape}),He=m({...Q.shape,options:Fr,...q(F(U()),"STATIC_MULTI_SELECT_DROPDOWN").shape});var wo=m({...Q.shape,...q(U(),"DROPDOWN").shape,refreshers:F(c())}),tr=m({...Q.shape,...q(F(U()),"MULTI_SELECT_DROPDOWN").shape,refreshers:F(c())});var Ve=m({...Q.shape,...q(Y(),"CHECKBOX").shape});var Ze=m({...Q.shape,...q(be(),"NUMBER").shape});var rr=m({...Q.shape,streaming:_(Y()),...q(U(),"FILE").shape});var nr=m({...Q.shape,...q(c(),"DATE_TIME").shape});var is=M(c(),B([Se,Be,$e,tr,He,Ve,Ze,rr,nr])),or=m({...Q.shape,properties:is,...q(F(U()),"ARRAY").shape});var ir=m({...Q.shape,...q(B([M(c(),U())]),"JSON").shape});var as=B([Se,$e,ir,or,He]),cf=M(c(),as),Oo=m({refreshers:F(c()),...Q.shape,...q(U(),"DYNAMIC").shape});var Br=m({...Q.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=(P=>(P.ARTIFICIAL_INTELLIGENCE="ARTIFICIAL_INTELLIGENCE",P.COMMUNICATION="COMMUNICATION",P.COMMERCE="COMMERCE",P.CORE="CORE",P.UNIVERSAL_AI="UNIVERSAL_AI",P.FLOW_CONTROL="FLOW_CONTROL",P.BUSINESS_INTELLIGENCE="BUSINESS_INTELLIGENCE",P.ACCOUNTING="ACCOUNTING",P.PRODUCTIVITY="PRODUCTIVITY",P.CONTENT_AND_FILES="CONTENT_AND_FILES",P.DEVELOPER_TOOLS="DEVELOPER_TOOLS",P.CUSTOMER_SUPPORT="CUSTOMER_SUPPORT",P.FORMS_AND_SURVEYS="FORMS_AND_SURVEYS",P.HUMAN_RESOURCES="HUMAN_RESOURCES",P.PAYMENT_PROCESSING="PAYMENT_PROCESSING",P.MARKETING="MARKETING",P.SALES_AND_CRM="SALES_AND_CRM",P))(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||{}),lf=m({strategy:W(cr),paramName:_(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:_(be()),body:_(U()),headers:_(M(c(),c()))}),us=m({type:k("DELAY"),resumeDateTime:c(),requestIdToReply:_(c()),handlerId:_(c()),streamStepProgress:_(W(Hr))}),cs=m({type:k("WEBHOOK"),requestId:c(),requestIdToReply:_(c()),response:ss,handlerId:_(c()),streamStepProgress:_(W(Hr))}),pf=B([us,cs]);var df=m({body:U(),rawBody:_(U()),headers:M(c(),c()),queryParams:M(c(),c())});function ge(e){return e==null}i(ge,"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 ff=128,pt,bt,mf=i(e=>{!pt||pt.length<e?(pt=Buffer.allocUnsafe(e*ff),Ro.default.randomFillSync(pt),bt=0):bt+e>pt.length&&(Ro.default.randomFillSync(pt),bt=0),bt+=e},"fillPool"),gf=i(e=>(mf(e|=0),pt.subarray(bt-e,bt)),"random"),hf=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)=>hf(e,t,gf),"customAlphabet");var yf="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",ds=21,G$=c().check(Qe(new RegExp(`^[0-9a-zA-Z]{${ds}}$`))),vf=ps(yf,ds);var nt=rt(tt(e=>e instanceof Date?e.toISOString():e),c()),Oe={id:c(),created:nt,updated:nt},ae=i(e=>_(Qt(e)),"Nullable");function ko(e){return _(Qt(W(e)))}i(ko,"NullableEnum");var J$=rt(tt(e=>e==="true"||e===!0?!0:e==="false"||e===!1?!1:void 0),_(Y())),Zr=i(e=>rt(tt(t=>Array.isArray(t)?t:t!==void 0?[t]:void 0),_(F(e))),"OptionalArrayFromQuery");var Q$=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 pw=c().check(Qe(/^#[0-9A-Fa-f]{6}$/));var fw=m({filename:c(),data:U(),type:k("file"),mimetype:_(c())});var _f=Ne(ms());var Pw=m({...Oe,name:c(),permissions:F(c()),platformId:ae(c()),type:c(),userCount:_(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 Pf=m({mode:W(gs),value:U()}),xf=m({auth:_(c()),fields:M(c(),Pf)}),bf=m({pieceName:c(),pieceVersion:c(),actionName:c(),predefinedInput:_(xf)}),Tf=m({type:k("PIECE"),toolName:c().check(ke(1)),pieceMetadata:bf}),Ef=m({type:k("none")}),If=m({type:k("access_token"),accessToken:c()}),Af=m({type:k("api_key"),apiKey:c(),apiKeyHeader:c()}),Sf=m({type:k("headers"),headers:M(c(),c())}),$f=et("type",[Ef,If,Af,Sf]),hs=m({type:k("FLOW"),toolName:c().check(ke(1)),externalFlowId:c(),flowDisplayName:_(c())}),ys=m({type:k("MCP"),toolName:c().check(ke(1)),serverUrl:Ya(),protocol:W(Co),auth:$f}),vs=m({type:k("KNOWLEDGE_BASE"),toolName:c().check(ke(1)),sourceType:W(Do),sourceId:c(),sourceName:c()}),wf=et("type",[Tf,hs,ys,vs]),Of=m({displayName:c(),description:_(c()),type:W(No)}),_s=m({type:k("MARKDOWN"),markdown:c()}),Tt={type:k("TOOL_CALL"),input:ae(M(c(),U())),output:_(U()),toolName:c(),status:W(Uo),toolCallId:c(),startTime:c(),endTime:_(c())},Xw=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()})]),zf=B([_s,Ps]);var Mo=(r=>(r.IMAGE="image",r.TEXT="text",r))(Mo||{}),qe=m({apiKey:c()}),Rf=qe,kf=m({apiKey:c(),apiKeyHash:c()}),Df=qe,Cf=qe,Nf=qe,Uf=qe,Mf=qe,Lf=qe,jf=qe,Is=m({accessKeyId:c().check(ke(1)),secretAccessKey:c().check(ke(1))}),Ff=m({}),Bf=m({}),Hf=m({}),Vf=m({}),Zf=m({}),qf=m({}),As=m({modelId:c(),modelName:c(),modelType:W(Mo)}),Ss=m({apiKeyHeader:c(),baseUrl:c(),models:F(As),defaultHeaders:_(M(c(),c()))}),$s=m({accountId:c(),gatewayId:c(),models:F(As),vertexProject:_(c()),vertexRegion:_(c())}),ws=m({resourceName:c(),apiVersion:rt(tt(e=>typeof e=="string"&&e.trim().length===0?void 0:e),_(c()))}),Os=m({region:c().check(ke(1))}),Gf=B([Rf,Nf,Uf,Mf,Lf,Cf,Df,kf,Is,jf]),zs=B([Ss,$s,ws,Os,Ff,Hf,Vf,Zf,Bf,qf]),Wf=m({id:c(),name:c(),type:W(Mo)}),Kf=m({id:c(),name:c(),provider:W(dr),config:zs,enabledForChat:Y()}),Jf=m({provider:W(dr),config:zs,auth:Gf,platformId:c()});var tO={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"],Xf=["claude-sonnet-4-6","claude-opus-4-7","claude-haiku-4-5"],Yf=["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"],Qf=["grok-4.20","grok-4.1-fast"],em={openai:xs,anthropic:Xf,google:bs,activepieces:[...Yf.map(e=>`anthropic/${e}`),...xs.map(e=>`openai/${e}`),...bs.map(e=>`google/${e}`),...Qf.map(e=>`x-ai/${e}`)]};var Ts=128e3,tm={openai:128e3,anthropic:2e5,google:1048576,bedrock:2e5,azure:128e3,openrouter:128e3,activepieces:2e5,mistral:128e3};function rm({provider:e}){return e?tm[e]??Ts:Ts}i(rm,"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"},nm={anthropic:"native",google:"native",openrouter:"plugin",activepieces:"plugin"},om=new Set(["anthropic","mistral"]);function Le(e){return{chatModels:em[e],maxContextTokens:rm({provider:e}),defaultEmbeddingModel:Es[e],supportsEmbedding:Es[e]!==void 0,supportsImageGeneration:!om.has(e),webSearch:nm[e]}}i(Le,"buildProviderCapabilities");var im={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 am=m({base64Url:c(),fileName:c(),extension:_(c())}),sm=m({mimeType:c(),url:c(),fileName:_(c())}),Lo=B([am,sm]);var um=B([m({type:k("file"),value:Lo}),m({type:k("markdown"),value:c(),files:_(F(Lo))})]),cm=m({sessionId:c(),message:c(),files:_(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 lm=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()})]),pm=m({...Oe,name:c(),folderId:ae(c()),projectId:c(),externalId:c(),status:ko(Ds),trigger:ko(ks)}),dm=m({...Oe,tableId:c(),projectId:c(),cells:M(c(),m({updated:c(),created:c(),value:U(),fieldName:c()}))}),fm=m({events:F(W(jo)),webhookUrl:c(),flowId:c()}),mm=m({fields:F(m({id:c(),name:c()})),rows:F(M(c(),c())),name:c()}),gm=m({projectId:c(),limit:_(er.number()),cursor:_(c()),name:_(c()),externalIds:Zr(c()),folderId:_(c()),folderIds:Zr(c())}),hm=m({records:F(F(m({fieldId:c(),value:Ns()}))),tableId:c()}),ym=m({cells:_(F(m({fieldId:c(),value:Ns()}))),tableId:c(),agentUpdate:_(Y())}),Cs=et("operator",[dt("eq"),dt("neq"),dt("gt"),dt("gte"),dt("lt"),dt("lte"),dt("co"),Rs("exists"),Rs("not_exists")]),vm=m({tableId:c(),limit:_(er.number()),cursor:_(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 _m=m({status:_(be()),body:_(U()),headers:_(M(c(),c()))}),Pm=m({...Oe,deleted:ae(nt),ownerId:c(),displayName:c(),platformId:c(),externalId:ae(c())});var Us=m({name:c(),description:_(c()),type:c(),required:Y()}),xm=m({pieceName:c(),triggerName:c(),input:m({toolName:c(),toolDescription:c(),inputSchema:F(Us),returnsResponse:Y()})});var Ms="^[0-9]+\\.[0-9]+\\.[0-9]+$",PO=new RegExp(Ms),Tm="^([~^])?[0-9]+\\.[0-9]+\\.[0-9]+$",xO=c().check(Qe(new RegExp(Ms))),bO=c().check(Qe(new RegExp(Tm))),Em=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()}),TO=B([Ls,js]),EO=B([Em,Ls,js]);var Im=et("type",[m({type:k("CRON_EXPRESSION"),cronExpression:c(),timezone:c()}),m({type:k("INTERVAL"),intervalMs:Qa().check(Nr(6e4))})]),IO=m({...Oe,type:W(Me),projectId:c(),flowId:c(),triggerName:c(),schedule:ae(Im),flowVersionId:c(),pieceName:c(),pieceVersion:c(),deleted:ae(c()),simulate:Y()}),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||{}),AO=m({...Oe,projectId:ae(c()),platformId:ae(c()),type:W(Fs),compression:W(Bs),data:_(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||{}),SO=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({...Q.shape,...q(M(c(),U()),"OBJECT").shape});var Ks=m({...Q.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:_(c()),hasConnectionIdentifier:_(Y())});var Js=m({username:c(),password:c()}),Ho=m({...je.shape,username:m({displayName:c(),description:_(c())}),password:m({displayName:c(),description:_(c())}),...q(Js,"BASIC_AUTH").shape});var wm=M(c(),B([Se,Be,Ze,Ve,$e])),Vo=m({...je.shape,props:wm,...q(U(),"CUSTOM_AUTH").shape});var ft=m({...je.shape,...q(m({auth:c()}),"SECRET_TEXT").shape});var Om=M(c(),B([Se,Be,ft,Ze,Ve,$e,He,Br])),Xs=m({...je.shape,props:Om,...q(U(),"OIDC").shape});var Zo=(r=>(r.HEADER="HEADER",r.BODY="BODY",r))(Zo||{}),Ys=B([Se,ft,$e]),Qs=M(c(),Ys),zm=m({props:_(M(c(),Ys)),authUrl:c(),tokenUrl:c(),scope:F(c()),prompt:_(B([k("none"),k("consent"),k("login"),k("omit")])),pkce:_(Y()),pkceMethod:_(B([k("plain"),k("S256")])),authorizationMethod:_(W(Zo)),grantType:_(B([W(ur),k(zo)])),extra:_(M(c(),c()))}),eu=m({access_token:c(),props:_(Qs),data:M(c(),Yt())}),qo=m({...je.shape,...zm.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 iR={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 Rm=m({...Q.shape,...q(U(),"CUSTOM").shape,code:c()});var km=B([Bo,Et]),Wo=M(c(),km),IR=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,P,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=P;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,ge(e.sampleData)&&ge(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");(!Cm(d)||Nm(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:Dm(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}},ou=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 Dm(e){if(e!==void 0)return Array.isArray(e)?e.map(nu):nu(e)}i(Dm,"withConnectionIdentifierFlag");function nu(e){return{...e,hasConnectionIdentifier:e.getConnectionIdentifier!==void 0}}i(nu,"flagConnectionIdentifier");function Cm(e){return/^\d+\.\d+\.\d+$/.test(e)}i(Cm,"isValidSimpleSemver");function Nm(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(Nm,"isSemverLessThan");var Um=_(M(c(),M(c(),c()))),iu=m({id:_(c()),name:c(),displayName:c(),logoUrl:c(),description:c(),authors:F(c()),platformId:_(c()),directoryPath:_(c()),auth:_(B([Et,F(Et)])),version:c(),categories:_(F(W(sr))),minimumSupportedRelease:_(c()),maximumSupportedRelease:_(c()),deprecated:_(Y()),i18n:Um}),Mm=W(["human","ai","both"]),au=m({description:_(c()),idempotent:_(Y())}),su=m({name:c(),displayName:c(),description:c(),props:Wo,requireAuth:Y(),errorHandlingOptions:_($o),outputSchema:_(jr()),audience:_(Mm),aiMetadata:_(au)}),uu=m({name:c(),displayName:c(),description:c(),props:Wo,errorHandlingOptions:_($o),type:W(Me),sampleData:U(),handshakeConfiguration:_(jr()),renewConfiguration:_(tu),testStrategy:W(lr),outputSchema:_(jr()),aiMetadata:_(au)}),Lm=m({...iu.shape,actions:M(c(),su),triggers:M(c(),uu)}),jm=m({...iu.shape,actions:be(),triggers:be(),suggestedActions:_(F(su)),suggestedTriggers:_(F(uu))}),cu=m({projectUsage:be(),pieceType:W(xt),packageType:W(ar),platformId:_(c()),archiveId:_(c())}),Ik=m({...Lm.shape,...cu.shape}),Ak=m({...jm.shape,...cu.shape}),Sk=m({name:c(),version:c()});var Fm=Ne(require("path")),Bm=Ne(require("fs/promises"));var mr="login.microsoftonline.com",pu="login.microsoftonline.us",lu={[mr]:"https://graph.microsoft.com",[pu]:"https://graph.microsoft.us"},du=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:pu}]}});function fu(e){return e??mr}i(fu,"resolveCloudHost");function St(e){return fu(e.props?.cloud)}i(St,"getMicrosoftCloudFromAuth");function $t(e){let t=fu(e);return lu[t]??lu[mr]}i($t,"getGraphBaseUrl");var wc=Ne($c());var uy=`
|
|
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=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 ${
|
|
10
|
+
- User.Read`,K=Go.OAuth2({description:uy,props:{cloud:du},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","openid","email","profile"],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 wc.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 Oc=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 zc=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 Rc=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:Oc({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 kc=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 Dc=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 Cc=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 Nc=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 Uc=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 Mc=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 Lc=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 jc=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 Fc=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 Zc=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 Bc({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(Bc,"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}=cy(t.method)?ly(t.body,a):{body:void 0,extraHeaders:{},isStream:!1},y=dy({...a,...l}),h=await py(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),P=g?300:400;if(h.status<200||h.status>=P){let H=await Hc(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 Hc(h,d);return{status:h.status,headers:fy(h.headers),body:T}}};function cy(e){return e!=="GET"&&e!=="HEAD"}i(cy,"acceptsRequestBody");function ly(e,t){if(gy(e))return{body:void 0,extraHeaders:{},isStream:!1};if(my(e)){let n=new Zc.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(ly,"serializeBody");async function Hc(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(Hc,"parseResponseBody");async function py(e,t){let r;for(let n=0;n<=t;n++)try{let o=await e();if(o.status>=500&&n<t){await Vc(n);continue}return o}catch(o){if(r=o,n<t){await Vc(n);continue}throw o}throw r}i(py,"sendWithRetries");function Vc(e){let t=Math.min(1e3*2**e,3e4);return new Promise(r=>setTimeout(r,t))}i(Vc,"backoff");function dy(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(dy,"normalizeHeaders");function fy(e){let t={};return e.forEach((r,n)=>{t[n]=r}),t}i(fy,"toHttpHeaders");function my(e){return typeof e=="object"&&e!==null&&typeof e.getHeaders=="function"&&typeof e.pipe=="function"&&typeof e.on=="function"}i(my,"isNodeFormData");function gy(e){return e==null}i(gy,"isNil");var qc=new Xn;var r_=Ne(require("fs")),Yp=Ne(Xp());var n_={"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 o_(e){let t=e.split(";")[0].trim().toLowerCase();return n_[t]??""}i(o_,"contentTypeToExtension");var i_=i(({baseUrl:e,relativePath:t})=>{let r=e.endsWith("/")?e:`${e}/`,n=t.startsWith("/")?t.slice(1):t;return`${r}${n}`},"joinBaseUrlWithRelativePath"),a_=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 Qp({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 ${a_(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:P,response_is_binary:T,followRedirects:H}=d.propsValue;Vr(g,"Method"),Vr(x,"URL");let fe=ge(r)?{}:await r(d.auth,d.propsValue),xe=x.url,Ce=xe.startsWith("http://")||xe.startsWith("https://")?xe:i_({baseUrl:t(d.auth),relativePath:xe}),ee={method:g,url:Ce,headers:{...v??{},...p==="headers"||!ge(p)?fe:{}},queryParams:{...p==="queryParams"?fe:{},...l??{}},timeout:P?P*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 Yp.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 qc.sendRequest(ee);return await s_(d.files,G.body,G.status,G.headers,T)}catch(G){if(h)return Bc({error:G,requestBody:ee.body});throw G}},"run")})}i(Qp,"createCustomApiCallAction");var s_=i(async(e,t,r,n,o)=>{let a;if(o&&u_(t)){let s=Array.isArray(n?.["content-type"])?n["content-type"][0]:n?.["content-type"],u=o_(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"),u_=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(ge(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=[];ge(u)||d==-1?g=p??[]:g=p?.slice(0,d)??[],ge(o)||(g=g.slice(-o));let x=g?.[0]?.id;return ge(x)||await t.put("lastItem",x),g.map(v=>v.data)}}},async onEnable(e,{store:t,auth:r,propsValue:n,server:o,isRepublish:a}){switch(e.strategy){case 0:{if(a&&!ge(await t.get("lastPoll")))break;await t.put("lastPoll",Date.now());break}case 1:{if(a&&!ge(await t.get("lastItem")))break;let u=(await e.items({store:t,auth:r,propsValue:n,lastItemId:null,server:o}))?.[0]?.id;ge(u)?await t.delete("lastItem"):await t.put("lastItem",u);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 c_(s.map(u=>u.data))}};function c_(e){return e.length<=5?e:e.slice(0,5)}i(c_,"getFirstFiveOrAll");var td=Ne(so());var uo={strategy:0,items:i(async({auth:e})=>(await I.listPlans({auth:e})).map(r=>({epochMilliSeconds:(0,td.default)(r.createdDateTime).valueOf(),data:r})),"items")},rd=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 nd=Ne(so());var l_={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,nd.default)(o.createdDateTime).valueOf(),data:o}))},"items")},od=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:l_,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 id=Ne(so());var p_={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,id.default)(n.createdDateTime).valueOf(),data:n})):[],"items")},ad=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:p_,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 d_=ou({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:[Rc,zc,kc,Dc,Cc,jc,Lc,Fc,Nc,Mc,Uc,Qp({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:[rd,ad,od]});0&&(module.exports={microsoft365Planner});
|
|
12
12
|
/*! Bundled license information:
|
|
13
13
|
|
|
14
14
|
mime-types/index.js:
|