@adsk-platform/httpclient 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.es.js","sources":["../../../node_modules/@microsoft/kiota-abstractions/dist/es/src/serialization/parseNodeFactoryRegistry.js","../../../node_modules/@microsoft/kiota-abstractions/dist/es/src/serialization/parseNodeProxyFactory.js","../../../node_modules/@microsoft/kiota-abstractions/dist/es/src/serialization/serializationWriterFactoryRegistry.js","../../../node_modules/@microsoft/kiota-abstractions/dist/es/src/serialization/serializationWriterProxyFactory.js","../../../node_modules/@microsoft/kiota-abstractions/dist/es/src/store/backingStoreParseNodeFactory.js","../../../node_modules/@microsoft/kiota-abstractions/dist/es/src/store/backingStoreSerializationWriterProxyFactory.js","../../../node_modules/@microsoft/kiota-abstractions/dist/es/src/utils/guidUtils.js","../../../node_modules/@microsoft/kiota-abstractions/dist/es/src/utils/inNodeEnv.js","../../../node_modules/@microsoft/kiota-abstractions/dist/es/src/store/inMemoryBackingStore.js","../../../node_modules/@microsoft/kiota-abstractions/dist/es/src/store/inMemoryBackingStoreFactory.js","../../../node_modules/@microsoft/kiota-abstractions/dist/es/src/apiClientBuilder.js","../../../node_modules/@opentelemetry/api/build/esm/platform/browser/globalThis.js","../../../node_modules/@opentelemetry/api/build/esm/version.js","../../../node_modules/@opentelemetry/api/build/esm/internal/semver.js","../../../node_modules/@opentelemetry/api/build/esm/internal/global-utils.js","../../../node_modules/@opentelemetry/api/build/esm/diag/ComponentLogger.js","../../../node_modules/@opentelemetry/api/build/esm/diag/types.js","../../../node_modules/@opentelemetry/api/build/esm/diag/internal/logLevelLogger.js","../../../node_modules/@opentelemetry/api/build/esm/api/diag.js","../../../node_modules/@opentelemetry/api/build/esm/context/context.js","../../../node_modules/@opentelemetry/api/build/esm/context/NoopContextManager.js","../../../node_modules/@opentelemetry/api/build/esm/api/context.js","../../../node_modules/@opentelemetry/api/build/esm/trace/trace_flags.js","../../../node_modules/@opentelemetry/api/build/esm/trace/invalid-span-constants.js","../../../node_modules/@opentelemetry/api/build/esm/trace/NonRecordingSpan.js","../../../node_modules/@opentelemetry/api/build/esm/trace/context-utils.js","../../../node_modules/@opentelemetry/api/build/esm/trace/spancontext-utils.js","../../../node_modules/@opentelemetry/api/build/esm/trace/NoopTracer.js","../../../node_modules/@opentelemetry/api/build/esm/trace/ProxyTracer.js","../../../node_modules/@opentelemetry/api/build/esm/trace/NoopTracerProvider.js","../../../node_modules/@opentelemetry/api/build/esm/trace/ProxyTracerProvider.js","../../../node_modules/@opentelemetry/api/build/esm/trace/status.js","../../../node_modules/@opentelemetry/api/build/esm/api/trace.js","../../../node_modules/@opentelemetry/api/build/esm/trace-api.js","../../../node_modules/tinyduration/dist/index.js","../../../node_modules/@microsoft/kiota-abstractions/dist/es/src/recordWithCaseInsensitiveKeys.js","../../../node_modules/@microsoft/kiota-abstractions/dist/es/src/headers.js","../../../node_modules/@microsoft/kiota-abstractions/dist/es/src/httpMethod.js","../../../node_modules/@microsoft/kiota-abstractions/dist/es/src/apiError.js","../../../node_modules/@microsoft/kiota-abstractions/dist/es/src/authentication/apiKeyAuthenticationProvider.js","../../../node_modules/@microsoft/kiota-abstractions/dist/es/src/authentication/baseBearerTokenAuthenticationProvider.js","../../../node_modules/@microsoft/kiota-abstractions/dist/es/src/nativeResponseHandler.js","../../../node_modules/@microsoft/kiota-abstractions/dist/es/src/nativeResponseWrapper.js","../../../node_modules/@microsoft/kiota-abstractions/dist/es/src/responseHandlerOptions.js","../../../node_modules/@microsoft/kiota-http-fetchlibrary/dist/es/src/middlewares/customFetchHandler.js","../../../node_modules/@microsoft/kiota-http-fetchlibrary/dist/es/src/httpClient.js","../../../node_modules/@microsoft/kiota-http-fetchlibrary/dist/es/src/observabilityOptions.js","../../../node_modules/@microsoft/kiota-http-fetchlibrary/dist/es/src/fetchRequestAdapter.js","../../../node_modules/@microsoft/kiota-http-fetchlibrary/dist/es/src/utils/headersUtil.js","../../../node_modules/@microsoft/kiota-http-fetchlibrary/dist/es/src/middlewares/options/chaosStrategy.js","../../../node_modules/@microsoft/kiota-http-fetchlibrary/dist/es/src/middlewares/options/compressionHandlerOptions.js","../../../node_modules/@microsoft/kiota-http-fetchlibrary/dist/es/src/middlewares/compressionHandler.js","../../../node_modules/@microsoft/kiota-http-fetchlibrary/dist/es/src/middlewares/options/headersInspectionOptions.js","../../../node_modules/@microsoft/kiota-http-fetchlibrary/dist/es/src/middlewares/headersInspectionHandler.js","../../../node_modules/@microsoft/kiota-http-fetchlibrary/dist/es/src/middlewares/options/parametersNameDecodingOptions.js","../../../node_modules/@microsoft/kiota-http-fetchlibrary/dist/es/src/middlewares/parametersNameDecodingHandler.js","../../../node_modules/@microsoft/kiota-http-fetchlibrary/dist/es/src/middlewares/options/redirectHandlerOptions.js","../../../node_modules/@microsoft/kiota-http-fetchlibrary/dist/es/src/middlewares/redirectHandler.js","../../../node_modules/@microsoft/kiota-http-fetchlibrary/dist/es/src/middlewares/options/retryHandlerOptions.js","../../../node_modules/@microsoft/kiota-http-fetchlibrary/dist/es/src/middlewares/retryHandler.js","../../../node_modules/@microsoft/kiota-http-fetchlibrary/dist/es/src/middlewares/options/version.js","../../../node_modules/@microsoft/kiota-http-fetchlibrary/dist/es/src/middlewares/options/userAgentHandlerOptions.js","../../../node_modules/@microsoft/kiota-http-fetchlibrary/dist/es/src/middlewares/userAgentHandler.js","../../../node_modules/@microsoft/kiota-http-fetchlibrary/dist/es/src/middlewares/options/urlReplaceHandlerOptions.js","../../../node_modules/@microsoft/kiota-http-fetchlibrary/dist/es/src/middlewares/urlReplaceHandler.js","../../../node_modules/@microsoft/kiota-http-fetchlibrary/dist/es/src/middlewares/middlewareFactory.js","../src/middleware/options/errorHandlerOptions.ts","../src/middleware/errorHandler.ts","../src/accessTokenProvider.ts","../src/httpClientFactory.ts"],"sourcesContent":["/**\n * This factory holds a list of all the registered factories for the various types of nodes.\n */\nexport class ParseNodeFactoryRegistry {\n constructor() {\n /**\n * The content type for JSON data.\n */\n this.jsonContentType = \"application/json\";\n /** List of factories that are registered by content type. */\n this.contentTypeAssociatedFactories = new Map();\n }\n getValidContentType() {\n throw new Error(\"The registry supports multiple content types. Get the registered factory instead.\");\n }\n /**\n * Creates a {@link ParseNode} from the given {@link ArrayBuffer} and content type.\n * @param contentType the content type of the {@link ArrayBuffer}.\n * @param content the {@link ArrayBuffer} to read from.\n * @returns a {@link ParseNode} that can deserialize the given {@link ArrayBuffer}.\n */\n getRootParseNode(contentType, content) {\n if (!contentType) {\n throw new Error(\"content type cannot be undefined or empty\");\n }\n if (!content) {\n throw new Error(\"content cannot be undefined or empty\");\n }\n const vendorSpecificContentType = contentType.split(\";\")[0];\n let factory = this.contentTypeAssociatedFactories.get(vendorSpecificContentType);\n if (factory) {\n return factory.getRootParseNode(vendorSpecificContentType, content);\n }\n const cleanedContentType = vendorSpecificContentType.replace(/[^/]+\\+/gi, \"\");\n factory = this.contentTypeAssociatedFactories.get(cleanedContentType);\n if (factory) {\n return factory.getRootParseNode(cleanedContentType, content);\n }\n throw new Error(`Content type ${cleanedContentType} does not have a factory registered to be parsed`);\n }\n /**\n * Registers the default deserializer to the registry.\n * @param type the class of the factory to be registered.\n * @param backingStoreFactory The backing store factory to use.\n */\n registerDefaultDeserializer(type, backingStoreFactory) {\n if (!type)\n throw new Error(\"Type is required\");\n const deserializer = new type(backingStoreFactory);\n this.contentTypeAssociatedFactories.set(deserializer.getValidContentType(), deserializer);\n }\n /**\n * Deserializes a buffer into a parsable object\n * @param bufferOrString the value to serialize\n * @param factory the factory for the model type\n * @returns the deserialized parsable object\n */\n deserializeFromJson(bufferOrString, factory) {\n return this.deserialize(this.jsonContentType, bufferOrString, factory);\n }\n /**\n * Deserializes a buffer into a collection of parsable object\n * @param bufferOrString the value to serialize\n * @param factory the factory for the model type\n * @returns the deserialized collection of parsable objects\n */\n deserializeCollectionFromJson(bufferOrString, factory) {\n return this.deserializeCollection(this.jsonContentType, bufferOrString, factory);\n }\n /**\n * Deserializes a buffer into a parsable object\n * @param contentType the content type to serialize to\n * @param bufferOrString the value to serialize\n * @param factory the factory for the model type\n * @returns the deserialized parsable object\n */\n deserialize(contentType, bufferOrString, factory) {\n if (typeof bufferOrString === \"string\") {\n bufferOrString = this.getBufferFromString(bufferOrString);\n }\n const reader = this.getParseNode(contentType, bufferOrString, factory);\n return reader.getObjectValue(factory);\n }\n /**\n * Deserializes a buffer into a parsable object\n * @param contentType the content type to serialize to\n * @param buffer the value to deserialize\n * @param factory the factory for the model type\n * @returns the deserialized parsable object\n */\n getParseNode(contentType, buffer, factory) {\n if (!contentType) {\n throw new Error(\"content type cannot be undefined or empty\");\n }\n if (!buffer) {\n throw new Error(\"buffer cannot be undefined\");\n }\n if (!factory) {\n throw new Error(\"factory cannot be undefined\");\n }\n return this.getRootParseNode(contentType, buffer);\n }\n /**\n * Deserializes a buffer into a collection of parsable object\n * @param contentType the content type to serialize to\n * @param bufferOrString the value to serialize\n * @param factory the factory for the model type\n * @returns the deserialized collection of parsable objects\n */\n deserializeCollection(contentType, bufferOrString, factory) {\n if (typeof bufferOrString === \"string\") {\n bufferOrString = this.getBufferFromString(bufferOrString);\n }\n const reader = this.getParseNode(contentType, bufferOrString, factory);\n return reader.getCollectionOfObjectValues(factory);\n }\n /**\n * Deserializes a buffer into a a collection of parsable object\n * @param value the string to get a buffer from\n * @returns the ArrayBuffer representation of the string\n */\n getBufferFromString(value) {\n const encoder = new TextEncoder();\n return encoder.encode(value).buffer;\n }\n}\n//# sourceMappingURL=parseNodeFactoryRegistry.js.map","/** Proxy factory that allows the composition of before and after callbacks on existing factories. */\nexport class ParseNodeProxyFactory {\n getValidContentType() {\n return this._concrete.getValidContentType();\n }\n /**\n * Creates a new proxy factory that wraps the specified concrete factory while composing the before and after callbacks.\n * @param _concrete the concrete factory to wrap\n * @param _onBefore the callback to invoke before the deserialization of any model object.\n * @param _onAfter the callback to invoke after the deserialization of any model object.\n */\n constructor(_concrete, _onBefore, _onAfter) {\n this._concrete = _concrete;\n this._onBefore = _onBefore;\n this._onAfter = _onAfter;\n if (!_concrete) {\n throw new Error(\"_concrete cannot be undefined\");\n }\n }\n getRootParseNode(contentType, content) {\n const node = this._concrete.getRootParseNode(contentType, content);\n const originalBefore = node.onBeforeAssignFieldValues;\n const originalAfter = node.onAfterAssignFieldValues;\n node.onBeforeAssignFieldValues = (value) => {\n if (this._onBefore)\n this._onBefore(value);\n if (originalBefore)\n originalBefore(value);\n };\n node.onAfterAssignFieldValues = (value) => {\n if (this._onAfter)\n this._onAfter(value);\n if (originalAfter)\n originalAfter(value);\n };\n return node;\n }\n}\n//# sourceMappingURL=parseNodeProxyFactory.js.map","/** This factory holds a list of all the registered factories for the various types of nodes. */\nexport class SerializationWriterFactoryRegistry {\n constructor() {\n /**\n * The content type for JSON data.\n */\n this.jsonContentType = \"application/json\";\n /** List of factories that are registered by content type. */\n this.contentTypeAssociatedFactories = new Map();\n }\n getValidContentType() {\n throw new Error(\"The registry supports multiple content types. Get the registered factory instead.\");\n }\n getSerializationWriter(contentType) {\n if (!contentType) {\n throw new Error(\"content type cannot be undefined or empty\");\n }\n const vendorSpecificContentType = contentType.split(\";\")[0];\n let factory = this.contentTypeAssociatedFactories.get(vendorSpecificContentType);\n if (factory) {\n return factory.getSerializationWriter(vendorSpecificContentType);\n }\n const cleanedContentType = vendorSpecificContentType.replace(/[^/]+\\+/gi, \"\");\n factory = this.contentTypeAssociatedFactories.get(cleanedContentType);\n if (factory) {\n return factory.getSerializationWriter(cleanedContentType);\n }\n throw new Error(`Content type ${cleanedContentType} does not have a factory registered to be serialized`);\n }\n /**\n * Registers the default serializer to the registry.\n * @param type the class of the factory to be registered.\n */\n registerDefaultSerializer(type) {\n if (!type)\n throw new Error(\"Type is required\");\n const serializer = new type();\n this.contentTypeAssociatedFactories.set(serializer.getValidContentType(), serializer);\n }\n /**\n * Serializes a parsable object into a buffer\n * @param value the value to serialize\n * @param serializationFunction the serialization function for the model type\n * @returns a buffer containing the serialized value\n */\n serializeToJson(value, serializationFunction) {\n return this.serialize(this.jsonContentType, value, serializationFunction);\n }\n /**\n * Serializes a parsable object into a string representation\n * @param value the value to serialize\n * @param serializationFunction the serialization function for the model type\n * @returns a string representing the serialized value\n */\n serializeToJsonAsString(value, serializationFunction) {\n return this.serializeToString(this.jsonContentType, value, serializationFunction);\n }\n /**\n * Serializes a collection of parsable objects into a buffer\n * @param values the value to serialize\n * @param serializationFunction the serialization function for the model type\n * @returns a string representing the serialized value\n */\n serializeCollectionToJson(values, serializationFunction) {\n return this.serializeCollection(this.jsonContentType, values, serializationFunction);\n }\n /**\n * Serializes a collection of parsable objects into a string representation\n * @param values the value to serialize\n * @param serializationFunction the serialization function for the model type\n * @returns a string representing the serialized value\n */\n serializeCollectionToJsonAsString(values, serializationFunction) {\n return this.serializeCollectionToString(this.jsonContentType, values, serializationFunction);\n }\n /**\n * Serializes a parsable object into a buffer\n * @param contentType the content type to serialize to\n * @param value the value to serialize\n * @param serializationFunction the serialization function for the model type\n * @returns a buffer containing the serialized value\n */\n serialize(contentType, value, serializationFunction) {\n const writer = this.getSerializationFactoryWriter(contentType, value, serializationFunction);\n writer.writeObjectValue(undefined, value, serializationFunction);\n return writer.getSerializedContent();\n }\n /**\n * Serializes a parsable object into a string representation\n * @param contentType the content type to serialize to\n * @param value the value to serialize\n * @param serializationFunction the serialization function for the model type\n * @returns a string representing the serialized value\n */\n serializeToString(contentType, value, serializationFunction) {\n const buffer = this.serialize(contentType, value, serializationFunction);\n return this.getStringValueFromBuffer(buffer);\n }\n /**\n * Serializes a collection of parsable objects into a buffer\n * @param contentType the content type to serialize to\n * @param values the value to serialize\n * @param serializationFunction the serialization function for the model type\n * @returns a string representing the serialized value\n */\n serializeCollection(contentType, values, serializationFunction) {\n const writer = this.getSerializationFactoryWriter(contentType, values, serializationFunction);\n writer.writeCollectionOfObjectValues(undefined, values, serializationFunction);\n return writer.getSerializedContent();\n }\n /**\n * Serializes a collection of parsable objects into a string representation\n * @param contentType the content type to serialize to\n * @param values the value to serialize\n * @param serializationFunction the serialization function for the model type\n * @returns a string representing the serialized value\n */\n serializeCollectionToString(contentType, values, serializationFunction) {\n const buffer = this.serializeCollection(contentType, values, serializationFunction);\n return this.getStringValueFromBuffer(buffer);\n }\n /**\n * Gets a serialization writer for a given content type\n * @param contentType the content type to serialize to\n * @param value the value to serialize\n * @param serializationFunction the serialization function for the model type\n * @returns the serialization writer for the given content type\n */\n getSerializationFactoryWriter(contentType, value, serializationFunction) {\n if (!contentType) {\n throw new Error(\"content type cannot be undefined or empty\");\n }\n if (!value) {\n throw new Error(\"value cannot be undefined\");\n }\n if (!serializationFunction) {\n throw new Error(\"serializationFunction cannot be undefined\");\n }\n return this.getSerializationWriter(contentType);\n }\n /**\n * Gets a string value from a buffer\n * @param buffer the buffer to get a string from\n * @returns the string representation of the buffer\n */\n getStringValueFromBuffer(buffer) {\n const decoder = new TextDecoder();\n return decoder.decode(buffer);\n }\n}\n//# sourceMappingURL=serializationWriterFactoryRegistry.js.map","/** Proxy factory that allows the composition of before and after callbacks on existing factories. */\nexport class SerializationWriterProxyFactory {\n getValidContentType() {\n return this._concrete.getValidContentType();\n }\n /**\n * Creates a new proxy factory that wraps the specified concrete factory while composing the before and after callbacks.\n * @param _concrete the concrete factory to wrap\n * @param _onBefore the callback to invoke before the serialization of any model object.\n * @param _onAfter the callback to invoke after the serialization of any model object.\n * @param _onStart the callback to invoke when the serialization of a model object starts\n */\n constructor(_concrete, _onBefore, _onAfter, _onStart) {\n this._concrete = _concrete;\n this._onBefore = _onBefore;\n this._onAfter = _onAfter;\n this._onStart = _onStart;\n if (!_concrete) {\n throw new Error(\"_concrete cannot be undefined\");\n }\n }\n getSerializationWriter(contentType) {\n const writer = this._concrete.getSerializationWriter(contentType);\n const originalBefore = writer.onBeforeObjectSerialization;\n const originalAfter = writer.onAfterObjectSerialization;\n const originalStart = writer.onStartObjectSerialization;\n writer.onBeforeObjectSerialization = (value) => {\n if (this._onBefore)\n this._onBefore(value);\n if (originalBefore)\n originalBefore(value);\n };\n writer.onAfterObjectSerialization = (value) => {\n if (this._onAfter)\n this._onAfter(value);\n if (originalAfter)\n originalAfter(value);\n };\n writer.onStartObjectSerialization = (value, writer_) => {\n if (this._onStart)\n this._onStart(value, writer_);\n if (originalStart)\n originalStart(value, writer_);\n };\n return writer;\n }\n}\n//# sourceMappingURL=serializationWriterProxyFactory.js.map","/**\n * -------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.\n * See License in the project root for license information.\n * -------------------------------------------------------------------------------------------\n */\nimport { ParseNodeProxyFactory } from \"../serialization/index.js\";\n/** Proxy implementation of ParseNodeFactory for the backing store that automatically sets the state of the backing store when deserializing. */\nexport class BackingStoreParseNodeFactory extends ParseNodeProxyFactory {\n /**\n * Initializes a new instance of the BackingStoreParseNodeFactory class given the concrete implementation.\n * @param concrete the concrete implementation of the ParseNodeFactory\n */\n constructor(concrete) {\n super(concrete, (value) => {\n const backedModel = value;\n if (backedModel === null || backedModel === void 0 ? void 0 : backedModel.backingStore) {\n backedModel.backingStore.initializationCompleted = false;\n }\n }, (value) => {\n const backedModel = value;\n if (backedModel === null || backedModel === void 0 ? void 0 : backedModel.backingStore) {\n backedModel.backingStore.initializationCompleted = true;\n }\n });\n }\n}\n//# sourceMappingURL=backingStoreParseNodeFactory.js.map","/**\n * -------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.\n * See License in the project root for license information.\n * -------------------------------------------------------------------------------------------\n */\nimport { SerializationWriterProxyFactory } from \"../serialization/index.js\";\n/** Proxy implementation of SerializationWriterFactory for the backing store that automatically sets the state of the backing store when serializing. */\nexport class BackingStoreSerializationWriterProxyFactory extends SerializationWriterProxyFactory {\n /**\n * Initializes a new instance of the BackingStoreSerializationWriterProxyFactory class given a concrete implementation of SerializationWriterFactory.\n * @param concrete a concrete implementation of SerializationWriterFactory to wrap.\n */\n constructor(concrete) {\n super(concrete, (value) => {\n const backedModel = value;\n if (backedModel === null || backedModel === void 0 ? void 0 : backedModel.backingStore) {\n backedModel.backingStore.returnOnlyChangedValues = true;\n }\n }, (value) => {\n const backedModel = value;\n if (backedModel === null || backedModel === void 0 ? void 0 : backedModel.backingStore) {\n backedModel.backingStore.returnOnlyChangedValues = false;\n backedModel.backingStore.initializationCompleted = true;\n }\n }, (value, writer) => {\n const backedModel = value;\n if (backedModel === null || backedModel === void 0 ? void 0 : backedModel.backingStore) {\n const keys = backedModel.backingStore.enumerateKeysForValuesChangedToNull();\n for (const key of keys) {\n writer.writeNullValue(key);\n }\n }\n });\n }\n}\n//# sourceMappingURL=backingStoreSerializationWriterProxyFactory.js.map","const guidValidator = /^[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}$/i;\n/**\n * Checks if the string is a valid GUID.\n * @param source the string to check.\n * @returns unchanged string if it is a valid GUID; otherwise, undefined.\n */\nexport const parseGuidString = (source) => {\n if (source && guidValidator.test(source)) {\n return source;\n }\n return undefined;\n};\n/**\n * Generates a GUID.\n * @returns a GUID.\n */\nexport const createGuid = () => [gen(2), gen(1), gen(1), gen(1), gen(3)].join(\"-\");\n/**\n * Generates a empty GUID.\n * @returns a empty GUID.\n */\nexport const createEmptyGuid = () => \"00000000-0000-0000-0000-000000000000\";\n/**\n * Generates a part of a GUID.\n * @param count the number of 2 byte chunks to generate.\n * @returns a part of a GUID.\n */\nconst gen = (count) => {\n let out = \"\";\n for (let i = 0; i < count; i++) {\n // eslint-disable-next-line no-bitwise\n out += (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1);\n }\n return out;\n};\n//# sourceMappingURL=guidUtils.js.map","/**\n * -------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.\n * See License in the project root for license information.\n * -------------------------------------------------------------------------------------------\n */\n/**\n * Checks if the runtime is in a browser or node environment.\n * @returns true if in node, else false as it is running in a browser.\n */\nexport const inNodeEnv = () => {\n try {\n return !!Buffer && !!process;\n }\n catch (err) {\n // ReferenceError is thrown if you use node js APIs in a browser,\n // cast it to a false if that's the case.\n return !(err instanceof ReferenceError);\n }\n};\n//# sourceMappingURL=inNodeEnv.js.map","import { createGuid } from \"../utils/index.js\";\n/** In-memory implementation of the backing store. Allows for dirty tracking of changes. */\nexport class InMemoryBackingStore {\n constructor() {\n this.subscriptions = new Map();\n this.store = new Map();\n this.returnOnlyChangedValues = false;\n this._initializationCompleted = true;\n }\n get(key) {\n const wrapper = this.store.get(key);\n if (wrapper && ((this.returnOnlyChangedValues && wrapper.changed) || !this.returnOnlyChangedValues)) {\n return wrapper.value;\n }\n return undefined;\n }\n set(key, value) {\n const oldValueWrapper = this.store.get(key);\n const oldValue = oldValueWrapper === null || oldValueWrapper === void 0 ? void 0 : oldValueWrapper.value;\n if (oldValueWrapper) {\n oldValueWrapper.value = value;\n oldValueWrapper.changed = this.initializationCompleted;\n }\n else {\n this.store.set(key, {\n changed: this.initializationCompleted,\n value,\n });\n }\n this.subscriptions.forEach((sub) => {\n sub(key, oldValue, value);\n });\n }\n enumerate() {\n let filterableArray = [...this.store.entries()];\n if (this.returnOnlyChangedValues) {\n filterableArray = filterableArray.filter(([_, v]) => v.changed);\n }\n return filterableArray.map(([key, value]) => {\n return { key, value };\n });\n }\n enumerateKeysForValuesChangedToNull() {\n const keys = [];\n for (const [key, entry] of this.store) {\n if (entry.changed && !entry.value) {\n keys.push(key);\n }\n }\n return keys;\n }\n subscribe(callback, subscriptionId) {\n if (!callback) {\n throw new Error(\"callback cannot be undefined\");\n }\n subscriptionId = subscriptionId !== null && subscriptionId !== void 0 ? subscriptionId : createGuid();\n this.subscriptions.set(subscriptionId, callback);\n return subscriptionId;\n }\n unsubscribe(subscriptionId) {\n this.subscriptions.delete(subscriptionId);\n }\n clear() {\n this.store.clear();\n }\n set initializationCompleted(value) {\n this._initializationCompleted = value;\n this.store.forEach((v) => {\n v.changed = !value;\n });\n }\n get initializationCompleted() {\n return this._initializationCompleted;\n }\n}\n//# sourceMappingURL=inMemoryBackingStore.js.map","import { InMemoryBackingStore } from \"./inMemoryBackingStore.js\";\n/** This class is used to create instances of InMemoryBackingStore */\nexport class InMemoryBackingStoreFactory {\n createBackingStore() {\n return new InMemoryBackingStore();\n }\n}\n//# sourceMappingURL=inMemoryBackingStoreFactory.js.map","/**\n * -------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.\n * See License in the project root for license information.\n * -------------------------------------------------------------------------------------------\n */\nimport { ParseNodeFactoryRegistry, SerializationWriterFactoryRegistry } from \"./serialization/index.js\";\nimport { BackingStoreParseNodeFactory, BackingStoreSerializationWriterProxyFactory } from \"./store/index.js\";\n/**\n * Enables the backing store on default serialization writers and the given serialization writer.\n * @param serializationWriterFactoryRegistry The serialization writer factory registry to enable the backing store on.\n * @param parseNodeFactoryRegistry The parse node factory registry to enable the backing store on.\n * @param original The serialization writer to enable the backing store on.\n * @returns A new serialization writer with the backing store enabled.\n */\nexport function enableBackingStoreForSerializationWriterFactory(serializationWriterFactoryRegistry, parseNodeFactoryRegistry, original) {\n if (!original)\n throw new Error(\"Original must be specified\");\n let result = original;\n if (original instanceof SerializationWriterFactoryRegistry) {\n enableBackingStoreForSerializationRegistry(original);\n }\n else {\n result = new BackingStoreSerializationWriterProxyFactory(original);\n }\n enableBackingStoreForSerializationRegistry(serializationWriterFactoryRegistry);\n enableBackingStoreForParseNodeRegistry(parseNodeFactoryRegistry);\n return result;\n}\n/**\n * Enables the backing store on default parse node factories and the given parse node factory.\n * @param parseNodeFactoryRegistry The parse node factory registry to enable the backing store on.\n * @param original The parse node factory to enable the backing store on.\n * @returns A new parse node factory with the backing store enabled.\n */\nexport function enableBackingStoreForParseNodeFactory(parseNodeFactoryRegistry, original) {\n if (!original)\n throw new Error(\"Original must be specified\");\n let result = original;\n if (original instanceof ParseNodeFactoryRegistry) {\n enableBackingStoreForParseNodeRegistry(original);\n }\n else {\n result = new BackingStoreParseNodeFactory(original);\n }\n enableBackingStoreForParseNodeRegistry(parseNodeFactoryRegistry);\n return result;\n}\n/**\n * Enables the backing store on the given parse node factory registry.\n * @param registry The parse node factory registry to enable the backing store on.\n */\nfunction enableBackingStoreForParseNodeRegistry(registry) {\n for (const [k, v] of registry.contentTypeAssociatedFactories) {\n if (!(v instanceof BackingStoreParseNodeFactory || v instanceof ParseNodeFactoryRegistry)) {\n registry.contentTypeAssociatedFactories.set(k, new BackingStoreParseNodeFactory(v));\n }\n }\n}\n/**\n * Enables the backing store on the given serialization factory registry.\n * @param registry The serialization factory registry to enable the backing store on.\n */\nfunction enableBackingStoreForSerializationRegistry(registry) {\n for (const [k, v] of registry.contentTypeAssociatedFactories) {\n if (!(v instanceof BackingStoreSerializationWriterProxyFactory || v instanceof SerializationWriterFactoryRegistry)) {\n registry.contentTypeAssociatedFactories.set(k, new BackingStoreSerializationWriterProxyFactory(v));\n }\n }\n}\n//# sourceMappingURL=apiClientBuilder.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// Updates to this file should also be replicated to @opentelemetry/core too.\n/**\n * - globalThis (New standard)\n * - self (Will return the current window instance for supported browsers)\n * - window (fallback for older browser implementations)\n * - global (NodeJS implementation)\n * - <object> (When all else fails)\n */\n/** only globals that common to node and browsers are allowed */\n// eslint-disable-next-line node/no-unsupported-features/es-builtins, no-undef\nexport var _globalThis = typeof globalThis === 'object'\n ? globalThis\n : typeof self === 'object'\n ? self\n : typeof window === 'object'\n ? window\n : typeof global === 'object'\n ? global\n : {};\n//# sourceMappingURL=globalThis.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// this is autogenerated file, see scripts/version-update.js\nexport var VERSION = '1.9.0';\n//# sourceMappingURL=version.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { VERSION } from '../version';\nvar re = /^(\\d+)\\.(\\d+)\\.(\\d+)(-(.+))?$/;\n/**\n * Create a function to test an API version to see if it is compatible with the provided ownVersion.\n *\n * The returned function has the following semantics:\n * - Exact match is always compatible\n * - Major versions must match exactly\n * - 1.x package cannot use global 2.x package\n * - 2.x package cannot use global 1.x package\n * - The minor version of the API module requesting access to the global API must be less than or equal to the minor version of this API\n * - 1.3 package may use 1.4 global because the later global contains all functions 1.3 expects\n * - 1.4 package may NOT use 1.3 global because it may try to call functions which don't exist on 1.3\n * - If the major version is 0, the minor version is treated as the major and the patch is treated as the minor\n * - Patch and build tag differences are not considered at this time\n *\n * @param ownVersion version which should be checked against\n */\nexport function _makeCompatibilityCheck(ownVersion) {\n var acceptedVersions = new Set([ownVersion]);\n var rejectedVersions = new Set();\n var myVersionMatch = ownVersion.match(re);\n if (!myVersionMatch) {\n // we cannot guarantee compatibility so we always return noop\n return function () { return false; };\n }\n var ownVersionParsed = {\n major: +myVersionMatch[1],\n minor: +myVersionMatch[2],\n patch: +myVersionMatch[3],\n prerelease: myVersionMatch[4],\n };\n // if ownVersion has a prerelease tag, versions must match exactly\n if (ownVersionParsed.prerelease != null) {\n return function isExactmatch(globalVersion) {\n return globalVersion === ownVersion;\n };\n }\n function _reject(v) {\n rejectedVersions.add(v);\n return false;\n }\n function _accept(v) {\n acceptedVersions.add(v);\n return true;\n }\n return function isCompatible(globalVersion) {\n if (acceptedVersions.has(globalVersion)) {\n return true;\n }\n if (rejectedVersions.has(globalVersion)) {\n return false;\n }\n var globalVersionMatch = globalVersion.match(re);\n if (!globalVersionMatch) {\n // cannot parse other version\n // we cannot guarantee compatibility so we always noop\n return _reject(globalVersion);\n }\n var globalVersionParsed = {\n major: +globalVersionMatch[1],\n minor: +globalVersionMatch[2],\n patch: +globalVersionMatch[3],\n prerelease: globalVersionMatch[4],\n };\n // if globalVersion has a prerelease tag, versions must match exactly\n if (globalVersionParsed.prerelease != null) {\n return _reject(globalVersion);\n }\n // major versions must match\n if (ownVersionParsed.major !== globalVersionParsed.major) {\n return _reject(globalVersion);\n }\n if (ownVersionParsed.major === 0) {\n if (ownVersionParsed.minor === globalVersionParsed.minor &&\n ownVersionParsed.patch <= globalVersionParsed.patch) {\n return _accept(globalVersion);\n }\n return _reject(globalVersion);\n }\n if (ownVersionParsed.minor <= globalVersionParsed.minor) {\n return _accept(globalVersion);\n }\n return _reject(globalVersion);\n };\n}\n/**\n * Test an API version to see if it is compatible with this API.\n *\n * - Exact match is always compatible\n * - Major versions must match exactly\n * - 1.x package cannot use global 2.x package\n * - 2.x package cannot use global 1.x package\n * - The minor version of the API module requesting access to the global API must be less than or equal to the minor version of this API\n * - 1.3 package may use 1.4 global because the later global contains all functions 1.3 expects\n * - 1.4 package may NOT use 1.3 global because it may try to call functions which don't exist on 1.3\n * - If the major version is 0, the minor version is treated as the major and the patch is treated as the minor\n * - Patch and build tag differences are not considered at this time\n *\n * @param version version of the API requesting an instance of the global API\n */\nexport var isCompatible = _makeCompatibilityCheck(VERSION);\n//# sourceMappingURL=semver.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { _globalThis } from '../platform';\nimport { VERSION } from '../version';\nimport { isCompatible } from './semver';\nvar major = VERSION.split('.')[0];\nvar GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for(\"opentelemetry.js.api.\" + major);\nvar _global = _globalThis;\nexport function registerGlobal(type, instance, diag, allowOverride) {\n var _a;\n if (allowOverride === void 0) { allowOverride = false; }\n var api = (_global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a !== void 0 ? _a : {\n version: VERSION,\n });\n if (!allowOverride && api[type]) {\n // already registered an API of this type\n var err = new Error(\"@opentelemetry/api: Attempted duplicate registration of API: \" + type);\n diag.error(err.stack || err.message);\n return false;\n }\n if (api.version !== VERSION) {\n // All registered APIs must be of the same version exactly\n var err = new Error(\"@opentelemetry/api: Registration of version v\" + api.version + \" for \" + type + \" does not match previously registered API v\" + VERSION);\n diag.error(err.stack || err.message);\n return false;\n }\n api[type] = instance;\n diag.debug(\"@opentelemetry/api: Registered a global for \" + type + \" v\" + VERSION + \".\");\n return true;\n}\nexport function getGlobal(type) {\n var _a, _b;\n var globalVersion = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a === void 0 ? void 0 : _a.version;\n if (!globalVersion || !isCompatible(globalVersion)) {\n return;\n }\n return (_b = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _b === void 0 ? void 0 : _b[type];\n}\nexport function unregisterGlobal(type, diag) {\n diag.debug(\"@opentelemetry/api: Unregistering a global for \" + type + \" v\" + VERSION + \".\");\n var api = _global[GLOBAL_OPENTELEMETRY_API_KEY];\n if (api) {\n delete api[type];\n }\n}\n//# sourceMappingURL=global-utils.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { getGlobal } from '../internal/global-utils';\n/**\n * Component Logger which is meant to be used as part of any component which\n * will add automatically additional namespace in front of the log message.\n * It will then forward all message to global diag logger\n * @example\n * const cLogger = diag.createComponentLogger({ namespace: '@opentelemetry/instrumentation-http' });\n * cLogger.debug('test');\n * // @opentelemetry/instrumentation-http test\n */\nvar DiagComponentLogger = /** @class */ (function () {\n function DiagComponentLogger(props) {\n this._namespace = props.namespace || 'DiagComponentLogger';\n }\n DiagComponentLogger.prototype.debug = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return logProxy('debug', this._namespace, args);\n };\n DiagComponentLogger.prototype.error = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return logProxy('error', this._namespace, args);\n };\n DiagComponentLogger.prototype.info = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return logProxy('info', this._namespace, args);\n };\n DiagComponentLogger.prototype.warn = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return logProxy('warn', this._namespace, args);\n };\n DiagComponentLogger.prototype.verbose = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return logProxy('verbose', this._namespace, args);\n };\n return DiagComponentLogger;\n}());\nexport { DiagComponentLogger };\nfunction logProxy(funcName, namespace, args) {\n var logger = getGlobal('diag');\n // shortcut if logger not set\n if (!logger) {\n return;\n }\n args.unshift(namespace);\n return logger[funcName].apply(logger, __spreadArray([], __read(args), false));\n}\n//# sourceMappingURL=ComponentLogger.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Defines the available internal logging levels for the diagnostic logger, the numeric values\n * of the levels are defined to match the original values from the initial LogLevel to avoid\n * compatibility/migration issues for any implementation that assume the numeric ordering.\n */\nexport var DiagLogLevel;\n(function (DiagLogLevel) {\n /** Diagnostic Logging level setting to disable all logging (except and forced logs) */\n DiagLogLevel[DiagLogLevel[\"NONE\"] = 0] = \"NONE\";\n /** Identifies an error scenario */\n DiagLogLevel[DiagLogLevel[\"ERROR\"] = 30] = \"ERROR\";\n /** Identifies a warning scenario */\n DiagLogLevel[DiagLogLevel[\"WARN\"] = 50] = \"WARN\";\n /** General informational log message */\n DiagLogLevel[DiagLogLevel[\"INFO\"] = 60] = \"INFO\";\n /** General debug log message */\n DiagLogLevel[DiagLogLevel[\"DEBUG\"] = 70] = \"DEBUG\";\n /**\n * Detailed trace level logging should only be used for development, should only be set\n * in a development environment.\n */\n DiagLogLevel[DiagLogLevel[\"VERBOSE\"] = 80] = \"VERBOSE\";\n /** Used to set the logging level to include all logging */\n DiagLogLevel[DiagLogLevel[\"ALL\"] = 9999] = \"ALL\";\n})(DiagLogLevel || (DiagLogLevel = {}));\n//# sourceMappingURL=types.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DiagLogLevel } from '../types';\nexport function createLogLevelDiagLogger(maxLevel, logger) {\n if (maxLevel < DiagLogLevel.NONE) {\n maxLevel = DiagLogLevel.NONE;\n }\n else if (maxLevel > DiagLogLevel.ALL) {\n maxLevel = DiagLogLevel.ALL;\n }\n // In case the logger is null or undefined\n logger = logger || {};\n function _filterFunc(funcName, theLevel) {\n var theFunc = logger[funcName];\n if (typeof theFunc === 'function' && maxLevel >= theLevel) {\n return theFunc.bind(logger);\n }\n return function () { };\n }\n return {\n error: _filterFunc('error', DiagLogLevel.ERROR),\n warn: _filterFunc('warn', DiagLogLevel.WARN),\n info: _filterFunc('info', DiagLogLevel.INFO),\n debug: _filterFunc('debug', DiagLogLevel.DEBUG),\n verbose: _filterFunc('verbose', DiagLogLevel.VERBOSE),\n };\n}\n//# sourceMappingURL=logLevelLogger.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { DiagComponentLogger } from '../diag/ComponentLogger';\nimport { createLogLevelDiagLogger } from '../diag/internal/logLevelLogger';\nimport { DiagLogLevel, } from '../diag/types';\nimport { getGlobal, registerGlobal, unregisterGlobal, } from '../internal/global-utils';\nvar API_NAME = 'diag';\n/**\n * Singleton object which represents the entry point to the OpenTelemetry internal\n * diagnostic API\n */\nvar DiagAPI = /** @class */ (function () {\n /**\n * Private internal constructor\n * @private\n */\n function DiagAPI() {\n function _logProxy(funcName) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var logger = getGlobal('diag');\n // shortcut if logger not set\n if (!logger)\n return;\n return logger[funcName].apply(logger, __spreadArray([], __read(args), false));\n };\n }\n // Using self local variable for minification purposes as 'this' cannot be minified\n var self = this;\n // DiagAPI specific functions\n var setLogger = function (logger, optionsOrLogLevel) {\n var _a, _b, _c;\n if (optionsOrLogLevel === void 0) { optionsOrLogLevel = { logLevel: DiagLogLevel.INFO }; }\n if (logger === self) {\n // There isn't much we can do here.\n // Logging to the console might break the user application.\n // Try to log to self. If a logger was previously registered it will receive the log.\n var err = new Error('Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation');\n self.error((_a = err.stack) !== null && _a !== void 0 ? _a : err.message);\n return false;\n }\n if (typeof optionsOrLogLevel === 'number') {\n optionsOrLogLevel = {\n logLevel: optionsOrLogLevel,\n };\n }\n var oldLogger = getGlobal('diag');\n var newLogger = createLogLevelDiagLogger((_b = optionsOrLogLevel.logLevel) !== null && _b !== void 0 ? _b : DiagLogLevel.INFO, logger);\n // There already is an logger registered. We'll let it know before overwriting it.\n if (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) {\n var stack = (_c = new Error().stack) !== null && _c !== void 0 ? _c : '<failed to generate stacktrace>';\n oldLogger.warn(\"Current logger will be overwritten from \" + stack);\n newLogger.warn(\"Current logger will overwrite one already registered from \" + stack);\n }\n return registerGlobal('diag', newLogger, self, true);\n };\n self.setLogger = setLogger;\n self.disable = function () {\n unregisterGlobal(API_NAME, self);\n };\n self.createComponentLogger = function (options) {\n return new DiagComponentLogger(options);\n };\n self.verbose = _logProxy('verbose');\n self.debug = _logProxy('debug');\n self.info = _logProxy('info');\n self.warn = _logProxy('warn');\n self.error = _logProxy('error');\n }\n /** Get the singleton instance of the DiagAPI API */\n DiagAPI.instance = function () {\n if (!this._instance) {\n this._instance = new DiagAPI();\n }\n return this._instance;\n };\n return DiagAPI;\n}());\nexport { DiagAPI };\n//# sourceMappingURL=diag.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/** Get a key to uniquely identify a context value */\nexport function createContextKey(description) {\n // The specification states that for the same input, multiple calls should\n // return different keys. Due to the nature of the JS dependency management\n // system, this creates problems where multiple versions of some package\n // could hold different keys for the same property.\n //\n // Therefore, we use Symbol.for which returns the same key for the same input.\n return Symbol.for(description);\n}\nvar BaseContext = /** @class */ (function () {\n /**\n * Construct a new context which inherits values from an optional parent context.\n *\n * @param parentContext a context from which to inherit values\n */\n function BaseContext(parentContext) {\n // for minification\n var self = this;\n self._currentContext = parentContext ? new Map(parentContext) : new Map();\n self.getValue = function (key) { return self._currentContext.get(key); };\n self.setValue = function (key, value) {\n var context = new BaseContext(self._currentContext);\n context._currentContext.set(key, value);\n return context;\n };\n self.deleteValue = function (key) {\n var context = new BaseContext(self._currentContext);\n context._currentContext.delete(key);\n return context;\n };\n }\n return BaseContext;\n}());\n/** The root context is used as the default parent context when there is no active context */\nexport var ROOT_CONTEXT = new BaseContext();\n//# sourceMappingURL=context.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { ROOT_CONTEXT } from './context';\nvar NoopContextManager = /** @class */ (function () {\n function NoopContextManager() {\n }\n NoopContextManager.prototype.active = function () {\n return ROOT_CONTEXT;\n };\n NoopContextManager.prototype.with = function (_context, fn, thisArg) {\n var args = [];\n for (var _i = 3; _i < arguments.length; _i++) {\n args[_i - 3] = arguments[_i];\n }\n return fn.call.apply(fn, __spreadArray([thisArg], __read(args), false));\n };\n NoopContextManager.prototype.bind = function (_context, target) {\n return target;\n };\n NoopContextManager.prototype.enable = function () {\n return this;\n };\n NoopContextManager.prototype.disable = function () {\n return this;\n };\n return NoopContextManager;\n}());\nexport { NoopContextManager };\n//# sourceMappingURL=NoopContextManager.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { NoopContextManager } from '../context/NoopContextManager';\nimport { getGlobal, registerGlobal, unregisterGlobal, } from '../internal/global-utils';\nimport { DiagAPI } from './diag';\nvar API_NAME = 'context';\nvar NOOP_CONTEXT_MANAGER = new NoopContextManager();\n/**\n * Singleton object which represents the entry point to the OpenTelemetry Context API\n */\nvar ContextAPI = /** @class */ (function () {\n /** Empty private constructor prevents end users from constructing a new instance of the API */\n function ContextAPI() {\n }\n /** Get the singleton instance of the Context API */\n ContextAPI.getInstance = function () {\n if (!this._instance) {\n this._instance = new ContextAPI();\n }\n return this._instance;\n };\n /**\n * Set the current context manager.\n *\n * @returns true if the context manager was successfully registered, else false\n */\n ContextAPI.prototype.setGlobalContextManager = function (contextManager) {\n return registerGlobal(API_NAME, contextManager, DiagAPI.instance());\n };\n /**\n * Get the currently active context\n */\n ContextAPI.prototype.active = function () {\n return this._getContextManager().active();\n };\n /**\n * Execute a function with an active context\n *\n * @param context context to be active during function execution\n * @param fn function to execute in a context\n * @param thisArg optional receiver to be used for calling fn\n * @param args optional arguments forwarded to fn\n */\n ContextAPI.prototype.with = function (context, fn, thisArg) {\n var _a;\n var args = [];\n for (var _i = 3; _i < arguments.length; _i++) {\n args[_i - 3] = arguments[_i];\n }\n return (_a = this._getContextManager()).with.apply(_a, __spreadArray([context, fn, thisArg], __read(args), false));\n };\n /**\n * Bind a context to a target function or event emitter\n *\n * @param context context to bind to the event emitter or function. Defaults to the currently active context\n * @param target function or event emitter to bind\n */\n ContextAPI.prototype.bind = function (context, target) {\n return this._getContextManager().bind(context, target);\n };\n ContextAPI.prototype._getContextManager = function () {\n return getGlobal(API_NAME) || NOOP_CONTEXT_MANAGER;\n };\n /** Disable and remove the global context manager */\n ContextAPI.prototype.disable = function () {\n this._getContextManager().disable();\n unregisterGlobal(API_NAME, DiagAPI.instance());\n };\n return ContextAPI;\n}());\nexport { ContextAPI };\n//# sourceMappingURL=context.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport var TraceFlags;\n(function (TraceFlags) {\n /** Represents no flag set. */\n TraceFlags[TraceFlags[\"NONE\"] = 0] = \"NONE\";\n /** Bit to represent whether trace is sampled in trace flags. */\n TraceFlags[TraceFlags[\"SAMPLED\"] = 1] = \"SAMPLED\";\n})(TraceFlags || (TraceFlags = {}));\n//# sourceMappingURL=trace_flags.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { TraceFlags } from './trace_flags';\nexport var INVALID_SPANID = '0000000000000000';\nexport var INVALID_TRACEID = '00000000000000000000000000000000';\nexport var INVALID_SPAN_CONTEXT = {\n traceId: INVALID_TRACEID,\n spanId: INVALID_SPANID,\n traceFlags: TraceFlags.NONE,\n};\n//# sourceMappingURL=invalid-span-constants.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { INVALID_SPAN_CONTEXT } from './invalid-span-constants';\n/**\n * The NonRecordingSpan is the default {@link Span} that is used when no Span\n * implementation is available. All operations are no-op including context\n * propagation.\n */\nvar NonRecordingSpan = /** @class */ (function () {\n function NonRecordingSpan(_spanContext) {\n if (_spanContext === void 0) { _spanContext = INVALID_SPAN_CONTEXT; }\n this._spanContext = _spanContext;\n }\n // Returns a SpanContext.\n NonRecordingSpan.prototype.spanContext = function () {\n return this._spanContext;\n };\n // By default does nothing\n NonRecordingSpan.prototype.setAttribute = function (_key, _value) {\n return this;\n };\n // By default does nothing\n NonRecordingSpan.prototype.setAttributes = function (_attributes) {\n return this;\n };\n // By default does nothing\n NonRecordingSpan.prototype.addEvent = function (_name, _attributes) {\n return this;\n };\n NonRecordingSpan.prototype.addLink = function (_link) {\n return this;\n };\n NonRecordingSpan.prototype.addLinks = function (_links) {\n return this;\n };\n // By default does nothing\n NonRecordingSpan.prototype.setStatus = function (_status) {\n return this;\n };\n // By default does nothing\n NonRecordingSpan.prototype.updateName = function (_name) {\n return this;\n };\n // By default does nothing\n NonRecordingSpan.prototype.end = function (_endTime) { };\n // isRecording always returns false for NonRecordingSpan.\n NonRecordingSpan.prototype.isRecording = function () {\n return false;\n };\n // By default does nothing\n NonRecordingSpan.prototype.recordException = function (_exception, _time) { };\n return NonRecordingSpan;\n}());\nexport { NonRecordingSpan };\n//# sourceMappingURL=NonRecordingSpan.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createContextKey } from '../context/context';\nimport { NonRecordingSpan } from './NonRecordingSpan';\nimport { ContextAPI } from '../api/context';\n/**\n * span key\n */\nvar SPAN_KEY = createContextKey('OpenTelemetry Context Key SPAN');\n/**\n * Return the span if one exists\n *\n * @param context context to get span from\n */\nexport function getSpan(context) {\n return context.getValue(SPAN_KEY) || undefined;\n}\n/**\n * Gets the span from the current context, if one exists.\n */\nexport function getActiveSpan() {\n return getSpan(ContextAPI.getInstance().active());\n}\n/**\n * Set the span on a context\n *\n * @param context context to use as parent\n * @param span span to set active\n */\nexport function setSpan(context, span) {\n return context.setValue(SPAN_KEY, span);\n}\n/**\n * Remove current span stored in the context\n *\n * @param context context to delete span from\n */\nexport function deleteSpan(context) {\n return context.deleteValue(SPAN_KEY);\n}\n/**\n * Wrap span context in a NoopSpan and set as span in a new\n * context\n *\n * @param context context to set active span on\n * @param spanContext span context to be wrapped\n */\nexport function setSpanContext(context, spanContext) {\n return setSpan(context, new NonRecordingSpan(spanContext));\n}\n/**\n * Get the span context of the span if it exists.\n *\n * @param context context to get values from\n */\nexport function getSpanContext(context) {\n var _a;\n return (_a = getSpan(context)) === null || _a === void 0 ? void 0 : _a.spanContext();\n}\n//# sourceMappingURL=context-utils.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { INVALID_SPANID, INVALID_TRACEID } from './invalid-span-constants';\nimport { NonRecordingSpan } from './NonRecordingSpan';\nvar VALID_TRACEID_REGEX = /^([0-9a-f]{32})$/i;\nvar VALID_SPANID_REGEX = /^[0-9a-f]{16}$/i;\nexport function isValidTraceId(traceId) {\n return VALID_TRACEID_REGEX.test(traceId) && traceId !== INVALID_TRACEID;\n}\nexport function isValidSpanId(spanId) {\n return VALID_SPANID_REGEX.test(spanId) && spanId !== INVALID_SPANID;\n}\n/**\n * Returns true if this {@link SpanContext} is valid.\n * @return true if this {@link SpanContext} is valid.\n */\nexport function isSpanContextValid(spanContext) {\n return (isValidTraceId(spanContext.traceId) && isValidSpanId(spanContext.spanId));\n}\n/**\n * Wrap the given {@link SpanContext} in a new non-recording {@link Span}\n *\n * @param spanContext span context to be wrapped\n * @returns a new non-recording {@link Span} with the provided context\n */\nexport function wrapSpanContext(spanContext) {\n return new NonRecordingSpan(spanContext);\n}\n//# sourceMappingURL=spancontext-utils.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ContextAPI } from '../api/context';\nimport { getSpanContext, setSpan } from '../trace/context-utils';\nimport { NonRecordingSpan } from './NonRecordingSpan';\nimport { isSpanContextValid } from './spancontext-utils';\nvar contextApi = ContextAPI.getInstance();\n/**\n * No-op implementations of {@link Tracer}.\n */\nvar NoopTracer = /** @class */ (function () {\n function NoopTracer() {\n }\n // startSpan starts a noop span.\n NoopTracer.prototype.startSpan = function (name, options, context) {\n if (context === void 0) { context = contextApi.active(); }\n var root = Boolean(options === null || options === void 0 ? void 0 : options.root);\n if (root) {\n return new NonRecordingSpan();\n }\n var parentFromContext = context && getSpanContext(context);\n if (isSpanContext(parentFromContext) &&\n isSpanContextValid(parentFromContext)) {\n return new NonRecordingSpan(parentFromContext);\n }\n else {\n return new NonRecordingSpan();\n }\n };\n NoopTracer.prototype.startActiveSpan = function (name, arg2, arg3, arg4) {\n var opts;\n var ctx;\n var fn;\n if (arguments.length < 2) {\n return;\n }\n else if (arguments.length === 2) {\n fn = arg2;\n }\n else if (arguments.length === 3) {\n opts = arg2;\n fn = arg3;\n }\n else {\n opts = arg2;\n ctx = arg3;\n fn = arg4;\n }\n var parentContext = ctx !== null && ctx !== void 0 ? ctx : contextApi.active();\n var span = this.startSpan(name, opts, parentContext);\n var contextWithSpanSet = setSpan(parentContext, span);\n return contextApi.with(contextWithSpanSet, fn, undefined, span);\n };\n return NoopTracer;\n}());\nexport { NoopTracer };\nfunction isSpanContext(spanContext) {\n return (typeof spanContext === 'object' &&\n typeof spanContext['spanId'] === 'string' &&\n typeof spanContext['traceId'] === 'string' &&\n typeof spanContext['traceFlags'] === 'number');\n}\n//# sourceMappingURL=NoopTracer.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { NoopTracer } from './NoopTracer';\nvar NOOP_TRACER = new NoopTracer();\n/**\n * Proxy tracer provided by the proxy tracer provider\n */\nvar ProxyTracer = /** @class */ (function () {\n function ProxyTracer(_provider, name, version, options) {\n this._provider = _provider;\n this.name = name;\n this.version = version;\n this.options = options;\n }\n ProxyTracer.prototype.startSpan = function (name, options, context) {\n return this._getTracer().startSpan(name, options, context);\n };\n ProxyTracer.prototype.startActiveSpan = function (_name, _options, _context, _fn) {\n var tracer = this._getTracer();\n return Reflect.apply(tracer.startActiveSpan, tracer, arguments);\n };\n /**\n * Try to get a tracer from the proxy tracer provider.\n * If the proxy tracer provider has no delegate, return a noop tracer.\n */\n ProxyTracer.prototype._getTracer = function () {\n if (this._delegate) {\n return this._delegate;\n }\n var tracer = this._provider.getDelegateTracer(this.name, this.version, this.options);\n if (!tracer) {\n return NOOP_TRACER;\n }\n this._delegate = tracer;\n return this._delegate;\n };\n return ProxyTracer;\n}());\nexport { ProxyTracer };\n//# sourceMappingURL=ProxyTracer.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { NoopTracer } from './NoopTracer';\n/**\n * An implementation of the {@link TracerProvider} which returns an impotent\n * Tracer for all calls to `getTracer`.\n *\n * All operations are no-op.\n */\nvar NoopTracerProvider = /** @class */ (function () {\n function NoopTracerProvider() {\n }\n NoopTracerProvider.prototype.getTracer = function (_name, _version, _options) {\n return new NoopTracer();\n };\n return NoopTracerProvider;\n}());\nexport { NoopTracerProvider };\n//# sourceMappingURL=NoopTracerProvider.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ProxyTracer } from './ProxyTracer';\nimport { NoopTracerProvider } from './NoopTracerProvider';\nvar NOOP_TRACER_PROVIDER = new NoopTracerProvider();\n/**\n * Tracer provider which provides {@link ProxyTracer}s.\n *\n * Before a delegate is set, tracers provided are NoOp.\n * When a delegate is set, traces are provided from the delegate.\n * When a delegate is set after tracers have already been provided,\n * all tracers already provided will use the provided delegate implementation.\n */\nvar ProxyTracerProvider = /** @class */ (function () {\n function ProxyTracerProvider() {\n }\n /**\n * Get a {@link ProxyTracer}\n */\n ProxyTracerProvider.prototype.getTracer = function (name, version, options) {\n var _a;\n return ((_a = this.getDelegateTracer(name, version, options)) !== null && _a !== void 0 ? _a : new ProxyTracer(this, name, version, options));\n };\n ProxyTracerProvider.prototype.getDelegate = function () {\n var _a;\n return (_a = this._delegate) !== null && _a !== void 0 ? _a : NOOP_TRACER_PROVIDER;\n };\n /**\n * Set the delegate tracer provider\n */\n ProxyTracerProvider.prototype.setDelegate = function (delegate) {\n this._delegate = delegate;\n };\n ProxyTracerProvider.prototype.getDelegateTracer = function (name, version, options) {\n var _a;\n return (_a = this._delegate) === null || _a === void 0 ? void 0 : _a.getTracer(name, version, options);\n };\n return ProxyTracerProvider;\n}());\nexport { ProxyTracerProvider };\n//# sourceMappingURL=ProxyTracerProvider.js.map","/**\n * An enumeration of status codes.\n */\nexport var SpanStatusCode;\n(function (SpanStatusCode) {\n /**\n * The default status.\n */\n SpanStatusCode[SpanStatusCode[\"UNSET\"] = 0] = \"UNSET\";\n /**\n * The operation has been validated by an Application developer or\n * Operator to have completed successfully.\n */\n SpanStatusCode[SpanStatusCode[\"OK\"] = 1] = \"OK\";\n /**\n * The operation contains an error.\n */\n SpanStatusCode[SpanStatusCode[\"ERROR\"] = 2] = \"ERROR\";\n})(SpanStatusCode || (SpanStatusCode = {}));\n//# sourceMappingURL=status.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { getGlobal, registerGlobal, unregisterGlobal, } from '../internal/global-utils';\nimport { ProxyTracerProvider } from '../trace/ProxyTracerProvider';\nimport { isSpanContextValid, wrapSpanContext, } from '../trace/spancontext-utils';\nimport { deleteSpan, getActiveSpan, getSpan, getSpanContext, setSpan, setSpanContext, } from '../trace/context-utils';\nimport { DiagAPI } from './diag';\nvar API_NAME = 'trace';\n/**\n * Singleton object which represents the entry point to the OpenTelemetry Tracing API\n */\nvar TraceAPI = /** @class */ (function () {\n /** Empty private constructor prevents end users from constructing a new instance of the API */\n function TraceAPI() {\n this._proxyTracerProvider = new ProxyTracerProvider();\n this.wrapSpanContext = wrapSpanContext;\n this.isSpanContextValid = isSpanContextValid;\n this.deleteSpan = deleteSpan;\n this.getSpan = getSpan;\n this.getActiveSpan = getActiveSpan;\n this.getSpanContext = getSpanContext;\n this.setSpan = setSpan;\n this.setSpanContext = setSpanContext;\n }\n /** Get the singleton instance of the Trace API */\n TraceAPI.getInstance = function () {\n if (!this._instance) {\n this._instance = new TraceAPI();\n }\n return this._instance;\n };\n /**\n * Set the current global tracer.\n *\n * @returns true if the tracer provider was successfully registered, else false\n */\n TraceAPI.prototype.setGlobalTracerProvider = function (provider) {\n var success = registerGlobal(API_NAME, this._proxyTracerProvider, DiagAPI.instance());\n if (success) {\n this._proxyTracerProvider.setDelegate(provider);\n }\n return success;\n };\n /**\n * Returns the global tracer provider.\n */\n TraceAPI.prototype.getTracerProvider = function () {\n return getGlobal(API_NAME) || this._proxyTracerProvider;\n };\n /**\n * Returns a tracer from the global tracer provider.\n */\n TraceAPI.prototype.getTracer = function (name, version) {\n return this.getTracerProvider().getTracer(name, version);\n };\n /** Remove the global tracer provider */\n TraceAPI.prototype.disable = function () {\n unregisterGlobal(API_NAME, DiagAPI.instance());\n this._proxyTracerProvider = new ProxyTracerProvider();\n };\n return TraceAPI;\n}());\nexport { TraceAPI };\n//# sourceMappingURL=trace.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// Split module-level variable definition into separate files to allow\n// tree-shaking on each api instance.\nimport { TraceAPI } from './api/trace';\n/** Entrypoint for trace API */\nexport var trace = TraceAPI.getInstance();\n//# sourceMappingURL=trace-api.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.serialize = exports.parse = exports.MultipleFractionsError = exports.InvalidDurationError = void 0;\nconst DEFAULT_PARSE_CONFIG = {\n allowMultipleFractions: true,\n};\nconst units = [\n { unit: 'years', symbol: 'Y' },\n { unit: 'months', symbol: 'M' },\n { unit: 'weeks', symbol: 'W' },\n { unit: 'days', symbol: 'D' },\n { unit: 'hours', symbol: 'H' },\n { unit: 'minutes', symbol: 'M' },\n { unit: 'seconds', symbol: 'S' },\n];\n// Construction of the duration regex\nconst r = (name, unit) => `((?<${name}>-?\\\\d*[\\\\.,]?\\\\d+)${unit})?`;\nconst durationRegex = new RegExp([\n '(?<negative>-)?P',\n r('years', 'Y'),\n r('months', 'M'),\n r('weeks', 'W'),\n r('days', 'D'),\n '(T',\n r('hours', 'H'),\n r('minutes', 'M'),\n r('seconds', 'S'),\n ')?', // end optional time\n].join(''));\nfunction parseNum(s) {\n if (s === '' || s === undefined || s === null) {\n return undefined;\n }\n return parseFloat(s.replace(',', '.'));\n}\nexports.InvalidDurationError = new Error('Invalid duration');\nexports.MultipleFractionsError = new Error('Multiple fractions specified');\nfunction parse(durationStr, config = DEFAULT_PARSE_CONFIG) {\n const match = durationRegex.exec(durationStr);\n if (!match || !match.groups) {\n throw exports.InvalidDurationError;\n }\n let empty = true;\n let decimalFractionCount = 0;\n const values = {};\n for (const { unit } of units) {\n if (match.groups[unit]) {\n empty = false;\n values[unit] = parseNum(match.groups[unit]);\n if (!config.allowMultipleFractions && !Number.isInteger(values[unit])) {\n decimalFractionCount++;\n if (decimalFractionCount > 1) {\n throw exports.MultipleFractionsError;\n }\n }\n }\n }\n if (empty) {\n throw exports.InvalidDurationError;\n }\n const duration = values;\n if (match.groups.negative) {\n duration.negative = true;\n }\n return duration;\n}\nexports.parse = parse;\nconst s = (number, component) => {\n if (!number) {\n return undefined;\n }\n let numberAsString = number.toString();\n const exponentIndex = numberAsString.indexOf('e');\n if (exponentIndex > -1) {\n const magnitude = parseInt(numberAsString.slice(exponentIndex + 2), 10);\n numberAsString = number.toFixed(magnitude + exponentIndex - 2);\n }\n return numberAsString + component;\n};\nfunction serialize(duration) {\n if (!duration.years &&\n !duration.months &&\n !duration.weeks &&\n !duration.days &&\n !duration.hours &&\n !duration.minutes &&\n !duration.seconds) {\n return 'PT0S';\n }\n return [\n duration.negative && '-',\n 'P',\n s(duration.years, 'Y'),\n s(duration.months, 'M'),\n s(duration.weeks, 'W'),\n s(duration.days, 'D'),\n (duration.hours || duration.minutes || duration.seconds) && 'T',\n s(duration.hours, 'H'),\n s(duration.minutes, 'M'),\n s(duration.seconds, 'S'),\n ]\n .filter(Boolean)\n .join('');\n}\nexports.serialize = serialize;\n","/**\n * -------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.\n * See License in the project root for license information.\n * -------------------------------------------------------------------------------------------\n */\n/**\n * A function that takes a property name and returns its canonical form.\n * @param canon The function that canonicalizes the property name.\n * @returns A new object that can be used as a dictionary with case-insensitive keys.\n */\nfunction dictionaryWithCanonicalKeys(canon) {\n const keysNormalizationMap = new Map();\n return new Proxy({}, {\n /**\n * Intercept the get operation on the dictionary object and forward it to the target object using Reflect.get.\n * @param target The target object.\n * @param prop The property to get.\n * @returns The value of the property.\n */\n get(target, prop) {\n const normalKey = canon(prop);\n return Reflect.get(target, normalKey);\n },\n /**\n * Intercept the set operation on the dictionary object and forward it to the target object using Reflect.set.\n * @param target The target object.\n * @param prop The property to set.\n * @param value The value to set.\n * @returns A boolean indicating whether the property was set.\n */\n set(target, prop, value) {\n const nonNormalKey = prop.toString();\n const normalKey = canon(prop);\n keysNormalizationMap.set(normalKey, nonNormalKey);\n return Reflect.set(target, normalKey, value);\n },\n /**\n * Intercept the has operation on the dictionary object and forward it to the target object using Reflect.has.\n * @param _ the target object.\n * @param prop The property to check.\n * @returns A boolean indicating whether the property exists.\n */\n has(_, prop) {\n const normalKey = canon(prop);\n return keysNormalizationMap.has(normalKey);\n },\n /**\n * Intercept the defineProperty operation on the dictionary object and forward it to the target object using Reflect.defineProperty.\n * @param target The target object.\n * @param prop The property to define.\n * @param attribs The attributes of the property.\n * @returns A boolean indicating whether the property was defined.\n */\n defineProperty(target, prop, attribs) {\n const nonNormalKey = prop.toString();\n const normalKey = canon(prop);\n keysNormalizationMap.set(normalKey, nonNormalKey);\n return Reflect.defineProperty(target, normalKey, attribs);\n },\n /**\n * Intercept the deleteProperty operation on the dictionary object and forward it to the target object using Reflect.deleteProperty.\n * @param target The target object.\n * @param prop The property to delete.\n * @returns A boolean indicating whether the property was deleted.\n */\n deleteProperty(target, prop) {\n const normalKey = canon(prop);\n keysNormalizationMap.delete(normalKey);\n return Reflect.deleteProperty(target, normalKey);\n },\n /**\n * Intercept the getOwnPropertyDescriptor operation on the dictionary object and forward it to the target object using Reflect.getOwnPropertyDescriptor.\n * @param target The target object.\n * @param prop The property to gets its descriptor.\n * @returns The property descriptor.\n */\n getOwnPropertyDescriptor(target, prop) {\n return Reflect.getOwnPropertyDescriptor(target, canon(prop));\n },\n ownKeys() {\n return [...keysNormalizationMap.values()];\n },\n });\n}\n/**\n * A wrapper for type Record that creates a Record with case insensitive keys\n * @returns A new object that can be used as a dictionary with case-insensitive keys.\n */\nexport function createRecordWithCaseInsensitiveKeys() {\n /**\n * A function that takes a property name and returns its canonical form.\n * @param prop The property name to be canonicalized.\n * @returns The canonical form of the property name.\n */\n const record = dictionaryWithCanonicalKeys((p) => (typeof p === \"string\" ? p.toLowerCase() : p.toString().toLowerCase()));\n return record;\n}\n//# sourceMappingURL=recordWithCaseInsensitiveKeys.js.map","/**\n * -------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.\n * See License in the project root for license information.\n * -------------------------------------------------------------------------------------------\n */\nimport { createRecordWithCaseInsensitiveKeys } from \"./recordWithCaseInsensitiveKeys.js\";\n/**\n * A collection class for HTTP headers. The keys are case-insensitive.\n * @example\n * ```typescript\n * const headers = new Headers();\n * headers.add(\"header1\", \"value1\");\n * ```\n */\nexport class Headers extends Map {\n /**\n * Creates a new Headers object.\n * @param entries An iterable object that contains key-value pairs. Each key-value pair must be an array with two elements: the key of the header, and the value of the header.\n * @example\n * ```typescript\n * const entries: [string, Set<string>][] = [\n * ['header1', new Set(['value1'])],\n * ['header2', new Set(['value2', 'value3'])]\n * ];\n * const headers = new Headers(entries);\n * ```\n */\n constructor(entries) {\n super();\n this.headers = createRecordWithCaseInsensitiveKeys();\n this.singleValueHeaders = new Set([\"Content-Type\", \"Content-Encoding\", \"Content-Length\"]);\n if (entries) {\n entries.forEach(([key, value]) => {\n this.headers[key] = value;\n });\n }\n }\n /**\n * Sets a header with the specified name and value. If a header with the same name already exists, its value is appended with the specified value.\n * @param headerName the name of the header to set\n * @param headerValue the value of the header to set\n * @returns Headers object\n */\n set(headerName, headerValue) {\n this.add(headerName, ...headerValue);\n return this;\n }\n /**\n * Gets the values for the header with the specified name.\n * @param headerName The name of the header to get the values for.\n * @returns The values for the header with the specified name.\n * @throws Error if headerName is null or empty\n */\n get(headerName) {\n if (!headerName) {\n throw new Error(\"headerName cannot be null or empty\");\n }\n return this.headers[headerName];\n }\n /**\n * Checks if a header exists.\n * @param key The name of the header to check for.\n * @returns whether or not a header with the given name/key exists.\n */\n has(key) {\n return !!key && !!this.headers[key];\n }\n /**\n * Delete the header with the specified name.\n * @param headerName The name of the header to delete.\n * @returns Whether or not the header existed and was deleted.\n * @throws Error if headerName is null or empty\n */\n delete(headerName) {\n if (!headerName) {\n throw new Error(\"headerName cannot be null or empty\");\n }\n if (this.headers[headerName]) {\n delete this.headers[headerName];\n return true;\n }\n return false;\n }\n /**\n * clear the headers collection\n */\n clear() {\n for (const header in this.headers) {\n if (Object.prototype.hasOwnProperty.call(this.headers, header)) {\n delete this.headers[header];\n }\n }\n }\n /**\n * execute a provided function once per each header\n * @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each header in the dictionary.\n * @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.\n */\n forEach(callbackfn, thisArg) {\n for (const header in this.headers) {\n if (Object.prototype.hasOwnProperty.call(this.headers, header)) {\n callbackfn.call(thisArg, this.headers[header], header, this);\n }\n }\n }\n /**\n * Adds values to the header with the specified name.\n * @param headerName The name of the header to add values to.\n * @param headerValues The values to add to the header.\n * @returns Whether or not the values were added to the header.\n */\n add(headerName, ...headerValues) {\n if (!headerName) {\n console.error(\"headerName cannot be null or empty\");\n return false;\n }\n if (!headerValues) {\n console.error(\"headerValues cannot be null\");\n return false;\n }\n if (headerValues.length === 0) {\n return false;\n }\n if (this.singleValueHeaders.has(headerName)) {\n this.headers[headerName] = new Set([headerValues[0]]);\n }\n else if (this.headers[headerName]) {\n headerValues.forEach((headerValue) => this.headers[headerName].add(headerValue));\n }\n else {\n this.headers[headerName] = new Set(headerValues);\n }\n return true;\n }\n /**\n * Adds values to the header with the specified name if it's not already present\n * @param headerName The name of the header to add values to.\n * @param headerValue The values to add to the header.\n * @returns If the headerValue have been added to the Dictionary.\n */\n tryAdd(headerName, headerValue) {\n if (!headerName) {\n throw new Error(\"headerName cannot be null or empty\");\n }\n if (!headerValue) {\n throw new Error(\"headerValue cannot be null\");\n }\n if (!this.headers[headerName]) {\n this.headers[headerName] = new Set([headerValue]);\n return true;\n }\n return false;\n }\n /**\n * Removes the specified value from the header with the specified name.\n * @param headerName The name of the header to remove the value from.\n * @param headerValue The value to remove from the header.\n * @returns Whether or not the header existed and was removed.\n * @throws Error if headerName is null or empty\n * @throws Error if headerValue is null\n */\n remove(headerName, headerValue) {\n if (!headerName) {\n throw new Error(\"headerName cannot be null or empty\");\n }\n if (!headerValue) {\n throw new Error(\"headerValue cannot be null\");\n }\n if (this.headers[headerName]) {\n const result = this.headers[headerName].delete(headerValue);\n if (this.headers[headerName].size === 0) {\n delete this.headers[headerName];\n }\n return result;\n }\n return false;\n }\n /**\n * Adds all the headers values from the specified headers collection.\n * @param headers The headers to update the current headers with.\n * @throws Error if headers is null\n */\n addAll(headers) {\n if (!headers) {\n throw new Error(\"headers cannot be null\");\n }\n for (const header in headers.headers) {\n if (Object.prototype.hasOwnProperty.call(headers.headers, header)) {\n headers.headers[header].forEach((value) => this.add(header, value));\n }\n }\n }\n /**\n * Adds all headers from the request configuration value to the current headers collection.\n * Replaces any existing headers with the same key.\n * @param headers The headers to update the current headers with.\n * @throws Error if headers is null\n */\n addAllRaw(headers) {\n if (!headers) {\n throw new Error(\"headers cannot be null\");\n }\n for (const header in headers) {\n if (Object.prototype.hasOwnProperty.call(headers, header)) {\n const headerValues = headers[header];\n if (Array.isArray(headerValues)) {\n this.add(header, ...headerValues);\n }\n else {\n this.add(header, headerValues);\n }\n }\n }\n }\n /**\n * Gets the values for the header with the specified name.\n * @param key The name of the header to get the values for.\n * @returns The values for the header with the specified name.\n * @throws Error if key is null or empty\n */\n tryGetValue(key) {\n if (!key) {\n throw new Error(\"key cannot be null or empty\");\n }\n return this.headers[key] ? Array.from(this.headers[key]) : null;\n }\n /**\n * Override toString method for the headers collection\n * @returns a string representation of the headers collection\n */\n toString() {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return JSON.stringify(this.headers, (_key, value) => (value instanceof Set ? [...value] : value));\n }\n /**\n * check if the headers collection is empty\n * @returns a boolean indicating if the headers collection is empty\n */\n isEmpty() {\n return Object.keys(this.headers).length === 0;\n }\n /**\n * get keys of the headers collection\n * @returns an iterator of keys\n */\n keys() {\n return Object.keys(this.headers)[Symbol.iterator]();\n }\n /**\n * get entries\n * @returns an iterator of entries\n */\n entries() {\n return Object.entries(this.headers)[Symbol.iterator]();\n }\n}\n//# sourceMappingURL=headers.js.map","/**\n * -------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.\n * See License in the project root for license information.\n * -------------------------------------------------------------------------------------------\n */\n/**\n * Represents the HTTP method used by a request.\n */\nexport var HttpMethod;\n(function (HttpMethod) {\n /** The HTTP GET method */\n HttpMethod[\"GET\"] = \"GET\";\n /** The HTTP POST method */\n HttpMethod[\"POST\"] = \"POST\";\n /** The HTTP PATCH method */\n HttpMethod[\"PATCH\"] = \"PATCH\";\n /** The HTTP DELETE method */\n HttpMethod[\"DELETE\"] = \"DELETE\";\n /** The HTTP OPTIONS method */\n HttpMethod[\"OPTIONS\"] = \"OPTIONS\";\n /** The HTTP CONNECT method */\n HttpMethod[\"CONNECT\"] = \"CONNECT\";\n /** The HTTP TRACE method */\n HttpMethod[\"TRACE\"] = \"TRACE\";\n /** The HTTP HEAD method */\n HttpMethod[\"HEAD\"] = \"HEAD\";\n /** The HTTP PUT method */\n HttpMethod[\"PUT\"] = \"PUT\";\n})(HttpMethod || (HttpMethod = {}));\n//# sourceMappingURL=httpMethod.js.map","/**\n * -------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.\n * See License in the project root for license information.\n * -------------------------------------------------------------------------------------------\n */\n/** Default error type used when no error mapping is registered for the status code */\nexport class DefaultApiError extends Error {\n constructor(message) {\n super(message);\n this.responseHeaders = {};\n }\n}\n//# sourceMappingURL=apiError.js.map","import { AllowedHostsValidator } from \"./allowedHostsValidator.js\";\nimport { validateProtocol } from \"./validateProtocol.js\";\n/** Authenticate a request by using an API Key */\nexport class ApiKeyAuthenticationProvider {\n /**\n * @param apiKey The API Key to use for authentication\n * @param parameterName The name of the parameter to use for authentication\n * @param location The location of the parameter to use for authentication\n * @param validHosts The hosts that are allowed to use this authentication provider\n */\n constructor(apiKey, parameterName, location, validHosts) {\n this.apiKey = apiKey;\n this.parameterName = parameterName;\n this.location = location;\n if (apiKey === undefined || apiKey === \"\") {\n throw new Error(\"apiKey cannot be null or empty\");\n }\n if (parameterName === undefined || parameterName === \"\") {\n throw new Error(\"parameterName cannot be null or empty\");\n }\n if (location !== ApiKeyLocation.QueryParameter && location !== ApiKeyLocation.Header) {\n throw new Error(\"location must be either QueryParameter or Header\");\n }\n this.validator = new AllowedHostsValidator(validHosts);\n }\n authenticateRequest(request, \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n additionalAuthenticationContext) {\n const url = request.URL;\n if (!url || !this.validator.isUrlHostValid(url)) {\n return Promise.resolve();\n }\n validateProtocol(url);\n switch (this.location) {\n case ApiKeyLocation.QueryParameter:\n request.URL += (url.includes(\"?\") ? \"&\" : \"?\") + this.parameterName + \"=\" + this.apiKey;\n break;\n case ApiKeyLocation.Header:\n request.headers.add(this.parameterName, this.apiKey);\n break;\n }\n return Promise.resolve();\n }\n}\n/** The location for the API key */\nexport var ApiKeyLocation;\n(function (ApiKeyLocation) {\n /** The API key is in the query parameters */\n ApiKeyLocation[ApiKeyLocation[\"QueryParameter\"] = 0] = \"QueryParameter\";\n /** The API key is in the headers */\n ApiKeyLocation[ApiKeyLocation[\"Header\"] = 1] = \"Header\";\n})(ApiKeyLocation || (ApiKeyLocation = {}));\n//# sourceMappingURL=apiKeyAuthenticationProvider.js.map","/**\n * -------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.\n * See License in the project root for license information.\n * -------------------------------------------------------------------------------------------\n */\nimport { Headers } from \"../headers.js\";\n/** Provides a base class for implementing AuthenticationProvider for Bearer token scheme. */\nexport class BaseBearerTokenAuthenticationProvider {\n /**\n * The constructor for the BaseBearerTokenAuthenticationProvider\n * @param accessTokenProvider The AccessTokenProvider instance that this provider will use to authenticate requests.\n */\n constructor(accessTokenProvider) {\n this.accessTokenProvider = accessTokenProvider;\n this.authenticateRequest = async (request, additionalAuthenticationContext) => {\n var _a;\n if (!request) {\n throw new Error(\"request info cannot be null\");\n }\n if ((additionalAuthenticationContext === null || additionalAuthenticationContext === void 0 ? void 0 : additionalAuthenticationContext.claims) && request.headers.has(BaseBearerTokenAuthenticationProvider.authorizationHeaderKey)) {\n request.headers.delete(BaseBearerTokenAuthenticationProvider.authorizationHeaderKey);\n }\n if (!((_a = request.headers) === null || _a === void 0 ? void 0 : _a.has(BaseBearerTokenAuthenticationProvider.authorizationHeaderKey))) {\n const token = await this.accessTokenProvider.getAuthorizationToken(request.URL, additionalAuthenticationContext);\n if (!request.headers) {\n request.headers = new Headers();\n }\n if (token) {\n request.headers.add(BaseBearerTokenAuthenticationProvider.authorizationHeaderKey, `Bearer ${token}`);\n }\n }\n };\n }\n}\nBaseBearerTokenAuthenticationProvider.authorizationHeaderKey = \"Authorization\";\n//# sourceMappingURL=baseBearerTokenAuthenticationProvider.js.map","/** Default response handler to access the native response object. */\nexport class NativeResponseHandler {\n handleResponse(response, errorMappings) {\n this.value = response;\n this.errorMappings = errorMappings;\n return Promise.resolve(undefined);\n }\n}\n//# sourceMappingURL=nativeResponseHandler.js.map","var _a;\n/**\n * -------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.\n * See License in the project root for license information.\n * -------------------------------------------------------------------------------------------\n */\nimport { NativeResponseHandler } from \"./nativeResponseHandler.js\";\n/** This class can be used to wrap a request using the fluent API and get the native response object in return. */\nexport class NativeResponseWrapper {\n}\n_a = NativeResponseWrapper;\nNativeResponseWrapper.CallAndGetNative = async (originalCall, q, h, o) => {\n const responseHandler = new NativeResponseHandler();\n await originalCall(q, h, o, responseHandler);\n return responseHandler.value;\n};\nNativeResponseWrapper.CallAndGetNativeWithBody = async (originalCall, requestBody, q, h, o) => {\n const responseHandler = new NativeResponseHandler();\n await originalCall(requestBody, q, h, o, responseHandler);\n return responseHandler.value;\n};\n//# sourceMappingURL=nativeResponseWrapper.js.map","/**\n * -------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.\n * See License in the project root for license information.\n * -------------------------------------------------------------------------------------------\n */\nexport const ResponseHandlerOptionKey = \"ResponseHandlerOptionKey\";\n/**\n * Options to intercept the request from the main pipeline.\n */\nexport class ResponseHandlerOption {\n getKey() {\n return ResponseHandlerOptionKey;\n }\n}\n//# sourceMappingURL=responseHandlerOptions.js.map","/**\n * -------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.\n * See License in the project root for license information.\n * -------------------------------------------------------------------------------------------\n */\n/**\n * Middleware\n * Class for FetchHandler\n */\nexport class CustomFetchHandler {\n constructor(customFetch) {\n this.customFetch = customFetch;\n }\n /**\n * @inheritdoc\n */\n async execute(url, requestInit) {\n return await this.customFetch(url, requestInit);\n }\n}\n//# sourceMappingURL=customFetchHandler.js.map","/**\n * -------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.\n * See License in the project root for license information.\n * -------------------------------------------------------------------------------------------\n */\nimport { CustomFetchHandler } from \"./middlewares/customFetchHandler.js\";\nimport { MiddlewareFactory } from \"./index.js\";\nexport class HttpClient {\n /**\n *\n * Creates an instance of a HttpClient which contains the middlewares and fetch implementation for request execution.\n * @param customFetch - custom fetch function - a Fetch API implementation\n * @param middlewares - an array of Middleware handlers\n */\n constructor(customFetch, ...middlewares) {\n this.customFetch = customFetch;\n // If no middlewares are provided, use the default ones\n middlewares = (middlewares === null || middlewares === void 0 ? void 0 : middlewares.length) && middlewares[0] ? middlewares : MiddlewareFactory.getDefaultMiddlewares(customFetch);\n // If a custom fetch function is provided, add a CustomFetchHandler to the end of the middleware chain\n if (this.customFetch) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n middlewares.push(new CustomFetchHandler(customFetch));\n }\n // Set the middleware handlers chain\n this.setMiddleware(...middlewares);\n }\n /**\n * Processes the middleware parameter passed to set this.middleware property\n * The calling function should validate if middleware is not undefined or not empty.\n * @param middleware - The middleware passed\n */\n setMiddleware(...middleware) {\n for (let i = 0; i < middleware.length - 1; i++) {\n middleware[i].next = middleware[i + 1];\n }\n this.middleware = middleware[0];\n }\n /**\n * Executes a request and returns a promise resolving the response.\n * @param url the request url.\n * @param requestInit the RequestInit object.\n * @param requestOptions the request options.\n * @returns the promise resolving the response.\n */\n async executeFetch(url, requestInit, requestOptions) {\n if (this.middleware) {\n return await this.middleware.execute(url, requestInit, requestOptions);\n }\n else if (this.customFetch) {\n return this.customFetch(url, requestInit);\n }\n throw new Error(\"Please provide middlewares or a custom fetch function to execute the request\");\n }\n}\n//# sourceMappingURL=httpClient.js.map","export const ObservabilityOptionKey = \"ObservabilityOptionKey\";\nexport class ObservabilityOptionsImpl {\n constructor(originalOptions) {\n this._originalOptions = originalOptions !== null && originalOptions !== void 0 ? originalOptions : {};\n }\n getKey() {\n return ObservabilityOptionKey;\n }\n get includeEUIIAttributes() {\n return this._originalOptions.includeEUIIAttributes;\n }\n set includeEUIIAttributes(value) {\n this._originalOptions.includeEUIIAttributes = value;\n }\n getTracerInstrumentationName() {\n return \"@microsoft/kiota-http-fetchlibrary\";\n }\n}\n/**\n * Gets the observability options from the request options\n * @param requestOptions The request options\n * @returns The observability options\n */\nexport function getObservabilityOptionsFromRequest(requestOptions) {\n if (requestOptions) {\n const observabilityOptions = requestOptions[ObservabilityOptionKey];\n if (observabilityOptions instanceof ObservabilityOptionsImpl) {\n return observabilityOptions;\n }\n }\n return undefined;\n}\n//# sourceMappingURL=observabilityOptions.js.map","/**\n * -------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.\n * See License in the project root for license information.\n * -------------------------------------------------------------------------------------------\n */\nimport { InMemoryBackingStoreFactory, DefaultApiError, enableBackingStoreForParseNodeFactory, enableBackingStoreForSerializationWriterFactory, ParseNodeFactoryRegistry, ResponseHandlerOptionKey, SerializationWriterFactoryRegistry } from \"@microsoft/kiota-abstractions\";\nimport { SpanStatusCode, trace } from \"@opentelemetry/api\";\nimport { HttpClient } from \"./httpClient.js\";\nimport { ObservabilityOptionsImpl } from \"./observabilityOptions.js\";\n/**\n * Request adapter implementation for the fetch API.\n */\nexport class FetchRequestAdapter {\n getSerializationWriterFactory() {\n return this.serializationWriterFactory;\n }\n getParseNodeFactory() {\n return this.parseNodeFactory;\n }\n getBackingStoreFactory() {\n return this.backingStoreFactory;\n }\n /**\n * Instantiates a new request adapter.\n * @param authenticationProvider the authentication provider to use.\n * @param parseNodeFactory the parse node factory to deserialize responses.\n * @param serializationWriterFactory the serialization writer factory to use to serialize request bodies.\n * @param httpClient the http client to use to execute requests.\n * @param observabilityOptions the observability options to use.\n * @param backingStoreFactory the backing store factory to use.\n */\n constructor(authenticationProvider, parseNodeFactory = new ParseNodeFactoryRegistry(), serializationWriterFactory = new SerializationWriterFactoryRegistry(), httpClient = new HttpClient(), observabilityOptions = new ObservabilityOptionsImpl(), backingStoreFactory = new InMemoryBackingStoreFactory()) {\n this.authenticationProvider = authenticationProvider;\n this.parseNodeFactory = parseNodeFactory;\n this.serializationWriterFactory = serializationWriterFactory;\n this.httpClient = httpClient;\n this.backingStoreFactory = backingStoreFactory;\n /** The base url for every request. */\n this.baseUrl = \"\";\n this.getResponseContentType = (response) => {\n var _a;\n const header = (_a = response.headers.get(\"content-type\")) === null || _a === void 0 ? void 0 : _a.toLowerCase();\n if (!header)\n return undefined;\n const segments = header.split(\";\");\n if (segments.length === 0)\n return undefined;\n else\n return segments[0];\n };\n this.getResponseHandler = (response) => {\n const options = response.getRequestOptions();\n const responseHandlerOption = options[ResponseHandlerOptionKey];\n return responseHandlerOption === null || responseHandlerOption === void 0 ? void 0 : responseHandlerOption.responseHandler;\n };\n this.sendCollectionOfPrimitive = (requestInfo, responseType, errorMappings) => {\n if (!requestInfo) {\n throw new Error(\"requestInfo cannot be null\");\n }\n return this.startTracingSpan(requestInfo, \"sendCollectionOfPrimitive\", async (span) => {\n const response = await this.getHttpResponseMessage(requestInfo, span);\n const responseHandler = this.getResponseHandler(requestInfo);\n if (responseHandler) {\n span.addEvent(FetchRequestAdapter.eventResponseHandlerInvokedKey);\n return await responseHandler.handleResponse(response, errorMappings);\n }\n else {\n try {\n await this.throwIfFailedResponse(response, errorMappings, span);\n if (this.shouldReturnUndefined(response))\n return undefined;\n switch (responseType) {\n case \"string\":\n case \"number\":\n case \"boolean\":\n case \"Date\":\n // eslint-disable-next-line no-case-declarations\n const rootNode = await this.getRootParseNode(response);\n return trace.getTracer(this.observabilityOptions.getTracerInstrumentationName()).startActiveSpan(`getCollectionOf${responseType}Value`, (deserializeSpan) => {\n try {\n span.setAttribute(FetchRequestAdapter.responseTypeAttributeKey, responseType);\n if (responseType === \"string\") {\n return rootNode.getCollectionOfPrimitiveValues();\n }\n else if (responseType === \"number\") {\n return rootNode.getCollectionOfPrimitiveValues();\n }\n else if (responseType === \"boolean\") {\n return rootNode.getCollectionOfPrimitiveValues();\n }\n else if (responseType === \"Date\") {\n return rootNode.getCollectionOfPrimitiveValues();\n }\n else if (responseType === \"Duration\") {\n return rootNode.getCollectionOfPrimitiveValues();\n }\n else if (responseType === \"DateOnly\") {\n return rootNode.getCollectionOfPrimitiveValues();\n }\n else if (responseType === \"TimeOnly\") {\n return rootNode.getCollectionOfPrimitiveValues();\n }\n else {\n throw new Error(\"unexpected type to deserialize\");\n }\n }\n finally {\n deserializeSpan.end();\n }\n });\n }\n }\n finally {\n await this.purgeResponseBody(response);\n }\n }\n });\n };\n this.sendCollection = (requestInfo, deserialization, errorMappings) => {\n if (!requestInfo) {\n throw new Error(\"requestInfo cannot be null\");\n }\n return this.startTracingSpan(requestInfo, \"sendCollection\", async (span) => {\n const response = await this.getHttpResponseMessage(requestInfo, span);\n const responseHandler = this.getResponseHandler(requestInfo);\n if (responseHandler) {\n span.addEvent(FetchRequestAdapter.eventResponseHandlerInvokedKey);\n return await responseHandler.handleResponse(response, errorMappings);\n }\n else {\n try {\n await this.throwIfFailedResponse(response, errorMappings, span);\n if (this.shouldReturnUndefined(response))\n return undefined;\n const rootNode = await this.getRootParseNode(response);\n return trace.getTracer(this.observabilityOptions.getTracerInstrumentationName()).startActiveSpan(\"getCollectionOfObjectValues\", (deserializeSpan) => {\n try {\n const result = rootNode.getCollectionOfObjectValues(deserialization);\n span.setAttribute(FetchRequestAdapter.responseTypeAttributeKey, \"object[]\");\n return result;\n }\n finally {\n deserializeSpan.end();\n }\n });\n }\n finally {\n await this.purgeResponseBody(response);\n }\n }\n });\n };\n this.startTracingSpan = (requestInfo, methodName, callback) => {\n var _a;\n const urlTemplate = decodeURIComponent((_a = requestInfo.urlTemplate) !== null && _a !== void 0 ? _a : \"\");\n const telemetryPathValue = urlTemplate.replace(/\\{\\?[^}]+\\}/gi, \"\");\n return trace.getTracer(this.observabilityOptions.getTracerInstrumentationName()).startActiveSpan(`${methodName} - ${telemetryPathValue}`, async (span) => {\n try {\n span.setAttribute(\"url.uri_template\", urlTemplate);\n return await callback(span);\n }\n finally {\n span.end();\n }\n });\n };\n this.send = (requestInfo, deserializer, errorMappings) => {\n if (!requestInfo) {\n throw new Error(\"requestInfo cannot be null\");\n }\n return this.startTracingSpan(requestInfo, \"send\", async (span) => {\n const response = await this.getHttpResponseMessage(requestInfo, span);\n const responseHandler = this.getResponseHandler(requestInfo);\n if (responseHandler) {\n span.addEvent(FetchRequestAdapter.eventResponseHandlerInvokedKey);\n return await responseHandler.handleResponse(response, errorMappings);\n }\n else {\n try {\n await this.throwIfFailedResponse(response, errorMappings, span);\n if (this.shouldReturnUndefined(response))\n return undefined;\n const rootNode = await this.getRootParseNode(response);\n return trace.getTracer(this.observabilityOptions.getTracerInstrumentationName()).startActiveSpan(\"getObjectValue\", (deserializeSpan) => {\n try {\n span.setAttribute(FetchRequestAdapter.responseTypeAttributeKey, \"object\");\n const result = rootNode.getObjectValue(deserializer);\n return result;\n }\n finally {\n deserializeSpan.end();\n }\n });\n }\n finally {\n await this.purgeResponseBody(response);\n }\n }\n });\n };\n this.sendPrimitive = (requestInfo, responseType, errorMappings) => {\n if (!requestInfo) {\n throw new Error(\"requestInfo cannot be null\");\n }\n return this.startTracingSpan(requestInfo, \"sendPrimitive\", async (span) => {\n const response = await this.getHttpResponseMessage(requestInfo, span);\n const responseHandler = this.getResponseHandler(requestInfo);\n if (responseHandler) {\n span.addEvent(FetchRequestAdapter.eventResponseHandlerInvokedKey);\n return await responseHandler.handleResponse(response, errorMappings);\n }\n else {\n try {\n await this.throwIfFailedResponse(response, errorMappings, span);\n if (this.shouldReturnUndefined(response))\n return undefined;\n switch (responseType) {\n case \"ArrayBuffer\":\n if (!response.body) {\n return undefined;\n }\n return (await response.arrayBuffer());\n case \"string\":\n case \"number\":\n case \"boolean\":\n case \"Date\":\n // eslint-disable-next-line no-case-declarations\n const rootNode = await this.getRootParseNode(response);\n span.setAttribute(FetchRequestAdapter.responseTypeAttributeKey, responseType);\n return trace.getTracer(this.observabilityOptions.getTracerInstrumentationName()).startActiveSpan(`get${responseType}Value`, (deserializeSpan) => {\n try {\n if (responseType === \"string\") {\n return rootNode.getStringValue();\n }\n else if (responseType === \"number\") {\n return rootNode.getNumberValue();\n }\n else if (responseType === \"boolean\") {\n return rootNode.getBooleanValue();\n }\n else if (responseType === \"Date\") {\n return rootNode.getDateValue();\n }\n else if (responseType === \"Duration\") {\n return rootNode.getDurationValue();\n }\n else if (responseType === \"DateOnly\") {\n return rootNode.getDateOnlyValue();\n }\n else if (responseType === \"TimeOnly\") {\n return rootNode.getTimeOnlyValue();\n }\n else {\n throw new Error(\"unexpected type to deserialize\");\n }\n }\n finally {\n deserializeSpan.end();\n }\n });\n }\n }\n finally {\n await this.purgeResponseBody(response);\n }\n }\n });\n };\n this.sendNoResponseContent = (requestInfo, errorMappings) => {\n if (!requestInfo) {\n throw new Error(\"requestInfo cannot be null\");\n }\n return this.startTracingSpan(requestInfo, \"sendNoResponseContent\", async (span) => {\n const response = await this.getHttpResponseMessage(requestInfo, span);\n const responseHandler = this.getResponseHandler(requestInfo);\n if (responseHandler) {\n span.addEvent(FetchRequestAdapter.eventResponseHandlerInvokedKey);\n return await responseHandler.handleResponse(response, errorMappings);\n }\n try {\n await this.throwIfFailedResponse(response, errorMappings, span);\n }\n finally {\n await this.purgeResponseBody(response);\n }\n });\n };\n this.sendEnum = (requestInfo, enumObject, errorMappings) => {\n if (!requestInfo) {\n throw new Error(\"requestInfo cannot be null\");\n }\n return this.startTracingSpan(requestInfo, \"sendEnum\", async (span) => {\n const response = await this.getHttpResponseMessage(requestInfo, span);\n const responseHandler = this.getResponseHandler(requestInfo);\n if (responseHandler) {\n span.addEvent(FetchRequestAdapter.eventResponseHandlerInvokedKey);\n return await responseHandler.handleResponse(response, errorMappings);\n }\n else {\n try {\n await this.throwIfFailedResponse(response, errorMappings, span);\n if (this.shouldReturnUndefined(response))\n return undefined;\n const rootNode = await this.getRootParseNode(response);\n return trace.getTracer(this.observabilityOptions.getTracerInstrumentationName()).startActiveSpan(\"getEnumValue\", (deserializeSpan) => {\n try {\n span.setAttribute(FetchRequestAdapter.responseTypeAttributeKey, \"enum\");\n const result = rootNode.getEnumValue(enumObject);\n return result;\n }\n finally {\n deserializeSpan.end();\n }\n });\n }\n finally {\n await this.purgeResponseBody(response);\n }\n }\n });\n };\n this.sendCollectionOfEnum = (requestInfo, enumObject, errorMappings) => {\n if (!requestInfo) {\n throw new Error(\"requestInfo cannot be null\");\n }\n return this.startTracingSpan(requestInfo, \"sendCollectionOfEnum\", async (span) => {\n const response = await this.getHttpResponseMessage(requestInfo, span);\n const responseHandler = this.getResponseHandler(requestInfo);\n if (responseHandler) {\n span.addEvent(FetchRequestAdapter.eventResponseHandlerInvokedKey);\n return await responseHandler.handleResponse(response, errorMappings);\n }\n else {\n try {\n await this.throwIfFailedResponse(response, errorMappings, span);\n if (this.shouldReturnUndefined(response))\n return undefined;\n const rootNode = await this.getRootParseNode(response);\n return trace.getTracer(this.observabilityOptions.getTracerInstrumentationName()).startActiveSpan(\"getCollectionOfEnumValues\", (deserializeSpan) => {\n try {\n const result = rootNode.getCollectionOfEnumValues(enumObject);\n span.setAttribute(FetchRequestAdapter.responseTypeAttributeKey, \"enum[]\");\n return result;\n }\n finally {\n deserializeSpan.end();\n }\n });\n }\n finally {\n await this.purgeResponseBody(response);\n }\n }\n });\n };\n this.enableBackingStore = (backingStoreFactory) => {\n if (this.parseNodeFactory instanceof ParseNodeFactoryRegistry) {\n this.parseNodeFactory = enableBackingStoreForParseNodeFactory(this.parseNodeFactory, this.parseNodeFactory);\n }\n else {\n throw new Error(\"parseNodeFactory is not a ParseNodeFactoryRegistry\");\n }\n if (this.serializationWriterFactory instanceof SerializationWriterFactoryRegistry && this.parseNodeFactory instanceof ParseNodeFactoryRegistry) {\n this.serializationWriterFactory = enableBackingStoreForSerializationWriterFactory(this.serializationWriterFactory, this.parseNodeFactory, this.serializationWriterFactory);\n }\n else {\n throw new Error(\"serializationWriterFactory is not a SerializationWriterFactoryRegistry or parseNodeFactory is not a ParseNodeFactoryRegistry\");\n }\n if (!this.serializationWriterFactory || !this.parseNodeFactory)\n throw new Error(\"unable to enable backing store\");\n if (backingStoreFactory) {\n this.backingStoreFactory = backingStoreFactory;\n }\n };\n this.getRootParseNode = (response) => {\n return trace.getTracer(this.observabilityOptions.getTracerInstrumentationName()).startActiveSpan(\"getRootParseNode\", async (span) => {\n try {\n const payload = await response.arrayBuffer();\n const responseContentType = this.getResponseContentType(response);\n if (!responseContentType)\n throw new Error(\"no response content type found for deserialization\");\n return this.parseNodeFactory.getRootParseNode(responseContentType, payload);\n }\n finally {\n span.end();\n }\n });\n };\n this.shouldReturnUndefined = (response) => {\n return response.status === 204 || response.status === 304 || !response.body;\n };\n /**\n * purges the response body if it hasn't been read to release the connection to the server\n * @param response the response to purge\n */\n this.purgeResponseBody = async (response) => {\n if (!response.bodyUsed && response.body) {\n await response.arrayBuffer();\n }\n };\n this.throwIfFailedResponse = (response, errorMappings, spanForAttributes) => {\n return trace.getTracer(this.observabilityOptions.getTracerInstrumentationName()).startActiveSpan(\"throwIfFailedResponse\", async (span) => {\n var _a, _b, _c;\n try {\n if (response.ok || (response.status >= 300 && response.status < 400 && !response.headers.has(FetchRequestAdapter.locationHeaderName)))\n return;\n spanForAttributes.setStatus({\n code: SpanStatusCode.ERROR,\n message: \"received_error_response\",\n });\n const statusCode = response.status;\n const responseHeaders = {};\n response.headers.forEach((value, key) => {\n responseHeaders[key] = value.split(\",\");\n });\n const factory = errorMappings ? ((_c = (_b = (_a = errorMappings[statusCode]) !== null && _a !== void 0 ? _a : (statusCode >= 400 && statusCode < 500 ? errorMappings._4XX : undefined)) !== null && _b !== void 0 ? _b : (statusCode >= 500 && statusCode < 600 ? errorMappings._5XX : undefined)) !== null && _c !== void 0 ? _c : errorMappings.XXX) : undefined;\n if (!factory) {\n spanForAttributes.setAttribute(FetchRequestAdapter.errorMappingFoundAttributeName, false);\n const error = new DefaultApiError(\"the server returned an unexpected status code and no error class is registered for this code \" + statusCode);\n error.responseStatusCode = statusCode;\n error.responseHeaders = responseHeaders;\n spanForAttributes.recordException(error);\n throw error;\n }\n spanForAttributes.setAttribute(FetchRequestAdapter.errorMappingFoundAttributeName, true);\n const rootNode = await this.getRootParseNode(response);\n let deserializedError = trace.getTracer(this.observabilityOptions.getTracerInstrumentationName()).startActiveSpan(\"getObjectValue\", (deserializeSpan) => {\n try {\n return rootNode.getObjectValue(factory);\n }\n finally {\n deserializeSpan.end();\n }\n });\n spanForAttributes.setAttribute(FetchRequestAdapter.errorBodyFoundAttributeName, !!deserializedError);\n if (!deserializedError)\n deserializedError = new DefaultApiError(\"unexpected error type\" + typeof deserializedError);\n const errorObject = deserializedError;\n errorObject.responseStatusCode = statusCode;\n errorObject.responseHeaders = responseHeaders;\n spanForAttributes.recordException(errorObject);\n throw errorObject;\n }\n finally {\n span.end();\n }\n });\n };\n this.getHttpResponseMessage = (requestInfo, spanForAttributes, claims) => {\n return trace.getTracer(this.observabilityOptions.getTracerInstrumentationName()).startActiveSpan(\"getHttpResponseMessage\", async (span) => {\n try {\n if (!requestInfo) {\n throw new Error(\"requestInfo cannot be null\");\n }\n this.setBaseUrlForRequestInformation(requestInfo);\n const additionalContext = {};\n if (claims) {\n additionalContext.claims = claims;\n }\n await this.authenticationProvider.authenticateRequest(requestInfo, additionalContext);\n const request = await this.getRequestFromRequestInformation(requestInfo, spanForAttributes);\n if (this.observabilityOptions) {\n requestInfo.addRequestOptions([this.observabilityOptions]);\n }\n let response = await this.httpClient.executeFetch(requestInfo.URL, request, requestInfo.getRequestOptions());\n response = await this.retryCAEResponseIfRequired(requestInfo, response, spanForAttributes, claims);\n if (response) {\n const responseContentLength = response.headers.get(\"Content-Length\");\n if (responseContentLength) {\n spanForAttributes.setAttribute(\"http.response.body.size\", parseInt(responseContentLength, 10));\n }\n const responseContentType = response.headers.get(\"Content-Type\");\n if (responseContentType) {\n spanForAttributes.setAttribute(\"http.response.header.content-type\", responseContentType);\n }\n spanForAttributes.setAttribute(\"http.response.status_code\", response.status);\n // getting the network.protocol.version (protocol version) is impossible with fetch API\n }\n return response;\n }\n finally {\n span.end();\n }\n });\n };\n this.retryCAEResponseIfRequired = async (requestInfo, response, spanForAttributes, claims) => {\n return trace.getTracer(this.observabilityOptions.getTracerInstrumentationName()).startActiveSpan(\"retryCAEResponseIfRequired\", async (span) => {\n try {\n const responseClaims = this.getClaimsFromResponse(response, claims);\n if (responseClaims) {\n span.addEvent(FetchRequestAdapter.authenticateChallengedEventKey);\n spanForAttributes.setAttribute(\"http.request.resend_count\", 1);\n await this.purgeResponseBody(response);\n return await this.getHttpResponseMessage(requestInfo, spanForAttributes, responseClaims);\n }\n return response;\n }\n finally {\n span.end();\n }\n });\n };\n this.getClaimsFromResponse = (response, claims) => {\n if (response.status === 401 && !claims) {\n // avoid infinite loop, we only retry once\n // no need to check for the content since it's an array and it doesn't need to be rewound\n const rawAuthenticateHeader = response.headers.get(\"WWW-Authenticate\");\n if (rawAuthenticateHeader && /^Bearer /gi.test(rawAuthenticateHeader)) {\n const rawParameters = rawAuthenticateHeader.replace(/^Bearer /gi, \"\").split(\",\");\n for (const rawParameter of rawParameters) {\n const trimmedParameter = rawParameter.trim();\n if (/claims=\"[^\"]+\"/gi.test(trimmedParameter)) {\n return trimmedParameter.replace(/claims=\"([^\"]+)\"/gi, \"$1\");\n }\n }\n }\n }\n return undefined;\n };\n this.setBaseUrlForRequestInformation = (requestInfo) => {\n requestInfo.pathParameters.baseurl = this.baseUrl;\n };\n this.getRequestFromRequestInformation = (requestInfo, spanForAttributes) => {\n // eslint-disable-next-line @typescript-eslint/require-await\n return trace.getTracer(this.observabilityOptions.getTracerInstrumentationName()).startActiveSpan(\"getRequestFromRequestInformation\", async (span) => {\n var _a, _b;\n try {\n const method = (_a = requestInfo.httpMethod) === null || _a === void 0 ? void 0 : _a.toString();\n const uri = requestInfo.URL;\n spanForAttributes.setAttribute(\"http.request.method\", method !== null && method !== void 0 ? method : \"\");\n const uriContainsScheme = uri.includes(\"://\");\n const schemeSplatUri = uri.split(\"://\");\n if (uriContainsScheme) {\n spanForAttributes.setAttribute(\"server.address\", schemeSplatUri[0]);\n }\n const uriWithoutScheme = uriContainsScheme ? schemeSplatUri[1] : uri;\n spanForAttributes.setAttribute(\"url.scheme\", uriWithoutScheme.split(\"/\")[0]);\n if (this.observabilityOptions.includeEUIIAttributes) {\n spanForAttributes.setAttribute(\"url.full\", decodeURIComponent(uri));\n }\n const requestContentLength = requestInfo.headers.tryGetValue(\"Content-Length\");\n if (requestContentLength) {\n spanForAttributes.setAttribute(\"http.response.body.size\", parseInt(requestContentLength[0], 10));\n }\n const requestContentType = requestInfo.headers.tryGetValue(\"Content-Type\");\n if (requestContentType) {\n spanForAttributes.setAttribute(\"http.request.header.content-type\", requestContentType);\n }\n const headers = {};\n (_b = requestInfo.headers) === null || _b === void 0 ? void 0 : _b.forEach((_, key) => {\n headers[key.toString().toLocaleLowerCase()] = this.foldHeaderValue(requestInfo.headers.tryGetValue(key));\n });\n const request = {\n method,\n headers,\n body: requestInfo.content,\n };\n return request;\n }\n finally {\n span.end();\n }\n });\n };\n this.foldHeaderValue = (value) => {\n if (!value || value.length < 1) {\n return \"\";\n }\n else if (value.length === 1) {\n return value[0];\n }\n else {\n return value.reduce((acc, val) => acc + val, \",\");\n }\n };\n /**\n * @inheritdoc\n */\n this.convertToNativeRequest = async (requestInfo) => {\n if (!requestInfo) {\n throw new Error(\"requestInfo cannot be null\");\n }\n await this.authenticationProvider.authenticateRequest(requestInfo, undefined);\n return this.startTracingSpan(requestInfo, \"convertToNativeRequest\", async (span) => {\n const request = await this.getRequestFromRequestInformation(requestInfo, span);\n return request;\n });\n };\n if (!authenticationProvider) {\n throw new Error(\"authentication provider cannot be null\");\n }\n if (!parseNodeFactory) {\n throw new Error(\"parse node factory cannot be null\");\n }\n if (!serializationWriterFactory) {\n throw new Error(\"serialization writer factory cannot be null\");\n }\n if (!httpClient) {\n throw new Error(\"http client cannot be null\");\n }\n if (!observabilityOptions) {\n throw new Error(\"observability options cannot be null\");\n }\n else {\n this.observabilityOptions = new ObservabilityOptionsImpl(observabilityOptions);\n }\n }\n}\nFetchRequestAdapter.responseTypeAttributeKey = \"com.microsoft.kiota.response.type\";\nFetchRequestAdapter.eventResponseHandlerInvokedKey = \"com.microsoft.kiota.response_handler_invoked\";\nFetchRequestAdapter.errorMappingFoundAttributeName = \"com.microsoft.kiota.error.mapping_found\";\nFetchRequestAdapter.errorBodyFoundAttributeName = \"com.microsoft.kiota.error.body_found\";\nFetchRequestAdapter.locationHeaderName = \"Location\";\nFetchRequestAdapter.authenticateChallengedEventKey = \"com.microsoft.kiota.authenticate_challenge_received\";\n//# sourceMappingURL=fetchRequestAdapter.js.map","/**\n * -------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.\n * See License in the project root for license information.\n * -------------------------------------------------------------------------------------------\n */\n/**\n * @module MiddlewareUtil\n */\n/**\n * To get the request header from the request\n * @param options - The request options object\n * @param key - The header key string\n * @returns A header value for the given key from the request\n */\nexport const getRequestHeader = (options, key) => {\n if (options && options.headers) {\n return options.headers[key];\n }\n return undefined;\n};\n/**\n * To set the header value to the given request\n * @param options - The request options object\n * @param key - The header key string\n * @param value - The header value string\n */\nexport const setRequestHeader = (options, key, value) => {\n if (options) {\n if (!options.headers) {\n options.headers = {};\n }\n options.headers[key] = value;\n }\n};\n/**\n * To delete the header key to the given request\n * @param options - The request options object\n * @param key - The header key string\n */\nexport const deleteRequestHeader = (options, key) => {\n if (options) {\n if (!options.headers) {\n options.headers = {};\n }\n delete options.headers[key];\n }\n};\n/**\n * To append the header value to the given request\n * @param options - The request options object\n * @param key - The header key string\n * @param value - The header value string\n * @param separator - The separator string\n */\nexport const appendRequestHeader = (options, key, value, separator = \", \") => {\n if (options) {\n if (!options.headers) {\n options.headers = {};\n }\n if (!options.headers[key]) {\n options.headers[key] = value;\n }\n else {\n options.headers[key] += `${separator}${value}`;\n }\n }\n};\n//# sourceMappingURL=headersUtil.js.map","/**\n * -------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.\n * See License in the project root for license information.\n * -------------------------------------------------------------------------------------------\n */\n/**\n * @module ChaosStrategy\n */\n/**\n * Strategy used for Testing Handler\n */\nexport var ChaosStrategy;\n(function (ChaosStrategy) {\n ChaosStrategy[ChaosStrategy[\"MANUAL\"] = 0] = \"MANUAL\";\n ChaosStrategy[ChaosStrategy[\"RANDOM\"] = 1] = \"RANDOM\";\n})(ChaosStrategy || (ChaosStrategy = {}));\n//# sourceMappingURL=chaosStrategy.js.map","/**\n * -------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.\n * See License in the project root for license information.\n * -------------------------------------------------------------------------------------------\n */\n/**\n * Key for the compression replace handler options.\n */\nexport const CompressionHandlerOptionsKey = \"CompressionHandlerOptionsKey\";\n/**\n * Options for the compression handler.\n */\nexport class CompressionHandlerOptions {\n /**\n * Create a new instance of the CompressionHandlerOptions class\n * @param config the configuration to apply to the compression handler options.\n */\n constructor(config) {\n var _a;\n this._enableCompression = (_a = config === null || config === void 0 ? void 0 : config.enableCompression) !== null && _a !== void 0 ? _a : true;\n }\n /**\n * @inheritdoc\n */\n getKey() {\n return CompressionHandlerOptionsKey;\n }\n /**\n * Returns whether the compression handler is enabled or not.\n * @returns whether the compression handler is enabled or not.\n */\n get ShouldCompress() {\n return this._enableCompression;\n }\n}\n//# sourceMappingURL=compressionHandlerOptions.js.map","/**\n * -------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.\n * See License in the project root for license information.\n * -------------------------------------------------------------------------------------------\n */\nimport { inNodeEnv } from \"@microsoft/kiota-abstractions\";\nimport { trace } from \"@opentelemetry/api\";\nimport { getObservabilityOptionsFromRequest } from \"../observabilityOptions.js\";\nimport { CompressionHandlerOptions, CompressionHandlerOptionsKey } from \"./options/compressionHandlerOptions.js\";\nimport { deleteRequestHeader, getRequestHeader, setRequestHeader } from \"../utils/headersUtil.js\";\n/**\n * Compress the url content.\n */\nexport class CompressionHandler {\n /**\n * Creates a new instance of the CompressionHandler class\n * @param handlerOptions The options for the compression handler.\n * @returns An instance of the CompressionHandler class\n */\n constructor(handlerOptions = new CompressionHandlerOptions()) {\n this.handlerOptions = handlerOptions;\n if (!handlerOptions) {\n throw new Error(\"handlerOptions cannot be undefined\");\n }\n }\n /**\n * @inheritdoc\n */\n execute(url, requestInit, requestOptions) {\n let currentOptions = this.handlerOptions;\n if (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions[CompressionHandlerOptionsKey]) {\n currentOptions = requestOptions[CompressionHandlerOptionsKey];\n }\n const obsOptions = getObservabilityOptionsFromRequest(requestOptions);\n if (obsOptions) {\n return trace.getTracer(obsOptions.getTracerInstrumentationName()).startActiveSpan(\"compressionHandler - execute\", (span) => {\n try {\n span.setAttribute(\"com.microsoft.kiota.handler.compression.enable\", currentOptions.ShouldCompress);\n return this.executeInternal(currentOptions, url, requestInit, requestOptions, span);\n }\n finally {\n span.end();\n }\n });\n }\n return this.executeInternal(currentOptions, url, requestInit, requestOptions);\n }\n async executeInternal(options, url, requestInit, requestOptions, span) {\n var _a, _b, _c, _d;\n if (!options.ShouldCompress || this.contentRangeBytesIsPresent(requestInit.headers) || this.contentEncodingIsPresent(requestInit.headers) || requestInit.body === null || requestInit.body === undefined) {\n return (_b = (_a = this.next) === null || _a === void 0 ? void 0 : _a.execute(url, requestInit, requestOptions)) !== null && _b !== void 0 ? _b : Promise.reject(new Error(\"Response is undefined\"));\n }\n span === null || span === void 0 ? void 0 : span.setAttribute(\"http.request.body.compressed\", true);\n const unCompressedBody = requestInit.body;\n const unCompressedBodySize = this.getRequestBodySize(unCompressedBody);\n // compress the request body\n const compressedBody = await this.compressRequestBody(unCompressedBody);\n // add Content-Encoding to request header\n setRequestHeader(requestInit, CompressionHandler.CONTENT_ENCODING_HEADER, \"gzip\");\n requestInit.body = compressedBody.compressedBody;\n span === null || span === void 0 ? void 0 : span.setAttribute(\"http.request.body.size\", compressedBody.size);\n // execute the next middleware and check if the response code is 415\n let response = await ((_c = this.next) === null || _c === void 0 ? void 0 : _c.execute(url, requestInit, requestOptions));\n if (!response) {\n throw new Error(\"Response is undefined\");\n }\n if (response.status === 415) {\n // remove the Content-Encoding header\n deleteRequestHeader(requestInit, CompressionHandler.CONTENT_ENCODING_HEADER);\n requestInit.body = unCompressedBody;\n span === null || span === void 0 ? void 0 : span.setAttribute(\"http.request.body.compressed\", false);\n span === null || span === void 0 ? void 0 : span.setAttribute(\"http.request.body.size\", unCompressedBodySize);\n response = await ((_d = this.next) === null || _d === void 0 ? void 0 : _d.execute(url, requestInit, requestOptions));\n }\n return response !== undefined && response !== null ? Promise.resolve(response) : Promise.reject(new Error(\"Response is undefined\"));\n }\n contentRangeBytesIsPresent(header) {\n var _a;\n if (!header) {\n return false;\n }\n const contentRange = getRequestHeader(header, CompressionHandler.CONTENT_RANGE_HEADER);\n return (_a = contentRange === null || contentRange === void 0 ? void 0 : contentRange.toLowerCase().includes(\"bytes\")) !== null && _a !== void 0 ? _a : false;\n }\n contentEncodingIsPresent(header) {\n if (!header) {\n return false;\n }\n return getRequestHeader(header, CompressionHandler.CONTENT_ENCODING_HEADER) !== undefined;\n }\n getRequestBodySize(body) {\n if (!body) {\n return 0;\n }\n if (typeof body === \"string\") {\n return body.length;\n }\n if (body instanceof Blob) {\n return body.size;\n }\n if (body instanceof ArrayBuffer) {\n return body.byteLength;\n }\n if (ArrayBuffer.isView(body)) {\n return body.byteLength;\n }\n if (inNodeEnv() && Buffer.isBuffer(body)) {\n return body.byteLength;\n }\n throw new Error(\"Unsupported body type\");\n }\n readBodyAsBytes(body) {\n if (!body) {\n return { stream: new ReadableStream(), size: 0 };\n }\n const uint8ArrayToStream = (uint8Array) => {\n return new ReadableStream({\n start(controller) {\n controller.enqueue(uint8Array);\n controller.close();\n },\n });\n };\n if (typeof body === \"string\") {\n return { stream: uint8ArrayToStream(new TextEncoder().encode(body)), size: body.length };\n }\n if (body instanceof Blob) {\n return { stream: body.stream(), size: body.size };\n }\n if (body instanceof ArrayBuffer) {\n return { stream: uint8ArrayToStream(new Uint8Array(body)), size: body.byteLength };\n }\n if (ArrayBuffer.isView(body)) {\n return { stream: uint8ArrayToStream(new Uint8Array(body.buffer, body.byteOffset, body.byteLength)), size: body.byteLength };\n }\n throw new Error(\"Unsupported body type\");\n }\n async compressRequestBody(body) {\n const compressionData = this.readBodyAsBytes(body);\n const compressedBody = await this.compressUsingCompressionStream(compressionData.stream);\n return {\n compressedBody: compressedBody.body,\n size: compressedBody.size,\n };\n }\n async compressUsingCompressionStream(uint8ArrayStream) {\n const compressionStream = new CompressionStream(\"gzip\");\n const compressedStream = uint8ArrayStream.pipeThrough(compressionStream);\n const reader = compressedStream.getReader();\n const compressedChunks = [];\n let totalLength = 0;\n let result = await reader.read();\n while (!result.done) {\n const chunk = result.value;\n compressedChunks.push(chunk);\n totalLength += chunk.length;\n result = await reader.read();\n }\n const compressedArray = new Uint8Array(totalLength);\n let offset = 0;\n for (const chunk of compressedChunks) {\n compressedArray.set(chunk, offset);\n offset += chunk.length;\n }\n return {\n body: compressedArray.buffer,\n size: compressedArray.length,\n };\n }\n}\n/**\n * A member holding the name of content range header\n */\nCompressionHandler.CONTENT_RANGE_HEADER = \"Content-Range\";\n/**\n * A member holding the name of content encoding header\n */\nCompressionHandler.CONTENT_ENCODING_HEADER = \"Content-Encoding\";\n//# sourceMappingURL=compressionHandler.js.map","/**\n * -------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.\n * See License in the project root for license information.\n * -------------------------------------------------------------------------------------------\n */\nimport { Headers } from \"@microsoft/kiota-abstractions\";\nexport const HeadersInspectionOptionsKey = \"HeadersInspectionOptionsKey\";\n/**\n * RequestOption\n * Options\n * Options to inspect headers\n */\nexport class HeadersInspectionOptions {\n /**\n * Gets the request headers\n * @returns the request headers\n */\n getRequestHeaders() {\n return this.requestHeaders;\n }\n /**\n * Gets the response headers\n * @returns the response headers\n */\n getResponseHeaders() {\n return this.responseHeaders;\n }\n /**\n *\n * To create an instance of HeadersInspectionOptions\n * @param [options] - The headers inspection options value\n * @returns An instance of HeadersInspectionOptions\n * @example const options = new HeadersInspectionOptions({ inspectRequestHeaders: true, inspectResponseHeaders: true });\n */\n constructor(options = {}) {\n var _a, _b;\n this.requestHeaders = new Headers();\n this.responseHeaders = new Headers();\n this.inspectRequestHeaders = (_a = options.inspectRequestHeaders) !== null && _a !== void 0 ? _a : false;\n this.inspectResponseHeaders = (_b = options.inspectResponseHeaders) !== null && _b !== void 0 ? _b : false;\n }\n getKey() {\n return HeadersInspectionOptionsKey;\n }\n}\n//# sourceMappingURL=headersInspectionOptions.js.map","/**\n * -------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.\n * See License in the project root for license information.\n * -------------------------------------------------------------------------------------------\n */\nimport { trace } from \"@opentelemetry/api\";\nimport { getObservabilityOptionsFromRequest } from \"../observabilityOptions.js\";\nimport { HeadersInspectionOptions, HeadersInspectionOptionsKey } from \"./options/headersInspectionOptions.js\";\n/**\n * Middleware\n * Inspects the headers of the request and response\n */\nexport class HeadersInspectionHandler {\n /**\n *\n * Creates new instance of HeadersInspectionHandler\n * @param _options The options for inspecting the headers\n */\n constructor(_options = new HeadersInspectionOptions()) {\n this._options = _options;\n }\n execute(url, requestInit, requestOptions) {\n let currentOptions = this._options;\n if (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions[HeadersInspectionOptionsKey]) {\n currentOptions = requestOptions[HeadersInspectionOptionsKey];\n }\n const obsOptions = getObservabilityOptionsFromRequest(requestOptions);\n if (obsOptions) {\n return trace.getTracer(obsOptions.getTracerInstrumentationName()).startActiveSpan(\"retryHandler - execute\", (span) => {\n try {\n span.setAttribute(\"com.microsoft.kiota.handler.headersInspection.enable\", true);\n return this.executeInternal(url, requestInit, requestOptions, currentOptions);\n }\n finally {\n span.end();\n }\n });\n }\n return this.executeInternal(url, requestInit, requestOptions, currentOptions);\n }\n async executeInternal(url, requestInit, requestOptions, currentOptions) {\n if (!this.next) {\n throw new Error(\"next middleware is undefined.\");\n }\n if (currentOptions.inspectRequestHeaders && requestInit.headers) {\n for (const [key, value] of requestInit.headers) {\n currentOptions.getRequestHeaders().add(key, value);\n }\n }\n const response = await this.next.execute(url, requestInit, requestOptions);\n if (currentOptions.inspectResponseHeaders && response.headers) {\n for (const [key, value] of response.headers.entries()) {\n currentOptions.getResponseHeaders().add(key, value);\n }\n }\n return response;\n }\n}\n//# sourceMappingURL=headersInspectionHandler.js.map","/**\n * -------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.\n * See License in the project root for license information.\n * -------------------------------------------------------------------------------------------\n */\nexport const ParametersNameDecodingHandlerOptionsKey = \"RetryHandlerOptionKey\";\n/** The ParametersNameDecodingOptions request class */\nexport class ParametersNameDecodingHandlerOptions {\n getKey() {\n return ParametersNameDecodingHandlerOptionsKey;\n }\n /**\n *\n * To create an instance of ParametersNameDecodingHandlerOptions\n * @param [options] - The optional parameters\n * @returns An instance of ParametersNameDecodingHandlerOptions\n * @example ParametersNameDecodingHandlerOptions({ enable: true, charactersToDecode: [\".\", \"-\", \"~\", \"$\"] });\n */\n constructor(options = {}) {\n var _a, _b;\n this.enable = (_a = options.enable) !== null && _a !== void 0 ? _a : true;\n this.charactersToDecode = (_b = options.charactersToDecode) !== null && _b !== void 0 ? _b : [\".\", \"-\", \"~\", \"$\"];\n }\n}\n//# sourceMappingURL=parametersNameDecodingOptions.js.map","/**\n * -------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.\n * See License in the project root for license information.\n * -------------------------------------------------------------------------------------------\n */\nimport { trace } from \"@opentelemetry/api\";\nimport { getObservabilityOptionsFromRequest } from \"../observabilityOptions.js\";\nimport { ParametersNameDecodingHandlerOptions, ParametersNameDecodingHandlerOptionsKey } from \"./options/parametersNameDecodingOptions.js\";\n/**\n * @module ParametersNameDecodingHandler\n */\nexport class ParametersNameDecodingHandler {\n /**\n *\n * To create an instance of ParametersNameDecodingHandler\n * @param [options] - The parameters name decoding handler options value\n */\n constructor(options = new ParametersNameDecodingHandlerOptions()) {\n this.options = options;\n if (!options) {\n throw new Error(\"The options parameter is required.\");\n }\n }\n /**\n * To execute the current middleware\n * @param url - The url to be fetched\n * @param requestInit - The request init object\n * @param requestOptions - The request options\n * @returns A Promise that resolves to nothing\n */\n execute(url, requestInit, requestOptions) {\n let currentOptions = this.options;\n if (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions[ParametersNameDecodingHandlerOptionsKey]) {\n currentOptions = requestOptions[ParametersNameDecodingHandlerOptionsKey];\n }\n const obsOptions = getObservabilityOptionsFromRequest(requestOptions);\n if (obsOptions) {\n return trace.getTracer(obsOptions.getTracerInstrumentationName()).startActiveSpan(\"parametersNameDecodingHandler - execute\", (span) => {\n try {\n span.setAttribute(\"com.microsoft.kiota.handler.parameters_name_decoding.enable\", currentOptions.enable);\n return this.decodeParameters(url, requestInit, currentOptions, requestOptions);\n }\n finally {\n span.end();\n }\n });\n }\n return this.decodeParameters(url, requestInit, currentOptions, requestOptions);\n }\n decodeParameters(url, requestInit, currentOptions, requestOptions) {\n var _a, _b;\n let updatedUrl = url;\n if (currentOptions && currentOptions.enable && url.includes(\"%\") && currentOptions.charactersToDecode && currentOptions.charactersToDecode.length > 0) {\n currentOptions.charactersToDecode.forEach((character) => {\n updatedUrl = updatedUrl.replace(new RegExp(`%${character.charCodeAt(0).toString(16)}`, \"gi\"), character);\n });\n }\n return (_b = (_a = this.next) === null || _a === void 0 ? void 0 : _a.execute(updatedUrl, requestInit, requestOptions)) !== null && _b !== void 0 ? _b : Promise.reject(new Error(\"The next middleware is not set.\"));\n }\n}\n//# sourceMappingURL=parametersNameDecodingHandler.js.map","/**\n * -------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.\n * See License in the project root for license information.\n * -------------------------------------------------------------------------------------------\n */\nexport const RedirectHandlerOptionKey = \"RedirectHandlerOption\";\n/**\n * MiddlewareOptions\n * A class representing RedirectHandlerOptions\n */\nexport class RedirectHandlerOptions {\n /**\n *\n * To create an instance of RedirectHandlerOptions\n * @param [options] - The redirect handler options instance\n * @returns An instance of RedirectHandlerOptions\n * @throws Error if maxRedirects is more than 20 or less than 0\n * @example\tconst options = new RedirectHandlerOptions({ maxRedirects: 5 });\n */\n constructor(options = {}) {\n var _a, _b;\n if (options.maxRedirects && options.maxRedirects > RedirectHandlerOptions.MAX_MAX_REDIRECTS) {\n const error = new Error(`MaxRedirects should not be more than ${RedirectHandlerOptions.MAX_MAX_REDIRECTS}`);\n error.name = \"MaxLimitExceeded\";\n throw error;\n }\n if (options.maxRedirects !== undefined && options.maxRedirects < 0) {\n const error = new Error(`MaxRedirects should not be negative`);\n error.name = \"MinExpectationNotMet\";\n throw error;\n }\n this.maxRedirects = (_a = options.maxRedirects) !== null && _a !== void 0 ? _a : RedirectHandlerOptions.DEFAULT_MAX_REDIRECTS;\n this.shouldRedirect = (_b = options.shouldRedirect) !== null && _b !== void 0 ? _b : RedirectHandlerOptions.defaultShouldRetry;\n }\n getKey() {\n return RedirectHandlerOptionKey;\n }\n}\n/**\n * A member holding default max redirects value\n */\nRedirectHandlerOptions.DEFAULT_MAX_REDIRECTS = 5;\n/**\n * A member holding maximum max redirects value\n */\nRedirectHandlerOptions.MAX_MAX_REDIRECTS = 20;\n/**\n *\n * A member holding default shouldRedirect callback\n * @returns true\n */\nRedirectHandlerOptions.defaultShouldRetry = () => true;\n//# sourceMappingURL=redirectHandlerOptions.js.map","/**\n * -------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.\n * See License in the project root for license information.\n * -------------------------------------------------------------------------------------------\n */\n/**\n * @module RedirectHandler\n */\nimport { HttpMethod } from \"@microsoft/kiota-abstractions\";\nimport { trace } from \"@opentelemetry/api\";\nimport { getObservabilityOptionsFromRequest } from \"../observabilityOptions.js\";\nimport { RedirectHandlerOptionKey, RedirectHandlerOptions } from \"./options/redirectHandlerOptions.js\";\n/**\n *\n * Class\n * Middleware\n * Class representing RedirectHandler\n */\nexport class RedirectHandler {\n /**\n *\n *\n * To create an instance of RedirectHandler\n * @param [options] - The redirect handler options instance\n * @returns An instance of RedirectHandler\n */\n constructor(options = new RedirectHandlerOptions()) {\n this.options = options;\n if (!options) {\n throw new Error(\"The options parameter is required.\");\n }\n }\n /**\n *\n * To check whether the response has the redirect status code or not\n * @param response - The response object\n * @returns A boolean representing whether the response contains the redirect status code or not\n */\n isRedirect(response) {\n return RedirectHandler.REDIRECT_STATUS_CODES.has(response.status);\n }\n /**\n *\n * To check whether the response has location header or not\n * @param response - The response object\n * @returns A boolean representing the whether the response has location header or not\n */\n hasLocationHeader(response) {\n return response.headers.has(RedirectHandler.LOCATION_HEADER);\n }\n /**\n *\n * To get the redirect url from location header in response object\n * @param response - The response object\n * @returns A redirect url from location header\n */\n getLocationHeader(response) {\n return response.headers.get(RedirectHandler.LOCATION_HEADER);\n }\n /**\n *\n * To check whether the given url is a relative url or not\n * @param url - The url string value\n * @returns A boolean representing whether the given url is a relative url or not\n */\n isRelativeURL(url) {\n return !url.includes(\"://\");\n }\n /**\n *\n * To check whether the authorization header in the request should be dropped for consequent redirected requests\n * @param requestUrl - The request url value\n * @param redirectUrl - The redirect url value\n * @returns A boolean representing whether the authorization header in the request should be dropped for consequent redirected requests\n */\n shouldDropAuthorizationHeader(requestUrl, redirectUrl) {\n const schemeHostRegex = /^[A-Za-z].+?:\\/\\/.+?(?=\\/|$)/;\n const requestMatches = schemeHostRegex.exec(requestUrl);\n let requestAuthority;\n let redirectAuthority;\n if (requestMatches !== null) {\n requestAuthority = requestMatches[0];\n }\n const redirectMatches = schemeHostRegex.exec(redirectUrl);\n if (redirectMatches !== null) {\n redirectAuthority = redirectMatches[0];\n }\n return typeof requestAuthority !== \"undefined\" && typeof redirectAuthority !== \"undefined\" && requestAuthority !== redirectAuthority;\n }\n /**\n * To execute the next middleware and to handle in case of redirect response returned by the server\n * @param url - The url string value\n * @param fetchRequestInit - The Fetch RequestInit object\n * @param redirectCount - The redirect count value\n * @param currentOptions - The redirect handler options instance\n * @param requestOptions - The request options\n * @param tracerName - The name to use for the tracer\n * @returns A promise that resolves to nothing\n */\n async executeWithRedirect(url, fetchRequestInit, redirectCount, currentOptions, requestOptions, tracerName) {\n var _a;\n const response = await ((_a = this.next) === null || _a === void 0 ? void 0 : _a.execute(url, fetchRequestInit, requestOptions));\n if (!response) {\n throw new Error(\"Response is undefined\");\n }\n if (redirectCount < currentOptions.maxRedirects && this.isRedirect(response) && this.hasLocationHeader(response) && currentOptions.shouldRedirect(response)) {\n ++redirectCount;\n if (response.status === RedirectHandler.STATUS_CODE_SEE_OTHER) {\n fetchRequestInit.method = HttpMethod.GET;\n delete fetchRequestInit.body;\n }\n else {\n const redirectUrl = this.getLocationHeader(response);\n if (redirectUrl) {\n if (fetchRequestInit.headers && !this.isRelativeURL(redirectUrl) && this.shouldDropAuthorizationHeader(url, redirectUrl)) {\n delete fetchRequestInit.headers[RedirectHandler.AUTHORIZATION_HEADER];\n }\n url = redirectUrl;\n }\n }\n if (tracerName) {\n return trace.getTracer(tracerName).startActiveSpan(`redirectHandler - redirect ${redirectCount}`, (span) => {\n try {\n span.setAttribute(\"com.microsoft.kiota.handler.redirect.count\", redirectCount);\n span.setAttribute(\"http.response.status_code\", response.status);\n return this.executeWithRedirect(url, fetchRequestInit, redirectCount, currentOptions, requestOptions);\n }\n finally {\n span.end();\n }\n });\n }\n return await this.executeWithRedirect(url, fetchRequestInit, redirectCount, currentOptions, requestOptions);\n }\n else {\n return response;\n }\n }\n /**\n * Executes the request and returns a promise resolving the response.\n * @param url - The url for the request\n * @param requestInit - The Fetch RequestInit object.\n * @param requestOptions - The request options.\n * @returns A Promise that resolves to the response.\n */\n execute(url, requestInit, requestOptions) {\n const redirectCount = 0;\n let currentOptions = this.options;\n if (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions[RedirectHandlerOptionKey]) {\n currentOptions = requestOptions[RedirectHandlerOptionKey];\n }\n requestInit.redirect = RedirectHandler.MANUAL_REDIRECT;\n const obsOptions = getObservabilityOptionsFromRequest(requestOptions);\n if (obsOptions) {\n return trace.getTracer(obsOptions.getTracerInstrumentationName()).startActiveSpan(\"redirectHandler - execute\", (span) => {\n try {\n span.setAttribute(\"com.microsoft.kiota.handler.redirect.enable\", true);\n return this.executeWithRedirect(url, requestInit, redirectCount, currentOptions, requestOptions, obsOptions.getTracerInstrumentationName());\n }\n finally {\n span.end();\n }\n });\n }\n return this.executeWithRedirect(url, requestInit, redirectCount, currentOptions, requestOptions);\n }\n}\n/**\n * A member holding the array of redirect status codes\n */\nRedirectHandler.REDIRECT_STATUS_CODES = new Set([\n 301, // Moved Permanently\n 302, // Found\n 303, // See Other\n 307, // Temporary Permanently\n 308, // Moved Permanently\n]);\n/**\n * A member holding SeeOther status code\n */\nRedirectHandler.STATUS_CODE_SEE_OTHER = 303;\n/**\n * A member holding the name of the location header\n */\nRedirectHandler.LOCATION_HEADER = \"Location\";\n/**\n * A member representing the authorization header name\n */\nRedirectHandler.AUTHORIZATION_HEADER = \"Authorization\";\n/**\n * A member holding the manual redirect value\n */\nRedirectHandler.MANUAL_REDIRECT = \"manual\";\n//# sourceMappingURL=redirectHandler.js.map","/**\n * -------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.\n * See License in the project root for license information.\n * -------------------------------------------------------------------------------------------\n */\nexport const RetryHandlerOptionKey = \"RetryHandlerOptionKey\";\n/**\n * RequestOption\n * Options\n * Class for RetryHandlerOptions\n */\nexport class RetryHandlerOptions {\n /**\n *\n * To create an instance of RetryHandlerOptions\n * @param options - The RetryHandlerOptionsParams object\n * @returns An instance of RetryHandlerOptions\n * @example\tconst options = new RetryHandlerOptions({ maxRetries: 4 });\n */\n constructor(options = {}) {\n var _a, _b, _c;\n if (options.delay !== undefined && options.delay > RetryHandlerOptions.MAX_DELAY) {\n throw this.createError(`Delay should not be more than ${RetryHandlerOptions.MAX_DELAY}`, \"MaxLimitExceeded\");\n }\n if (options.maxRetries !== undefined && options.maxRetries > RetryHandlerOptions.MAX_MAX_RETRIES) {\n throw this.createError(`MaxRetries should not be more than ${RetryHandlerOptions.MAX_MAX_RETRIES}`, \"MaxLimitExceeded\");\n }\n if (options.delay !== undefined && options.delay < 0) {\n throw this.createError(`Delay should not be negative`, \"MinExpectationNotMet\");\n }\n if (options.maxRetries !== undefined && options.maxRetries < 0) {\n throw this.createError(`MaxRetries should not be negative`, \"MinExpectationNotMet\");\n }\n this.delay = Math.min((_a = options.delay) !== null && _a !== void 0 ? _a : RetryHandlerOptions.DEFAULT_DELAY, RetryHandlerOptions.MAX_DELAY);\n this.maxRetries = Math.min((_b = options.maxRetries) !== null && _b !== void 0 ? _b : RetryHandlerOptions.DEFAULT_MAX_RETRIES, RetryHandlerOptions.MAX_MAX_RETRIES);\n this.shouldRetry = (_c = options.shouldRetry) !== null && _c !== void 0 ? _c : RetryHandlerOptions.defaultShouldRetry;\n }\n /**\n *\n * Creates an error object with a message and name\n * @param message - The error message\n * @param name - The error name\n * @returns An error object\n */\n createError(message, name) {\n const error = new Error(message);\n error.name = name;\n return error;\n }\n /**\n *\n * To get the maximum delay\n * @returns A maximum delay\n */\n getMaxDelay() {\n return RetryHandlerOptions.MAX_DELAY;\n }\n getKey() {\n return RetryHandlerOptionKey;\n }\n}\n/**\n * A member holding default delay value in seconds\n */\nRetryHandlerOptions.DEFAULT_DELAY = 3;\n/**\n * A member holding default maxRetries value\n */\nRetryHandlerOptions.DEFAULT_MAX_RETRIES = 3;\n/**\n * A member holding maximum delay value in seconds\n */\nRetryHandlerOptions.MAX_DELAY = 180;\n/**\n * A member holding maximum maxRetries value\n */\nRetryHandlerOptions.MAX_MAX_RETRIES = 10;\n/**\n * A member holding default shouldRetry callback\n * @returns true\n */\nRetryHandlerOptions.defaultShouldRetry = () => true;\n//# sourceMappingURL=retryHandlerOptions.js.map","/**\n * -------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.\n * See License in the project root for license information.\n * -------------------------------------------------------------------------------------------\n */\n/**\n * @module RetryHandler\n */\nimport { HttpMethod } from \"@microsoft/kiota-abstractions\";\nimport { trace } from \"@opentelemetry/api\";\nimport { getObservabilityOptionsFromRequest } from \"../observabilityOptions.js\";\nimport { getRequestHeader, setRequestHeader } from \"../utils/headersUtil.js\";\nimport { RetryHandlerOptionKey, RetryHandlerOptions } from \"./options/retryHandlerOptions.js\";\n/**\n * Middleware\n * Class for RetryHandler\n */\nexport class RetryHandler {\n /**\n *\n * To create an instance of RetryHandler\n * @param [options] - The retry handler options value\n * @returns An instance of RetryHandler\n */\n constructor(options = new RetryHandlerOptions()) {\n this.options = options;\n if (!options) {\n throw new Error(\"The options parameter is required.\");\n }\n }\n /**\n *\n *\n * To check whether the response has the retry status code\n * @param response - The response object\n * @returns Whether the response has retry status code or not\n */\n isRetry(response) {\n return RetryHandler.RETRY_STATUS_CODES.has(response.status);\n }\n /**\n *\n * To check whether the payload is buffered or not\n * @param options - The options of a request\n * @returns Whether the payload is buffered or not\n */\n isBuffered(options) {\n var _a;\n const method = options.method;\n const isPutPatchOrPost = method === HttpMethod.PUT || method === HttpMethod.PATCH || method === HttpMethod.POST;\n if (isPutPatchOrPost) {\n const isStream = ((_a = getRequestHeader(options, \"content-type\")) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === \"application/octet-stream\";\n if (isStream) {\n return false;\n }\n }\n return true;\n }\n /**\n *\n * To get the delay for a retry\n * @param response - The response object\n * @param retryAttempts - The current attempt count\n * @param delay - The delay value in seconds\n * @returns A delay for a retry\n */\n getDelay(response, retryAttempts, delay) {\n const getRandomness = () => Number(Math.random().toFixed(3));\n const retryAfter = response.headers !== undefined ? response.headers.get(RetryHandler.RETRY_AFTER_HEADER) : null;\n let newDelay;\n if (retryAfter !== null) {\n // Retry-After: <http-date>\n if (Number.isNaN(Number(retryAfter))) {\n newDelay = Math.round((new Date(retryAfter).getTime() - Date.now()) / 1000);\n }\n else {\n // Retry-After: <delay-seconds>\n newDelay = Number(retryAfter);\n }\n }\n else {\n // Adding randomness to avoid retrying at a same\n newDelay = retryAttempts >= 2 ? this.getExponentialBackOffTime(retryAttempts) + delay + getRandomness() : delay + getRandomness();\n }\n return Math.min(newDelay, this.options.getMaxDelay() + getRandomness());\n }\n /**\n *\n * To get an exponential back off value\n * @param attempts - The current attempt count\n * @returns An exponential back off value\n */\n getExponentialBackOffTime(attempts) {\n return Math.round((1 / 2) * (2 ** attempts - 1));\n }\n /**\n * To add delay for the execution\n * @param delaySeconds - The delay value in seconds\n * @returns A Promise that resolves to nothing\n */\n async sleep(delaySeconds) {\n const delayMilliseconds = delaySeconds * 1000;\n return new Promise((resolve) => setTimeout(resolve, delayMilliseconds)); // browser or node\n }\n /**\n * To execute the middleware with retries\n * @param url - The request url\n * @param fetchRequestInit - The request options\n * @param retryAttempts - The current attempt count\n * @param currentOptions - The current request options for the retry handler.\n * @param requestOptions - The retry middleware options instance\n * @param tracerName - The name to use for the tracer\n * @returns A Promise that resolves to nothing\n */\n async executeWithRetry(url, fetchRequestInit, retryAttempts, currentOptions, requestOptions, tracerName) {\n var _a;\n const response = await ((_a = this.next) === null || _a === void 0 ? void 0 : _a.execute(url, fetchRequestInit, requestOptions));\n if (!response) {\n throw new Error(\"Response is undefined\");\n }\n if (retryAttempts < currentOptions.maxRetries && this.isRetry(response) && this.isBuffered(fetchRequestInit) && currentOptions.shouldRetry(currentOptions.delay, retryAttempts, url, fetchRequestInit, response)) {\n ++retryAttempts;\n setRequestHeader(fetchRequestInit, RetryHandler.RETRY_ATTEMPT_HEADER, retryAttempts.toString());\n let delay = null;\n if (response) {\n delay = this.getDelay(response, retryAttempts, currentOptions.delay);\n await this.sleep(delay);\n }\n if (tracerName) {\n return await trace.getTracer(tracerName).startActiveSpan(`retryHandler - attempt ${retryAttempts}`, (span) => {\n try {\n span.setAttribute(\"http.request.resend_count\", retryAttempts);\n if (delay) {\n span.setAttribute(\"http.request.resend_delay\", delay);\n }\n span.setAttribute(\"http.response.status_code\", response.status);\n return this.executeWithRetry(url, fetchRequestInit, retryAttempts, currentOptions, requestOptions);\n }\n finally {\n span.end();\n }\n });\n }\n return await this.executeWithRetry(url, fetchRequestInit, retryAttempts, currentOptions, requestOptions);\n }\n else {\n return response;\n }\n }\n /**\n * To execute the current middleware\n * @param url - The request url\n * @param requestInit - The request options\n * @param requestOptions - The request options\n * @returns A Promise that resolves to nothing\n */\n execute(url, requestInit, requestOptions) {\n const retryAttempts = 0;\n let currentOptions = this.options;\n if (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions[RetryHandlerOptionKey]) {\n currentOptions = requestOptions[RetryHandlerOptionKey];\n }\n const obsOptions = getObservabilityOptionsFromRequest(requestOptions);\n if (obsOptions) {\n return trace.getTracer(obsOptions.getTracerInstrumentationName()).startActiveSpan(\"retryHandler - execute\", (span) => {\n try {\n span.setAttribute(\"com.microsoft.kiota.handler.retry.enable\", true);\n return this.executeWithRetry(url, requestInit, retryAttempts, currentOptions, requestOptions, obsOptions.getTracerInstrumentationName());\n }\n finally {\n span.end();\n }\n });\n }\n return this.executeWithRetry(url, requestInit, retryAttempts, currentOptions, requestOptions);\n }\n}\n/**\n * A list of status codes that needs to be retried\n */\nRetryHandler.RETRY_STATUS_CODES = new Set([\n 429, // Too many requests\n 503, // Service unavailable\n 504, // Gateway timeout\n]);\n/**\n * A member holding the name of retry attempt header\n */\nRetryHandler.RETRY_ATTEMPT_HEADER = \"Retry-Attempt\";\n/**\n * A member holding the name of retry after header\n */\nRetryHandler.RETRY_AFTER_HEADER = \"Retry-After\";\n//# sourceMappingURL=retryHandler.js.map","/**\n * -------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.\n * See License in the project root for license information.\n * -------------------------------------------------------------------------------------------\n */\n// x-release-please-start-version\nexport const libraryVersion = \"1.0.0-preview.24\";\n// x-release-please-end\n//# sourceMappingURL=version.js.map","/**\n * -------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.\n * See License in the project root for license information.\n * -------------------------------------------------------------------------------------------\n */\nimport { libraryVersion } from \"./version.js\";\nexport const UserAgentHandlerOptionsKey = \"UserAgentHandlerOptionKey\";\n/**\n * Represents the options for the UserAgentHandler.\n */\nexport class UserAgentHandlerOptions {\n getKey() {\n return UserAgentHandlerOptionsKey;\n }\n /**\n *\n * To create an instance of UserAgentHandlerOptions\n * @param [options] - The options for the UserAgentHandler\n * @example\tconst options = new UserAgentHandlerOptions({ enable: false });\n */\n constructor(options = {}) {\n var _a, _b, _c;\n this.enable = (_a = options.enable) !== null && _a !== void 0 ? _a : true;\n this.productName = (_b = options.productName) !== null && _b !== void 0 ? _b : \"kiota-typescript\";\n this.productVersion = (_c = options.productVersion) !== null && _c !== void 0 ? _c : libraryVersion;\n }\n}\n//# sourceMappingURL=userAgentHandlerOptions.js.map","/**\n * -------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.\n * See License in the project root for license information.\n * -------------------------------------------------------------------------------------------\n */\nimport { trace } from \"@opentelemetry/api\";\nimport { getObservabilityOptionsFromRequest } from \"../observabilityOptions.js\";\nimport { appendRequestHeader, getRequestHeader } from \"../utils/headersUtil.js\";\nimport { UserAgentHandlerOptions, UserAgentHandlerOptionsKey } from \"./options/userAgentHandlerOptions.js\";\nconst USER_AGENT_HEADER_KEY = \"User-Agent\";\nexport class UserAgentHandler {\n /**\n * To create an instance of UserAgentHandler\n * @param _options - The options for the middleware\n */\n constructor(_options = new UserAgentHandlerOptions()) {\n this._options = _options;\n }\n /** @inheritdoc */\n execute(url, requestInit, requestOptions) {\n const obsOptions = getObservabilityOptionsFromRequest(requestOptions);\n if (obsOptions) {\n return trace.getTracer(obsOptions.getTracerInstrumentationName()).startActiveSpan(\"userAgentHandler - execute\", (span) => {\n try {\n span.setAttribute(\"com.microsoft.kiota.handler.useragent.enable\", true);\n return this.addValue(url, requestInit, requestOptions);\n }\n finally {\n span.end();\n }\n });\n }\n else {\n return this.addValue(url, requestInit, requestOptions);\n }\n }\n async addValue(url, requestInit, requestOptions) {\n var _a;\n let currentOptions = this._options;\n if (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions[UserAgentHandlerOptionsKey]) {\n currentOptions = requestOptions[UserAgentHandlerOptionsKey];\n }\n if (currentOptions.enable) {\n const additionalValue = `${currentOptions.productName}/${currentOptions.productVersion}`;\n const currentValue = getRequestHeader(requestInit, USER_AGENT_HEADER_KEY);\n if (!(currentValue === null || currentValue === void 0 ? void 0 : currentValue.includes(additionalValue))) {\n appendRequestHeader(requestInit, USER_AGENT_HEADER_KEY, additionalValue, \" \");\n }\n }\n const response = await ((_a = this.next) === null || _a === void 0 ? void 0 : _a.execute(url, requestInit, requestOptions));\n if (!response)\n throw new Error(\"No response returned by the next middleware\");\n return response;\n }\n}\n//# sourceMappingURL=userAgentHandler.js.map","/**\n * -------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.\n * See License in the project root for license information.\n * -------------------------------------------------------------------------------------------\n */\n/**\n * Key for the url replace handler options.\n */\nexport const UrlReplaceHandlerOptionsKey = \"UrlReplaceHandlerOptionsKey\";\n/**\n * Options for the url replace handler.\n */\nexport class UrlReplaceHandlerOptions {\n /**\n * Create a new instance of the UrlReplaceHandlerOptions class\n * @param config the configuration to apply to the url replace handler options.\n */\n constructor(config) {\n var _a, _b;\n if (config) {\n this._urlReplacements = (_a = config.urlReplacements) !== null && _a !== void 0 ? _a : {};\n this._enabled = (_b = config.enabled) !== null && _b !== void 0 ? _b : true;\n }\n else {\n this._urlReplacements = {};\n this._enabled = true;\n }\n }\n /**\n * @inheritdoc\n */\n getKey() {\n return UrlReplaceHandlerOptionsKey;\n }\n /**\n * Returns whether the url replace handler is enabled or not.\n * @returns whether the url replace handler is enabled or not.\n */\n get enabled() {\n return this._enabled;\n }\n /**\n * Returns the url replacements combinations.\n * @returns the url replacements combinations.\n */\n get urlReplacements() {\n return this._urlReplacements;\n }\n}\n//# sourceMappingURL=urlReplaceHandlerOptions.js.map","/**\n * -------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.\n * See License in the project root for license information.\n * -------------------------------------------------------------------------------------------\n */\nimport { trace } from \"@opentelemetry/api\";\nimport { getObservabilityOptionsFromRequest } from \"../observabilityOptions.js\";\nimport { UrlReplaceHandlerOptions, UrlReplaceHandlerOptionsKey } from \"./options/urlReplaceHandlerOptions.js\";\n/**\n * Replaces url placeholders with values from the request option.\n */\nexport class UrlReplaceHandler {\n /**\n *\n * Creates a new instance of the UrlReplaceHandler class\n * @param handlerOptions The options for the url replace handler.\n * @returns An instance of the UrlReplaceHandler class\n */\n constructor(handlerOptions = new UrlReplaceHandlerOptions()) {\n this.handlerOptions = handlerOptions;\n if (!handlerOptions) {\n throw new Error(\"handlerOptions cannot be undefined\");\n }\n }\n /**\n * @inheritdoc\n */\n execute(url, requestInit, requestOptions) {\n let currentOptions = this.handlerOptions;\n if (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions[UrlReplaceHandlerOptionsKey]) {\n currentOptions = requestOptions[UrlReplaceHandlerOptionsKey];\n }\n const obsOptions = getObservabilityOptionsFromRequest(requestOptions);\n if (obsOptions) {\n return trace.getTracer(obsOptions.getTracerInstrumentationName()).startActiveSpan(\"urlReplaceHandler - execute\", (span) => {\n try {\n span.setAttribute(\"com.microsoft.kiota.handler.urlReplace.enable\", currentOptions.enabled);\n return this.replaceTokensInUrl(currentOptions, url, requestInit, requestOptions);\n }\n finally {\n span.end();\n }\n });\n }\n return this.replaceTokensInUrl(currentOptions, url, requestInit, requestOptions);\n }\n replaceTokensInUrl(options, url, requestInit, requestOptions) {\n var _a;\n if (options.enabled) {\n Object.keys(options.urlReplacements).forEach((replacementKey) => {\n url = url.replace(replacementKey, options.urlReplacements[replacementKey]);\n });\n }\n const response = (_a = this.next) === null || _a === void 0 ? void 0 : _a.execute(url, requestInit, requestOptions);\n if (!response) {\n throw new Error(\"Response is undefined\");\n }\n return response;\n }\n}\n//# sourceMappingURL=urlReplaceHandler.js.map","/**\n * -------------------------------------------------------------------------------------------\n * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.\n * See License in the project root for license information.\n * -------------------------------------------------------------------------------------------\n */\nimport { CustomFetchHandler } from \"./customFetchHandler.js\";\nimport { HeadersInspectionHandler } from \"./headersInspectionHandler.js\";\nimport { ParametersNameDecodingHandler } from \"./parametersNameDecodingHandler.js\";\nimport { RedirectHandler } from \"./redirectHandler.js\";\nimport { RetryHandler } from \"./retryHandler.js\";\nimport { UserAgentHandler } from \"./userAgentHandler.js\";\nimport { CompressionHandler } from \"./compressionHandler.js\";\nimport { UrlReplaceHandler } from \"./urlReplaceHandler.js\";\n/**\n *\n * Class containing function(s) related to the middleware pipelines.\n */\nexport class MiddlewareFactory {\n /**\n * @param customFetch - The custom fetch implementation\n * Returns the default middleware chain an array with the middleware handlers\n * @returns an array of the middleware handlers of the default middleware chain\n */\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n static getDefaultMiddlewares(customFetch = (...args) => fetch(...args)) {\n return [new RetryHandler(), new RedirectHandler(), new ParametersNameDecodingHandler(), new UserAgentHandler(), new HeadersInspectionHandler(), new UrlReplaceHandler(), new CustomFetchHandler(customFetch)];\n }\n /**\n * @param customFetch - The custom fetch implementation\n * Returns the default middleware chain + performance middleware\n * @returns an array of the middleware handlers of the default + performance middleware chain\n */\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n static getPerformanceMiddlewares(customFetch = (...args) => fetch(...args)) {\n const middlewares = MiddlewareFactory.getDefaultMiddlewares(customFetch);\n middlewares.splice(middlewares.length - 3, 0, new CompressionHandler()); // insert CompressionHandler before HeadersInspectionHandler\n return middlewares;\n }\n}\n//# sourceMappingURL=middlewareFactory.js.map","import { type RequestOption } from \"@microsoft/kiota-abstractions\";\r\n\r\nexport const ErrorHandlerOptionKey = \"ErrorHandlerOptionKey\";\r\nexport class ErrorHandlerOptions implements RequestOption {\r\n constructor(public enabled: boolean = true) { }\r\n\r\n getKey(): string {\r\n return ErrorHandlerOptionKey;\r\n }\r\n}","/**\r\n * @module ErrorHandler\r\n */\r\n\r\nimport { type RequestOption } from \"@microsoft/kiota-abstractions\";\r\nimport { trace } from \"@opentelemetry/api\";\r\nimport { getObservabilityOptionsFromRequest, type Middleware } from \"@microsoft/kiota-http-fetchlibrary\";\r\nimport { ErrorHandlerOptionKey, ErrorHandlerOptions } from \"./options/errorHandlerOptions.js\";\r\n\r\n/**\r\n * Middleware\r\n * Class for ErrorHandler\r\n */\r\nexport class ErrorHandler implements Middleware {\r\n\r\n /**\r\n *\r\n * The next middleware in the middleware chain\r\n */\r\n next: Middleware | undefined;\r\n\r\n /**\r\n *\r\n * To create an instance of ErrorHandler\r\n * @param [options] - The error handler options value\r\n * @returns An instance of ErrorHandler\r\n */\r\n public constructor(private readonly options: ErrorHandlerOptions = new ErrorHandlerOptions()) { }\r\n\r\n /**\r\n * To execute the current middleware\r\n * @param url - The request url\r\n * @param requestInit - The request options\r\n * @param requestOptions - The request options\r\n * @returns A Promise that resolves to nothing\r\n */\r\n public async execute(url: string, requestInit: RequestInit, requestOptions?: Record<string, RequestOption>): Promise<Response> {\r\n const response = await this.next?.execute(url, requestInit as RequestInit, requestOptions);\r\n if (!response) {\r\n throw new Error(\"Response is undefined\");\r\n }\r\n\r\n let currentOptions = this.options;\r\n if (requestOptions?.[ErrorHandlerOptionKey]) {\r\n currentOptions = requestOptions[ErrorHandlerOptionKey] as ErrorHandlerOptions;\r\n }\r\n\r\n if (currentOptions.enabled === false || this.isSuccessStatusCode(response)) {\r\n return response;\r\n }\r\n\r\n const obsOptions = getObservabilityOptionsFromRequest(requestOptions);\r\n if (obsOptions) {\r\n trace.getTracer(obsOptions.getTracerInstrumentationName()).startActiveSpan(\"retryHandler - execute\", (span) => {\r\n span.setAttribute(\"com.microsoft.kiota.handler.error.enable\", true);\r\n span.setAttribute(\"http.response.status_code\", response.status);\r\n span.setAttribute(\"http.response.status_text\", response.statusText);\r\n span.setAttribute(\"http.response.url\", response.url);\r\n span.end();\r\n });\r\n }\r\n\r\n // Throw error, to avoid default handling of non-success status codes\r\n // in the kiota core (which is to return the response as is).\r\n // This allows the consumers to handle errors via try/catch.\r\n const err = new HttpRequestError(\r\n `Request to ${url} failed with status code ${response.status}`,\r\n response.status,\r\n { url, request: requestInit, response });\r\n\r\n throw err;\r\n }\r\n\r\n private isSuccessStatusCode(response: Response): boolean {\r\n return response.status >= 200 && response.status < 300;\r\n }\r\n}\r\nexport class HttpRequestError extends Error {\r\n\r\n constructor(message: string, public statusCode?: number, context?: { url: string, request: RequestInit, response: Response }) {\r\n super(message);\r\n this.name = 'HttpRequestError';\r\n\r\n\r\n // Maintains proper stack trace for where our error was thrown (only available on V8)\r\n if (Error.captureStackTrace) {\r\n Error.captureStackTrace(this, HttpRequestError);\r\n }\r\n }\r\n}","import { AccessTokenProvider as IAccessTokenProvider, AllowedHostsValidator, RequestInformation } from '@microsoft/kiota-abstractions';\r\nexport class AccessTokenProvider implements IAccessTokenProvider {\r\n constructor(private getAccessToken: () => Promise<string>) { }\r\n async getAuthorizationToken(url?: string, additionalAuthenticationContext?: Record<string, unknown>): Promise<string> {\r\n return await this.getAccessToken();\r\n }\r\n getAllowedHostsValidator(): AllowedHostsValidator {\r\n throw new Error('Method not implemented.');\r\n }\r\n\r\n}","import { HttpClient, MiddlewareFactory, FetchRequestAdapter } from '@microsoft/kiota-http-fetchlibrary';\r\nimport { BaseBearerTokenAuthenticationProvider } from '@microsoft/kiota-abstractions';\r\nimport { ErrorHandler } from './middleware/errorHandler.js';\r\nimport { AccessTokenProvider } from './accessTokenProvider.js';\r\nexport class HttpClientFactory {\r\n static create(customFetch?: (request: string, init: RequestInit) => Promise<Response>): HttpClient {\r\n\r\n const middlewares = [new ErrorHandler(), ...MiddlewareFactory.getDefaultMiddlewares(customFetch)];\r\n\r\n return new HttpClient(customFetch, ...middlewares);\r\n }\r\n\r\n static createFetchRequestAdapter(getAccessToken: () => Promise<string>, httpClient: HttpClient): FetchRequestAdapter {\r\n const auth = new BaseBearerTokenAuthenticationProvider(new AccessTokenProvider(getAccessToken));\r\n \r\n return new FetchRequestAdapter(\r\n auth,\r\n undefined,\r\n undefined,\r\n httpClient);\r\n }\r\n}"],"names":["isCompatible","__read","__spreadArray","DiagComponentLogger","DiagLogLevel","API_NAME","DiagAPI","self","BaseContext","NoopContextManager","ContextAPI","TraceFlags","NonRecordingSpan","NoopTracer","ProxyTracer","NoopTracerProvider","ProxyTracerProvider","SpanStatusCode","TraceAPI","s","HttpMethod","ApiKeyLocation","backingStoreFactory","ChaosStrategy"],"mappings":"AAGO,MAAM,yBAAyB;AAAA,EAClC,cAAc;AAIV,SAAK,kBAAkB;AAEvB,SAAK,iCAAiC,oBAAI,IAAG;AAAA,EACjD;AAAA,EACA,sBAAsB;AAClB,UAAM,IAAI,MAAM,mFAAmF;AAAA,EACvG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,iBAAiB,aAAa,SAAS;AACnC,QAAI,CAAC,aAAa;AACd,YAAM,IAAI,MAAM,2CAA2C;AAAA,IAC/D;AACA,QAAI,CAAC,SAAS;AACV,YAAM,IAAI,MAAM,sCAAsC;AAAA,IAC1D;AACA,UAAM,4BAA4B,YAAY,MAAM,GAAG,EAAE,CAAC;AAC1D,QAAI,UAAU,KAAK,+BAA+B,IAAI,yBAAyB;AAC/E,QAAI,SAAS;AACT,aAAO,QAAQ,iBAAiB,2BAA2B,OAAO;AAAA,IACtE;AACA,UAAM,qBAAqB,0BAA0B,QAAQ,aAAa,EAAE;AAC5E,cAAU,KAAK,+BAA+B,IAAI,kBAAkB;AACpE,QAAI,SAAS;AACT,aAAO,QAAQ,iBAAiB,oBAAoB,OAAO;AAAA,IAC/D;AACA,UAAM,IAAI,MAAM,gBAAgB,kBAAkB,kDAA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