UNPKG

@sap/generator-fiori

Version:

Create an SAPUI5 application using SAP Fiori elements or a freestyle approach

2 lines 9.28 MB
/*! For license information please see index.js.LICENSE.txt */ exports.id=288,exports.ids=[288],exports.modules={48827:(re,he,de)=>{"use strict";de.r(he),de.d(he,{RestError:()=>RestError,bearerTokenAuthenticationPolicy:()=>bearerTokenAuthenticationPolicy,bearerTokenAuthenticationPolicyName:()=>bt,createDefaultHttpClient:()=>createDefaultHttpClient,createEmptyPipeline:()=>createEmptyPipeline,createHttpHeaders:()=>createHttpHeaders,createPipelineFromOptions:()=>createPipelineFromOptions,createPipelineRequest:()=>createPipelineRequest,decompressResponsePolicy:()=>decompressResponsePolicy,decompressResponsePolicyName:()=>Ce,defaultRetryPolicy:()=>defaultRetryPolicy,exponentialRetryPolicy:()=>exponentialRetryPolicy,exponentialRetryPolicyName:()=>gt,formDataPolicy:()=>formDataPolicy,formDataPolicyName:()=>Le,getDefaultProxySettings:()=>getDefaultProxySettings,isRestError:()=>isRestError,logPolicy:()=>logPolicy,logPolicyName:()=>Se,ndJsonPolicy:()=>ndJsonPolicy,ndJsonPolicyName:()=>St,proxyPolicy:()=>proxyPolicy,proxyPolicyName:()=>qe,redirectPolicy:()=>redirectPolicy,redirectPolicyName:()=>we,retryPolicy:()=>retryPolicy,setClientRequestIdPolicy:()=>setClientRequestIdPolicy,setClientRequestIdPolicyName:()=>Ke,systemErrorRetryPolicy:()=>systemErrorRetryPolicy,systemErrorRetryPolicyName:()=>mt,throttlingRetryPolicy:()=>throttlingRetryPolicy,throttlingRetryPolicyName:()=>yt,tlsPolicy:()=>tlsPolicy,tlsPolicyName:()=>Je,tracingPolicy:()=>tracingPolicy,tracingPolicyName:()=>et,userAgentPolicy:()=>userAgentPolicy,userAgentPolicyName:()=>Oe});const fe=new Set(["Deserialize","Serialize","Retry","Sign"]);class HttpPipeline{constructor(re){var he;this._policies=[],this._policies=null!==(he=null==re?void 0:re.slice(0))&&void 0!==he?he:[],this._orderedPolicies=void 0}addPolicy(re,he={}){if(he.phase&&he.afterPhase)throw new Error("Policies inside a phase cannot specify afterPhase.");if(he.phase&&!fe.has(he.phase))throw new Error(`Invalid phase name: ${he.phase}`);if(he.afterPhase&&!fe.has(he.afterPhase))throw new Error(`Invalid afterPhase name: ${he.afterPhase}`);this._policies.push({policy:re,options:he}),this._orderedPolicies=void 0}removePolicy(re){const he=[];return this._policies=this._policies.filter((de=>!(re.name&&de.policy.name===re.name||re.phase&&de.options.phase===re.phase)||(he.push(de.policy),!1))),this._orderedPolicies=void 0,he}sendRequest(re,he){return this.getOrderedPolicies().reduceRight(((re,he)=>de=>he.sendRequest(de,re)),(he=>re.sendRequest(he)))(he)}getOrderedPolicies(){return this._orderedPolicies||(this._orderedPolicies=this.orderPolicies()),this._orderedPolicies}clone(){return new HttpPipeline(this._policies)}static create(){return new HttpPipeline}orderPolicies(){const re=[],he=new Map;function createPhase(re){return{name:re,policies:new Set,hasRun:!1,hasAfterPolicies:!1}}const de=createPhase("Serialize"),fe=createPhase("None"),ge=createPhase("Deserialize"),me=createPhase("Retry"),ye=createPhase("Sign"),ve=[de,fe,ge,me,ye];function getPhase(re){return"Retry"===re?me:"Serialize"===re?de:"Deserialize"===re?ge:"Sign"===re?ye:fe}for(const re of this._policies){const de=re.policy,fe=re.options,ge=de.name;if(he.has(ge))throw new Error("Duplicate policy names not allowed in pipeline");const me={policy:de,dependsOn:new Set,dependants:new Set};fe.afterPhase&&(me.afterPhase=getPhase(fe.afterPhase),me.afterPhase.hasAfterPolicies=!0),he.set(ge,me);getPhase(fe.phase).policies.add(me)}for(const re of this._policies){const{policy:de,options:fe}=re,ge=de.name,me=he.get(ge);if(!me)throw new Error(`Missing node for policy ${ge}`);if(fe.afterPolicies)for(const re of fe.afterPolicies){const de=he.get(re);de&&(me.dependsOn.add(de),de.dependants.add(me))}if(fe.beforePolicies)for(const re of fe.beforePolicies){const de=he.get(re);de&&(de.dependsOn.add(me),me.dependants.add(de))}}function walkPhase(de){de.hasRun=!0;for(const fe of de.policies)if((!fe.afterPhase||fe.afterPhase.hasRun&&!fe.afterPhase.policies.size)&&0===fe.dependsOn.size){re.push(fe.policy);for(const re of fe.dependants)re.dependsOn.delete(fe);he.delete(fe.policy.name),de.policies.delete(fe)}}function walkPhases(){for(const re of ve){if(walkPhase(re),re.policies.size>0&&re!==fe)return void(fe.hasRun||walkPhase(fe));re.hasAfterPolicies&&walkPhase(fe)}}let be=0;for(;he.size>0;){be++;const he=re.length;if(walkPhases(),re.length<=he&&be>1)throw new Error("Cannot satisfy policy dependencies due to requirements cycle.")}return re}}function createEmptyPipeline(){return HttpPipeline.create()}var ge=de(74907);const me=(0,ge.KV)("core-rest-pipeline");function isObject(re){return!("object"!=typeof re||null===re||Array.isArray(re)||re instanceof RegExp||re instanceof Date)}const ye="REDACTED",ve=["x-ms-client-request-id","x-ms-return-client-request-id","x-ms-useragent","x-ms-correlation-request-id","x-ms-request-id","client-request-id","ms-cv","return-client-request-id","traceparent","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Origin","Accept","Accept-Encoding","Cache-Control","Connection","Content-Length","Content-Type","Date","ETag","Expires","If-Match","If-Modified-Since","If-None-Match","If-Unmodified-Since","Last-Modified","Pragma","Request-Id","Retry-After","Server","Transfer-Encoding","User-Agent","WWW-Authenticate"],be=["api-version"];class Sanitizer{constructor({additionalAllowedHeaderNames:re=[],additionalAllowedQueryParameters:he=[]}={}){re=ve.concat(re),he=be.concat(he),this.allowedHeaderNames=new Set(re.map((re=>re.toLowerCase()))),this.allowedQueryParameters=new Set(he.map((re=>re.toLowerCase())))}sanitize(re){const he=new Set;return JSON.stringify(re,((re,de)=>{if(de instanceof Error)return Object.assign(Object.assign({},de),{name:de.name,message:de.message});if("headers"===re)return this.sanitizeHeaders(de);if("url"===re)return this.sanitizeUrl(de);if("query"===re)return this.sanitizeQuery(de);if("body"!==re&&"response"!==re&&"operationSpec"!==re){if(Array.isArray(de)||isObject(de)){if(he.has(de))return"[Circular]";he.add(de)}return de}}),2)}sanitizeHeaders(re){const he={};for(const de of Object.keys(re))this.allowedHeaderNames.has(de.toLowerCase())?he[de]=re[de]:he[de]=ye;return he}sanitizeQuery(re){if("object"!=typeof re||null===re)return re;const he={};for(const de of Object.keys(re))this.allowedQueryParameters.has(de.toLowerCase())?he[de]=re[de]:he[de]=ye;return he}sanitizeUrl(re){if("string"!=typeof re||null===re)return re;const he=new URL(re);if(!he.search)return re;for(const[re]of he.searchParams)this.allowedQueryParameters.has(re.toLowerCase())||he.searchParams.set(re,ye);return he.toString()}}const Se="logPolicy";function logPolicy(re={}){var he;const de=null!==(he=re.logger)&&void 0!==he?he:me.info,fe=new Sanitizer({additionalAllowedHeaderNames:re.additionalAllowedHeaderNames,additionalAllowedQueryParameters:re.additionalAllowedQueryParameters});return{name:Se,async sendRequest(re,he){if(!de.enabled)return he(re);de(`Request: ${fe.sanitize(re)}`);const ge=await he(re);return de(`Response status code: ${ge.status}`),de(`Headers: ${fe.sanitize(ge.headers)}`),ge}}}const we="redirectPolicy",xe=["GET","HEAD"];function redirectPolicy(re={}){const{maxRetries:he=20}=re;return{name:we,async sendRequest(re,de){const fe=await de(re);return handleRedirect(de,fe,he)}}}async function handleRedirect(re,he,de,fe=0){const{request:ge,status:me,headers:ye}=he,ve=ye.get("location");if(ve&&(300===me||301===me&&xe.includes(ge.method)||302===me&&xe.includes(ge.method)||303===me&&"POST"===ge.method||307===me)&&fe<de){const he=new URL(ve,ge.url);ge.url=he.toString(),303===me&&(ge.method="GET",ge.headers.delete("Content-Length"),delete ge.body),ge.headers.delete("Authorization");const ye=await re(ge);return handleRedirect(re,ye,de,fe+1)}return he}var Ee=de(70857);const _e="1.10.1";function getUserAgentValue(re){const he=new Map;he.set("core-rest-pipeline",_e),function setPlatformSpecificData(re){re.set("Node",process.version),re.set("OS",`(${Ee.arch()}-${Ee.type()}-${Ee.release()})`)}(he);const de=function getUserAgentString(re){const he=[];for(const[de,fe]of re){const re=fe?`${de}/${fe}`:de;he.push(re)}return he.join(" ")}(he);return re?`${re} ${de}`:de}const ke="User-Agent",Oe="userAgentPolicy";function userAgentPolicy(re={}){const he=getUserAgentValue(re.userAgentPrefix);return{name:Oe,sendRequest:async(re,de)=>(re.headers.has(ke)||re.headers.set(ke,he),de(re))}}const Ce="decompressResponsePolicy";function decompressResponsePolicy(){return{name:Ce,sendRequest:async(re,he)=>("HEAD"!==re.method&&re.headers.set("Accept-Encoding","gzip,deflate"),he(re))}}const Ae=new WeakMap,Te=new WeakMap;class AbortSignal{constructor(){this.onabort=null,Ae.set(this,[]),Te.set(this,!1)}get aborted(){if(!Te.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");return Te.get(this)}static get none(){return new AbortSignal}addEventListener(re,he){if(!Ae.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");Ae.get(this).push(he)}removeEventListener(re,he){if(!Ae.has(this))throw new TypeError("Expected `this` to be an instance of AbortSignal.");const de=Ae.get(this),fe=de.indexOf(he);fe>-1&&de.splice(fe,1)}dispatchEvent(re){throw new Error("This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes.")}}function abortSignal(re){if(re.aborted)return;re.onabort&&re.onabort.call(re);const he=Ae.get(re);he&&he.slice().forEach((he=>{he.call(re,{type:"abort"})})),Te.set(re,!0)}class AbortError extends Error{constructor(re){super(re),this.name="AbortError"}}class AbortController{constructor(re){if(this._signal=new AbortSignal,re){Array.isArray(re)||(re=arguments);for(const he of re)he.aborted?this.abort():he.addEventListener("abort",(()=>{this.abort()}))}}get signal(){return this._signal}abort(){abortSignal(this._signal)}static timeout(re){const he=new AbortSignal,de=setTimeout(abortSignal,re,he);return"function"==typeof de.unref&&de.unref(),he}}function delay(re,he,de){return new Promise(((fe,ge)=>{let me,ye;const rejectOnAbort=()=>ge(new AbortError((null==de?void 0:de.abortErrorMsg)?null==de?void 0:de.abortErrorMsg:"The operation was aborted.")),removeListeners=()=>{(null==de?void 0:de.abortSignal)&&ye&&de.abortSignal.removeEventListener("abort",ye)};if(ye=()=>(me&&clearTimeout(me),removeListeners(),rejectOnAbort()),(null==de?void 0:de.abortSignal)&&de.abortSignal.aborted)return rejectOnAbort();me=setTimeout((()=>{removeListeners(),fe(he)}),re),(null==de?void 0:de.abortSignal)&&de.abortSignal.addEventListener("abort",ye)}))}function parseHeaderValueAsNumber(re,he){const de=re.headers.get(he);if(!de)return;const fe=Number(de);return Number.isNaN(fe)?void 0:fe}const Pe="Retry-After",Re=["retry-after-ms","x-ms-retry-after-ms",Pe];function getRetryAfterInMs(re){if(re&&[429,503].includes(re.status))try{for(const he of Re){const de=parseHeaderValueAsNumber(re,he);if(0===de||de){return de*(he===Pe?1e3:1)}}const he=re.headers.get(Pe);if(!he)return;const de=Date.parse(he)-Date.now();return Number.isFinite(de)?Math.max(0,de):void 0}catch(re){return}}function throttlingRetryStrategy(){return{name:"throttlingRetryStrategy",retry({response:re}){const he=getRetryAfterInMs(re);return Number.isFinite(he)?{retryAfterInMs:he}:{skipStrategy:!0}}}}function exponentialRetryStrategy(re={}){var he,de;const fe=null!==(he=re.retryDelayInMs)&&void 0!==he?he:1e3,ge=null!==(de=re.maxRetryDelayInMs)&&void 0!==de?de:64e3;let me=fe;return{name:"exponentialRetryStrategy",retry({retryCount:he,response:de,responseError:fe}){const ye=function isSystemError(re){if(!re)return!1;return"ETIMEDOUT"===re.code||"ESOCKETTIMEDOUT"===re.code||"ECONNREFUSED"===re.code||"ECONNRESET"===re.code||"ENOENT"===re.code}(fe),ve=ye&&re.ignoreSystemErrors,be=function isExponentialRetryResponse(re){return Boolean(re&&void 0!==re.status&&(re.status>=500||408===re.status)&&501!==re.status&&505!==re.status)}(de),Se=be&&re.ignoreHttpStatusCodes,we=de&&(function isThrottlingRetryResponse(re){return Number.isFinite(getRetryAfterInMs(re))}(de)||!be);if(we||Se||ve)return{skipStrategy:!0};if(fe&&!ye&&!be)return{errorToThrow:fe};const xe=me*Math.pow(2,he),Ee=Math.min(ge,xe);return me=Ee/2+function getRandomIntegerInclusive(re,he){return re=Math.ceil(re),he=Math.floor(he),Math.floor(Math.random()*(he-re+1))+re}(0,Ee/2),{retryAfterInMs:me}}}}const De=(0,ge.KV)("core-rest-pipeline retryPolicy");function retryPolicy(re,he={maxRetries:3}){const de=he.logger||De;return{name:"retryPolicy",async sendRequest(fe,ge){var me,ye;let ve,be,Se=-1;e:for(;;){Se+=1,ve=void 0,be=void 0;try{de.info(`Retry ${Se}: Attempting to send request`,fe.requestId),ve=await ge(fe),de.info(`Retry ${Se}: Received a response from request`,fe.requestId)}catch(re){if(de.error(`Retry ${Se}: Received an error from request`,fe.requestId),be=re,!re||"RestError"!==be.name)throw re;ve=be.response}if(null===(me=fe.abortSignal)||void 0===me?void 0:me.aborted){de.error(`Retry ${Se}: Request aborted.`);throw new AbortError}if(Se>=(null!==(ye=he.maxRetries)&&void 0!==ye?ye:3)){if(de.info(`Retry ${Se}: Maximum retries reached. Returning the last received response, or throwing the last received error.`),be)throw be;if(ve)return ve;throw new Error("Maximum retries reached with no response or error to throw")}de.info(`Retry ${Se}: Processing ${re.length} retry strategies.`);t:for(const he of re){const re=he.logger||De;re.info(`Retry ${Se}: Processing retry strategy ${he.name}.`);const de=he.retry({retryCount:Se,response:ve,responseError:be});if(de.skipStrategy){re.info(`Retry ${Se}: Skipped.`);continue t}const{errorToThrow:ge,retryAfterInMs:me,redirectTo:ye}=de;if(ge)throw re.error(`Retry ${Se}: Retry strategy ${he.name} throws error:`,ge),ge;if(me||0===me){re.info(`Retry ${Se}: Retry strategy ${he.name} retries after ${me}`),await delay(me,void 0,{abortSignal:fe.abortSignal});continue e}if(ye){re.info(`Retry ${Se}: Retry strategy ${he.name} redirects to ${ye}`),fe.url=ye;continue e}}if(be)throw de.info("None of the retry strategies could work with the received error. Throwing it."),be;if(ve)return de.info("None of the retry strategies could work with the received response. Returning it."),ve}}}}function defaultRetryPolicy(re={}){var he;return{name:"defaultRetryPolicy",sendRequest:retryPolicy([throttlingRetryStrategy(),exponentialRetryStrategy(re)],{maxRetries:null!==(he=re.maxRetries)&&void 0!==he?he:3}).sendRequest}}var Ne=de(72107),je=de.n(Ne);const Le="formDataPolicy";function formDataPolicy(){return{name:Le,async sendRequest(re,he){if(re.formData){const he=re.headers.get("Content-Type");he&&-1!==he.indexOf("application/x-www-form-urlencoded")?(re.body=function wwwFormUrlEncode(re){const he=new URLSearchParams;for(const[de,fe]of Object.entries(re))if(Array.isArray(fe))for(const re of fe)he.append(de,re.toString());else he.append(de,fe.toString());return he.toString()}(re.formData),re.formData=void 0):await async function prepareFormData(re,he){const de=new(je());for(const he of Object.keys(re)){const fe=re[he];if(Array.isArray(fe))for(const re of fe)de.append(he,re);else de.append(he,fe)}he.body=de,he.formData=void 0;const fe=he.headers.get("Content-Type");fe&&-1!==fe.indexOf("multipart/form-data")&&he.headers.set("Content-Type",`multipart/form-data; boundary=${de.getBoundary()}`);try{const re=await new Promise(((re,he)=>{de.getLength(((de,fe)=>{de?he(de):re(fe)}))}));he.headers.set("Content-Length",re)}catch(re){}}(re.formData,re)}return he(re)}}}var Ie,Fe,Me,Be;"undefined"!=typeof window&&window.document,"object"==typeof self&&"function"==typeof(null===self||void 0===self?void 0:self.importScripts)&&("DedicatedWorkerGlobalScope"===(null===(Ie=self.constructor)||void 0===Ie?void 0:Ie.name)||"ServiceWorkerGlobalScope"===(null===(Fe=self.constructor)||void 0===Fe?void 0:Fe.name)||null===(Me=self.constructor)||void 0===Me||Me.name);const Ue="undefined"!=typeof Deno&&void 0!==Deno.version&&void 0!==Deno.version.deno,$e="undefined"!=typeof process&&Boolean(process.version)&&Boolean(null===(Be=process.versions)||void 0===Be?void 0:Be.node)&&!Ue;"undefined"!=typeof Bun&&Bun.version,"undefined"!=typeof navigator&&(null===navigator||void 0===navigator||navigator.product);var ze=de(93018),Ve=de(1958);const qe="proxyPolicy",He=[];let We=!1;const Ge=new Map;function getEnvironmentValue(re){return process.env[re]?process.env[re]:process.env[re.toLowerCase()]?process.env[re.toLowerCase()]:void 0}function getDefaultProxySettings(re){if(!re&&!(re=function loadEnvironmentProxyValue(){if(!process)return;const re=getEnvironmentValue("HTTPS_PROXY"),he=getEnvironmentValue("ALL_PROXY"),de=getEnvironmentValue("HTTP_PROXY");return re||he||de}()))return;const he=new URL(re);return{host:(he.protocol?he.protocol+"//":"")+he.hostname,port:Number.parseInt(he.port||"80"),username:he.username,password:he.password}}function getProxyAgentOptions(re,{headers:he,tlsSettings:de}){let fe;try{fe=new URL(re.host)}catch(he){throw new Error(`Expecting a valid host string in proxy settings, but found "${re.host}".`)}de&&me.warning("TLS settings are not supported in combination with custom Proxy, certificates provided to the client will be ignored.");const ge={hostname:fe.hostname,port:re.port,protocol:fe.protocol,headers:he.toJSON()};return re.username&&re.password?ge.auth=`${re.username}:${re.password}`:re.username&&(ge.auth=`${re.username}`),ge}function proxyPolicy(re=getDefaultProxySettings(),he){We||He.push(...function loadNoProxy(){const re=getEnvironmentValue("NO_PROXY");return We=!0,re?re.split(",").map((re=>re.trim())).filter((re=>re.length)):[]}());const de={};return{name:qe,async sendRequest(fe,ge){var me;return fe.proxySettings||function isBypassed(re,he,de){if(0===he.length)return!1;const fe=new URL(re).hostname;if(null==de?void 0:de.has(fe))return de.get(fe);let ge=!1;for(const re of he)"."===re[0]?(fe.endsWith(re)||fe.length===re.length-1&&fe===re.slice(1))&&(ge=!0):fe===re&&(ge=!0);return null==de||de.set(fe,ge),ge}(fe.url,null!==(me=null==he?void 0:he.customNoProxyList)&&void 0!==me?me:He,(null==he?void 0:he.customNoProxyList)?void 0:Ge)||(fe.proxySettings=re),fe.proxySettings&&function setProxyAgentOnRequest(re,he){if(re.agent)return;const de="https:"!==new URL(re.url).protocol,fe=re.proxySettings;if(fe)if(de){if(!he.httpProxyAgent){const de=getProxyAgentOptions(fe,re);he.httpProxyAgent=new Ve.HttpProxyAgent(de)}re.agent=he.httpProxyAgent}else{if(!he.httpsProxyAgent){const de=getProxyAgentOptions(fe,re);he.httpsProxyAgent=new ze.HttpsProxyAgent(de)}re.agent=he.httpsProxyAgent}}(fe,de),ge(fe)}}}const Ke="setClientRequestIdPolicy";function setClientRequestIdPolicy(re="x-ms-client-request-id"){return{name:Ke,sendRequest:async(he,de)=>(he.headers.has(re)||he.headers.set(re,he.requestId),de(he))}}const Je="tlsPolicy";function tlsPolicy(re){return{name:Je,sendRequest:async(he,de)=>(he.tlsSettings||(he.tlsSettings=re),de(he))}}const Ye={span:Symbol.for("@azure/core-tracing span"),namespace:Symbol.for("@azure/core-tracing namespace")};function createTracingContext(re={}){let he=new TracingContextImpl(re.parentContext);return re.span&&(he=he.setValue(Ye.span,re.span)),re.namespace&&(he=he.setValue(Ye.namespace,re.namespace)),he}class TracingContextImpl{constructor(re){this._contextMap=re instanceof TracingContextImpl?new Map(re._contextMap):new Map}setValue(re,he){const de=new TracingContextImpl(this);return de._contextMap.set(re,he),de}getValue(re){return this._contextMap.get(re)}deleteValue(re){const he=new TracingContextImpl(this);return he._contextMap.delete(re),he}}let Xe;function getInstrumenter(){return Xe||(Xe=function createDefaultInstrumenter(){return{createRequestHeaders:()=>({}),parseTraceparentHeader:()=>{},startSpan:(re,he)=>({span:{end:()=>{},isRecording:()=>!1,recordException:()=>{},setAttribute:()=>{},setStatus:()=>{}},tracingContext:createTracingContext({parentContext:he.tracingContext})}),withContext:(re,he,...de)=>he(...de)}}()),Xe}function isError(re){if(isObject(re)){const he="string"==typeof re.name,de="string"==typeof re.message;return he&&de}return!1}function getErrorMessage(re){if(isError(re))return re.message;{let he;try{he="object"==typeof re&&re?JSON.stringify(re):String(re)}catch(re){he="[unable to stringify input]"}return`Unknown error ${he}`}}const Qe=de(39023).inspect.custom,Ze=new Sanitizer;class RestError extends Error{constructor(re,he={}){super(re),this.name="RestError",this.code=he.code,this.statusCode=he.statusCode,this.request=he.request,this.response=he.response,Object.setPrototypeOf(this,RestError.prototype)}[Qe](){return`RestError: ${this.message} \n ${Ze.sanitize(this)}`}}function isRestError(re){return re instanceof RestError||isError(re)&&"RestError"===re.name}RestError.REQUEST_SEND_ERROR="REQUEST_SEND_ERROR",RestError.PARSE_ERROR="PARSE_ERROR";const et="tracingPolicy";function tracingPolicy(re={}){const he=getUserAgentValue(re.userAgentPrefix),de=function tryCreateTracingClient(){try{return function createTracingClient(re){const{namespace:he,packageName:de,packageVersion:fe}=re;function startSpan(re,ge,me){var ye;const ve=getInstrumenter().startSpan(re,Object.assign(Object.assign({},me),{packageName:de,packageVersion:fe,tracingContext:null===(ye=null==ge?void 0:ge.tracingOptions)||void 0===ye?void 0:ye.tracingContext}));let be=ve.tracingContext;const Se=ve.span;return be.getValue(Ye.namespace)||(be=be.setValue(Ye.namespace,he)),Se.setAttribute("az.namespace",be.getValue(Ye.namespace)),{span:Se,updatedOptions:Object.assign({},ge,{tracingOptions:Object.assign(Object.assign({},null==ge?void 0:ge.tracingOptions),{tracingContext:be})})}}function withContext(re,he,...de){return getInstrumenter().withContext(re,he,...de)}return{startSpan,withSpan:async function withSpan(re,he,de,fe){const{span:ge,updatedOptions:me}=startSpan(re,he,fe);try{const re=await withContext(me.tracingOptions.tracingContext,(()=>Promise.resolve(de(me,ge))));return ge.setStatus({status:"success"}),re}catch(re){throw ge.setStatus({status:"error",error:re}),re}finally{ge.end()}},withContext,parseTraceparentHeader:function parseTraceparentHeader(re){return getInstrumenter().parseTraceparentHeader(re)},createRequestHeaders:function createRequestHeaders(re){return getInstrumenter().createRequestHeaders(re)}}}({namespace:"",packageName:"@azure/core-rest-pipeline",packageVersion:_e})}catch(re){return void me.warning(`Error when creating the TracingClient: ${getErrorMessage(re)}`)}}();return{name:et,async sendRequest(re,fe){var ge,ye;if(!de||!(null===(ge=re.tracingOptions)||void 0===ge?void 0:ge.tracingContext))return fe(re);const{span:ve,tracingContext:be}=null!==(ye=function tryCreateSpan(re,he,de){try{const{span:fe,updatedOptions:ge}=re.startSpan(`HTTP ${he.method}`,{tracingOptions:he.tracingOptions},{spanKind:"client",spanAttributes:{"http.method":he.method,"http.url":he.url,requestId:he.requestId}});if(!fe.isRecording())return void fe.end();de&&fe.setAttribute("http.user_agent",de);const me=re.createRequestHeaders(ge.tracingOptions.tracingContext);for(const[re,de]of Object.entries(me))he.headers.set(re,de);return{span:fe,tracingContext:ge.tracingOptions.tracingContext}}catch(re){return void me.warning(`Skipping creating a tracing span due to an error: ${getErrorMessage(re)}`)}}(de,re,he))&&void 0!==ye?ye:{};if(!ve||!be)return fe(re);try{const he=await de.withContext(be,fe,re);return function tryProcessResponse(re,he){try{re.setAttribute("http.status_code",he.status);const de=he.headers.get("x-ms-request-id");de&&re.setAttribute("serviceRequestId",de),re.setStatus({status:"success"}),re.end()}catch(re){me.warning(`Skipping tracing span processing due to an error: ${getErrorMessage(re)}`)}}(ve,he),he}catch(re){throw function tryProcessError(re,he){try{re.setStatus({status:"error",error:isError(he)?he:void 0}),isRestError(he)&&he.statusCode&&re.setAttribute("http.status_code",he.statusCode),re.end()}catch(re){me.warning(`Skipping tracing span processing due to an error: ${getErrorMessage(re)}`)}}(ve,re),re}}}}function createPipelineFromOptions(re){const he=createEmptyPipeline();return $e&&(re.tlsOptions&&he.addPolicy(tlsPolicy(re.tlsOptions)),he.addPolicy(proxyPolicy(re.proxyOptions)),he.addPolicy(decompressResponsePolicy())),he.addPolicy(formDataPolicy()),he.addPolicy(userAgentPolicy(re.userAgentOptions)),he.addPolicy(setClientRequestIdPolicy()),he.addPolicy(defaultRetryPolicy(re.retryOptions),{phase:"Retry"}),he.addPolicy(tracingPolicy(re.userAgentOptions),{afterPhase:"Retry"}),$e&&he.addPolicy(redirectPolicy(re.redirectOptions),{afterPhase:"Retry"}),he.addPolicy(logPolicy(re.loggingOptions),{afterPhase:"Sign"}),he}var tt=de(58611),rt=de(65692),nt=de(43106),it=de(2203);function normalizeName(re){return re.toLowerCase()}class HttpHeadersImpl{constructor(re){if(this._headersMap=new Map,re)for(const he of Object.keys(re))this.set(he,re[he])}set(re,he){this._headersMap.set(normalizeName(re),{name:re,value:String(he)})}get(re){var he;return null===(he=this._headersMap.get(normalizeName(re)))||void 0===he?void 0:he.value}has(re){return this._headersMap.has(normalizeName(re))}delete(re){this._headersMap.delete(normalizeName(re))}toJSON(re={}){const he={};if(re.preserveCase)for(const re of this._headersMap.values())he[re.name]=re.value;else for(const[re,de]of this._headersMap)he[re]=de.value;return he}toString(){return JSON.stringify(this.toJSON({preserveCase:!0}))}[Symbol.iterator](){return function*headerIterator(re){for(const he of re.values())yield[he.name,he.value]}(this._headersMap)}}function createHttpHeaders(re){return new HttpHeadersImpl(re)}const ot={};function isReadableStream(re){return re&&"function"==typeof re.pipe}function isStreamComplete(re){return new Promise((he=>{re.on("close",he),re.on("end",he),re.on("error",he)}))}function isArrayBuffer(re){return re&&"number"==typeof re.byteLength}class ReportTransform extends it.Transform{constructor(re){super(),this.loadedBytes=0,this.progressCallback=re}_transform(re,he,de){this.push(re),this.loadedBytes+=re.length;try{this.progressCallback({loadedBytes:this.loadedBytes}),de()}catch(re){de(re)}}}class NodeHttpClient{constructor(){this.cachedHttpsAgents=new WeakMap}async sendRequest(re){var he,de,fe;const ge=new AbortController;let ye;if(re.abortSignal){if(re.abortSignal.aborted)throw new AbortError("The operation was aborted.");ye=re=>{"abort"===re.type&&ge.abort()},re.abortSignal.addEventListener("abort",ye)}re.timeout>0&&setTimeout((()=>{ge.abort()}),re.timeout);const ve=re.headers.get("Accept-Encoding"),be=(null==ve?void 0:ve.includes("gzip"))||(null==ve?void 0:ve.includes("deflate"));let Se,we="function"==typeof re.body?re.body():re.body;if(we&&!re.headers.has("Content-Length")){const he=function getBodyLength(re){return re?Buffer.isBuffer(re)?re.length:isReadableStream(re)?null:isArrayBuffer(re)?re.byteLength:"string"==typeof re?Buffer.from(re).length:null:0}(we);null!==he&&re.headers.set("Content-Length",he)}try{if(we&&re.onUploadProgress){const he=re.onUploadProgress,de=new ReportTransform(he);de.on("error",(re=>{me.error("Error in upload progress",re)})),isReadableStream(we)?we.pipe(de):de.end(we),we=de}const ve=await this.makeRequest(re,ge,we),xe=function getResponseHeaders(re){const he=createHttpHeaders();for(const de of Object.keys(re.headers)){const fe=re.headers[de];Array.isArray(fe)?fe.length>0&&he.set(de,fe[0]):fe&&he.set(de,fe)}return he}(ve),Ee={status:null!==(he=ve.statusCode)&&void 0!==he?he:0,headers:xe,request:re};if("HEAD"===re.method)return ve.resume(),Ee;Se=be?function getDecodedResponseStream(re,he){const de=he.get("Content-Encoding");if("gzip"===de){const he=nt.createGunzip();return re.pipe(he),he}if("deflate"===de){const he=nt.createInflate();return re.pipe(he),he}return re}(ve,xe):ve;const _e=re.onDownloadProgress;if(_e){const re=new ReportTransform(_e);re.on("error",(re=>{me.error("Error in download progress",re)})),Se.pipe(re),Se=re}return(null===(de=re.streamResponseStatusCodes)||void 0===de?void 0:de.has(Number.POSITIVE_INFINITY))||(null===(fe=re.streamResponseStatusCodes)||void 0===fe?void 0:fe.has(Ee.status))?Ee.readableStreamBody=Se:Ee.bodyAsText=await function streamToText(re){return new Promise(((he,de)=>{const fe=[];re.on("data",(re=>{Buffer.isBuffer(re)?fe.push(re):fe.push(Buffer.from(re))})),re.on("end",(()=>{he(Buffer.concat(fe).toString("utf8"))})),re.on("error",(re=>{re&&"AbortError"===(null==re?void 0:re.name)?de(re):de(new RestError(`Error reading response as text: ${re.message}`,{code:RestError.PARSE_ERROR}))}))}))}(Se),Ee}finally{if(re.abortSignal&&ye){let he=Promise.resolve();isReadableStream(we)&&(he=isStreamComplete(we));let de=Promise.resolve();isReadableStream(Se)&&(de=isStreamComplete(Se)),Promise.all([he,de]).then((()=>{var he;ye&&(null===(he=re.abortSignal)||void 0===he||he.removeEventListener("abort",ye))})).catch((re=>{me.warning("Error when cleaning up abortListener on httpRequest",re)}))}}}makeRequest(re,he,de){var fe;const ge=new URL(re.url),ye="https:"!==ge.protocol;if(ye&&!re.allowInsecureConnection)throw new Error(`Cannot connect to ${re.url} while allowInsecureConnection is false.`);const ve={agent:null!==(fe=re.agent)&&void 0!==fe?fe:this.getOrCreateAgent(re,ye),hostname:ge.hostname,path:`${ge.pathname}${ge.search}`,port:ge.port,method:re.method,headers:re.headers.toJSON({preserveCase:!0})};return new Promise(((fe,ge)=>{const be=ye?tt.request(ve,fe):rt.request(ve,fe);be.once("error",(he=>{var de;ge(new RestError(he.message,{code:null!==(de=he.code)&&void 0!==de?de:RestError.REQUEST_SEND_ERROR,request:re}))})),he.signal.addEventListener("abort",(()=>{const re=new AbortError("The operation was aborted.");be.destroy(re),ge(re)})),de&&isReadableStream(de)?de.pipe(be):de?"string"==typeof de||Buffer.isBuffer(de)?be.end(de):isArrayBuffer(de)?be.end(ArrayBuffer.isView(de)?Buffer.from(de.buffer):Buffer.from(de)):(me.error("Unrecognized body type",de),ge(new RestError("Unrecognized body type"))):be.end()}))}getOrCreateAgent(re,he){var de;const fe=re.disableKeepAlive;if(he)return fe?tt.globalAgent:(this.cachedHttpAgent||(this.cachedHttpAgent=new tt.Agent({keepAlive:!0})),this.cachedHttpAgent);{if(fe&&!re.tlsSettings)return rt.globalAgent;const he=null!==(de=re.tlsSettings)&&void 0!==de?de:ot;let ge=this.cachedHttpsAgents.get(he);return ge&&ge.options.keepAlive===!fe||(me.info("No cached TLS Agent exist, creating a new Agent"),ge=new rt.Agent(Object.assign({keepAlive:!fe},he)),this.cachedHttpsAgents.set(he,ge)),ge}}}function createDefaultHttpClient(){return function createNodeHttpClient(){return new NodeHttpClient}()}var st=de(76982),at=de.n(st);const ct=new Uint8Array(256);let lt=ct.length;function rng(){return lt>ct.length-16&&(at().randomFillSync(ct),lt=0),ct.slice(lt,lt+=16)}const ut=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const pt=function validate(re){return"string"==typeof re&&ut.test(re)},ht=[];for(let re=0;re<256;++re)ht.push((re+256).toString(16).substr(1));const dt=function stringify(re,he=0){const de=(ht[re[he+0]]+ht[re[he+1]]+ht[re[he+2]]+ht[re[he+3]]+"-"+ht[re[he+4]]+ht[re[he+5]]+"-"+ht[re[he+6]]+ht[re[he+7]]+"-"+ht[re[he+8]]+ht[re[he+9]]+"-"+ht[re[he+10]]+ht[re[he+11]]+ht[re[he+12]]+ht[re[he+13]]+ht[re[he+14]]+ht[re[he+15]]).toLowerCase();if(!pt(de))throw TypeError("Stringified UUID is invalid");return de};const ft=function v4(re,he,de){const fe=(re=re||{}).random||(re.rng||rng)();if(fe[6]=15&fe[6]|64,fe[8]=63&fe[8]|128,he){de=de||0;for(let re=0;re<16;++re)he[de+re]=fe[re];return he}return dt(fe)};class PipelineRequestImpl{constructor(re){var he,de,fe,ge,me,ye,ve;this.url=re.url,this.body=re.body,this.headers=null!==(he=re.headers)&&void 0!==he?he:createHttpHeaders(),this.method=null!==(de=re.method)&&void 0!==de?de:"GET",this.timeout=null!==(fe=re.timeout)&&void 0!==fe?fe:0,this.formData=re.formData,this.disableKeepAlive=null!==(ge=re.disableKeepAlive)&&void 0!==ge&&ge,this.proxySettings=re.proxySettings,this.streamResponseStatusCodes=re.streamResponseStatusCodes,this.withCredentials=null!==(me=re.withCredentials)&&void 0!==me&&me,this.abortSignal=re.abortSignal,this.tracingOptions=re.tracingOptions,this.onUploadProgress=re.onUploadProgress,this.onDownloadProgress=re.onDownloadProgress,this.requestId=re.requestId||function generateUuid(){return ft()}(),this.allowInsecureConnection=null!==(ye=re.allowInsecureConnection)&&void 0!==ye&&ye,this.enableBrowserStreams=null!==(ve=re.enableBrowserStreams)&&void 0!==ve&&ve}}function createPipelineRequest(re){return new PipelineRequestImpl(re)}const gt="exponentialRetryPolicy";function exponentialRetryPolicy(re={}){var he;return retryPolicy([exponentialRetryStrategy(Object.assign(Object.assign({},re),{ignoreSystemErrors:!0}))],{maxRetries:null!==(he=re.maxRetries)&&void 0!==he?he:3})}const mt="systemErrorRetryPolicy";function systemErrorRetryPolicy(re={}){var he;return{name:mt,sendRequest:retryPolicy([exponentialRetryStrategy(Object.assign(Object.assign({},re),{ignoreHttpStatusCodes:!0}))],{maxRetries:null!==(he=re.maxRetries)&&void 0!==he?he:3}).sendRequest}}const yt="throttlingRetryPolicy";function throttlingRetryPolicy(re={}){var he;return{name:yt,sendRequest:retryPolicy([throttlingRetryStrategy()],{maxRetries:null!==(he=re.maxRetries)&&void 0!==he?he:3}).sendRequest}}const vt={forcedRefreshWindowInMs:1e3,retryIntervalInMs:3e3,refreshWindowInMs:12e4};function createTokenCycler(re,he){let de,fe=null,ge=null;const me=Object.assign(Object.assign({},vt),he),ye={get isRefreshing(){return null!==fe},get shouldRefresh(){var re;return!ye.isRefreshing&&(null!==(re=null==ge?void 0:ge.expiresOnTimestamp)&&void 0!==re?re:0)-me.refreshWindowInMs<Date.now()},get mustRefresh(){return null===ge||ge.expiresOnTimestamp-me.forcedRefreshWindowInMs<Date.now()}};function refresh(he,ve){var be;if(!ye.isRefreshing){fe=async function beginRefresh(re,he,de){async function tryGetAccessToken(){if(!(Date.now()<de)){const he=await re();if(null===he)throw new Error("Failed to refresh access token.");return he}try{return await re()}catch(re){return null}}let fe=await tryGetAccessToken();for(;null===fe;)await delay(he),fe=await tryGetAccessToken();return fe}((()=>re.getToken(he,ve)),me.retryIntervalInMs,null!==(be=null==ge?void 0:ge.expiresOnTimestamp)&&void 0!==be?be:Date.now()).then((re=>(fe=null,ge=re,de=ve.tenantId,ge))).catch((re=>{throw fe=null,ge=null,de=void 0,re}))}return fe}return async(re,he)=>de!==he.tenantId||Boolean(he.claims)||ye.mustRefresh?refresh(re,he):(ye.shouldRefresh&&refresh(re,he),ge)}const bt="bearerTokenAuthenticationPolicy";async function defaultAuthorizeRequest(re){const{scopes:he,getAccessToken:de,request:fe}=re,ge={abortSignal:fe.abortSignal,tracingOptions:fe.tracingOptions},me=await de(he,ge);me&&re.request.headers.set("Authorization",`Bearer ${me.token}`)}function bearerTokenAuthenticationPolicy(re){var he;const{credential:de,scopes:fe,challengeCallbacks:ge}=re,ye=re.logger||me,ve=Object.assign({authorizeRequest:null!==(he=null==ge?void 0:ge.authorizeRequest)&&void 0!==he?he:defaultAuthorizeRequest,authorizeRequestOnChallenge:null==ge?void 0:ge.authorizeRequestOnChallenge},ge),be=de?createTokenCycler(de):()=>Promise.resolve(null);return{name:bt,async sendRequest(re,he){if(!re.url.toLowerCase().startsWith("https://"))throw new Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.");let de,ge;await ve.authorizeRequest({scopes:Array.isArray(fe)?fe:[fe],request:re,getAccessToken:be,logger:ye});try{de=await he(re)}catch(re){ge=re,de=re.response}if(ve.authorizeRequestOnChallenge&&401===(null==de?void 0:de.status)&&function getChallenge(re){const he=re.headers.get("WWW-Authenticate");if(401===re.status&&he)return he}(de)){if(await ve.authorizeRequestOnChallenge({scopes:Array.isArray(fe)?fe:[fe],request:re,response:de,getAccessToken:be,logger:ye}))return he(re)}if(ge)throw ge;return de}}}const St="ndJsonPolicy";function ndJsonPolicy(){return{name:St,async sendRequest(re,he){if("string"==typeof re.body&&re.body.startsWith("[")){const he=JSON.parse(re.body);Array.isArray(he)&&(re.body=he.map((re=>JSON.stringify(re)+"\n")).join(""))}return he(re)}}}},87362:(re,he)=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0}),he.default=function once(re,he,{signal:de}={}){return new Promise(((fe,ge)=>{function cleanup(){null==de||de.removeEventListener("abort",cleanup),re.removeListener(he,onEvent),re.removeListener("error",onError)}function onEvent(...re){cleanup(),fe(re)}function onError(re){cleanup(),ge(re)}null==de||de.addEventListener("abort",cleanup),re.on(he,onEvent),re.on("error",onError)}))}},89939:function(re,he,de){"use strict";var fe=this&&this.__awaiter||function(re,he,de,fe){return new(de||(de=Promise))((function(ge,me){function fulfilled(re){try{step(fe.next(re))}catch(re){me(re)}}function rejected(re){try{step(fe.throw(re))}catch(re){me(re)}}function step(re){re.done?ge(re.value):function adopt(re){return re instanceof de?re:new de((function(he){he(re)}))}(re.value).then(fulfilled,rejected)}step((fe=fe.apply(re,he||[])).next())}))},ge=this&&this.__importDefault||function(re){return re&&re.__esModule?re:{default:re}};Object.defineProperty(he,"__esModule",{value:!0});const me=ge(de(69278)),ye=ge(de(64756)),ve=ge(de(87016)),be=ge(de(99171)),Se=ge(de(87362)),we=de(55118),xe=(0,be.default)("http-proxy-agent");class HttpProxyAgent extends we.Agent{constructor(re){let he;if(he="string"==typeof re?ve.default.parse(re):re,!he)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");xe("Creating new HttpProxyAgent instance: %o",he),super(he);const de=Object.assign({},he);this.secureProxy=he.secureProxy||function isHTTPS(re){return"string"==typeof re&&/^https:?$/i.test(re)}(de.protocol),de.host=de.hostname||de.host,"string"==typeof de.port&&(de.port=parseInt(de.port,10)),!de.port&&de.host&&(de.port=this.secureProxy?443:80),de.host&&de.path&&(delete de.path,delete de.pathname),this.proxy=de}callback(re,he){return fe(this,void 0,void 0,(function*(){const{proxy:de,secureProxy:fe}=this,ge=ve.default.parse(re.path);let be;if(ge.protocol||(ge.protocol="http:"),ge.hostname||(ge.hostname=he.hostname||he.host||null),null==ge.port&&(he.port,1)&&(ge.port=String(he.port)),"80"===ge.port&&(ge.port=""),re.path=ve.default.format(ge),de.auth&&re.setHeader("Proxy-Authorization",`Basic ${Buffer.from(de.auth).toString("base64")}`),fe?(xe("Creating `tls.Socket`: %o",de),be=ye.default.connect(de)):(xe("Creating `net.Socket`: %o",de),be=me.default.connect(de)),re._header){let he,de;xe("Regenerating stored HTTP header string for request"),re._header=null,re._implicitHeader(),re.output&&re.output.length>0?(xe("Patching connection write() output buffer with updated header"),he=re.output[0],de=he.indexOf("\r\n\r\n")+4,re.output[0]=re._header+he.substring(de),xe("Output buffer: %o",re.output)):re.outputData&&re.outputData.length>0&&(xe("Patching connection write() output buffer with updated header"),he=re.outputData[0].data,de=he.indexOf("\r\n\r\n")+4,re.outputData[0].data=re._header+he.substring(de),xe("Output buffer: %o",re.outputData[0].data))}return yield(0,Se.default)(be,"connect"),be}))}}he.default=HttpProxyAgent},1958:function(re,he,de){"use strict";const fe=(this&&this.__importDefault||function(re){return re&&re.__esModule?re:{default:re}})(de(89939));function createHttpProxyAgent(re){return new fe.default(re)}!function(re){re.HttpProxyAgent=fe.default,re.prototype=fe.default.prototype}(createHttpProxyAgent||(createHttpProxyAgent={})),re.exports=createHttpProxyAgent},74907:(re,he,de)=>{"use strict";de.d(he,{KV:()=>createClientLogger});var fe=de(70857),ge=de(39023),me=de.n(ge);const ye="undefined"!=typeof process&&process.env&&process.env.DEBUG||void 0;let ve,be=[],Se=[];const we=[];ye&&enable(ye);const xe=Object.assign((re=>createDebugger(re)),{enable,enabled,disable:function disable(){const re=ve||"";return enable(""),re},log:function log(re,...he){process.stderr.write(`${me().format(re,...he)}${fe.EOL}`)}});function enable(re){ve=re,be=[],Se=[];const he=/\*/g,de=re.split(",").map((re=>re.trim().replace(he,".*?")));for(const re of de)re.startsWith("-")?Se.push(new RegExp(`^${re.substr(1)}$`)):be.push(new RegExp(`^${re}$`));for(const re of we)re.enabled=enabled(re.namespace)}function enabled(re){if(re.endsWith("*"))return!0;for(const he of Se)if(he.test(re))return!1;for(const he of be)if(he.test(re))return!0;return!1}function createDebugger(re){const he=Object.assign((function debug(...de){if(!he.enabled)return;de.length>0&&(de[0]=`${re} ${de[0]}`);he.log(...de)}),{enabled:enabled(re),destroy,log:xe.log,namespace:re,extend});return we.push(he),he}function destroy(){const re=we.indexOf(this);return re>=0&&(we.splice(re,1),!0)}function extend(re){const he=createDebugger(`${this.namespace}:${re}`);return he.log=this.log,he}const Ee=xe,_e=new Set,ke="undefined"!=typeof process&&process.env&&process.env.AZURE_LOG_LEVEL||void 0;let Oe;const Ce=Ee("azure");Ce.log=(...re)=>{Ee.log(...re)};const Ae=["verbose","info","warning","error"];ke&&(isAzureLogLevel(ke)?function setLogLevel(re){if(re&&!isAzureLogLevel(re))throw new Error(`Unknown log level '${re}'. Acceptable values: ${Ae.join(",")}`);Oe=re;const he=[];for(const re of _e)shouldEnable(re)&&he.push(re.namespace);Ee.enable(he.join(","))}(ke):console.error(`AZURE_LOG_LEVEL set to unknown log level '${ke}'; logging is not enabled. Acceptable values: ${Ae.join(", ")}.`));const Te={verbose:400,info:300,warning:200,error:100};function createClientLogger(re){const he=Ce.extend(re);return patchLogMethod(Ce,he),{error:createLogger(he,"error"),warning:createLogger(he,"warning"),info:createLogger(he,"info"),verbose:createLogger(he,"verbose")}}function patchLogMethod(re,he){he.log=(...he)=>{re.log(...he)}}function createLogger(re,he){const de=Object.assign(re.extend(he),{level:he});if(patchLogMethod(re,de),shouldEnable(de)){const re=Ee.disable();Ee.enable(re+","+de.namespace)}return _e.add(de),de}function shouldEnable(re){return Boolean(Oe&&Te[re.level]<=Te[Oe])}function isAzureLogLevel(re){return Ae.includes(re)}},57309:(re,he,de)=>{"use strict";de.r(he),de.d(he,{createAzureSdkInstrumentation:()=>createAzureSdkInstrumentation,logger:()=>fe});const fe=(0,de(74907).KV)("opentelemetry-instrumentation-azure-sdk");var ge=de(4614),me=de(96030),ye=de(20634),ve=de(72390),be=de(18586),Se=de(90735),we=de(60701),xe=de(35807),Ee=de(48478);class OpenTelemetrySpanWrapper{constructor(re){this._span=re}setStatus(re){"error"===re.status?re.error?(this._span.setStatus({code:Ee.s.ERROR,message:re.error.toString()}),this.recordException(re.error)):this._span.setStatus({code:Ee.s.ERROR}):"success"===re.status&&this._span.setStatus({code:Ee.s.OK})}setAttribute(re,he){null!=he&&this._span.setAttribute(re,he)}end(){this._span.end()}recordException(re){this._span.recordException(re)}isRecording(){return this._span.isRecording()}unwrap(){return this._span}}const _e=new Map;function envVarToBoolean(re){var he;_e.has(re)||function loadEnvironmentVariable(re){var he;if("undefined"!=typeof process&&process.env){const de=null!==(he=process.env[re])&&void 0!==he?he:process.env[re.toLowerCase()];_e.set(re,de)}}(re);const de=(null!==(he=_e.get(re))&&void 0!==he?he:"").toLowerCase();return"false"!==de&&"0"!==de&&Boolean(de)}var ke=de(93573);function toOpenTelemetrySpanAttributes(re){const he={};for(const de in re)null!==re[de]&&void 0!==re[de]&&(he[de]=re[de]);return he}function toSpanOptions(re){const{spanAttributes:he,spanLinks:de,spanKind:fe}=re||{},ge=toOpenTelemetrySpanAttributes(he),me=function toOpenTelemetrySpanKind(re){const he=(re||"internal").toUpperCase();return ke.v[he]}(fe),ye=function toOpenTelemetryLinks(re=[]){return re.reduce(((re,he)=>{const de=ve.u.getSpanContext(he.tracingContext);return de&&re.push({context:de,attributes:toOpenTelemetrySpanAttributes(he.attributes)}),re}),[])}(de);return{attributes:ge,kind:me,links:ye}}const Oe=new we.lm;class OpenTelemetryInstrumenter{startSpan(re,he){let de,fe=(null==he?void 0:he.tracingContext)||ye._.active();return envVarToBoolean("AZURE_TRACING_DISABLED")?de=ve.u.wrapSpanContext(be.dM):(de=ve.u.getTracer(he.packageName,he.packageVersion).startSpan(re,toSpanOptions(he),fe),envVarToBoolean("AZURE_HTTP_TRACING_CHILDREN_DISABLED")&&re.toUpperCase().startsWith("HTTP")&&(fe=(0,xe.M1)(fe))),{span:new OpenTelemetrySpanWrapper(de),tracingContext:ve.u.setSpan(fe,de)}}withContext(re,he,...de){return ye._.with(re,he,void 0,...de)}parseTraceparentHeader(re){return Oe.extract(ye._.active(),{traceparent:re},Se.q)}createRequestHeaders(re){const he={};return Oe.inject(re||ye._.active(),he,Se.U),he}}class AzureSdkInstrumentation extends ge.O{constructor(re={}){super("@azure/opentelemetry-instrumentation-azure-sdk","1.0.0-beta.5",Object.assign({},re))}init(){const re=new me.w("@azure/core-tracing",["^1.0.0-preview.14","^1.0.0"],(re=>("function"==typeof re.useInstrumenter&&re.useInstrumenter(new OpenTelemetryInstrumenter),re)));return re.includePrerelease=!0,re}}function createAzureSdkInstrumentation(re={}){return new AzureSdkInstrumentation(re)}},48856:(re,he,de)=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0}),he.shouldHighlight=shouldHighlight,he.getChalk=getChalk,he.default=function highlight(re,he={}){if(shouldHighlight(he)){const de=function getDefs(re){return{keyword:re.cyan,capitalized:re.yellow,jsx_tag:re.yellow,punctuator:re.yellow,number:re.magenta,string:re.green,regex:re.magenta,comment:re.grey,invalid:re.white.bgRed.bold}}(getChalk(he));return function highlightTokens(re,he){return he.replace(fe.default,(function(...he){const de=function getTokenType(re){const[he,de]=re.slice(-2),me=(0,fe.matchToToken)(re);if("name"===me.type){if((0,ge.isKeyword)(me.value)||(0,ge.isReservedWord)(me.value))return"keyword";if(ve.test(me.value)&&("<"===de[he-1]||"</"==de.substr(he-2,2)))return"jsx_tag";if(me.value[0]!==me.value[0].toLowerCase())return"capitalized"}if("punctuator"===me.type&&be.test(me.value))return"bracket";if("invalid"===me.type&&("@"===me.value||"#"===me.value))return"punctuator";return me.type}(he),me=re[de];return me?he[0].split(ye).map((re=>me(re))).join("\n"):he[0]}))}(de,re)}return re};var fe=function _interopRequireWildcard(re){if(re&&re.__esModule)return re;if(null===re||"object"!=typeof re&&"function"!=typeof re)return{default:re};var he=_getRequireWildcardCache();if(he&&he.has(re))return he.get(re);var de={},fe=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var ge in re)if(Object.prototype.hasOwnProperty.call(re,ge)){var me=fe?Object.getOwnPropertyDescriptor(re,ge):null;me&&(me.get||me.set)?Object.defineProperty(de,ge,me):de[ge]=re[ge]}de.default=re,he&&he.set(re,de);return de}(de(15465)),ge=de(47422),me=function _interopRequireDefault(re){return re&&re.__esModule?re:{default:re}}(de(171));function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var re=new WeakMap;return _getRequireWildcardCache=function(){return re},re}const ye=/\r\n|[\n\r\u2028\u2029]/,ve=/^[a-z][\w-]*$/i,be=/^[()[\]{}]$/;function shouldHighlight(re){return me.default.supportsColor||re.forceColor}function getChalk(re){let he=me.default;return re.forceColor&&(he=new me.default.constructor({enabled:!0,level:1})),he}},6739:(re,he)=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0}),he.isIdentifierStart=isIdentifierStart,he.isIdentifierChar=isIdentifierChar,he.isIdentifierName=function isIdentifierName(re){let he=!0;for(let de=0,fe=Array.from(re);de<fe.length;de++){const re=fe[de].codePointAt(0);if(he){if(!isIdentifierStart(re))return!1;he=!1}else if(!isIdentifierChar(re))return!1}return!he};let de="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࢠ-ࢴࢶ-ࣇऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-鿼ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞿꟂ-ꟊꟵ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",fe="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࣓-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿᫀᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷹᷻-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_";const ge=new RegExp("["+de+"]"),me=new RegExp("["+de+fe+"]");de=fe=null;const ye=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,107,20,28,22,13,52,76,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,230,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,