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Y,EAAA,KAAA5Y,EAAA,GACA,EAEA2W,EAAAyC,aAAA,UAAApC,CAAA,CAAAhX,CAAA,QACA,mBAAAgX,EAAAoC,aAAA,CACApC,EAAAoC,aAAA,CAAApZ,GAEAoZ,EAAAvZ,IAAA,CAAAmX,EAAAhX,EAEA,EAEA2W,EAAAN,SAAA,CAAA+C,aAAA,CAAAA,EAiBAzC,EAAAN,SAAA,CAAA0E,UAAA,YACA,YAAAzD,YAAA,GAAAzB,EAAA,KAAAwB,OAAA,IACA","sources":["webpack://_N_E/./node_modules/.pnpm/@azure+abort-controller@1.1.0/node_modules/@azure/abort-controller/dist-esm/src/AbortSignal.js","webpack://_N_E/./node_modules/.pnpm/@azure+abort-controller@1.1.0/node_modules/@azure/abort-controller/dist-esm/src/AbortController.js","webpack://_N_E/./node_modules/.pnpm/@azure+abort-controller@2.1.2/node_modules/@azure/abort-controller/dist/browser/AbortError.js","webpack://_N_E/./node_modules/.pnpm/@azure+abort-controller@2.1.2/node_modules/@azure/abort-controller/dist/browser/index.js","webpack://_N_E/./node_modules/.pnpm/@azure+core-util@1.9.2/node_modules/@azure/core-util/dist/browser/createAbortablePromise.js","webpack://_N_E/./node_modules/.pnpm/@azure+core-util@1.9.2/node_modules/@azure/core-util/dist/browser/delay.js","webpack://_N_E/./node_modules/.pnpm/@azure+core-util@1.9.2/node_modules/@azure/core-util/dist/browser/bytesEncoding.common.js","webpack://_N_E/./node_modules/.pnpm/@azure+core-util@1.9.2/node_modules/@azure/core-util/dist/browser/bytesEncoding.js","webpack://_N_E/./node_modules/.pnpm/@azure+core-util@1.9.2/node_modules/@azure/core-util/dist/browser/sha256.common.js","webpack://_N_E/./node_modules/.pnpm/@azure+core-util@1.9.2/node_modules/@azure/core-util/dist/browser/sha256.js","webpack://_N_E/./node_modules/.pnpm/@azure+core-util@1.9.2/node_modules/@azure/core-util/dist/browser/uuidUtils.common.js","webpack://_N_E/./node_modules/.pnpm/@azure+core-util@1.9.2/node_modules/@azure/core-util/dist/browser/uuidUtils.js","webpack://_N_E/./node_modules/.pnpm/@azure+core-util@1.9.2/node_modules/@azure/core-util/dist/browser/checkEnvironment.js","webpack://_N_E/./node_modules/.pnpm/@azure+core-util@1.9.2/node_modules/@azure/core-util/dist/browser/index.js","webpack://_N_E/./node_modules/.pnpm/@azure+web-pubsub-client@1.0.1/node_modules/@azure/web-pubsub-client/dist-esm/src/errors/index.js","webpack://_N_E/./node_modules/.pnpm/@azure+logger@1.1.4/node_modules/@azure/logger/dist/browser/log.common.js","webpack://_N_E/./node_modules/.pnpm/@azure+logger@1.1.4/node_modules/@azure/logger/dist/browser/debug.js","webpack://_N_E/./node_modules/.pnpm/@azure+logger@1.1.4/node_modules/@azure/logger/dist/browser/index.js","webpack://_N_E/./node_modules/.pnpm/@azure+web-pubsub-client@1.0.1/node_modules/@azure/web-pubsub-client/dist-esm/src/logger.js","webpack://_N_E/./node_modules/.pnpm/@azure+web-pubsub-client@1.0.1/node_modules/@azure/web-pubsub-client/dist-esm/src/protocols/jsonProtocolBase.js","webpack://_N_E/./node_modules/.pnpm/@azure+web-pubsub-client@1.0.1/node_modules/@azure/web-pubsub-client/dist-esm/src/protocols/webPubSubJsonReliableProtocol.js","webpack://_N_E/./node_modules/.pnpm/@azure+web-pubsub-client@1.0.1/node_modules/@azure/web-pubsub-client/dist-esm/src/protocols/index.js","webpack://_N_E/./node_modules/.pnpm/@azure+web-pubsub-client@1.0.1/node_modules/@azure/web-pubsub-client/dist-esm/src/websocket/websocketClient.browser.js","webpack://_N_E/./node_modules/.pnpm/@azure+web-pubsub-client@1.0.1/node_modules/@azure/web-pubsub-client/dist-esm/src/utils/abortablePromise.js","webpack://_N_E/./node_modules/.pnpm/@azure+web-pubsub-client@1.0.1/node_modules/@azure/web-pubsub-client/dist-esm/src/webPubSubClient.js","webpack://_N_E/./node_modules/.pnpm/events@3.3.0/node_modules/events/events.js"],"sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/// \nconst listenersMap = new WeakMap();\nconst abortedMap = new WeakMap();\n/**\n * An aborter instance implements AbortSignal interface, can abort HTTP requests.\n *\n * - Call AbortSignal.none to create a new AbortSignal instance that cannot be cancelled.\n * Use `AbortSignal.none` when you are required to pass a cancellation token but the operation\n * cannot or will not ever be cancelled.\n *\n * @example\n * Abort without timeout\n * ```ts\n * await doAsyncWork(AbortSignal.none);\n * ```\n */\nexport class AbortSignal {\n constructor() {\n /**\n * onabort event listener.\n */\n this.onabort = null;\n listenersMap.set(this, []);\n abortedMap.set(this, false);\n }\n /**\n * Status of whether aborted or not.\n *\n * @readonly\n */\n get aborted() {\n if (!abortedMap.has(this)) {\n throw new TypeError(\"Expected `this` to be an instance of AbortSignal.\");\n }\n return abortedMap.get(this);\n }\n /**\n * Creates a new AbortSignal instance that will never be aborted.\n *\n * @readonly\n */\n static get none() {\n return new AbortSignal();\n }\n /**\n * Added new \"abort\" event listener, only support \"abort\" event.\n *\n * @param _type - Only support \"abort\" event\n * @param listener - The listener to be added\n */\n addEventListener(\n // tslint:disable-next-line:variable-name\n _type, listener) {\n if (!listenersMap.has(this)) {\n throw new TypeError(\"Expected `this` to be an instance of AbortSignal.\");\n }\n const listeners = listenersMap.get(this);\n listeners.push(listener);\n }\n /**\n * Remove \"abort\" event listener, only support \"abort\" event.\n *\n * @param _type - Only support \"abort\" event\n * @param listener - The listener to be removed\n */\n removeEventListener(\n // tslint:disable-next-line:variable-name\n _type, listener) {\n if (!listenersMap.has(this)) {\n throw new TypeError(\"Expected `this` to be an instance of AbortSignal.\");\n }\n const listeners = listenersMap.get(this);\n const index = listeners.indexOf(listener);\n if (index > -1) {\n listeners.splice(index, 1);\n }\n }\n /**\n * Dispatches a synthetic event to the AbortSignal.\n */\n dispatchEvent(_event) {\n throw new Error(\"This is a stub dispatchEvent implementation that should not be used. It only exists for type-checking purposes.\");\n }\n}\n/**\n * Helper to trigger an abort event immediately, the onabort and all abort event listeners will be triggered.\n * Will try to trigger abort event for all linked AbortSignal nodes.\n *\n * - If there is a timeout, the timer will be cancelled.\n * - If aborted is true, nothing will happen.\n *\n * @internal\n */\n// eslint-disable-next-line @azure/azure-sdk/ts-use-interface-parameters\nexport function abortSignal(signal) {\n if (signal.aborted) {\n return;\n }\n if (signal.onabort) {\n signal.onabort.call(signal);\n }\n const listeners = listenersMap.get(signal);\n if (listeners) {\n // Create a copy of listeners so mutations to the array\n // (e.g. via removeListener calls) don't affect the listeners\n // we invoke.\n listeners.slice().forEach((listener) => {\n listener.call(signal, { type: \"abort\" });\n });\n }\n abortedMap.set(signal, true);\n}\n//# sourceMappingURL=AbortSignal.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { AbortSignal, abortSignal } from \"./AbortSignal\";\n/**\n * This error is thrown when an asynchronous operation has been aborted.\n * Check for this error by testing the `name` that the name property of the\n * error matches `\"AbortError\"`.\n *\n * @example\n * ```ts\n * const controller = new AbortController();\n * controller.abort();\n * try {\n * doAsyncWork(controller.signal)\n * } catch (e) {\n * if (e.name === 'AbortError') {\n * // handle abort error here.\n * }\n * }\n * ```\n */\nexport class AbortError extends Error {\n constructor(message) {\n super(message);\n this.name = \"AbortError\";\n }\n}\n/**\n * An AbortController provides an AbortSignal and the associated controls to signal\n * that an asynchronous operation should be aborted.\n *\n * @example\n * Abort an operation when another event fires\n * ```ts\n * const controller = new AbortController();\n * const signal = controller.signal;\n * doAsyncWork(signal);\n * button.addEventListener('click', () => controller.abort());\n * ```\n *\n * @example\n * Share aborter cross multiple operations in 30s\n * ```ts\n * // Upload the same data to 2 different data centers at the same time,\n * // abort another when any of them is finished\n * const controller = AbortController.withTimeout(30 * 1000);\n * doAsyncWork(controller.signal).then(controller.abort);\n * doAsyncWork(controller.signal).then(controller.abort);\n *```\n *\n * @example\n * Cascaded aborting\n * ```ts\n * // All operations can't take more than 30 seconds\n * const aborter = Aborter.timeout(30 * 1000);\n *\n * // Following 2 operations can't take more than 25 seconds\n * await doAsyncWork(aborter.withTimeout(25 * 1000));\n * await doAsyncWork(aborter.withTimeout(25 * 1000));\n * ```\n */\nexport class AbortController {\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n constructor(parentSignals) {\n this._signal = new AbortSignal();\n if (!parentSignals) {\n return;\n }\n // coerce parentSignals into an array\n if (!Array.isArray(parentSignals)) {\n // eslint-disable-next-line prefer-rest-params\n parentSignals = arguments;\n }\n for (const parentSignal of parentSignals) {\n // if the parent signal has already had abort() called,\n // then call abort on this signal as well.\n if (parentSignal.aborted) {\n this.abort();\n }\n else {\n // when the parent signal aborts, this signal should as well.\n parentSignal.addEventListener(\"abort\", () => {\n this.abort();\n });\n }\n }\n }\n /**\n * The AbortSignal associated with this controller that will signal aborted\n * when the abort method is called on this controller.\n *\n * @readonly\n */\n get signal() {\n return this._signal;\n }\n /**\n * Signal that any operations passed this controller's associated abort signal\n * to cancel any remaining work and throw an `AbortError`.\n */\n abort() {\n abortSignal(this._signal);\n }\n /**\n * Creates a new AbortSignal instance that will abort after the provided ms.\n * @param ms - Elapsed time in milliseconds to trigger an abort.\n */\n static timeout(ms) {\n const signal = new AbortSignal();\n const timer = setTimeout(abortSignal, ms, signal);\n // Prevent the active Timer from keeping the Node.js event loop active.\n if (typeof timer.unref === \"function\") {\n timer.unref();\n }\n return signal;\n }\n}\n//# sourceMappingURL=AbortController.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * This error is thrown when an asynchronous operation has been aborted.\n * Check for this error by testing the `name` that the name property of the\n * error matches `\"AbortError\"`.\n *\n * @example\n * ```ts\n * const controller = new AbortController();\n * controller.abort();\n * try {\n * doAsyncWork(controller.signal)\n * } catch (e) {\n * if (e.name === 'AbortError') {\n * // handle abort error here.\n * }\n * }\n * ```\n */\nexport class AbortError extends Error {\n constructor(message) {\n super(message);\n this.name = \"AbortError\";\n }\n}\n//# sourceMappingURL=AbortError.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport { AbortError } from \"./AbortError.js\";\n//# sourceMappingURL=index.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { AbortError } from \"@azure/abort-controller\";\n/**\n * Creates an abortable promise.\n * @param buildPromise - A function that takes the resolve and reject functions as parameters.\n * @param options - The options for the abortable promise.\n * @returns A promise that can be aborted.\n */\nexport function createAbortablePromise(buildPromise, options) {\n const { cleanupBeforeAbort, abortSignal, abortErrorMsg } = options !== null && options !== void 0 ? options : {};\n return new Promise((resolve, reject) => {\n function rejectOnAbort() {\n reject(new AbortError(abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : \"The operation was aborted.\"));\n }\n function removeListeners() {\n abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.removeEventListener(\"abort\", onAbort);\n }\n function onAbort() {\n cleanupBeforeAbort === null || cleanupBeforeAbort === void 0 ? void 0 : cleanupBeforeAbort();\n removeListeners();\n rejectOnAbort();\n }\n if (abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.aborted) {\n return rejectOnAbort();\n }\n try {\n buildPromise((x) => {\n removeListeners();\n resolve(x);\n }, (x) => {\n removeListeners();\n reject(x);\n });\n }\n catch (err) {\n reject(err);\n }\n abortSignal === null || abortSignal === void 0 ? void 0 : abortSignal.addEventListener(\"abort\", onAbort);\n });\n}\n//# sourceMappingURL=createAbortablePromise.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { createAbortablePromise } from \"./createAbortablePromise.js\";\nconst StandardAbortMessage = \"The delay was aborted.\";\n/**\n * A wrapper for setTimeout that resolves a promise after timeInMs milliseconds.\n * @param timeInMs - The number of milliseconds to be delayed.\n * @param options - The options for delay - currently abort options\n * @returns Promise that is resolved after timeInMs\n */\nexport function delay(timeInMs, options) {\n let token;\n const { abortSignal, abortErrorMsg } = options !== null && options !== void 0 ? options : {};\n return createAbortablePromise((resolve) => {\n token = setTimeout(resolve, timeInMs);\n }, {\n cleanupBeforeAbort: () => clearTimeout(token),\n abortSignal,\n abortErrorMsg: abortErrorMsg !== null && abortErrorMsg !== void 0 ? abortErrorMsg : StandardAbortMessage,\n });\n}\n//# sourceMappingURL=delay.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * The helper that transforms bytes with specific character encoding into string\n * @param bytes - the uint8array bytes\n * @param format - the format we use to encode the byte\n * @returns a string of the encoded string\n */\nexport function uint8ArrayToString(bytes, format) {\n switch (format) {\n case \"utf-8\":\n return uint8ArrayToUtf8String(bytes);\n case \"base64\":\n return uint8ArrayToBase64(bytes);\n case \"base64url\":\n return uint8ArrayToBase64Url(bytes);\n case \"hex\":\n return uint8ArrayToHexString(bytes);\n }\n}\n/**\n * The helper that transforms string to specific character encoded bytes array.\n * @param value - the string to be converted\n * @param format - the format we use to decode the value\n * @returns a uint8array\n */\nexport function stringToUint8Array(value, format) {\n switch (format) {\n case \"utf-8\":\n return utf8StringToUint8Array(value);\n case \"base64\":\n return base64ToUint8Array(value);\n case \"base64url\":\n return base64UrlToUint8Array(value);\n case \"hex\":\n return hexStringToUint8Array(value);\n }\n}\n/**\n * Decodes a Uint8Array into a Base64 string.\n * @internal\n */\nexport function uint8ArrayToBase64(bytes) {\n return btoa([...bytes].map((x) => String.fromCharCode(x)).join(\"\"));\n}\n/**\n * Decodes a Uint8Array into a Base64Url string.\n * @internal\n */\nexport function uint8ArrayToBase64Url(bytes) {\n return uint8ArrayToBase64(bytes).replace(/\\+/g, \"-\").replace(/\\//g, \"_\").replace(/=/g, \"\");\n}\n/**\n * Decodes a Uint8Array into a javascript string.\n * @internal\n */\nexport function uint8ArrayToUtf8String(bytes) {\n const decoder = new TextDecoder();\n const dataString = decoder.decode(bytes);\n return dataString;\n}\n/**\n * Decodes a Uint8Array into a hex string\n * @internal\n */\nexport function uint8ArrayToHexString(bytes) {\n return [...bytes].map((x) => x.toString(16).padStart(2, \"0\")).join(\"\");\n}\n/**\n * Encodes a JavaScript string into a Uint8Array.\n * @internal\n */\nexport function utf8StringToUint8Array(value) {\n return new TextEncoder().encode(value);\n}\n/**\n * Encodes a Base64 string into a Uint8Array.\n * @internal\n */\nexport function base64ToUint8Array(value) {\n return new Uint8Array([...atob(value)].map((x) => x.charCodeAt(0)));\n}\n/**\n * Encodes a Base64Url string into a Uint8Array.\n * @internal\n */\nexport function base64UrlToUint8Array(value) {\n const base64String = value.replace(/-/g, \"+\").replace(/_/g, \"/\");\n return base64ToUint8Array(base64String);\n}\nconst hexDigits = new Set(\"0123456789abcdefABCDEF\");\n/**\n * Encodes a hex string into a Uint8Array\n * @internal\n */\nexport function hexStringToUint8Array(value) {\n // If value has odd length, the last character will be ignored, consistent with NodeJS Buffer behavior\n const bytes = new Uint8Array(value.length / 2);\n for (let i = 0; i < value.length / 2; ++i) {\n const highNibble = value[2 * i];\n const lowNibble = value[2 * i + 1];\n if (!hexDigits.has(highNibble) || !hexDigits.has(lowNibble)) {\n // Replicate Node Buffer behavior by exiting early when we encounter an invalid byte\n return bytes.slice(0, i);\n }\n bytes[i] = parseInt(`${highNibble}${lowNibble}`, 16);\n }\n return bytes;\n}\n//# sourceMappingURL=bytesEncoding.common.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport * from \"./bytesEncoding.common.js\";\n//# sourceMappingURL=bytesEncoding-browser.mjs.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { stringToUint8Array, uint8ArrayToString } from \"./bytesEncoding.js\";\nlet subtleCrypto;\n/**\n * Returns a cached reference to the Web API crypto.subtle object.\n * @internal\n */\nfunction getCrypto() {\n if (subtleCrypto) {\n return subtleCrypto;\n }\n if (!self.crypto || !self.crypto.subtle) {\n throw new Error(\"Your browser environment does not support cryptography functions.\");\n }\n subtleCrypto = self.crypto.subtle;\n return subtleCrypto;\n}\n/**\n * Generates a SHA-256 HMAC signature.\n * @param key - The HMAC key represented as a base64 string, used to generate the cryptographic HMAC hash.\n * @param stringToSign - The data to be signed.\n * @param encoding - The textual encoding to use for the returned HMAC digest.\n */\nexport async function computeSha256Hmac(key, stringToSign, encoding) {\n const crypto = getCrypto();\n const keyBytes = stringToUint8Array(key, \"base64\");\n const stringToSignBytes = stringToUint8Array(stringToSign, \"utf-8\");\n const cryptoKey = await crypto.importKey(\"raw\", keyBytes, {\n name: \"HMAC\",\n hash: { name: \"SHA-256\" },\n }, false, [\"sign\"]);\n const signature = await crypto.sign({\n name: \"HMAC\",\n hash: { name: \"SHA-256\" },\n }, cryptoKey, stringToSignBytes);\n return uint8ArrayToString(new Uint8Array(signature), encoding);\n}\n/**\n * Generates a SHA-256 hash.\n * @param content - The data to be included in the hash.\n * @param encoding - The textual encoding to use for the returned hash.\n */\nexport async function computeSha256Hash(content, encoding) {\n const contentBytes = stringToUint8Array(content, \"utf-8\");\n const digest = await getCrypto().digest({ name: \"SHA-256\" }, contentBytes);\n return uint8ArrayToString(new Uint8Array(digest), encoding);\n}\n//# sourceMappingURL=sha256.common.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport * from \"./sha256.common.js\";\n//# sourceMappingURL=sha256-browser.mjs.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Generated Universally Unique Identifier\n *\n * @returns RFC4122 v4 UUID.\n */\nexport function generateUUID() {\n let uuid = \"\";\n for (let i = 0; i < 32; i++) {\n // Generate a random number between 0 and 15\n const randomNumber = Math.floor(Math.random() * 16);\n // Set the UUID version to 4 in the 13th position\n if (i === 12) {\n uuid += \"4\";\n }\n else if (i === 16) {\n // Set the UUID variant to \"10\" in the 17th position\n uuid += (randomNumber & 0x3) | 0x8;\n }\n else {\n // Add a random hexadecimal digit to the UUID string\n uuid += randomNumber.toString(16);\n }\n // Add hyphens to the UUID string at the appropriate positions\n if (i === 7 || i === 11 || i === 15 || i === 19) {\n uuid += \"-\";\n }\n }\n return uuid;\n}\n/**\n * Generated Universally Unique Identifier\n *\n * @returns RFC4122 v4 UUID.\n */\nexport function randomUUID() {\n return generateUUID();\n}\n//# sourceMappingURL=uuidUtils.common.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nvar _a;\nimport { generateUUID } from \"./uuidUtils.common.js\";\n// NOTE: This could be undefined if not used in a secure context\nconst uuidFunction = typeof ((_a = globalThis === null || globalThis === void 0 ? void 0 : globalThis.crypto) === null || _a === void 0 ? void 0 : _a.randomUUID) === \"function\"\n ? globalThis.crypto.randomUUID.bind(globalThis.crypto)\n : generateUUID;\n/**\n * Generated Universally Unique Identifier\n *\n * @returns RFC4122 v4 UUID.\n */\nexport function randomUUID() {\n return uuidFunction();\n}\n//# sourceMappingURL=uuidUtils-browser.mjs.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nvar _a, _b, _c, _d;\n/**\n * A constant that indicates whether the environment the code is running is a Web Browser.\n */\n// eslint-disable-next-line @azure/azure-sdk/ts-no-window\nexport const isBrowser = typeof window !== \"undefined\" && typeof window.document !== \"undefined\";\n/**\n * A constant that indicates whether the environment the code is running is a Web Worker.\n */\nexport const isWebWorker = typeof self === \"object\" &&\n typeof (self === null || self === void 0 ? void 0 : self.importScripts) === \"function\" &&\n (((_a = self.constructor) === null || _a === void 0 ? void 0 : _a.name) === \"DedicatedWorkerGlobalScope\" ||\n ((_b = self.constructor) === null || _b === void 0 ? void 0 : _b.name) === \"ServiceWorkerGlobalScope\" ||\n ((_c = self.constructor) === null || _c === void 0 ? void 0 : _c.name) === \"SharedWorkerGlobalScope\");\n/**\n * A constant that indicates whether the environment the code is running is Deno.\n */\nexport const isDeno = typeof Deno !== \"undefined\" &&\n typeof Deno.version !== \"undefined\" &&\n typeof Deno.version.deno !== \"undefined\";\n/**\n * A constant that indicates whether the environment the code is running is Bun.sh.\n */\nexport const isBun = typeof Bun !== \"undefined\" && typeof Bun.version !== \"undefined\";\n/**\n * A constant that indicates whether the environment the code is running is a Node.js compatible environment.\n */\nexport const isNodeLike = typeof globalThis.process !== \"undefined\" &&\n Boolean(globalThis.process.version) &&\n Boolean((_d = globalThis.process.versions) === null || _d === void 0 ? void 0 : _d.node);\n/**\n * A constant that indicates whether the environment the code is running is a Node.js compatible environment.\n * @deprecated Use `isNodeLike` instead.\n */\nexport const isNode = isNodeLike;\n/**\n * A constant that indicates whether the environment the code is running is Node.JS.\n */\nexport const isNodeRuntime = isNodeLike && !isBun && !isDeno;\n/**\n * A constant that indicates whether the environment the code is running is in React-Native.\n */\n// https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Core/setUpNavigator.js\nexport const isReactNative = typeof navigator !== \"undefined\" && (navigator === null || navigator === void 0 ? void 0 : navigator.product) === \"ReactNative\";\n//# sourceMappingURL=checkEnvironment.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport { delay } from \"./delay.js\";\nexport { cancelablePromiseRace, } from \"./aborterUtils.js\";\nexport { createAbortablePromise, } from \"./createAbortablePromise.js\";\nexport { getRandomIntegerInclusive } from \"./random.js\";\nexport { isObject } from \"./object.js\";\nexport { isError, getErrorMessage } from \"./error.js\";\nexport { computeSha256Hash, computeSha256Hmac } from \"./sha256.js\";\nexport { isDefined, isObjectWithProperties, objectHasProperty } from \"./typeGuards.js\";\nexport { randomUUID } from \"./uuidUtils.js\";\nexport { isBrowser, isBun, isNode, isNodeLike, isNodeRuntime, isDeno, isReactNative, isWebWorker, } from \"./checkEnvironment.js\";\nexport { uint8ArrayToString, stringToUint8Array } from \"./bytesEncoding.js\";\n//# sourceMappingURL=index.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n/**\n * Error when sending message failed\n */\nexport class SendMessageError extends Error {\n /**\n * Initialize a SendMessageError\n * @param message - The error message\n * @param ackMessage - The ack message\n */\n constructor(message, options) {\n super(message);\n this.name = \"SendMessageError\";\n this.ackId = options.ackId;\n this.errorDetail = options.errorDetail;\n }\n}\n//# sourceMappingURL=index.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport function log(...args) {\n if (args.length > 0) {\n const firstArg = String(args[0]);\n if (firstArg.includes(\":error\")) {\n console.error(...args);\n }\n else if (firstArg.includes(\":warning\")) {\n console.warn(...args);\n }\n else if (firstArg.includes(\":info\")) {\n console.info(...args);\n }\n else if (firstArg.includes(\":verbose\")) {\n console.debug(...args);\n }\n else {\n console.debug(...args);\n }\n }\n}\n//# sourceMappingURL=log.common.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { log } from \"./log.js\";\nconst debugEnvVariable = (typeof process !== \"undefined\" && process.env && process.env.DEBUG) || undefined;\nlet enabledString;\nlet enabledNamespaces = [];\nlet skippedNamespaces = [];\nconst debuggers = [];\nif (debugEnvVariable) {\n enable(debugEnvVariable);\n}\nconst debugObj = Object.assign((namespace) => {\n return createDebugger(namespace);\n}, {\n enable,\n enabled,\n disable,\n log,\n});\nfunction enable(namespaces) {\n enabledString = namespaces;\n enabledNamespaces = [];\n skippedNamespaces = [];\n const wildcard = /\\*/g;\n const namespaceList = namespaces.split(\",\").map((ns) => ns.trim().replace(wildcard, \".*?\"));\n for (const ns of namespaceList) {\n if (ns.startsWith(\"-\")) {\n skippedNamespaces.push(new RegExp(`^${ns.substr(1)}$`));\n }\n else {\n enabledNamespaces.push(new RegExp(`^${ns}$`));\n }\n }\n for (const instance of debuggers) {\n instance.enabled = enabled(instance.namespace);\n }\n}\nfunction enabled(namespace) {\n if (namespace.endsWith(\"*\")) {\n return true;\n }\n for (const skipped of skippedNamespaces) {\n if (skipped.test(namespace)) {\n return false;\n }\n }\n for (const enabledNamespace of enabledNamespaces) {\n if (enabledNamespace.test(namespace)) {\n return true;\n }\n }\n return false;\n}\nfunction disable() {\n const result = enabledString || \"\";\n enable(\"\");\n return result;\n}\nfunction createDebugger(namespace) {\n const newDebugger = Object.assign(debug, {\n enabled: enabled(namespace),\n destroy,\n log: debugObj.log,\n namespace,\n extend,\n });\n function debug(...args) {\n if (!newDebugger.enabled) {\n return;\n }\n if (args.length > 0) {\n args[0] = `${namespace} ${args[0]}`;\n }\n newDebugger.log(...args);\n }\n debuggers.push(newDebugger);\n return newDebugger;\n}\nfunction destroy() {\n const index = debuggers.indexOf(this);\n if (index >= 0) {\n debuggers.splice(index, 1);\n return true;\n }\n return false;\n}\nfunction extend(namespace) {\n const newDebugger = createDebugger(`${this.namespace}:${namespace}`);\n newDebugger.log = this.log;\n return newDebugger;\n}\nexport default debugObj;\n//# sourceMappingURL=debug.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport debug from \"./debug.js\";\nconst registeredLoggers = new Set();\nconst logLevelFromEnv = (typeof process !== \"undefined\" && process.env && process.env.AZURE_LOG_LEVEL) || undefined;\nlet azureLogLevel;\n/**\n * The AzureLogger provides a mechanism for overriding where logs are output to.\n * By default, logs are sent to stderr.\n * Override the `log` method to redirect logs to another location.\n */\nexport const AzureLogger = debug(\"azure\");\nAzureLogger.log = (...args) => {\n debug.log(...args);\n};\nconst AZURE_LOG_LEVELS = [\"verbose\", \"info\", \"warning\", \"error\"];\nif (logLevelFromEnv) {\n // avoid calling setLogLevel because we don't want a mis-set environment variable to crash\n if (isAzureLogLevel(logLevelFromEnv)) {\n setLogLevel(logLevelFromEnv);\n }\n else {\n console.error(`AZURE_LOG_LEVEL set to unknown log level '${logLevelFromEnv}'; logging is not enabled. Acceptable values: ${AZURE_LOG_LEVELS.join(\", \")}.`);\n }\n}\n/**\n * Immediately enables logging at the specified log level. If no level is specified, logging is disabled.\n * @param level - The log level to enable for logging.\n * Options from most verbose to least verbose are:\n * - verbose\n * - info\n * - warning\n * - error\n */\nexport function setLogLevel(level) {\n if (level && !isAzureLogLevel(level)) {\n throw new Error(`Unknown log level '${level}'. Acceptable values: ${AZURE_LOG_LEVELS.join(\",\")}`);\n }\n azureLogLevel = level;\n const enabledNamespaces = [];\n for (const logger of registeredLoggers) {\n if (shouldEnable(logger)) {\n enabledNamespaces.push(logger.namespace);\n }\n }\n debug.enable(enabledNamespaces.join(\",\"));\n}\n/**\n * Retrieves the currently specified log level.\n */\nexport function getLogLevel() {\n return azureLogLevel;\n}\nconst levelMap = {\n verbose: 400,\n info: 300,\n warning: 200,\n error: 100,\n};\n/**\n * Creates a logger for use by the Azure SDKs that inherits from `AzureLogger`.\n * @param namespace - The name of the SDK package.\n * @hidden\n */\nexport function createClientLogger(namespace) {\n const clientRootLogger = AzureLogger.extend(namespace);\n patchLogMethod(AzureLogger, clientRootLogger);\n return {\n error: createLogger(clientRootLogger, \"error\"),\n warning: createLogger(clientRootLogger, \"warning\"),\n info: createLogger(clientRootLogger, \"info\"),\n verbose: createLogger(clientRootLogger, \"verbose\"),\n };\n}\nfunction patchLogMethod(parent, child) {\n child.log = (...args) => {\n parent.log(...args);\n };\n}\nfunction createLogger(parent, level) {\n const logger = Object.assign(parent.extend(level), {\n level,\n });\n patchLogMethod(parent, logger);\n if (shouldEnable(logger)) {\n const enabledNamespaces = debug.disable();\n debug.enable(enabledNamespaces + \",\" + logger.namespace);\n }\n registeredLoggers.add(logger);\n return logger;\n}\nfunction shouldEnable(logger) {\n return Boolean(azureLogLevel && levelMap[logger.level] <= levelMap[azureLogLevel]);\n}\nfunction isAzureLogLevel(logLevel) {\n return AZURE_LOG_LEVELS.includes(logLevel);\n}\n//# sourceMappingURL=index.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { createClientLogger } from \"@azure/logger\";\n/**\n * The \\@azure\\/logger configuration for this package.\n */\nexport const logger = createClientLogger(\"web-pubsub-client\");\n//# sourceMappingURL=logger.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { Buffer } from \"buffer\";\nexport function parseMessages(input) {\n // The interface does allow \"ArrayBuffer\" to be passed in, but this implementation does not. So let's throw a useful error.\n if (typeof input !== \"string\") {\n throw new Error(\"Invalid input for JSON hub protocol. Expected a string.\");\n }\n if (!input) {\n throw new Error(\"No input\");\n }\n const parsedMessage = JSON.parse(input);\n const typedMessage = parsedMessage;\n let returnMessage;\n if (typedMessage.type === \"system\") {\n if (typedMessage.event === \"connected\") {\n returnMessage = Object.assign(Object.assign({}, parsedMessage), { kind: \"connected\" });\n }\n else if (typedMessage.event === \"disconnected\") {\n returnMessage = Object.assign(Object.assign({}, parsedMessage), { kind: \"disconnected\" });\n }\n else {\n // Forward compatible\n return null;\n }\n }\n else if (typedMessage.type === \"message\") {\n if (typedMessage.from === \"group\") {\n const data = parsePayload(parsedMessage.data, parsedMessage.dataType);\n if (data === null) {\n return null;\n }\n returnMessage = Object.assign(Object.assign({}, parsedMessage), { data: data, kind: \"groupData\" });\n }\n else if (typedMessage.from === \"server\") {\n const data = parsePayload(parsedMessage.data, parsedMessage.dataType);\n if (data === null) {\n return null;\n }\n returnMessage = Object.assign(Object.assign({}, parsedMessage), { data: data, kind: \"serverData\" });\n }\n else {\n // Forward compatible\n return null;\n }\n }\n else if (typedMessage.type === \"ack\") {\n returnMessage = Object.assign(Object.assign({}, parsedMessage), { kind: \"ack\" });\n }\n else {\n // Forward compatible\n return null;\n }\n return returnMessage;\n}\nexport function writeMessage(message) {\n let data;\n switch (message.kind) {\n case \"joinGroup\": {\n data = { type: \"joinGroup\", group: message.group, ackId: message.ackId };\n break;\n }\n case \"leaveGroup\": {\n data = { type: \"leaveGroup\", group: message.group, ackId: message.ackId };\n break;\n }\n case \"sendEvent\": {\n data = {\n type: \"event\",\n event: message.event,\n ackId: message.ackId,\n dataType: message.dataType,\n data: getPayload(message.data, message.dataType),\n };\n break;\n }\n case \"sendToGroup\": {\n data = {\n type: \"sendToGroup\",\n group: message.group,\n ackId: message.ackId,\n dataType: message.dataType,\n data: getPayload(message.data, message.dataType),\n noEcho: message.noEcho,\n };\n break;\n }\n case \"sequenceAck\": {\n data = { type: \"sequenceAck\", sequenceId: message.sequenceId };\n break;\n }\n default: {\n throw new Error(`Unsupported type: ${message.kind}`);\n }\n }\n return JSON.stringify(data);\n}\nfunction getPayload(data, dataType) {\n switch (dataType) {\n case \"text\": {\n if (typeof data !== \"string\") {\n throw new TypeError(\"Message must be a string.\");\n }\n return data;\n }\n case \"json\": {\n return data;\n }\n case \"binary\":\n case \"protobuf\": {\n if (data instanceof ArrayBuffer) {\n return Buffer.from(data).toString(\"base64\");\n }\n throw new TypeError(\"Message must be a ArrayBuffer\");\n }\n }\n}\nfunction parsePayload(data, dataType) {\n if (dataType === \"text\") {\n if (typeof data !== \"string\") {\n throw new TypeError(\"Message must be a string when dataType is text\");\n }\n return data;\n }\n else if (dataType === \"json\") {\n return data;\n }\n else if (dataType === \"binary\" || dataType === \"protobuf\") {\n const buf = Buffer.from(data, \"base64\");\n return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength);\n }\n else {\n // Forward compatible\n return null;\n }\n}\n//# sourceMappingURL=jsonProtocolBase.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport * as base from \"./jsonProtocolBase\";\n/**\n * The \"json.reliable.webpubsub.azure.v1\" protocol\n */\nexport class WebPubSubJsonReliableProtocolImpl {\n constructor() {\n /**\n * True if the protocol supports reliable features\n */\n this.isReliableSubProtocol = true;\n /**\n * The name of subprotocol. Name will be used in websocket subprotocol\n */\n this.name = \"json.reliable.webpubsub.azure.v1\";\n }\n /**\n * Creates WebPubSubMessage objects from the specified serialized representation.\n * @param input - The serialized representation\n */\n parseMessages(input) {\n return base.parseMessages(input);\n }\n /**\n * Write WebPubSubMessage to string\n * @param message - The message to be written\n */\n writeMessage(message) {\n return base.writeMessage(message);\n }\n}\n//# sourceMappingURL=webPubSubJsonReliableProtocol.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { WebPubSubJsonProtocolImpl } from \"./webPubSubJsonProtocol\";\nimport { WebPubSubJsonReliableProtocolImpl } from \"./webPubSubJsonReliableProtocol\";\n/**\n * Return the \"json.webpubsub.azure.v1\" protocol\n */\nexport const WebPubSubJsonProtocol = () => {\n return new WebPubSubJsonProtocolImpl();\n};\n/**\n * Return the \"json.reliable.webpubsub.azure.v1\" protocol\n */\nexport const WebPubSubJsonReliableProtocol = () => {\n return new WebPubSubJsonReliableProtocolImpl();\n};\n//# sourceMappingURL=index.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nexport class WebSocketClient {\n constructor(uri, protocolName) {\n this._socket = new WebSocket(uri, protocolName);\n this._socket.binaryType = \"arraybuffer\";\n }\n onopen(fn) {\n this._socket.onopen = fn;\n }\n onclose(fn) {\n this._socket.onclose = (ev) => fn(ev.code, ev.reason);\n }\n onerror(fn) {\n this._socket.onerror = (ev) => fn(ev);\n }\n onmessage(fn) {\n this._socket.onmessage = (event) => fn(event.data);\n }\n close(code, reason) {\n this._socket.close(code, reason);\n }\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n send(data, _) {\n return new Promise((resolve, reject) => {\n try {\n this._socket.send(data);\n resolve();\n }\n catch (err) {\n reject(err);\n }\n });\n }\n isOpen() {\n return this._socket.readyState === WebSocket.OPEN;\n }\n}\nexport class WebSocketClientFactory {\n create(uri, protocolName) {\n return new WebSocketClient(uri, protocolName);\n }\n}\n//# sourceMappingURL=websocketClient.browser.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { AbortError } from \"@azure/abort-controller\";\nexport async function abortablePromise(promise, signal) {\n if (signal.aborted) {\n throw new AbortError(\"The operation was aborted.\");\n }\n let onAbort;\n // eslint-disable-next-line promise/param-names\n const p = new Promise((_, reject) => {\n onAbort = () => {\n reject(new AbortError(\"The operation was aborted.\"));\n };\n signal.addEventListener(\"abort\", onAbort);\n });\n try {\n return await Promise.race([promise, p]);\n }\n finally {\n signal.removeEventListener(\"abort\", onAbort);\n }\n}\n//# sourceMappingURL=abortablePromise.js.map","// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { AbortController } from \"@azure/abort-controller\";\nimport { delay } from \"@azure/core-util\";\nimport EventEmitter from \"events\";\nimport { SendMessageError } from \"./errors\";\nimport { logger } from \"./logger\";\nimport { WebPubSubJsonReliableProtocol } from \"./protocols\";\nimport { WebSocketClientFactory } from \"./websocket/websocketClient\";\nimport { abortablePromise } from \"./utils/abortablePromise\";\nvar WebPubSubClientState;\n(function (WebPubSubClientState) {\n WebPubSubClientState[\"Stopped\"] = \"Stopped\";\n WebPubSubClientState[\"Disconnected\"] = \"Disconnected\";\n WebPubSubClientState[\"Connecting\"] = \"Connecting\";\n WebPubSubClientState[\"Connected\"] = \"Connected\";\n WebPubSubClientState[\"Recovering\"] = \"Recovering\";\n})(WebPubSubClientState || (WebPubSubClientState = {}));\n/**\n * The WebPubSub client\n */\nexport class WebPubSubClient {\n nextAckId() {\n this._ackId = this._ackId + 1;\n return this._ackId;\n }\n constructor(credential, options) {\n this._quickSequenceAckDiff = 300;\n this._activeTimeoutInMs = 20000;\n this._emitter = new EventEmitter();\n this._isStopping = false;\n this._isInitialConnected = false;\n if (typeof credential === \"string\") {\n this._credential = { getClientAccessUrl: credential };\n }\n else {\n this._credential = credential;\n }\n if (options == null) {\n options = {};\n }\n this._buildDefaultOptions(options);\n this._options = options;\n this._messageRetryPolicy = new RetryPolicy(this._options.messageRetryOptions);\n this._reconnectRetryPolicy = new RetryPolicy(this._options.reconnectRetryOptions);\n this._protocol = this._options.protocol;\n this._groupMap = new Map();\n this._ackMap = new Map();\n this._sequenceId = new SequenceId();\n this._state = WebPubSubClientState.Stopped;\n this._ackId = 0;\n }\n /**\n * Start to start to the service.\n * @param abortSignal - The abort signal\n */\n async start(options) {\n if (this._isStopping) {\n throw new Error(\"Can't start a client during stopping\");\n }\n if (this._state !== WebPubSubClientState.Stopped) {\n throw new Error(\"Client can be only started when it's Stopped\");\n }\n let abortSignal;\n if (options) {\n abortSignal = options.abortSignal;\n }\n if (!this._activeKeepaliveTask) {\n this._activeKeepaliveTask = this._getActiveKeepaliveTask();\n }\n try {\n await this._startCore(abortSignal);\n }\n catch (err) {\n // this two sentense should be set together. Consider client.stop() is called during _startCore()\n this._changeState(WebPubSubClientState.Stopped);\n if (this._activeKeepaliveTask) {\n this._activeKeepaliveTask.abort();\n this._activeKeepaliveTask = undefined;\n }\n this._isStopping = false;\n throw err;\n }\n }\n async _startFromRestarting(abortSignal) {\n if (this._state !== WebPubSubClientState.Disconnected) {\n throw new Error(\"Client can be only restarted when it's Disconnected\");\n }\n try {\n logger.verbose(\"Staring reconnecting.\");\n await this._startCore(abortSignal);\n }\n catch (err) {\n this._changeState(WebPubSubClientState.Disconnected);\n throw err;\n }\n }\n async _startCore(abortSignal) {\n this._changeState(WebPubSubClientState.Connecting);\n logger.info(\"Staring a new connection\");\n // Reset before a pure new connection\n this._sequenceId.reset();\n this._isInitialConnected = false;\n this._lastCloseEvent = undefined;\n this._lastDisconnectedMessage = undefined;\n this._connectionId = undefined;\n this._reconnectionToken = undefined;\n this._uri = undefined;\n if (typeof this._credential.getClientAccessUrl === \"string\") {\n this._uri = this._credential.getClientAccessUrl;\n }\n else {\n this._uri = await this._credential.getClientAccessUrl({\n abortSignal: abortSignal,\n });\n }\n if (typeof this._uri !== \"string\") {\n throw new Error(`The clientAccessUrl must be a string but currently it's ${typeof this._uri}`);\n }\n await this._connectCore(this._uri);\n }\n /**\n * Stop the client.\n */\n stop() {\n if (this._state === WebPubSubClientState.Stopped || this._isStopping) {\n return;\n }\n // TODO: Maybe we need a better logic for stopping control\n this._isStopping = true;\n if (this._wsClient && this._wsClient.isOpen()) {\n this._wsClient.close();\n }\n else {\n this._isStopping = false;\n }\n if (this._activeKeepaliveTask) {\n this._activeKeepaliveTask.abort();\n this._activeKeepaliveTask = undefined;\n }\n }\n on(event, listener) {\n this._emitter.on(event, listener);\n }\n off(event, listener) {\n this._emitter.removeListener(event, listener);\n }\n _emitEvent(event, args) {\n this._emitter.emit(event, args);\n }\n /**\n * Send custom event to server.\n * @param eventName - The event name\n * @param content - The data content\n * @param dataType - The data type\n * @param options - The options\n * @param abortSignal - The abort signal\n */\n async sendEvent(eventName, content, dataType, options) {\n return await this._operationExecuteWithRetry(() => this._sendEventAttempt(eventName, content, dataType, options), options === null || options === void 0 ? void 0 : options.abortSignal);\n }\n async _sendEventAttempt(eventName, content, dataType, options) {\n var _a;\n const fireAndForget = (_a = options === null || options === void 0 ? void 0 : options.fireAndForget) !== null && _a !== void 0 ? _a : false;\n if (!fireAndForget) {\n return await this._sendMessageWithAckId((id) => {\n return {\n kind: \"sendEvent\",\n dataType: dataType,\n data: content,\n ackId: id,\n event: eventName,\n };\n }, options === null || options === void 0 ? void 0 : options.ackId, options === null || options === void 0 ? void 0 : options.abortSignal);\n }\n const message = {\n kind: \"sendEvent\",\n dataType: dataType,\n data: content,\n event: eventName,\n };\n await this._sendMessage(message, options === null || options === void 0 ? void 0 : options.abortSignal);\n return { isDuplicated: false };\n }\n /**\n * Join the client to group\n * @param groupName - The group name\n * @param options - The join group options\n */\n async joinGroup(groupName, options) {\n return await this._operationExecuteWithRetry(() => this._joinGroupAttempt(groupName, options), options === null || options === void 0 ? void 0 : options.abortSignal);\n }\n async _joinGroupAttempt(groupName, options) {\n const group = this._getOrAddGroup(groupName);\n const result = await this._joinGroupCore(groupName, options);\n group.isJoined = true;\n return result;\n }\n async _joinGroupCore(groupName, options) {\n return await this._sendMessageWithAckId((id) => {\n return {\n group: groupName,\n ackId: id,\n kind: \"joinGroup\",\n };\n }, options === null || options === void 0 ? void 0 : options.ackId, options === null || options === void 0 ? void 0 : options.abortSignal);\n }\n /**\n * Leave the client from group\n * @param groupName - The group name\n * @param ackId - The optional ackId. If not specified, client will generate one.\n * @param abortSignal - The abort signal\n */\n async leaveGroup(groupName, options) {\n return await this._operationExecuteWithRetry(() => this._leaveGroupAttempt(groupName, options), options === null || options === void 0 ? void 0 : options.abortSignal);\n }\n async _leaveGroupAttempt(groupName, options) {\n const group = this._getOrAddGroup(groupName);\n const result = await this._sendMessageWithAckId((id) => {\n return {\n group: groupName,\n ackId: id,\n kind: \"leaveGroup\",\n };\n }, options === null || options === void 0 ? void 0 : options.ackId, options === null || options === void 0 ? void 0 : options.abortSignal);\n group.isJoined = false;\n return result;\n }\n /**\n * Send message to group.\n * @param groupName - The group name\n * @param content - The data content\n * @param dataType - The data type\n * @param options - The options\n * @param abortSignal - The abort signal\n */\n async sendToGroup(groupName, content, dataType, options) {\n return await this._operationExecuteWithRetry(() => this._sendToGroupAttempt(groupName, content, dataType, options), options === null || options === void 0 ? void 0 : options.abortSignal);\n }\n async _sendToGroupAttempt(groupName, content, dataType, options) {\n var _a, _b;\n const fireAndForget = (_a = options === null || options === void 0 ? void 0 : options.fireAndForget) !== null && _a !== void 0 ? _a : false;\n const noEcho = (_b = options === null || options === void 0 ? void 0 : options.noEcho) !== null && _b !== void 0 ? _b : false;\n if (!fireAndForget) {\n return await this._sendMessageWithAckId((id) => {\n return {\n kind: \"sendToGroup\",\n group: groupName,\n dataType: dataType,\n data: content,\n ackId: id,\n noEcho: noEcho,\n };\n }, options === null || options === void 0 ? void 0 : options.ackId, options === null || options === void 0 ? void 0 : options.abortSignal);\n }\n const message = {\n kind: \"sendToGroup\",\n group: groupName,\n dataType: dataType,\n data: content,\n noEcho: noEcho,\n };\n await this._sendMessage(message, options === null || options === void 0 ? void 0 : options.abortSignal);\n return { isDuplicated: false };\n }\n _getWebSocketClientFactory() {\n return new WebSocketClientFactory();\n }\n async _trySendSequenceAck() {\n if (!this._protocol.isReliableSubProtocol) {\n return;\n }\n const [isUpdated, seqId] = this._sequenceId.tryGetSequenceId();\n if (isUpdated && seqId) {\n const message = {\n kind: \"sequenceAck\",\n sequenceId: seqId,\n };\n try {\n await this._sendMessage(message);\n }\n catch (_a) {\n this._sequenceId.tryUpdate(seqId); // If sending failed, mark it as updated so that it can be sent again.\n }\n }\n }\n _connectCore(uri) {\n if (this._isStopping) {\n throw new Error(\"Can't start a client during stopping\");\n }\n return new Promise((resolve, reject) => {\n // This part is executed sync\n const client = (this._wsClient = this._getWebSocketClientFactory().create(uri, this._protocol.name));\n client.onopen(() => {\n // There's a case that client called stop() before this method. We need to check and close it if it's the case.\n if (this._isStopping) {\n try {\n client.close();\n }\n catch (_a) { }\n reject(new Error(`The client is stopped`));\n }\n logger.verbose(\"WebSocket connection has opened\");\n this._changeState(WebPubSubClientState.Connected);\n if (this._protocol.isReliableSubProtocol) {\n if (this._sequenceAckTask != null) {\n this._sequenceAckTask.abort();\n }\n this._sequenceAckTask = new AbortableTask(async () => {\n await this._trySendSequenceAck();\n }, 1000);\n }\n resolve();\n });\n client.onerror((e) => {\n if (this._sequenceAckTask != null) {\n this._sequenceAckTask.abort();\n }\n reject(e);\n });\n client.onclose((code, reason) => {\n if (this._state === WebPubSubClientState.Connected) {\n logger.verbose(\"WebSocket closed after open\");\n if (this._sequenceAckTask != null) {\n this._sequenceAckTask.abort();\n }\n logger.info(`WebSocket connection closed. Code: ${code}, Reason: ${reason}`);\n this._lastCloseEvent = { code: code, reason: reason };\n this._handleConnectionClose.call(this);\n }\n else {\n logger.verbose(\"WebSocket closed before open\");\n reject(new Error(`Failed to start WebSocket: ${code}`));\n }\n });\n client.onmessage((data) => {\n const handleAckMessage = (message) => {\n if (this._ackMap.has(message.ackId)) {\n const entity = this._ackMap.get(message.ackId);\n this._ackMap.delete(message.ackId);\n const isDuplicated = message.error != null && message.error.name === \"Duplicate\";\n if (message.success || isDuplicated) {\n entity.resolve({\n ackId: message.ackId,\n isDuplicated: isDuplicated,\n });\n }\n else {\n entity.reject(new SendMessageError(\"Failed to send message.\", {\n ackId: message.ackId,\n errorDetail: message.error,\n }));\n }\n }\n };\n const handleConnectedMessage = async (message) => {\n this._connectionId = message.connectionId;\n this._reconnectionToken = message.reconnectionToken;\n if (!this._isInitialConnected) {\n this._isInitialConnected = true;\n if (this._options.autoRejoinGroups) {\n const groupPromises = [];\n this._groupMap.forEach((g) => {\n if (g.isJoined) {\n groupPromises.push((async () => {\n try {\n await this._joinGroupCore(g.name);\n }\n catch (err) {\n this._safeEmitRejoinGroupFailed(g.name, err);\n }\n })());\n }\n });\n try {\n await Promise.all(groupPromises);\n }\n catch (_a) { }\n }\n this._safeEmitConnected(message.connectionId, message.userId);\n }\n };\n const handleDisconnectedMessage = (message) => {\n this._lastDisconnectedMessage = message;\n };\n const handleGroupDataMessage = (message) => {\n if (message.sequenceId != null) {\n const diff = this._sequenceId.tryUpdate(message.sequenceId);\n if (diff === 0) {\n // drop duplicated message\n return;\n }\n // If the diff is larger than the threshold, we must ack quicker to avoid slow client drop.\n if (diff > this._quickSequenceAckDiff) {\n this._trySendSequenceAck();\n }\n }\n this._safeEmitGroupMessage(message);\n };\n const handleServerDataMessage = (message) => {\n if (message.sequenceId != null) {\n const diff = this._sequenceId.tryUpdate(message.sequenceId);\n if (diff === 0) {\n // drop duplicated message\n return;\n }\n // If the diff is larger than the threshold, we must ack quicker to avoid slow client drop.\n if (diff > this._quickSequenceAckDiff) {\n this._trySendSequenceAck();\n }\n }\n this._safeEmitServerMessage(message);\n };\n let messages;\n try {\n let convertedData;\n if (Array.isArray(data)) {\n convertedData = Buffer.concat(data);\n }\n else {\n convertedData = data;\n }\n messages = this._protocol.parseMessages(convertedData);\n if (messages === null) {\n // null means the message is not recognized.\n return;\n }\n }\n catch (err) {\n logger.warning(\"An error occurred while parsing the message from service\", err);\n throw err;\n }\n if (!Array.isArray(messages)) {\n messages = [messages];\n }\n messages.forEach((message) => {\n try {\n switch (message.kind) {\n case \"ack\": {\n handleAckMessage(message);\n break;\n }\n case \"connected\": {\n handleConnectedMessage(message);\n break;\n }\n case \"disconnected\": {\n handleDisconnectedMessage(message);\n break;\n }\n case \"groupData\": {\n handleGroupDataMessage(message);\n break;\n }\n case \"serverData\": {\n handleServerDataMessage(message);\n break;\n }\n }\n }\n catch (err) {\n logger.warning(`An error occurred while handling the message with kind: ${message.kind} from service`, err);\n }\n });\n });\n });\n }\n async _handleConnectionCloseAndNoRecovery() {\n this._state = WebPubSubClientState.Disconnected;\n this._safeEmitDisconnected(this._connectionId, this._lastDisconnectedMessage);\n // Auto reconnect or stop\n if (this._options.autoReconnect) {\n await this._autoReconnect();\n }\n else {\n await this._handleConnectionStopped();\n }\n }\n async _autoReconnect() {\n let isSuccess = false;\n let attempt = 0;\n try {\n while (!this._isStopping) {\n try {\n await this._startFromRestarting();\n isSuccess = true;\n break;\n }\n catch (err) {\n logger.warning(\"An attempt to reconnect connection failed.\", err);\n attempt++;\n const delayInMs = this._reconnectRetryPolicy.nextRetryDelayInMs(attempt);\n if (delayInMs == null) {\n break;\n }\n try {\n logger.verbose(`Delay time for reconnect attempt ${attempt}: ${delayInMs}`);\n await delay(delayInMs);\n }\n catch (_a) { }\n }\n }\n }\n finally {\n if (!isSuccess) {\n this._handleConnectionStopped();\n }\n }\n }\n _handleConnectionStopped() {\n this._isStopping = false;\n this._state = WebPubSubClientState.Stopped;\n this._safeEmitStopped();\n }\n _getActiveKeepaliveTask() {\n return new AbortableTask(async () => {\n this._sequenceId.tryUpdate(0); // force update\n }, this._activeTimeoutInMs);\n }\n async _sendMessage(message, abortSignal) {\n if (!this._wsClient || !this._wsClient.isOpen()) {\n throw new Error(\"The connection is not connected.\");\n }\n const payload = this._protocol.writeMessage(message);\n await this._wsClient.send(payload, abortSignal);\n }\n async _sendMessageWithAckId(messageProvider, ackId, abortSignal) {\n if (ackId == null) {\n ackId = this.nextAckId();\n }\n const message = messageProvider(ackId);\n if (!this._ackMap.has(ackId)) {\n this._ackMap.set(ackId, new AckEntity(ackId));\n }\n const entity = this._ackMap.get(ackId);\n try {\n await this._sendMessage(message, abortSignal);\n }\n catch (error) {\n this._ackMap.delete(ackId);\n let errorMessage = \"\";\n if (error instanceof Error) {\n errorMessage = error.message;\n }\n throw new SendMessageError(errorMessage, { ackId: ackId });\n }\n if (abortSignal) {\n try {\n return await abortablePromise(entity.promise(), abortSignal);\n }\n catch (err) {\n if (err instanceof Error && err.name === \"AbortError\") {\n throw new SendMessageError(\"Cancelled by abortSignal\", { ackId: ackId });\n }\n throw err;\n }\n }\n return await entity.promise();\n }\n async _handleConnectionClose() {\n // Clean ack cache\n this._ackMap.forEach((value, key) => {\n if (this._ackMap.delete(key)) {\n value.reject(new SendMessageError(\"Connection is disconnected before receive ack from the service\", {\n ackId: value.ackId,\n }));\n }\n });\n if (this._isStopping) {\n logger.warning(\"The client is stopping state. Stop recovery.\");\n this._handleConnectionCloseAndNoRecovery();\n return;\n }\n if (this._lastCloseEvent && this._lastCloseEvent.code === 1008) {\n logger.warning(\"The websocket close with status code 1008. Stop recovery.\");\n this._handleConnectionCloseAndNoRecovery();\n return;\n }\n if (!this._protocol.isReliableSubProtocol) {\n logger.warning(\"The protocol is not reliable, recovery is not applicable\");\n this._handleConnectionCloseAndNoRecovery();\n return;\n }\n // Build recovery uri\n const recoveryUri = this._buildRecoveryUri();\n if (!recoveryUri) {\n logger.warning(\"Connection id or reconnection token is not available\");\n this._handleConnectionCloseAndNoRecovery();\n return;\n }\n // Try recover connection\n let recovered = false;\n this._state = WebPubSubClientState.Recovering;\n const abortSignal = AbortController.timeout(30 * 1000);\n try {\n while (!abortSignal.aborted || this._isStopping) {\n try {\n await this._connectCore.call(this, recoveryUri);\n recovered = true;\n return;\n }\n catch (_a) {\n await delay(1000);\n }\n }\n }\n finally {\n if (!recovered) {\n logger.warning(\"Recovery attempts failed more then 30 seconds or the client is stopping\");\n this._handleConnectionCloseAndNoRecovery();\n }\n }\n }\n _safeEmitConnected(connectionId, userId) {\n this._emitEvent(\"connected\", {\n connectionId: connectionId,\n userId: userId,\n });\n }\n _safeEmitDisconnected(connectionId, lastDisconnectedMessage) {\n this._emitEvent(\"disconnected\", {\n connectionId: connectionId,\n message: lastDisconnectedMessage,\n });\n }\n _safeEmitGroupMessage(message) {\n this._emitEvent(\"group-message\", {\n message: message,\n });\n }\n _safeEmitServerMessage(message) {\n this._emitEvent(\"server-message\", {\n message: message,\n });\n }\n _safeEmitStopped() {\n this._emitEvent(\"stopped\", {});\n }\n _safeEmitRejoinGroupFailed(groupName, err) {\n this._emitEvent(\"rejoin-group-failed\", {\n group: groupName,\n error: err,\n });\n }\n _buildDefaultOptions(clientOptions) {\n if (clientOptions.autoReconnect == null) {\n clientOptions.autoReconnect = true;\n }\n if (clientOptions.autoRejoinGroups == null) {\n clientOptions.autoRejoinGroups = true;\n }\n if (clientOptions.protocol == null) {\n clientOptions.protocol = WebPubSubJsonReliableProtocol();\n }\n this._buildMessageRetryOptions(clientOptions);\n this._buildReconnectRetryOptions(clientOptions);\n return clientOptions;\n }\n _buildMessageRetryOptions(clientOptions) {\n if (!clientOptions.messageRetryOptions) {\n clientOptions.messageRetryOptions = {};\n }\n if (clientOptions.messageRetryOptions.maxRetries == null ||\n clientOptions.messageRetryOptions.maxRetries < 0) {\n clientOptions.messageRetryOptions.maxRetries = 3;\n }\n if (clientOptions.messageRetryOptions.retryDelayInMs == null ||\n clientOptions.messageRetryOptions.retryDelayInMs < 0) {\n clientOptions.messageRetryOptions.retryDelayInMs = 1000;\n }\n if (clientOptions.messageRetryOptions.maxRetryDelayInMs == null ||\n clientOptions.messageRetryOptions.maxRetryDelayInMs < 0) {\n clientOptions.messageRetryOptions.maxRetryDelayInMs = 30000;\n }\n if (clientOptions.messageRetryOptions.mode == null) {\n clientOptions.messageRetryOptions.mode = \"Fixed\";\n }\n }\n _buildReconnectRetryOptions(clientOptions) {\n if (!clientOptions.reconnectRetryOptions) {\n clientOptions.reconnectRetryOptions = {};\n }\n if (clientOptions.reconnectRetryOptions.maxRetries == null ||\n clientOptions.reconnectRetryOptions.maxRetries < 0) {\n clientOptions.reconnectRetryOptions.maxRetries = Number.MAX_VALUE;\n }\n if (clientOptions.reconnectRetryOptions.retryDelayInMs == null ||\n clientOptions.reconnectRetryOptions.retryDelayInMs < 0) {\n clientOptions.reconnectRetryOptions.retryDelayInMs = 1000;\n }\n if (clientOptions.reconnectRetryOptions.maxRetryDelayInMs == null ||\n clientOptions.reconnectRetryOptions.maxRetryDelayInMs < 0) {\n clientOptions.reconnectRetryOptions.maxRetryDelayInMs = 30000;\n }\n if (clientOptions.reconnectRetryOptions.mode == null) {\n clientOptions.reconnectRetryOptions.mode = \"Fixed\";\n }\n }\n _buildRecoveryUri() {\n if (this._connectionId && this._reconnectionToken && this._uri) {\n const url = new URL(this._uri);\n url.searchParams.append(\"awps_connection_id\", this._connectionId);\n url.searchParams.append(\"awps_reconnection_token\", this._reconnectionToken);\n return url.toString();\n }\n return null;\n }\n _getOrAddGroup(name) {\n if (!this._groupMap.has(name)) {\n this._groupMap.set(name, new WebPubSubGroup(name));\n }\n return this._groupMap.get(name);\n }\n _changeState(newState) {\n logger.verbose(`The client state transfer from ${this._state.toString()} to ${newState.toString()}`);\n this._state = newState;\n }\n async _operationExecuteWithRetry(inner, signal) {\n let retryAttempt = 0;\n while (true) {\n try {\n return await inner.call(this);\n }\n catch (err) {\n retryAttempt++;\n const delayInMs = this._messageRetryPolicy.nextRetryDelayInMs(retryAttempt);\n if (delayInMs == null) {\n throw err;\n }\n await delay(delayInMs);\n if (signal === null || signal === void 0 ? void 0 : signal.aborted) {\n throw err;\n }\n }\n }\n }\n}\nclass RetryPolicy {\n constructor(retryOptions) {\n this._retryOptions = retryOptions;\n this._maxRetriesToGetMaxDelay = Math.ceil(Math.log2(this._retryOptions.maxRetryDelayInMs) -\n Math.log2(this._retryOptions.retryDelayInMs) +\n 1);\n }\n nextRetryDelayInMs(retryAttempt) {\n if (retryAttempt > this._retryOptions.maxRetries) {\n return null;\n }\n else {\n if (this._retryOptions.mode === \"Fixed\") {\n return this._retryOptions.retryDelayInMs;\n }\n else {\n return this._calculateExponentialDelay(retryAttempt);\n }\n }\n }\n _calculateExponentialDelay(attempt) {\n if (attempt >= this._maxRetriesToGetMaxDelay) {\n return this._retryOptions.maxRetryDelayInMs;\n }\n else {\n return (1 << (attempt - 1)) * this._retryOptions.retryDelayInMs;\n }\n }\n}\nclass WebPubSubGroup {\n constructor(name) {\n this.isJoined = false;\n this.name = name;\n }\n}\nclass AckEntity {\n constructor(ackId) {\n this._promise = new Promise((resolve, reject) => {\n this._resolve = resolve;\n this._reject = reject;\n });\n this.ackId = ackId;\n }\n promise() {\n return this._promise;\n }\n resolve(value) {\n this._resolve(value);\n }\n reject(reason) {\n this._reject(reason);\n }\n}\nclass SequenceId {\n constructor() {\n this._sequenceId = 0;\n this._isUpdate = false;\n }\n tryUpdate(sequenceId) {\n this._isUpdate = true;\n if (sequenceId > this._sequenceId) {\n const diff = sequenceId - this._sequenceId;\n this._sequenceId = sequenceId;\n return diff;\n }\n return 0;\n }\n tryGetSequenceId() {\n if (this._isUpdate) {\n this._isUpdate = false;\n return [true, this._sequenceId];\n }\n return [false, null];\n }\n reset() {\n this._sequenceId = 0;\n this._isUpdate = false;\n }\n}\nclass AbortableTask {\n constructor(func, interval, obj) {\n this._func = func;\n this._abortController = new AbortController();\n this._interval = interval;\n this._obj = obj;\n this._start();\n }\n abort() {\n try {\n this._abortController.abort();\n }\n catch (_a) { }\n }\n async _start() {\n const signal = this._abortController.signal;\n while (!signal.aborted) {\n try {\n await this._func(this._obj);\n }\n catch (_a) {\n }\n finally {\n await delay(this._interval);\n }\n }\n }\n}\n//# sourceMappingURL=webPubSubClient.js.map","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n"],"names":["enabledString","azureLogLevel","listenersMap","WeakMap","abortedMap","AbortSignal","constructor","onabort","set","aborted","has","get","none","addEventListener","_type","listener","listeners","push","removeEventListener","index","indexOf","splice","dispatchEvent","_event","abortSignal","signal","call","slice","forEach","type","AbortError","Error","message","name","AbortController","parentSignals","_signal","parentSignal","Array","isArray","arguments","abort","timeout","ms","timer","setTimeout","unref","AbortError_AbortError","delay","timeInMs","options","token","abortErrorMsg","createAbortablePromise","buildPromise","cleanupBeforeAbort","Promise","resolve","reject","rejectOnAbort","removeListeners","onAbort","x","err","clearTimeout","_a","globalThis","crypto","randomUUID","bind","window","document","self","importScripts","checkEnvironment_a","_b","_c","Deno","version","deno","Bun","process","_d","versions","node","navigator","product","WebPubSubClientState","SendMessageError","ackId","errorDetail","debugEnvVariable","env","DEBUG","undefined","enabledNamespaces","skippedNamespaces","debuggers","enable","debugObj","Object","assign","createDebugger","namespace","enabled","disable","result","log","args","length","firstArg","String","includes","console","error","warn","info","debug","namespaces","wildcard","ns","split","map","trim","replace","startsWith","substr","instance","endsWith","skipped","test","enabledNamespace","newDebugger","destroy","extend","registeredLoggers","Set","logLevelFromEnv","browser_process","AZURE_LOG_LEVEL","AzureLogger","AZURE_LOG_LEVELS","isAzureLogLevel","setLogLevel","level","join","logger","shouldEnable","levelMap","verbose","warning","patchLogMethod","parent","child","createLogger","add","Boolean","logLevel","createClientLogger","clientRootLogger","getPayload","data","dataType","ArrayBuffer","buffer","lW","from","toString","parsePayload","buf","byteOffset","byteLength","WebPubSubJsonReliableProtocolImpl","isReliableSubProtocol","parseMessages","input","returnMessage","parsedMessage","JSON","parse","typedMessage","event","kind","writeMessage","group","noEcho","sequenceId","stringify","WebPubSubJsonReliableProtocol","WebSocketClient","uri","protocolName","_socket","WebSocket","binaryType","onopen","fn","onclose","ev","code","reason","onerror","onmessage","close","send","_","isOpen","readyState","OPEN","WebSocketClientFactory","create","abortablePromise","promise","p","race","WebPubSubClient","nextAckId","_ackId","credential","_quickSequenceAckDiff","_activeTimeoutInMs","_emitter","events_default","_isStopping","_isInitialConnected","_credential","getClientAccessUrl","_buildDefaultOptions","_options","_messageRetryPolicy","RetryPolicy","messageRetryOptions","_reconnectRetryPolicy","reconnectRetryOptions","_protocol","protocol","_groupMap","Map","_ackMap","_sequenceId","SequenceId","_state","Stopped","start","_activeKeepaliveTask","_getActiveKeepaliveTask","_startCore","_changeState","_startFromRestarting","Disconnected","Connecting","reset","_lastCloseEvent","_lastDisconnectedMessage","_connectionId","_reconnectionToken","_uri","_connectCore","stop","_wsClient","on","off","removeListener","_emitEvent","emit","sendEvent","eventName","content","_operationExecuteWithRetry","_sendEventAttempt","fireAndForget","_sendMessage","isDuplicated","_sendMessageWithAckId","id","joinGroup","groupName","_joinGroupAttempt","_getOrAddGroup","_joinGroupCore","isJoined","leaveGroup","_leaveGroupAttempt","sendToGroup","_sendToGroupAttempt","_getWebSocketClientFactory","_trySendSequenceAck","isUpdated","seqId","tryGetSequenceId","tryUpdate","client","Connected","_sequenceAckTask","AbortableTask","e","_handleConnectionClose","messages","handleAckMessage","entity","delete","success","handleConnectedMessage","connectionId","reconnectionToken","autoRejoinGroups","groupPromises","g","_safeEmitRejoinGroupFailed","all","_safeEmitConnected","userId","handleDisconnectedMessage","handleGroupDataMessage","diff","_safeEmitGroupMessage","handleServerDataMessage","_safeEmitServerMessage","convertedData","Buffer","concat","_handleConnectionCloseAndNoRecovery","_safeEmitDisconnected","autoReconnect","_autoReconnect","_handleConnectionStopped","isSuccess","attempt","delayInMs","nextRetryDelayInMs","_safeEmitStopped","payload","messageProvider","AckEntity","errorMessage","value","key","recoveryUri","_buildRecoveryUri","recovered","Recovering","lastDisconnectedMessage","clientOptions","_buildMessageRetryOptions","_buildReconnectRetryOptions","maxRetries","retryDelayInMs","maxRetryDelayInMs","mode","Number","MAX_VALUE","url","URL","searchParams","append","WebPubSubGroup","newState","inner","retryAttempt","retryOptions","_retryOptions","_maxRetriesToGetMaxDelay","Math","ceil","log2","_calculateExponentialDelay","_promise","_resolve","_reject","_isUpdate","func","interval","obj","_func","_abortController","_interval","_obj","_start","ReflectOwnKeys","R","Reflect","ReflectApply","apply","target","receiver","Function","prototype","ownKeys","getOwnPropertySymbols","getOwnPropertyNames","NumberIsNaN","isNaN","EventEmitter","init","module","exports","once","emitter","flags","errorListener","resolver","eventTargetAgnosticAddListener","_events","_eventsCount","_maxListeners","defaultMaxListeners","checkListener","_getMaxListeners","that","_addListener","prepend","events","newListener","existing","unshift","m","warned","w","count","onceWrapper","fired","wrapFn","_onceWrap","state","wrapped","_listeners","unwrap","evlistener","unwrapListeners","arr","ret","i","arrayClone","listenerCount","n","copy","wrapListener","arg","defineProperty","enumerable","getPrototypeOf","setMaxListeners","getMaxListeners","doError","er","context","handler","len","addListener","prependListener","prependOnceListener","list","position","originalListener","shift","spliceOne","pop","removeAllListeners","keys","rawListeners","eventNames"],"sourceRoot":""}