UNPKG

@azure/functions

Version:
2 lines 48.9 kB
(()=>{"use strict";var e={8157:function(e,t,n){var r,o,i,s=this&&this.__classPrivateFieldSet||function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},a=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.InvocationContext=void 0;const u=n(5396);t.InvocationContext=class{constructor(e){var t,n,o,i;r.set(this,void 0),e=e||{};const a="unknown";this.invocationId=e.invocationId||a,this.functionName=e.functionName||a,this.extraInputs=new c,this.extraOutputs=new l,this.retryContext=e.retryContext,this.traceContext=e.traceContext,this.triggerMetadata=e.triggerMetadata,this.options={trigger:(null===(t=e.options)||void 0===t?void 0:t.trigger)||{name:a,type:a},return:null===(n=e.options)||void 0===n?void 0:n.return,extraInputs:(null===(o=e.options)||void 0===o?void 0:o.extraInputs)||[],extraOutputs:(null===(i=e.options)||void 0===i?void 0:i.extraOutputs)||[]},s(this,r,e.logHandler||u.fallbackLogHandler,"f")}log(...e){a(this,r,"f").call(this,"information",...e)}trace(...e){a(this,r,"f").call(this,"trace",...e)}debug(...e){a(this,r,"f").call(this,"debug",...e)}info(...e){a(this,r,"f").call(this,"information",...e)}warn(...e){a(this,r,"f").call(this,"warning",...e)}error(...e){a(this,r,"f").call(this,"error",...e)}},r=new WeakMap;class c{constructor(){o.set(this,{})}get(e){const t="string"==typeof e?e:e.name;return a(this,o,"f")[t]}set(e,t){const n="string"==typeof e?e:e.name;a(this,o,"f")[n]=t}}o=new WeakMap;class l{constructor(){i.set(this,{})}get(e){const t="string"==typeof e?e:e.name;return a(this,i,"f")[t]}set(e,t){const n="string"==typeof e?e:e.name;a(this,i,"f")[n]=t}}i=new WeakMap},6691:function(e,t,n){var r,o,i,s,a,u,c,l,f,p,d=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},h=this&&this.__classPrivateFieldSet||function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},y=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.InvocationModel=void 0;const v=n(8354),g=n(6921),b=n(5521),m=n(1776),w=n(4714),x=n(679),P=n(917),O=n(5064),j=n(4454),C=n(725),S=n(2337),_=n(7992),T=n(8157),k=n(337),E=n(9898),H=n(9168);t.InvocationModel=class{constructor(e){r.add(this),o.set(this,!1),i.set(this,void 0),s.set(this,void 0),a.set(this,void 0),u.set(this,void 0),h(this,i,e,"f"),h(this,s,(0,H.nonNullProp)(e.metadata,"name"),"f"),h(this,a,(0,H.nonNullProp)(e.metadata,"bindings"),"f");const t=(0,H.nonNullValue)(Object.values(y(this,a,"f")).find((e=>(0,E.isTrigger)(e.type))),"triggerBinding");h(this,u,(0,H.nonNullProp)(t,"type"),"f")}getArguments(){return d(this,void 0,void 0,(function*(){const e=y(this,i,"f").request,t=new T.InvocationContext({invocationId:(0,H.nonNullProp)(y(this,i,"f"),"invocationId"),functionName:y(this,s,"f"),logHandler:(e,...t)=>y(this,r,"m",p).call(this,e,...t),retryContext:(0,m.fromRpcRetryContext)(e.retryContext),traceContext:(0,m.fromRpcTraceContext)(e.traceContext),triggerMetadata:(0,w.fromRpcTriggerMetadata)(e.triggerMetadata,y(this,u,"f")),options:(0,b.fromRpcBindings)(y(this,a,"f"))}),n=[];if(e.inputData)for(const r of e.inputData){const o=(0,H.nonNullProp)(r,"name"),s=y(this,a,"f")[o];if(!s)throw new C.AzFuncSystemError(`Failed to find binding "${o}" in bindings "${Object.keys(y(this,a,"f")).join(", ")}".`);const u=s.type;let c;if((0,E.isHttpTrigger)(u)&&k.enableHttpStream){const t=yield(0,S.waitForProxyRequest)(y(this,i,"f").invocationId);c=(0,_.createStreamRequest)(t,(0,H.nonNullProp)(e,"triggerMetadata"))}else c=(0,x.fromRpcTypedData)(r.data);(0,E.isTimerTrigger)(u)&&(c=(0,P.toCamelCaseValue)(c)),(0,E.isTrigger)(u)?n.push(c):t.extraInputs.set(o,c)}return{context:t,inputs:n}}))}invokeFunction(e,t,n){return d(this,void 0,void 0,(function*(){try{return yield Promise.resolve(n(...t,e))}finally{h(this,o,!0,"f")}}))}getResponse(e,t){return d(this,void 0,void 0,(function*(){const n={invocationId:y(this,i,"f").invocationId,outputData:[]};let o=!1;for(const[i,s]of Object.entries(y(this,a,"f")))if("out"===s.direction)if(i===g.returnBindingKey)n.returnValue=yield y(this,r,"m",c).call(this,e.invocationId,s,t),o=!0;else{const t=yield y(this,r,"m",c).call(this,e.invocationId,s,e.extraOutputs.get(i));(0,H.isDefined)(t)&&n.outputData.push({name:i,data:t})}return o||(0,E.isHttpTrigger)(y(this,u,"f"))||(n.returnValue=(0,j.toRpcTypedData)(t)),n}))}},o=new WeakMap,i=new WeakMap,s=new WeakMap,a=new WeakMap,u=new WeakMap,r=new WeakSet,c=function(e,t,n){var r;return d(this,void 0,void 0,(function*(){return"http"===(null===(r=t.type)||void 0===r?void 0:r.toLowerCase())?(0,O.toRpcHttp)(e,n):(0,j.toRpcTypedData)(n)}))},l=function(e,t,...n){y(this,i,"f").log(e,t,(0,v.format)(...n))},f=function(e,...t){y(this,r,"m",l).call(this,e,"system",...t)},p=function(e,...t){if(y(this,o,"f")&&"postInvocationHooks"!==y(this,i,"f").state){let e="Warning: Unexpected call to 'log' on the context object after function execution has completed. Please check for asynchronous calls that are not awaited. ";e+=`Function name: ${y(this,s,"f")}. Invocation Id: ${y(this,i,"f").invocationId}.`,y(this,r,"m",f).call(this,"warning",e)}y(this,r,"m",l).call(this,e,"user",...t)}},520:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ProgrammingModel=void 0;const o=n(6921),i=n(2337),s=n(6691),a=n(337);t.ProgrammingModel=class{constructor(){this.name="@azure/functions",this.version=o.version}getInvocationModel(e){return new s.InvocationModel(e)}getCapabilities(e){return r(this,void 0,void 0,(function*(){if((0,a.lockSetup)(),a.enableHttpStream){const t=yield(0,i.setupHttpProxy)();e.HttpUri=t}return Object.assign(e,a.capabilities),e}))}}},6693:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.addBindingName=void 0;const r=n(4169);t.addBindingName=function(e,t){if(!e.name){let n=e.type;n.toLowerCase().endsWith(t.toLowerCase())||(n+=t),e.name=n+(0,r.getStringHash)(JSON.stringify(e))}return e}},1859:function(e,t,n){var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.generic=t.webPubSub=t.mySql=t.sql=t.warmup=t.cosmosDB=t.eventGrid=t.eventHub=t.serviceBusTopic=t.serviceBusQueue=t.storageQueue=t.storageBlob=t.timer=t.http=t.deleteRequest=t.patch=t.post=t.put=t.get=t.setup=t.hook=void 0;const o=n(2757),i=n(811),s=n(520),a=n(2888),u=n(3476);t.hook=n(6765);var c=n(337);Object.defineProperty(t,"setup",{enumerable:!0,get:function(){return c.setup}});let l=!1;function f(e,t){const n="function"==typeof e?{handler:e}:e;return n.methods=[t],n}function p(e,t){const{handler:n,return:o,trigger:i,extraInputs:s,extraOutputs:a,retry:u}=e,c=r(e,["handler","return","trigger","extraInputs","extraOutputs","retry"]);return{trigger:null!=i?i:t(c),return:o,retry:u,extraInputs:s,extraOutputs:a,handler:n}}function d(e,t){t.return||(t.return=i.http({})),h(e,p(t,a.http))}function h(e,t){l||function(){const e=(0,u.tryGetCoreApiLazy)();e?e.setProgrammingModel(new s.ProgrammingModel):console.warn('WARNING: Failed to detect the Azure Functions runtime. Switching "@azure/functions" package to test mode - not all features are supported.'),l=!0}();const n=(0,u.tryGetCoreApiLazy)();n?n.registerFunction((0,o.toCoreFunctionMetadata)(e,t),t.handler):console.warn(`WARNING: Skipping call to register function "${e}" because the "@azure/functions" package is in test mode.`)}t.get=function(e,t){d(e,f(t,"GET"))},t.put=function(e,t){d(e,f(t,"PUT"))},t.post=function(e,t){d(e,f(t,"POST"))},t.patch=function(e,t){d(e,f(t,"PATCH"))},t.deleteRequest=function(e,t){d(e,f(t,"DELETE"))},t.http=d,t.timer=function(e,t){h(e,p(t,a.timer))},t.storageBlob=function(e,t){h(e,p(t,a.storageBlob))},t.storageQueue=function(e,t){h(e,p(t,a.storageQueue))},t.serviceBusQueue=function(e,t){h(e,p(t,a.serviceBusQueue))},t.serviceBusTopic=function(e,t){h(e,p(t,a.serviceBusTopic))},t.eventHub=function(e,t){h(e,p(t,a.eventHub))},t.eventGrid=function(e,t){h(e,p(t,a.eventGrid))},t.cosmosDB=function(e,t){h(e,p(t,a.cosmosDB))},t.warmup=function(e,t){h(e,p(t,a.warmup))},t.sql=function(e,t){h(e,p(t,a.sql))},t.mySql=function(e,t){h(e,p(t,a.mySql))},t.webPubSub=function(e,t){h(e,p(t,a.webPubSub))},t.generic=h},6921:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.returnBindingKey=t.version=void 0,t.version="4.7.0",t.returnBindingKey="$return"},5521:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.fromRpcBindings=void 0;const r=n(6921),o=n(9898),i=n(9168);function s(e,t){return Object.assign(Object.assign({},t),{type:(0,i.nonNullProp)(t,"type"),name:e})}t.fromRpcBindings=function(e){let t,n;const a=[],u=[];for(const[c,l]of Object.entries((0,i.nonNullValue)(e,"bindings")))(0,o.isTrigger)(l.type)?t=s(c,l):c===r.returnBindingKey?n=s(c,l):"in"===l.direction?a.push(s(c,l)):"out"===l.direction&&u.push(s(c,l));return{trigger:(0,i.nonNullValue)(t,"trigger"),return:n,extraInputs:a,extraOutputs:u}}},1776:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.fromRpcTraceContext=t.fromRpcRetryContext=void 0;const r=n(9168);t.fromRpcRetryContext=function(e){if(e){const t={retryCount:(0,r.nonNullProp)(e,"retryCount"),maxRetryCount:(0,r.nonNullProp)(e,"maxRetryCount")};return e.exception&&(t.exception=function(e){const t={};return(0,r.copyPropIfDefined)(e,t,"message"),(0,r.copyPropIfDefined)(e,t,"source"),(0,r.copyPropIfDefined)(e,t,"stackTrace"),t}(e.exception)),t}},t.fromRpcTraceContext=function(e){if(e){const t={};return(0,r.copyPropIfDefined)(e,t,"traceParent"),(0,r.copyPropIfDefined)(e,t,"traceState"),e.attributes&&(t.attributes=e.attributes),t}}},5138:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.fromNullableMapping=void 0,t.fromNullableMapping=function(e,t){var n;let r={};if(e&&Object.keys(e).length>0)for(const t in e)r[t]=(null===(n=e[t])||void 0===n?void 0:n.value)||"";else t&&Object.keys(t).length>0&&(r=t);return r}},4714:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.fromRpcTriggerMetadata=void 0;const r=n(9898),o=n(679),i=n(917);t.fromRpcTriggerMetadata=function(e,t){if(e&&!(0,r.isHttpTrigger)(t)&&!(0,r.isTimerTrigger)(t)){const t={};for(const[n,r]of Object.entries(e))t[(0,i.toCamelCaseKey)(n)]=(0,i.toCamelCaseValue)((0,o.fromRpcTypedData)(r));return t}}},679:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.fromRpcTypedData=void 0;const r=n(7992),o=n(9168);function i(e){try{return JSON.parse(e)}catch(t){return e}}t.fromRpcTypedData=function(e){return e?(0,o.isDefined)(e.string)?i(e.string):(0,o.isDefined)(e.json)?JSON.parse(e.json):(0,o.isDefined)(e.bytes)?Buffer.from(e.bytes):(0,o.isDefined)(e.stream)?Buffer.from(e.stream):(0,o.isDefined)(e.http)?new r.HttpRequest(e.http):(0,o.isDefined)(e.int)?e.int:(0,o.isDefined)(e.double)?e.double:e.collectionBytes&&(0,o.isDefined)(e.collectionBytes.bytes)?e.collectionBytes.bytes.map((e=>Buffer.from(e))):e.collectionString&&(0,o.isDefined)(e.collectionString.string)?e.collectionString.string.map(i):e.collectionDouble&&(0,o.isDefined)(e.collectionDouble.double)?e.collectionDouble.double:e.collectionSint64&&(0,o.isDefined)(e.collectionSint64.sint64)?e.collectionSint64.sint64:void 0:void 0}},917:(e,t)=>{function n(e){return e.charAt(0).toLowerCase()+e.slice(1)}Object.defineProperty(t,"__esModule",{value:!0}),t.toCamelCaseKey=t.toCamelCaseValue=void 0,t.toCamelCaseValue=function e(t){if("object"!=typeof t||null===t)return t;if(Array.isArray(t))return t.map(e);{const r={};for(const[o,i]of Object.entries(t))r[n(o)]=e(i);return r}},t.toCamelCaseKey=n},2757:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.toCoreFunctionMetadata=void 0;const r=n(6921),o=n(725),i=n(9898),s=n(8360);t.toCoreFunctionMetadata=function(e,t){const n={},a=[],u=t.trigger;if(n[u.name]=Object.assign(Object.assign({},u),{direction:"in",type:(0,i.isTrigger)(u.type)?u.type:u.type+"Trigger"}),a.push(u.name),t.extraInputs)for(const e of t.extraInputs)n[e.name]=Object.assign(Object.assign({},e),{direction:"in"}),a.push(e.name);if(t.return&&(n[r.returnBindingKey]=Object.assign(Object.assign({},t.return),{direction:"out"}),a.push(r.returnBindingKey)),t.extraOutputs)for(const e of t.extraOutputs)n[e.name]=Object.assign(Object.assign({},e),{direction:"out"}),a.push(e.name);if(a.filter(((e,t)=>a.indexOf(e)!==t)).length>0)throw new o.AzFuncSystemError(`Duplicate bindings found for function "${e}". Remove a duplicate binding or manually specify the "name" property to make it unique.`);let c;return t.retry&&(c=Object.assign(Object.assign({},t.retry),{retryStrategy:t.retry.strategy,delayInterval:(0,s.toRpcDuration)(t.retry.delayInterval,"retry.delayInterval"),maximumInterval:(0,s.toRpcDuration)(t.retry.maximumInterval,"retry.maximumInterval"),minimumInterval:(0,s.toRpcDuration)(t.retry.minimumInterval,"retry.minimumInterval")})),{name:e,bindings:n,retryOptions:c}}},8360:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.toRpcDuration=void 0;const r=n(725),o=n(9168);t.toRpcDuration=function(e,t){if((0,o.isDefined)(e)){try{let t;if("object"==typeof e){const n=(e.minutes||0)+60*(e.hours||0),r=(e.seconds||0)+60*n;t=(e.milliseconds||0)+1e3*r}else"number"==typeof e&&(t=e);if((0,o.isDefined)(t)&&t>=0)return{seconds:Math.round(t/1e3)}}catch(e){}throw new r.AzFuncSystemError(`A 'number' or 'Duration' object was expected instead of a '${typeof e}'. Cannot parse value of '${t}'.`)}}},5064:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.toRpcHttp=void 0;const o=n(725),i=n(2337),s=n(8950),a=n(337),u=n(7866),c=n(4454);t.toRpcHttp=function(e,t){return r(this,void 0,void 0,(function*(){if(null==t)return t;if("object"!=typeof t)throw new o.AzFuncSystemError('The HTTP response must be an object with optional properties "body", "status", "headers", and "cookies".');const n=t instanceof s.HttpResponse?t:new s.HttpResponse(t);if(a.enableHttpStream)return void(yield(0,i.sendProxyResponse)(e,n));const r={};r.statusCode=n.status.toString(),r.headers={};for(const[e,t]of n.headers.entries())r.headers[e]=t;r.cookies=[];for(const e of n.cookies)r.cookies.push((0,u.toRpcHttpCookie)(e));r.enableContentNegotiation=n.enableContentNegotiation;const l=yield n.arrayBuffer();return r.body=(0,c.toRpcTypedData)(l),{http:r}}))}},7866:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.toRpcHttpCookie=void 0;const r=n(1705);t.toRpcHttpCookie=function(e){let t="none";if(e&&e.sameSite){const n=e.sameSite.toLocaleLowerCase();"lax"===n?t="lax":"strict"===n?t="strict":"none"===n&&(t="explicitNone")}return{name:e&&(0,r.toRpcString)(e.name,"cookie.name"),value:e&&(0,r.toRpcString)(e.value,"cookie.value"),domain:(0,r.toNullableString)(e&&e.domain,"cookie.domain"),path:(0,r.toNullableString)(e&&e.path,"cookie.path"),expires:(0,r.toNullableTimestamp)(e&&e.expires,"cookie.expires"),secure:(0,r.toNullableBool)(e&&e.secure,"cookie.secure"),httpOnly:(0,r.toNullableBool)(e&&e.httpOnly,"cookie.httpOnly"),sameSite:t,maxAge:(0,r.toNullableDouble)(e&&e.maxAge,"cookie.maxAge")}}},1705:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.toNullableTimestamp=t.toNullableString=t.toRpcString=t.toNullableDouble=t.toNullableBool=void 0;const r=n(725),o=n(9168);t.toNullableBool=function(e,t){if("boolean"==typeof e)return{value:e};if((0,o.isDefined)(e))throw new r.AzFuncSystemError(`A 'boolean' type was expected instead of a '${typeof e}' type. Cannot parse value of '${t}'.`)},t.toNullableDouble=function(e,t){if("number"==typeof e)return{value:e};if("string"==typeof e&&!isNaN(Number(e)))return{value:parseFloat(e)};if((0,o.isDefined)(e))throw new r.AzFuncSystemError(`A 'number' type was expected instead of a '${typeof e}' type. Cannot parse value of '${t}'.`)},t.toRpcString=function(e,t){if("string"==typeof e)return e;if((0,o.isDefined)(e))throw new r.AzFuncSystemError(`A 'string' type was expected instead of a '${typeof e}' type. Cannot parse value of '${t}'.`);return""},t.toNullableString=function(e,t){if("string"==typeof e)return{value:e};if((0,o.isDefined)(e))throw new r.AzFuncSystemError(`A 'string' type was expected instead of a '${typeof e}' type. Cannot parse value of '${t}'.`)},t.toNullableTimestamp=function(e,t){if((0,o.isDefined)(e))try{const t="number"==typeof e?e:e.getTime();if(t&&t>=0)return{value:{seconds:Math.round(t/1e3)}}}catch(n){throw new r.AzFuncSystemError(`A 'number' or 'Date' input was expected instead of a '${typeof e}'. Cannot parse value of '${t}'.`)}}},4454:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.toRpcTypedData=void 0,t.toRpcTypedData=function(e){return null==e?e:"string"==typeof e?{string:e}:Buffer.isBuffer(e)?{bytes:e}:ArrayBuffer.isView(e)?{bytes:new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}:e instanceof ArrayBuffer?{bytes:new Uint8Array(e)}:"number"==typeof e?Number.isInteger(e)?{int:e}:{double:e}:{json:JSON.stringify(e)}}},725:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isError=t.trySetErrorMessage=t.ensureErrorType=t.ReadOnlyError=t.AzFuncRangeError=t.AzFuncTypeError=t.AzFuncSystemError=void 0;class n extends Error{constructor(){super(...arguments),this.isAzureFunctionsSystemError=!0}}t.AzFuncSystemError=n;class r extends TypeError{constructor(){super(...arguments),this.isAzureFunctionsSystemError=!0}}t.AzFuncTypeError=r;class o extends RangeError{constructor(){super(...arguments),this.isAzureFunctionsSystemError=!0}}t.AzFuncRangeError=o,t.ReadOnlyError=class extends r{constructor(e){super(`Cannot assign to read only property '${e}'`)}},t.ensureErrorType=function(e){if(e instanceof Error)return e;{let t;return t=null==e?"Unknown error":"string"==typeof e?e:"object"==typeof e?JSON.stringify(e):String(e),new Error(t)}},t.trySetErrorMessage=function(e,t){try{e.message=t}catch(e){}},t.isError=function(e){return null!=e}},7531:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AppStartContext=void 0;const r=n(5789);class o extends r.HookContext{}t.AppStartContext=o},4586:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AppTerminateContext=void 0;const r=n(5789);class o extends r.HookContext{}t.AppTerminateContext=o},5789:function(e,t,n){var r,o=this&&this.__classPrivateFieldSet||function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},i=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.HookContext=void 0;const s=n(725),a=n(9168);t.HookContext=class{constructor(e){var t,n;r.set(this,void 0),o(this,r,null!=e?e:{},"f"),null!==(t=(n=i(this,r,"f")).hookData)&&void 0!==t||(n.hookData={})}get hookData(){return(0,a.nonNullProp)(i(this,r,"f"),"hookData")}set hookData(e){throw new s.ReadOnlyError("hookData")}},r=new WeakMap},9463:function(e,t,n){var r,o=this&&this.__classPrivateFieldSet||function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},i=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.InvocationHookContext=void 0;const s=n(725),a=n(8157),u=n(9168),c=n(5789);class l extends c.HookContext{constructor(e){var t,n,s,u;super(e),r.set(this,void 0),o(this,r,null!=e?e:{},"f"),null!==(t=(s=i(this,r,"f")).inputs)&&void 0!==t||(s.inputs=[]),null!==(n=(u=i(this,r,"f")).invocationContext)&&void 0!==n||(u.invocationContext=new a.InvocationContext)}get invocationContext(){return(0,u.nonNullProp)(i(this,r,"f"),"invocationContext")}set invocationContext(e){throw new s.ReadOnlyError("invocationContext")}get inputs(){return(0,u.nonNullProp)(i(this,r,"f"),"inputs")}set inputs(e){i(this,r,"f").inputs=e}}t.InvocationHookContext=l,r=new WeakMap},5407:function(e,t,n){var r,o=this&&this.__classPrivateFieldSet||function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},i=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.LogHookContext=void 0;const s=n(725),a=n(9168),u=n(5789);class c extends u.HookContext{constructor(e){var t,n,s,a,u,c;super(e),r.set(this,void 0),o(this,r,null!=e?e:{},"f"),null!==(t=(a=i(this,r,"f")).level)&&void 0!==t||(a.level="information"),null!==(n=(u=i(this,r,"f")).message)&&void 0!==n||(u.message="unknown"),null!==(s=(c=i(this,r,"f")).category)&&void 0!==s||(c.category="user")}get level(){return(0,a.nonNullProp)(i(this,r,"f"),"level")}set level(e){i(this,r,"f").level=e}get message(){return(0,a.nonNullProp)(i(this,r,"f"),"message")}set message(e){i(this,r,"f").message=e}get category(){return(0,a.nonNullProp)(i(this,r,"f"),"category")}set category(e){throw new s.ReadOnlyError("category")}get invocationContext(){return i(this,r,"f").invocationContext}set invocationContext(e){throw new s.ReadOnlyError("invocationContext")}}t.LogHookContext=c,r=new WeakMap},7508:function(e,t,n){var r,o=this&&this.__classPrivateFieldSet||function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},i=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.PostInvocationContext=void 0;const s=n(9463);class a extends s.InvocationHookContext{constructor(e){super(e),r.set(this,void 0),o(this,r,null!=e?e:{},"f")}get result(){return i(this,r,"f").result}set result(e){i(this,r,"f").result=e}get error(){return i(this,r,"f").error}set error(e){i(this,r,"f").error=e}}t.PostInvocationContext=a,r=new WeakMap},8561:function(e,t,n){var r,o=this&&this.__classPrivateFieldSet||function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},i=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.PreInvocationContext=void 0;const s=n(9168),a=n(9463);class u extends a.InvocationHookContext{constructor(e){var t,n;super(e),r.set(this,void 0),o(this,r,null!=e?e:{},"f"),null!==(t=(n=i(this,r,"f")).functionCallback)&&void 0!==t||(n.functionCallback=()=>{})}get functionHandler(){return(0,s.nonNullProp)(i(this,r,"f"),"functionCallback")}set functionHandler(e){i(this,r,"f").functionCallback=e}}t.PreInvocationContext=u,r=new WeakMap},6765:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.log=t.postInvocation=t.preInvocation=t.appTerminate=t.appStart=void 0;const r=n(725),o=n(1898),i=n(3476),s=n(7531),a=n(4586),u=n(5407),c=n(7508),l=n(8561);function f(e,t){const n=(0,i.tryGetCoreApiLazy)();return n?n.registerHook(e,t):(console.warn(`WARNING: Skipping call to register ${e} hook because the "@azure/functions" package is in test mode.`),new o.Disposable((()=>{console.warn(`WARNING: Skipping call to dispose ${e} hook because the "@azure/functions" package is in test mode.`)})))}t.appStart=function(e){return f("appStart",(t=>e(new s.AppStartContext(t))))},t.appTerminate=function(e){return f("appTerminate",(t=>e(new a.AppTerminateContext(t))))},t.preInvocation=function(e){return f("preInvocation",(t=>e(new l.PreInvocationContext(t))))},t.postInvocation=function(e){return f("postInvocation",(t=>e(new c.PostInvocationContext(t))))},t.log=function(e){try{return f("log",(t=>e(new u.LogHookContext(t))))}catch(e){const t=(0,r.ensureErrorType)(e);throw"RangeError"===t.name&&t.isAzureFunctionsSystemError?new r.AzFuncSystemError("Log hooks require Azure Functions Host v4.34 or higher."):e}}},7992:function(e,t,n){var r,o,i,s=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},a=this&&this.__classPrivateFieldSet||function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},u=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},c=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};Object.defineProperty(t,"__esModule",{value:!0}),t.createStreamRequest=t.HttpRequest=void 0;const l=n(3978),f=n(9551),p=n(5138),d=n(679),h=n(725),y=n(9168),v=n(8529);class g{constructor(e){var t,n,s;r.set(this,void 0),o.set(this,void 0),i.set(this,void 0),a(this,i,e,"f");let c=e.undiciRequest;if(!c){const r=(0,y.nonNullProp)(e,"url");let o;(null===(t=e.body)||void 0===t?void 0:t.bytes)?o=Buffer.from(null===(n=e.body)||void 0===n?void 0:n.bytes):(null===(s=e.body)||void 0===s?void 0:s.string)&&(o=e.body.string),c=new l.Request(r,{body:o,method:(0,y.nonNullProp)(e,"method"),headers:(0,p.fromNullableMapping)(e.nullableHeaders,e.headers)})}a(this,o,c,"f"),e.nullableQuery||e.query?this.query=new f.URLSearchParams((0,p.fromNullableMapping)(e.nullableQuery,e.query)):this.query=new URL(u(this,o,"f").url).searchParams,this.params=(0,p.fromNullableMapping)(e.nullableParams,e.params)}get url(){return u(this,o,"f").url}get method(){return u(this,o,"f").method}get headers(){return u(this,o,"f").headers}get user(){return void 0===u(this,r,"f")&&a(this,r,(0,v.extractHttpUserFromHeaders)(this.headers),"f"),u(this,r,"f")}get body(){return u(this,o,"f").body}get bodyUsed(){return u(this,o,"f").bodyUsed}arrayBuffer(){return s(this,void 0,void 0,(function*(){return u(this,o,"f").arrayBuffer()}))}blob(){return s(this,void 0,void 0,(function*(){return u(this,o,"f").blob()}))}formData(){return s(this,void 0,void 0,(function*(){return u(this,o,"f").formData()}))}json(){return s(this,void 0,void 0,(function*(){return u(this,o,"f").json()}))}text(){return s(this,void 0,void 0,(function*(){return u(this,o,"f").text()}))}clone(){const e=structuredClone(u(this,i,"f"));return e.undiciRequest=u(this,o,"f").clone(),new g(e)}}t.HttpRequest=g,r=new WeakMap,o=new WeakMap,i=new WeakMap,t.createStreamRequest=function(e,t){var n;const r="x-forwarded-host",o="x-forwarded-proto",i=e.headers[r],s=e.headers[o];if("string"!=typeof i||"string"!=typeof s)throw new h.AzFuncSystemError(`Expected headers "${r}" and "${o}" to be set.`);const a=`${s}://${i}${(0,y.nonNullProp)(e,"url")}`;let u;const f=null===(n=e.method)||void 0===n?void 0:n.toLowerCase();"get"!==f&&"head"!==f&&(u=e);const{Query:p,Headers:v}=t,b=c(t,["Query","Headers"]);let m;const w=(0,d.fromRpcTypedData)(v);"object"==typeof w&&(0,y.isDefined)(w)&&(m=w);const x=new l.Request(a,{body:u,duplex:"half",method:(0,y.nonNullProp)(e,"method"),headers:m}),P={};for(const[e,t]of Object.entries(b))(0,y.isDefined)(t.string)&&(P[e]=t.string);return new g({undiciRequest:x,params:P})}},8950:function(e,t,n){var r,o,i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},s=this&&this.__classPrivateFieldSet||function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},a=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.HttpResponse=void 0;const u=n(3978),c=n(9168);class l{constructor(e){var t;if(r.set(this,void 0),o.set(this,void 0),null!=e||(e={}),s(this,o,e,"f"),e.undiciResponse)s(this,r,e.undiciResponse,"f");else{const t={status:e.status,headers:e.headers};(0,c.isDefined)(e.jsonBody)?s(this,r,u.Response.json(e.jsonBody,t),"f"):s(this,r,new u.Response(e.body,t),"f")}this.cookies=null!==(t=e.cookies)&&void 0!==t?t:[],this.enableContentNegotiation=!!e.enableContentNegotiation}get status(){return a(this,r,"f").status}get headers(){return a(this,r,"f").headers}get body(){return a(this,r,"f").body}get bodyUsed(){return a(this,r,"f").bodyUsed}arrayBuffer(){return i(this,void 0,void 0,(function*(){return a(this,r,"f").arrayBuffer()}))}blob(){return i(this,void 0,void 0,(function*(){return a(this,r,"f").blob()}))}formData(){return i(this,void 0,void 0,(function*(){return a(this,r,"f").formData()}))}json(){return i(this,void 0,void 0,(function*(){return a(this,r,"f").json()}))}text(){return i(this,void 0,void 0,(function*(){return a(this,r,"f").text()}))}clone(){const e=structuredClone(a(this,o,"f"));return e.undiciResponse=a(this,r,"f").clone(),new l(e)}}t.HttpResponse=l,r=new WeakMap,o=new WeakMap},8529:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.extractHttpUserFromHeaders=void 0;const r=n(9168);t.extractHttpUserFromHeaders=function(e){let t=null;const n=e.get("x-ms-client-principal");if(n){const o=JSON.parse(Buffer.from(n,"base64").toString("utf-8"));t=o.identityProvider?{type:"StaticWebApps",id:o.userId,username:o.userDetails,identityProvider:o.identityProvider,claimsPrincipalData:o}:{type:"AppService",id:(0,r.nonNullValue)(e.get("x-ms-client-principal-id"),"user-id"),username:(0,r.nonNullValue)(e.get("x-ms-client-principal-name"),"user-name"),identityProvider:(0,r.nonNullValue)(e.get("x-ms-client-principal-idp"),"user-idp"),claimsPrincipalData:o}}return t}},2337:function(e,t,n){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{u(r.next(e))}catch(e){i(e)}}function a(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))},o=this&&this.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e="function"==typeof __values?__values(e):e[Symbol.iterator](),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,o,(t=e[n](t)).done,t.value)}))}}};Object.defineProperty(t,"__esModule",{value:!0}),t.setupHttpProxy=t.sendProxyResponse=t.waitForProxyRequest=void 0;const i=n(5096),s=n(4735),a=n(1630),u=n(1645),c=n(725),l=n(9168),f=n(4893),p={},d={},h=new s.EventEmitter;t.waitForProxyRequest=function(e){return r(this,void 0,void 0,(function*(){return new Promise(((t,n)=>{const r=p[e];r?(t(r),delete p[e]):h.once(e,(()=>{const n=p[e];n&&(t(n),delete p[e])}))}))}))};const y="x-ms-invocation-id";t.sendProxyResponse=function(e,t){var n,s;return r(this,void 0,void 0,(function*(){const r=(0,l.nonNullProp)(d,e);delete d[e];for(const[e,n]of t.headers.entries())r.setHeader(e,n);if(r.setHeader(y,e),r.statusCode=t.status,t.cookies.length>0&&function(e,t){const n=e.cookies.map((e=>{let t;switch(e.sameSite){case"Lax":t="lax";break;case"None":t="none";break;case"Strict":t="strict";break;default:t=e.sameSite}return(0,i.serialize)(e.name,e.value,{domain:e.domain,path:e.path,expires:"number"==typeof e.expires?new Date(e.expires):e.expires,secure:e.secure,httpOnly:e.httpOnly,sameSite:t,maxAge:e.maxAge})}));t.setHeader("Set-Cookie",n)}(t,r),t.body)try{for(var a,u=o(t.body.values());!(a=yield u.next()).done;){const e=a.value;r.write(e)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(s=u.return)&&(yield s.call(u))}finally{if(n)throw n.error}}r.end()}))},t.setupHttpProxy=function(){return r(this,void 0,void 0,(function*(){return new Promise(((e,t)=>{const n=a.createServer();n.on("request",((e,t)=>{const n=e.headers[y];"string"==typeof n?(p[n]=e,d[n]=t,h.emit(n)):(0,f.workerSystemLog)("error",`Http proxy request missing header ${y}`)})),n.on("error",(e=>{e=(0,c.ensureErrorType)(e),(0,f.workerSystemLog)("error",`Http proxy error: ${e.stack||e.message}`)})),n.listen((()=>{const r=n.address();null!==r&&"object"==typeof r?0===r.port?((0,f.workerSystemLog)("debug","Port 0 assigned. Finding open port."),function(e){const t=u.createServer();!function n(r){if(r>55025)throw new c.AzFuncSystemError("No available ports found between 55000 and 55025. To enable HTTP streaming, please open a port in this range.");t.once("error",(()=>{n(r+1)})),t.once("listening",(()=>{const n=t.address();null!==n&&"object"==typeof n&&(r=n.port,t.close(),e(r))})),t.listen(r)}(55e3)}((t=>{n.close(),n.listen(t,(()=>{(0,f.workerSystemLog)("debug",`Server is now listening on found open port: ${t}`)})),e(`http://localhost:${t}/`)}))):((0,f.workerSystemLog)("debug",`Auto-assigned port is valid. Port: ${r.port}`),e(`http://localhost:${r.port}/`)):t(new c.AzFuncSystemError("Unexpected server address during http proxy setup"))})),n.on("close",(()=>{(0,f.workerSystemLog)("information","Http proxy closing")}))}))}))}},8156:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MySqlChangeOperation=t.SqlChangeOperation=t.Disposable=t.trigger=t.output=t.InvocationContext=t.input=t.HttpResponse=t.HttpRequest=t.PreInvocationContext=t.PostInvocationContext=t.LogHookContext=t.InvocationHookContext=t.HookContext=t.AppTerminateContext=t.AppStartContext=t.app=void 0,t.app=n(1859);var r=n(7531);Object.defineProperty(t,"AppStartContext",{enumerable:!0,get:function(){return r.AppStartContext}});var o=n(4586);Object.defineProperty(t,"AppTerminateContext",{enumerable:!0,get:function(){return o.AppTerminateContext}});var i=n(5789);Object.defineProperty(t,"HookContext",{enumerable:!0,get:function(){return i.HookContext}});var s=n(9463);Object.defineProperty(t,"InvocationHookContext",{enumerable:!0,get:function(){return s.InvocationHookContext}});var a=n(5407);Object.defineProperty(t,"LogHookContext",{enumerable:!0,get:function(){return a.LogHookContext}});var u=n(7508);Object.defineProperty(t,"PostInvocationContext",{enumerable:!0,get:function(){return u.PostInvocationContext}});var c=n(8561);Object.defineProperty(t,"PreInvocationContext",{enumerable:!0,get:function(){return c.PreInvocationContext}});var l=n(7992);Object.defineProperty(t,"HttpRequest",{enumerable:!0,get:function(){return l.HttpRequest}});var f=n(8950);Object.defineProperty(t,"HttpResponse",{enumerable:!0,get:function(){return f.HttpResponse}}),t.input=n(4788);var p=n(8157);Object.defineProperty(t,"InvocationContext",{enumerable:!0,get:function(){return p.InvocationContext}}),t.output=n(811),t.trigger=n(2888);var d,h,y=n(1898);Object.defineProperty(t,"Disposable",{enumerable:!0,get:function(){return y.Disposable}}),(h=t.SqlChangeOperation||(t.SqlChangeOperation={}))[h.Insert=0]="Insert",h[h.Update=1]="Update",h[h.Delete=2]="Delete",(d=t.MySqlChangeOperation||(t.MySqlChangeOperation={}))[d.Update=0]="Update"},4788:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.generic=t.webPubSubContext=t.webPubSubConnection=t.mySql=t.sql=t.cosmosDB=t.table=t.storageBlob=void 0;const r=n(6693);function o(e){return(0,r.addBindingName)(e,"Input")}t.storageBlob=function(e){return o(Object.assign(Object.assign({},e),{type:"blob"}))},t.table=function(e){return o(Object.assign(Object.assign({},e),{type:"table"}))},t.cosmosDB=function(e){return o(Object.assign(Object.assign({},e),{type:"cosmosDB"}))},t.sql=function(e){return o(Object.assign(Object.assign({},e),{type:"sql"}))},t.mySql=function(e){return o(Object.assign(Object.assign({},e),{type:"mysql"}))},t.webPubSubConnection=function(e){return o(Object.assign(Object.assign({},e),{type:"webPubSubConnection"}))},t.webPubSubContext=function(e){return o(Object.assign(Object.assign({},e),{type:"webPubSubContext"}))},t.generic=function(e){return o(e)}},811:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.generic=t.webPubSub=t.mySql=t.sql=t.cosmosDB=t.eventGrid=t.eventHub=t.serviceBusTopic=t.serviceBusQueue=t.storageQueue=t.table=t.storageBlob=t.http=void 0;const r=n(6693);function o(e){return(0,r.addBindingName)(e,"Output")}t.http=function(e){return o(Object.assign(Object.assign({},e),{type:"http"}))},t.storageBlob=function(e){return o(Object.assign(Object.assign({},e),{type:"blob"}))},t.table=function(e){return o(Object.assign(Object.assign({},e),{type:"table"}))},t.storageQueue=function(e){return o(Object.assign(Object.assign({},e),{type:"queue"}))},t.serviceBusQueue=function(e){return o(Object.assign(Object.assign({},e),{type:"serviceBus"}))},t.serviceBusTopic=function(e){return o(Object.assign(Object.assign({},e),{type:"serviceBus"}))},t.eventHub=function(e){return o(Object.assign(Object.assign({},e),{type:"eventHub"}))},t.eventGrid=function(e){return o(Object.assign(Object.assign({},e),{type:"eventGrid"}))},t.cosmosDB=function(e){return o(Object.assign(Object.assign({},e),{type:"cosmosDB"}))},t.sql=function(e){return o(Object.assign(Object.assign({},e),{type:"sql"}))},t.mySql=function(e){return o(Object.assign(Object.assign({},e),{type:"mysql"}))},t.webPubSub=function(e){return o(Object.assign(Object.assign({},e),{type:"webPubSub"}))},t.generic=function(e){return o(e)}},337:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.setup=t.capabilities=t.enableHttpStream=t.lockSetup=void 0;const r=n(725),o=n(9168),i=n(3476),s=n(4893);let a=!1;t.lockSetup=function(){a=!0},t.enableHttpStream=!1,t.capabilities={},t.setup=function(e){if(a)throw new r.AzFuncSystemError("Setup options can't be changed after app startup has finished.");if(e.enableHttpStream){const e=(0,i.tryGetCoreApiLazy)();if(e&&!e.log)throw new r.AzFuncSystemError("HTTP streaming requires Azure Functions Host v4.28 or higher.")}if((0,o.isDefined)(e.enableHttpStream)&&(t.enableHttpStream=e.enableHttpStream),e.capabilities)for(let[n,r]of Object.entries(e.capabilities))(0,o.isDefined)(r)&&(r=String(r),(0,s.workerSystemLog)("debug",`Capability ${n} set to ${r}.`),t.capabilities[n]=r);t.enableHttpStream&&(0,s.workerSystemLog)("debug","HTTP streaming enabled.")}},2888:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.generic=t.webPubSub=t.mySql=t.sql=t.warmup=t.cosmosDB=t.eventGrid=t.eventHub=t.serviceBusTopic=t.serviceBusQueue=t.storageQueue=t.storageBlob=t.timer=t.http=void 0;const r=n(6693);function o(e){return(0,r.addBindingName)(e,"Trigger")}t.http=function(e){return o(Object.assign(Object.assign({},e),{authLevel:e.authLevel||"anonymous",methods:e.methods||["GET","POST"],type:"httpTrigger"}))},t.timer=function(e){return o(Object.assign(Object.assign({},e),{type:"timerTrigger"}))},t.storageBlob=function(e){return o(Object.assign(Object.assign({},e),{type:"blobTrigger"}))},t.storageQueue=function(e){return o(Object.assign(Object.assign({},e),{type:"queueTrigger"}))},t.serviceBusQueue=function(e){return o(Object.assign(Object.assign({},e),{type:"serviceBusTrigger"}))},t.serviceBusTopic=function(e){return o(Object.assign(Object.assign({},e),{type:"serviceBusTrigger"}))},t.eventHub=function(e){return o(Object.assign(Object.assign({},e),{type:"eventHubTrigger"}))},t.eventGrid=function(e){return o(Object.assign(Object.assign({},e),{type:"eventGridTrigger"}))},t.cosmosDB=function(e){return o(Object.assign(Object.assign({},e),{type:"cosmosDBTrigger"}))},t.warmup=function(e){return o(Object.assign(Object.assign({},e),{type:"warmupTrigger"}))},t.sql=function(e){return o(Object.assign(Object.assign({},e),{type:"sqlTrigger"}))},t.mySql=function(e){return o(Object.assign(Object.assign({},e),{type:"mysqlTrigger"}))},t.webPubSub=function(e){return o(Object.assign(Object.assign({},e),{type:"webPubSubTrigger"}))},t.generic=function(e){return o(e)}},1898:function(e,t){var n,r=this&&this.__classPrivateFieldSet||function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n},o=this&&this.__classPrivateFieldGet||function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.Disposable=void 0;class i{constructor(e){n.set(this,void 0),r(this,n,e,"f")}static from(...e){let t=e;return new i((function(){if(t){for(const e of t)e&&"function"==typeof e.dispose&&e.dispose();t=void 0}}))}dispose(){"function"==typeof o(this,n,"f")&&(o(this,n,"f").call(this),r(this,n,void 0,"f"))}}t.Disposable=i,n=new WeakMap},5396:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.fallbackLogHandler=void 0,t.fallbackLogHandler=function(e,...t){switch(e){case"trace":console.trace(...t);break;case"debug":console.debug(...t);break;case"information":console.info(...t);break;case"warning":console.warn(...t);break;case"critical":case"error":console.error(...t);break;default:console.log(...t)}}},4169:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getStringHash=t.getRandomHexString=void 0;const r=n(5511);t.getRandomHexString=function(e=10){return r.randomBytes(Math.ceil(e/2)).toString("hex").slice(0,e)},t.getStringHash=function(e,t=10){return r.createHash("sha256").update(e).digest("hex").slice(0,t)}},9898:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isTimerTrigger=t.isHttpTrigger=t.isTrigger=void 0,t.isTrigger=function(e){return!!e&&/trigger$/i.test(e)},t.isHttpTrigger=function(e){return"httptrigger"===(null==e?void 0:e.toLowerCase())},t.isTimerTrigger=function(e){return"timertrigger"===(null==e?void 0:e.toLowerCase())}},9168:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isDefined=t.copyPropIfDefined=t.nonNullValue=t.nonNullProp=void 0;const r=n(725);function o(e,t){if(null==e)throw new r.AzFuncSystemError("Internal error: Expected value to be neither null nor undefined"+(t?`: ${t}`:""));return e}t.nonNullProp=function(e,t){return o(e[t],t)},t.nonNullValue=o,t.copyPropIfDefined=function(e,t,n){null!==e[n]&&void 0!==e[n]&&(t[n]=e[n])},t.isDefined=function(e){return null!=e}},3476:(e,t,n)=>{let r;Object.defineProperty(t,"__esModule",{value:!0}),t.tryGetCoreApiLazy=void 0,t.tryGetCoreApiLazy=function(){if(void 0===r)try{r=n(8789)}catch(e){r=null}return r}},4893:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.workerSystemLog=void 0;const r=n(8354),o=n(5396),i=n(3476);t.workerSystemLog=function(e,...t){const n=(0,i.tryGetCoreApiLazy)();n&&n.log?n.log(e,"system",(0,r.format)(...t)):(0,o.fallbackLogHandler)(e,...t)}},8789:e=>{e.exports=require("@azure/functions-core")},5096:e=>{e.exports=require("cookie")},5511:e=>{e.exports=require("crypto")},4735:e=>{e.exports=require("events")},1630:e=>{e.exports=require("http")},1645:e=>{e.exports=require("net")},3978:e=>{e.exports=require("undici")},9551:e=>{e.exports=require("url")},8354:e=>{e.exports=require("util")}},t={},n=function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}(8156);module.exports=n})(); //# sourceMappingURL=azure-functions.min.js.map